|
|
1.1 root 1: If your compiler does not recognize ANSI C headers,
2: compile with KR_headers defined: either add -DKR_headers
3: to the definition of CFLAGS in the makefile, or insert
4:
5: #define KR_headers
6:
7: at the top of f2c.h .
8:
9:
10: If your system lacks /usr/include/local.h ,
11: then you should create an appropriate local.h in
12: this directory. An appropriate local.h may simply
13: be empty, or it may #define VAX or #define CRAY
14: (or whatever else you must do to make fp.h work right).
15: Alternatively, edit fp.h to suite your machine.
16:
17: If your system lacks /usr/include/fcntl.h , then you
18: should simply create an empty fcntl.h in this directory.
19: If your compiler then complains about creat and open not
20: having a prototype, compile with OPEN_DECL defined.
21: On many systems, open and creat are declared in fcntl.h .
22:
23: If your system's sprintf does not work the way ANSI C
24: specifies -- specifically, if it does not return the
25: number of characters transmitted -- then insert the line
26:
27: #define USE_STRLEN
28:
29: at the end of fmt.h . This is necessary with
30: at least some versions of Sun software.
31:
32: If your system's fopen does not like the ANSI binary
33: reading and writing modes "rb" and "wb", then you should
34: compile open.c with NON_ANSI_RW_MODES #defined.
35:
36: If you get error messages about references to cf->_ptr
37: and cf->_base when compiling wrtfmt.c and wsfe.c or to
38: stderr->_flag when compiling err.c, then insert the line
39:
40: #define NON_UNIX_STDIO
41:
42: at the beginning of fio.h, and recompile these modules.
43:
44: Unformatted sequential records consist of a length of record
45: contents, the record contents themselves, and the length of
46: record contents again (for backspace). Prior to 17 Oct. 1991,
47: the length was of type int; now it is of type long, but you
48: can change it back to int by inserting
49:
50: #define UIOLEN_int
51:
52: at the beginning of fio.h. This affects only sue.c and uio.c .
53:
54: You may need to supply the following non-ANSI routines:
55:
56: fstat(int fileds, struct stat *buf) is similar
57: to stat(char *name, struct stat *buf), except that
58: the first argument, fileds, is the file descriptor
59: returned by open rather than the name of the file.
60: fstat is used in the system-dependent routine
61: canseek (in the libI77 source file err.c), which
62: is supposed to return 1 if it's possible to issue
63: seeks on the file in question, 0 if it's not; you may
64: need to suitably modify err.c . On non-UNIX systems,
65: you can avoid references to fstat and stat by compiling
66: err.c, inquire.c, open.c, and util.c with MSDOS defined;
67: in that case, you may need to supply access(char *Name,0),
68: which is supposed to return 0 if file Name exists,
69: nonzero otherwise.
70:
71: char * mktemp(char *buf) is supposed to replace the
72: 6 trailing X's in buf with a unique number and then
73: return buf. The idea is to get a unique name for
74: a temporary file.
75:
76: On non-UNIX systems, you may need to change a few other,
77: e.g.: the form of name computed by mktemp() in endfile.c and
78: open.c; the use of the open(), close(), and creat() system
79: calls in endfile.c, err.c, open.c; and the modes in calls on
80: fopen() and fdopen() (and perhaps the use of fdopen() itself
81: -- it's supposed to return a FILE* corresponding to a given
82: an integer file descriptor) in err.c and open.c (component ufmt
83: of struct unit is 1 for formatted I/O -- text mode on some systems
84: -- and 0 for unformatted I/O -- binary mode on some systems).
85:
86: For Turbo C++, in particular, you need to adjust the mktemp
87: invocations and should compile all of libI77 with -DMSDOS .
88: You also need to #undef ungetc in lread.c and rsne.c .
89: Don't use -mh -- it is horribly broken.
90:
91: If you want to be able to load against libI77 but not libF77,
92: then you will need to add sig_die.o (from libF77) to libI77.
93:
94: If you wish to use translated Fortran that has funny notions
95: of record length for direct unformatted I/O (i.e., that assumes
96: RECL= values in OPEN statements are not bytes but rather counts
97: of some other units -- e.g., 4-character words for VMS), then you
98: should insert an appropriate #define for url_Adjust at the
99: beginning of open.c . For VMS Fortran, for example,
100: #define url_Adjust(x) x *= 4
101: would suffice.
102:
103: To check for transmission errors, issue the command
104: make check
105: This assumes you have the xsum program whose source, xsum.c,
106: is distributed as part of "all from f2c/src". If you do not
107: have xsum, you can obtain xsum.c by sending the following E-mail
108: message to [email protected]
109: send xsum.c from f2c/src
110:
111: The makefile assumes you have installed f2c.h in a standard
112: place (and does not cause recompilation when f2c.h is changed);
113: f2c.h comes with "all from f2c" (the source for f2c) and is
114: available separately ("f2c.h from f2c").
115:
116: By default, Fortran I/O units 5, 6, and 0 are pre-connected to
117: stdin, stdout, and stderr, respectively. You can change this
118: behavior by changing f_init() in err.c to suit your needs.
119: Note that f2c assumes READ(*... means READ(5... and WRITE(*...
120: means WRITE(6... . Moreover, an OPEN(n,... statement that does
121: not specify a file name (and does not specify STATUS='SCRATCH')
122: assumes FILE='fort.n' . You can change this by editing open.c
123: and endfile.c suitably.
124:
125: Lines protected from compilation by #ifdef Allow_TYQUAD
126: are for a possible extension to 64-bit integers in which
127: integer = int = 32 bits and longint = long = 64 bits.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.