From f5df7fad8c8b864c3d817d8eb4f9fa3596c2a14b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 6 Apr 2015 10:57:10 +0300 Subject: Minor code cleanups. --- ChangeLog | 6 ++++++ awk.h | 2 +- awkgram.c | 23 ++++++++++++++--------- awkgram.y | 23 ++++++++++++++--------- 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 910a8e83..c60ad62a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-04-06 Arnold D. Robbins + + * awk.h (force_number): Add `!= 0' check to bitwise operation. + * awkgram.y: Same, many places. + (check_special): Simplify code for checking extension flags. + 2015-04-05 Arnold D. Robbins * awkgram.y (install_builtins): If do_traditional is true, do not diff --git a/awk.h b/awk.h index 4ac32e4a..5c3d76af 100644 --- a/awk.h +++ b/awk.h @@ -1769,7 +1769,7 @@ unref(NODE *r) static inline NODE * force_number(NODE *n) { - return (n->flags & NUMCUR) ? n : str2number(n); + return (n->flags & NUMCUR) != 0 ? n : str2number(n); } #endif /* GAWKDEBUG */ diff --git a/awkgram.c b/awkgram.c index 8313afcb..4fd53ce0 100644 --- a/awkgram.c +++ b/awkgram.c @@ -3299,7 +3299,7 @@ regular_print: if ((yyvsp[-1])->lasti->opcode == Op_concat) { /* multiple (> 2) adjacent strings optimization */ - is_simple_var = ((yyvsp[-1])->lasti->concat_flag & CSVAR); + is_simple_var = ((yyvsp[-1])->lasti->concat_flag & CSVAR) != 0; count = (yyvsp[-1])->lasti->expr_count + 1; (yyvsp[-1])->lasti->opcode = Op_no_op; } else { @@ -4719,7 +4719,7 @@ add_srcfile(enum srctype stype, char *src, SRCFILE *thisfile, bool *already_incl if (stype == SRC_CMDLINE || stype == SRC_STDIN) return do_add_srcfile(stype, src, NULL, thisfile); - path = find_source(src, & sbuf, &errno_val, stype == SRC_EXTLIB); + path = find_source(src, & sbuf, & errno_val, stype == SRC_EXTLIB); if (path == NULL) { if (errcode) { *errcode = errno_val; @@ -6449,10 +6449,10 @@ valinfo(NODE *n, Func_print print_func, FILE *fp) { if (n == Nnull_string) print_func(fp, "uninitialized scalar\n"); - else if (n->flags & STRING) { + else if ((n->flags & STRING) != 0) { pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', false); print_func(fp, "\n"); - } else if (n->flags & NUMBER) { + } else if ((n->flags & NUMBER) != 0) { #ifdef HAVE_MPFR if (is_mpg_float(n)) print_func(fp, "%s\n", mpg_fmt("%.17R*g", ROUND_MODE, n->mpg_numbr)); @@ -6461,10 +6461,10 @@ valinfo(NODE *n, Func_print print_func, FILE *fp) else #endif print_func(fp, "%.17g\n", n->numbr); - } else if (n->flags & STRCUR) { + } else if ((n->flags & STRCUR) != 0) { pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', false); print_func(fp, "\n"); - } else if (n->flags & NUMCUR) { + } else if ((n->flags & NUMCUR) != 0) { #ifdef HAVE_MPFR if (is_mpg_float(n)) print_func(fp, "%s\n", mpg_fmt("%.17R*g", ROUND_MODE, n->mpg_numbr)); @@ -7421,7 +7421,7 @@ optimize_assignment(INSTRUCTION *exp) switch (i2->opcode) { case Op_concat: if (i2->nexti->opcode == Op_push_lhs /* l.h.s is a simple variable */ - && (i2->concat_flag & CSVAR) /* 1st exp in r.h.s is a simple variable; + && (i2->concat_flag & CSVAR) != 0 /* 1st exp in r.h.s is a simple variable; * see Op_concat in the grammer above. */ && i2->nexti->memory == exp->nexti->memory /* and the same as in l.h.s */ @@ -7881,6 +7881,7 @@ check_special(const char *name) { int low, high, mid; int i; + int non_standard_flags = 0; #if 'a' == 0x81 /* it's EBCDIC */ static bool did_sort = false; @@ -7892,6 +7893,11 @@ check_special(const char *name) } #endif + if (do_traditional) + non_standard_flags |= GAWKX; + if (do_posix) + non_standard_flags |= NOT_POSIX; + low = 0; high = (sizeof(tokentab) / sizeof(tokentab[0])) - 1; while (low <= high) { @@ -7905,8 +7911,7 @@ check_special(const char *name) else if (i > 0) /* token > mid */ low = mid + 1; else { - if ((do_traditional && (tokentab[mid].flags & GAWKX)) - || (do_posix && (tokentab[mid].flags & NOT_POSIX))) + if ((tokentab[mid].flags & non_standard_flags) != 0) return -1; return mid; } diff --git a/awkgram.y b/awkgram.y index 71ca0a84..fad2b963 100644 --- a/awkgram.y +++ b/awkgram.y @@ -1342,7 +1342,7 @@ common_exp if ($1->lasti->opcode == Op_concat) { /* multiple (> 2) adjacent strings optimization */ - is_simple_var = ($1->lasti->concat_flag & CSVAR); + is_simple_var = ($1->lasti->concat_flag & CSVAR) != 0; count = $1->lasti->expr_count + 1; $1->lasti->opcode = Op_no_op; } else { @@ -2380,7 +2380,7 @@ add_srcfile(enum srctype stype, char *src, SRCFILE *thisfile, bool *already_incl if (stype == SRC_CMDLINE || stype == SRC_STDIN) return do_add_srcfile(stype, src, NULL, thisfile); - path = find_source(src, & sbuf, &errno_val, stype == SRC_EXTLIB); + path = find_source(src, & sbuf, & errno_val, stype == SRC_EXTLIB); if (path == NULL) { if (errcode) { *errcode = errno_val; @@ -4110,10 +4110,10 @@ valinfo(NODE *n, Func_print print_func, FILE *fp) { if (n == Nnull_string) print_func(fp, "uninitialized scalar\n"); - else if (n->flags & STRING) { + else if ((n->flags & STRING) != 0) { pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', false); print_func(fp, "\n"); - } else if (n->flags & NUMBER) { + } else if ((n->flags & NUMBER) != 0) { #ifdef HAVE_MPFR if (is_mpg_float(n)) print_func(fp, "%s\n", mpg_fmt("%.17R*g", ROUND_MODE, n->mpg_numbr)); @@ -4122,10 +4122,10 @@ valinfo(NODE *n, Func_print print_func, FILE *fp) else #endif print_func(fp, "%.17g\n", n->numbr); - } else if (n->flags & STRCUR) { + } else if ((n->flags & STRCUR) != 0) { pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', false); print_func(fp, "\n"); - } else if (n->flags & NUMCUR) { + } else if ((n->flags & NUMCUR) != 0) { #ifdef HAVE_MPFR if (is_mpg_float(n)) print_func(fp, "%s\n", mpg_fmt("%.17R*g", ROUND_MODE, n->mpg_numbr)); @@ -5082,7 +5082,7 @@ optimize_assignment(INSTRUCTION *exp) switch (i2->opcode) { case Op_concat: if (i2->nexti->opcode == Op_push_lhs /* l.h.s is a simple variable */ - && (i2->concat_flag & CSVAR) /* 1st exp in r.h.s is a simple variable; + && (i2->concat_flag & CSVAR) != 0 /* 1st exp in r.h.s is a simple variable; * see Op_concat in the grammer above. */ && i2->nexti->memory == exp->nexti->memory /* and the same as in l.h.s */ @@ -5542,6 +5542,7 @@ check_special(const char *name) { int low, high, mid; int i; + int non_standard_flags = 0; #if 'a' == 0x81 /* it's EBCDIC */ static bool did_sort = false; @@ -5553,6 +5554,11 @@ check_special(const char *name) } #endif + if (do_traditional) + non_standard_flags |= GAWKX; + if (do_posix) + non_standard_flags |= NOT_POSIX; + low = 0; high = (sizeof(tokentab) / sizeof(tokentab[0])) - 1; while (low <= high) { @@ -5566,8 +5572,7 @@ check_special(const char *name) else if (i > 0) /* token > mid */ low = mid + 1; else { - if ((do_traditional && (tokentab[mid].flags & GAWKX)) - || (do_posix && (tokentab[mid].flags & NOT_POSIX))) + if ((tokentab[mid].flags & non_standard_flags) != 0) return -1; return mid; } -- cgit v1.2.3 From 6ae08e872756cbc6f4574780f015c47afb6acdaf Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 7 Apr 2015 17:31:59 +0300 Subject: Minor doc update. --- doc/ChangeLog | 5 +++++ doc/gawk.texi | 5 +++++ doc/gawktexi.in | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 2f1dc614..37245b5c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2015-04-07 Arnold D. Robbins + + * gawktexi.in: Add a minor note to revisit FPAT pattern for CSV + files at some point. + 2015-04-05 Andrew J. Schorr * gawktexi.in: Replace http://gawkextlib.sourceforge.net with diff --git a/doc/gawk.texi b/doc/gawk.texi index ba2b5bcc..fbf0e8d2 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -7884,6 +7884,11 @@ contain at least one character. A straightforward modification FPAT = "([^,]*)|(\"[^\"]+\")" @end example +@c FIXME: 4/2015 +@c Consider use of FPAT = "([^,]*)|(\"[^\"]*\")" +@c (star in latter part of value) to allow quoted strings to be empty. +@c Per email from Ed Morton + Finally, the @code{patsplit()} function makes the same functionality available for splitting regular strings (@pxref{String Functions}). diff --git a/doc/gawktexi.in b/doc/gawktexi.in index e3d396d1..30201a2c 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -7484,6 +7484,11 @@ contain at least one character. A straightforward modification FPAT = "([^,]*)|(\"[^\"]+\")" @end example +@c FIXME: 4/2015 +@c Consider use of FPAT = "([^,]*)|(\"[^\"]*\")" +@c (star in latter part of value) to allow quoted strings to be empty. +@c Per email from Ed Morton + Finally, the @code{patsplit()} function makes the same functionality available for splitting regular strings (@pxref{String Functions}). -- cgit v1.2.3 From 2b334d94251c205ad016ed6d1726e5b99c8895a4 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 7 Apr 2015 17:32:15 +0300 Subject: Update pc/Makefile.tst and pc/config.h. --- pc/ChangeLog | 5 +++ pc/Makefile.tst | 101 ++++++++++++++++++++++++++++++++++++++++++++++---------- pc/config.h | 3 -- 3 files changed, 89 insertions(+), 20 deletions(-) diff --git a/pc/ChangeLog b/pc/ChangeLog index 218621eb..2a241b19 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,8 @@ +2015-04-07 Arnold D. Robbins + + * Makefile.tst: Sync with mainline. + * config.h: Sync with mainline. + 2014-11-21 Arnold D. Robbins * Makefile.tst (id): Add an 'expect to fail for DJGPP' message. diff --git a/pc/Makefile.tst b/pc/Makefile.tst index 79d01ad9..4fb68df9 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -1,6 +1,6 @@ # Makefile for GNU Awk test suite. # -# Copyright (C) 1988-2014 the Free Software Foundation, Inc. +# Copyright (C) 1988-2015 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -141,11 +141,11 @@ BASIC_TESTS = \ arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 arysubnm asgext awkpath \ - back89 backgsub badassign1 \ - childin clobber closebad clsflnam compare compare2 concat1 concat2 \ + back89 backgsub badassign1 badbuild \ + callparam childin clobber closebad clsflnam compare compare2 concat1 concat2 \ concat3 concat4 convfmt \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ - eofsplit exit2 exitval1 exitval2 \ + eofsplit exit2 exitval1 exitval2 exitval3 \ fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \ fstabplus funsemnl funsmnam funstack \ @@ -160,13 +160,14 @@ BASIC_TESTS = \ nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \ noparms nors nulrsend numindex numsubstr \ octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofs1 onlynl opasnidx opasnslf \ + paramasfunc1 paramasfunc2 \ paramdup paramres paramtyp paramuninitglobal parse1 parsefld parseme \ pcntplus posix2008sub prdupval prec printf0 printf1 prmarscl prmreuse \ prt1eval prtoeval \ - rand range1 rebt8b1 redfilnm regeq regexprange regrange reindops \ + rand range1 rebt8b1 redfilnm regeq regexpbrack regexprange regrange reindops \ reparse resplit rri1 rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ rstest3 rstest4 rstest5 rswhite \ - scalar sclforin sclifin sortempty splitargv splitarr splitdef \ + scalar sclforin sclifin sortempty sortglos splitargv splitarr splitdef \ splitvar splitwht strcat1 strnum1 strtod subamp subi18n \ subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \ uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \ @@ -180,18 +181,18 @@ UNIX_TESTS = \ GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ backw badargs beginfile1 beginfile2 binmode1 charasbytes \ - colonwarn clos1way dbugeval delsub devfd devfd1 devfd2 dumpvars exit \ - fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \ + colonwarn clos1way crlf dbugeval delsub devfd devfd1 devfd2 dumpvars exit \ + fieldwdth fpat1 fpat2 fpat3 fpat4 fpatnull fsfwfs funlen \ functab1 functab2 functab3 fwtest fwtest2 fwtest3 \ genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ icasefs icasers id igncdym igncfs ignrcas2 ignrcase \ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \ - include include2 indirectcall indirectcall2 \ + include include2 indirectbuiltin indirectcall indirectcall2 \ lint lintold lintwarn \ manyfiles match1 match2 match3 mbstr1 \ nastyparm next nondec nondec2 \ - patsplit posix printfbad1 printfbad2 printfbad3 printhuge procinfs \ - profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \ + patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \ + profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \ splitarg4 strftime \ @@ -201,8 +202,8 @@ GAWK_EXT_TESTS = \ EXTRA_TESTS = inftest regtest INET_TESTS = inetdayu inetdayt inetechu inetecht MACHINE_TESTS = double1 double2 fmtspcl intformat -MPFR_TESTS = mpfrnr mpfrnegzero mpfrrem mpfrrnd mpfrieee mpfrexprange \ - mpfrsort mpfrsqrt mpfrbigint +MPFR_TESTS = mpfrnr mpfrnegzero mpfrmemok1 mpfrrem mpfrrnd mpfrieee \ + mpfrexprange mpfrsort mpfrsqrt mpfrbigint LOCALE_CHARSET_TESTS = \ asort asorti backbigs1 backsmalls1 backsmalls2 \ @@ -248,8 +249,8 @@ check: msg \ machine-msg-start machine-tests machine-msg-end \ charset-msg-start charset-tests charset-msg-end \ shlib-msg-start shlib-tests shlib-msg-end \ - mpfr-msg-start mpfr-tests mpfr-msg-end \ - pass-fail + mpfr-msg-start mpfr-tests mpfr-msg-end + @$(MAKE) pass-fail || { $(MAKE) diffout; exit 1; } basic: $(BASIC_TESTS) @@ -856,8 +857,13 @@ beginfile2: dumpvars:: @echo $@ @AWKPATH="$(srcdir)" $(AWK) --dump-variables 1 < "$(srcdir)"/$@.in >/dev/null 2>&1 || echo EXIT CODE: $$? >>_$@ -# @mv awkvars.out _$@ - @$(MV) awkvars.out _$@ + @grep -v ENVIRON < awkvars.out | grep -v PROCINFO > _$@; rm awkvars.out + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +profile0: + @echo $@ + @$(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ profile1: @@ -971,6 +977,11 @@ mpfrrem: @$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1 @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mpfrmemok1: + @echo $@ + @$(AWK) -p/dev/stdout -M -f "$(srcdir)"/$@.awk 2>&1 | sed 1d > _$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + jarebug:: @echo $@ @echo Expect jarebug to fail with DJGPP and MinGW. @@ -1195,6 +1206,16 @@ genpot: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --gen-pot >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +paramasfunc1:: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --posix >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +paramasfunc2:: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --posix >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -1322,6 +1343,16 @@ badassign1: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +badbuild: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +callparam: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + childin: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1418,6 +1449,11 @@ exitval2: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +exitval3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fcall_exit: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1892,6 +1928,11 @@ regeq: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +regexpbrack: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + regexprange: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1979,6 +2020,11 @@ sortempty: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +sortglos: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + splitargv: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2146,6 +2192,11 @@ backw: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +crlf: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + delsub: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2171,6 +2222,11 @@ fpat3: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +fpat4: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fpatnull: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2283,6 +2339,11 @@ include: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +indirectbuiltin: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + indirectcall: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2354,6 +2415,11 @@ printfbad3: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +printfbad4: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + procinfs: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2585,6 +2651,7 @@ pass-fail: fi # This target for my convenience to look at all the results +# Don't use POSIX or bash-isms so that it'll work on !@#$%^&*() Solaris. diffout: for i in _* ; \ do \ diff --git a/pc/config.h b/pc/config.h index 95811f06..65fb5e14 100644 --- a/pc/config.h +++ b/pc/config.h @@ -117,9 +117,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H -/* Define to 1 if you have the `m' library (-lm). */ -#define HAVE_LIBM 1 - /* Define to 1 if you have a fully functional readline library. */ /* #undef HAVE_LIBREADLINE */ -- cgit v1.2.3