summaryrefslogtreecommitdiffstats
path: root/usr.bin/awk/awk.h
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2020-06-10 21:03:56 +0000
committermillert <millert@openbsd.org>2020-06-10 21:03:56 +0000
commitf81b289f59b9fdc7f7af92e6c9ff037f7daf0da3 (patch)
tree31e38ece9282b84102aa006c26f68115017fd231 /usr.bin/awk/awk.h
parentUpdate awk to Oct 24, 2019 version. (diff)
downloadwireguard-openbsd-f81b289f59b9fdc7f7af92e6c9ff037f7daf0da3.tar.xz
wireguard-openbsd-f81b289f59b9fdc7f7af92e6c9ff037f7daf0da3.zip
Update awk to Nov 10, 2019 version.
Diffstat (limited to 'usr.bin/awk/awk.h')
-rw-r--r--usr.bin/awk/awk.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/usr.bin/awk/awk.h b/usr.bin/awk/awk.h
index ca64bd02306..ba604cae6a6 100644
--- a/usr.bin/awk/awk.h
+++ b/usr.bin/awk/awk.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: awk.h,v 1.20 2020/06/10 21:03:36 millert Exp $ */
+/* $OpenBSD: awk.h,v 1.21 2020/06/10 21:03:56 millert Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
@@ -25,6 +25,7 @@ THIS SOFTWARE.
#include <assert.h>
#include <stdint.h>
+#include <stdbool.h>
typedef double Awkfloat;
@@ -49,8 +50,13 @@ typedef unsigned char uschar;
# define DPRINTF(x)
#endif
-extern int compile_time; /* 1 if compiling, 0 if running */
-extern int safe; /* 0 => unsafe, 1 => safe */
+extern enum compile_states {
+ RUNNING,
+ COMPILING,
+ ERROR_PRINTING
+} compile_time;
+
+extern bool safe; /* false => unsafe, true => safe */
#define RECSIZE (8 * 1024) /* sets limit on records, fields, etc., etc. */
extern int recsize; /* size of current record, orig RECSIZE */
@@ -71,8 +77,8 @@ extern Awkfloat *RLENGTH;
extern char *record; /* points to $0 */
extern int lineno; /* line number in awk program */
extern int errorflag; /* 1 if error has occurred */
-extern int donefld; /* 1 if record broken into fields */
-extern int donerec; /* 1 if record is valid (no fld has changed */
+extern bool donefld; /* true if record broken into fields */
+extern bool donerec; /* true if record is valid (no fld has changed */
extern char inputFS[]; /* FS at time of input, for field splitting */
extern int dbg;
@@ -244,7 +250,7 @@ typedef struct fa {
uschar *restr;
int **posns;
int state_count;
- int anchor;
+ bool anchor;
int use;
int initstat;
int curstat;