diff options
author | ben <ben@rana> | 2016-04-26 22:23:44 -0500 |
---|---|---|
committer | ben <ben@rana> | 2016-04-26 22:23:44 -0500 |
commit | 0a460e1722c50e31653359f8a86fe0b606d2b513 (patch) | |
tree | b5a00bbfc883aa98709db012e0a7bacc67e234af /sys/src/cmd/awk/awk.h | |
parent | 651d6c2bc68e7e5224c3ba41b094e37b1c1890ed (diff) |
New libregexp and APE ported to native
Diffstat (limited to 'sys/src/cmd/awk/awk.h')
-rw-r--r-- | sys/src/cmd/awk/awk.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sys/src/cmd/awk/awk.h b/sys/src/cmd/awk/awk.h index 0bdcd8183..933b59ea4 100644 --- a/sys/src/cmd/awk/awk.h +++ b/sys/src/cmd/awk/awk.h @@ -6,20 +6,20 @@ Copyright (c) Lucent Technologies 1997 typedef double Awkfloat; -/* unsigned char is more trouble than it's worth */ - -typedef unsigned char uschar; - -#define xfree(a) { if ((a) != NULL) { free((char *) a); a = NULL; } } +#define xfree(a) { if ((a) != nil) { free((a)); (a) = nil; } } #define DEBUG #ifdef DEBUG /* uses have to be doubly parenthesized */ -# define dprintf(x) if (dbg) printf x +# define dprint(x) if (dbg) print x #else -# define dprintf(x) +# define dprint(x) #endif +#define FOPEN_MAX 40 /* max number of open files */ + +#define EOF -1 + extern char errbuf[]; extern int compile_time; /* 1 if compiling, 0 if running */ @@ -28,6 +28,10 @@ extern int safe; /* 0 => unsafe, 1 => safe */ #define RECSIZE (8 * 1024) /* sets limit on records, fields, etc., etc. */ extern int recsize; /* size of current record, orig RECSIZE */ +extern Biobuf stdin; +extern Biobuf stdout; +extern Biobuf stderr; + extern char **FS; extern char **RS; extern char **ORS; @@ -56,8 +60,8 @@ extern int patlen; /* length of pattern matched. set in b.c */ /* Cell: all information about a variable or constant */ typedef struct Cell { - uschar ctype; /* OCELL, OBOOL, OJUMP, etc. */ - uschar csub; /* CCON, CTEMP, CFLD, etc. */ + uchar ctype; /* OCELL, OBOOL, OJUMP, etc. */ + uchar csub; /* CCON, CTEMP, CFLD, etc. */ char *nval; /* name, for variables only */ char *sval; /* string value */ Awkfloat fval; /* value as number */ @@ -66,7 +70,7 @@ typedef struct Cell { } Cell; typedef struct Array { /* symbol table array */ - int nelem; /* elements in table right now */ + int nelemt; /* elements in table right now */ int size; /* size of tab */ Cell **tab; /* hash table pointers */ } Array; |