Version 1.0
- 1 -
October 1984
MKF2C(1)
Silicon Graphics
MKF2C(1)
NAME
mkf2c, mkc2f - generate C-FORTRAN interface routines
SYNOPSIS
mkc2f
dummyfortran.cf dummyfortran.s
mkf2c
cprog.tc cprog.s
DESCRIPTION
mkf2c
and
mkc2f
are used to generate assembly-language routines to interface
C functions to FORTRAN routines.
mkc2f
generates an interface for C func-
tions to call FORTRAN routines.
mkf2c
generates an interface for FORTRAN
routines to call C functions.
Both programs accept as input a set of C functions, and produce an
assembly-language interface routine in the output file. In the case ot
mkc2f
;
the input may be a copy of the actual C file being interfaced, perhaps fil-
tered by the program
extcentry(1)
. In the case of
mkf2c
, the FORTRAN rou-tines
must have their parameter lists coded in C for input to the program. (This
must be done manually. Refer to Appendix D of the
IRIS Workstation Guide
.) In
all cases,
mkf2c
and
mkc2f
generate a
.s
file that must be assembled with
as(1)
,
and loaded with the FORTRAN and C routines that are to be interfaced.
mkc2f
and
mkf2c
use the parameter declarations in the C function headers to
transform each parameter of the calling language to that of the receiving
language. The standard basic C types attached to the parameters are used to
determine the object each parameter represents - i.e., whether it is a value or
pointer, its size, whether it is unsigned, etc. (Character strings are handled
specially - the reader is referred to the paper on the programs.) Only the
opening and closing brace of the function body must be present. Informa-
tion in the body of the function is ignored. fhe programs cannot understand
C constructs other than functions and comments (e.g., external declarations,
typedefs, C preprocessor constructs, etc.). Such unrecognized constructs
must be eliminated from the input (this is the purpose of
extcentry(1)
).
EXAMPLE
A sample C function given to the programs as input might be
test(i,s,c,ptr1,ptr2,ar1,f,d,d1,str1,str2,str3,u)
short s;
unsigned char c;
int *ptr1;
char *ptr2[];
short ar1[];
float f;
long float d,*d1;
char *str1;
char str2[],str3[30];
Summary of Contents for IRIS Workstation
Page 1: ...IRIS Workstation Guide Version 1 0 Silicon Graphics Inc Mountain View California 94043 ...
Page 6: ...2 IRIS WORKSTATION GUIDE Version 1 0 Introduction ...
Page 24: ...20 IRIS WORKSTATION GUIDE Version 1 0 Hardware Installation ...
Page 30: ...26 IRIS WORKSTATION GUIDE Version 1 0 Operation ...
Page 48: ...44 IRIS WORKSTATION GUIDE Version 1 0 System Administration ...
Page 50: ...46 IRIS WORKSTATION GUIDE Version 1 0 Appendix A ...
Page 74: ...70 IRIS WORKSTATION GUIDE Version 1 0 Appendix B ...
Page 77: ...Version 1 0 IRIS WORKSTATION GUIDE 73 Appendix C e random gr error f wnrepaint ...
Page 78: ...74 IRIS WORKSTATION GUIDE Version 1 0 Appendix C ...
Page 92: ...88 IRIS WORKSTATION GUIDE Version 1 0 Appendix D ...
Page 102: ...98 IRIS WORKSTATION GUIDE Version 1 0 Appendix E ...
Page 103: ...Appendix F Manual Pages ...
Page 104: ......
Page 131: ...Version 1 0 126 IRIS WORKSTATION GUIDE Appendix F ...
Page 132: ......
Page 136: ...130 IRIS WORKSTATION GUIDE Version 1 0 Appendix H ...
Page 152: ...146 IRIS WORKSTATION GUIDE Version 1 0 Appendix J ...