forked from redox-os/gawk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog
executable file
·8011 lines (5759 loc) · 294 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
2018-11-17 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.c, command.c: Updated to Bison 3.2.1.
* NEWS: Updated.
* Makefile.am (pc/Makefile.tst): Make it work for out-of-tree
builds. Thanks to `make distcheck' for the report.
2018-11-17 Arnold D. Robbins <arnold@skeeve.com>
* config.guess: Updated from GNULIB.
2018-11-11 Arnold D. Robbins <arnold@skeeve.com>
* main.c (usage): Improve output for -Z in the help.
2018-10-24 Arnold D. Robbins <arnold@skeeve.com>
* main.c (usage): Improve output for -Y and add -Z in the help.
2018-10-23 Arnold D. Robbins <arnold@skeeve.com>
* config.sub: Updated from GNULIB.
2018-10-10 Arnold D. Robbins <arnold@skeeve.com>
* debug.c (print_instruction): For Op_comment, use print_func
instead of fprintf to print the comment type.
2018-10-01 Nelson H.F. Beebe <beebe@math.utah.edu>
* custom.h (__builtin_expect): Define for non-GNU compilers.
2018-09-27 Andrew J. Schorr <aschorr@telemetry-investments.com>
* mpfr.c (force_mpnum): Check that base is 10 also before
computing MPG integer. Found based on bug report from
Luu Vinh Phuc <phuclv90@gmail.com>.
2018-09-26 Arnold D. Robbins <arnold@skeeve.com>
Add more lint checks.
* awk.h (POP_ARRAY): Add boolean parameter to check for untyped
value and include lint warning.
* interpret.h (r_interpret): Adjust all calls to POP_ARRAY.
* field.c (do_split): Improve lint warning text for empty
third argument.
* re.c (make_regexp): Add lint check for '\0' in contents of
regexp to be matched (dynamic or otherwise).
2018-09-23 Steven Packard <spackard1@bloomberg.net>
* awk.h: Add `#if !defined(__SUNPRO_C)' around check for non-ANSI
compilers. Needed for some Solaris systems.
2018-09-21 Arnold D. Robbins <arnold@skeeve.com>
* re.c (make_regexp): Handle backslash at end of
input string. Thanks to Anatoly Trosinenko
<anatoly.trosinenko@gmail.com> for the report.
Also, improve the error message when compilation of
the regexp fails.
2018-09-21 Arnold D. Robbins <arnold@skeeve.com>
* io.c (fork_and_open_slave_pty): Move an errant close brace
inside the #endif so that gawk will compile on AIX. Thanks to
Fredrik Laurin <fredrik_laurin@yahoo.se> for the report.
2018-09-18 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Fix typo in gettext version.
Unrelated:
* field.c (get_field): Move lint check for field access in an
END rule to top level, make wording more general.
* builtin.c (do_print_rec): Restore check before calling get_field()
and add do_lint to the condition.
Unrelated:
* field.c (set_NF): Add lint warning if decrementing NF, which
doesn't work on older Unix awks.
Unrelated:
* config.rpath: Sync to GNULIB.
2018-09-16 gettextize <bug-gnu-gettext@gnu.org>
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.8.
* ABOUT-NLS, config.rpath: Updated by gettext 0.19.8.1.
2018-09-16 Arnold D. Robbins <arnold@skeeve.com>
* field.c (get_field): Add lint check if accessing $0 inside
an END rule, print a "may not be portable" warning.
* builtin.c (do_print_rec): Call get_field() unconditionally
in order to do lint check.
Unrelated:
* awkgram.c, command.c: Updated to Bison 3.1.
* NEWS: Updated.
Unrelated:
* Makefile.in, aclocal.m4, configure: Regenerated, using
Automake 1.16.1.
Unrelated:
* gettext.h: Synced with that from Gettext 0.19.8.1.
2018-09-14 Adrian Bunk <bunk@debian.org>
* awk.h (init_debug, debug_prog): Move prototypes to here from ...
* main.c: ... here.
Thanks to Michael Tautschnig for noticing the type mismatch.
2018-09-07 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y, debug.c, ext.c, gawkapi.c, gawkapi.h,
io.c: Remove unneeded \n in calls to warning(), fatal(),
and lintwarn().
* config.guess, config.sub: Updated from GNULIB.
2018-08-24 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated w.r.t. GNULIB regex routines.
* config.sub: Updated from GNULIB.
2018-08-17 Arnold D. Robbins <arnold@skeeve.com>
* config.sub: Updated from GNULIB.
2018-08-10 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated from GNULIB.
2018-08-05 John E. Malmberg <wb8tyw@qsl.net>
* custom.h: Define macros needed for building with gnu regex.
2018-08-02 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Add lint warning upon encountering escaped
physical newlines in a string.
* node.c (make_str_node): Ditto.
2018-08-01 John E. Malmberg <wb8tyw@qsl.net>
* custom.h: Include fp.h on OpenVMS.
Workaround for bug in math.h missing some declarations.
2018-07-31 Arnold D. Robbins <arnold@skeeve.com>
* interpret.h (unfield): Add a call to force_string() on
new value. See test/assignnumfield.awk. Thanks to
Ralph Corderoy <ralph@inputplus.co.uk> for the bug report.
2018-07-31 Arnold D. Robbins <arnold@skeeve.com>
Handle newlines in -v and fix \-<newline>. Thanks to
Samy Mahmoudi <samy.mahmoudi@gmail.com> for the report.
* awk.h [ELIDE_BACK_NL]: New constant.
* awkgram.y (yylex): Disallow any physical newlines in a string
even if escaped, in POSIX mode.
* main.c (arg_assign): In POSIX mode disallow physical newline
in a -v value. Otherwise call make_str_node() with ELIDE_BACK_NL.
* node.c (make_str_node): Handle ELIDE_BACK_NL.
2018-07-31 Arnold D. Robbins <arnold@skeeve.com>
* array.c (cmp_strings): Preserve value of lmin so it can be passed
to memcmp() if IGNORECASE comparison failed. Thanks to
M. Rashid Zamani <rashid.z@gmail.com> for the report.
2018-07-27 Arnold D. Robbins <arnold@skeeve.com>
* re.c (make_regexp): Add warnings for unknown escape sequences,
similar to what we already do for strings.
* awkgram.y: Add lint warning about concatenation as target
of `>' redirection. Always use Op_parens so that
print "foo" > ("foo" 1) does not warn.
2018-07-26 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (_GNU_SOURCE): Don't define it here, it's already
done in config.h.
2018-07-13 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_nan_inf): New function to generate +nan, -nan,
+inf, -inf, so that gawk output for NaN and INF always has a sign.
Handles regular and MPFR.
(out_of_range): New function to check if a value is out of range,
both regular and MPFR.
(format_tree): Use them in out of range calculation. Check for out
of range in floating point formats also. Allow new *undocumented*
'P' flag to not do out of range formantting. Used mainly for
the test program.
* awk.h (out_of_range, format_nan_inf): Declare functions.
* mpfr.c (mpg_format_val): Check for out of range and format the
the result appropriately if so.
* node.c (r_format_val): Ditto.
2018-06-27 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated from GNULIB.
2018-06-22 Andrew J. Schorr <aschorr@telemetry-investments.com>
* node.c (r_force_number): If strtod returns ERANGE, accept the
value as being numeric instead of forcing it to zero. The impact
is that huge string values that overflow IEEE 754 limits will now
be converted to inf or -inf instead of 0. Thanks to Daniel
Pettet for reporting this issue.
2018-06-17 Arnold D. Robbins <arnold@skeeve.com>
Fix a corner case with EPIPE to stdout/stderr.
Thanks to Peng Yu for the report.
* io.c (close_io): Add new parameter for indicating EPIPE happened,
update the code to set it if so.
* awk.h (close_io): Revise declaration.
* debug.c (close_all): Change call to close_io().
* interpret.h (interpret): For Op_atexit, if got an EPIPE, call
die_via_sigpipe().
2018-05-24 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (add_lint): For no-effect case, also check for
Op_push_i. Makes statements consisting of a single constant
trigger the warning.
2018-05-23 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated from GNULIB.
2018-05-14 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Minor edits.
2018-05-13 Arnold D. Robbins <arnold@skeeve.com>
* config.sub: Update from GNULIB.
2018-05-03 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (pc/Makefile.tst): New target.
(dist-hook): Now depends upon pc/Makefile.tst.
2018-04-30 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h [dl_load_func]: Minor improvement in version mismatch
message as suggested by Manuel Collado
<m-collado@users.sourceforge.net>.
2018-04-18 Arnold D. Robbins <arnold@skeeve.com>
* config.sub: Updated from GNULIB.
2018-04-14 Manuel Collado <m-collado@users.sourceforge.net>
* field.c (reset_record): Disable fieldwidth from API
get_record() if $0 is explicitly assigned a new value.
2018-04-02 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub, install-sh: Updated from GNULIB.
2018-04-01 Arnold D. Robbins <arnold@skeeve.com>
Fix a nasty MPFR bug in r_dupnode. If the value being copied
is MPFN / MPFR, copy those bits over too. Thanks to
Noah Dean <N.Dean@gaminglabs.com> for the report.
* node.c (r_dupnode): Check for MPFN / MPFR and copy the bits
over as needed.
Unrelated:
* interpret.h (UNFIELD): Turn into an inline function and
let UNFIELD macro call it, allows stepping in with a debugger.
(unfield): Function holding former body of UNFIELD macro.
2018-03-26 Arnold D. Robbins <arnold@skeeve.com>
Remove the tail recursion optimization. It's fundamentally
broken, in the case where a local var becomes a parameter.
Thanks to Denis Shirokov <cosmogen@gmail.com> for the report.
See test/tailrecurse.awk.
* awk.h [num_tail_calls, tail_call]: Remove definitions.
* awkgram.y (grammar, mk_function): Remove code related to
the tail recursion optimization.
* eval.c (dump_fcall_stack): Adjust dumping code since no longer
looping through tail call recursion.
(setup_frame): Remove code related to the tail recursion optimization.
(init_interpret): Ditto.
2018-03-22 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Check for %a support in system printf.
* builtin.c (format_tree): Add support for %a and %A, including
a lint warning.
* NEWS: Add a note about %a support.
2018-03-13 Arnold D. Robbins <arnold@skeeve.com>
* debug.c, nonposix.h: Update copyright year.
2018-03-11 Arnold D. Robbins <arnold@skeeve.com>
* compile, config.guess, config.sub, configure.ac, depcomp,
install-sh, mkinstalldirs: Updated.
2018-03-05 Arnold D. Robbins <arnold@skeeve.com>
* awk.h [PUSH_BINDING, POP_BINDING]: Moved to ...
* debug.c: here.
* awkgram.y (yylex): Make do_etoa_init into a boolean.
* io.c (rs1scan): Make found into a boolean.
2018-02-25 Arnold D. Robbins <arnold@skeeve.com>
* 4.2.1: Release tar ball made.
2018-02-25 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated.
2018-02-23 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Restore checking for PPC Macintosh before
checking for MPFR. See README_d/README.macosx for info.
2018-02-21 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Remove checking for PPC Macintosh before
checking for MPFR. Installing a newer compiler on that
system allows things to work.
2018-02-19 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h, io.c, msg.c: Update copyright year.
2018-02-10 Arnold D. Robbins <arnold@skeeve.com>
* main.c, msg.c: Add a call to fflush(NULL) before each call
to abort(), since GLIBC 2.27 doesn't necessarily flush before
aborting. Thanks to Nelson H.F. Beebe for the report.
2018-02-09 Arnold D. Robbins <arnold@skeeve.com>
* io.c (socketopen): Rearrange assigning the flags to use
AI_ADDRCONFIG only if family is AF_UNSPEC. Thanks to
Houder <houder@xs4all.nl> for the report and initial
code suggestion.
2018-02-07 Andrew J. Schorr <aschorr@telemetry-investments.com>
Print +"01" should print "1", not "01".
* interpret.h (Op_unary_plus): Need to make a new number node that does
not contain the original string representation. The logic is copied
from Op_unary_minus.
* mpfr.c (mpg_interpret): Add new case for Op_unary_plus based on
the Op_unary_minus logic. We need a fresh number node that does not
contain the string.
2018-01-28 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated.
2018-01-25 Arnold D. Robbins <arnold@skeeve.com>
* main.c (main): Add explanatory comment about O_APPEND stuff.
* NEWS: Updated.
2018-01-22 Arnold D. Robbins <arnold@skeeve.com>
Fix the inplace tests on *BSD systems.
* main.c (main): Add O_APPEND flag to fileno(stderr).
2018-01-17 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_isarray): Check that tmp is Node_var
before calling DEREF. Thanks to Denis Shirokov
<cosmogen@gmail.com> for the report.
2018-01-15 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Small typo fix.
* config.sub: Updated.
* io.c (fork_and_open_slave_pty): Rationalize down to one
function with two bodies.
(set_slave_pty_attributes, push_pty_line_disciplines): Move
into #ifdef for TERMIOS_H. Helps out with VMS compiling.
2018-01-12 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Remove extraneous '*' on parameters of
type awk_ext_id. Thanks to Andrew Schorr for the report.
2018-01-11 Arnold D. Robbins <arnold@skeeve.com>
* compile, config.guess, config.rpath, config.sub,
depcomp: Updated from GNULIB.
2018-01-08 John E. Malmberg <wb8tyw@qsl.net>
* io.c (set_slave_pty_attributes): Currently no termios on VMS.
(set_slave_pty_attributes): No fork on VMS.
2018-01-04 Arnold D. Robbins <arnold@skeeve.com>
Refactor handling of slave pty. On AIX and HP-UX open
slave in the child. Otherwise open slave in the parent
before forking (restoring code mostly from 4.1.3). Thanks
to Andrew Schorr for the bug report.
* io.c (fork_and_open_slave_pty): New routine. Two versions.
(set_slave_pty_attributes): New routine. Common code used by
both versions of fork_and_open_slave_pty.
(push_pty_line_disciplines): New routine. Common code used by
both versions of fork_and_open_slave_pty.
(two_way_open): Call fork_and_open_slave_pty instead of
doing it inline.
2018-01-03 Arnold D. Robbins <arnold@skeeve.com>
* main.c (UPDATE_YEAR): Move to 2018. Revise copyright year.
* NEWS: Bring up to date.
2018-01-02 Arnold D. Robbins <arnold@skeeve.com>
If ROUNDMODE changes, cause cached string conversions
to become invalid. Thanks to Nethox <nethox@gmail.com>
for the report. Day 1 bug from 4.1.0 release.
In all the below files, bump copyright year, too.
* array.c (value_info): Include strndmode in the output.
* awk.h (NODE): New member, strndmode.
(MPFR_round_mode): Add extern declaration.
(force_string_fmt): Check s->strnmode against MPFR_round_mode.
* awkgram.y (set_profile_text): Set n->strndmode to MPFR_round_mode.
* builtin.c (do_print): Remove tests and just call force_string_fmt.
* field.c (set_record): Set n->strndmode to MPFR_round_mode.
* gawkapi.c (api_sym_update_scalar): Set r->strndmode to
MPFR_round_mode.
* interpret.h (r_interpret): For Op_assign_concat, set t1->strndmode
to MPFR_round_mode.
* mpfr.c (MPFR_round_mode): Define and initialize.
(mpfr_format_val): Set s->strndmode to MPFR_round_mode.
(set_ROUNDMODE): Update MPFR_round_mode when ROUNDMODE changes
successfully.
* node.c (r_format_val): Set s->strndmode to MPFR_round_mode.
(make_str_node): Set r->strndmode to MPFR_round_mode.
* str_array.c (str_kilobytes): Update a comment.
* symbol.c (check_param_names): Set n.strndmode to MPFR_round_mode.
2017-12-24 Arnold D. Robbins <arnold@skeeve.com>
Avoid some compiler warnings. Thanks to Michal Jaegermann
<michal.jnn@gmail.com> for the report.
* builtin.c (do_strftime): Initialize save.
(do_dcgetttext): Initialize save and save2.
(do_dcngettext): Ditto.
(do_bindtextdomain): Initialize save and save1.
Unrelated:
* main.c (optlist): Make 'L' option's argument optional, to
match --lint. Thanks to Manuel Collado <mcollado2011@gmail.com>
for the report.
2017-12-22 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub, depcomp, install-sh: Updated
from GNULIB.
2017-12-20 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Add --enable-versioned-dir option for a
directory with API version in it to hold extensions.
2017-12-19 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Remove x's from `test "x$something" = "xyes"
kinds of things. With correct quoting, the x isn't needed.
(DYNAMIC): Remove use of -Wl,-export-dynamic on Linux
and FreeBSD. It was needed for old-style extensions, which are
no longer supported.
2017-12-10 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y: For '!' optimization on a string constant, don't
apply the optimization if it's a translatable string. Thanks
to Jeremy Feusi <jeremy@feusi.co> for the report.
2017-11-25 Andrew J. Schorr <aschorr@telemetry-investments.com>
* debug.c (do_set_var): As in interpret.h (Op_store_field), we should
call the assign function before unref to give it a chance to copy
any non-malloced $n string values before freeing $0.
2017-11-14 Andrew J. Schorr <aschorr@telemetry-investments.com>
* mpfr.c (get_rnd_mode): Fix MPFR_RNDA comment.
2017-11-14 Andrew J. Schorr <aschorr@telemetry-investments.com>
Fix corruption when $0 is reassigned while other NODEs have open
references to $n. Thanks to Eric Pruitt <eric.pruitt@gmail.com> for
the bug report.
* field.c (purge_record): For each $n field variable, if valref > 1
and it has not already been malloced, make a copy of the string, since
$0 is about to be reset.
* interpret.h (Op_store_field): We must call the assign function
before unref, since we must copy any non-malloced $n string values
before freeing $0.
2017-11-09 Arnold D. Robbins <arnold@skeeve.com>
* main.c (usage): Add a note to not post bugs in comp.lang.awk.
So there.
2017-11-08 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h (AWK_NUMBER_TYPE): Move this enum out to the
top level so that it works correctly with C++.
2017-10-24 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated with info about OS/2.
2017-10-21 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y: For string concatenation, don't fold constants
if one or the other is translatable. Thanks to Harald van Dijk
<harald@gigawatt.nl> for the report.
2017-10-21 KO Myung-Hun <komh78@gmail.com>
* nonposix.h [__KLIBC__]: Include dlfcn.h, declare os2_dlsym, and
redirect dlsym to os2_dlsym. Declare os2_fixdllname. Declare
os2_dlopen and redirect dlopen to os2_dlopen.
* io.h (find_source) [__EMX__]: Truncate extension file basename
to 8 characters.
2017-10-19 Arnold D. Robbins <arnold@skeeve.com>
* 4.2.0: Release tar ball made.
2017-10-17 Andrew J. Schorr <aschorr@telemetry-investments.com>
* NEWS: Actually, isarray is not deprecated in this release.
* builtin.c (do_isarray): Remove lint warning deprecating isarray.
2017-10-14 Arnold D. Robbins <arnold@skeeve.com>
* field.c (do_split): Simplify the lint warnings.
Based on suggested code by Eric Pruitt <eric.pruitt@gmail.com>.
Unrelated:
* awkgram.y (check_funcs): Remove the REALLYMEAN ifdef and
simplify the lint checking code for function defined but not
called or called but not defined.
2017-10-13 Arnold D. Robbins <arnold@skeeve.com>
Assume a more C99 environment:
* awk.h: Assume we have limits.h, stdarg.h and stdbool.h.
* configure.ac: Remove checks for limits.h and stdarg.h.
2017-10-10 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Remove --with-whiny-user-strftime option.
* NEWS: Updated.
* ChangeLog.0: Fix a typo. :-)
2017-10-08 Arnold D. Robbins <arnold@skeeve.com>
* command.y: Fix the FSF's address.
2017-10-08 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Rationalized with respect to stuff on the API.
Also rationalized with respect to the pretty printer changes.
2017-10-04 Andrew J. Schorr <aschorr@telemetry-investments.com>
* README: Fix grammar by removing a stray word.
2017-10-04 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Add a note about OS/2 not working.
2017-10-02 Arnold D. Robbins <arnold@skeeve.com>
Undo change of 2014-09-07:
* configure.ac: Remove the undocumented option to enable locale
letters in identifiers.
* awkgram.y (is_alpha): Remove related code.
2017-10-02 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated.
2017-09-28 Arnold D. Robbins <arnold@skeeve.com>
* io.c (devopen): Move declaration of `cp' to where it's first used.
2017-09-18 Arnold D. Robbins <arnold@skeeve.com>
* README: Update required version of texinfo.tex.
* compile, config.guess, config.sub, depcomp: Updated.
2017-09-17 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Small changes to make it usable with C++.
2017-09-13 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (command.c): Don't need the dependency on awkgram.c
anymore.
* bisonfix.awk: Removed.
* README: Revised to describe use of Bison exclusively.
2017-09-13 Andrew J. Schorr <aschorr@telemetry-investments.com>
* Makefile.am (awkgram.c): Use -o option to bison. Get rid of
messing with y.tab.h, that was obsolete.
(EXTRA_DIST): Don't need bisonfix.awk anymore.
2017-09-12 Petr Ovtchenkov <ptr@void-ptr.info>
Andrew J. Schorr <aschorr@telemetry-investments.com>
* Makefile.am (command.c): Make dependant on awkgram.c so
that bison is run serially with make -j. Use -o option so
that we no longer need bisonfix.awk in this rule.
2017-08-28 Arnold D. Robbins <arnold@skeeve.com>
* interpret.h (r_interpret): Add some casts to avoid warning
messages in printf statements.
Unrelated:
* configure.ac: Add check for gai_strerror.
* io.c (socketopen): Use gai_strerror to add more information
if getaddrinfo fails.
2017-08-25 Pat Rankin <r.pat.rankin@gmail.com>
* builtin.c (TYPE_MINIMUM): Use type uintmax_t for the calculation,
deferring the cast to the target type until the final result.
2017-08-27 Juan Manuel Guerrero <juan.guerrero@gmx.de>
* mbsupport.h [__DJGPP_]: Provide multi-byte specific declarations
and definitions for DJGPP.
2017-08-23 Arnold D. Robbins <arnold@skeeve.com>
* README.git: Minor edits to make build steps clearer.
2017-08-21 Daniel Richard G. <skunk@iSKUNK.ORG>
* awk.h (c_func): Renamed to c_function to avoid conflict.
with z/OS headers.
* ext.c, interpret.h: Ditto.
* configure: Regenerated after update to m4/arch.m4.
2017-08-18 Arnold D. Robbins <arnold@skeeve.com>
* debug.c (do_set_var): Fix typos in error messages.
Thanks to Jean-Philippe Guerard
<jean-philippe.guerard@xn--tigreray-i1a.org> for the report.
2017-08-17 Arnold D. Robbins <arnold@skeeve.com>
* field.c (rebuild_record): Set new fields valref to 1 if
original field's valref was > 1. Update the comment. Found
by running chem.
* mpfr.c (do_mpfr_compl): Fix typo in warning message.
Thanks to Jean-Philippe Guerard
<jean-philippe.guerard@xn--tigreray-i1a.org> for the report.
* NEWS: Mention the Italian translation of the manual.
2017-08-16 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.c (assign_number): Clean up the code a bit.
(api_get_mpfr, api_get_mpz): Add return NULL in non-MPFR case
to avoid compiler warnings.
2017-08-16 Arnold D. Robbins <arnold@skeeve.com>
* config.guess: Update from GNULIB.
* NEWS, README: Updated in preparation for release.
2017-08-16 Andrew J. Schorr <aschorr@telemetry-investments.com>
* gawkapi.c (assign_number): Add 'ifdef HAVE_MPFR' tests to get this
to build in the absence of MPFR.
2017-08-13 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h (gawk_api_major_version): Reset to 2 after merging
in feature/api-mpfr branch.
* NEWS: `intdiv' is not built-in; remove the entry for up and update
numbering. Add note about API supporting GMP and MPFR values.
2017-08-09 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h (check_mpfr_versions): Define differently based on if
MPFR version macro is defined. Enhance body to use do/while(0).
(dl_load): Call check_mpfr_versions unconditionally.
2017-08-09 Arnold D. Robbins <arnold@skeeve.com>
* main.c (usage): Add URL for Bug reporting info to the help message.
Unrelated:
* str_array.c (str_lookup): Make a copy of the string if it
came from Nnull_string or a null field. Thanks to
Daniel Pettet for the report.
2017-08-04 Arnold D. Robbins <arnold@skeeve.com>
* array.c, awk.h, awkgram.y, builtin.c, cint_array.c,
cmd.h, debug.c, eval.c, ext.c, field.c, gawkapi.c, gawkmisc.c,
gettext.h, int_array.c, main.c, mpfr.c, msg.c, node.c, profile.c,
re.c, str_array.c, symbol.c: Update copyright years.
2017-08-04 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, mkinstalldirs: Updated from GNULIB.
2017-08-01 Juan Manuel Guerrero <juan.guerrero@gmx.de>
Bring DJGPP support up to speed.
* awk.h: Add DJGPP in #if for include of nonposix.h
* nonposix.h (btowc, putwc): Add declarations for DJGPP.
2017-07-17 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y [non_post_simp_exp]: Merge LEX_BUILTIN and
LEX_LENGTH expansions.
(lookup_builtin): Move MPFR test to after test for sub builtin.
* awkgram.y [non_post_simp_exp]: Unmerge LEX_BUILTIN and
LEX_LENGTH expansions. This introduced a reduce/reduce
conflict, and those are bad. I don't know why I didn't
notice this earlier. Sigh.
2017-07-15 Arnold D. Robbins <arnold@skeeve.com>
Revert change of 2016-07-24 that always runs the dfa
matcher. Based on a bug report from Alexandre Oliva
<lxoliva@fsfla.org>, DFA can cause gawk to hang, even
in the C locale.
* re.c (research): Don't use dfa if need_start is true.
2017-07-11 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (is_letter): Add declaration.
* ext.c (is_valid_identifier): New function.
(make_builtin): Use is_valid_identifier instead of inline code.
(is_letter): Moved from here ...
* awkgram.y (is_letter): ... to here.
(yylex): Use is_letter instead of a test.
* command.y (yylex): Ditto.
* main.c (arg_assign): Ditto.
2017-07-07 Arnold D. Robbins <arnold@skeeve.com>
Remove warnings from GCC 7.1 compilation.
* awk.h (fatal_tag_valid): Change type to int.
* awkgram.y (yylex): Set did_newline to true instead of using ++.
* builtin.c (format_tree): Set lj to true instead of using ++.
* cmd.h (pager_quit_tag_valid): Change type to int.
* debug.c (pager_quit_tag_valid): Change type to int.
(do_clear): Make bp_found an int, change uses.
(do_run): Treat fatal_tag_valid as an int.
* msg.c (fatal_tag_valid): Change type to int.
2017-07-07 Arnold D. Robbins <arnold@skeeve.com>
* gawapi.h: Bring descriptive comments up to date, minor edits.
* io.c: Add some initial comments to functions where they were missing.
2017-07-03 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h, gawkapi.c: Typo fixes in comments.
2017-06-26 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Turn a tab into a space in AC_DEFINE(SUPPLY_INTDIV).
2017-06-25 Andrew J. Schorr <aschorr@telemetry-investments.com>
* gawkmisc.c (xmalloc): Remove function now in support/xalloc.h.
2017-06-22 Arnold D. Robbins <arnold@skeeve.com>
Make pretty-printing include parentheses that were explicitly
in the source code. Thanks to Hermann Peifer for the bug report.
* awk.h (OPCODE): Add Op_parens.
* awkgram.y [Grammar]: If pretty-printing, add Op_parens ot end of
list for parenthesized expression.
* eval.c (optypetab): Add Op_parens.
* interpret.h (r_interpret): Ditto.
* profile.c (pprint): Ditto. For ?:, don't parenthesize it.
(pp_parenthesize): If string starts with left paren, return early.
(parenthesize): Don't call div_on_left_mul_on_right.
(div_on_left_mul_on_right): Remove function.
(pp_concat): Don't add parentheses if expressions already have them.
* NEWS: Updated.
2017-06-21 Andrew J. Schorr <aschorr@telemetry-investments.com>
Replace malloc/memset combinations with calloc by using the new ezalloc
macro.
* awkgram.y (yyerror, do_add_srcfile, funcuse): Replace emalloc+memset
with ezalloc.
* cint_array.c (cint_lookup, cint_copy, tree_lookup, tree_copy,
leaf_lookup, leaf_copy): Ditto.
* command.y (mk_cmdarg): Ditto.
* debug.c (add_item): Ditto.
* eval.c (setup_frame): Ditto.
* field.c (set_record): Ditto.
* gawkapi.c (api_flatten_array_typed): Ditto.
* int_array.c (int_copy, grow_int_table): Ditto.
* io.c (init_awkpath, iop_alloc): Ditto.
* node.c (str2wstr): Ditto.
* re.c (make_regexp): Ditto.
* str_array.c (str_copy, grow_table): Ditto.
* symbol.c (make_params, new_context): Ditto.
2017-06-19 Andrew J. Schorr <aschorr@telemetry-investments.com>
* awk.h (ezalloc): Add new macro to allocate memory initialized to zero.
(ezalloc_real): New inline function to call calloc.
* gawkapi.h (ezalloc): Add new API macro to allocate memory initialized
to zero.
2017-06-18 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (mbc_char_count): Fix code to correctly traverse
the string. Thanks to Hermann Peifer for the bug report.
* config.guess, config.sub: Update to latest from GNULIB.
* gettext.h: Pull in a few nice changes from GNULIB version.
2017-05-30 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Mention PROCINFO["argv"].
2017-05-24 Andrew J. Schorr <aschorr@telemetry-investments.com>
* field.c (set_FIELDWIDTHS): Add check to protect against blank
characters after a `:' skip separator.
Fix field number in error message, thanks to a bug report
from Michal Jaegermann.
2017-05-23 Andrew J. Schorr <aschorr@telemetry-investments.com>
* field.c (set_FIELDWIDTHS): Simplify the logic and consistentify
use of UINT_MAX. Make sure that negative value after : is caught.
2017-05-23 Arnold D. Robbins <arnold@skeeve.com>
* field.c (fw_parse_field): Stop upon hitting the end of the
record; this enables correct counting of the number of fields.
(set_FIELDWIDTHS): Add `*' at end as meaning ``all the rest
of the data on the line.'' Allow skip:* as well.
* NEWS: Update information about FIELDWIDTHS.
2017-05-20 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (add_lint): Make ``no effect'' check smarter about
reporting line numbers.
2017-05-01 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (nextc): Fix to change of 2017-04-24 such that
@include works in multibyte locales. Thanks to Hermann
Peifer for the bug report.
2017-04-26 Andrew J. Schorr <aschorr@telemetry-investments.com>
* awkgram.y (make_regnode): Fix bug -- we should not set valref to 1
when creating a node of type Node_regex, since valref is appropriate
only for Node_val nodes. This fixes a bug introduced in commit
687e6594. Also, add an assert to make it clear that this function
supports only Node_regex and Node_dynregex.
* awk.h (NODE): Restore sref to the `val' subportion, since it is not
really needed for Node_regex, now that the bug in make_regnode has
been fixed.
(valref): Restore macro definition.
2017-04-24 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (NODE): Additional cleanups. Removed `aq' and `param_list'
elements from various unions and removed 'nextp' and
`a_opaque' defines. None of these were in use.
Rework the comment for valref, per suggestion from
Andrew Schorr.
2017-04-23 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (nextc): Adjust so that 3.1.x behavior is restored
whereby --source arguments are concatenated. Thanks to
"Neil R. Ormos" <ormos-gnulists17@ormos.org> for the report.
2017-04-21 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (NODE): Put the `val' subportion back the way it
was and move valref (formerly sref) out of the unions
entirely. This was the real problem. Rework the corresponding
commentary.
[valref]: Removed the macro definition.
2017-04-20 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Make letter case usage in the various
AC_ARG_ENABLE messages consistent with the rest of configure
output.
(--disable-mpfr): Add this option to make it easier
to check compiles without MPFR. Motivated by:
* awk.h (NODE): Rearrange the layout of the 'val' subportion
of the union to fix alignment problems when compiling without
MPFR. The problem only happened on 64-bit compiles, not
32-bit compiles.
2017-04-16 Arnold D. Robbins <arnold@skeeve.com>
Rename intdiv it intdiv0 and require enabling at configure time.
* awkgram.y (tokentab): Bracket intdiv0 in #ifdef SUPPLY_INTDIV.
(snode): Similar.
* builtin.c (do_intdiv): Bracket in #ifdef SUPPLY_INTDIV.
* mpfr.c (do_mpfr_intdiv): Bracket in #ifdef SUPPLY_INTDIV.
* configure.ac: Add --enable-builtin-intdiv0 option. If enabled,
also revise doc/gawktexi.in.
2017-04-16 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_intdiv): Use DEREF on the arguments.
Thanks to Andrew Schorr for finding the problem.
* mpfr.c (do_mpfr_intdiv): Return -1 if numerator or denominator
are not valid numbers. Unref various bits first.
2017-04-13 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (make_number_node): Simplify.
* mpfr.c (mpg_node): Change parameter name to `flags'.
2017-04-12 Arnold D. Robbins <arnold@skeeve.com>
* mpfr.c (mpg_format_val): Set STRCUR flag when we're done.
Fixes a memory leak. Thanks to valgrind for the report.
* builtin.c (do_dcgettext): Move declaration of reslen to
outside the ifdefs. Thanks to Hermann Peifer for the report.
* gawkapi.c (awk_value_to_node): Initialize ext_ret_val to NULL
to avoid compiler warnings.
2017-04-12 Manuel Collado <m-collado@users.sourceforge.net>
Fix the FPAT bug reported by Ed Morton in the gawk-bug mailing list.
* awk.h (Regexp): Remove the non_empty flag.
* field.c (fpat_parse_field): Restructure the code to reduce complexity
and document the new structure.
* field.c (fpat_parse_field): Further restructuring to avoid
invalid reads as reported by valgrind.
2017-04-10 Andrew J. Schorr <aschorr@telemetry-investments.com>
* awk.h (enum opcodeval): For the avoidance of doubt, specify that
Op_illegal must equal zero.