From fed624147a594f2e25095881ff9b69a47122b18a Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 16 Jan 2022 11:55:42 -0800 Subject: [PATCH] lefty: use C99 bools for 'errdo' globals --- cmd/lefty/aix_mods/exec.c | 10 +++++----- cmd/lefty/exec.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/lefty/aix_mods/exec.c b/cmd/lefty/aix_mods/exec.c index 8e81a5c3f..e6e7e969c 100644 --- a/cmd/lefty/aix_mods/exec.c +++ b/cmd/lefty/aix_mods/exec.c @@ -63,7 +63,7 @@ static char *errnam[] = { "table changed during a forin loop", }; -static int errdo; +static bool errdo; /* stack information */ typedef struct sinfo_t { @@ -219,7 +219,7 @@ static Tobj eeval(Tobj co, int ci) int i1, i2, res; tailrec: - errdo = TRUE; + errdo = true; v1o = NULL; ctype = TCgettype(co, ci); switch (ctype) { @@ -522,7 +522,7 @@ static Tobj efcall(Tobj co, int ci) sinfoi = ownsinfoi; Mpopmark(m); lrtno = rtno, rtno = NULL; - errdo = TRUE; + errdo = true; return lrtno; } @@ -950,7 +950,7 @@ static void err(int errnum, int level, Tobj co, int ci) } if (Estackdepth == 1) { fprintf(stderr, "\n"); - errdo = FALSE; + errdo = false; } for (i = si; i >= 0; i--) { if (sinfop[i].fco) { @@ -962,7 +962,7 @@ static void err(int errnum, int level, Tobj co, int ci) printbody(s, Eshowbody), free(s); } fprintf(stderr, "\n"); - errdo = FALSE; + errdo = false; } static void printbody(char *s, int mode) diff --git a/cmd/lefty/exec.c b/cmd/lefty/exec.c index b2cb69649..42c2d5d41 100644 --- a/cmd/lefty/exec.c +++ b/cmd/lefty/exec.c @@ -75,7 +75,7 @@ static char *errnam[] = { "table changed during a forin loop", }; -static int errdo; +static bool errdo; /* stack information */ typedef struct sinfo_t { @@ -228,7 +228,7 @@ static Tobj eeval (Tobj co, int ci) { tailrec: m1 = 0; - errdo = TRUE; + errdo = true; v1o = NULL; ctype = TCgettype (co, ci); switch (ctype) { @@ -534,7 +534,7 @@ static Tobj efcall (Tobj co, int ci) { sinfoi = ownsinfoi; Mpopmark (m); lrtno = rtno, rtno = NULL; - errdo = TRUE; + errdo = true; return lrtno; } @@ -957,7 +957,7 @@ static void err (int errnum, int level, Tobj co, int ci) { } if (Estackdepth == 1) { fprintf (stderr, "\n"); - errdo = FALSE; + errdo = false; } for (i = si; i >= 0; i--) { if (sinfop[i].fco) { @@ -969,7 +969,7 @@ static void err (int errnum, int level, Tobj co, int ci) { printbody (s, Eshowbody), free (s); } fprintf (stderr, "\n"); - errdo = FALSE; + errdo = false; } static void printbody (char *s, int mode) { -- 2.40.0