Version 1.0
IRIS WORKSTATION GUIDE 81
Appendix D:
Invoking mkf2c and mkc2f
mkc2f
and
mkf2c
are invoked by a command line as
mkc2f <input file> <output file>
The output file contains assembly language routines that must be assembled
and linked with the FORTRAN and C routines.
Input for mkf2c and mkc2f
mkf2c
and
mkc2f
understand common C syntax for function entry points, will
ignore C style comments, and will pass over function bodies. They cannot
understand constructs such as
typedefs
or
external
function definitions. It is
necessary to exclude these constructs from the wrapper input. This can be
accomplished by placing special comments in the code to designate those
functions for which FORTRAN-to-C wrappers are to be generated. The code is
then passed through the program
extcentry
(1).
extcentry
will place in its output file
only those portions of its input that are surrounded by the special C comments
/* CENTRY */
and
/* ENDCENTRY */
.
extcentry
is invoked simply by typing
extcentry <input file> <output file>
The following C file
foo.c
contains the function
foo
that is to be made
FORTRAN-callable.
typedef unsigned short grunt[4];
struct {
long l,l1;
char *str;
} bar;
main ()
{
int kappa=7;
foo(kappa,bar,str);
}
/* CENTRY */
foo (integer,cstring)
int integer;
char *cstring;
{
if (integer == 1) printf(“%s”,cstring);
}
/* ENDCENTRY */
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 ...