home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fchek284.zip / README < prev    next >
Text File  |  1995-06-01  |  24KB  |  554 lines

  1.          README file for Ftnchek Version 2.8.1
  2.  
  3. Author: Robert Moniot
  4.     Fordham University
  5.     New York, NY  10023  USA
  6.     Telephone: (212) 636-6311
  7.     Bitnet:    MONIOT@FORDMULC
  8.     Internet:  moniot@mary.fordham.edu
  9.  
  10. Date:    February 1, 1995
  11.  
  12. Ftnchek is written in a portable style of C.  You must have a C
  13. compiler for the machine on which you wish to build it.
  14. Information about the latest version and the status of the project can be
  15. obtained by the Internet command ``finger ftnchek@mary.fordham.edu''.
  16.  
  17. If the file you received is a UNIX compressed tar file, suffix .Z, you
  18. should first unzip it using the UNIX ``uncompress'' command, and then
  19. give it as input to ``tar'' to unpack the files.  For example, assuming
  20. the file has been placed in the desired directory, and is named
  21. ftnchek.tar.Z, you would give the two UNIX commands
  22.     uncompress ftnchek.tar.Z
  23.     tar -xf ftnchek.tar
  24. If the suffix is .gz instead of .Z, use the program ``gunzip'' in
  25. place of ``uncompress''.  The gunzip program is publicly available
  26. from the GNU project.
  27.  
  28. After accomplishing this step, you should find that you have received
  29. the following set of source files:
  30.  
  31.        exprtype.c       intrins.h        project.c
  32.        forlex.c         iokeywds.h       symtab.c
  33.        fortran.c        keywords.h       symtab.h
  34.        ftnchek.c        pgsymtab.c       tokdefs.h
  35.        ftnchek.h        plsymtab.c       
  36.  
  37. These are all necessary for compiling Ftnchek on any system.
  38.  
  39. You should also have received a number of auxiliary files described
  40. later.  There is also a directory named ``test'' containing a suite of
  41. test programs for verifying the operation of ftnchek after you have
  42. compiled it.
  43.  
  44.  
  45.           INSTALLING FTNCHEK
  46.           ------------------
  47.  
  48. To install Ftnchek, follow the instructions below for your operating
  49. system.  The section ``CUSTOMIZING'' describes options that allow
  50. compiling with bigger table sizes or accepting/rejecting certain
  51. syntax extensions.
  52.  
  53.  
  54.  
  55. (1) UNIX and UNIX-like systems
  56.  
  57.    Give the command:
  58.  
  59.         $ make
  60.  
  61. Note: System-specific compilation options are provided for some
  62. systems.  Users installing Ftnchek on one of these systems should
  63. say
  64.  
  65.     $ make system
  66.  
  67. where system is one of the following words:
  68.  
  69. DEC-ALPHA       LINUX           SOLARIS2.x-apcc SUNOS5.x       
  70. DJGPP           LINUX-486       SOLARIS2.x-gcc  SUNOS5.x-apcc  
  71. GENERIC         MIPS-MIPS       STARDENT        SUNOS5.x-gcc   
  72. HP              SGI             SUNOS4.0        ULTRIX-MIPS    
  73. IBM-RS6000      SOLARIS2.x      SUNOS4.1        UNIX           
  74.  
  75.  
  76. To verify correct operation of the newly created ftnchek, you can
  77. now issue the command
  78.  
  79.     $ make check
  80.  
  81. This will run ftnchek on the suite of test programs in the
  82. subdirectory ``test'' and report on any discrepancies.  Please
  83. note: the last test in the suite tests dcl2inc, which uses the
  84. "new awk", namely AT&T nawk or GNU gawk.  By default, the check
  85. is done assuming you have nawk.  If you have gawk, you should use
  86. the command
  87.     $ make check AWK=gawk
  88. Some systems, such as AIX and Linux, have the new awk but call it
  89. awk.  For these systems, or use the command
  90.     $ make check AWK=awk
  91. Alternatively, you can modify the makefile appropriately.
  92.  
  93. Once ftnchek is working properly, issue the command (requiring
  94. super-user authority):
  95.  
  96.     $ make install
  97.  
  98. This will install the executable in /usr/local/bin and the manpage in
  99. /usr/local/man by default.  For SGI give the command
  100.  
  101.     $ make SGI-INSTALL
  102.  
  103.  
  104.  
  105. (2a) VAX/VMS
  106.  
  107.    Give the command
  108.  
  109.         $ @BUILD
  110.  
  111.    After the program has been compiled, you must turn it into a
  112.    so-called "DCL foreign command" so that it can be invoked by
  113.    giving its name on a command line, instead of using the RUN
  114.    command.  Do this with the command
  115.  
  116.         $ FTNCHEK :== $disk:[directory]FTNCHEK
  117.  
  118.    where you substitute the disk and directory names where the file
  119.    FTNCHEK.EXE resides.  This command must be executed once per
  120.    login.  It is suggested you put this command into your LOGIN.COM
  121.    file.
  122.  
  123.    The BUILD procedure also creates a VMS help library named
  124.    FTNCHEK.HLB.  To access it from the VMS HELP command, you must
  125.    give the command
  126.  
  127.         $ DEFINE HLP$LIBRARY disk:[directory]FTNCHEK.HLB"
  128.  
  129.    Again, this command must be executed once per login to have effect.
  130.  
  131.    Note that BUILD.COM uses the files CC.COM and LINK.COM which are
  132.    conditional compilation and link scripts that allow re-making
  133.    ftnchek by compiling only what has changed.
  134.  
  135. (2b) ALPHA/VMS
  136.  
  137.    Same as (2a) except use BUILD-ALPHA.COM instead.
  138.  
  139.  
  140. (3) MS-DOS with Borland C
  141.  
  142.    Rename the file "makefile.bc" to "makefile" and then give the
  143.    command:
  144.  
  145.         C> MAKE
  146.  
  147.    Note: Version 2.8 at this time requires the SMALL_MACHINE option in
  148.    Borland C.  There is a bug in Borland C malloc and the workaround
  149.    has not yet been re-implemented in this version of ftnchek.
  150.  
  151. (4) Macintosh Programmer's Workshop (MPW)
  152.  
  153.    Rename the file "makefile.mpw" to "makefile".  Edit the file,
  154.    changing character '+' to CHAR(182), option-d on the Macintosh
  155.    keyboard; and the character '/' to CHAR(196), option-f.  Then
  156.    use the "make" command to create Ftnchek.
  157.  
  158. (5) Other systems
  159.  
  160.    It should suffice simply to compile all the ".c" files (omitting
  161.    shell_mung.c) and link them, .  The only differences among the
  162.    versions for different operating systems have to do with the use of
  163.    "/" vs. "-" as an option prefix, the default filename extension
  164.    ".FOR" vs. ".f", and the selection of some system-specific language
  165.    extensions.  Selection among these options is done by defining a
  166.    macro name for each system.  The VAX/VMS compiler pre-defines the
  167.    macro name "VMS", while the Turbo C compiler pre-defines
  168.    "__TURBOC__".  The macro names "UNIX" and "MSDOS" are not
  169.    pre-defined and must be defined on the compiler command line or by
  170.    editing ftnchek.h if they are desired.
  171.  
  172.  
  173. It has been reported that ftnchek gives parse errors on file average.f
  174. on a Cray Y-MP running UNICOS 8.0 3.0 and SCC 4.0.1. This can be
  175. worked around by creating a new version of fortran.c from fortran.y
  176. using yacc (not bison) on another platform (e.g. IBM/RS6000; the Cray
  177. yacc gave up).  The command to do this is ``rm fortran.c; make
  178. fortran.c''.  Use this version of fortran.c to build ftnchek on the
  179. Cray.
  180.  
  181. Once Ftnchek is working, you can test it by giving the command:
  182.  
  183.         $ ftnchek -list -sym average
  184.  
  185. Then compare the output against the file ``average.out''.  A more
  186. thorough checkout is possible on Unix systems by giving the ``make
  187. check'' command described above.
  188.  
  189.  
  190.            NEW FEATURES
  191.            ------------
  192.  
  193. A new feature included in version 2.8.3 allows you to use ftnchek to
  194. create a graphical representation of the subprogram hierarchy of your
  195. programs.  This feature makes use of the freely available program VCG
  196. which displays graphs in an X-window environment.  To include this
  197. feature, compile ftnchek with the macro name VCG_SUPPORT defined.  In
  198. unix, you can do this by adding the phrase "OPTIONS=VCG_SUPPORT" to
  199. the make command line.  This option adds a new command line switch,
  200. -vcg, to the set of ftnchek options.  The code to generate the vcg
  201. graph description was provided by P.A.Rubini@cranfield.ac.uk.  The
  202. graph description is embedded in the ftnchek output.  To reduce it to
  203. a file suitable for input to VCG, run the ftnchek output through the
  204. filter fcl2vcg, provided with the distribution.  If you build ftnchek
  205. with this option, you should install this script in a directory on
  206. your path with the command ``make install-vcg''.
  207.  
  208.  
  209. Another new feature is a tool to convert ftnchek declarations files
  210. (produced with the -makedcl option) into a format suitable for use as
  211. include files, to allow the elimination of redundant code.  Provided
  212. by Nelson H. F. Beebe (beebe@math.utah.edu).  This tool is installed
  213. automatically by the ``make install'' command.
  214.  
  215.  
  216.            AUXILIARY FILES
  217.            ---------------
  218.  
  219. This section describes the auxiliary and documentation files included
  220. with the distribution.
  221.  
  222. The file average.f contains the example program used in the
  223. documentation, and average.out is the result of running Ftnchek on it.
  224. VAX/VMS users should rename "AVERAGE.F" to "AVERAGE.FOR".
  225.  
  226. The files with extension ``.com'' contain commands for building
  227. ftnchek on VAX and ALPHA systems.
  228.  
  229. The file fcl2vcg.sh is a shell script to be installed as fcl2vcg,
  230. which is usable on Unix systems to convert ftnchek's output with the
  231. -vcg option into a form suitable for input to the VCG program.
  232.  
  233. The file dcl2inc.sh is a shell script to be installed as dcl2inc,
  234. which converts declarations files into include files.
  235.  
  236. The file named makefile is the same as makefile.unix.  The other
  237. makefiles are specialized for Borland C (IBM PC), Macintosh
  238. Programmer's Workbench, and UNIX or UNIX-like systems.
  239.  
  240. The file fortran.y contains the grammar from which the parser
  241. fortran.c was created.  (The file fortran.c has been trimmed to
  242. shorten it.)  The file fortran.y itself is not needed to compile
  243. Ftnchek.
  244.  
  245. The file shell_mung.c is needed only for the VMS version of Ftnchek.
  246. It is from the GNU project.
  247.  
  248. The file pointer.patch provides a modification for minimal
  249. support of ``Cray pointer'' syntax.
  250.  
  251. Documentation: The file ftnchek.doc is a flat text file
  252. containing the ftnchek user's manual.  The file ftnchek.ps is a
  253. PostScript version of the same.  Ftnchek.hlp is for making a HELP
  254. library for VMS systems.  Ftnchek.man is the file from which
  255. these files and the Unix manual page are derived.  PATCHES
  256. contains a list of changes made since the original release of
  257. version 2.8.
  258.  
  259. The file ftnchek.def is a module definition file for IBM PC-OS/2.
  260.  
  261. The UNIX Makefile employs a private script, man2ps, for converting
  262. manual pages to PostScript (linked to names me2ps, mm2ps, and ms2ps,
  263. it will support the -me, -mm, and -ms formats as well).  The script
  264. currently knows about GNU groff, Sun Solaris 2.x troff + dpost and
  265. psroff; it will use any of these, with groff preferred.  For troff +
  266. dpost, if you get errors like this
  267.  
  268. troff: Can't open /usr/lib/font/devpost/C.out; line 818, file <standard input>
  269.  
  270. you can repair them if you have appropriate privileges:
  271.  
  272. % cd /usr/lib/font/devpost
  273. % ln CO C
  274. % ln CO.name C.name
  275. % ln CO.out C.out
  276.  
  277. These commands simply create links between a Courier font that Sun
  278. named CO, and the one named C that is expected by ftnchek.man.  If
  279. some troff expert knows a better way to handle this, please tell us.
  280. Additional alternatives in the man2ps script to support ditroff and
  281. other vendors' troff-to-PostScript solutions will also be welcome.
  282.  
  283.  
  284.  
  285.  
  286.              CUSTOMIZING
  287.              -----------
  288.  
  289. This section gives details about using macro names to control the
  290. system-dependent choices available in compiling Ftnchek.
  291.  
  292. Ftnchek has a number of fixed internal parameters that affect its
  293. operation, such as the symbol table sizes and support for various
  294. extensions and particular operating systems.  The following is a
  295. description of the most important of these parameters.  They are
  296. implemented as C language macro names.  If you wish to change a
  297. parameter defined by one of these macros, it is necessary to recompile
  298. Ftnchek with the macro definition changed to the desired value.
  299.  
  300. Briefly, the effect of the macro names specifying the system is as
  301. follows: If VMS or __TURBOC__ or MSDOS is defined, then both "/" and
  302. "-" are allowed as option prefixes.  Otherwise only "-" is allowed.
  303. If VMS or __TURBOC__ or MSDOS is defined, then ".FOR" will be the
  304. default extension for source files, otherwise ".f" is used.  If VMS is
  305. defined, then the VMS extensions controlled by VMS_INCLUDE,
  306. VMS_INTRINSICS, and VMS_IO will be supported.  If UNIX is defined,
  307. then the UNIX nonstandard intrinsic functions will be supported.  More
  308. detailed control over these options is possible by defining other
  309. macro names described below.
  310.  
  311. This can usually be done without editing any of the source files, by
  312. specifying the macro definition on the C compiler command line.  Under
  313. UNIX, this is done with the -D option.  For example, to define the
  314. macro BpW that sets the default word size to be eight bytes, the
  315. compiler would be invoked with the additional option -DBpW=8.  Under
  316. VMS, the corresponding option would be /DEFINE=("BpW=8").  For other
  317. systems, consult your C compiler manual.
  318.  
  319. Unless otherwise noted, the following macro names need not have any
  320. particular value.  They only need to be defined in order to have
  321. effect.  For more details on these parameters, look at ftnchek.h.
  322.  
  323.   Macro                 Meaning                           Remarks
  324. UNIX                  Compile Ftnchek for UNIX-like    Default for most
  325.                        operating system                 choices
  326. VMS                   Compile Ftnchek for VAX/VMS      Automatically defined
  327.                        operating system                 by VAX C compiler
  328. MSDOS                 Compile Ftnchek for MS-DOS       Automatic if compiler
  329.                        operating system                 is Turbo C
  330.  
  331. VMS_IO                Add support for VMS-Fortran      Implied by VMS unless
  332.                        I/O keywords                     NO_VMS_IO defined
  333. NO_VMS_IO             Do not support VMS-Fortran       For VMS but not VMS_IO
  334.                        I/O keywords
  335. VMS_INCLUDE           Add support for VMS-style        Implied by VMS unless
  336.                        INCLUDE statement features        NO_VMS_INCLUDE defined
  337.                        (default extension, /NOLIST)
  338. NO_VMS_INCLUDE        Do not support VMS-style         For VMS but not
  339.                        INCLUDE statement features       VMS_INCLUDE
  340. OPTION_PREFIX_SLASH   Allow options to start with      Implied by VMS and by
  341.                        either - or /.                   MSDOS
  342. DEF_SRC_EXTENSION     Default extension expected       Defaults:
  343.                        for input source files            VMS, MSDOS: ".for"
  344.                                                         All others: ".f"
  345. DEF_LIST_EXTENSION    Default extension for output     Default: ".lis"
  346.                        list-files
  347. DEF_PROJ_EXTENSION    Default extension for input      Default: ".prj"
  348.                        and output project files
  349. DEF_DCL_EXTENSION     Default extension for            Default: ".dcl"
  350.                        declaration files
  351. STDIN_PROJ_FILENAME   Output project-file name used    Default: "ftnchek.prj"
  352.                        when input source is stdin
  353.  
  354. DEC_TABS              Default value of -tab option    Default = 0 (NO)
  355.  
  356. STRICT_SYNTAX         Disallow inline (with !         Individual options
  357.               character). Always warn about   controlled by macros
  358.               underscores or dollar signs     listed below.
  359.               in variable names, INCLUDE or
  360.               DO .. ENDDO statements,      
  361.               variable field widths in     
  362.               FORMAT, and hex, octal and   
  363.               binary constants.            
  364.  
  365. INLINE_COMMENT_CHAR   Allow Inline comments starting   Must be defined
  366.                        with '!'                          as '!'
  367.  
  368. VCG_SUPPORT           Add the -vcg switch to allow     Default: no vcg
  369.                       call graph to be visualized.        support
  370.  
  371.  
  372. The following macros are used to control the default treatment of some
  373. special syntax extensions.  The default value of each macro is 1,
  374. which means that the corresponding extension will be warned about only
  375. if the -f77 flag is set.  If STRICT_SYNTAX is defined, then the
  376. default value of each macro will be 0, which means that the extension
  377. will be warned about regardless of the status of the -f77 flag.  In
  378. either case the extension will be correctly processed.  The default
  379. setting of each individual macro can be overridden by an explicit
  380. define.  The plan is eventually to turn these macro values into
  381. default values which could be changed at runtime by command-line
  382. flags, but at present there is no such option.
  383.  
  384. ALLOW_DO_ENDO         DO ... ENDDO statements
  385. ALLOW_DOLLARSIGNS     Dollar signs in variable
  386.                        names
  387. ALLOW_FORMAT_DOLLARSIGNS  $ control code in
  388.                        FORMAT statements
  389. ALLOW_INCLUDE         INCLUDE 'filename' statement
  390. ALLOW_QUOTEMARKS      Strings delimited by "quote
  391.                        marks"
  392. ALLOW_TYPELESS_CONSTANTS  Z'19AF' and similar hex,
  393.                        octal and binary constants
  394. ALLOW_UNDERSCORES     Underscores in variable
  395.                        names
  396. ALLOW_UNIX_BACKSLASH  Backslash escape in strings
  397. ALLOW_UNIX_CPP        UNIX preprocessor
  398.                        lines starting with #
  399. ALLOW_VARIABLE_FORMAT Accept <integer_expr> in format
  400.                        for repeat or field width
  401.  
  402. The nonstandard double complex intrinsic functions are always
  403. supported since they are needed by the double complex datatype.  Other
  404. groups of nonstandard functions can be selected by the following group
  405. of macros.
  406.  
  407. STANDARD_INTRINSICS   Do not support extended set
  408.                        of intrinsic functions
  409. NONSTD_INTRINSICS     Support commonly available       Default behavior
  410.                        intrinsic functions
  411. UNIX_INTRINSICS       Support UNIX-specific            Default if UNIX defined
  412.                        intrinsic functions
  413. NO_UNIX_INTRINSICS    Do not support UNIX-specific
  414.                        intrinsic functions
  415. VMS_INTRINSICS        Support VMS-specific             Default if VMS defined
  416.                        intrinsic functions
  417. NO_VMS_INTRINSICS     Do not support VMS-specific
  418.                        intrinsic functions
  419.  
  420. NO_BLANKS_IN_NUMBERS  Numeric constants cannot have   Default: blanks allowed
  421.                        embedded blanks.
  422. BLANKS_IN_NUMBERS     Numeric constants may have
  423.                        embedded blanks.
  424.  
  425. RAND_NO_ARG           RAND/IRAND function has no       Default behavior:
  426.                        argument                         allows both 0 argument
  427. RAND_ONE_ARG          RAND/IRAND function has one       and 1 argument forms
  428.                        argument
  429.  
  430. ENV_PREFIX            Prefix for environment           Default "FTNCHEK_"
  431.                        variables that set options
  432.  
  433. MAXLINE               Maximum input line length.       Default 132
  434.                         Ignores past this.
  435. MAXIDSIZE             Longest identifier allowed       Default 31
  436. MAX_SRC_TEXT          Longest text string of a token   Default 20*66
  437. MAX_CHAR_CODE         Largest char value               Default 255
  438. MAX_INCLUDE_DEPTH     Max nesting depth of include     Default 16
  439.                        files
  440. MAXEXPRTEXT           Length of expr text saved in     Default 15
  441.                        arg lists
  442. ENV_INCLUDE_VAR       Name of environment variable     Default "INCLUDE"
  443.                        specifying include directory
  444.  
  445. DEFAULT_INCLUDE_DIR   Name of default include          Defaults:
  446.                        directory                        UNIX: "/usr/include"
  447.                                                         VMS: "SYS$LIBRARY:"
  448.                                                         MSDOS: "\\include"
  449.  
  450.  
  451. The following macros specify various internal table sizes.  If neither
  452. SMALL_MACHINE nor LARGE_MACHINE is defined, intermediate table sizes
  453. will be used.  In any case, individual table sizes can be chosen by
  454. defining the corresponding macro name.  The defaults for the three
  455. size choices (small, default, large) are listed in the Remarks column.
  456.  
  457. SMALL_MACHINE         Table sizes appropriate for a
  458.                        PC without much memory
  459. LARGE_MACHINE         Table sizes appropriate for a
  460.                        mainframe or workstation
  461.  
  462.                                                       small  default large
  463. HASHSZ                Identifier hash table (elements)  798   2002  20930
  464. LOCSYMTABSZ           Local symbol table (entries)      300    800   8000
  465. GLOBSYMTABSZ          Global symbol table (entries)     400   1200  12000
  466.    The following sizes are *chunk sizes*, specifying the initial table
  467.    size and the size of new blocks to allocate when initial amounts
  468.    are used up.  Optimum sizes are dependent on properties of alloc
  469.    function, and do not set limits on total amounts of space.
  470. STRSPACESZ            Identifier string space (bytes)  4000  10000  10000
  471. PARAMINFOSPACESZ      Parameter info field space     20     50    200
  472.             (ParamInfo's)
  473. TOKHEADSPACESZ        Token list header element space    50    200    500
  474.                        (TokenListHeader's)
  475. TOKENSPACESZ          Token list space (tokens). Used   200   1000  10000
  476.                        to store subroutine arguments
  477.                        and other temporary lists.
  478. ARGLISTHEADSZ         Argument list header element      300   1500  15000
  479.                        space (ArgListHeader's)
  480. ARGLISTELTSZ          Argument list element space      1000   5000  50000
  481.                        (ArgListElement's)
  482. COMLISTHEADSZ         Common block list header space    200   1000 10000
  483.                        (ComListHeader's)
  484. COMLISTELTSZ          Common block list element space  1000   4000 50000
  485.                        (ComListElement's)
  486. PTRSPACESZ            Pointers to array dim text and    200    400  2000
  487.                        parameter text (char *'s)
  488. BpW                   Default bytes per word.          Default=4
  489.  
  490. WRAP_COLUMN           Default value for -wrap          Default=79
  491.                       setting.
  492.  
  493.  
  494. For the truly adventurous:
  495.  
  496. Ftnchek has three different memory-management schemes to choose from.
  497. In the default case, space for the hashtable and the local and global
  498. symbol tables is allocated at compile time.  These tables cannot
  499. change size afterwards.  Initial space for strings, tokens (in lists
  500. and trees), token list headers, token source text, pointers to array
  501. dim and parameter text is allocated at compile time.  These areas can
  502. grow as needed by allocating additional chunks that are chained
  503. together in a linked-list arrangement.  Space for argument list
  504. headers and elements, and common list headers and elements starts at
  505. zero and new chunks are allocated as needed.  (None of the newly
  506. allocated chunks are freed, since it is considered likely that the
  507. space will be
  508. needed again.)
  509. This scheme is well
  510. suited to machines with large address spaces and virtual memory.  The
  511. sizes of the fixed tables and chunk sizes for the others can be chosen
  512. in three standard sets: default, SMALL_MACHINE, and LARGE_MACHINE.
  513. The latter is preferred for any virtual-memory machine since memory
  514. does not become "really" allocated until needed.
  515.  
  516. The second memory-management scheme is selected by the compile-time
  517. option DYNAMIC_TABLES.  In this case, the fixed-size arrays for the
  518. hashtable and the local and global symbol tables are replaced by
  519. pointers, and the space they point to is allocated at the start of
  520. program execution.  Everything else is the same.  This version runs
  521. somewhat slower than the first scheme on machines I have tested.  I
  522. have not proceeded to take advantage of the possibility of letting the
  523. table sizes be selected at run time by means of command-line settings.
  524. To do so would require moving the allocation step performed by
  525. init_tables() to just before the start of processing, analogously to
  526. init_typesizes().  It would also need a set of command-line options to
  527. be installed for specifying the different table sizes.
  528.  
  529.  
  530.   --- Note: the third scheme is no longer supported
  531.  
  532. The third scheme was invented to work around a problem with
  533. malloc/calloc in Borland C on the IBM PC.  It is selected by the
  534. compile-time option T_ALLOC.  (It is automatically selected for Turbo
  535. C.)  Under the huge memory model, calloc is supposed to make use of
  536. all memory from the top of the program stack to the end of RAM.  In
  537. early versions of Borland C it fails after allocating about 55K worth.
  538.  
  539. In this scheme the needed space is supplied from fixed-size tables,
  540. one for each of the main users of dynamically allocated memory.  Each
  541. table is in a separately compiled module containing only the routine
  542. that allocates space for one or another type of data object, so that
  543. each can occupy up to 64K bytes.
  544.  
  545. When the -makedcls option was added to ftnchek in version 2.8, it
  546. greatly increased the demand for dynamically allocated memory.  As a
  547. result, the overall 640K limit on program space makes it difficult for
  548. ftnchek to process anything but very small programs.  Instead you
  549. should use dgjpp or a compiler with similar capability to produce a
  550. version that runs in 32-bit virtual mode, so that the entire amount of
  551. installed memory can be utilized.
  552.  
  553. You should not define DYNAMIC_TABLES at the same time as T_ALLOC.
  554.