forked from redox-os/gawk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog.0
9885 lines (7165 loc) · 370 KB
/
ChangeLog.0
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
Mon Jun 20 20:33:26 2011 Arnold D. Robbins <[email protected]>
* dfa.c (dfaanalyze): Allocate the right number of leaves to
avoid crashes. Thanks to Jim Meyering.
Mon Jun 20 20:22:35 2011 Arnold D. Robbins <[email protected]>
* dfa.c (setbit_c, setbit_case_fold_c): Compare btowc result against
WEOF. Thanks to Eli Zaretskii for pointing out the problem.
Mon Jun 20 20:22:26 2011 Pat Rankin <[email protected]>
* dfa.c (addtok_wc): enclose prototype within #if MBS_SUPPORT.
Fri Jun 17 11:09:22 2011 Arnold D. Robbins <[email protected]>
* Release 3.1.86: Final beta test tar ball for 4.0.
Fri Jun 17 10:55:27 2011 Arnold D. Robbins <[email protected]>
Implement Rational Range Interpretation (RRI) directly in code.
* regex.h [RE_RANGES_IGNORE_LOCALES]: Remove macro and its use.
* dfa.c (parse_bracket_exp): Remove use of RE_RANGES_IGNORE_LOCALES
and just do it in code.
(hard-locale.h): Remove include.
(hard_LC_COLLATE): Remove variable and its uses.
* re.c (resetup): Remove use of RE_RANGES_IGNORE_LOCALES.
* regcomp.c (build_range_exp): Remove use of RE_RANGES_IGNORE_LOCALES
and just do it in code. Remove cmp_buf array; it's no longer needed.
* Makefile.am (base_sources): Remove hard_locale.h and hard_locale.c.
* hard_locale.h, hard_locale.c: Removed from dist.
Sun Jun 12 23:43:06 2011 Arnold D. Robbins <[email protected]>
* re.c (resetup): Always turn on RE_RANGES_IGNORE_LOCALES.
Add justifying comment with URLs for the relevant portions of
POSIX. Thanks to Paul Eggert for pointing out the happy change
to the rules and supplying the URLs.
Wed Jun 8 22:41:30 2011 Arnold D. Robbins <[email protected]>
* regcomp.c (build_range_exp): Add check for RE_NO_EMPTY_RANGES
from GNULIB regcomp.c, courtesy of GNU grep.
Wed Jun 8 22:10:03 2011 Arnold D. Robbins <[email protected]>
* dfa.c: Sync with GNU grep.
Sun Jun 5 21:49:30 2011 Arnold D. Robbins <[email protected]>
* Release 3.1.85: Fourth beta test tar ball for 4.0.
Sun Jun 5 21:39:17 2011 Arnold D. Robbins <[email protected]>
* field.c (fpat_parse_field): Bug fix. Thanks to
"Radoulov, Dimitre" <[email protected]> for pointing
out the problem.
Fri Jun 3 10:39:17 2011 Arnold D. Robbins <[email protected]>
* regcomp.c (build_range_exp): Make syntax the first argument,
for compatibility with gnulib version of the file.
Wed Jun 1 06:29:27 2011 Pat Rankin <[email protected]>
* re.c (check_bracket_exp): Fix typo.
Tue May 31 23:01:00 2011 John Haque <[email protected]>
* re.c (check_bracket_exp): Use mem* routines instead of str*
for searching.
* main.c (arg_assign): Disallow builtin or user-defined function
as the name of a variable.
* awkgram.y (check_special): Rework so can be called from
arg_assign.
Tue May 31 22:23:41 2011 Arnold D. Robbins <[email protected]>
In order to attain the goal of having ranges act like they are
always in the C locale, bit the bullet and did the work in
the regex and dfa engines. The pre-processing routine was not
handling too many cases that a full regexp parser would catch.
* regex.h [RE_RANGES_IGNORE_LOCALES]: New syntax bit.
(RE_SYNTAX_GNU_AWK): Use it.
* dfa.c (parse_bracket_exp): If the RE_RANGES_IGNORE_LOCALES
is set, ignore locales when building a range.
* re.c (expand_range): Remove function and declaration.
(add_char): Remove function and declaration.
(make_regexp): Remove use of expand_range.
(resetup): Add RE_RANGES_IGNORE_LOCALES if --traditional.
* regcomp.c (build_range_exp): Add syntax variable as last argument.
Add code to check for RE_RANGES_IGNORE_LOCALES and do the right thing.
Adjust all calls.
Sun May 29 22:48:41 2011 Arnold D. Robbins <[email protected]>
* re.c (expand_range): Handle cases where expanded range
includes '\\' (and ']'). Thanks to Juergen Daubert <[email protected]>.
Fatal error if end point is below start point ([z-a]),
thanks to John Haque. Don't repeat the last character in
the expansion. Thanks to Arnold Robbins.
Fri May 27 10:01:17 2011 Arnold D. Robbins <[email protected]>
* Release 3.1.84: Third beta test tar ball for 4.0.
Thu May 26 22:10:08 2011 Arnold D. Robbins <[email protected]>
* field.c (get_field): Enhance logic for setting NF if we're
using FPAT to parse fields. Can end up with weird cases. Thanks
to Pat Rankin for pointing them out.
Mon May 23 22:06:13 2011 Arnold D. Robbins <[email protected]>
* awkgram.y: Allow newline after comma in range patterns,
per POSIX. Thanks to discussion in comp.lang.awk. (!!!)
Mon May 23 22:02:46 2011 John Haque <[email protected]>
* ext.c (get_actual_argument): Change argument type from
Node_var_new to Node_var when used as a scalar.
Sun May 22 11:56:40 2011 Arnold D. Robbins <[email protected]>
* main.c (varinit): Give FPAT a reasonable default value.
* field (get_field): Adjust test for at end of record to >=;
fpat_parse_field can go beyond when matching null regexps.
Thanks to Pat Rankin.
Fri May 20 11:00:17 2011 Arnold D. Robbins <[email protected]>
* regex_internal.h (__attribute_warn_unused_result__): Always
ifdef out. Bleah.
Thu May 19 17:13:18 2011 Arnold D. Robbins <[email protected]>
* Release 3.1.83: Second beta test tar ball for 4.0.
Thu May 19 16:47:19 2011 Arnold D. Robbins <[email protected]>
* awkgram.y (dump_vars): Fix warning message. Thanks to Pat Rankin.
* main.c (usage): No space allowed after -d and -p. Also thanks
to Pat Rankin.
Thu May 19 16:34:04 2011 Pat Rankin <[email protected]>
* regex_internal.h (__attribute_warn_unused_result__): Define with
empty expansion for !__GNUC__ configuration.
Wed May 18 22:13:18 2011 Arnold D. Robbins <[email protected]>
* Release 3.1.82: Beta test tar ball for 4.0, we hope!
Wed May 18 21:47:54 2011 Arnold D. Robbins <[email protected]>
* io.c (PIPES_SIMULATED): Simplify the case where PIPES_SIMULATED
is true but using temporary files - that code not needed anymore.
* regcomp.c, regex.h, regex_internal.c, regex_internal.h,
regexec.c: Sync with GLIBC. Why not.
Mon May 16 17:55:25 2011 Arnold D. Robbins <[email protected]>
* awkgram.c: Regenerated using bison 2.5.
Sat May 14 22:25:50 2011 Arnold D. Robbins <[email protected]>
* io.c (nextfile): Use `in_array' in main loop to see if element
of ARGV exists, instead of using `assoc_lookup'. The latter creates
the element! A day one bug!
* dfa.c (parse_bracket_exp): For z/OS init pattern manually.
Mon May 9 16:30:49 2011 Arnold D. Robbins <[email protected]>
* array.c (sort_up_value_type): Remove unused variable ret.
(do_delete): Initialize local variables to silence warnings.
Thanks to Michal Jaegermann.
Mon May 9 15:07:29 2011 Corinna Vinschen <[email protected]>
* awk.h: Remove cygwin code for libsigsegv.
Sun May 8 20:38:03 2011 John Haque <[email protected]>
* eval.c (r_interpret): In case Op_sub_array, store only the
subarray index as 'vname'.
* array.c (make_aname): Redone for dynamic computation of
a subarray actual 'vname'.
(array_vname): Use make_aname() for (sub)array name.
(asort_actual): Performance optimization for asort(a).
Sun May 8 20:29:17 2011 Arnold D. Robbins <[email protected]>
* debug.c (print_array): Sort in order of string indices, per
request from John Haque.
* array.c (sort_up_value_number): Use string value to provide
ordering when numeric values are equal. Ensures that tests come
out OK on different systems.
Sun May 8 20:27:27 2011 Arnold D. Robbins <[email protected]>
* dfa.c: Sync with GNU grep.
* regex.h: Sync with GLIBC in preparation for submitting updates
back.
Thu May 5 21:22:44 2011 Arnold D. Robbins <[email protected]>
* eval.c (r_interpret): PROCINFO sorting only takes effect
if not do_posix.
Wed May 4 23:31:14 2011 Arnold D. Robbins <[email protected]>
Move array sorting to using predefined strings, add value sorting
by type of assignment.
* array.c (sort_up_value_type, sort_down_value_type): New routines.
(asort_actual): Pass string value to assoc_list, not NODE *.
Make sure indices of new arrays have numeric value set also.
(sort_up_value_number): Don't break the tie based on string value.
(sort_selection): Removed.
(assoc_list): Third arg is string constant. Add name to table of
functions. Linear search it.
* awk.h (assoc_list): Fix declaration.
* debug.c (print_array): And use of assoc_list.
* eval.c (r_interpret): Ditto.
Wed May 4 23:06:17 2011 John Haque <[email protected]>
* eval.c (setup_frame): Handle a Node_var in stack. Fixes
a problem when a Node_var_new as param becomes Node_var during
expresssion evaluation for a subsequent param.
Wed May 4 23:04:06 2011 John Haque <[email protected]>
Fix the problem (crash) with disappearing array argument when
it is a subarray of another deleted array argument.
* awk.h (struct exp_node): Nuke unused field sub.nodep.number.
New field sub.nodep.rn.
(parent_array): New definition for sub.nodep.rn to keep track
of the parent of a subarray.
* awkgram.y (mk_symbol): Initialize parent_array to NULL.
* eval.c (r_interpret): In the case Op_sub_array, assign
parent_array.
* array.c (get_array): Initialize parent_array to NULL when
a Node_var_new becomes a Node_var_array.
(assoc_find): Add a fourth argument for the previous node
of the returned bucket.
(in_array, assoc_lookup): Adjust calls to assoc_find().
(adjust_fcall_stack): New routine to change a soon-to-be deleted
subarray parameter in the function call stack to a local array.
(do_delete): Simplify code, remove recursive usage. Call
adjust_fcall_stack() where appropriate.
(do_delete_loop): Call adjust_fcall_stack() before clearing the
array.
(asort_actual): Don't accept an array and its subarray as
arguments for asort() or asorti().
(asort_actual, dup_table): For asort(), appropriately assign
parent_array when creating the result array.
* field.c (do_split, do_patsplit): An array and its subarray not
accepted for the second and the fourth arguments. Remove
unnecessary dupnode of the field seperator node.
Unrelated:
* awkgram.y (LEX_DELETE, simple_variable): Change type argument
from Node_var_array to Node_var_new for calls to variable().
* io.c (devopen): Fix parsing GAWK_MSEC_SLEEP env variable.
Mon May 2 23:44:34 2011 Arnold D. Robbins <[email protected]>
* dfa.c (parse_bracket_exp): Sync with GNU grep, since we
now require C 90, go ahead and put non-constant values into
the array initializers.
Mon May 2 23:37:09 2011 Corinna Vinschen <[email protected]>
* awk.h (small): Undef after include of <sigsegv.h> to compile
builtin.c on Cygwin.
Fri Apr 29 12:29:56 2011 Arnold D. Robbins <[email protected]>
* dfa.c: Sync with GNU grep, mainly typos in comments.
Fri Apr 29 12:13:32 2011 Arnold D. Robbins <[email protected]>
* io.c (inetfile): Change ifdef to ifndef for have getaddrinfo.
Ooops.
Fri Apr 29 11:49:38 2011 Arnold D. Robbins <[email protected]>
Per Pat Rankin, remove code related to GFMT_WORKAROUND and VAXCRTL.
* builtin.c (sgfmt): Nuked.
(format_tree): Removed code related to GFMT_WORKAROUND and VAXCRTL.
* node.c (format_val): Revise comment.
Fri Apr 29 11:33:08 2011 Arnold D. Robbins <[email protected]>
* awk.h (NUMIND): New flag, indicates numeric value of an
array index is current.
* array.c (awk_hash): Remove code for VAXC, it's no longer
needed. Per Pat Rankin.
(assoc_lookup): Only assign the numeric value if it's available.
(do_delete): Add comment about free_subs calling force_string.
(sort_force_index): Use NUMIND.
Fri Apr 29 10:15:24 2011 John Haque <[email protected]>
* builtin.c: Relocate all codes from awkprintf.h. Restore
format_tree.
* debug.c (do_print_f): Adjust appropriately. Install fatal trap
for format_tree.
* Makefile.am (base_sources): Remove awkprintf.h.
* array.c (assoc_list): Avoid possible crash; Remove unneeded
initialization of pre_func.
Wed Apr 27 22:31:23 2011 Arnold D. Robbins <[email protected]>
* awk.h (ahash_dupnode): Merged into dupnode in node.c, change uses.
* array.c (ahash_unref): Merged into unref in node.c, change all uses.
* node.c (dupnode): Revised to support Node_ahash.
(unref): Ditto.
Lots of code clean up in array.c:
* array.c (AVG_CHAIN_MAX): Made unsigned.
(array_init): Use strtoul to convert value instead of doing it
manually.
(array_vname): Nuke code that could limit length of name. It
was never used.
(concat_exp): Make len unsigned, clean up the calculation.
(assoc_lookup): Set ahname_num in the index at time of element
creation.
(dup_table): Copy ahname_num also.
Other minor cleanups after code review.
Sun Apr 24 15:39:19 2011 Arnold D. Robbins <[email protected]>
* NEWS.0: Moved all pre-4.0 news to here.
* NEWS: Shortened.
* Makefile.am (EXTRA_DIST): Add NEWS.0.
Sun Apr 24 12:43:49 2011 John Haque <[email protected]>
* array.c (sort_user_func): Fix return value to match the
documentaion.
(sort_selection): Make user-specified comparison function with
the same name override default "unsorted" specification.
Fri Apr 22 16:05:27 2011 John Haque <[email protected]>
* array.c (sort_user_func): New routine to handle user-defined
quicksort comparison function.
(assoc_list): Adjust for user-defined comparison function.
Fri Apr 22 09:18:16 2011 Arnold D. Robbins <[email protected]>
* array.c (awk_hash): Force results into 32 bits for consistency
across platforms. Keeps the test suite happy. This may turn out
to be a bad idea in the long run.
Mon Apr 18 10:18:26 2011 John Haque <[email protected]>
* array.c (assoc_list): New function to construct, and optionally
sort, a list of array elements.
(asort_actual): Use the new function to sort array elements.
(assoc_sort_inplace, assoc_from_list, merge_sort, merge): Nuked.
(sort_selection): Simplify handling of error and warning messages.
(sorted_in, sort_match): Nuked, related code in sort_selection() and
assoc_list().
(sort_ignorecase, sort_up_index_ignrcase, sort_down_index_ignrcase,
sort_maybe_numeric_index, sort_cmp_nodes, cmp_func, sort_up_value,
sort_down_value): Nuked. Ignorecase handling done in the corresponding
non-ignorecase versions.
(cmp_string): New routine for string comparisons.
(sort_up_value_string, sort_down_value_string, sort_up_value_number,
sort_down_value_number, sort_force_index_number,
sort_force_value_number, sort_force_value_string): New routines.
* awk.h (struct exp_node): New field sub.hash.num to store the
numeric value of an array index.
(ahname_num): New define.
(SORT_CTXT): New typedef.
* awkgram.y (tokentab): Accept three args for asort() and asorti().
(snode): Adjust for the extra args.
* eval.c (r_interpret): In case Op_arrayfor_init, call assoc_list()
for a list of array elements.
* debug.c (print_array): Call assoc_list() for a sorted list of array
elements.
Wed Apr 13 10:17:37 2011 John Haque <[email protected]>
* builtin.c (do_strftime): Make the third argument to strftime
really work.
* io.c (redirect): Do not free `rp' after failure to open socket
in redirect_twoway. Fixes a double-free memory error.
Thu Apr 7 21:38:08 2011 Arnold D. Robbins <[email protected]>
* array.c (merge): Use sort_cmp_nodes for asort/asorti.
See test/arraysort.awk test 1.
Thu Apr 7 10:48:21 2011 Pat Rankin <[email protected]>
* array.c (sort_cmp_nodes): New routine. Unlike cmp_nodes, numbers
are less than strings instead of being formatted and then compared.
(sort_up_value): Use it.
Sun Apr 3 22:18:26 2011 Arnold D. Robbins <[email protected]>
* README, FUTURE: Minor edits.
Fri Apr 1 11:53:54 2011 Pat Rankin <[email protected]>
* array.c (sort_up_index_number): Fix the NODE arguments passed to
sort_up_index_string() when a tie breaker is needed.
Fri Apr 1 11:49:17 2011 Arnold D. Robbins <[email protected]>
Change ISATTY macro to os_isatty function.
* awk.h (ISATTY): Remove definition.
(os_isatty): Add declaration.
* debug.c, io.c, main.c: Change all calls.
Thu Mar 31 22:57:36 2011 Arnold D. Robbins <[email protected]>
* Checklist: Updated. This is a git-only file.
* POSIX.STD: Revised some.
Tue Mar 29 20:52:38 2011 John Haque <[email protected]>
* awkgram.y (LEXT_NEXT): Don't issue an error message if the next
statement is in a function (rule = 0).
Always resolve the jump target for an exit statement at run-time.
This fixes a bug when the statement occurs in a function.
* awk.h: New defines target_atexit and target_end.
* awkgram.y (LEX_EXIT): Initilize the jump targets.
* eval.c (r_interpret): Use current rule to choose the jump target
for Op_K_exit.
* debug.c (print_instruction): Adjust case Op_K_exit.
Tue Mar 29 20:45:49 2011 Pat Rankin <[email protected]>
Move the code to support sorting `for (index in array)' from
eval.c to array.c, and implement several additional orderings.
* array.c (comp_func, sorted_in, sort_ignorecase,
sort_up_index_ignrcase, sort_down_index_ignrcase): Move from eval.c.
(sort_up_index_string, sort_down_index_string): Move from eval.c
and rename from *_str to *_string.
(sort_selection, sort_match, sort_maybe_numeric_index,
sort_up_index_number, sort_down_index_number,
sort_up_value, sort_down_value): New routines.
* eval.c (sort_&c): Move to array.c.
(r_interpret: case Op_arrayfor_init): Call sort_maybe_numeric_index
before and after qsort.
* awk.h (qsort_compfunc): New typedef.
(sorted_in, sort_maybe_numeric_index): Declare.
Fri Mar 25 13:15:36 2011 Arnold D. Robbins <[email protected]>
* awk.h: Move libsigsegv portability checks to here from main.c.
* eval.c (fcall_list, fcall_count): Move definitions to here
from main.c.
* io.c (do_find_source): Check against NULL in for loop.
* main.c: Lots of cleanup. Move some things out to other files,
add comments to some variable definitions.
(enum asgntype): To assign_type
(main): Remove decls of getopt variables, clean up comments.
Use emalloc and efree for libsigsegv stack. Remove check for SCCS
leading magic characters.
(add_preassign): Change allocassigns to alloc_assigns.
(init_locale): Change strdup calls to estrdup.
(save_argv): Make the routine static.
* version.in (version_string): Remove leading 4 SCCS magic characters.
Wed Mar 2 08:15:02 2011 John Haque <[email protected]>
* array.c (asort_actual): Handle the case when the same array
is used as the source and destination.
* field.c (do_split): Make it fatal if attempting to use the same
array for both second and fourth arguments.
(do_patsplit): Ditto.
Sun Feb 27 08:01:04 2011 Arnold D. Robbins <[email protected]>
Update copryright in all relevant files.
Sat Feb 26 21:54:07 2011 Arnold D. Robbins <[email protected]>
* eval.c (sorted_in): Revise text of lint warning.
Fri Feb 25 17:34:14 2011 Pat Rankin <[email protected]>
* eval.c (sorted_in): Remove incorrect unref() call.
Wed Feb 23 21:48:20 2011 Arnold D. Robbins <[email protected]>
* main.c (main): Free extra_stack, to make valgrind happier.
Tue Feb 22 12:04:09 2011 Arnold D. Robbins <[email protected]>
* main.c (UPDATE_YEAR): Move to 2011. Fix copyright.
Tue Feb 15 17:11:26 2011 Pat Rankin <[email protected]>
* eval.c (sorted_in, sort_up_index_str, sort_down_index_str,
sort_up_index_ignrcase, sort_down_index_ignrcase, sort_ignorecase):
New functions to sort arrays for `for (index in array)' statements.
(r_interpret: case Op_arrayfor_init): Call sorted_in().
Wed Feb 16 07:12:50 2011 John Haque <[email protected]>
Fix line numbers in the lint, warning and error messages issued
by the parser.
* awkgram.y (lintwarn_ln, warning_ln, error_ln): New local versions,
each accepts an additional line number argument.
(print_included_from): New function to seperate 'Included from ..'
message from yyerror. Use it in yyerror, and in the new functions.
(grammar): Use the local versions for messages.
(add_srcfile, include_source, dup_parms, func_install, param_sanity,
mk_binary, add_lint): Ditto.
(dup_params, include_source): Adjust arguments to pass line number.
* awk.h: New definition ATTRIBUTE_PRINTF_2.
* awkgram.y (yylex): New variable warntab. Use it to issue only one
warning for the same non-standard special token in source.
(parse_program): Avoid spurious warnings. Don't call check_funcs if
yyparse aborts prematurely.
Mon Feb 14 08:03:41 2011 John Haque <[email protected]>
* awkgram.y (regexp): Don't use tokstart in lint warning, it isn't
`\0' terminated.
(grammar): Copy update and assign routines from relevant variables into
instructions to avoid extra pointer dereferencing at run-time.
* awk.h (update_var, assign_var): new definitions.
* eval.c (r_interpret): Adjust cases Op_var_assign and Op_var_update.
Sun Feb 13 20:22:47 2011 Eli Zaretskii <[email protected]>
* awkgram.y (add_srcfile):
* debug.c (source_find): Pass `path' and `src' to files_are_same.
* gawkmisc.c [__DJGPP__ || __MINGW32__]: Include pc/gawkmisc.pc,
for consistency with __EMX__ and pc/Makefile.
* debug.c (interpret, initialize_pager, prompt_continue)
(set_gawk_output): Use ISATTY instead of isatty.
* io.c (redirect, iop_alloc): Same.
* main.c (main): Same.
* awk.h (ISATTY): Trivial definition, if not defined elsewhere.
Sun Feb 13 20:16:04 2011 Arnold D. Robbins <[email protected]>
* awkgram.y (check_funcs): Update warning about never called to say
"never called directly" since it could be called indirectly.
Sun Feb 13 07:12:50 2011 John Haque <[email protected]>
* profile.c (pprint): In case Op_indirect_func_call, pop off
indirect var after function parameters.
Thanks to Hermann Peifer <[email protected]> for the bug report.
* array.c (do_delete): Always free an empty sub-array name and node.
* ChangeLog: Fix typos.
Fri Feb 11 10:26:25 2011 Arnold D. Robbins <[email protected]>
* io.c (remad_std_file): Close oldfd first, in case we've
run out of fd and do dup2 if the newfd isn't what we were
looking for. Thanks to Hermann Peifer <[email protected]> for
the bug report.
Thu Feb 10 21:31:36 2011 Andreas Buening <[email protected]>
* main.c (load_procinfo): Fix warning about unsed variables if we
don't have multiple groups.
* protos.h: Move decls for many standard functions here if
they aren't in the header files (OS/2) and bracket inside
#ifndef STDC_HEADERS.
* io.c (devopen): Remove decl of strtoul.
* field.c (set_FIELDWIDTHS): Same.
* awk.h: Always include protos.h.
Tue Feb 8 22:46:22 2011 Arnold D. Robbins <[email protected]>
* array.c, builtin.c, eval.c: Equalize message strings and
fix a typo. Thanks to Benno Schulenberg <[email protected]>.
Mon Feb 7 11:23:33 2011 Arnold D. Robbins <[email protected]>
* awkgram.y (next_sourcefile): Comment out assertion that
lexeof is true; causes core dump on user typos of bad
characters which previous versions did not do. Thanks to
Pat Rankin for the report.
* re.c (expand_range): Allow for ^ as first character
inside range. Thanks for Nelson Beebe for the bug report.
Fri Feb 4 10:28:19 2011 Arnold D. Robbins <[email protected]>
* README.cvs: Udpated.
* Checklist: New file for storage in the git repository.
Wed Feb 2 20:34:41 2011 Corinna Vinschen <[email protected]>
* awkgram.y (free_bc_internal): Remove unused variable.
Tue Feb 1 23:13:10 2011 Arnold D. Robbins <[email protected]>
* bootstrap.sh: No need to find aclocal.m4, just touch it.
Tue Feb 1 23:05:51 2011 Corinna Vinschen <[email protected]>
Make values of ctype macros into unsigned char to fix
warnings found on Cygwin / Newlib.
* array.c (array_init): Add cast.
* awkgram.y: Ditto.
* awkprintf.h: Ditto.
* builtin.c (sub_common, nondec2awknum): Ditto.
* command.y: Ditto.
* eval.c (fmt_ok): Ditto.
* ext.c (make_builtin): Ditto.
* main.c (main, arg_assign): Ditto.
* re.c (check_bracket_exp): Ditto.
* node.c (r_force_number, parse_escape): Ditto.
(dump_wstr): Add unused attribute (unrelated).
Tue Feb 1 23:01:40 2011 John Haque <[email protected]>
Fix switch debugging.
* awkgram.y (LEX_SWITCH, case_statements, case_statement,
case_value): Linearize instructions to facilitate debugging.
(switch_body): Removed.
(yylex): Add LEX_CASE in special token processing.
(free_bc_internal): Remove case Op_K_switch.
* awk.h (OPCODE): Remove opcode Op_case_list.
* eval.c (r_interpret): Remove Op_K_switch. Add case
Op_K_case to handle switch.
Add cases Op_K_do, Op_K_while, Op_K_for, Op_K_arrayfor, Op_K_switch
and Op_K_default as no-ops, needed for pgawk.
* debug.c (print_instruction): Remove case Op_K_switch,
add case Op_K_case instead.
Unrelated:
* awkgram.y (case_statements): As case values, "abc" and /abc/
no longer considered as duplicates.
Cleanup grammar and run-time code for switch and loops.
Jump targets for break and continue are now fixed, and known
at parse time. See ChangeLog entry dated Oct 21, 2010.
* awk.h (OPCODE): Remove Op_push_loop and Op_pop_loop.
(loop_count): Remove definition.
* awkgram.y (fix_break_continue): Change calling parameters to
instruction list, break and continue targets. Adjust code.
(LEX_DO, LEX_WHILE, LEX_SWITCH, LEX_FOR): Simplify grammar. Use
Op_no_op as target for break. Adjust call to fix_break_continue.
(mk_for_loop): Ditto.
* eval.c (r_interpret): Nuke cases Op_push_loop and Op_pop_loop.
Simplify Op_K_break and Op_K_continue. Remove declaration of in_loop
and all loop detection code thereof.
* debug.c (pre_execute, post_execute): Adjust declarations and code.
(print_instruction): Nuke cases Op_push_loop and Op_pop_loop.
* eval.c (r_interpret): Adjust calls to pre_execute and post_execute.
* profile.c (pprint): Adjust cases Op_K_for, Op_K_do, Op_K_while,
Op_K_switch and Op_K_arrayfor. Add cases Op_K_case and Op_K_default.
Remove Op_push_loop and Op_pop_loop.
Unrelated cleanup:
* awkgram.y (mk_condition): Don't include Op_K_if, Op_K_else and
Op_cond_exp if not profiling.
Tue Feb 1 10:20:02 2011 Arnold D. Robbins <[email protected]>
* eval.c (r_interpret): Change magic string for array sorting.
Sun Jan 30 21:49:53 2011 John Haque <[email protected]>
Add `isarray' built-in function.
* awk.h (enum opcodeval): Op_push_arg: new opcode.
(do_isarray): Add declaration.
* awkgram.y (tokentab): Add new entry for `isarray' function.
(snode): Add handling for it.
* builtin.c (do_isarray): New function.
(do_length): Die if posix and get an array argument.
* debug.c (print_instruction): Handle Op_push_arg.
* profile.c (pprint): Likewise.
* eval.c (optypes, r_interpret): Likewise.
Sun Jan 30 21:13:01 2011 Arnold D. Robbins <[email protected]>
* hard-locale.h: Synced to GNU grep.
* hard-locale.c: New file, brought in from GNU grep.
* Makefile.am (base_sources): Add hard-locale.c.
* dfa.h: Sync as much as possible to GNU grep.
* dfa.c: Sync as much as possible to GNU grep.
* builtin.c (do_strftime): Remove unneeded variable.
Thu Jan 27 22:52:54 2011 Arnold D. Robbins <[email protected]>
* awk.h (comp_func): Add declaration.
* debug.c (comp_func): Make not static, and move to ...
* eval.c (comp_func): ... here.
(r_interpret): Add array sorting if magic index is
set in PROCINFO.
Thu Jan 27 22:12:00 2011 Corinna Vinschen <[email protected]>
* Makefile.am: Remove $(EXEEXT) from 'awk' symlink.
Thu Jan 27 21:21:13 2011 John Haque <[email protected]>
* eval.c (r_interpret): When in BEGINFILE or ENDFILE, add check for
`getline var < file' in cases Op_K_getline_redir and Op_K_getline.
* awkgram.y (constant_fold): Code cleanups. Fix bug in the code for
string concatenation.
* configure.ac: Remove unneeded extra call to AC_LANG.
Thu Jan 27 15:00:42 2011 Arnold D. Robbins <[email protected]>
* eval.c: Fix up some comments.
* io.c (remap_std_file): New function.
(iop_close): Use it.
Mon Jan 24 22:14:21 2011 Andreas Buening <[email protected]>
* debug.c: Bracket variables used with readline in #ifdef.
* dfa.c (add_utf8_anychar): Move inside ifdef.
Mon Jan 24 22:05:26 2011 Arnold D. Robbins <[email protected]>
* re.c (make_regexp): Add separate variable for dfa syntax.
General formatting cleanup.
(research): General formatting cleanup.
(refree): Remove out of date comment.
(re_update): Comment the routine.
(check_bracket_exp): Improve check for range to not get [^-/]
kinds of things. Thanks to Nelson Beebe for pointing out the bug.
Wed Jan 19 20:31:17 2011 Arnold D. Robbins <[email protected]>
* awk.h (is_valid_character): Add `& 0XFF' and remove casts to
unsigned chars in other files. Remove definition of this macro
in not MBS_SUPPORT case, since it wasn't being used.
(btowc_cache): New macro to index into the array and use the
same trick. Relies on ANSI C preprocessor semantics.
Fix all uses.
* builtin.c, node.c, io.c: Fix uses of these macros.
Wed Jan 19 20:19:29 2011 Arnold D. Robbins <[email protected]>
* node.c (wstr2str): New function.
* awk.h: Declare it.
* builtin.c (is_wupper, is_wlower, to_wupper, to_wlower,
wide_change_case, wide_tolower, wide_toupper): New functions to
simplify wide character case conversions.
(do_tolower, do_toupper): Use wide_tolower, wide_toupper in multibyte
case.
(do_substr): Simplify code a little bit.
Mon Jan 17 22:48:48 2011 Arnold D. Robbins <[email protected]>
* builtin.c (do_bindtextdomain): Change type of `the_result'
to const char* to kill compiler warnings.
* debug.c (source_find): Improve error message when file not
found.
* awkgram.y (get_src_buf): Add cast to value of `read' to
turn off compiler warnings on different systems.
Mon Jan 10 21:40:05 2011 Andreas Buening <[email protected]>
* io.c (devopen): Handle opening of directories for OS/2.
Mon Jan 10 21:37:49 2011 Arnold D. Robbins <[email protected]>
* awk.h: Rearrange includes of <fcntl.h> so it won't be
included for VMS, move definition of O_BINARY down.
Sat Jan 8 23:00:37 2011 Arnold D. Robbins <[email protected]>
* awk.h: Include <fcntl.h> here.
* main.c, io.c: Remove includes of <fcntl.h>.
2011-01-08 Eli Zaretskii <[email protected]>
* io.c (PIPES_SIMULATED) [__DJGPP__ || __MINGW32__]: Define.
(binmode): Define for __DJGPP__ and __MINGW32__ as well.
(gawk_popen) [!PIPES_SIMULATED]: Define for __DJGPP__ and
__MINGW32__ as well.
Wed Jan 5 20:35:30 2011 Arnold D. Robbins <[email protected]>
* configure.ac: Move call to AC_LANG([C]) into here from
m4/readline.m4.
Tue Jan 4 11:21:18 2011 Arnold D. Robbins <[email protected]>
Clean up some compiler warnings:
* array.c (do_delete): Cast for printf.
* builtin.c (do_bindtextdomain): Casts for const char *.
* io.c (rs1scan): Cast for indexing of array.
* re.c (add_char): Remove unused variables.
Fri Dec 31 11:05:11 2010 Michal Jaegermann <[email protected]>
* awk.h (strncasecmpmbs): Change parameters to const char *.
* builtin.c (strncasecmpmbs): Change parameters to const char *.
Add casts as appropriate in calls to other functions.
* eval.c (cmp_nodes): Add casts in calls to strncasecmpmbs.
* node.c (str2wstr): Ditto.
Tue Dec 28 21:13:31 2010 Eli Zaretskii <[email protected]>
* gawkmisc.c: Restore inclusion of pc/gawkmisc.pc.
Tue Dec 28 21:00:36 2010 Arnold D. Robbins <[email protected]>
* ext.c (make_builtin): Make first parameter const char *.
Adjust code inside to fit.
* awk.h (make_builtin): Adjust declaration.
Mon Dec 27 19:55:10 2010 Arnold D. Robbins <[email protected]>
* io.c [AF_UNSPEC, AF_INET, AF_INET6]: Add definitions for systems
that don't define them.
(inetfile): Make IPv6 a fatal error if using the fake getaddrinfo,
since chances are good that IPv6 really isn't available.
Sat Dec 25 19:36:27 2010 Arnold D. Robbins <[email protected]>
Fixes for z/OS.
* awkgram.y (tokcompare): Change argument types to const void *.
(check_special): Add cast to void * in call to qsort.
* builtin.c (do_bindtextdomain): Change `directory' and `domain'
to const char *.
* custom.h (ZOS_USS): Undef HAVE_SYS_PARAM_H and HAVE_MCHECK_H.
Beats me why configure thinks it has those things.
Fri Dec 24 12:56:46 2010 Arnold D. Robbins <[email protected]>
* custom.h: Remove defs for MIPS RiscOS.
* configure.ac, aclocal.m4: Updated to Autoconf 2.68.
Wed Dec 22 21:21:28 2010 Arnold D. Robbins <[email protected]>
* gettext.h: Synchronized with gettext 0.18.1.
2010-12-22 gettextize <[email protected]>
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.18.1.
* ABOUT-NLS, config.rpath: Updated from gettext 0.18.1.
Sun Dec 19 16:43:14 2010 Arnold D. Robbins <[email protected]>
* awk.h (update_PROCINFO_str, update_PROCINFO_num, make_str_node):
Change `char *' parameters to `const char *' to avoid some
compiler warnings.
* ext.c (do_ext): Remove cast in call to make_string.
* field.c (update_PROCINFO_str, update_PROCINFO_num): Adjust.
* main.c (init_args): Remove casts in calls to make_string.
* node.c (r_make_str_node): Add cast in assignment if ALREADY_MALLOCED.
Sat Dec 18 20:12:59 2010 Eli Zaretskii <[email protected]>
* array.c, gawkmisc.c, io.c, main.c, regex_internal.h,
awkgram.y, awk.h, array.c: Remove OS2 and _MSC_VER defines.
Sat Dec 18 19:56:17 2010 Arnold D. Robbins <[email protected]>
* builtin.c, eval.c, floatcomp.c, io.c: Remove all the crufty
old code for #ifdef CRAY.
Thu Dec 16 11:06:50 2010 Arnold D. Robbins <[email protected]>
Put strftime() default format into PROCINFO["strftime"].
* awk.h (def_strftime_format): Declare const char[] array.
* main.c (def_strftime_format): Define it.
(load_procinfo): Load it into PROCINFO.
* builtin.c (do_strftime): Use value in PROCINFO for format
string if it's there. Remove old def_format static array.
Mon Dec 13 17:12:44 2010 Arnold D. Robbins <[email protected]>
If not POSIX, turn [d-h] into [defgh].
* re.c (check_bracket_exp): Make warning about ranges under
lint control.
(expand_range): New routine to expand ranges.
(make_regexp): Check if might have range and call expand_range.
(add_char): New helper function for expand_range.
Thu Dec 9 22:12:48 2010 Arnold D. Robbins <[email protected]>
* io.c: Restored changes of 1 July 2010 to allow /inet4 and /inet6;
they got lost amongst the merges. Fixed checking of do_sandbox.
Also, removed the option for raw IP sockets since it was never
implemented and wasn't going to be.
Tue Dec 7 11:59:00 2010 Arnold D. Robbins <[email protected]>
* configure.ac: Remove test for return type of sprintf. Another
renegade from the late 1980's bites the dust!
* protos.h (sprintf): Remove declaration.
Sun Dec 5 15:01:35 2010 Arnold D. Robbins <[email protected]>
* eval.c (grow_stack): Change env var to GAWK_STACKSIZE.
* awk.h, main.c, eval.c, profile.c: Removed features added
for those who are Strong In The Ways of the Source.
* debug.c (comp_func): Moved to here from eval.c, where it's
no longer needed.
Sat Dec 4 21:44:38 2010 Arnold D. Robbins <[email protected]>
* node.c (init_btowc_cache): New function.
(btowc_cache): New array.
(str2wstr): Use is_valid_character in test instead of several isXXX
calls.
* awk.h [is_valid_character]: Macro to use btowc_cache.
* main.c (main): Call init_btowc_cache().
* io.c (rs1scan): Add call to is_valid_character when processing
characters byte by byte.
Wed Dec 1 08:10:21 2010 Arnold D. Robbins <[email protected]>
* awk.h, awkgram.y, debug.c: Change CONTEXT to AWK_CONTEXT
everywhere to avoid problems with libsigsegv on cygwin.
Tue Nov 30 13:48:34 2010 Arnold D. Robbins <[email protected]>
* main.c (MRL): Removed variable, not used since Tandem code nuked.
(main): Fix argument parsing for -m.
(usage): Make -m undocumented (already is the doc/* files).
* io.c (MRL): Remove declaration.
Mon Nov 29 21:59:21 2010 Arnold D. Robbins <[email protected]>
* re.c (check_bracket_exp): Add check and warning for ranges.
I may live to regret this.
Mon Nov 29 20:09:18 2010 Eli Zaretskii <[email protected]>
* replace.c [!HAVE_STRFTIME]: For __MINGW32__, define
HAVE_STRFTIME while compiling missing_d/strftime.c.
Thu Nov 25 20:12:28 2010 John Haque <[email protected]>
* awkgram.y (grammar): Bug fix in delete for loop efficiency hack.
* debug.c (do_info): Don't sort functions to avoid potential memory leak
in case A_FUNCTIONS.
Plug more potential leaks in the debugger eval/condition commands:
* builtin.c (POP_TWO_SCALARS): New macro to free first scalar in case
of a fatal error in the next.
(do_index, do_atan2, do_lshift, do_rshift, do_and, do_or, do_xor): Use it
instead of two consecutive POP_SCALARs.
Execution context related code cleanups. Also, added descriptive
comments for functions.
* awkgram.y (get_context): Nuked.
(push_context, pop_context, in_main_context): New functions.
(mk_program, parse_program, yylex): Updated.
* debug.c (condition_triggered, do_eval, parse_condition): Updated.
* eval.c (unwind_stack): Updated.
* main.c (main): Updated.
* awk.h (struct context): Removed member level, not needed.
* eval.c (op_assign): Initialize r to NULL, and declare x only
if HAVE_FMOD not defined to remove GCC warnings.
Thu Nov 25 08:32:31 2010 Arnold D. Robbins <[email protected]>
* eval.c (posix_compare): Do string comparison with strcoll() /
wcscoll().
(cmp_nodes): Call it if do_posix. This may be a bad idea,
but what the heck. Standards compatibility uber alles!
Wed Nov 24 20:09:23 2010 Arnold D. Robbins <[email protected]>
* ext.c (do_ext): Require definition of `plugin_is_GPL_compatible'
per GNU Coding standards.
Sun Nov 21 14:23:58 2010 John Haque <[email protected]>
Debugger: Fix memory leak when quitting pager.
* awk.h (PUSH_BINDING, POP_BINDING): Generalize macro definitions.
* debug.c (print_array): save and restore bindings for pager.
free list in case of an early exit in the pager.