home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / f2csrc.zip / f2csrc / libF77 / README < prev    next >
Text File  |  1994-07-28  |  4KB  |  88 lines

  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 , cabs.c , main.c , and sig_die.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 onexit() and you are not using an ANSI C
  19. compiler, then you should compile main.c, s_paus.c, s_stop.c, and
  20. sig_die.c with NO_ONEXIT defined.  See the comments about onexit in
  21. the makefile.
  22.  
  23. If your system has a double drem() function such that drem(a,b)
  24. is the IEEE remainder function (with double a, b), then you may
  25. wish to compile r_mod.c and d_mod.c with IEEE_drem defined.
  26. On some systems, you may also need to compile with -Ddrem=remainder .
  27.  
  28. To check for transmission errors, issue the command
  29.     make check
  30. This assumes you have the xsum program whose source, xsum.c,
  31. is distributed as part of "all from f2c/src".  If you do not
  32. have xsum, you can obtain xsum.c by sending the following E-mail
  33. message to netlib@research.att.com
  34.     send xsum.c from f2c/src
  35.  
  36. The makefile assumes you have installed f2c.h in a standard
  37. place (and does not cause recompilation when f2c.h is changed);
  38. f2c.h comes with "all from f2c" (the source for f2c) and is
  39. available separately ("f2c.h from f2c").
  40.  
  41. Most of the routines in libF77 are support routines for Fortran
  42. intrinsic functions or for operations that f2c chooses not
  43. to do "in line".  There are a few exceptions, summarized below --
  44. functions and subroutines that appear to your program as ordinary
  45. external Fortran routines.
  46.  
  47. 1.    CALL ABORT prints a message and causes a core dump.
  48.  
  49. 2.    ERF(r) and DERF(d) and the REAL and DOUBLE PRECISION
  50.     error functions (with x REAL and d DOUBLE PRECISION);
  51.     DERF must be declared DOUBLE PRECISION in your program.
  52.     Both ERF and DERF assume your C library provides the
  53.     underlying erf() function (which not all systems do).
  54.  
  55. 3.    ERFC(r) and DERFC(d) are the complementary error functions:
  56.     ERFC(r) = 1 - ERF(r) and DERFC(d) = 1.d0 - DERFC(d)
  57.     (except that their results may be more accurate than
  58.     explicitly evaluating the above formulae would give).
  59.     Again, ERFC and r are REAL, and DERFC and d are DOUBLE
  60.     PRECISION (and must be declared as such in your program),
  61.     and ERFC and DERFC rely on your system's erfc().
  62.  
  63. 4.    CALL GETARG(n,s), where n is an INTEGER and s is a CHARACTER
  64.     variable, sets s to the n-th command-line argument (or to
  65.     all blanks if there are fewer than n command-line arguments);
  66.     CALL GETARG(0,s) sets s to the name of the program (on systems
  67.     that support this feature).  See IARGC below.
  68.  
  69. 5.    CALL GETENV(name, value), where name and value are of type
  70.     CHARACTER, sets value to the environment value, $name, of
  71.     name (or to blanks if $name has not been set).
  72.  
  73. 6.    NARGS = IARGC() sets NARGS to the number of command-line
  74.     arguments (an INTEGER value).
  75.  
  76. 7.    CALL SIGNAL(n,func), where n is an INTEGER and func is an
  77.     EXTERNAL procedure, arranges for func to be invoked when
  78.     signal n occurs (on systems where this makes sense).
  79.  
  80. 8.    CALL SYSTEM(cmd), where cmd is of type CHARACTER, passes
  81.     cmd to the system's command processor (on systems where
  82.     this can be done).
  83.  
  84. The makefile does not attempt to compile pow_qq.c, which is meant
  85. for use with INTEGER*8.  To use it, you must modify f2c.h to
  86. declare longint appropriately; then add pow_qq.o to the POW =
  87. line in the makefile.
  88.