Annotation of researchv10dc/libI77/README, revision 1.1

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 and fmtlib.c .
        !             8: 
        !             9: 
        !            10: If you have a really ancient K&R C compiler that does not understand
        !            11: void, add -Dvoid=int to the definition of CFLAGS in the makefile.
        !            12: 
        !            13: If you use a C++ compiler, first create a local f2c.h by appending
        !            14: f2ch.add to the usual f2c.h, e.g., by issuing the command
        !            15:        make f2c.h
        !            16: which assumes f2c.h is installed in /usr/include .
        !            17: 
        !            18: If your system lacks /usr/include/local.h ,
        !            19: then you should create an appropriate local.h in
        !            20: this directory.  An appropriate local.h may simply
        !            21: be empty, or it may #define VAX or #define CRAY
        !            22: (or whatever else you must do to make fp.h work right).
        !            23: Alternatively, edit fp.h to suite your machine.
        !            24: 
        !            25: If your system lacks /usr/include/fcntl.h , then you
        !            26: should simply create an empty fcntl.h in this directory.
        !            27: If your compiler then complains about creat and open not
        !            28: having a prototype, compile with OPEN_DECL defined.
        !            29: On many systems, open and creat are declared in fcntl.h .
        !            30: 
        !            31: If your system's sprintf does not work the way ANSI C
        !            32: specifies -- specifically, if it does not return the
        !            33: number of characters transmitted -- then insert the line
        !            34: 
        !            35: #define USE_STRLEN
        !            36: 
        !            37: at the end of fmt.h .  This is necessary with
        !            38: at least some versions of Sun software.
        !            39: 
        !            40: If your system's fopen does not like the ANSI binary
        !            41: reading and writing modes "rb" and "wb", then you should
        !            42: compile open.c with NON_ANSI_RW_MODES #defined.
        !            43: 
        !            44: If you get error messages about references to cf->_ptr
        !            45: and cf->_base when compiling wrtfmt.c and wsfe.c or to
        !            46: stderr->_flag when compiling err.c, then insert the line
        !            47: 
        !            48: #define NON_UNIX_STDIO
        !            49: 
        !            50: at the beginning of fio.h, and recompile everything (or
        !            51: at least those modules that contain NON_UNIX_STDIO).
        !            52: 
        !            53: Unformatted sequential records consist of a length of record
        !            54: contents, the record contents themselves, and the length of
        !            55: record contents again (for backspace).  Prior to 17 Oct. 1991,
        !            56: the length was of type int; now it is of type long, but you
        !            57: can change it back to int by inserting
        !            58: 
        !            59: #define UIOLEN_int
        !            60: 
        !            61: at the beginning of fio.h.  This affects only sue.c and uio.c .
        !            62: 
        !            63: You may need to supply the following non-ANSI routines:
        !            64: 
        !            65:   fstat(int fileds, struct stat *buf) is similar
        !            66: to stat(char *name, struct stat *buf), except that
        !            67: the first argument, fileds, is the file descriptor
        !            68: returned by open rather than the name of the file.
        !            69: fstat is used in the system-dependent routine
        !            70: canseek (in the libI77 source file err.c), which
        !            71: is supposed to return 1 if it's possible to issue
        !            72: seeks on the file in question, 0 if it's not; you may
        !            73: need to suitably modify err.c .  On non-UNIX systems,
        !            74: you can avoid references to fstat and stat by compiling
        !            75: with NON_UNIX_STDIO defined; in that case, you may need
        !            76: to supply access(char *Name,0), which is supposed to
        !            77: return 0 if file Name exists, nonzero otherwise.
        !            78: 
        !            79:   char * mktemp(char *buf) is supposed to replace the
        !            80: 6 trailing X's in buf with a unique number and then
        !            81: return buf.  The idea is to get a unique name for
        !            82: a temporary file.
        !            83: 
        !            84: On non-UNIX systems, you may need to change a few other,
        !            85: e.g.: the form of name computed by mktemp() in endfile.c and
        !            86: open.c; the use of the open(), close(), and creat() system
        !            87: calls in endfile.c, err.c, open.c; and the modes in calls on
        !            88: fopen() and fdopen() (and perhaps the use of fdopen() itself
        !            89: -- it's supposed to return a FILE* corresponding to a given
        !            90: an integer file descriptor) in err.c and open.c (component ufmt
        !            91: of struct unit is 1 for formatted I/O -- text mode on some systems
        !            92: -- and 0 for unformatted I/O -- binary mode on some systems).
        !            93: Compiling with -DNON_UNIX_STDIO omits all references to creat()
        !            94: and almost all references to open() and close(), the exception
        !            95: being in the function f__isdev() (in open.c).
        !            96: 
        !            97: For Turbo C++, in particular, you need to adjust the mktemp
        !            98: invocations and should compile all of libI77 with -DMSDOS .
        !            99: You also need to #undef ungetc in lread.c and rsne.c .
        !           100: 
        !           101: If you want to be able to load against libI77 but not libF77,
        !           102: then you will need to add sig_die.o (from libF77) to libI77.
        !           103: 
        !           104: If you wish to use translated Fortran that has funny notions
        !           105: of record length for direct unformatted I/O (i.e., that assumes
        !           106: RECL= values in OPEN statements are not bytes but rather counts
        !           107: of some other units -- e.g., 4-character words for VMS), then you
        !           108: should insert an appropriate #define for url_Adjust at the
        !           109: beginning of open.c .  For VMS Fortran, for example,
        !           110: #define url_Adjust(x) x *= 4
        !           111: would suffice.
        !           112: 
        !           113: To check for transmission errors, issue the command
        !           114:        make check
        !           115: This assumes you have the xsum program whose source, xsum.c,
        !           116: is distributed as part of "all from f2c/src".  If you do not
        !           117: have xsum, you can obtain xsum.c by sending the following E-mail
        !           118: message to [email protected]
        !           119:        send xsum.c from f2c/src
        !           120: 
        !           121: The makefile assumes you have installed f2c.h in a standard
        !           122: place (and does not cause recompilation when f2c.h is changed);
        !           123: f2c.h comes with "all from f2c" (the source for f2c) and is
        !           124: available separately ("f2c.h from f2c").
        !           125: 
        !           126: By default, Fortran I/O units 5, 6, and 0 are pre-connected to
        !           127: stdin, stdout, and stderr, respectively.  You can change this
        !           128: behavior by changing f_init() in err.c to suit your needs.
        !           129: Note that f2c assumes READ(*... means READ(5... and WRITE(*...
        !           130: means WRITE(6... .  Moreover, an OPEN(n,... statement that does
        !           131: not specify a file name (and does not specify STATUS='SCRATCH')
        !           132: assumes FILE='fort.n' .  You can change this by editing open.c
        !           133: and endfile.c suitably.
        !           134: 
        !           135: Lines protected from compilation by #ifdef Allow_TYQUAD
        !           136: are for a possible extension to 64-bit integers in which
        !           137: integer = int = 32 bits and longint = long = 64 bits.
        !           138: 
        !           139: Extensions (Feb. 1993) to NAMELIST processing:
        !           140:  1. Reading a ? instead of &name (the start of a namelist) causes
        !           141: the namelist being sought to be written to stdout (unit 6);
        !           142: to omit this feature, compile rsne.c with -DNo_Namelist_Questions.
        !           143:  2. Reading the wrong namelist name now leads to an error message
        !           144: and an attempt to skip input until the right namelist name is found;
        !           145: to omit this feature, compile rsne.c with -DNo_Bad_Namelist_Skip.
        !           146:  3. Namelist writes now insert newlines before each variable; to omit
        !           147: this feature, compile xwsne.c with -DNo_Extra_Namelist_Newlines.
        !           148: 
        !           149: Nonstandard extension (Feb. 1993) to open: for sequential files,
        !           150: ACCESS='APPEND' (or access='anything else starting with "A" or "a"')
        !           151: causes the file to be positioned at end-of-file, so a write will
        !           152: append to the file.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.