Pristine Ack-5.5
[Ack-5.5.git] / lang / fortran / lib / libI77 / README
1 If your system lacks /usr/include/local.h ,
2 then you should create an appropriate local.h in
3 this directory.  An appropriate local.h may simply
4 be empty, or it may #define VAX or #define CRAY
5 (or whatever else you must do to make fp.h work right).
6 Alternatively, edit fp.h to suite your machine.
7
8 If your system lacks /usr/include/fcntl.h , then you
9 should simply create an empty fcntl.h in this directory.
10
11 If your system's sprintf does not work the way ANSI C
12 specifies -- specifically, if it does not return the
13 number of characters transmitted -- then insert the line
14
15 #define USE_STRLEN
16
17 at the end of fmt.h .  This is necessary with
18 at least some versions of Sun software.
19
20 If your system's fopen does not like the ANSI binary
21 reading and writing modes "rb" and "wb", then you should
22 compile open.c with NON_ANSI_RW_MODES #defined.
23
24 If you get error messages about references to cf->_ptr
25 and cf->_base when compiling wrtfmt.c and wsfe.c or to
26 stderr->_flag when compiling err.c, then insert the line
27
28 #define NON_UNIX_STDIO
29
30 at the beginning of fio.h, and recompile these modules.
31
32 You may need to supply the following non-ANSI routines:
33
34   fstat(int fileds, struct stat *buf) is similar
35 to stat(char *name, struct stat *buf), except that
36 the first argument, fileds, is the file descriptor
37 returned by open rather than the name of the file.
38 fstat is used in the system-dependent routine
39 canseek (in the libI77 source file err.c), which
40 is supposed to return 1 if it's possible to issue
41 seeks on the file in question, 0 if it's not; you may
42 need to suitably modify err.c .  On non-UNIX systems,
43 you can avoid references to fstat and stat by compiling
44 err.c, inquire.c, open.c, and util.c with MSDOS defined;
45 in that case, you may need to supply access(char *Name,0),
46 which is supposed to return 0 if file Name exists,
47 nonzero otherwise.
48
49   char * mktemp(char *buf) is supposed to replace the
50 6 trailing X's in buf with a unique number and then
51 return buf.  The idea is to get a unique name for
52 a temporary file.
53
54 On non-UNIX systems, you may need to change a few other,
55 e.g.: the form of name computed by mktemp() in endfile.c and
56 open.c; the use of the open(), close(), and creat() system
57 calls in endfile.c, err.c, open.c; and the modes in calls on
58 fopen() and fdopen() (and perhaps the use of fdopen() itself
59 -- it's supposed to return a FILE* corresponding to a given
60 an integer file descriptor) in err.c and open.c (component ufmt
61 of struct unit is 1 for formatted I/O -- text mode on some systems
62 -- and 0 for unformatted I/O -- binary mode on some systems).
63
64 For Turbo C++, in particular, you need to adjust the mktemp
65 invocations and should compile all of libI77 with -DMSDOS .
66 You also need to #undef ungetc in lread.c and rsne.c .
67 Don't use -mh -- it is horribly broken.
68
69 If you want to be able to load against libI77 but not libF77,
70 then you will need to add sig_die.o (from libF77) to libI77.
71
72 If you wish to use translated Fortran that has funny notions
73 of record length for direct unformatted I/O (i.e., that assumes
74 RECL= values in OPEN statements are not bytes but rather counts
75 of some other units -- e.g., 4-character words for VMS), then you
76 should insert an appropriate #define for url_Adjust at the
77 beginning of open.c .  For VMS Fortran, for example,
78 #define url_Adjust(x) x *= 4
79 would suffice.
80
81 To check for transmission errors, issue the command
82         make check
83 This assumes you have the xsum program whose source, xsum.c,
84 is distributed as part of "all from f2c/src".  If you do not
85 have xsum, you can obtain xsum.c by sending the following E-mail
86 message to netlib@research.att.com
87         send xsum.c from f2c/src
88
89 The makefile assumes you have installed f2c.h in a standard
90 place (and does not cause recompilation when f2c.h is changed);
91 f2c.h comes with "all from f2c" (the source for f2c) and is
92 available separately ("f2c.h from f2c").