-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog
1400 lines (962 loc) · 47.4 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2021-12-17 Yuri Gribov <[email protected]>
Make a number of functions and variables static.
* cint_array.c (argv_array_func): Make static.
* debug.c (cur_rule, check_until): Ditto.
* field.c (default_FS, FS_re_yes_case, FS_re_no_case, FS_regexp,
FPAT_re_yes_case, FPAT_re_no_case, invalidate_field0: Ditto.
* io.c (iopflags2str): Ditto.
* main.c (ENVIRON_node): Ditto.
* re.c (reflags2str): Ditto.
* str_array.c (env_array_func): Ditto.
2021-12-02 Andrew J. Schorr <[email protected]>
* builtin.c (efwrite): Don't use return in call of function
returning void. Some compilers might not like it.
2021-12-01 Arnold D. Robbins <[email protected]>
* builtin.c (efflush): Don't use return in call of function
returning void. It works, but is funky, and I think some
compilers will complain.
Unrelated. Clean up the calls to w32_maybe_set_errno.
* awk.h (os_maybe_set_errno): Add declaration.
* builtin.c (wrerror): Replaced ifdef'ed code calling
w32_maybe_set_errno() with simple call to os_maybe_set_errno().
* io.c (non_fatal_flush_std_file, close_io): Ditto.
* main.c (usage, copyleft): Ditto.
* nonposix.h (w32_maybe_set_errno): Remove declaration.
2021-11-30 Andrew J. Schorr <[email protected]>
Improve output redirection error handling for problems not detected
until the final flush or close. Thanks to Miguel Pineiro Jr.
<[email protected]> for the bug report and suggesting a fix.
* awk.h (efflush): Add declaration.
* builtin.c (efwrite): Break up into 3 functions by moving the
flushing logic into efflush and the error handling logic into
wrerror.
(wrerror): New function containing the error-handling logic extracted
from efwrite.
(efflush): New function containing the fflush logic extracted from
efwrite.
* io.c (close_redir): Call efflush prior to closing the redirection
to identify any problems with flushing output and to take advantage
of the error-handling logic used for print and printf.
2021-11-21 Arnold D. Robbins <[email protected]>
* builtin.c (do_typeof): Make Node_array_ref handling smarter.
See test/stupid5.awk.
2021-11-18 Arnold D. Robbins <[email protected]>
* gawkapi.c (awk_value_to_node): Fix handling of MPFR values
coming back from an extension.
2021-11-07 Arnold D. Robbins <[email protected]>
* mkinstalldirs: Removed, it wasn't used.
* Makefile.in: Regenerated.
2021-11-03 Sam James <[email protected]>
* configure.ac: Fix AR_FLAGS assignment typo.
* configure.ac: Rename AR_FLAGS to ARFLAGS.
2021-10-27 Arnold D. Robbins <[email protected]>
* 5.1.1: Release tar ball made.
2021-10-24 Arnold D. Robbins <[email protected]>
* README: Updated.
2021-10-20 Andrew J. Schorr <[email protected]>
* msg.c (err): Need to check that FNR_node->var_value is non-NULL
before testing with is_mpg_number.
2021-10-18 Arnold D. Robbins <[email protected]>
Factor duplicated code out into a separate function.
D.R.Y. principle.
* symbol.c (get_name_from_awk_ns): New function.
(lookup): Use it.
(install): Use it.
* awkgram.y (check_qualified_special): Use awk_namespace instead of a
string constant.
* profile.c (pprint): Ditto.
(adjust_namespace): Ditto. Also, fix the check for the qualified
name to look for the "::" in case one namespace is a prefix of
another.
2021-10-13 Arnold D. Robbins <[email protected]>
* README: Update version, copyright year.
* custom.h: Update copyright year.
2021-09-26 Arnold D. Robbins <[email protected]>
* builtin.c (do_mktime): Update that ISO 8601 does not allow
hours > 23. Thanks to Nethox <[email protected]> for the info.
2021-09-23 Arnold D. Robbins <[email protected]>
* gawkapi.h: Some clean-up of comments in the header file.
2021-09-12 Arnold D. Robbins <[email protected]>
* interpret.h: Remove subscript_in_array variable.
Unrelated:
* builtin.c (add_thousands): Fix insertion of thousands_sep
string. Do it in reverse order.
2021-09-10 Arnold D. Robbins <[email protected]>
* interpret.h: For Op_subscript, don't allow references into
FUNCTAB and SYMTAB to create new elements. Thanks to
Jason C. Kwan <[email protected]> for the bug report.
Unrelated:
* aclocal.m4: Regenerated: Automake 1.16.4.
* NEWS: Updated.
Unrelated:
* awkgram.y (YYERROR_IS_DECLARED): Added for Bison 3.8.
* command.y (YYERROR_IS_DECLARED): Ditto.
* NEWS: Updated.
2021-09-09 Arnold D. Robbins <[email protected]>
Move to Autoconf 2.71 (finally!)
* configure.ac: Updated.
* aclocal.m4, configh.in configure: Regenerated.
* NEWS: Updated.
2021-09-06 Arnold D. Robbins <[email protected]>
Have the ' flag work for %d in MPFR mode also. Thanks to
Dan Nielsen <[email protected]> for the report.
* builtin.c (add_thousands): New function.
(reverse): New helper function.
(format_tree): Use add_thousands if MPFR and an integer
format.
2021-09-03 Arnold D. Robbins <[email protected]>
* main.c (UPDATE_YEAR): Update to 2021.
2021-09-03 Arnold D. Robbins <[email protected]>
* mpfr.c (mpg_cmp_as_numbers): Avoid compiler warning about possibly
used before set. Thanks to Michal Jaegermann for the report.
2021-08-18 Arnold D. Robbins <[email protected]>
* main.c (main): Change have_srcfile from int to bool.
2021-08-15 Arnold D. Robbins <[email protected]>
Allow setting AR and ARFLAGS on the configure command line.
Thanks to Jacob Burkholder <[email protected]> for
the report.
* configure.ac (AR_FLAGS): Provide default value.
(AR): Call AC_SUBST on it.
2021-08-13 Arnold D. Robbins <[email protected]>
* builtin.c (do_sub): Rationalize handling of strongly typed
regex as argument to sub/gsub, as well as rationalize the return
value from gensub to always be string. Thanks to John Naman
<[email protected]> for the bug report.
2021-08-05 Andrew J. Schorr <[email protected]>
* mpfr.c (do_mpfr_func): New argument, warn_negative. If true,
print a warning message about a negative argument. Bring -M
code into line with regular code. Bug report from Neil Ormos
in the help-gawk list.
Unrelated:
* mpfr.c (do_mpfr_int_div, mpg_div, mpg_mod): If dividing by
zero, print a fatal error messages. Brings MPFR code into line
with the regular code. Thanks to Peng Yu for noticing the bug, in
the help-gawk list.
2021-07-23 Arnold D. Robbins <[email protected]>
* awk.h (exec_count_t): Add typedef for Vax VMS C and everyone else.
(EXEC_COUNT_FMT, EXEC_COUNT_PROFILE_FMT): Corresponding format
strings for printf.
* debug.c (print_instruction): Use EXEC_COUNT_FMT.
* profile.c (indent): Ditto and use EXEC_COUNT_PROFILE_FMT.
2021-07-07 Arnold D. Robbins <[email protected]>
* array.c (asort_actual): Add a lint warning for passing the
same array as the first two arguments without a third.
Thanks to Peng Yu <[email protected]> for the report.
2021-06-30 Arnold D. Robbins <[email protected]>
* custom.h: Add a bunch of defines to work around the continous,
needless churn in support/dfa.c.
2021-06-04 Arnold D. Robbins <[email protected]>
* builtin.c (format_tree): In MPFR prints, cast values to
int for proper int vs. unsigned comparison. Fixes things
for HP-UX. Thanks to Daniel Richard G. for the report.
2021-05-21 Arnold D. Robbins <[email protected]>
* debug.c: For z/OS, use %#p to print pointers, %p everything else.
2021-05-13 Arnold D. Robbins <[email protected]>
* custom.h: For z/OS, define _REGEX_INCLUDE_LIMITS_H.
* profile.c (pprint): Add a diagnostic print for an
unexprected node type.
2021-05-05 Arnold D. Robbins <[email protected]>
* CMakeLists.txt: Removed.
* cmake: Removed directory and its contents.
2021-05-05 Arnold D. Robbins <[email protected]>
Move to Automake 1.16.3.
* configure.ac (AM_INIT_AUTOMAKE): Add subdir-objects option.
* NEWS: Updated.
Get `make distcheck' working again:
* Makefile.am (EXTRA_DIST): Remove files that are now in build-aux.
Unrelated:
* builtin.c (do_sub): Remove check for BOOL as target. It's not
correct anymore.
2021-05-03 Arnold D. Robbins <[email protected]>
* eval.c (flags2str): Move BOOL entry into the right place in the
list.
* NEWS: Update with info on mkbool.
2021-05-02 Arnold D. Robbins <[email protected]>
* awk.h (do_bool): Renamed do_mkbool.
* awkgram.y (tokentab): Rename bool to mkbool.
* builtin.c (do_bool): Renamed do_mkbool.
2021-04-30 Arnold D. Robbins <[email protected]>
* awk.h (boolval): Remove check for BOOL flag. It was incorrect.
Thanks to Andrew Schorr for the catch.
For Node_val, update the comment to describe the BOOL flag, and
move BOOL up to be alongside the flags for Node_val.
2021-04-28 Arnold D. Robbins <[email protected]>
Make bools plain numbers that have bool flag instead of
being weird string values.
* array.c (do_sort_up_value_type): Remove special ordering
for booleans.
* awk.h (warn_bool): Remove declaration.
* builtin.c (warn_bool): Remove function and all calls.
* gawkapi.c (node_to_awk_value): Update switches to look for
NUMBER|BOOL.
* node.c (make_bool_node): Revise string values and flag bits.
2021-04-16 Arnold D. Robbins <[email protected]>
* main.c (arg_assign): For -v '@/...' make sure that there are
at least three characters there. Thanks to Ed Morton
<[email protected]> for the report.
2021-04-14 Arnold D. Robbins <[email protected]>
Fix up lint warnings for "no effect" to avoid false warnings.
Straighten out the messages, and remove the run-time warning,
since a parse-time warning is already issued. Thanks to
Arkadiusz Drabczyk <[email protected]> for the initial
bug report.
* awkgram.y (isnoeffect): Add more opcodes that are "no effect".
(add_lint): For LINT_no_effect, check that all the opcodes in the
list are "no effect". Only if so, issue the warning. Remove the
addition of the run-time warning.
* interpret.h (r_interpret): Remove LINT_no_effect from Op_lint
case.
2021-04-14 Arnold D. Robbins <[email protected]>
* array.c (do_sort_up_value_type): Fix order with bools.
2021-03-30 Arnold D. Robbins <[email protected]>
* gawk_api.h (gawk_api_minor_version): Increase to 2.
* gawk_api.c (assign_bool): New function.
(node_to_awk_value): Finish updating for bool types and values.
2021-03-22 Arnold D. Robbins <[email protected]>
* gawkapi.h (make_bool): New inline function.
Update table of request/return types.
* gawkapi.c (awk_value_to_node): Add support for AWK_BOOL.
(node_to_awk_value): Start on same. Not yet complete.
2021-03-21 Arnold D. Robbins <[email protected]>
* str_array.c (fnv1a_hash_string): New function.
(str_array_init): Use fnv1a_hash_string if AWK_HASH env var
set to "fnv1a".
2021-03-20 Arnold D. Robbins <[email protected]>
* array.c (do_sort_up_value_type): Add logic for handling bools.
2021-03-08 Arnold D. Robbins <[email protected]>
* awk.h (warn_bool, do_bool): Add function declarations.
* awkgram.y (tokentab): Add entry for "bool" builtin.
* builtin.c (warn_bool): New function.
(do_index, do_substr, do_toupper, do_tolower, do_match,
do_length): Call it.
(do_sub): If first arg to sub/gsub is bool, fatal error.
(do_bool): New function.
* field.c (do_split, do_patsplit): Call warn_bool.
* main.c (load_procinfo_bools): Removed function and call.
2021-03-05 Arnold D. Robbins <[email protected]>
Start on a bool type for gawk.
* awk.h (BOOL): New flag value.
(make_bool_node): Add declaration of new function.
(bool_val): Check for BOOL along with NUMBER.
* builtin.c (do_typeof): Add support for BOOL.
* eval.c (flags2str): Ditto.
* gawkapi.h (awk_val_type): Add AWK_BOOL.
(awk_value_t): Add awk_bool_t element to the union and macro for it.
(struct gawk_api): Update the table of request/return values.
* main.c (load_procinfo_bools): New function.
(load_procinfo): Call it.
* node.c (make_bool_node): New function.
2021-02-13 Arnold D. Robbins <[email protected]>
* io.c (nextfile): Use the value of ARGC directly in the for
loop, in case it gets changed by code or by a command line
assignment. Thanks to the discussion in comp.lang.awk for
the report.
2021-01-28 Arnold D. Robbins <[email protected]>
Fix a Day One Bug!
* main.c (main): For -b option, only set LC_ALL to C if
not --posix. Ooops.
2021-01-09 Arnold D. Robbins <[email protected]>
Fix problems turning something like 018 into decimal.
Thanks to Arkadiusz Drabczyk <[email protected]> and to
Jean-Philippe Guérard <[email protected]>
for the reports.
* builtin.c (nondec2awknum): Use a copy of len, in case we detect
8 or 9 and have to restart as decimal.
* mpfr.c (mpg_strtoui): For 8 or 9, set base to 10.
Unrelated:
* array.c, awk.h, awkgram., builtin.c, cmd.h, command.y, debug.c,
eval.c, gawk.api.c, gawkapi.h, interpret.h, io.c, main.c, mfpr.c,
node.c, profile.c, re.c: Update copyright year.
2021-01-08 Arnold D. Robbins <[email protected]>
General tightening up use of const and types. Thanks to
the C++ porting experiment.
* array.c (null_array): Separate out multiple assignment of zero.
* awk.h: Add <math.h> here and pull it out of individual files.
(CONVFMT): Make const char *.
(quote): Make const char *.
(defpath): Make const char *.
(deflibpath): Make const char *.
(envsep): Make const char *.
(DO_FLAG_NONE): New zero enum value.
(getblock): Add a cast to the ty argument.
(make_regnode): First argument is now NODETYPE.
(gawk_name): Returns const char *.
* awkgram.y: Include argument types in read_func pointer.
(make_regnode): First argument is now NODETYPE.
* builtin.c (do_typeof): Use const char *.
(format_nan_inf): Move declaration of val to top of function.
* cmd.h (dbg_prompt, commands_prompt, eval_prompt, dgawk_prompt):
Make const char *.
(struct cmd_token): Use const char *. Rename `class' to `lex_class'.
* command.y (lex_class): Update all uses.
(find_command): Use const char *.
* debug.c (dbg_prompt, commands_prompt, eval_prompt, dgawk_prompt,
output_file): Make const char *.
(struct dbg_option): Use const char *.
(do_info): Use const char *. Cast stop.command to enum argtype.
(do_finish): Cast stop.command to enum argtype.
(do_return, do_until): Ditto.
(print_instruction, set_gawk_output, set_prompt): Add casts to
some function parameters.
* eval.c (update_ERRNO_int): Use const char *.
* gawk.api.c (valtype2str): Return const char *.
(api_get_argument): Use awk_true instead of true in return statements.
(awk_value_to_node): Move declaration of tval to top of function.
(api_release): Cast a_cookie to NODE *.
* gawkapi.h (struct awk_input): Include argument types in
read_func pointer.
* interpret.h (r_interpret): Add cast to argument in call to
do_getline_redir.
* io.c (read_with_timeout): Change second param to void * from char *.
(redirect_string): Add casts to function call parameters.
(path_info): Use const char *.
(init_awkpath): Ditto.
* main.c (CONVFMT, locale_dir): Now const char *.
(do_flags): Init to DO_FLAG_NONE instead of zero.
* mfpr.c (get_rnd_mode): Add cast to return value.
(set_round_mode): Add cast to assignment of rndm.
(do_mpfr_func): Include argument types in type of second parameter.
* node.c (r_make_number): Remove declaration of strtod.
* profile.c (pp_push): Add cast in assignment to n->type. Use
const char * for `pre' at Op_func_call.
* re.c (check_bracket_exp): Add cast to return from memchr.
2021-01-07 Arnold D. Robbins <[email protected]>
* builtin.c (format_tree): Generalize handling of invalid
format modifiers. Add support for three more letters. Thanks to
Arkadiusz Drabczyk <[email protected]> for the report.
Unrelated:
* io.c (rsnullscan): Adjust loop test to get to end of string
when re match is null string. Thanks to Ed Morton
<[email protected]> for the report.
2020-12-26 Arnold D. Robbins <[email protected]>
* NEWS: Updated.
2020-12-20 Arnold D. Robbins <[email protected]>
Second steps fixing +inform, +nancy, for MPFR.
* builtin.c (format_nan_inf): Use mpfr_signbit instead of mpfr_sgn.
* mpfr.c (force_mpnum): Check for NaN and leading minus and if so
set the signbit with mpfr_setsign.
(mpg_force_number): Copy in code from f_force_number to check
properly for +inf, +nan.
2020-12-19 Arnold D. Robbins <[email protected]>
First steps fixing +inform, +nancy. Sigh.
* awk.h (is_ieee_magic_val): Add declaration.
* node.c (is_ieee_magic_val): Make extern, not static.
(r_force_number): Make the check smarter, catch -nan.
2020-11-02 Arnold D. Robbins <[email protected]>
Make gawk numeric comparisons act like C doubles.
MPFR differs from doubles w.r.t. NaN, not sure why yet.
* awk.h (scalar_cmp_t): New enum.
* builtin.c (format_nan_inf): Use mpfr_signbit, not mpfr_sgn.
* eval.c (cmp_doubles): New routine.
(cmp_scalars): Change type to bool, rework logic.
* interpret.h (r_interpret): Rework scalar comparisons.
* mpfr.c (mpg_cmp_as_numbers): New routine.
* node.c: Use <math.h>, not "math.h", minor comment edits.
2020-11-02 Arnold D. Robbins <[email protected]>
* re.c (make_regexp): Cast len parameter to int to avoid
compiler warnings.
2020-10-31 Arnold D. Robbins <[email protected]>
* re.c (make_regexp): When re_compile_pattern fails, use the
original text of the regexp in the error message. Thanks to Neil
R. Ormos <[email protected]> for the report.
2020-10-29 Arnold D. Robbins <[email protected]>
* eval.c (setup_frame): Handle the case of values from FUNCTAB.
Thanks to Denis Shirokov <[email protected]> for the report.
2020-10-12 Arnold D. Robbins <[email protected]>
* gawkapi.c (api_lintwarn): Fix comparison, should be to check
lintfunc, not lintwarn. Thanks to OLLIER Jean-François
<[email protected]>, reported 23 March, 2014.
2020-10-11 Arnold D. Robbins <[email protected]>
* re.c (make_regexp): Add {} to characters that cause rp->maybe_long
to be true.
* io.c (rsrescan): Update comment for step 4.
2020-09-21 Arnold D. Robbins <[email protected]>
* awk.h (enum redirect_flags): Add RED_NONE.
(redirect_flags_t): New typedef.
* io.c (redflags2str): Handle RED_NONE.
(check_duplicated_redirections): New function.
(redirect_string): Use new typedef. Call new function if do_lint
instead of using inline code.
(close_redir): Add error message for failure on close of two-way pipe.
2020-09-04 Arnold D. Robbins <[email protected]>
* awkgram.y [GRAMMAR]: Install arrays as Node_var_array. Improves
PROCINFO["identifiers"]. Thanks to [email protected]
for the report.
2020-08-25 Arnold D. Robbins <[email protected]>
* interpret.h (r_interpret): At Op_rule, check if in BEGINFILE. If so,
clear the record. Fixes an issue reported by Pat Rankin in May, 2011.
2020-08-24 Arnold D. Robbins <[email protected]>
* awkgram.y, builtin.c, command.y, debug.c, gawkapi.c,
io.c, node.c: Make all messages consistent: Remove final periods
from messages that had them.
* TODO: Updated.
2020-08-20 Arnold D. Robbins <[email protected]>
* awk.h (NODE): Move valref completely out of the union. Fixes
core dumps on old GCC on CentOS 7.
2020-08-13 Arnold D. Robbins <[email protected]>
Fix TIDYMEM / use of mtrace.
* configure.ac: Add mtrace to list of functions searched for.
* symbol.c (make_symbol): Set valref to 1. Allows the
release_all_vars function to work.
Unrelated:
* array.c (value_info): Spell ROUNDMODE correctly in output.
* mpfr.c (set_ROUNDMODE): Ditto.
2020-08-12 Arnold D. Robbins <[email protected]>
* awkgram.c, command.c: Regenerated with Bison 3.7.1.
* NEWS: Updated.
Unrelated:
* profile.c (pp_namespace): Always print a newline before the
@namespace, in case it comes after a comment. Thanks to J Naman
for the report.
* symbol.c (comp_symbol): Adjust comparison so that names in the
awk namespace come out first. Makes the order of functions in
pretty-printed output more sane. Thanks also to J Naman for
getting me to explore this issue.
2020-07-29 Arnold D. Robbins <[email protected]>
* custom.h (FLEXIBLE_ARRAY_MEMBER): Define to 1 for dfa.h.
2020-07-28 Arnold D. Robbins <[email protected]>
Eliminate 'iszero: redefined' warning from tcc.
* awk.h (is_zero): Renamed from `iszero'.
(boolval): Update usage.
* awkgram.y [GRAMMAR]: Ditto.
(negate_num): Ditto.
* debug.c (condition_triggered): Ditto.
* eval.c (set_LINT): Ditto.
2020-07-26 Arnold D. Robbins <[email protected]>
* awkgram.c, command.c: Regenerated with Bison 3.7.
* NEWS: Updated.
Unrelated:
* gawkapi.h (api_get_mpfr, api_get_mpz): Mark as obsolete.
2020-07-22 Arnold D. Robbins <[email protected]>
* Makefile.in: Regenerated.
2020-07-21 Arnold D. Robbins <[email protected]>
* configure.ac (AM_INIT_AUTOMAKE): Update to 1.16.
* ar-lib, compile, config.guess, config.rpath, config.sub,
depcomp, install-sh, missing, ylwrap: Moved to build-aux.
2020-07-20 gettextize <[email protected]>
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.20.2.
2020-07-19 Arnold D. Robbins <[email protected]>
* NEWS: Fix title on leading set of changes. Thanks to
Marcus <[email protected]> for the report.
Unrelated: Bump minor API version since semantics have changed.
* gawkapi.h (api_minor_version): Increase to 1.
Unrelated: Fix a spelling error in a comment.
* mpfr.c (force_mpnum): Fix a typo.
2020-07-17 Arnold D. Robbins <[email protected]>
* gawkapi.h (gawk_api_minor_version): Increase, since the
MPFR/MPZ stuff changed some. Remains source and binary
compatible, but semantics are different.
2020-07-15 Arnold D. Robbins <[email protected]>
Finish cleaning up MPFR valgrind issues.
* awk.h (struct block_header): Remove MPFR and GMP enums.
* gawkapi.c (getmpfr, freempfr, getmpz, freempz): Removed
(api_get_mpfr): Use emalloc instead of getmpfr.
(api_get_mpz): Use emalloc instead of getmpz.
* gawkapi.h: Add comments on MPFR and MPZ
(make_number_mpfr, make_number_mpz): Update comments.
* node.c (nextfree): Remove mpfr and mpz entries.
* NEWS: Updated.
Unrelated:
* config.guess, config.sub: Updated from GNULIB.
2020-07-13 Arnold D. Robbins <[email protected]>
* mpfr.c (mpg_interpret): Small speedup. If do_itrace and opcode is
not one that's handled, return early.
2020-07-12 Arnold D. Robbins <[email protected]>
* mpfr.c (mpg_interpret): Make the instruction tracing more sane.
Fix the testext test for MPFR.
* gawkapi.c (awk_value_to_node): Use correct code to copy
MPFR/MPN numbers and don't free the original values.
* interpret.h (r_interpret): At Op_ext_builtin, separate out calls
to the external function and awk_value_to_node, for ease in a
debugger.
* NEWS: Updated.
2020-07-10 Arnold D. Robbins <[email protected]>
Fix printf issues. Thanks to Michal Jaegermann for the report.
* cint_array.c (cint_dump): Fix printf formats.
* debug.c (print_symbol): Ditto.
* mpfr.c (mpg_interpret): Ditto.
2020-07-09 Arnold D. Robbins <[email protected]>
Fix dbugeval2 test for MPFR.
* debug.c (do_eval): Preserve DO_MPFR flag in do_flags before
parsing the string to be evaluated.
Fix indirect call tests for MPFR:
* awkgram.y (lookup_builtin): Only return the MPFR builtin
function if the pointer is not NULL.
Unrelated:
* config.guess, config.sub: Updated from GNULIB.
2020-07-08 Arnold D. Robbins <[email protected]>
* str_array.c (str_lookup): If a pure number, copy to a string. Fixes
the printfchar test for MPFR.
Fix typedregex2 and typedregex3 tests for MPFR:
* mpfr.c (mpg_zero): No longer static inline.
(force_mpnum): Handle the case of a strongly typed regex.
(mpg_interpret): Add tracing for do_itrace.
* awk.h (mpg_zero): Add declaration.
* node.c (make_typed_regex): Init to zero for MPFR via mpg_zero.
2020-07-07 Arnold D. Robbins <[email protected]>
* awk.h: Turn all the flag defines into enums. GDB can then show
the bit maps directly.
Unrelated: Fix another MPFR bug, reported by Hyunho Cho
* mpfr.c (force_mpnum): Restore the character at the end of
the string if only saw + or -.
2020-07-07 Andrew J. Schorr <[email protected]>
* node.c (r_dupnode): Sanitize the code, particularly for MPFR.
2020-07-05 Arnold D. Robbins <[email protected]>
Bug fixes in MPFR, reported by Hyunho Cho<[email protected]>.
* node.c (r_dupnode): Set strndmode and also set stlen of new
string. (How did that one get by us for so long?)
* mpfr.c (force_mpnum): Check for a + or - sign with nothing following it.
Unrelated. Make do_itrace a real variable so that it's easier to
change the value from a debugger.
* awk.h (do_itrace): Declare.
(DO_ITRACE, do_itrace): Remove macros.
* main.c (do_itrace): Define.
(parse_args): Set do_itrace.
2020-07-03 Arnold D. Robbins <[email protected]>
Fix a double free error with -M. Thanks to
"NIDE, Naoyuki" <[email protected]> for the report.
* field.c (clear_mpfr): New macro, clears MPFR and NUMCUR bits.
(reset_record): Use it on the newly copied field values.
(purge_record): Add introductory comment since we're in the file.
2020-07-01 Arnold D. Robbins <[email protected]>
* eval.c (posix_compare): Rewrite contributed by
Michael Builov <[email protected]>.
Unrelated:
* awk.h: New option: do_itrace.
* interpret.h (r_interpret): Print instruction trace if enabled.
* main.c (optab): New option: -I/--trace.
(parse_args): Update optlist and the code to handle it.
* NEWS: Updated.
2020-06-29 Arnold D. Robbins <[email protected]>
* debug.c: Cleanup messages. Error messages start with lower
case letter.
* TODO: Updated.
2020-06-14 Arnold D. Robbins <[email protected]>
Disallow SYMTAB and FUNCTAB as destination arguments to builtin
functions that clear arrays:
* awk.h (check_symtab_functab): Add declaration.
* array.c (asort_actual): Call it in check for second argument.
* builtin.c (check_symtab_functab): New function.
(do_match): Call it in check for third argument.
* field.c (do_patsplit, do_split): Call it in checks for fourth and
second arguments.
2020-06-12 Arnold D. Robbins <[email protected]>
* array.c (asort_actual): If SYMTAB or FUNCTAB is the second argument,
fatal out. If they are the first argument, make it work when a
second argument is supplied.
* TODO, NEWS: Updated.
2020-06-10 Arnold D. Robbins <[email protected]>
More miscellaneous fixes from Michael Builov <[email protected]>.
* node.c (r_unref): Handle GAWKDEBUG same as in awk.h:unref.
(parse_escape): isxdigit/isdigit/isupper called with possible negative
int: fixed. Dead code under "if (do_lint && j > 2)" eliminated,
j cannot be > 2.
(init_btowc_cache): Also initialize wide-char at index 255.
And so that `make check' passes with GAWKDEBUG defined:
* msg.c (err): Remove abort() call if fatal. Didn't really do
anything special for us.
2020-06-10 Arnold D. Robbins <[email protected]>
* awkgram.c, command.c: Regenerated with bison 3.6.3.
* NEWS: Updated.
2020-06-10 Andrew J. Schorr <[email protected]>
Convert exec_count from long long to unsigned long long.
* awk.h (INSTRUCTION): Change ldl type from long long to unsigned
long long.
* debug.c (print_instruction): Fix printf format for exec_count.
* profile.c (indent): The argument is now an unsigned long long,
and fix the printf format to match.
2020-06-10 Arnold D. Robbins <[email protected]>
Miscellaneous fixes from Michael Builov <[email protected]>.
* awkgram.y (rule_block): Fix size declaration
(parse_program): Adjust memset call.
(get_comment): Check for end of file before checking for space.
* io.c (gawk_popen): Move os_close_on_exec call inside #endif.
* builtin.c (do_bindtextdomain): Don't pass NULL to strlen.
* debug.c (set_breakpoint): Don't dereference NULL pointer in D_func.
(serialize_list): Get the buffer management right to avoid overrun.
2020-06-10 Arnold D. Robbins <[email protected]>
Thanks to Andrew Schorr for suggesting a better way to
handle exec_count being a long long.
* awk.h (INSTRUCTION): Make new ldl member be the long long.
(exec_count): Is now ldl.
* profile.c (pprint): Fix printf of exec_count.
2020-06-09 Arnold D. Robbins <[email protected]>
* awkgram.y (tokexpand): Use size_t instead of int for size of
buffer.
2020-06-08 Arnold D. Robbins <[email protected]>
* awkgram.y: Fix `print $"2"' case. Thanks to Ed Morton
<[email protected]> for the report.
Unrelated:
* awk.h (INSTRUCTION): Make dl a long long for profiling
counts on 32 bit systems. Thanks to Peter Lindgren
for the report.
* profile.c (indent): Take a long long parameter and fix
the printf format.
2020-06-05 Arnold D. Robbins <[email protected]>
* awkgram.y: Allow @/foo/ as return expression in a function.
Oops.
2020-06-05 Arnold D. Robbins <[email protected]>
* configure.ac: Add call to AM_PROG_AR for use in
cross compiles. Thanks to Sergei Trofimovich <[email protected]>
for the patch.
2020-05-15 Arnold D. Robbins <[email protected]>
* config.guess, config.sub: Updated from GNULIB.
2020-05-14 Arnold D. Robbins <[email protected]>
* awkgram.c, command.c: Rebuild with Bison 3.6.
* NEWS: Updated.
2020-05-06 Arnold D. Robbins <[email protected]>
Add lint check for string + string. It's not concatenation
in awk, but is in most other languages. Thanks to Roland Illig
<[email protected]> for the suggestion.
* awk.h (Op_lint_plus): New opcode.
* awkgram.y (mk_binary): Add it into the list in the right place
if do_lint.
* eval.c (optypes): Add case for Op_lint_plus.
* interpret.h (r_interpret): Ditto.
2020-04-14 Arnold D. Robbins <[email protected]>
* 5.1.0: Release tar ball made.
2020-04-10 Arnold D. Robbins <[email protected]>
* field.c (save_FPAT): New global variable.
(get_field): Check if using FPAT or not in order to pass in
the right variables to parse_field function. Fixes bug in
delayed field parsing when using FPAT. Thanks to
luciole75w <[email protected]> for the bug report.
(set_FPAT): Use global save_FPAT instead of local save_fpat.
Unrelated:
* awkgram.c, command.c: Rebuild with Bison 3.5.4.
* NEWS: Updated.
Unrelated:
* awk.h (do_lint_extensions): Define to zero if NO_LINT.
2020-04-02 Arnold D. Robbins <[email protected]>
* field.c (re_parse_field): If default parsing and trailing
whitespace, don't set a null field at the end. Thanks to
Ed Morton <[email protected]> for the report.
2020-03-18 Arnold D. Robbins <[email protected]>
* TODO: Add more stuff.
2020-03-15 Arnold D. Robbins <[email protected]>
* Makefile.am (zos-diffout): New target.
* awkgram.y, command.y: Upgrade to Bison 3.5.3.
* NEWS: Updated.
2020-03-11 Arnold D. Robbins <[email protected]>
* main.c: Further message update. Thanks again to
Roland Illig <[email protected]>.
2020-03-09 Andrew J. Schorr <[email protected]>
* array.c (sort_up_value_string): If either arg is not a Node_val,
call out to sort_up_value_type instead. If cmp_strings returns zero,
fall back to sort_up_index_string as a tie-breaker.
(sort_up_value_number): If either arg is not a Node_val, call out to
sort_up_value_type instead. If cmp_strings returns zero, fall back
to sort_up_index_string as a tie-breaker.
(do_sort_up_value_type): Renamed from sort_up_value_type with one
change: if both arguments have type Node_var, we compare the
var_value NODEs instead.
(sort_up_value_type): New wrapper function around do_sort_up_value_type
to fall back to sort_up_index_string as a tie-breaker.
2020-03-09 Arnold D. Robbins <[email protected]>
* array.c, awk.h, awkgram.y, builtin.c, command.y, debug.c,
ext.c, int_array.c, io.c, main.c, symbol.c: Messages refined
based on suggestions from Roland Illig <[email protected]>.
2020-03-06 Jannick <[email protected]>
* Makefile.am: Replace AM_MAKEFLAGS with AM_CFLAGS and AM_LDFLAGS.
Put pc/Makefile.tst into BUILT_SOURCES, instead of in dist-hook.
Add $(srcdir) to rules for the yacc files. Use AM_LDFLAGS in
the efence rule.
* configure.ac: Use GAWK_CANONICAL_HOST instead of AC_CANONICAL_HOST;
this supplies MSYS2 support. Remove use of EXEEXT.
2020-03-04 Arnold D. Robbins <[email protected]>
* NEWS: Updated.
2020-02-13 John E. Malmberg <[email protected]>
* custom.h: OpenVMS needs _REGEX_INCLUDE_LIMITS_H defined.
2020-02-09 Arnold D. Robbins <[email protected]>
* awkgram.y: Add lint check for assignment in condition to
if and for statements. Thanks to Jannick <[email protected]>
for the suggestion.
* debug.c (do_eval): Remove @eval from the symbol table if there
was a syntax error in the statement being evaluated. Thanks again
to Jannick, for the report.
2020-02-04 John E. Malmberg <[email protected]>
* custom.h: Fix OpenVMS SIZE_MAX value.
2020-02-01 Arnold D. Robbins <[email protected]>
* awk.h, dfa.c: Move include of mbsupport.h to ...
* custom.h: ... here.
* configure.ac: Add check for isblank.
2020-01-27 Arnold D. Robbins <[email protected]>
* custom.h: Fix non-VMS compilation.
2020-01-26 John E. Malmberg <[email protected]>
* custom.h: Additional OpenVMS typedefs needed.