diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | awk.h | 2 | ||||
-rw-r--r-- | pc/Makefile.tst | 8 | ||||
-rw-r--r-- | profile.c | 4 |
4 files changed, 18 insertions, 4 deletions
@@ -3,6 +3,14 @@ * awkgram.y: Fix `print $"2"' case. Thanks to Ed Morton Morton <mortoneccc@comcast.net> for the report. + Unrelated: + + * awk.h (INSTRUCTION): Make dl a long long for profiling + counts on 32 bit systems. Thanks to Peter Lindgren + <lindgren@ameritech.net> for the report. + * profile.c (indent): Take a long long parameter and fix + the printf format. + 2020-06-05 Arnold D. Robbins <arnold@skeeve.com> * awkgram.y: Allow @/foo/ as return expression in a function. @@ -758,7 +758,7 @@ typedef struct exp_instruction { awk_value_t *(*efptr)(int num_actual_args, awk_value_t *result, struct awk_ext_func *finfo); - long dl; + long long dl; char *name; } d; diff --git a/pc/Makefile.tst b/pc/Makefile.tst index 22ac2240..2670ae4b 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -175,7 +175,8 @@ BASIC_TESTS = \ rstest1 rstest2 rstest3 rstest4 rstest5 rswhite \ scalar sclforin sclifin setrec0 setrec1 \ sigpipe1 sortempty sortglos spacere splitargv splitarr \ - splitdef splitvar splitwht status-close strcat1 strnum1 strnum2 strtod \ + splitdef splitvar splitwht status-close \ + strcat1 strfieldnum strnum1 strnum2 strtod \ subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 synerr3 \ tailrecurse tradanch trailbs tweakfld \ uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs uplus \ @@ -2295,6 +2296,11 @@ strcat1: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +strfieldnum: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + strnum1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -135,7 +135,7 @@ init_profiling_signals() /* indent --- print out enough tabs */ static void -indent(long count) +indent(long long count) { int i; @@ -143,7 +143,7 @@ indent(long count) if (count == 0) fprintf(prof_fp, "\t"); else - fprintf(prof_fp, "%6ld ", count); + fprintf(prof_fp, "%6lld ", count); } assert(indent_level >= 0); |