-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChangeLog
More file actions
4045 lines (2885 loc) · 145 KB
/
ChangeLog
File metadata and controls
4045 lines (2885 loc) · 145 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
2015-05-19 Arnold D. Robbins <arnold@skeeve.com>
* 4.1.3: Release tar ball made.
2015-05-15 Andrew J. Schorr <aschorr@telemetry-investments.com>
* symbol.c (load_symbols): Plug minor memory leak by calling unref(tmp)
on "identifiers" string after assoc_lookup is done with it.
2015-05-05 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Yet Another Fix for parsing bracket
expressions. Thanks yet again to Andrew Schorr. Maybe it's
even finally nailed down now.
Unrelated:
* config.guess, config.sub: Get latest versions.
2015-05-01 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y: Make sure values are not null in param list.
Avoids core dump for `function f(func, a) {}'. Thanks to
Tibor Palinkas <libmawk@igor2.repo.hu>.
2015-04-30 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am: Take --program-prefix into account when
installing/uninstalling the symlinks, especially 'awk'.
Thanks to Steffen Nurpmeso <sdaoden@yandex.com> for
the report.
Unrelated:
* awkgram.y (yylex): Yet Another Fix for parsing bracket
expressions. Thanks again to Andrew Schorr.
2015-04-29 Arnold D. Robbins <arnold@skeeve.com>
* 4.1.2: Release tar ball made.
2015-04-28 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Rework the bracket handling from zero.
Thanks to Michal Jaegermann for yet another test case.
Unrelated:
* eval.c (setup_frame): Restore call-by-value for $0. This was
necessitated by the changes on 2014-11-11 for conserving
memory use. Thanks to Andrew Schorr for the report and isolating
the cause of the problem.
2015-04-27 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Make change of Jan 7 for parsing regexps
work better. Thanks to Nelson Beebe.
2015-04-26 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with grep.
2015-04-16 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_strftime): For bad time_t values, return "".
2015-04-16 Andrew J. Schorr <aschorr@telemetry-investments.com>
* node.c (r_force_number): If strtod sets errno, then force the
numeric value in node->numbr to zero. For subnormal values, strtod
sets errno but does not return zero, and we don't want to retain
those subnormal values.
2015-04-16 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_strftime): Use a double for the timestamp and
check that the value is within range for a time_t.
Unrelated:
* regex_internal.h (test_malloc, test_realloc): Use %lu in printf
format for error messages. Thanks to Michal Jaegermann for
pointing this out.
Unrelated:
* NEWS: Updated.
2015-04-14 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_strftime): Restore checking for negative result and
add check that time_t is > 0 --- means we're assigning a negative value
to an unsigned time_t. Thanks again to Glaudiston Gomes da Silva
<glaudistong@gmail.com>.
If localtime() or gmtime() return NULL, return a null string.
Thanks to Andrew Schorr.
Unrelated:
* builtin.c (call_sub): Fix for indirect gensub, 3 args now works.
2015-04-13 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c (analyze): Prevent malloc(0).
* regex_internal.h (test_malloc, test_realloc): New functions
that check for zero count.
(re_malloc, re_realloc): Adjust to call the new functions for gawk.
* regexec.c (buid_trtable, match_ctx_clean): Replace malloc/free
with re_malloc/re_free.
Unrelated:
* builtin.c (do_strftime): Disable checking timestamp value for less
than zero. Allows times before the epoch to work with strftime.
Thanks to Glaudiston Gomes da Silva <glaudistong@gmail.com>
for raising the issue.
2015-04-12 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (efence): Make this link again.
Thanks to Michal Jaegermann for pointing out the problem.
2015-04-08 John E. Malmberg <wb8tyw@qsl.net>
* custom.h: VMS shares some code paths with ZOS_USS in
building gawkfts extension.
2015-04-08 Arnold D. Robbins <arnold@skeeve.com>
Factor out opening of /dev/XXX files from /inet.
Enable interpretation of special filenames for profiling output.
* awk.h (devopen_simple): Add declaration.
* io.c (devopen_simple): New routine.
(devopen): Call devopen_simple as appropriate.
* profile.c (set_prof_file): Call devopen_simple as appropriate,
some additonal logic to hande fd to fp conversion.
Unrelated:
* main.c (usage): Add a comment for translators.
2015-04-08 Eli Zaretskii <eliz@gnu.org>
* profile.c (set_prof_file): Interpret a file name of "-" to mean
standard output.
2015-04-06 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (force_number): Add `!= 0' check to bitwise operation.
* awkgram.y: Same, many places.
(check_special): Simplify code for checking extension flags.
2015-04-05 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (install_builtins): If do_traditional is true, do not
install gawk extensions flagged with GAWKX. Similarly, if do_posix
is true, do not install functions flagged with NOT_POSIX.
This fixes a problem with spurious lint complaints about shadowing
a global variable that is not valid in traditional or posix mode.
Thanks to Andrew Schorr for finding the problem and supplying
initial code; I did it slightly differently.
2015-03-31 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (call_sub): Renamed from call_sub_func.
(call_match, call_split_func): Declare.
* builtin.c (call_sub): Renamed from call_sub_func.
(call_match, call_split_func): New functions.
* interpret.h (r_interpret): Call new functions as appropriate.
* node.c (r_unref): Revert change to handle Node_regex, not needed.
2015-03-31 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (r_get_field): Declare.
* builtin.c (call_sub_func): Rearrange the stack to be what
the buitin function expects.
* eval.c (r_get_field): Make extern.
2015-03-24 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (make_regnode): Make extern.
* awk.h (make_regnode): Declare.
* builtin.c (call_sub_func): Start on reworking the stack to
be what do_sub() expects. Still needs work.
* interpret.h (r_interpret): Add a cast in comparison with do_sub().
* node.c (r_unref): Handle Node_regex nodes.
2015-03-24 Andrew J. Schorr <aschorr@telemetry-investments.com>
* interpret.h (r_interpret): When Op_K_exit has an argument of
Nnull_string, do not update exit_val, since no value was supplied.
2015-03-20 Arnold D. Robbins <arnold@skeeve.com>
Start on fixing indirect calls of builtins.
* awk.h (call_sub_func): Add declaration.
* awkgram.y (lookup_builtin): Handle length, sub functions.
(install_builtin): Handle length function.
* builtin.c (call_sub_func): New function.
* interpret.h (r_interpret): If calling do_sub, do it through
call_sub_func().
2015-03-18 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated, from libtool 2.4.6.
2015-03-17 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_number): Allocate enough room to print the number
in all cases. Was a problem mixing -M with profiling with a really
big number. Thanks to Hermann Peifer for the bug report.
2015-03-08 Arnold D. Robbins <arnold@skeeve.com>
* re.c (regexflags2str): Removed. It was redundant.
2015-02-27 Arnold D. Robbins <arnold@skeeve.com>
* symbol.c (check_param_names): Fix argument order in memset() call.
* configure.ac: Use AC_SEARCH_LIBS instead of AC_CHECK_LIB. This fixes
a long-standing problem where `-lm' was used twice in the final
compilation line.
2015-02-24 Arnold D. Robbins <arnold@skeeve.com>
* POSIX.STD: Update copyright year.
* awkgram.y (yylex): Allow \r after \\ line continuation everywhere.
Thanks to Scott Rush <scott.rush@honeywell.com> for the report.
2015-02-13 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Be more careful about passing true to
nextc() when collecting a regexp. Some systems' iscntrl()
are not as forgiving as GLIBC's. E.g., Solaris.
Thanks to Dagobert Michelsen <dam@baltic-online.de> for
the bug report and access to systems to check the fix.
2015-02-12 Arnold D. Robbins <arnold@skeeve.com>
* POSIX.STD: Update with info about function parameters.
* configure.ac: Remove test for / use of dbug library.
2015-02-11 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Fix spelling error in comment.
2015-02-07 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h,
regexec.c: Sync with GLIBC. Mostly copyright date updates.
2015-02-05 Andrew J. Schorr <aschorr@telemetry-investments.com>
* eval.c (set_IGNORECASE): If IGNORECASE has a numeric value, try
using that before treating it as a string. This fixes a problem
where setting -v IGNORECASE=0 on the command line was not working
properly.
2015-02-01 Arnold D. Robbins <arnold@skeeve.com>
Move POSIX requirement for disallowing paramater names with the
same name as a function into --posix.
* NEWS: Document it.
* awkgram.y (parse_program): Check do_posix before calling
check_param_names().
* symbol.c (check_param_names): Set up a fake node and call
in_array() for function parameter names instead of linear
searching the function list a second time. Thanks to Andrew
Schorr for the motivation.
2015-01-30 Arnold D. Robbins <arnold@skeeve.com>
Don't allow function parameter names to be the same as function
names - required by POSIX. Bug first reported in comp.lang.awk.
In addition, don't allow use of a parameter as a function name
in a call (but it's ok in indirect calls).
* NEWS: Updated.
* awk.h (check_param_names): Add declaration.
* awkgram.y (at_seen): New variable. Communicates between
yylex() and the parser.
(FUNC_CALL production): Check at_seen and check that the identifier
is a function name.
(parse_program): Call check_param_names() and set errcount.
(yylex): Set at_seen after seeing an at-sign.
* symbol.c (check_param_names): New function.
2015-01-24 Arnold D. Robbins <arnold@skeeve.com>
Infrastructure updates.
Bison 3.0.4. Automake 1.15. Gettext 0.19.4.
2015-01-20 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.c (api_set_array_element): Remove useless call to
make_aname.
* symbol.c (load_symbols): Ditto.
Thanks to Andrew Schorr for pointing out the problem.
2015-01-19 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.c: Update to bison 3.0.3.
* command.c: Ditto.
* NEWS: Note same.
2015-01-15 Arnold D. Robbins <arnold@skeeve.com>
* dfa.h, dfa.c: Sync with grep. Mainly copyright updates.
* getopt.c, getopt.h, getopt1.c getopt_int.h: Sync with GLIBC.
Mainly copyright updates, one minor code fix.
2015-01-14 Arnold D. Robbins <arnold@skeeve.com>
Remove deferred variables.
* awk.h (register_deferred_variable): Remove declaration.
* awkgram.y (is_deferred_variable, process_deferred,
symtab_used, extensions_used, deferred_variables,
process_deferred): Remove declarations, bodies, and uses.
* builtin.c (do_length): Update comment.
* main.c (init_vars): Just call load_procinfo() and `load_environ()'.
2015-01-07 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Update debug flags if developing.
* awkgram.y (yylex): Regex parsing bug fix for bracket expressions.
Thanks to Mike Brennan for the report.
* builtin.c (format_tree): Catch non-use of count$ for dynamic
field width or precision.
Unrelated:
Load deferred variables if extensions are used; they might
want to access PROCINFO and/or ENVIRON. Thanks to Andrew Schorr
for pointing out the issue.
* awkgram.y (extensions_used): New variable. Set it on @load.
(do_add_scrfile): Set it on -l.
(process_deferred): Check it also.
2014-12-10 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep.
2014-11-26 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_sub): Improve wording of gensub warnings.
2014-11-25 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_sub): For gensub, add more warnings for invalid
third argument.
2014-11-23 Arnold D. Robbins <arnold@skeeve.com>
* awk.h: Move all inline functions to the bottom of the file.
Keeps modern GCC happier.
2014-11-22 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (emalloc, realloc): Redefine in terms of ...
(emalloc_real, eralloc_real): New static inline functions.
(fatal): Move definition up.
* gawkmisc.c (xmalloc): If count is zero, make it one for older
mallocs that require size > 0 (such as z/OS).
2014-11-21 Arnold D. Robbins <arnold@skeeve.com>
* main.c: Remove a debugging // comment.
* NOTES: Removed.
Unrelated:
Revert changes of 2014-11-20 from Paul Eggert. Causes failures
on z/OS.
Unrelated: Avoid unnecessary copying of $0.
* interpret.h (UNFIELD): New macro.
(r_interpret): Use it where *lhs is assigned to.
2014-11-20 Paul Eggert <eggert@cs.ucla.edu>
Port to systems where malloc (0) and/or realloc(P, 0) returns NULL.
* gawkmisc.c (xmalloc):
* xalloc.h (realloc):
Do not fail if malloc(0) or realloc(P, 0) returns NULL.
Fail only when the allocator returns null when attempting to
allocate a nonzero number of bytes.
2014-11-19 Arnold D. Robbins <arnold@skeeve.com>
Infrastructure upgrades:
* Automake 1.14.1, Gettext 0.19.3, Libtool 2.4.3.
* compile, extension/build-aux/compile: New files.
2014-11-19 gettextize <bug-gnu-gettext@gnu.org>
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.3.
2014-11-16 Arnold D. Robbins <arnold@skeeve.com>
* interpret.h: Revert change of 2014-11-11 since it breaks
certain uses.
Unrelated:
* dfa.c: Sync with GNU grep.
2014-11-15 Arnold D. Robbins <arnold@skeeve.com>
* array.c, awk.h, awkgram.y, builtin.c, dfa.c, eval.c, field.c,
interpret.h, io.c, main.c, mpfr.c, node.c, re.c, regex_internal.h,
replace.c: Remove all uses of MBS_SUPPORT.
* regex_internal.h: Disable wide characters on DJGPP.
* mbsupport.h: Rework to be needed only for DJGPP.
2014-11-11 Arnold D. Robbins <arnold@skeeve.com>
Don't let memory used increase linearly in the size of
the input. Problem reported by dragan legic
<dragan.legic@yandex.ru>.
* field.c (set_record): NUL-terminate the buffer.
* interpret.h (r_interpret): Op_field_spec: if it's $0, increment
the valref. Op_store_var: if we got $0, handle it appropriately.
2014-11-10 Arnold D. Robbins <arnold@skeeve.com>
Reorder main.c activities so that we can set a locale on the
command line with the new, for now undocumented, -Z option.
* main.c (parse_args, set_locale_stuff): New functions.
(stopped_early): Made file level static.
(optlist, optab): Add new argument.
(main): Adjust ordering and move inline code into new functions.
2014-11-09 Andrew J. Schorr <aschorr@telemetry-investments.com>
* gawkapi.c (node_to_awk_value): When the type wanted is AWK_UNDEFINED
and a it's a Node_val set to Nnull_string, return AWK_UNDEFINED instead
of AWK_NUMBER 0.
2014-11-03 Norihiro Tanaka <noritnk@kcn.ne.jp>
* re.c (research): Use dfa superset to improve matching speed.
2014-11-02 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (div_on_left_mul_on_right): New function.
(parenthesize): Call it.
2014-10-30 Arnold D. Robbins <arnold@skeeve.com>
* configure: Regenerated after fix to m4/readline.m4.
Unrelated; fixes to profiling. Thanks to Hermann Peifer and
Manuel Collado for pointing out problems:
* profile.c (pprint): For Op_unary_minus, parenthesize -(-x)
correctly.
(prec_level): Get the levels right (checked the grammar).
(is_unary_minus): New function.
(pp_concat): Add checks for unary minus; needs to be parenthesized.
2014-10-29 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep. Again, again.
2014-10-28 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep. Again.
2014-10-25 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep.
2014-10-17 John E. Malmberg <wb8tyw@qsl.net>
* ext.c (close_extensions): Test for null pointer since
since this can be called by signal handler before the
pointers are initialized.
2014-10-15 Arnold D. Robbins <arnold@skeeve.com>
Make sane the handling of AWKPATH and AWKLIBPATH:
1. Don't explicitly search "."; it must be in the path either
physically or as null element a la the shell's $PATH
2. If environment's value was empty, use built-in default value.
3. Set ENVIRON["AWK*PATH"] to the path used.
* io.c (path_info): Remove try_cwd member.
(get_cwd): Removed, not needed anymore.
(do_find_source): Don't do explicit check in current directory.
It must come from the AWKPATH or AWKLIBPATH variable.
* main.c (path_environ): If value from environment was empty,
set it to the default. This is how gawk has behaved since 2.10.
2014-10-13 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c (__re_error_msgid): Make error message for REG_EBRACK
more helpful - also used for unmatched [:, [., [=.
Thanks to Davide Brini for raising the issue.
2014-10-12 KO Myung-Hun <komh78@gmail.com>
Fixes for OS/2:
* Makefile.am (install-exec-hook, uninstall-links): Use $(EXEEXT).
* getopt.h: Redefinitions if using KLIBC.
* io.c (_S_IFDIR, _S_IRWXU): Define if the more standard versions
are available.
2014-10-12 Arnold D. Robbins <arnold@skeeve.com>
* README: Remove Pat Rankin from VMS duties, per his request.
2014-10-08 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep.
2014-10-05 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pprint): Fix typo in header. Sheesh.
2014-10-04 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_string_fp): Fix breaklines case to actually
output the current letter. This broke at gawk 4.0.0. Sigh.
Thanks to Bert Bos (bert@w3.org) for the report.
2014-09-29 Andrew J. Schorr <aschorr@telemetry-investments.com>
* main.c (main): In optlist, it should say "h", not "h:", since there
is no argument for the help option. Thanks to Joep van Delft for
the bug report.
2014-09-29 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Minor edits to sync with documentation. Does not
influence the behavior of the API.
2014-09-28 Arnold D. Robbins <arnold@skeeve.com>
* command.y (cmdtab): Add "where" as an alias for "backtrace".
Finally!
Unrelated:
* dfa.c: Sync with GNU grep.
2014-09-27 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (check_for_bad): Bitwise-and the bad character with 0xFF
to avoid sign extension into a large integer.
Unrelated:
* configure.ac: Add an option to enable locale letters in identifiers.
Undocumented and subject to being rescinded at any time in the future.
* NEWS: Mention to look at configure --help.
Unrelated:
* profile.c (pprint): Use "rule(s)" instead of "block(s)" in the
header.
2014-09-23 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Don't check for junk characters inside
quoted strings. Caused issues on DJGPP and Solaris.
Unrelated:
* io.c (devopen): Straighten things out with respect to
compatibility with BWK awk.
2014-09-19 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y: Further commentary as to the treacherousness
of isalnum and isalpha.
2014-09-15 Arnold D. Robbins <arnold@skeeve.com>
Finish removing use of isalpha and isalnum.
* awk.h (is_alpha, is_alnum, is_identchar): Add declarations.
* awkgram.y (yylex): Use is_alpha.
(is_alpha, is_alnum): New functions.
(is_identchar): Use is_alnum.
* builtin.c (r_format_tree): Use is_alpha, is_alnum.
* command.y (yylex): Use is_alpha, is_identchar.
* ext.c (is_letter): Use is_alpha.
(is_identifier_char): Removed; replaced uses with is_identchar.
* main.c (arg_assign): Use is_alpha, is_alnum.
* node.c (r_force_number): Use is_alpha.
2014-09-14 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (is_identchar): Change from simple macro to function
since use of isalnum() let non-ASCII letters slip through into
identifiers.
2014-09-07 Arnold D. Robbins <arnold@skeeve.com>
* awk.h: Move libsigsegv stuff to ...
* main.c: here. Thanks to Yehezkel Bernat for motivating
the cleanup.
* symbol.c (make_symbol, install, install_symbol): Add const to
first parameter. Adjust decls and fix up uses.
2014-09-05 Arnold D. Robbins <arnold@skeeve.com>
Add builtin functions to FUNCTAB for consistency.
* awk.h (Node_builtin_func): New node type.
(install_builtins): Declare new function.
* awkgram.y [DEBUG_USE]: New flag value for debug functions; they
don't go into FUNCTAB.
(install_builtins): New function.
* eval.c (nodetypes): Add Node_builtin_func.
* interpret.h (r_interpret): Rework indirect calls of built-ins
since they're now in the symbol table.
* main.c (main): Call `install_builtins'.
* symbol.c (install): Adjust for Node_builtin_func.
(load_symbols): Ditto.
2014-09-04 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pprint): Case Op_K_for: Improve printing of
empty for loop header.
Unrelated: Make indirect function calls work for built-in and
extension functions.
* awkgram.y (lookup_builtin): New function.
* awk.h (builtin_func_t): New typedef.
(lookup_builtin): Declare it.
* interpret.h (r_interpret): For indirect calls, add code to
find and call builtin functions, and call extension functions.
2014-09-01 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_substr): Return "" instead of null string in case
result is passed to length() with --lint. Based on discussions in
comp.lang.awk.
Unrelated:
* interpret.h (r_interpret): For indirect function call, separate
error message if lookup returned NULL. Otherwise got a core dump.
Thanks to "Kenny McKormack" for the report in comp.lang.awk.
2014-08-27 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Add test for strcasecmp.
* regcomp.c: Remove special case code around use of strcasecmp().
* replace.c: Include missing/strncasecmp.c if either strcasecmp()
or strncasecmp() aren't available.
2014-08-26 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c, regex_internal.c: Sync with GBLIC. Why not.
2014-08-18 Arnold D. Robbins <arnold@skeeve.com>
* symbol.c: General formatting cleanup.
2014-08-15 Arnold D. Robbins <arnold@skeeve.com>
* main.c (usage): Adjust whitespace for -L and add "invalid"
as a possible value for it. Report from Robert P. J. Day
<rpjday@crashcourse.ca>.
2014-08-14 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (SUBDIRS): Put awklib after doc so that examples
get extracted when the doc changes.
2014-08-13 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_sub): Move initial allocation of the replacement
string down towards code to do the replacement, with a (we hope)
better guesstimate of how much to initially allocate. The idea
is to avoid unnecessary realloc() calls by making a better guess
at how much to allocate. This came up in an email discussion
with Tom Dickey about mawk's gsub().
2014-08-12 Arnold D. Robbins <arnold@skeeve.com>
OFS being set should rebuild $0 using previous OFS if $0
needs to be rebuilt. Thanks to Mike Brennan for pointing this out.
* awk.h (rebuild_record): Declare.
* eval.c (set_OFS): If not being called from var_init(), check
if $0 needs rebuilding. If so, parse the record fully and rebuild it.
Make OFS point to a separate copy of the new OFS for next time, since
OFS_node->var_value->stptr was already updated at this point.
* field.c (rebuild_record): Is now extern instead of static.
Use OFS and OFSlen instead of the value of OFS_node.
Unrelated:
* Makefile.am (RM): Define for makes that don't have it,
such as on OpenBSD. Thanks to Jeremie Courreges-Anglas
<jca@wxcvbn.org> for the report.
2014-08-05 Arnold D. Robbins <arnold@skeeve.com>
Bug fix: For MPFR sqrt(), need to set precision of result to be
the same as that of the argument. Doesn't hurt other functions.
See test/mpfrsqrt.awk. Thank to Katie Wasserman <katie@wass.net>
for the bug report.
* mpfr.c (do_mpfr_func): New function. Runs code for MPFR functions
while still enabling debugging. Add call here to mpfr_set_prec().
Original code from SPEC_MATH macro.
(SPEC_MATH): Change macro to call do_mpfr_func().
Next MPFR bug fix: The % operator gave strange results for negative
numerator. Thanks again to Katie Wasserman for the bug report.
* mpfr.c (mpg_mod): Use mpz_tdiv_qr() instead of mpz_mod(). From
the GMP doc, mpz_mod() should have worked; it's not clear why
it doesn't.
2014-08-03 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_tree): Don't need to check return value of
wctombr for -2. Thanks to Eli Zaretskii for pointing this out.
Unrelated:
* gawkapi.h: Fix doc for API get_record - errcode needs to
be greater than zero.
* interpret.h (r_interpret): Move setting of ERRNO to here, from ...
* io.c (inrec): ... here. Makes the code cleaner.
2014-08-03 Andrew J. Schorr <aschorr@telemetry-investments.com>
* awkgram.y (getfname): Match on either ptr or ptr2 so --profile
will work in -M (MPFR bignum) mode.
2014-07-31 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_tree): Make %c handling more sane on Windows.
Rework the lint messages.
Unrelated:
* dfa.c: Sync with GNU grep. Mainly white space differences.
Unrelated:
* mpfr.c (cleanup_mpfr): New function to deallocate _mpf_t1
and _mpf_t2; removes some valgrind warnings.
* awk.h (cleanup_mpfr): Add declaration.
* main.c (main): Add call to `cleanup_mpfr'.
2014-07-25 Arnold D. Robbins <arnold@skeeve.com>
* main.c (main): Add a warning message if -M is used and gawk was
compiled without MPFR/GMP.
2014-07-24 Arnold D. Robbins <arnold@skeeve.com>
* main.c (usage): Put text for `-n' *after* text for `-m'.
Report from Robert P. J. Day <rpjday@crashcourse.ca>.
Fix problems with I/O errors reported by Assaf Gordon
<assafgordon@gmail.com>:
* io.c (inrec): Change type to bool to make calling easier. Add
check in non-EOF case for error, and if so, return false.
Update ERRNO in case there is an ENDFILE block.
* awk.h (inrec): Change type in declaration.
* interpret.h (r_interpret): Change call of inrec() to boolean
notation.
2014-07-10 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (check_for_bad): New routine to do the fatal message,
with smarter checking.
(nextc): Call it as appropriate.
* builtin.c (format_tree): Add check for bad returns from mbrlen
to avoid trying to malloc (size_t) -1 bytes. Thanks to
mail.green.fox@gmail.com for the bug report.
2014-07-03 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (nextc): Add bool check_for_bad parameter to check
for bad characters in the source program.
(yylex): Adjust calls.
2014-06-22 Paul Eggert <eggert@penguin.cs.ucla.edu>
Bring in from GNULIB:
regex: fix memory leak in compiler
Fix by Andreas Schwab in:
https://sourceware.org/ml/libc-alpha/2014-06/msg00462.html
* lib/regcomp.c (parse_expression): Deallocate partially
constructed tree before returning error.
2014-06-19 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_sub): Add more info to leading comment.
Add some whitespace in the code.
2014-06-08 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep.
2014-06-03 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c (mbs_to_wchar): Define a macro if not MBS.
2014-05-29 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep.
2014-05-26 Arnold D. Robbins <arnold@skeeve.com>
* io.c (inetfile): Change return type to bool. Wrap code
with ifdef HAVE_SOCKETS so that it'll compile on DJGPP.
2014-05-22 Andrew J. Schorr <aschorr@telemetry-investments.com>
Allow any redirected getline inside BEGINFILE/ENDFILE.
* awkgram.y (LEX_GETLINE): Only require a redirection and not also
a variable if getline is in a BEGINFILE or ENDFILE rule.
* interpret.h (Op_K_getline_redir): Remove check and fatal error.
2014-05-20 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c (dfaexec): Minor sync with GNU grep.
2014-05-14 Arnold D. Robbins <arnold@skeeve.com>
* custom.h (_GL_PURE): Move definition to here. Sigh.
* dfa.h, dfa.c: Sync with GNU grep. Sigh.
Unrelated:
* custom.h: Remove stuff for Ultrix 4.3. No one has such
systems anymore; this just got missed earlier.
2014-05-11 Arnold D. Robbins <arnold@skeeve.com>
* debug.c (do_eval): Repair fix of 2014-05-09 and use
assoc_remove to take @eval out of the function table.
* symbol.c: Fix a comment. This file needs some work.
2014-05-10 Arnold D. Robbins <arnold@skeeve.com>
* io.c (get_a_record): Finish TERMNEAREND handling in case
we don't have a regular file but aren't going to get more data.
Added some additional comments.
2014-05-09 Arnold D. Robbins <arnold@skeeve.com>
* debug.c (do_eval): Don't free `f' which points into the context
that was previously freed. Bug reported by Jan Chaloupka
<jchaloup@redhat.com>. Apparently introduced with move to
SYMTAB and FUNCTAB, but only showed up on Fedora 20 and Ubuntu 14.04,
which have a newer glibc.
(do_eval): Fix a memory leak seen by valgrind on Fedora 20 and
Ubuntu 14.04: the new SRCFILE that is added wasn't released.
Unrelated:
* io.c (get_a_record): Handle return of TERMNEAREND when the
entire file has been read into the buffer and we're using a
regex for RS. Bug report by Grail Dane <grail69@hotmail.com>.
2014-05-04 Arnold D. Robbins <arnold@skeeve.com>
* debug.c (debug_prog): Change check for GAWK_RESTART so that it
actually works. Bug fix: run command in debugger would start
over again but not actually start running the program.
2014-04-25 Andrew J. Schorr <aschorr@telemetry-investments.com>
* io.c (two_way_open): In forked child, reset SIGPIPE to SIG_DFL.
Fixes problems with "broken pipe" errors from child processes,
restoring 4.1.0 and earlier behavior. Thanks to Daryl F
<wyatt@prairieturtle.ca> for the report.
(gawk_popen): Ditto.
2014-04-25 Arnold D. Robbins <arnold@skeeve.com>
* dfa.h, dfa.c: Merge with GNU grep; lots of forward motion.
2014-04-24 Arnold D. Robbins <arnold@skeeve.com>
Update xalloc.h for pending merge with dfa.
* xalloc.h (xstrdup): Implement this.
(x2nrealloc): Incorporate changed logic from GNULIB.
2014-04-20 Andrew J. Schorr <aschorr@telemetry-investments.com>
* io.c (struct inet_socket_info): Define new structure
for use in parsing special socket filenames.
(inetfile): Parse all components of the special socket filename
into the struct inet_socket_info. Returns true only if it is a
valid socket fliename, unlike the previous version which checked
for the '/inet[46]?/' prefix only.
(redirect): Patch to use updated inetfile() function.
(devopen): Remove logic to parse socket filenames, since this has
been moved into the inetfile() function.
(two_way_open): Update args to inetfile().
2014-04-18 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Change adding of -export-dynamic for GCC to be
-Wl,-export-dynamic, which then works for PCC also.
2014-04-11 Arnold D. Robbins <arnold@skeeve.com>
* io.c (closemabyesocket): Define if not defined, e.g. building
without socket code. Thanks to dave.gma@googlemail.com (Dave Sines)
for the report.
2014-04-08 Arnold D. Robbins <arnold@skeeve.com>
* 4.1.1: Release tar ball made.
2014-04-08 Arnold D. Robbins <arnold@skeeve.com>
* README: Update.
* configure.ac: Bump version.
2014-04-03 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c (parse_bracket_exp): Move a call to `re_free' inside
an ifdef. Makes the code marginally cleaner.
2014-03-30 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep.
2014-03-28 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Remove duplicate AC_HEADER_TIME and rearrange
order of macros some. May help on older systems.
2014-03-23 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Move include of dfa.h around for correct building
on Irix. Thanks to Nelson H.F. Beebe for the report.
Unrelated:
* .gitignore: Simplify .dSYM pattern for Mac OS X.
2014-03-21 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c (using_simple_locale): Add ifdefs in case there is no
locale support at all. Thanks to Scott Deifik for the report.
Unrelated:
* main.c (UPDATE_YEAR): Set to 2014.
2014-03-17 Arnold D. Robbins <arnold@skeeve.com>
* .gitignore: Add .dSYM directories for Mac OS X.
Thanks to Hermann Peifer for the suggestion.
2014-03-10 Arnold D. Robbins <arnold@skeeve.com>
* dfa.h, dfa.c: Sync with grep. Yet again.
* regex_internal.c (built_wcs_upper_buffer, build_upper_buffer):
Fixes from GNULIB for mixed case matching on Mac OS X.
Unrelated:
* builtin.c (format_tree): Smarten handling of %' flag. Always
pass it in for floating point formats. Then only add the
thousands_sep if there is one. Also, allow for thousands_sep
to be a string, not just one character. Thanks to Michal Jaegermann
for the report.
2014-03-08 Andrew J. Schorr <aschorr@telemetry-investments.com>
* gawkapi.c (api_impl): Add memory allocation function pointers.
* gawkapi.h (GAWK_API_MINOR_VERSION): Bump.
(gawk_api_t): Add memory allocation function pointers api_malloc,
api_calloc, api_realloc, and api_free.
(gawk_malloc, gawk_calloc, gawk_realloc, gawk_free): New macros.