awk.h (107806) | awk.h (146299) |
---|---|
1/**************************************************************** 2Copyright (C) Lucent Technologies 1997 3All Rights Reserved 4 5Permission to use, copy, modify, and distribute this software and 6its documentation for any purpose and without fee is hereby 7granted, provided that the above copyright notice appear in all 8copies and that both that the copyright notice and this --- 8 unchanged lines hidden (view full) --- 17IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 18SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 20IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 21ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 22THIS SOFTWARE. 23****************************************************************/ 24 | 1/**************************************************************** 2Copyright (C) Lucent Technologies 1997 3All Rights Reserved 4 5Permission to use, copy, modify, and distribute this software and 6its documentation for any purpose and without fee is hereby 7granted, provided that the above copyright notice appear in all 8copies and that both that the copyright notice and this --- 8 unchanged lines hidden (view full) --- 17IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 18SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 20IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 21ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 22THIS SOFTWARE. 23****************************************************************/ 24 |
25#include <assert.h> 26 |
|
25typedef double Awkfloat; 26 27/* unsigned char is more trouble than it's worth */ 28 29typedef unsigned char uschar; 30 31#define xfree(a) { if ((a) != NULL) { free((char *) a); a = NULL; } } 32 33#define NN(p) ((p) ? (p) : "(null)") /* guaranteed non-null for dprintf 34*/ 35#define DEBUG 36#ifdef DEBUG 37 /* uses have to be doubly parenthesized */ 38# define dprintf(x) if (dbg) printf x 39#else 40# define dprintf(x) 41#endif 42 | 27typedef double Awkfloat; 28 29/* unsigned char is more trouble than it's worth */ 30 31typedef unsigned char uschar; 32 33#define xfree(a) { if ((a) != NULL) { free((char *) a); a = NULL; } } 34 35#define NN(p) ((p) ? (p) : "(null)") /* guaranteed non-null for dprintf 36*/ 37#define DEBUG 38#ifdef DEBUG 39 /* uses have to be doubly parenthesized */ 40# define dprintf(x) if (dbg) printf x 41#else 42# define dprintf(x) 43#endif 44 |
43extern char errbuf[]; 44 | |
45extern int compile_time; /* 1 if compiling, 0 if running */ 46extern int safe; /* 0 => unsafe, 1 => safe */ 47 48#define RECSIZE (8 * 1024) /* sets limit on records, fields, etc., etc. */ 49extern int recsize; /* size of current record, orig RECSIZE */ 50 51extern char **FS; 52extern char **RS; --- 143 unchanged lines hidden (view full) --- 196#define istrue(n) ((n)->csub == BTRUE) 197#define istemp(n) ((n)->csub == CTEMP) 198#define isargument(n) ((n)->nobj == ARG) 199/* #define freeable(p) (!((p)->tval & DONTFREE)) */ 200#define freeable(p) ( ((p)->tval & (STR|DONTFREE)) == STR ) 201 202/* structures used by regular expression matching machinery, mostly b.c: */ 203 | 45extern int compile_time; /* 1 if compiling, 0 if running */ 46extern int safe; /* 0 => unsafe, 1 => safe */ 47 48#define RECSIZE (8 * 1024) /* sets limit on records, fields, etc., etc. */ 49extern int recsize; /* size of current record, orig RECSIZE */ 50 51extern char **FS; 52extern char **RS; --- 143 unchanged lines hidden (view full) --- 196#define istrue(n) ((n)->csub == BTRUE) 197#define istemp(n) ((n)->csub == CTEMP) 198#define isargument(n) ((n)->nobj == ARG) 199/* #define freeable(p) (!((p)->tval & DONTFREE)) */ 200#define freeable(p) ( ((p)->tval & (STR|DONTFREE)) == STR ) 201 202/* structures used by regular expression matching machinery, mostly b.c: */ 203 |
204#define NCHARS (256+1) /* 256 handles 8-bit chars; 128 does 7-bit */ | 204#define NCHARS (256+3) /* 256 handles 8-bit chars; 128 does 7-bit */ |
205 /* watch out in match(), etc. */ 206#define NSTATES 32 207 208typedef struct rrow { 209 long ltype; /* long avoids pointer warnings on 64-bit */ 210 union { 211 int i; 212 Node *np; --- 21 unchanged lines hidden --- | 205 /* watch out in match(), etc. */ 206#define NSTATES 32 207 208typedef struct rrow { 209 long ltype; /* long avoids pointer warnings on 64-bit */ 210 union { 211 int i; 212 Node *np; --- 21 unchanged lines hidden --- |