Remove obsoleted COM_BIDIR, FIFO_TRIGGER_* and "comcontrol bidir"
[unix-history] / lib / libF77 / README
CommitLineData
547779a8
WH
1If your compiler does not recognize ANSI C headers,
2compile with KR_headers defined: either add -DKR_headers
3to the definition of CFLAGS in the makefile, or insert
4
5#define KR_headers
6
7at the top of f2c.h , cabs.c , main.c , and sig_die.c .
8
9
10If you have a really ancient K&R C compiler that does not understand
11void, add -Dvoid=int to the definition of CFLAGS in the makefile.
12
13If you use a C++ compiler, first create a local f2c.h by appending
14f2ch.add to the usual f2c.h, e.g., by issuing the command
15 make f2c.h
16which assumes f2c.h is installed in /usr/include .
17
18If your system lacks onexit() and you are not using an ANSI C
19compiler, then you should compile main.c with NO_ONEXIT defined.
20See the comments about onexit in the makefile.
21
22If your system has a double drem() function such that drem(a,b)
23is the IEEE remainder function (with double a, b), then you may
24wish to compile r_mod.c and d_mod.c with IEEE_drem defined.
25On some systems, you may also need to compile with -Ddrem=remainder .
26
27To check for transmission errors, issue the command
28 make check
29This assumes you have the xsum program whose source, xsum.c,
30is distributed as part of "all from f2c/src". If you do not
31have xsum, you can obtain xsum.c by sending the following E-mail
32message to netlib@research.att.com
33 send xsum.c from f2c/src
34
35The makefile assumes you have installed f2c.h in a standard
36place (and does not cause recompilation when f2c.h is changed);
37f2c.h comes with "all from f2c" (the source for f2c) and is
38available separately ("f2c.h from f2c").
39
40Most of the routines in libF77 are support routines for Fortran
41intrinsic functions or for operations that f2c chooses not
42to do "in line". There are a few exceptions, summarized below --
43functions and subroutines that appear to your program as ordinary
44external Fortran routines.
45
461. CALL ABORT prints a message and causes a core dump.
47
482. ERF(r) and DERF(d) and the REAL and DOUBLE PRECISION
49 error functions (with x REAL and d DOUBLE PRECISION);
50 DERF must be declared DOUBLE PRECISION in your program.
51 Both ERF and DERF assume your C library provides the
52 underlying erf() function (which not all systems do).
53
543. ERFC(r) and DERFC(d) are the complementary error functions:
55 ERFC(r) = 1 - ERF(r) and DERFC(d) = 1.d0 - DERFC(d)
56 (except that their results may be more accurate than
57 explicitly evaluating the above formulae would give).
58 Again, ERFC and r are REAL, and DERFC and d are DOUBLE
59 PRECISION (and must be declared as such in your program),
60 and ERFC and DERFC rely on your system's erfc().
61
624. CALL GETARG(n,s), where n is an INTEGER and s is a CHARACTER
63 variable, sets s to the n-th command-line argument (or to
64 all blanks if there are fewer than n command-line arguments);
65 CALL GETARG(0,s) sets s to the name of the program (on systems
66 that support this feature). See IARGC below.
67
685. CALL GETENV(name, value), where name and value are of type
69 CHARACTER, sets value to the environment value, $name, of
70 name (or to blanks if $name has not been set).
71
726. NARGS = IARGC() sets NARGS to the number of command-line
73 arguments (an INTEGER value).
74
757. CALL SIGNAL(n,func), where n is an INTEGER and func is an
76 EXTERNAL procedure, arranges for func to be invoked when
77 signal n occurs (on systems where this makes sense).
78
798. CALL SYSTEM(cmd), where cmd is of type CHARACTER, passes
80 cmd to the system's command processor (on systems where
81 this can be done).
82
83The makefile does not attempt to compile pow_qq.c, which is meant
84for use with INTEGER*8. To use it, you must modify f2c.h to
85declare longint appropriately; then add pow_qq.o to the POW =
86line in the makefile.