summaryrefslogtreecommitdiff
path: root/ChangeLog
blob: dbfc8efbd10efe14baa08fd964674d21df571da2 (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
2012-06-21         Arnold D. Robbins     <arnold@skeeve.com>

	More API and cleanup:

	* awk.h (stopme): Make signature match other built-ins.
	* awkgram.y (stopme): Make signature match other built-ins.
	(regexp): Minor edit.
	* gawkapi.c (api_set_argument): Remove unused variable.
	Set parent_array field of array value.
	* TODO.xgawk: Update some.

	Remove extension() builtin.

	* awk.h (do_ext): Removed.
	(load_ext): Signature changed.
	* awkgram.y (tokentab): Remove do_ext.
	Change calls to do_ext.
	* ext.c (load_ext): Make init function a constant.
	* main.c (main): Change calls to do_ext.

2012-06-20         Arnold D. Robbins     <arnold@skeeve.com>

	Restore lost debugging function:

	* awkgram.y (stopme): Restore long lost debugging function.
	* awk.h (stopme): Add declaration.

	API work:

	* ext.c (get_argument): Make extern.
	* awk.h (get_argument): Declare it.
	* gawkapi.c (api_set_argument): Call it. Finish off the logic.
	(api_get_argument): Refine logic to use get_argument.
	* gawkapi.h (set_argument): New API.

2012-06-19         Arnold D. Robbins     <arnold@skeeve.com>

	Remove code duplication in gawkapi.c from msg.c:

	* awk.h (err): Add `isfatal' first parameter.
	* awkgram.y (err): Adjust all calls.
	* msg.c (err): Adjust all calls. Move fatal code to here ...
	(r_fatal): From here.
	* gawkapi.c: Remove code duplication and adjust calls to `err'.

	Handle deleting elements of flattened array:

	* awk.h (get_argument): Remove declaration.
	* ext.c (get_argument): Make static.
	* gawkapi.h (awk_flat_array_t): Make opaque fields const. Add
	more descriptive comments.
	* gawkapi.c (release_flattened_array): Delete elements flagged
	for deletion. Free the flattened array also.

	Add additional debugging when developing:

	* configure.ac: Add additional debugging flags.
	* configure: Regenerated.

2012-06-18         Arnold D. Robbins     <arnold@skeeve.com>

	* gawkapi.h (get_array_element): Restore `wanted' paramater.
	(awk_element_t): Use awk_value_t for index. Add awk_flat_array_t.
	(flatten_array): Change signature to use awk_flat_array_t;
	(release_flattened_array): Change signature to use awk_flat_array_t;
	* gawkapi.c (api_sym_update): Handle case where variable exists already.
	(api_get_array_element): Restore `wanted' paramater and pass it
	on to node_to_awk_value.
	(api_set_array_element): Revisse to match changed element type.
	(api_flatten_array): Revise signature, implement.
	(api_release_flattened_array): Revise signature, implement.

2012-06-17         Arnold D. Robbins     <arnold@skeeve.com>

	API Work:

	* gawkapi.h (get_array_element): Remove `wanted' parameter.
	(r_make_string): Comment the need for `api' and `ext_id' parameters.
	* gawkapi.c (api_sym_update): Move checks to front.
	Initial code for handling arrays. Still needs work.
	(api_get_array_element): Implemented.
	(api_set_array_element): Additional checking code.
	(api_del_array_element): Implemented.
	(api_create_array): Implemented.
	(init_ext_api): Force do_xxx values to be 1 or 0.
	(update_ext_api): Ditto.

2012-06-12         Arnold D. Robbins     <arnold@skeeve.com>

	API Work:

	* gawkapi.h (awk_value_t): Restore union.
	(get_curfunc_param): Renamed to get_argument. Return type changed
	to awk_bool_t. Semantics better thought out and documented.
	(awk_atexit, get_array_element): Return type now void.
	(sym_lookup): Return type now void. Argument order rationalized.
	* gawkapi.c (node_to_awk_value): Return type is now awk_bool_t.
	Semantics now match table in gawkawpi.h.
	(api_awk_atexit): Return type now void.
	(api_sym_lookup): Return type is now awk_bool_t. Change parameter
	order.
	(api_get_array_element): Return type is now awk_bool_t.

	Further API implementations and fixes for extension/testext.c:

	* awk.h (final_exit): Add declaration.
	* ext.c (load_ext): Change `func' to install_func.
	* gawkapi.c: Add casts to void for id param in all functions.
	(api_sym_update): Finish implementation.
	(api_get_array_element): Start implementation.
	(api_set_array_element): Add error checking.
	(api_get_element_count): Add error checking, return the right value.
	* main.c (main): Call final_exit instead of exit.
	(arg_assign): Ditto.
	* msg.c (final_exit): New routine to run the exit handlers and exit.
	(gawk_exit): Call it.
	* profile.c (dump_and_exit): Ditto.

2012-06-10         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* TODO.xgawk: Addition of time extension moved to "done" section.

2012-06-10         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* gawkapi.c (api_update_ERRNO_string): Treat boolean true as a request
	for TRANSLATE, and false as DONT_TRANSLATE.

2012-06-06         Arnold D. Robbins     <arnold@skeeve.com>

	* cint_array.c (tree_print, leaf_print): Add additional casts
	for printf warnings.

	* awk.h (update_ext_api): Add declaration.
	* gawkapi.c (update_ext_api): New function.
	* eval.c (set_LINT): Call update_ext_api() at the end.
	* gawkapi.h: Document that do_XXX could change on the fly.

	* awk.h (run_ext_exit_handlers): Add declaration.
	* msg.c (gawk_exit): Call it.

2012-06-05         Arnold D. Robbins     <arnold@skeeve.com>

	* ext.c (load_ext): Remove use of RTLD_GLOBAL. Not needed in new
	scheme. Clean up error messages.

2012-06-04         Arnold D. Robbins     <arnold@skeeve.com>

	* configure.ac: Remove use of -export-dynamic for GCC.
	* configure: Regenerated.

2012-05-30         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (is_off_limits_var): Minor coding style edit.
	* gawkapi.c (awk_value_to_node): More cleanup.
	(node_to_awk_value): Use `wanted' for decision making.
	(api_sym_update): Start implementation. Needs more work.
	General: More cleanup, comments.
	* gawkapi.h (api_sym_update): Add additional comments.

2012-05-29         Arnold D. Robbins     <arnold@skeeve.com>

	* gawkapi.c (node_to_awk_value): Add third parameter indicating type
	of value desired. Based on that, do force_string or force_number
	to get the "other" type.
	(awk_value_to_node): Clean up the code a bit.
	(get_curfunc_param): Move forcing of values into node_to_awk_value.
	(api_sym_lookup): Add third parameter indicating type of value wanted.
	(api_get_array_element): Ditto.
	* gawk_api.h: Additional comments and clarifications. Revise APIs
	to take third 'wanted' argument as above.
	(awk_value_t): No longer a union so that both values may be accessed.
	All macros: Parenthesized the bodies.
	* bootstrap.sh: Rationalize a bit.

2012-05-26         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* Makefile.am (include_HEADERS): Add so gawkapi.h will be installed.
	(base_sources): Add gawkapi.h so that it is in dist tarball.
	* TODO.xgawk: Update.
	* main.c (is_off_limits_var): Stop returning true for everything
	except PROCINFO.

2012-05-25         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (is_off_limits_var): New function to check if a variable
	is one that an extension function may not change.
	* awk.h (is_off_limits_var): Declare it.
	* gawkapi.c (api_sym_lookup): Use it.

	* bootstrap.sh: Touch various files in the extension directory also.

2012-05-24         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* gawkapi.h (awk_param_type_t): Remove (use awk_valtype_t instead).
	(awk_ext_func_t): Pass a result argument, and return an awk_value_t *.
	(gawk_api.get_curfunc_param): Add a result argument.
	(gawk_api.set_return_value): Remove obsolete function.
	(gawk_api.sym_lookup, gawk_api.get_array_element): Add a result
	argument.
	(gawk_api.api_make_string, gawk_api.api_make_number): Remove hooks,
	since access to gawk internal state is not required to do this.
	(set_return_value): Remove obsolete macro.
	(get_curfunc_param, sym_lookup, get_array_element): Add result argument.
	(r_make_string, make_number): New static inline functions.
	(make_string, dup_string): Revise macro definitions.
	(dl_load_func): Remove global_api_p and global_ext_id args,
	and fix SEGV by setting api prior to checking its version members.
	(GAWK): Expand ifdef to include more stuff.
	* gawkapi.c (node_to_awk_value): Add result argument.
	(api_get_curfunc_param): Add result argument, and use awk_valtype_t.
	(api_set_return_value): Remove obsolete function.
	(awk_value_to_node): New global function to convert back into internal
	format.
	(api_add_ext_func): Simply call make_builtin.
	(node_to_awk_value): Add result argument, and handle Node_val case.
	(api_sym_lookup, api_get_array_element): Add result argument.
	(api_set_array_element): Implement.
	(api_make_string, api_make_number): Remove functions that belong on
	client side.
	(api_impl): Remove 3 obsolete entries.
	* TODO.xgawk: Update to reflect progress.
	* Makefile.am (base_sources): Add gawkapi.c.
	* awk.h: Include gawkapi.h earlier.
	(api_impl, init_ext_api, awk_value_to_node): Add declarations
	so we can hook in new API.
	(INSTRUCTION): Add new union type efptr for external functions.
	(extfunc): New define for d.efptr.
	(load_ext): Remove 3rd obj argument that was never used for anything.
	(make_builtin): Change signature for new API.
	* awkgram.y (load_library): Change 2nd argument to load_ext
	from dlload to dl_load, and remove pointless 3rd argument.
	* main.c (main): Call init_ext_api() before loading shared libraries.
	Change 2nd argument to load_ext from dlload to dl_load, and remove
	pointless 3rd argument.
	* ext.c (do_ext): Remove pointless 3rd argument to load_ext.
	(load_ext): Remove 3rd argument.  Port to new API (change initialization
	function signature).  If initialization function fails, issue a warning
	and return -1, else return 0.
	(make_builtin): Port to new API.
	* interpret.h (r_interpret): For Op_ext_builtin, call external functions
	with an awk_value_t result buffer, and convert the returned value
	to a NODE *.  For Node_ext_func, code now in extfunc instead of builtin.

2012-05-21         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* configure.ac: Remove libtool, and call configure in the
	extension subdirectory.  Change pkgextensiondir to remove the
	version number, since the new API has builtin version checks.
	* TODO.xgawk: Update.
	* ltmain.sh: Removed, since libtool no longer used here.

2012-05-19         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* TODO.xgawk: Update to reflect progress and new issues.
	* main.c (main): Add -i (--include) option.
	(usage): Ditto.
	* awkgram.y (add_srcfile): Eliminate duplicates only for SRC_INC
	and SRC_EXTLIB sources (i.e. -f duplicates should not be removed).
	* io.c (find_source): Set DEFAULT_FILETYPE to ".awk" if not defined
	elsewhere.

2012-05-15         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h: Include "gawkapi.h" to get IOBUF.
	* gawkapi.h: Considerable updates.
	* gawkapi.c: New file. Start at implementing the APIs.

2012-05-13         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* TODO.xgawk: Update to reflect recent discussions and deletion of
	extension/xreadlink.[ch].

2012-05-11         Arnold D. Robbins     <arnold@skeeve.com>

	Sweeping change: Use `bool', `true', and `false' everywhere.

2012-04-09         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* eval.c (unset_ERRNO): Fix memory management bug -- need to use
	dupnode with Nnull_string.

2012-04-08         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* Makefile.am (valgrind): Define VALGRIND instead of redefining AWK.
	This allows test/Makefile.am to set up the command environment as
	desired.
	(valgrind-noleak): Ditto, plus set --leak-check=no instead of the
	default summary setting.

2012-04-07         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* TODO.xgawk: Update to reflect progress.

2012-04-01         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* TODO.xgawk: Move valgrind-noleak item into "done" section.
	* Makefile.am (valgrind-noleak): Add new valgrind rule that omits
	the "--leak-check=full" option to help spot more serious problems.

2012-04-01         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* TODO.xgawk: Move ERRNO item into "done" section.
	* awk.h (update_ERRNO, update_ERRNO_saved): Remove declarations.
	(update_ERRNO_int, enum errno_translate, update_ERRNO_string,
	unset_ERRNO): Add new declarations.
	* eval.c (update_ERRNO_saved): Renamed to update_ERRNO_int.
	(update_ERRNO_string, unset_ERRNO): New functions.
	* ext.c (do_ext): Use new update_ERRNO_string function.
	* io.c (ERRNO_node): Remove redundant extern declaration (in awk.h).
	(after_beginfile, nextfile): Replace update_ERRNO() with
	update_ERRNO_int(errno).
	(inrec): Replace update_ERRNO_saved with update_ERRNO_int.
	(do_close): Use new function update_ERRNO_string.
	(close_redir, do_getline_redir, do_getline): Replace update_ERRNO_saved
	with update_ERRNO_int.

2012-03-27         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* TODO.xgawk: Update to reflect debate about how to support Cygwin
	and other platforms that cannot link shared libraries with unresolved
	references.
	* awkgram.y (add_srcfile): Minor bug fix: reverse sense of test
	added by Arnold in last patch.
	* configure.ac: AC_DISABLE_STATIC must come before AC_PROG_LIBTOOL.

2012-03-26         Arnold D. Robbins     <arnold@skeeve.com>

	Some cleanups.

	* awkgram.y (add_srcfile): Use whole messages, better for
	translations.
	* io.c (init_awkpath): Small style tweak.
	* main.c (path_environ): Straighten out initial comment, fix
	compiler warning by making `val' const char *.

2012-03-25         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* configure.ac (AC_DISABLE_STATIC): Add this to avoid building useless
	static extension libraries.

2012-03-25         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* TODO.xgawk: New file listing completed and pending xgawk enhancements.

2012-03-24         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* io.c (path_info): Fix white space.
	(pi_awkpath, pi_awklibpath): Avoid structure initializers.
	(do_find_source): Eliminate pointless parentheses.
	(find_source): Leave a space after "&".
	* main.c (load_environ): Fix typo in comment.

2012-03-21         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* awkgram.y (LEX_LOAD): New token to support @load.
	(grammar): Add rules to support @load.
	(tokentab): Add "load".
	(add_srcfile): Improve error message to distinguish between source files
	and shared libraries.
	(load_library): New function to load libraries specified with @load.
	(yylex): Add support for LEX_LOAD (treated the same way as LEX_INCLUDE).

2012-03-20         Andrew J. Schorr     <aschorr@telemetry-investments.com>

	* Makefile.am (EXTRA_DIST): Remove extension.
	(SUBDIRS): Add extension so libraries will be built.
	(DEFS): Define DEFLIBPATH and SHLIBEXT so we can find shared libraries.
	* awk.h (deflibpath): New extern declaration.
	* configure.ac: Add support for building shared libraries by adding
	AC_PROG_LIBTOOL and AC_SUBST for acl_shlibext and pkgextensiondir.
	(AC_CONFIG_FILES): Add extension/Makefile.
	* io.c (pi_awkpath, pi_awklibpath): New static structures to contain
	path information.
	(awkpath, max_pathlen): Remove static variables now inside pi_awkpath.
	(init_awkpath): Operate on path_info structure to support both
	AWKPATH and AWKLIBPATH.  No need for max_path to be static, since
	this should be called only once for each environment variable.
	(do_find_source): Add a path_info arg to specify which path to search.
	Check the try_cwd parameter to decide whether to search the current
	directory (not desirable for AWKLIBPATH).
	(find_source): Choose appropriate path_info structure based on value
	of the is_extlib argument.  Set EXTLIB_SUFFIX using SHLIBEXT define
	instead of hardcoding ".so".
	* main.c (path_environ): New function to add AWKPATH or AWKLIBPATH
	to the ENVIRON array.
	(load_environ): Call path_environ for AWKPATH and AWKLIBPATH.

2012-05-09         Arnold D. Robbins     <arnold@skeeve.com>

	* configure.ac: Added AC_HEADER_STDBOOL
	* awk.h, dfa.c, regex.c: Reworked to use results
	of test and include missing_d/gawkbool.h.

2012-05-07         Arnold D. Robbins     <arnold@skeeve.com>

	* array.c (prnode): Add casts to void* for %p format.
	* debug.c (print_instruction): Ditto.
	* builtin.c: Fix %lf format to be %f everywhere.

	Unrelated:

	* replace.c: Don't include "config.h", awk.h gets it for us.

2012-05-04         Arnold D. Robbins     <arnold@skeeve.com>

	* getopt.c [DJGPP]: Change to __DJGPP__.
	* mbsupport.h [DJGPP]: Change to __DJGPP__.

	Unrelated:

	* awk.h: Workarounds for _TANDEM_SOURCE.

2012-05-01         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep. RRI code now there, needed additional
	change for gawk.
	* configure.ac: Add check for stdbool.h.
	* regex.c: Add check for if not have stdbool.h, then define the
	bool stuff.

2012-04-27         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.
	* xalloc.h (xmemdup): Added, from grep, for dfa.c. Sigh.

2012-04-27         Arnold D. Robbins     <arnold@skeeve.com>

	Update to autoconf 2.69, automake 1.12.

	* INSTALL, aclocal.m4, configh.in, depcomp, install-sh, missing,
	mkinstalldirs, ylwrap: Updated.
	* configure.ac (AC_TYPE_LONG_LONG_INT, AC_TYPE_UNSIGNED_LONG_LONG_INT,
	AC_TYPE_INTMAX_T, AC_TYPE_UINTMAX_T): Renamed from gl_* versions.
	* configure: Regenerated.

2012-04-24         Arnold D. Robbins     <arnold@skeeve.com>

	* cmd.h (dPrompt, commands_Prompt, eval_Prompt, dgawk_Prompt): Changed
	to dbg_prompt, commands_prompt, eval_prompt, dgawk_prompt.
	* debug.c: Ditto.
	* command.y: Ditto.  Some minor whitespace and comments cleanup.

2012-04-24         Arnold D. Robbins     <arnold@skeeve.com>

	io.c cleanup and some speedup for RS as regexp parsing.

	* awk.h (Regexp): New members has_meta and maybe_long.
	(enum redirval): Add redirect_none as value 0.
	(remaybelong): Remove function declaration.
	* awkgram.y: Use redirect_none instead of 0 for no redirect cases.
	* io.c (go_getline_redir): Second arg now of type enum redirval.
	Changed intovar into into_variable.
	(comments and whitespace): Lots of general cleanup.
	(socket_open): readle changed to read_len.
	(two_way_open): Add additional calls to os_close_on_exec.
	(rsrescan): Simplify code a bit and use RS->maybe_long.
	* re.c (make_regexp): Set up new members in Regexp struct.
	(remaybelong): Remove function.
	(reisstring): Simplified code.

2012-04-16  Eli Zaretskii  <eliz@gnu.org>

	* io.c (read_with_timeout) [__MINGW32__]: Just call the blocking
	'read', as 'select' is only available for sockets.
	* mpfr.c (set_ROUNDMODE) [!HAVE_MPFR]: Renamed from set_RNDMODE.
	* main.c (load_procinfo): Declare name[] also when HAVE_MPFR is
	defined even though HAVE_GETGROUPS etc. are not.

2012-04-12         John Haque      <j.eh@mchsi.com>

	* array.c, awk.h, awkgram.y, builtin.c, command.y, debug.c,
	field.c, mpfr.c, profile.c: Change RND_MODE to ROUND_MODE.

2012-04-11         John Haque      <j.eh@mchsi.com>

	* main.c (varinit): Change RNDMODE to ROUNDMODE.

2012-04-11         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c: Change --arbitrary-precision to --bignum.

2012-04-02         John Haque      <j.eh@mchsi.com>
	
	Add support for arbitrary-precision arithmetic.

	* mpfr.c: New file.
	* awk.h (struct exp_node): Add union to handle different number types.
	(MPFN, MPZN): New flag values.
	(DO_MPFR, do_mpfr): New defines.
	(PREC_node, RNDMODE_node): Add declarations.
	(PRECISION, RND_MODE, MNR, MFNR, mpzval, do_ieee_fmt): Add declarations.
	(make_number, str2number, format_val, cmp_numbers): Ditto.
	(force_number): Change definition.
	(Func_pre_exec, Func_post_exec): New typedefs.
	(POP_NUMBER, TOP_NUMBER): Change definitions.
	(get_number_ui, get_number_si, get_number_d, get_number_uj,
	iszero, IEEE_FMT, mpg_float, mpg_integer, mpg_float,
	mpg_integer): New defines.
	* awkgram.y (tokentab):	Add alternate function entries for MPFR/GMP.
	(snode): Choose the appropriate function.
	(negate_num): New function to negate a number.
	(grammar): Use it.
	(yylex): Adjust number handling code.
	* array.c (value_info, asort_actual, sort_user_func): Adjust for
	MPFR/GMP numbers.
	(do_adump, indent): Minor changes.
	(sort_up_index_number, sort_up_value_number, sort_up_value_type): Use
	cmp_numbers() for numeric comparisons.
	* builtin.c (mpz2mpfr): New function.
	(format_tree): Adjust to handle MPFR and GMP numbers.
	* eval.c (register_exec_hook): New function to manage interpreter hooks.
	(num_exec_hook, pre_execute, post_execute): New and adjusted definitions.
	(h_interpret): Renamed from debug_interpret.
	(init_interpret): Changed to use the new name.  
	(flags2str): New entries for MPFN and MPZN.
	(cmp_nodes): Reworked to use seperate routine for numeric comparisons.
	(set_IGNORECASE, set_BINMODE, set_LINT, update_NR, update_FNR,
	update_NF): Adjust code and some cleanup.
	* field.c (rebuild_record): Field copying code reworked to handle
	MPFR/GMP numbers.
	(set_NF): Minor adjustment.
	* io.c (INCREMENT_REC): New macro.
	(inrec, do_getline): Use the new macro.
	(nextfile, set_NR, set_FNR, get_read_timeout, pty_vs_pipe): Adjust code
	to handle MPFR/GMP numbers.
	* interpret.h (r_interpret): Adjust TOP_NUMBER/POP_NUMBER usage.
	(EXEC_HOOK): New macro and definition.
	(DEBUGGING): Removed.
	* main.c (DEFAULT_PREC, DEFAULT_RNDMODE): New defines.
	(opttab): New entry for option arbitrary-precision.
	(main): Handle the new option.
	(usage): Add to usage message.
	(varinit): Add PREC and RNDMODE.
	(load_procinfo): Install MPFR and GMP related items.
	(version): Append MPFR and GMP versions to message.
	* msg.c (err) : Adjust FNR handling with MPFR/GMP.
	* node.c (r_format_val): Renamed from format_val.
	(r_force_number): Return NODE * instead of AWKNUM.
	(make_number, str2number, format_val, cmp_numpers: Defined and initialized.
	(r_unref): Free MPFR/MPZ numbers.
	(get_numbase): Renamed from isnondecimal and return the base.
	(cmp_awknums): New function to compare two AWKNUMs.
	* command.y (yylex): Adjust number handling code.
	(grammar): Minor adjustments to handle negative numbers.
	* debug.c (init_debug): New function.
	(do_info, do_set_var, watchpoint_triggered, serialize,
	initialize_watch_item, do_watch, print_watch_item): Minor adjustments.
	(debug_pre_execute): Adjusted to handle MPFR and GMP numbers.

2012-04-09         Arnold D. Robbins     <arnold@skeeve.com>

	* INSTALL, config.guess, config.sub, depcomp, install-sh,
	missing, mkinstalldirs, ylwrap: Update to latest from automake 1.11.4.

2012-04-08         Arnold D. Robbins     <arnold@skeeve.com>

	* Update various files to automake 1.11.4.

2012-03-30         Arnold D. Robbins     <arnold@skeeve.com>

	* configure.ac (GAWK_AC_NORETURN): Do as macro instead of inline.

2012-03-29         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.h, dfa.c: Sync with grep. Major cleanups and some changes
	there.
	* re.c (research): Pass size_t* to dfaexec to match type change.
	* configure.ac (AH_VERBATIM[_Noreturn]): Added from Paul Eggert to
	ease compiling.
	(AC_INIT): Bump version.
	* configure, configh.in, version.c: Regenerated.

2012-03-28         Arnold D. Robbins     <arnold@skeeve.com>

	* 4.0.1: Release tar ball made.

2012-03-28         Arnold D. Robbins     <arnold@skeeve.com>

	* getopt.c: Add DJGPP to list of platforms where it's ok
	to include <stdlib.h>.
	* awkgram.y, builtin.c, ext.c, mbsupport.h, re.c: Update
	copyright year.

2012-03-21         Corinna Vinschen      <vinschen@redhat.com>

	* getopt.c: Add Cygwin to list of platforms where it's ok
	to include <stdlib.h>.

2012-03-20         Arnold D. Robbins     <arnold@skeeve.com>

	Get new getopt to work on Linux and C90 compilers:

	* getopt.c: Undef ELIDE_CODE for gawk.
	(_getopt_internal_r): Init first.needs_free to 0. In test for -W
	move executable code to after declarations for C90 compilers.
	* getopt1.c: Undef ELIDE_CODE for gawk.

	Minor bug fix with printf, thanks to John Haque:

	* builtin.c (format_tree): Initialize base to zero at the top
	of the while loop.

	Getting next tar ball ready:

	* configure.ac: Remove duplicate check for wcscoll. Thanks
	to Stepan Kasal.

2012-03-16         Arnold D. Robbins     <arnold@skeeve.com>

	* getopt.c, getopt.h, getopt1.c, getopt_int.h, regcomp.c,
	regex.c, regex.h, regex_internal.c, regex_internal.h,
	regexec.c: Sync with GLIBC, what the heck.

2012-03-14         Eli Zaretskii  <eliz@gnu.org>

	* mbsupport.h (btowc): Change for non-DJGPP.
	* re.c (dfaerror): Add call to exit for DJGPP.

2012-03-14         Arnold D. Robbins     <arnold@skeeve.com>

	* regex_internal.c (re_string_skip_chars): Fix calculation of
	remain_len with m.b. chars. Thanks to Stanislav Brabec
	<sbrabec@suse.cz>.

2012-02-28         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (init_groupset): Make `getgroups' failing a non-fatal
	error.  After all, what's the big deal?  Should help on Plan 9.

2012-02-27         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c (parse_bracket_exp): Revert changes 2012-02-15 to stay
	in sync with grep.
	* dfa.h (dfarerror): Add __attribute__ from grep.

2012-02-15         Arnold D. Robbins     <arnold@skeeve.com>

	Fix warnings from GCC 4.6.2 -Wall option.

	* awkgram.y (newline_eof): New function to replace body of
	NEWLINE_EOF macro.
	(yylex): Replace body of NEWLINE_EOF macro.
	* dfa.c (parse_bracket_exp): Init variables to zero.
	* ext.c (dummy, junk): Remove.
	* regex_internal.c (re_string_reconstruct): Remove buf array. It was
	set but not used.

2012-02-10         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.

2012-02-07         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (main): Move init of `output_fp' to before parsing of
	program so that error messages from msg.c don't dump core.
	Thanks to Michael Haardt <michael@moria.de>.

2012-01-13         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c [is_valid_unibtye_character]: Fix from GNU grep to 
	bug reported by me from Scott Deifik for DJGPP.

2012-01-03         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.

2012-01-02         Arnold D. Robbins     <arnold@skeeve.com>

	* io.c (Read_can_timeout, Read_timeout, Read_default_timeout):
	Renamed to use lower case.
	Other minor stylistic edits.

2012-01-01         John Haque      <j.eh@mchsi.com>

	* awk.h (struct iobuf): New entry read_func.
	* io.c (Read_can_timeout, Read_timeout, Read_default_timeout):
	New variables.
	(init_io): New routine to initialize the variables.
	(in_PROCINFO): New "clever" routine to parse elements with indices
	seperated by a SUPSEP.
	(get_read_timeout): New routine to read timeout value for an IOBUF.
	(read_with_timeout): New routine to read from a fd with a timeout.
	(pty_vs_pipe): Use in_PROCINFO().
	(get_a_record): Set the timeout value and the read routine as necessary.
	* main.c (main): Call init_io().

2011-12-31         Arnold D. Robbins     <arnold@skeeve.com>

	* profile_p.c: Remove the file.
	* msg.c (err): Remove check for name being dgawk.

2011-12-31         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h [STREQ, STREQN]: Remove macros.
	* awkgram.y, builtin.c, command.y, debug.c, eval.c,
	io.c, msg.c: Change all uses to call strcmp, strncmp.

2011-12-28         Arnold D. Robbins     <arnold@skeeve.com>

	* int_array.c, str_array.c: Fix some compiler warnings 32/64
	bit system differences.

2011-12-26         John Haque      <j.eh@mchsi.com>

	Merge gawk, pgawk and dgawk into a single executable gawk.

	* awk.h (DO_PRETTY_PRINT, DO_PROFILE, DO_DEBUG,
	do_pretty_print, do_debug): New defines.
	(interpret): New variable, a pointer to an interpreter routine.
	(enum exe_mode): Nuked.
	* main.c (opttab): New options --pretty-print and --debug;
	Remove option --command.
	(usage): Update usage messages.
	* interpret.h: New file.
	* eval.c (r_interpret): Move to the new file.
	(debug_interpret): New interpreter routine when debugging.
	(init_interpret): New routine to initialize interpreter related
	variables.
	* eval_d.c, eval_p.c: Delete files.
	* debug.c (interpret): Renamed to debug_prog.
	(DEFAULT_PROMPT, DEFAULT_HISTFILE, DEFAULT_OPTFILE): Remove prefix 'd'.
	* profile.c (init_profiling): Nuked.
	* Makefile.am: Adjusted.

	Add command line option --load for loading extensions.

	* awk.h (srctype): Add new source type SRC_EXTLIB.
	* ext.c(load_ext): New routine to load extension.
	(do_ext): Adjust to use load_ext().
	* main.c (opttab): Add new option --load.
	(main): Call load_ext() to load extensions.
	(usage): Add usage message for the new option.
	* io.c (get_cwd): New routine.
	(do_find_source): Use the new routine.
	(find_source): Handle new type SRC_EXTLIB.
	* awkgram.y (parse_program, next_sourcefile): Skip type SRC_EXTLIB.
	(add_srcfile): Adjust call to find_source.
	* debug.c (source_find): Same.

	Unrelated:

	* ext.c (get_argument): Fixed argument parsing.
	* array.c (null_array_func): Reworked array routines for an empty array.
	* str_array.c, int_array.c: Make GCC happy, use %u instead of %lu
	printf formats.
	* eval.c (node_Boolean): New array for TRUE and FALSE nodes.
	(init_interpret): Create the new nodes.
	(eval_condition): Add test for the new nodes.
	(setup_frame): Disable tail-recursion optimization when profiling.
	* interpret.h (r_interpret): Use the boolean nodes instead of making
	new ones when needed.

2011-12-26         Arnold D. Robbins     <arnold@skeeve.com>

	Finish Rational Range Interpretation (!)

	* dfa.c (match_mb_charset): Compare wide characters directly
	instead of using wcscoll().
	* regexec.c (check_node_accept_byte): Ditto.

	Thanks to Paolo Bonzini for pointing these out.

2011-12-06         John Haque      <j.eh@mchsi.com>

	* debug.c (source_find): Fix misplaced call to efree.
	* profile.c (redir2str): Add a missing comma in the redirtab array.
	* eval.c (r_interpret): Disallow call to exit if currule is undefined.
	This avoids the possiblity of running END blocks more than once when
	used in a user-defined sorted-in comparision function.
	* array.c (sort_user_func): Adjust appropriately.

2011-12-06         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h, mbsupport.h: Changes for MBS support on DJGPP
	and z/OS.
	* io.c: Disable pty support on z/OS.

2011-11-27         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.
	* dfa.h: Add _GL_ATTRIBUTE_PURE macro. Bleah.

2011-11-14         John Haque      <j.eh@mchsi.com>

	* debug.c (set_breakpoint_at): Fix problem with setting
	breakpoints in a switch statement. Thanks to Giorgio Palandri
	<giorgio.palandri@gmail.com> for the bug report.

2011-11-14         Arnold D. Robbins     <arnold@skeeve.com>

	* mbsupport.h: Add check for HAVE_BTOWC, per Pat Rankin.

2011-11-12         Eli Zaretskii  <eliz@gnu.org>

	* mbsupport.h: Additional glop for dfa.c in Windows environment.

2011-11-01         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Move glop for ! MBS_SUPPORT to ...
	* mbsupport.h: ... here.
	* replace.c: Include missing_d/wcmisc.c if ! MBS_SUPPORT.
	* regex_internal.h: Move include of mbsupport.h up and add
	additional checks to avoid inclusion of wctype.h and wchar.h.

2011-10-27         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_strftime): Per Pat Rankin, instead of casting
	fclock, use a long variable and check for negative or overflow.

2011-10-25         Arnold D. Robbins     <arnold@skeeve.com>

	Merge with gawk_performance branch done. Additionally:

	* cint_array.c, int_array.c, str_array.c: Fix compiler complaints
	about printf formats (signed / unsigned vs. %d / %u).
	* eval.c (setup_frame): Add a missing return value.

2011-10-25         Arnold D. Robbins     <arnold@skeeve.com>

	* Makefile.am (dist-hook): Use `cd $(srcdir)/pc' so that
	`make distcheck' works completely.
	* builtin.c (do_strftime): Add cast to long int in check
	for fclock < 0 for systems where time_t is unsigned (e.g., VMS).

2011-10-25  Stefano Lattarini  <stefano.lattarini@gmail.com>

	dist: generated file `version.c' is not removed by "make distclean"

	* Makefile.am (distcleancheck_listfiles): Define to ignore the
	generated `version.c' file.

2011-10-24         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c (wcscoll): Create for VMS.
	* Makefile.am (dist-hook): Run sed scripts to make pc/config.h.

2011-10-24  Eli Zaretskii  <eliz@gnu.org>

	* builtin.c [HAVE_POPEN_H]: Include "popen.h".
	* README.git: Update for pc/ systems.

2011-10-21         Arnold D. Robbins     <arnold@skeeve.com>

	* Makefile.am (distcleancheck_listfiles): Added, per advice from
	Stefano Lattarini <stefano.lattarini@gmail.com>.
	* dfa.c: Additional faking of mbsupport for systems without it;
	mainly VMS.

2011-10-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	* configure.ac (AM_C_PROTOTYPES): Remove call to this macro.
	The comments in configure.ac said that the call to AM_C_PROTOTYPES
	was needed for dfa.h, synced from GNU grep; but this statement is
	not true anymore in grep since commit v2.5.4-24-g9b5e7d4 "replace
	AC_CHECK_* with gnulib modules", dating back to 2009-11-26.  Also,
	the support for automatic de-ANSI-fication has been deprecated in
	automake 1.11.2, and will be removed altogether in automake 1.12.
	* vms/vms-conf.h (PROTOTYPES, __PROTOTYPES): Remove these #define,
	they are not used anymore.
	* pc/config.h (PROTOTYPES): Likewise.

2011-10-18         Dave Pitts            <dpitts@cozx.com>

	* dfa.c: Move some decls to the top of their functions for
	C90 compilers.

2011-10-18         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_strftime): Add check for negative / overflowed
	time_t value with fatal error. Thanks to Hermann Peifer
	<peifer@gmx.eu> for the bug report.
	* dfa.c (setbit_wc): Non-MBS version. Add a return false
	since VMS compiler doesn't understand that abort doesn't return.

2011-10-10         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_sub): Init textlen to zero to avoid "may be
	used unitialized" warning. Thanks to Corinna Vinschen for
	pointing this out.
	* eval.c (unwind_stack): Add parentheses around condition in while
	to avoid overzealous warning from GCC.

2011-09-30  Eli Zaretskii  <eliz@gnu.org>

	* io.c (remap_std_file): Fix non-portable code that caused
	redirected "print" to fail if a previous read from standard input
	returned EOF.  Reported by David Millis <tvtronix@yahoo.com>.
	(remap_std_file): Per Eli's suggestion, removed the leading close
	of oldfd and will let dup2 do the close for us.

2011-10-11         John Haque     <j.eh@mchsi.com>

	* symbol.c: Add licence notice.
	* array.c (PREC_NUM, PREC_STR): Define as macros.

2011-10-09         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.

2011-10-07         John Haque     <j.eh@mchsi.com>

	Tail recursion optimization.
	* awkgram.y (grammar, mk_function): Recognize tail-recursive
	calls.
	* awk.h (tail_call, num_tail_calls): New defines.
	* eval.c (setup_frame): Reuse function call stack for
	tail-recursive calls.
	(dump_fcall_stack): Reworked.

2011-10-04         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h, main.c (gawk_mb_cur_max): Make it a constant 1 when
	MBS_SUPPORT isn't available to allow GCC dead code constant
	expression computation and dead code elimination to help out.

2011-10-02         Arnold D. Robbins     <arnold@skeeve.com>

	* io.c (rsnullscan, get_a_record): Fix the cases where terminators
	are incomplete when RS == "". Also fix the case where the new value
	is shorter than the old one.  Based on patch from Rogier
	<rogier777@gmail.com> as submitted by Jeroen Schot
	<schot@A-Eskwadraat.nl>.

2011-09-24         Arnold D. Robbins     <arnold@skeeve.com>

	* eval.c, io.c, re.c: Fix some spelling errors. Thanks to
	Jeroen Schot <schot@A-Eskwadraat.nl>.

2011-09-21         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c, mbsupport.h: Sync with GNU grep. Large amount of changes
	that remove many ifdefs, moving many conditions for multibyte
	support into regular C code and relying GCC's dead code optimization
	to elimnate code that won't be needed.
	* dfa.c: For gawk, add a number of additional defines so that things
	will compile if MBS_SUPPORT is 0.
	* array.c, awk.h, awkgram.y, builtin.c, eval.c, field.c, main.c,
	node.c, re.c: Change `#ifdef MBS_SUPPORT' to `#if MBS_SUPPORT'.
	* awk.h, regex_internal.h: Move NO_MBSUPPORT handling to ...
	* mbsupport.h: ...here.

2011-09-16         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.

2011-09-08         John Haque     <j.eh@mchsi.com>

	Optimization for compound assignment, increment and
	decrement operators; Avoid unref and make_number calls
	when there is no extra references to the value NODE.

2011-09-03         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.

2011-08-31         John Haque     <j.eh@mchsi.com>

	Grammar related changes: Simplify grammar for user-defined
	functions and general cleanups.

	* symbol.c: New file.
	* awkgram.y: Move symbol table related routines to the
	new file.
	(rule, func_name, function_prologue, param_list): Reworked.
	(install_function, check_params): Do all error checkings
	for the function name and parameters before installing in
	the symbol table.
	(mk_function): Finalize function definition.
	(func_install, append_param, dup_params): Nuked.
	* symbol.c (make_params): allocate function parameter nodes
	for the symbol table. Use the hash node as Node_param_list;
	Saves a NODE for each parameter.
	(install_params): Install function parameters into the symbol
	table.
	(remove_params): Remove parameters out of the symbol table.
	* awk.h (parmlist, FUNC): Nuked.
	(fparms): New define.


	Dynamically loaded function parameters are now handled like
	those for a builtin.

	* awk.h (Node_ext_func, Op_ext_builtin): New types.
	(Op_ext_func): Nuked.
	* ext.c (make_builtin): Simplified.
	(get_curfunc_arg_count): Nuked; Use the argument 'nargs' of
	the extension function instead.
	(get_argument, get_actual_argument): Adjust.
	* eval.c (r_interpret): Update case Op_func_call for a dynamic
	extension function. Handle the new opcode Op_ext_builtin.
	* pprint (profile.c): Adjust.


	Use a single variable to process gawk options.

	* awk.h (do_flags): New variable.
	(DO_LINT_INVALID, DO_LINT_ALL, DO_LINT_OLD, DO_TRADITIONAL,
	DO_POSIX, DO_INTL, DO_NON_DEC_DATA, DO_INTERVALS,
	DO_PROFILING, DO_DUMP_VARS, DO_TIDY_MEM,
	DO_SANDBOX): New defines.
	(do_traditional, do_posix, do_intervals, do_intl,
	do_non_decimal_data, do_profiling, do_dump_vars,
	do_tidy_mem, do_sandbox, do_lint,
	do_lint_old): Defined as macros.	
	* main.c: Remove definitions of the do_XX variables. Add
	do_flags definition.
	* debug.c (execute_code, do_eval, parse_condition): Save
	do_flags before executing/parsing and restore afterwards.


	Nuke PERM flag. Always increment/decrement the reference
	count for a Node_val. Simplifies macros and avoids
	occassional memory leaks, specially in the debugger.

	* awk.h (UPREF, DEREF, dupnode, unref): Simplified.
	(mk_number): Nuked.
	* (*.c): Increment the reference count of Nnull_string before
	assigning as a value.


	Revamped array handling mechanism for more speed and
	less memory consumption.

	* awk.h (union bucket_item, BUCKET): New definitions. Used as
	bucket elements for the hash table implementations of arrays;
	40% space saving in 32 bit x86.
	(buckets, nodes, array_funcs, array_base, array_capacity,
	xarray, alookup, aexists, aclear, aremove, alist,
	acopy, adump, NUM_AFUNCS): New defines.
	(array_empty): New macro to test for an empty array.
	(assoc_lookup, in_array): Defined as macros.
	(enum assoc_list_flags): New declaration.
	(Node_ahash, NUMIND): Nuked.
	* eval.c (r_interpret): Adjust cases Op_subscript,
	Op_subscript_lhs, Op_store_var and Op_arrayfor_incr.
	* node.c (dupnode, unref): Removed code related to Node_ahash. 
	* str_array.c: New file to handle array with string indices.
	* int_array.c: New file to handle array with integer indices.
	* cint_array.c: New file. Special handling of arrays with
	(mostly) consecutive integer indices.


	Memory pool management reworked to handle NODE and BUCKET.

	* awk.h (struct block_item, BLOCK, block_id): New definitions.
	(getblock, freeblock): New macros.
	(getbucket, freebucket): New macros to allocate and deallocate
	a BUCKET.
	(getnode, freenode): Adjusted.
	* node.c (more_nodes): Nuked.
	(more_blocks): New routine to allocate blocks of memory.

2011-08-24         Arnold D. Robbins     <arnold@skeeve.com>

	Fix pty co-process communication on Ubuntu GNU/Linux.

	* io.c: Add include of <sys/ioctl.h> to get definition of TIOCSCTTY.
	(two_way_open): Move call for this ioctl to after setsid() call.

2011-08-23         Arnold D. Robbins     <arnold@skeeve.com>

	* regex_internal.c (re_string_fetch_byte_case ): Remove
	__attribute((pure)) since it causes failures with gcc -O2
	-fno-inline. Thanks to Neil Cahill <ncahill_alt@yahoo.com>
	for reporting the bug.

2011-08-10         John Haque      <j.eh@mchsi.com>

	BEGINFILE/ENDFILE related code redone.

	* awk.h (prev_frame_size, has_endfile, target_get_record,
	target_newfile): New defines.
	* awkgram.y (mk_program): Initialize has_endfile appropriately for
	Op_get_record.
	(parse_program): Initialize new jump targets for
	Op_get_record and Op_newfile.
	* eval.c (unwind_stack): Change argument to number of
	items to be left in the stack. Adjust code.
	(pop_fcall, pop_stack): New defines.
	(setup_frame): Initialize prev_frame_size.
	(exec_state, EXEC_STATE): New structure and typedef.
	(exec_state_stack): New variable.
	(push_exec_state, pop_exec_state): New functions to save and
	later retrieve an execution state.
	(r_interpret): Use the new functions and the defines in
	cases Op_K_getline, Op_after_beginfile, Op_after_endfile,
	Op_newfile and Op_K_exit.
	* io.c (after_beginfile): When skipping a file using nextfile,
	return zero in case there was an error opening the file. 
	(has_endfile): Nuke global variable.
	(inrec): Add a second argument to pass errno to the calling
	routine.
	* debug.c (print_instruction): Update cases.

2011-08-10         Arnold D. Robbins     <arnold@skeeve.com>

	Fix (apparently long-standing) problem with FIELDWIDTHS.
	Thanks to Johannes Meixner <jsmeix@suse.de>.

	* field.c (set_FIELDWIDTHS): Adjust calculations.

	Fix problem with FPAT, reported by "T. X. G." <leopardie333@yahoo.com>

	* awk.h (Regexp): Add new member 'non_empty'.
	* field.c (fpat_parse_field): Save/restore local variable non_empty
	from member in Regexp struct.

2011-08-09         Arnold D. Robbins     <arnold@skeeve.com>

	Fix pty issue reported by "T. X. G." <leopardie333@yahoo.com>

	* configure.ac: Check for setsid.
	* awk.h: If not HAVE_SETSID define it as an empty macro.
	* io.c (two_way_open): Call setsid if using pty's.

2011-07-29  Eli Zaretskii  <eliz@gnu.org>

	* builtin.c (format_tree): Rename small -> small_flag,
	big -> big_flag, bigbig -> bigbig_flag.  Solves compilation errors
	when building Gawk with libsigsegv on MS-Windows, see
	https://lists.gnu.org/archive/html/bug-gawk/2011-07/msg00029.html.

2011-07-28         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_sub): Revert to gawk 3.1 behavior for backslash
	handling. It was stupid to think I could break compatibility.
	Thanks to John Ellson <ellson@research.att.com> for raising
	the issue.

2011-07-26         John Haque      <j.eh@mchsi.com>

	* eval.c (r_interpret): In cases Op_var_assign and Op_field_assign,
	include Op_K_getline_redir in the test for skipping the routine.

2011-07-26         John Haque      <j.eh@mchsi.com>

	Fix handling of assign routines for 'getline var'.
	Rework the previous fix for (g)sub.

	* awk.h: New define assign_ctxt for use in Op_var_assign
	and Op_field_assign opcodes. Remove define AFTER_ASSIGN.
	* awkgram.y (snode, mk_getline): Initialize assign_ctxt.
	* builtin.c (do_sub): Adjust to take only the first two
	arguments.
	* eval.c (r_interpret): In cases Op_var_assign and Op_field_assign,
	skip the routine as appropriate. Adjust case Op_sub_builtin.
	* main.c (get_spec_varname): New function.
	* debug.c (print_instruction): Use the new function to get
	special variable name.

2011-07-17         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (varinit): Mark FPAT as NON_STANDARD. Thanks to
	Wolfgang Seeberg <wolfgang.seeberg@yahoo.com> for the report.
	* Makefile.am (EXTRA_DIST): Add po/README, per advice from
	Bruno Haible.
	* dfa.c: Sync with GNU grep.
	* xalloc.h (xzalloc): New function, from GNU grep, for dfa.c.
	* README: Note that bug list is really a real mailing list.

2011-07-16         Arnold D. Robbins     <arnold@skeeve.com>

	* Makefile.am (AUTOMAKE_OPTIONS): Removed.
	* configure.ac (AM_INIT_AUTOMAKE): Removed dist-bzip2 option, on
	advice from Karl Berry.

2011-07-15         John Haque      <j.eh@mchsi.com>

	* awk.h (Op_sub_builtin): New opcode.
	(GSUB, GENSUB, AFTER_ASSIGN, LITERAL): New flags for 
	Op_sub_builtin.
	* awkgram.y (struct tokentab): Change opcode to	Op_sub_builtin
	for sub, gsub and gensub.
	(snode): Update processing of sub, gsub and gensub.
	* builtin.c (do_sub, do_gsub, do_gensub): Nuke.
	(sub_common): Renamed to do_sub. Relocate gensub argument
	handling code from do_gensub to here; Simplify the code a
	little bit. 
	* eval.c (r_interpret): Handle Op_sub_builtin. Avoid field
	re-splitting or $0 rebuilding if (g)sub target string is
	a field and no substitutions were done.
	* pprint (profile.c): Add case for the new opcode.
	* print_instruction (debug.c): Ditto.

2011-07-15         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h: Typo fix: "loner" --> longer. Thanks to Nelson Beebe.
	* builtin.c (efwrite): Fix flushing test back to what it was 
	in 3.1.8. Thanks to Strefil <strefil@yandex.ru> for the problem
	report.
	* configure.ac: Bump version to 4.0.0a for stable branch.

2011-06-24         Arnold D. Robbins     <arnold@skeeve.com>

	* Makefile.am (EXTRA_DIST): Add ChangeLog.0.
	* 4.0.0: Remake the tar ball.

2011-06-23         Arnold D. Robbins     <arnold@skeeve.com>

	* configure.ac: Update version to 4.0.0.
	* configure: Regenerated.
	* ChangeLog.0: Rotated ChangeLog into this file.
	* ChangeLog: Created anew for gawk 4.0.0 and on.
	* README: Bump version to 4.0.0.
	* 4.0.0: Release tar ball made.