1 /****************************************************************
2 Copyright 1990, 1991, 1994 by AT&T, Lucent Technologies and Bellcore.
3 
4 Permission to use, copy, modify, and distribute this software
5 and its documentation for any purpose and without fee is hereby
6 granted, provided that the above copyright notice appear in all
7 copies and that both that the copyright notice and this
8 permission notice and warranty disclaimer appear in supporting
9 documentation, and that the names of AT&T, Bell Laboratories,
10 Lucent or Bellcore or any of their entities not be used in
11 advertising or publicity pertaining to distribution of the
12 software without specific, written prior permission.
13 
14 AT&T, Lucent and Bellcore disclaim all warranties with regard to
15 this software, including all implied warranties of
16 merchantability and fitness.  In no event shall AT&T, Lucent or
17 Bellcore be liable for any special, indirect or consequential
18 damages or any damages whatsoever resulting from loss of use,
19 data or profits, whether in an action of contract, negligence or
20 other tortious action, arising out of or in connection with the
21 use or performance of this software.
22 ****************************************************************/
23 
24 /* This file is included at the start of defs.h; this file
25  * is an initial attempt to gather in one place some declarations
26  * that may need to be tweaked on some systems.
27  */
28 
29 #ifdef __STDC__
30 #undef KR_headers
31 #endif
32 
33 #ifndef KR_headers
34 #ifndef ANSI_Libraries
35 #define ANSI_Libraries
36 #endif
37 #ifndef ANSI_Prototypes
38 #define ANSI_Prototypes
39 #endif
40 #endif
41 
42 #ifdef __BORLANDC__
43 #define MSDOS
44 #endif
45 
46 #ifdef __ZTC__	/* Zortech */
47 #define MSDOS
48 #endif
49 
50 #ifdef MSDOS
51 #define ANSI_Libraries
52 #define ANSI_Prototypes
53 #define LONG_CAST (long)
54 #else
55 #define LONG_CAST
56 #endif
57 
58 #include <stdio.h>
59 
60 #ifdef ANSI_Libraries
61 #include <stddef.h>
62 #include <stdlib.h>
63 #else
64 char *calloc(), *malloc(), *realloc();
65 void *memcpy(), *memset();
66 #ifndef _SIZE_T
67 typedef unsigned int size_t;
68 #endif
69 #ifndef atol
70     long atol();
71 #endif
72 
73 #ifdef ANSI_Prototypes
74 extern double atof(const char *);
75 extern double strtod(const char*, char**);
76 #else
77 extern double atof(), strtod();
78 #endif
79 #endif
80 
81 /* On systems like VMS where fopen might otherwise create
82  * multiple versions of intermediate files, you may wish to
83  * #define scrub(x) unlink(x)
84  */
85 #ifndef scrub
86 #define scrub(x) /* do nothing */
87 #endif
88 
89 /* On systems that severely limit the total size of statically
90  * allocated arrays, you may need to change the following to
91  *	extern char **chr_fmt, *escapes, **str_fmt;
92  * and to modify sysdep.c appropriately
93  */
94 extern char *chr_fmt[], escapes[], *str_fmt[];
95 
96 #include <string.h>
97 
98 #include "ctype.h"
99 
100 #define Bits_per_Byte 8
101 #define Table_size (1 << Bits_per_Byte)
102