home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / MAWK113.ZIP / mawk113 / sizes.h < prev    next >
C/C++ Source or Header  |  1992-12-16  |  2KB  |  87 lines

  1.  
  2. /********************************************
  3. sizes.h
  4. copyright 1991, 1992.  Michael D. Brennan
  5.  
  6. This is a source file for mawk, an implementation of
  7. the AWK programming language.
  8.  
  9. Mawk is distributed without warranty under the terms of
  10. the GNU General Public License, version 2, 1991.
  11. ********************************************/
  12.  
  13. /* $Log: sizes.h,v $
  14.  * Revision 5.3  1992/12/17  02:48:01  mike
  15.  * 1.1.2d changes for DOS
  16.  *
  17.  * Revision 5.2  1992/08/27  03:20:08  mike
  18.  * patch2: increase A_HASH_PRIME
  19.  *
  20.  * Revision 5.1  1991/12/05  07:59:35  brennan
  21.  * 1.1 pre-release
  22.  *
  23. */
  24.  
  25. /*  sizes.h  */
  26.  
  27. #ifndef  SIZES_H
  28. #define  SIZES_H
  29.  
  30. #if     ! HAVE_SMALL_MEMORY
  31. #define EVAL_STACK_SIZE  256  /* initial size , can grow */
  32. /* number of fields at startup, must be a power of 2 
  33.    and FBANK_SZ-1 must be divisible by 3! */
  34. #define  FBANK_SZ    256
  35. #define  FB_SHIFT      8   /* lg(FBANK_SZ) */
  36. #define  NUM_FBANK    128   /* see MAX_FIELD below */
  37.  
  38. #else  /* have to be frugal with memory */
  39.  
  40. #define EVAL_STACK_SIZE   64
  41. #define  FBANK_SZ    64
  42. #define  FB_SHIFT     6   /* lg(FBANK_SZ) */
  43. #define  NUM_FBANK    16   /* see MAX_FIELD below */
  44.  
  45. #endif  
  46.  
  47. #define  MAX_SPLIT    (FBANK_SZ-1)   /* needs to be divisble by 3*/
  48. #define  MAX_FIELD    (NUM_FBANK*FBANK_SZ - 1)
  49.  
  50. #define  MIN_SPRINTF    400
  51.  
  52.  
  53. #define  BUFFSZ         4096
  54.   /* starting buffer size for input files, grows if 
  55.      necessary */
  56.  
  57. #if      LM_DOS
  58. /* trade some space for IO speed */
  59. #undef  BUFFSZ
  60. #define BUFFSZ        8192
  61. /* maximum input buffers that will fit in 64K */
  62. #define  MAX_BUFFS    ((int)(0x10000L/BUFFSZ) - 1)
  63. #endif
  64.  
  65. #define  HASH_PRIME  53
  66.  
  67. #if ! HAVE_SMALL_MEMORY
  68. #define  A_HASH_PRIME 199
  69. #else
  70. #define  A_HASH_PRIME  37
  71. #endif
  72.  
  73.  
  74. #define  MAX_COMPILE_ERRORS  5 /* quit if more than 4 errors */
  75.  
  76.  
  77.  
  78. /* AWF showed the need for this */
  79. #define  MAIN_PAGE_SZ    4096 /* max instr in main block */
  80. #if 0
  81. #define  PAGE_SZ    1024  /* max instructions for other blocks */
  82. #endif 
  83. /* these used to be different */
  84. #define  PAGE_SZ    4096
  85.  
  86. #endif   /* SIZES_H */
  87.