diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | array.c | 2 | ||||
-rw-r--r-- | extension/ChangeLog | 9 | ||||
-rw-r--r-- | extension/inplace.c | 1 | ||||
-rw-r--r-- | extension/revtwoway.c | 8 | ||||
-rw-r--r-- | gawkapi.c | 3 | ||||
-rw-r--r-- | pc/ChangeLog | 4 | ||||
-rw-r--r-- | pc/Makefile.tst | 15 | ||||
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rwxr-xr-x | test/arrayind1.awk | 10 | ||||
-rw-r--r-- | test/arrayind1.ok | 5 |
11 files changed, 56 insertions, 19 deletions
@@ -1,3 +1,16 @@ +2016-07-01 Arnold D. Robbins <arnold@skeeve.com> + + * array.c (value_info): Print something reasonable when stfmt + is -1. + * mpfr.c (mpg_format_val): Don't cast index to char. + * node.c (r_format_val): Ditto. + Thanks to Andrew Schorr for pointing these out. + + Unrelated: + + * gawkapi.c (api_warning): Fix the comment header. + (api_lintwarn): Factor out the call to va_end to after the if. + 2016-06-30 Arnold D. Robbins <arnold@skeeve.com> * node.c (r_force_number): Coding style change. @@ -711,7 +711,7 @@ value_info(NODE *n) * an integer value. */ fprintf(output_fp, "FMT=\"%s\"", - n->stfmt == STFMT_UNUSED ? "%s" + n->stfmt == STFMT_UNUSED ? "<unused>" : fmt_list[n->stfmt]->stptr); } diff --git a/extension/ChangeLog b/extension/ChangeLog index 06e8f6a5..b7668fc7 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,12 @@ +2016-07-01 Arnold D. Robbins <arnold@skeeve.com> + + * inplace.c (do_inplace_begin): Flush stdout at the start to + try to avoid flushing problems on some obscure BSD systems. + * revtwoway.c (gawk_getdtablesize): Renamed from getdtablesize. + (getdtablesize): New macro. Avoids problems on FreeBSD 10 + where configure didn't work correctly. Thanks to Nelson Beebe. + Update copyright year. + 2016-05-26 Andrew J. Schorr <aschorr@telemetry-investments.com> * filefuncs.c (func_table): Update "stat" to indicate that the diff --git a/extension/inplace.c b/extension/inplace.c index 07d256b7..c7eb5564 100644 --- a/extension/inplace.c +++ b/extension/inplace.c @@ -125,6 +125,7 @@ do_inplace_begin(int nargs, awk_value_t *result) int fd; assert(result != NULL); + fflush(stdout); if (state.tname) fatal(ext_id, _("inplace_begin: in-place editing already active")); diff --git a/extension/revtwoway.c b/extension/revtwoway.c index c0d9381a..dfe58a1e 100644 --- a/extension/revtwoway.c +++ b/extension/revtwoway.c @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 2012-2014 the Free Software Foundation, Inc. + * Copyright (C) 2012-2014, 2016 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -64,10 +64,10 @@ int plugin_is_GPL_compatible; static size_t max_fds; #ifndef HAVE_GETDTABLESIZE -/* getdtablesize --- replacement version that should be good enough */ +/* gawk_getdtablesize --- replacement version that should be good enough */ static inline int -getdtablesize() +gawk_getdtablesize() { /* * Algorithm for the GNULIB folks: @@ -89,6 +89,8 @@ getdtablesize() /* In the meantime, this is good enough for us: */ return 1024; } + +#define getdtablesize() gawk_getdtablesize() #endif /* @@ -238,11 +238,10 @@ api_lintwarn(awk_ext_id_t id, const char *format, ...) va_start(args, format); if (lintwarn == r_fatal) { err(true, _("fatal: "), format, args); - va_end(args); } else { err(false, _("warning: "), format, args); - va_end(args); } + va_end(args); } /* api_register_input_parser --- register an input_parser; for opening files read-only */ diff --git a/pc/ChangeLog b/pc/ChangeLog index 4154fcba..dc38023f 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,7 @@ +2016-07-01 Scott Deifik <scottd.mail@sbcglobal.net> + + * Makefile.tst: Sync with mainline. + 2016-06-14 Arnold D. Robbins <arnold@skeeve.com> * Makefile.tst: Sync with mainline: diff --git a/pc/Makefile.tst b/pc/Makefile.tst index e4414294..ea711413 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -148,12 +148,12 @@ BASIC_TESTS = \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ eofsplit exit2 exitval1 exitval2 exitval3 \ fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ - fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \ + fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsnul1 fsrs fsspcoln \ fstabplus funsemnl funsmnam funstack \ getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ gsubtst7 gsubtst8 \ - hex hsprint \ + hex hex2 hsprint \ inpref inputred intest intprec iobug1 \ leaddig leadnl litoct longsub longwrds \ manglprm math membug1 messages minusstr mmap8k mtchi18n \ @@ -1289,7 +1289,6 @@ symtab10: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -D -f $@.awk < "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -1608,6 +1607,11 @@ fsbs: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +fsnul1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fsrs: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1703,6 +1707,11 @@ hex: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +hex2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + hsprint: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/ChangeLog b/test/ChangeLog index cca91c53..f0f346ee 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2016-07-01 Arnold D. Robbins <arnold@skeeve.com> + + * arrayind1.awk, arrayind1.ok: Comment out prints to stderr to + avoid buffer flushing on obscure systems. + 2016-06-26 Andrew J. Schorr <aschorr@telemetry-investments.com> * strnum2.ok: Fix results, since print for a strnum should not be diff --git a/test/arrayind1.awk b/test/arrayind1.awk index fc3683f0..5d4a6f3d 100755 --- a/test/arrayind1.awk +++ b/test/arrayind1.awk @@ -57,7 +57,7 @@ END{ #printf("%10s%16s%10s%16s%10s%10s%10s\n","group",last," included as",posout[x]," as sire, as dam",cum[x,"sire"],cum[x,"dam"]) > "/dev/stderr" } # regular individuals - printf("%16s\n","recoding animals") > "/dev/stderr" +# printf("%16s\n","recoding animals") > "/dev/stderr" iter=1 #--> comment next line and this element of the associative array becomes null #printf("%s%16s\n","at the beginning it should be empty: ",posout["00000779770060"]) > "/dev/stderr" @@ -84,8 +84,8 @@ END{ } iter++ #--> - printf("%s%16s\n","in the loop: ",posout["00000779770060"]) > "/dev/stderr" - fflush("/dev/stderr") +# printf("%s%16s\n","in the loop: ",posout["00000779770060"]) > "/dev/stderr" +# fflush("/dev/stderr") #--> #printf("%10s%10s%10s%10s%16s%16s\n","round",iter,"included",posout[last],"last ",last) > "/dev/stderr" } @@ -95,7 +95,7 @@ END{ #printf("%10s%16s%10s%16s\n","pseudogeneration:",x," including: ",cumgen[x]) > "/dev/stderr" } #--> this is the guilty line - printf("%s%16s\n","at the end: ",posout["00000779770060"]) > "/dev/stderr" - fflush("/dev/stderr") +# printf("%s%16s\n","at the end: ",posout["00000779770060"]) > "/dev/stderr" +# fflush("/dev/stderr") #--> } diff --git a/test/arrayind1.ok b/test/arrayind1.ok index c68346ea..2b11bb5d 100644 --- a/test/arrayind1.ok +++ b/test/arrayind1.ok @@ -1,8 +1,3 @@ -recoding animals -in the loop: 3 -in the loop: 3 -in the loop: 3 -at the end: 3 1 0 0 00000757740011 0 0 0 2 0 0 1975su1du1 0 0 0 3 2 2 00000779770060 1975su1du1 1975su1du1 1 |