home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / sharew / f_2_c / libi77 / readme. < prev    next >
Encoding:
Text File  |  1991-06-10  |  3.7 KB  |  89 lines

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