📄 readme
字号:
Type "make" to check the validity of the f2c source and compile f2c.On a PC, you may need to compile xsum.c with -DMSDOS (i.e., withMSDOS #defined).If your compiler does not understand ANSI/ISO C syntax (i.e., ifyou have a K&R C compiler), compile with -DKR_headers .On non-Unix systems where files have separate binary and text modes,you may need to "make xsumr.out" rather than "make xsum.out".If (in accordance with what follows) you need to modify the makefileor any of the source files, first issue a "make xsum.out" (or, ifappropriate, "make xsumr.out") to check the validity of the f2c source,then make your changes, then type "make f2c".The file usignal.h is for the benefit of strictly ANSI include fileson a UNIX system -- the ANSI signal.h does not define SIGHUP or SIGQUIT.You may need to modify usignal.h if you are not running f2c on a UNIXsystem.Should you get the message "xsum0.out xsum1.out differ", see what linesare different (`diff xsum0.out xsum1.out`) and ask netlib(e.g., netlib@research.att.com) to send you the files in question,plus the current xsum0.out (which may have changed) "from f2c/src".For example, if exec.c and expr.c have incorrect check sums, you wouldsend netlib the message send exec.c expr.c xsum0.out from f2c/srcYou can also ftp these files from netlib.att.com; for more details, asknetlib@research.att.com to "send readme from f2c".On some systems, the malloc and free in malloc.c let f2c run fasterthan do the standard malloc and free. Other systems may not tolerateredefinition of malloc and free (though changes of 8 Nov. 1994 mayrender this less of a problem than hitherto). If yours is such asystem, you may either modify the makefile appropriately (remove"malloc.o" from the "OBJECTS =" assignment), or simply execute cc -c -DCRAY malloc.cbefore typing "make". Still other systems have a -lmalloc thatprovides performance competitive with that from malloc.c; you maywish to compare the two on your system.On some BSD systems, you may need to create a file named "string.h"whose single line is#include <strings.h>you may need to add " -Dstrchr=index" to the "CFLAGS =" assignmentin the makefile, and you may need to add " memset.o" to the "OBJECTS ="assignment in the makefile -- see the comments in memset.c .For non-UNIX systems, you may need to change some things in sysdep.c,such as the choice of intermediate file names.On some systems, you may need to modify parts of sysdep.h (which isincluded by defs.h). In particular, for Sun 4.1 systems and perhapssome others, you need to comment out the typedef of size_t. For somesystems (e.g., IRIX 4.0.1 and AIX) it is better to add#define ANSI_Librariesto the beginning of sysdep.h (or to supply -DANSI_Libraries in themakefile).Alas, some systems #define __STDC__ but do not provide a true standard(ANSI or ISO) C environment, e.g. do not provide stdlib.h . If yoursis such a system, then (a) you should complain loudly to your vendorabout __STDC__ being erroneously defined, and (b) you should insert#undef __STDC__at the beginning of sysdep.h . You may need to make other adjustments.For some non-ANSI versions of stdio, you must change the values givento binread and binwrite in sysdep.c from "rb" and "wb" to "r" and "w".You may need to make this change if you run f2c and get an errormessage of the form Compiler error ... cannot open intermediate file ...On many systems, it is best to combine libF77 and libI77 into a singlelibrary, say libf2c, as suggested in "readme from f2c". If you do notdo this, then you should adjust the definition of link_msg in sysdep.cappropriately (e.g., replacing "-lf2c" by "-lF77 -lI77"). On Unixsystems, the easiest way to create libf2c.a is to make libF77/libF77.aand libI77/libI77.a (after reading and heeding libF77/README andlibI77/README), and then to say cp libF77/libF77.a libf2c.a ar ruv libf2c.a libI77/*.o ranlib libf2c.aThe last step, ranlib, may not be necessary on your system. Onother systems, just compile all the .c files in libF77 and libI77,and put the resulting objects (except one or both of the Versionobjects) into a library, called perhaps f2c.lib .Some older C compilers object to typedef void (*foo)();or to typedef void zap; zap (*foo)();If yours is such a compiler, change the definition of VOID inf2c.h from void to int.For convenience with systems that use control-Z to denote end-of-file,f2c treats control-Z characters (ASCII 26, '\x1a') that appear at thebeginning of a line as an end-of-file indicator. You can disable thistest by compiling lex.c with NO_EOF_CHAR_CHECK #defined, or canchange control-Z to some other character by #defining EOF_CHAR tobe the desired value.If your machine has IEEE, VAX, or IBM-mainframe arithmetic, but yourprintf is inaccurate (e.g., with Symantec C++ version 6.0,printf("%.17g",12.) prints 12.000000000000001), you can make f2c printcorrectly rounded numbers by compiling with -DUSE_DTOA and addingdtoa.o g_fmt.o to the makefile's OBJECTS = line, so it becomes OBJECTS = $(OBJECTSd) malloc.o dtoa.o g_fmt.oAlso add the rule dtoa.o: dtoa.c $(CC) -c $(CFLAGS) -DMALLOC=ckalloc -DIEEE... dtoa.c(without the initial tab) to the makefile, where IEEE... is one ofIEEE_MC68k, IEEE_8087, VAX, or IBM, depending on your machine'sarithmetic. See the comments near the start of dtoa.c.The relevant source files, dtoa.c and g_fmt.c, are availableseparately from netlib's fp directory. For example, you couldsend the E-mail message send dtoa.c g_fmt.c from fpto netlib@research.att.com (or use anonymous ftp from netlib.att.comand look in directory /netlib/fp).The makefile has a rule for creating tokdefs.h. If you cannot use themakefile, an alternative is to extract tokdefs.h from the beginning ofgram.c: it's the first 100 lines.Please send bug reports to dmg@research.att.com . The old index file(now called "readme" due to unfortunate changes in netlib conventions:"send readme from f2c") will report recent changes in the recent-changelog at its end; all changes will be shown in the "changes" file("send changes from f2c"). To keep current source, you will need torequest xsum0.out and version.c, in addition to the changed sourcefiles. Changes first appear on netlib@research.att.com, and in duetime propagate to the other netlib sites that are kept current.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -