=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/awk/run.c,v retrieving revision 1.53 retrieving revision 1.54 diff -c -r1.53 -r1.54 *** src/usr.bin/awk/run.c 2020/06/10 21:03:36 1.53 --- src/usr.bin/awk/run.c 2020/06/10 21:03:56 1.54 *************** *** 1,4 **** ! /* $OpenBSD: run.c,v 1.53 2020/06/10 21:03:36 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved --- 1,4 ---- ! /* $OpenBSD: run.c,v 1.54 2020/06/10 21:03:56 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved *************** *** 192,198 **** tempfree(x); } if (a[1] || a[2]) ! while (getrec(&record, &recsize, 1) > 0) { x = execute(a[1]); if (isexit(x)) break; --- 192,198 ---- tempfree(x); } if (a[1] || a[2]) ! while (getrec(&record, &recsize, true) > 0) { x = execute(a[1]); if (isexit(x)) break; *************** *** 442,450 **** } } else { /* bare getline; use current input */ if (a[0] == NULL) /* getline */ ! n = getrec(&record, &recsize, 1); else { /* getline var */ ! n = getrec(&buf, &bufsize, 0); x = execute(a[0]); setsval(x, buf); if (is_number(x->sval)) { --- 442,450 ---- } } else { /* bare getline; use current input */ if (a[0] == NULL) /* getline */ ! n = getrec(&record, &recsize, true); else { /* getline var */ ! n = getrec(&buf, &bufsize, false); x = execute(a[0]); setsval(x, buf); if (is_number(x->sval)) { *************** *** 461,467 **** Cell *getnf(Node **a, int n) /* get NF */ { ! if (donefld == 0) fldbld(); return (Cell *) a[0]; } --- 461,467 ---- Cell *getnf(Node **a, int n) /* get NF */ { ! if (!donefld) fldbld(); return (Cell *) a[0]; } *************** *** 825,839 **** #define FMTSZ(a) (fmtsz - ((a) - fmt)) #define BUFSZ(a) (bufsize - ((a) - buf)) ! static int first = 1; ! static int have_a_format = 0; if (first) { char buf[100]; snprintf(buf, sizeof(buf), "%a", 42.0); have_a_format = (strcmp(buf, "0x1.5p+5") == 0); ! first = 0; } os = s; --- 825,839 ---- #define FMTSZ(a) (fmtsz - ((a) - fmt)) #define BUFSZ(a) (bufsize - ((a) - buf)) ! static bool first = true; ! static bool have_a_format = false; if (first) { char buf[100]; snprintf(buf, sizeof(buf), "%a", 42.0); have_a_format = (strcmp(buf, "0x1.5p+5") == 0); ! first = false; } os = s;