home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 11 / AUCD11B.iso / LANGUAGES / WraithSet / AwkStuff / MawkSrc / h / sizes < prev    next >
Encoding:
Text File  |  1995-10-14  |  2.5 KB  |  105 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 1.8  1995/10/14  22:09:51  mike
  15.  * getting MAX__INT from values.h didn't really work since the value was
  16.  * unusable in an #if MAX__INT <= 0x7fff
  17.  * at least it didn't work under sunos -- so use of values.h is a goner
  18.  *
  19.  * Revision 1.7  1995/06/18  19:17:51  mike
  20.  * Create a type Int which on most machines is an int, but on machines
  21.  * with 16bit ints, i.e., the PC is a long.  This fixes implicit assumption
  22.  * that int==long.
  23.  *
  24.  * Revision 1.6  1994/10/10  01:39:01  mike
  25.  * get MAX__INT from limits.h or values.h
  26.  *
  27.  * Revision 1.5  1994/10/08  19:15:53  mike
  28.  * remove SM_DOS
  29.  *
  30.  * Revision 1.4  1994/09/25  23:00:49  mike
  31.  * remove #if 0
  32.  *
  33.  * Revision 1.3  1993/07/15  23:56:15  mike
  34.  * general cleanup
  35.  *
  36.  * Revision 1.2  1993/07/04  12:52:13  mike
  37.  * start on autoconfig changes
  38.  *
  39.  * Revision 5.3  1992/12/17  02:48:01  mike
  40.  * 1.1.2d changes for DOS
  41.  *
  42.  * Revision 5.2  1992/08/27  03:20:08  mike
  43.  * patch2: increase A_HASH_PRIME
  44.  *
  45.  * Revision 5.1  1991/12/05  07:59:35  brennan
  46.  * 1.1 pre-release
  47.  *
  48. */
  49.  
  50. /*  sizes.h  */
  51.  
  52. #ifndef  SIZES_H
  53. #define  SIZES_H
  54.  
  55. #ifndef  MAX__INT
  56. #include <limits.h>
  57. #define  MAX__INT  INT_MAX
  58. #define  MAX__LONG LONG_MAX
  59. #endif   /* MAX__INT */
  60.  
  61. #if  MAX__INT <= 0x7fff
  62. #define  SHORT_INTS
  63. #define  INT_FMT "%ld"
  64. typedef  long Int ;
  65. #define  Max_Int MAX__LONG
  66. #else
  67. #define  INT_FMT "%d"
  68. typedef  int Int ;
  69. #define  Max_Int  MAX__INT
  70. #endif
  71.  
  72. #define EVAL_STACK_SIZE  256  /* initial size , can grow */
  73. /* number of fields at startup, must be a power of 2 
  74.    and FBANK_SZ-1 must be divisible by 3! */
  75. #define  FBANK_SZ    256
  76. #define  FB_SHIFT      8   /* lg(FBANK_SZ) */
  77. #define  NUM_FBANK    128   /* see MAX_FIELD below */
  78.  
  79.  
  80. #define  MAX_SPLIT    (FBANK_SZ-1)   /* needs to be divisble by 3*/
  81. #define  MAX_FIELD    (NUM_FBANK*FBANK_SZ - 1)
  82.  
  83. #define  MIN_SPRINTF    400
  84.  
  85.  
  86. #define  BUFFSZ         4096
  87.   /* starting buffer size for input files, grows if 
  88.      necessary */
  89.  
  90. #ifdef  MSDOS
  91. /* trade some space for IO speed */
  92. #undef  BUFFSZ
  93. #define BUFFSZ        8192
  94. /* maximum input buffers that will fit in 64K */
  95. #define  MAX_BUFFS    ((int)(0x10000L/BUFFSZ) - 1)
  96. #endif
  97.  
  98. #define  HASH_PRIME  53
  99. #define  A_HASH_PRIME 199
  100.  
  101.  
  102. #define  MAX_COMPILE_ERRORS  5 /* quit if more than 4 errors */
  103.  
  104. #endif   /* SIZES_H */
  105.