Repository navigation
Expand file tree
/
Copy pathChangeLog
More file actions
5051 lines (3513 loc) · 175 KB
/
Copy pathChangeLog
File metadata and controls
5051 lines (3513 loc) · 175 KB
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
2026-11-29 Arnold D. Robbins <arnold@skeeve.com>
* field.c (do_split): Initialize parseit to avoid clang warning.
* printf.c (format_integer_digits): Add casts to avoid
clang warning.
2026-11-27 Arnold D. Robbins <arnold@skeeve.com>
* printf.c (format_integer_digits): Simplify the out of range
check code.
2026-11-25 Arnold D. Robbins <arnold@skeeve.com>
* printf.c (format_integer_digits): Handle the out of range
test for %x/%o/%u in a more clear fashion that doesn't cause
undefined behavior to trip up clang 25.3.1. Thanks to
Khem Raj <raj.khem@gmail.com> for the report.
Unrelated:
* printf.c (add_thousands): Don't add a comma if there's more
in the string bug the next character isn't a digit. Happens
with negative numbers. Thanks to Lưu Vĩnh Phúc <phuclv90@gmail.com>
for the report.
2026-11-22 Arnold D. Robbins <arnold@skeeve.com>
Get serious about dynamic memory. All allocations
zero out the allocated memory.
* awk.h (ezalloc_real): Renamed to emalloc_real.
Old emalloc_real removed.
(ezalloc): Macro removed.
* All files: Replace ezalloc with emalloc.
Remove calls to memset to zero after allocations as
that's now done by emalloc and by getblock.
2026-11-20 Arnold D. Robbins <arnold@skeeve.com>
* debug.c: Use ezalloc() everywhere. Fixes possible memory
issues. Thanks to Nelson Beebe and Address Sanitzer.
2026-11-18 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Rearrange members of some enums and unions to
make a little more sense. Remains source compatible.
(flatten_array): Move macro in gawk 5 compatibility section.
Unrelated: re.c, remove some unused variables.
* re.c (make_regexp): Remove `first'.
(research): Remove `ret' and `try_backref'.
2026-11-18 Arnold D. Robbins <arnold@skeeve.com>
Add optional fifth array argument to gensub().
Some code based on contributions from Andrew Schorr.
* awkgram.y (tokentab): gensub() can have 4 or 5 arguments.
(snode): Handle a fifth argument.
* builtin.c (do_sub): For gensub() handle the optional
fifth argument, filling in "nsub" and "nmatch" elements.
* NEWS: Updated.
2026-11-16 Arnold D. Robbins <arnold@skeeve.com>
Now that regex is gone, remove the casetable.
* array.c (cmp_strings): Use tolower() for IGNORECASE 8-bit check.
* awk.h (casetable, load_casetable): Remove declarations.
* builtin.c (do_index): Use tolower() for IGNORECASE 8-bit check.
* eval.c (casetable, load_casetable): Remove implementations.
(cmp_nodes): Use tolower() for IGNORECASE 8-bit check.
* main.c (main): Remove call to load_casetable().
2026-11-16 Arnold D. Robbins <arnold@skeeve.com>
* 5.4.2: Release tar ball made.
2026-11-15 Arnold D. Robbins <arnold@skeeve.com>
* README, NEWS: Updated before release.
2026-11-08 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: More updates.
2026-11-04 Arnold D. Robbins <arnold@skeeve.com>
* re.c (using_utf8): Check that nl_langinfo() doesn't return
NULL. Backported from master.
Unrelated. Fix problems with indirect calls. Thanks to
sunlv wang <wangsunlv@iscas.ac.cn> for the report.
* interpret.h (r_interpret): Op_push, UPREF() and Node_var_new.
* builtin.c (do_dcgettext, do_dcngettext): Check the number
of arguments outside of the ifdefs for HAVE_NLS.
2026-11-02 Arnold D. Robbins <arnold@skeeve.com>
Remove the regex and dfa matchers from gawk.
* NEWS: Updated.
* awk.h (struct Regexp): Simplified.
Removed include of dfa.h and regex.h.
(re_restart, re_reend, re_subpatstart, re_subpatend,
re_numsubpats): Removed declarations.
(RESTART, REEND, SUBPATSTART, SUBPATEND,
NUMSUBPATS): Macros are once again inline code.
(use_gnu_matchers): Removed.
(make_regexp): Removed `dfa' boolean parameter. All calls adjusted.
* awkgram.y [GRAMMAR]: Remove lint check for /*...*/ regexp.
(make_regnode): Adjust call to make_regexp().
* builtin.c (do_sub): Adjust call to research().
* field.c (chose_fs_function): Adjust calls to make_regexp().
(set_fpat_function): Ditto.
* io.c (set_RS): Ditto.
* main.c (use_gnu_matchers): Remove definition.
(main): Remove check for GAWK_GNU_MATCHERS env var.
(parse_args): Remove 'G' option and case.
* re.c (syn): Provide an enum instead of the old regex type.
(localeinfo): Removed, along with include of localeinfo.h.
(make_regexp): Removed `dfa' boolean parameter. Don't check
for GAWK_NO_DFA_any more. Remove all code associated with
regex and dfa.
(research): Remove all code associated with regex and dfa.
(refree): Ditto.
(dfaerror, dfawarn): Removed.
(re_cache_get): Adjust calls to make_regexp().
(re_setup): Simplified to just set syn based on command line options.
(reflags2str): Remove stuff for regex/dfa.
(re_restart, re_reend, re_subpatstart, re_subpatend,
re_numsubpats): Removed.
(minrxcomplags2str): Removed, it was redundant.
2026-11-01 Arnold D. Robbins <arnold@skeeve.com>
* main.c (copyleft): Use https in the license URL and enclose
it in angle brackets. Thanks to Antonio Columbo.
2026-10-25 Paul Eggert <eggert@cs.ucla.edu>
* eval.c (calc_exp): Handle an exponent of LONG_MIN (-2^63).
Thanks to Anton Khirnov <anton@khirnov.net> for the report.
2026-10-20 Arnold D. Robbins <arnold@skeeve.com>
Memory management cleanups:
* awk.h (efree): Removed the macro.
(boolval): Add declaration, remove body.
* awkmem.c (free_bc_internal): Don't fatal out on unknown opcodes;
for those it means there's nothing special to do.
* node.c (boolval): Moved to here.
* Global: Change efree() to free().
* Makefile.am (base_sources): Add awkmem.c.
* array.c, builtin.c, eval.c, interpret.h, io.c: Replace manual
saving and restoration of last character in a string with calls
to str_terminate() and str_restore().
More cleanups:
* array.c (do_delete): Remove MEMDEBUG ifdefs; just always
clear the node.
* awk.h: Clean up MEMDEBUG stuff.
(getblock): Always call r_getblock().
(freeblock): Always call r_freeblock().
(getnode): Don't zero out the node, that's moved into r_getblock().
(more_blocks): Remove declaration.
(freenode): Simplify.
* node.c (nextfree, r_getblock, r_freeblock, more_blocks): Moved
into awkmem.c.
* awkmem.c (nextfree, r_getblock, r_freeblock, more_blocks): Moved
to here. Move debug versions here, make them functions. r_getblock()
zeroes out the memory. more_blocks() is now static here.
Move freeing of mpfr data into r_freeblock() so that awk.h is clean.
* builtin.c (do_typeof): Clean up MEMDEBUG. The `active' member
is always there now, just use it.
2026-10-18 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
* gawkapi.h: Fix a warning message.
2026-10-16 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Add compatibility macros and typedef if
API_COMPAT_GAWK_5 is defined.
2026-10-15 Arnold D. Robbins <arnold@skeeve.com>
Start cleanups of the API.
* gawkapi.h: Remove awk_ext_id_t type, and all uses thereof.
This affects all of the prototypes and macros, but is only visible
in user code in the warning(), fatal(), etc. functions, and in
the declaration of variables of awk_ext_id_t type.
* gawkapi.c: Ditto.
* ext.c (load_ext): Ditto.
* NEWS: Updated.
2026-10-08 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-10-08 Arnold D. Robbins <arnold@skeeve.com>
* debug.c (CHECK_PROG_RUNNING): Don't use __FILE__ so that
test output works on different systems. Mainly for z/OS.
2026-10-07 Arnold D. Robbins <arnold@skeeve.com>
Deprecate I18N functionality.
* builtin.c (do_dcgettext, do_dcngettext, do_bindtextdomain):
Add warning messages that these functions are deprecated.
* main.c (parse_args): Add warning message for --gen-pot.
2026-10-04 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-10-01 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c, node.c: Change spelling of `regex' to `regexp' in
various messages. Thanks to Antonio Colombo for the report.
2026-09-30 Arnold D. Robbins <arnold@skeeve.com>
Deprecate MPFR.
* NEWS: Add a banner at the top about -M being deprecated.
* main.c (parse_args): Print a warning message for -M. If
GAWK_NO_MPFR_WARN exists in the environment, don't print it.
2026-09-29 Arnold D. Robbins <arnold@skeeve.com>
All of the following were reported by Daniel Koh Ji Yang
<Daniel.Koh@mbzuai.ac.ae>. We thank him.
* builtin.c (do_dcgettext, do_bindtextdomain): Rearrange the
code slightly so that there are no references into freed
memory.
Unrelated:
* builtin.c (call_sub): Make sure the regex isn't a plain
regex constant, and that it compiles properly.
(call_sub, call_match, call_split_func): Make sure the regex
compiles properly.
* awkgram.y (make_regnode): Check that exp->stptr isn't NULL.
Unrelated:
* interpret.h (Op_push): For a paramater that's a Node_elem_new,
make sure valref is > 1 before derefing. See elemnew7.awk
test case.
Unrelated:
* debug.c (do_commands): Check that arg is not NULL. See
dbugbadcmd.awk test.
(execute_commands): Use a local to walk the list in case the
command deletes the breakpoint. See dbugbreak test case.
(next_command): Check ret before checking if to delete a temporary
breakpoint, as it might already have been deleted. Thanks to
valgrind for the catch.
2026-09-29 Henner Zeller <henner.zeller+gawk@gmail.com>
* main.c (load_environ): Avoid writing into environment strings.
Apparently some loaders add environment variables to read-only
segments.
2026-09-24 Arnold D. Robbins <arnold@skeeve.com>
* AUTHORS: Add Mike Haertel.
2026-09-23 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.c (api_create_value): Allow AWK_BOOL also.
Unrelated: Don't warn multiple times about the same
unreferenced variable. Also, remove the warning about
// looking like a C++ comment. Thanks to Kpop 2GM
<jason.cy.kwan@gmail.com> for the report.
* awk.h [UNINIT_WARNED]: New flag.
* awkgram.y (grammar): For REGEXP, remove warning about C++ comment.
* eval.c (flags2str): Add an entry for UNINIT_WARNED.
(r_get_lhs): Add check for flag being absent before issuing warning.
Set the flag if it was clear.
* interpret.h (r_interpret): Op_push* cases. Ditto.
Unrelated:
* re.c (using_utf8): Use nl_langinfo(CODESET) which is POSIX
instead of the localeinfo struct, which isn't.
2026-09-20 Arnold D. Robbins <arnold@skeeve.com>
* bootstrap.sh: doc/notes.texi is now doc/gawknotes.texi. Ooops.
Thanks to Daniel Richard G. for pointing out the problem.
2026-09-18 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-09-14 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y: Adjust grammar to not print break/continue not allowed
outside of a loop message twice.
* builtin.c (do_exp): Set ERRNO if there's an error.
2026-09-07 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Remove setting of ZOS_FAIL. The test
infrastructure now has *.ok-zos files to handle z/OS.
2026-09-03 Arnold D. Robbins <arnold@skeeve.com>
Pull in some changes from C++ branch and also some cleanups.
* array.c (do_delete): Add a case to NODETYPE for MEMDEBUG.
* awk.h: Remove comment about kludgey layout of NODE; we
fixed that already.
* awkgram.y: Remove explicit declaration of fmod().
* eval.c (struct optypetab): Make members const.
* gawkapi.c (awk_value_to_node): Add casts in calls to
mpfr_clear() and mpz_clear().
* str_array.c (fnv1a_hash_string): Make `ret' unsigned long
and remove `register' keyword.
2026-09-02 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-08-27 Arnold D. Robbins <arnold@skeeve.com>
* re.c (reflags2str): Add table and logic for MinRX flags.
2026-08-26 Arnold D. Robbins <arnold@skeeve.com>
* field.c (choose_fs_function): FS = "" doesn't work if do_posix
but does (now) if do_traditional, since BWK awk supports it.
2026-08-24 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-08-11 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (NODE): Move the struct _value to be last in the union so
that it's easy to see in GDB. Change `sub2' to `sub' everywhere.
* profile.c: Change `sub2' to `sub'.
2026-08-10 Arnold D. Robbins <arnold@skeeve.com>
* interpret.h (r_interpret): Op_subscript. If we just went
through SYMTAB and got a Node_var_new, AND the next thing we're
about to do is typeof() or isarray(), don't add a var_value
and use it. Otherwise, as before. Thanks to Jason C. Kwan
for the report.
2026-08-08 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-08-03 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (struct _value): Make some elements smaller and rearrange
them so that the total size goes down. Thanks to Andrew Schorr
for the ideas.
2026-08-03 Arnold D. Robbins <arnold@skeeve.com>
Shrink the NODE further by moving the MPFR and GMP data
structures out into a separately allocated struct. This way
the space penalty is only paid if -M is actually used.
This makes the NODE about the same size as it was before.
* awk.h (struct _mpfr_data): New struct.
(struct _value): Move strndmode into MPFR ifdef. Use a pointer to
a struct _mpfr_data instead of the actual data.
(mpfr_data, strndmode, mpg_numbr, mpg_i): Update macros as
appropriate.
(getnode): Set new node to zero.
(freenode): Free mpfr_data and set the pointer to NULL.
(make_number_node): Allocate the mpfr_data if do_mpfr.
* builtin.c (do_dump_node): Revise as needed.
* debug.c (execute_code, parse_condition): Preserve the DO_MPFR flag.
* eval.c (elem_new_to_scalar): Free mpfr_data and set pointer to NULL.
* main.c (main): Init the mpfr_data for Nnull_string.
* mpfr.c (mpg_zero, force_mpnum): Init the mpfr_data if needed.
(mpfr_unset): Free the mpfr_data and set the pointer to NULL.
* node.c (r_dupnode): If do_mpfr, init the data for the new node
and copy the values.
2026-07-29 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (struct _value): Move Node_elem_new fields to here.
(struct _func): New member in sub2. Fix macros.
(struct _list): New member in sub2. Fix macros.
(struct exp_node): Remove the original union.
* symbol.c (remove_params): Use p->param instead of p->vname.
2026-07-28 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (struct _value): Add typed_re, fix macro.
(enum reflagvals): Move above struct exp_node.
(struct _regex): New member in sub2. Fix macros.
(struct _arrayfor): New member in sub2. Fix macros.
(struct _var): New member in sub2. Fix macros.
(struct _frame): New member in sub2. Fix macros.
(struct _array): Put Node_elem_new members here. Everything breaks
if we try to make a separate struct as part of the union.
(struct _pretty_printer): New member in sub2.
* profile.c: Fix pp_* macros to use new union member.
(pp_list): Remove casts on assignments of comments.
2026-07-28 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_dump_node): Add sizeof(NODE) to the output.
2026-07-28 Arnold D. Robbins <arnold@skeeve.com>
Begin the decades-overdue refactoring of the NODE structure.
Start by:
1. Having shared items (such as vname) be standalone fields.
2. Gathering the fields for different types into separate
structs, e.g., value, array, etc.
3. Using fields names in the struct that match the names for macros
by leveraging Standard C's rule that you can use a macro name in its
body without causing recursive macro invocation.
4. Placing the new structs in a union at the end of the NODE so that
we can do one type of struct at a time. Eventually, remove the old
mega-union.
* awk.h (struct array_dump): New struct. Replaces Node_dump_array,
which is removed from enum nodvals.
(adumpfunc): New typedef for use in array vtables.
(array_funcs_t): Updated.
(struct_exp_node): Add vname and new union, temporarily named sub2.
(struct _value, _array): New structs, members of sub2, for Node_val
and Node_var_array, respectively.
(assoc_dump): Change second parameter to struct array_dump *.
(assoc_info): Same for third parameter.
[Macros]: Adjust macros as needed.
* array.c (null_dump): Change second parameter to struct array_dump *.
(assoc_dump): Change second parameter to struct array_dump *.
(assoc_info): Same for third parameter.
(do_adump): Make ndump be of type struct array_dump.
* cint_array.c (cint_dump): Change second parameter to struct array_dump *.
(tree_info, leaf_info): Ditto.
* eval.c (nodetypes): Remove Node_dump_array from the list.
* int_array.c (int_dump): Change second parameter to struct array_dump *.
* str_array.c (str_dump): Change second parameter to struct array_dump *.
* TODO: Updated.
2026-07-23 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Don't check anymore for st_blksize in struct stat.
Just assume it's there.
2026-07-22 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-07-20 Arnold D. Robbins <arnold@skeeve.com>
* array.c (value_info): Don't use n->stfmt if it isn't set.
Thanks to Andrew Schorr for the report.
2026-07-14 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_dump_node): Add the size of each object to
the printout.
Unrelated: Make things works when built on systems without
the GMP and MPFR libraries. Thanks to Thomas Trepl <ttrepl@yahoo.de>
and Bruce Dubbs <bdubbs@linuxfromscratch.org> for the reports.
* awk.h (struct exp_node): Add alignment padding when we don't
have MPFR. This is a hack, pending a total refactoring of
the NODE structure.
2026-07-12 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated w.r.t. there being fewer m4 files.
2026-07-08 Arnold D. Robbins <arnold@skeeve.com>
* 5.4.1: Release tar ball made.
2026-07-08 Arnold D. Robbins <arnold@skeeve.com>
* Checklist: Revisions.
* configure.ac: Set version to 5.4.1.
2026-07-06 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (struct exp_node): For non-MPFR, keep alignment the same,
especially on 32-bit systems, by adding an extra int member.
Without this, gcc -m32 without the MFPR libraries causes several
failures in the test suite. First seen on z/OS.
2026-07-03 Arnold D. Robbins <arnold@skeeve.com>
* array.c, cint_array.c, cmd.h, floatcomp.c, floatmagic.h,
gawkapi.c, int_array.c, msg.c, str_array.c: Update copyright year.
2026-07-02 Arnold D. Robbins <arnold@skeeve.com>
* array.c (assoc_list): Move unsorted to the top of the list
of options so that it will be found first, since it's
the usual case.
* interpret.h (r_interpret): Don't do a dupnode of Nnull_string
when it's about to be upref'ed. Happened in two places.
Unrelated:
* NEWS: Updated. No LLM code allowed.
2026-07-01 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac (gt_LC_MESSAGES): Removed.
2026-06-30 Arnold D. Robbins <arnold@skeeve.com>
* str_array.c (str_lookup): Check for USER_INPUT too when
freezing an index into a string. Thanks to Kpop 2GM
<jason.cy.kwan@gmail.com> for the report.
2026-06-29 Arnold D. Robbins <arnold@skeeve.com>
* printf.c (format_out_of_range): Handle inf/nan correctly
even if do_posix. Thanks to Kpop 2GM <jason.cy.kwan@gmail.com>
for the report.
2026-06-28 Arnold D. Robbins <arnold@skeeve.com>
Assume we have stdbool.h.
* awk.h: Include <stdbool.h>.
* configure.ac (gl_C_BOOL): Remove.
* custom.h: VMS stuff. Assume we have stdbool.h.
Unrelated:
* configure.ac (AM_LANGINFO_CODESET): Remove.
2026-06-28 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated: UDP support is now gone.
* io.c (inetfile): Remove support for UDP.
2026-06-25 Arnold D. Robbins <arnold@skeeve.com>
* TODO: Updated.
* gawkapi.h, gawkapi.c: Remove do_sandbox API variable, as it
would always be false. (Duh.)
* main.c (parse_args): Issue a deprecation warning message
for -S/--sandbox.
2026-06-24 Arnold D. Robbins <arnold@skeeve.com>
* node.c (str2wstr): Check gawk_mb_cur_max first. If it's one,
just use the character value. The readall and testext tests
were failing. Thanks to Tim Rice <trice@posteo.net>
for the report.
2026-06-24 Arnold D. Robbins <arnold@skeeve.com>
Make string formatting smarter by tracking whether it was OFMT
or CONVFMT that was last used to create a string value.
Thanks to Stephane CHAZELAS <stephane@chazelas.org>
for the report.
* awk.h: New flags: CONVFMT_FMT and OFMT_FMT.
(format_val): Function now takes an additional argument.
(r_format_val): Function now takes an additional argument.
(force_string_fmt): Function now takes an additional argument, the
flag. Adjust logic to check which one was used.
(force_string, force_string_ofmt): Adjust calls.
* eval.c (flags2str): Add new flags to the array of flags.
* mpfr.c (mpg_format_val): Function now takes an additional argument.
Adjust the logic to set the flags.
* node.c (format_val): Function now takes an additional argument.
(r_format_val): Function now takes an additional argument.
Adjust the logic to set the flags.
Unrelated:
* NEWS: Updated.
2026-06-24 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_print_rec): Use force_string_ofmt() when
printing $0. Thanks to Stephane CHAZELAS <stephane@chazelas.org>
for the report.
2026-06-22 Arnold D. Robbins <arnold@skeeve.com>
* field.c (get_field): Add special case handling when $0
has been assigned a numeric value. See test/assignnumfield3.awk
Thanks to Stephane CHAZELAS <stephane@chazelas.org> for the
report and discussion. The full thread can be found starting at
https://lists.gnu.org/archive/html/bug-gawk/2026-06/msg00001.html.
2026-06-21 Arnold D. Robbins <arnold@skeeve.com>
* main.c (cmdline_fs): Don't treat -Ft as -F\t anymore.
2026-06-19 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (elem_new_to_scalar): Set the type to Node_var *before*
unrefing the value. See test case mdim9.awk. Thanks to Andrew
Schorr for the report.
2026-06-15 Arnold D. Robbins <arnold@skeeve.com>
Thoroughly fix lint of plus on two strings with Op_elem_new.
* awk.h (OPCODE): Remove Op_lint_plus.
* awkgram.y (isnoeffect): Ditto.
(mk_binary): Just do Op_plus; lint check moved to interpret.h.
* eval.c (optypes): Remove Op_lint_plus.
* interpret.h (r_interpret): Remove Op_lint_plus case. Add lint
check to Op_plus case, rearranging code a bit.
* mpfr.c (mpg_interpret):. Add lint check to Op_plus case.
* profile.c (pprint): Remove Op_lint_plus.
2026-06-14 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (fmt_ok): Don't complain if no width or precision. Thanks
to Stephane Chazelas <stephane@chazelas.org> for the report.
* interpret.h (r_interpret): For Op_lint_plus, call
elem_new_to_scalar() on the values. Thanks to Hermann Peifer
for the report.
2026-05-26 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (mk_binary): Keep Doug McIlroy happy. Make division
by zero a lint warning. Applies to division and modulus.
* NEWS: Updated.
2026-05-25 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (mk_binary): Clean up code for when not optimizing.
Motivated by a bug report from Douglas McIlroy
<douglas.mcilroy@dartmouth.edu>.
(GRAMMAR): Add an additional lint check for plain print in a
BEGIN or END rule for when not optimizing. Thanks to the test
suite and GAWK_TEST_ARGS=-s.
2026-05-11 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_exp): Issue warning for ERANGE only if the
result is not zero. Thanks to joerg van den hoff
<veedeehjay@gmail.com> for the report.
2026-05-07 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (fmt_index): If OFMT or CONVFMT value is bad, always
warn. Using something like %sf for CONVFMT causes a core dump
due to infinite recursion, but mawk and nawk also fail this way.
It's a user error, we should not correct the value for them but
instead have them fix their code. Thanks to Michael D. Setzer II
<mikes@guam.net> for the report.
2026-04-28 Arnold D. Robbins <arnold@skeeve.com>
* str_array.c (STR_CHAIN_MAX): Document the change in size
back to 10 from 2025-02-16.
2026-04-27 Arnold D. Robbins <arnold@skeeve.com>
* array.c, builtin.c, cint_array.c, debug.c, field.c, int_array.c,
io.c, main.c: Remove casts to double in all calls to make_number().
There's a prototype in scope, the casts aren't needed.
2026-04-25 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-04-16 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
* main.c (usage): Make the text more generic so that I don't
have to keep changing test/badargs.ok upon every beta or
real release.
2026-04-15 Arnold D. Robbins <arnold@skeeve.com>
Remove intdiv0() code.
* configure.ac: Remove --enable-builtin-intdiv0 option.
* awkgram.y (tokentab): Remove entry for intdiv0.
(snode): Remove related code.
* builtin.c (do_intdiv): Removed.
* mpfr.c (do_mpfr_intdiv): Removed.
* NEWS: Updated.
2026-04-15 Arnold D. Robbins <arnold@skeeve.com>
* TODO: Updated.
2026-04-11 Arnold D. Robbins <arnold@skeeve.com>
* interpret.h (r_interpret): For Op_unary_{plus,minus}, force
the top of the stack to be a number. This fixes issues with
Op_elem_new. See test/uplus2.awk. Thanks to
Lewis Hyatt <lhyatt@gmail.com> for the report.
* mpfr.c (mpg_interpret): Ditto.
2026-04-10 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_split): Refactor the logic a bit to make sure
that single-character regexs as the third argument are handled
correctly. Thanks to Ben Hoyt <benhoyt@gmail.com> for the
report and test case. New test case is splitany.
2026-04-07 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h (gawk_codeset): New macro.
2026-04-06 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_sub): Check for overflow in calculation of size
of result buffer by doing the math in 64 bits. This provides
a fatal message on 32 bit systems if overflow happens instead
of letting dynamic memory get corrupted and likely causing
a core dump. Thanks to Michał Majchrowicz <mmajchrowicz@afine.com>
for the report and fix.
2026-04-05 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-04-04 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_sub): Make `sofar' be size_t to avoid
integer overflows. Thanks to Michał Majchrowicz
<mmajchrowicz@afine.com> for the report.
* node.c (parse_escape): Change `i' to int64_t to avoid
overflows. Thanks to ASan with gcc -m32.
2026-04-03 Arnold D. Robbins <arnold@skeeve.com>
* io.c (do_getline_redir): Don't DEREF redir_exp too early.
Thanks to Michał Majchrowicz <mmajchrowicz@afine.com>
for the report.
2026-03-30 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_sub): Add error checking on multibyte char matching.
* interpret.h (r_interpret): Op_field_spec, use dupnode() instead
of UPREF on the pointer. Thanks to Marc Schönefeld
<marc.schoenefeld@gmx.org> for the report and test case.
2026-03-25 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Add macro for gawk_mb_cur_max.
Add codeset member to the API struct.
* gawkapi.c (init_ext_api): Initialize it.
* awk.h: Include <langinfo.h>.
* re.c (using_utf8): Use nl_langinfo() which is POSIX instead of
GNULIB localeinfo struct. This will help for when we eventually
nuke regex and dfa.
2026-03-22 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Note that <stdint.h> must be included.
(awk_string_t): Add wide char pointer and length.
(struct gawk_api): Add mb_cur_max member and functions
for converting m.b. string <--> wide string.
(mbstowcs, wcstombs): New macros.
* gawkapi.c (assign_string): Call force_wstr(). Copy in
wide string and length values to result.
(assign_number): Fix fatal error message.
(api_mbstowcs, api_wcstombs): New functions.
(api_impl): Add the functions and init mb_cur_max.
(init_ext_api): Init api_impl.mb_cur_max.
2026-03-15 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Futher API cleanup: comments fixed up, moved
api_destroy_array up with the rest of the array functions.
* gawkapi.c (api_impl): Moved api_destroy_array up with the
rest of the array functions.
2026-03-13 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-03-13 Arnold D. Robbins <arnold@skeeve.com>
Start updating the API.
* gawkapi.h (gawk_api_major_version, gawk_api_minor_version): Set to
5.0.
(do_flags): Now an int with bit flags. Various macros revised for
this.
(api_get_mpfr, api_get_mpz): Removed obsolete function pointers.
(get_mpfr_ptr, get_mpz_ptr): Removed obsolete macros.
* gawkapi.c (api_get_mpfr, api_get_mpz): Removed obsolete functions.
(api_impl): Remove braces around do_flag initializer, removed function
pointers for obsolete functions.
(init_ext_api, update_ext_api): Appropriate changes for do_flags.
2026-03-12 Arnold D. Robbins <arnold@skeeve.com>
All files updated, replacing the FSF address with a
link to the licenses: https://www.gnu.org/licenses/.
Thanks to Xose Vazquez Perez <xose.vazquez@gmail.com>
for pointing out the need.
2026-03-11 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-03-04 Arnold D. Robbins <arnold@skeeve.com>
Change AWKNUM to double everywhere.
* awk.h (AWKNUM): Remove macro definition.
* array.c, awkgram.y, builtin.c, cint_array.c, debug.c, eval.c,
field.c, floatcomp.c, int_array.c, interpret.h, io.c, main.c,
mpfr.c, node.c, printf.c, str_array.c: Global replacement of
AWKNUM with double.
2026-03-04 Arnold D. Robbins <arnold@skeeve.com>
Nuke the --re-interval option:
* awk.h (do_flag_values): Remove DO_INTERVALS, adjust the values.
(do_intervals): Remove macro definition.
* main.c (optab): Remove re-interval option.
(usage): Ditto.
(parse_args): Ditto: Adjust optlist and the switch cases.
* NEWS: Updated.
2026-03-04 Arnold D. Robbins <arnold@skeeve.com>
Nuke the --persist option:
* main.c (optab): Remove the option.
(parse_args): Remove the code that printed a fatal message.
* NEWS: Updated.
2026-03-04 Arnold D. Robbins <arnold@skeeve.com>
Nuke the --lint-old option:
* awk.h (do_flag_values): Remove DO_LINT_OLD, adjust the values.
(do_lint_old): Remove macro definitions.
* awkgram.y: Remove lint_old code and warnings.
(struct token): Remove NOT_OLD flag, adjust values.
(tokentab): Update flags values by removing NOT_OLD.
(yylex): Remove lint_old code and warnings.
* field.c (do_split): Remove reference to do_lint_old.
(set_FS): Ditto.
* main.c (optab): Remove lint-old option.
(usage): Ditto.
(parse_args): Ditto: Adjust optlist and the switch cases.
* node.c (parse_escape): Remove reference to do_lint_old.
2026-03-04 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-03-02 Arnold D. Robbins <arnold@skeeve.com>
* Checklist: Revisions.
2026-03-01 Weixie Cui <cuiweixie@gmail.com>
* array.c (make_aname): Use sizeof(char) instead of
sizeof(char *) when allocating memory for the aname
string buffer. The buffer holds characters, not
pointers, so the previous sizeof(char *) caused
over-allocation.
2026-02-27 Arnold D. Robbins <arnold@skeeve.com>
* buitin.c (do_sub): Pass searchflags to research in
loop over the whole line so that gensub()'s global works
with \N construct. Thanks to Koichi Murase <myoga.murase@gmail.com>
and Finn Steffens <finn.steffens@protonmail.com> for
reporting the bug.
2026-02-25 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_dump_node): Add print of gawk_mb_cur_max.
2026-02-22 Arnold D. Robbins <arnold@skeeve.com>
* 5.4.0: Release tar ball made.
2026-02-22 Arnold D. Robbins <arnold@skeeve.com>
* README: Updated.
2026-02-15 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-02-13 Arnold D. Robbins <arnold@skeeve.com>
* Checklist: Add more stuff.
2026-02-12 Arnold D. Robbins <arnold@skeeve.com>
* Checklist: Add more stuff.
* Makefile.am, Makefile.in, awk.h, awkgram.y, command.y,
debug.c, eval.c, ext.c, field.c, gawkapi.h, gawkmisc.c,
interpret.h, io.c, mpfr.c, node.c, nonposix.h, printf.c,
profile.c, replace.c, symbol.c: Update copyright year.
2026-02-10 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
* main.c (UPDATE_YEAR): Update to 2026.
2026-02-09 Arnold D. Robbins <arnold@skeeve.com>
Bug fix for untyped elements used in redirections.
Thanks to Ed Morton for the report.
* builtin.c (do_print): Call elem_new_to_scalar() on the redirection.
(do_getline_redir): Ditto.
2026-02-09 Arnold D. Robbins <arnold@skeeve.com>
* main.c (__dso_handle): Remove. PCC no longer needs it.
* printf.c (isinf): Remove macros, PCC now handles it okay.
2026-02-05 Arnold D. Robbins <arnold@skeeve.com>
* main.c (__dso_handle): Define if compiling with PCC.
* printf.c (isinf): For PCC undef it and define it as __builtin_isinf
which PCC supports.
2026-02-04 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Look for <sys/procctl.h> and <sys/sysctl.h>, and
for procctl() and sysctl(), on FreeBSD.
* NEWS: Updated.
2026-02-03 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am: For NetBSD 10, turn off ASLR via paxctl.
* NEWS: Updated.
2026-02-02 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
* re.c (regexflags2str): Remove declaration of function that
doesn't exist.
(resetup): Clean up the code a little.
(minrxcompflags2str, minrxexecflags2str): New functions.
2026-02-03 John E. Malmberg <wb8tyw@qsl.net>
* builtin.c (do_dump_node): Honor the HAVE_LONG_LONG_INT macro.
2026-01-28 John E. Malmberg <wb8tyw@qsl.net>
* ChangeLog: Spelling fixes
* custom.h: OpenVMS Posix is long gone.
2026-01-27 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
2026-01-24 Arnold D. Robbins <arnold@skeeve.com>
* TODO: Updated.
2026-01-20 Arnold D. Robbins <arnold@skeeve.com>
* TODO: Updated.
2026-01-20 J. <thirdedition@gmx.net>
* configure.ac: Remove \ continuation in lists inside m4
constructs. Needed for MSYS2.
2026-01-17 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (posix_compare): Simplify further to always use
strcoll() everywhere but MinGW.
* NEWS: Updated. Only OpenBSD 7 works with PMA.
2026-01-16 Arnold D. Robbins <arnold@skeeve.com>
* printf.c (format_args): Revert fix of 2026-01-15.
* eval.c (posix_compare): For Cygwin, always uses strcoll().