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
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
|
Tue Jul 26 21:46:16 2005 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.5: Release tar file made.
Tue Jul 26 21:44:54 2005 Arnold D. Robbins <arnold@skeeve.com>
Copyright dates on all relevant files updated to 2005.
Wed Jul 6 17:09:02 2005 Arnold D. Robbins <arnold@skeeve.com>
Minor cleanups:
* io.c (do_index): Remove unused variables `mbclen', `mbs1' and `mbs2'.
* node.c (wstrstr): Remove unsed variable `j'.
(dump_wstr): `#ifdef' out, not currently needed.
* eval.c (op_assign): Move decl of `t1' and `t2' into a separate block for
the `! HAVE_FMOD' case. Keeps the compiler quiet. Similar for `ltemp'.
Wed Jul 6 16:51:31 2005 Arnold D. Robbins <arnold@skeeve.com>
* io.c (close_io): Now takes pointer to boolean parameter indicating
if there was a problem closing standard output or standard error.
Update it in the right places.
* awk.h (close_io): Update the declaration.
* main.c (main): New variable `stdio_problem'. Pass it to `close_io'.
Check the result and exit non-zero if there was a problem.
(usage, version): Print warning message if problems with stdout.
Unrelated:
* main.c (main): For call to `setlocale' for LC_MESSAGES, just use
`#ifdef LC_MESSAGES'. Per Bruno Haible <bruno@clisp.org>.
Wed Jul 6 16:44:58 2005 Jim Meyering <jim@meyering.net>
* main.c (init_fds): If any of the STDIN_FILENO, STDOUT_FILENO,
STDERR_FILENO are initially closed, reopen them with permissions
contrary to common usage so that any reasonable attempt to use
them will evoke the same sort of error as reading or writing to
a closed file descriptor would.
Mon Jul 4 09:38:29 2005 Arnold D. Robbins <arnold@skeeve.com>
More multibyte fixes from Kimura Koichi, <kimura.koichi@canon.co.jp>.
* node.c (format_val, r_dupnode): Spell `wstptr' correctly.
* regex_internal.c (build_wcs_upper_buffer): Label `offsets_needed' should not
be inside `#ifdef _LIBC'.
* regcomp.c (build_charclass): Fix declaration of `class_name' in prototype to
not be unsigned.
Thu Jun 30 11:52:34 2005 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (tree_eval): Node_not: Remember to print the exclamation
point! Thanks to Dan Nielsen <Dan.Nielsen@corporate.ge.com>
for the bug report.
* mbsupport.h: Fix spelling of HAVE_ISWUPPER. Thanks to
Kimura Koichi, <kimura.koichi@canon.co.jp>.
Sun Jun 26 16:37:59 2005 Arnold D. Robbins <arnold@skeeve.com>
Unrelated changes:
* builtin.c (do_length): Allow array argument to length().
Returns number of elements in array.
* awkgram.y (yylex): Ignore carriage returns in source code. Sigh.
Wed Jun 15 22:12:15 2005 Arnold D. Robbins <arnold@skeeve.com>
* node.c (isnondecimal): Check loc.decimal_point before using it.
Avoids problems with command line assignment when locale info may
not be set up all the way yet.
Wed Jun 15 21:59:54 2005 Arnold D. Robbins <arnold@skeeve.com>
* node.c (make_str_node): If working with multibyte characters, while
parsing string constants, keep multibyte characters together. This avoids
problems in cases where one of the bytes is backslash. Initial patch
supplied by Kimura Koichi, <kimura.koichi@canon.co.jp>.
Tue Jun 14 21:50:37 2005 Andrew J. Schorr <ajschorr@users.sourceforge.net>
Use Exponentiation By Squaring for integer powers for ^ and ^=.
* eval.c (calc_exp, cal_exp_posint): New functions.
(r_tree_eval): Use them.
Fri Jun 3 12:15:54 2005 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Further change the hack at the end so that
it works on Mac OS X `sed'. Sigh.
Thu Jun 2 22:44:01 2005 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac (TYPE_SOCKLEN_T): Use `int' as default type if can't
figure one out.
* awkgram.y: Warn that `//' is not a C++ comment. (:-)
Thu Jun 2 20:55:27 2005 Arnold D. Robbins <arnold@skeeve.com>
From: Benno Schulenberg <benno@nietvergeten.nl>
* eval.c (func_call): Take message out of gettext call since it's for debugging.
* ext.c (get_actual_argument): Fix formatting of message.
Wed May 25 09:19:37 2005 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Change hack at end that fixes Makefile to keep
version.c to use `sed' and not `ed'. More portable to OS/2, probably
other systems.
Mon May 23 09:01:26 2005 Arnold D. Robbins <arnold@skeeve.com>
Portability help from Jim Meyering.
* io.c: Rework ifdefs for <inttypes.h> and <stdint.h>. Test them
individually.
* configure.ac: Add AC_C_RESTRICT and code for socklen_t from rsync.
Check for isascii and btowc for regex.
Sat May 14 22:49:54 2005 Arnold D. Robbins <arnold@skeeve.com>
* wait_any (errno): Remove decl.
* gawk_popen: The pipe-simulated but not VMS or DOS version. Remove
decl/use of `strdup' in favor of `emalloc' and `strcpy'.
Wed May 11 18:33:30 2005 Arnold D. Robbins <arnold@skeeve.com>
All files: Updated address of FSF to:
51 Franklin Street, Fifth Floor
Cambridge, MA 02110-1301
Wed May 11 18:19:03 2005 Jim Meyering <jim@meyering.net>
* configure.ac: Use AM_GNU_GETTEXT([external]).
Reflect upgrade to gettext-0.14.4.
Reflect renaming of `jm_'-prefixed macros.
(AC_CONFIG_FILES): Remove intl/Makefile.
* Makefile.am (SUBDIRS): Remove intl.
(AM_CPPFLAGS): Remove -Iintl.
Wed May 11 11:42:06 2005 Arnold D. Robbins <arnold@skeeve.com>
Straighten out mess with `isblank' which is C99 <ctype.h> function.
* configure.ac: Remove check for `isblank' in call to AC_CHECK_FUNCS.
* regex_internal.h: #ifdef out definition of `isblank' and provide `is_blank'
function a la dfa.c.
* field.c: Ditto.
* regcomp.c: #ifdef use of `isblank' and add `is_blank' use instead.
Mon May 9 08:29:37 2005 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Add type check for `socklen_t', fixes compile
warning on AMD/64 Linux.
* io.c (socketopen): Change type of socket lenght variables
to `socklen_t' from `size_t'.
Thu May 5 22:00:03 2005 John E. Haque <j.eh@mchsi.com>
* io.c (iop_alloc): Let a input processor hook installed via
`register_open_hooks' open its own fd in case gawk does not know
how to open it.
(iop_open): Call `os_close_on_exec' after `iop_alloc'.
ADR: If `iop_alloc' returns NULL but the fd is valid, close
the fd to avoid an fd leak.
Mon May 2 08:05:59 2005 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (update_ERRNO): Don't use `return' in a `void' function.
* awk.h (AWKNUM): Back out use of `long double' based on LDBL_MANT_DIG.
* builtin.c (tmp_integer): Back out extra ifdefs.
Fri Apr 29 13:01:05 2005 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Look for `isblank' function.
* field.c: Add define for `isblank' if we don't have it.
Fri Apr 29 12:01:33 2005 Julian Foad <julianfoad@btopenworld.com>
From grep. Doesn't seem to affect awk.
* dfa.c (lex): Fix bug #9519: "echo do^re | grep do^re" was
failing to find a match. [Towards end, set `lasttok' before
returning `c'.]
Fri Apr 29 00:28:46 2005 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Jump through an amazingly convoluted hoop to get
config.status to keep version.c upon `make distclean'. Seems to
work though.
Thu Apr 28 23:40:02 2005 Stepan Kasal <kasal@ucw.cz>
* configure.ac (PRINTF_HAS_F_FORMAT): Some cosmetic changes.
(custom.h): Don't cat custom.h at the end of config.h; instead, use
AH_BOTTOM([#include "custom.h"])
* awklib/Makefile.am (AM_CPPFLAGS): Add $(top_srcdir) so that
custom.h can be found.
Thu Apr 28 23:21:22 2005 Jim Meyering <jim@meyering.net>
* field.c (set_FIELDWIDTHS): Tighten up the code to accept FIELDWIDTHS
values in [1..INT_MAX], e.g., detect overflow and invalid strings,
and reject strings starting with `-'.
Thu Apr 28 23:05:33 2005 Stepan Kasal <kasal@ucw.cz>
* dfa.c (parse_bracket_exp_mb): Shorten one part of the code, to get
closer to grep's copy.
Thu Apr 28 23:00:58 2005 Pat Rankin <rankin@pactechdata.com>
* builtin.c (format_tree) [#if VAXCRTL]: For floating point
formatting, reject zero_flag if using old VAXCRTL run-time
library to avoid getting erroneous results which appear as if
numerically incorrect (due to an embedded space in some cases,
extra trailing zeroes in others) rather than just misformatted.
`hsprint' test still fails, but not as badly.
Thu Apr 28 19:12:03 2005 Arnold D. Robbins <arnold@skeeve.com>
* re.c (reflags2str): Add three new RE_ flags from current regex.h
to bring the table up to date.
* builtin.c (format_tree): Save 2 spare bytes instead of one. Suggested
by Stepan Kasal.
Thu Apr 28 18:16:09 2005 Andrew J. Schorr <ajschorr@users.sourceforge.net>
* awk.h (IOBUF): Add new fields `opaque', `get_record', and `close_func',
to support insertion of an alternate input processor. This is used
by the XML extension.
(register_deferred_variable, register_open_hook, update_ERRNO_saved):
Declare new functions.
(load_environ, load_procinfo): Remove declarations -- these functions
are no longer global, since we use register_deferred_variable instead.
* awkgram.y (register_deferred_variable): New function to allow
calling code to register special variable names that trigger a callback
upon the first reference. This is now used to implement ENVIRON
and PROCINFO.
(variable): Search the list of deferred variables instead of hardcoded
tests for ENVIRON and PROCINFO.
* eval.c (set_BINMODE): Fix spelling of "arbitrary" in warning message.
(update_ERRNO_saved): New function that allows the caller to specify
the errno value instead of using the current value.
(update_ERRNO): Implement by calling update_ERRNO_saved(errno).
* io.c (iop_close): Call `iop->close_func' if non-NULL.
(close_redir): Should save `errno' value, otherwise `lintwarn' messages
might update it. Then use `update_ERRNO_saved' to set ERRNO.
(do_getline): Call `update_ERRNO_saved' to set ERRNO based on the
error code returned by the redirect function (instead of the current
value of errno). Similarly, use `update_ERRNO_saved' to set ERRNO
based on the value returned by `get_a_record'. But add a special
check to avoid updating ERRNO if `get_a_record' returns an error
code value of -1 (this is used by the XML extension which already
sets ERRNO before returning).
(register_open_hook): New function to register a function to be
called whenever a new data file is opened. This can be used to
install a special input processor (as in the XML extension).
(iop_alloc): Call registered open hook.
(get_a_record): If a `get_record' method has been set, call that instead.
* main.c (init_vars): Use `register_deferred_variable' to implement
ENVIRON and PROCINFO.
(load_environ, load_procinfo): Now static instead of global.
* doc/gawk.texi: Document new internal functions `update_ERRNO_saved',
`register_deferred_variable', and `register_open_hook'.
Thu Apr 28 10:50:10 2005 Arnold D. Robbins <arnold@skeeve.com>
* array.c (assoc_find, do_delete): Change incorrect uses of STREQN
to memcmp.
* builtin.c (do_index): Same.
* field.c (set_FS): Same.
* io.c (redirect, getredirect, do_close, set_RS): Same.
* re.c (reisstring): Same.
Wed Apr 27 21:35:57 2005 Arnold D. Robbins <arnold@skeeve.com>
Allow for long double. Initial changes from Jean-Marc Saffroy
<jean-marc.saffroy@ext.bull.net>.
* awk.h (AWKNUM): If have long doubles (LDBL_MANT_DIG), define AWKNUM
as long double, otherwise just use double.
* builtin.c (format_tree): Change type of tmpval to double.
(do_strtonum): Same for `d' and types used in casts.
(tmp_integer): Don't do bit shifting if have long doubles.
Unrelated, from Andrew J. Schorr:
* io.c (close_one): Check for RED_FILE|RED_WRITE, not just RED_FILE.
Mon Apr 25 12:23:18 2005 Andrew J. Schorr <aschorr@telemetry-investments.com>
* eval.c (r_tree_eval): In Node_assign_concat case, when copying string
constants, include the terminating zero byte.
Fri Apr 1 06:26:31 2005 Arnold D. Robbins <arnold@skeeve.com>
Update to Automake 1.9.5.
* INSTALL, aclocal.m4, depcomp, install-sh, missing,
mkinstalldirs, ylwrap: Updated.
Unrelated:
* builtin.c (do_tolower, do_toupper): Remove old code
based on 8-bit character table.
Wed Feb 23 08:23:22 2005 Arnold D. Robbins <arnold@skeeve.com>
* bisonfix.awk: New file, fixes continued #ifdef for dumb compilers.
* Makefile.am (awkgram.c): Fix rule to use it.
(EXTRA_DIST): Include bisonfix.awk.
Tue Feb 22 21:18:50 2005 Arnold D. Robbins <arnold@skeeve.com>
* random.h: Remove include of config.h and move it to ...
* random.c: Here. Move include of random.h back to where it was.
* regcomp.c, regex.c, regexec.c: NUKED all use of alloca not inside
`_LIBC' ifdef. Hooray!
Sat Feb 19 20:13:28 2005 Pat Rankin <rankin@pactechdata.com>
Workarounds for bugs and missing C89 features in old VAX C compiler.
* regex_internal.h "mbsupport.h": Suppress inclusion if NO_MBSUPPORT
is defined.
[MB_CUR_MAX]: Define as 1 if mbsupport.h hasn't defined it.
[ER_ERRMSG, ERRMSG_TYPE, ERRMSG_OFFSET, ERRMSG_SEPARATOR]: New macros
conditionalized upon gawk's NO_TOKEN_PASTING macro.
* regcomp.c: Use them.
(parse_dup_op): Use alternate initialization of start_token if
RE_TOKEN_INIT_BUG is defined.
* regexec.c (proceed_next_node): Compare push_fail_stack() result
explicitly against REG_NOERROR rather than implicitly against 0.
Sat Feb 19 20:05:50 2005 Pat Rankin <rankin@pactechdata.com>
* dfa.c "mbsupport.h": Suppress inclusion if NO_MBSUPPORT is defined.
Wed Feb 16 20:43:07 2005 Pat Rankin <rankin@pactechdata.com>
* awk.h "mbsupport.h": Suppress inclusion if NO_MBSUPPORT is defined.
* regex.h <sys/types.h>: Guard inclusion with HAVE_SYS_TYPES_H.
* regex.c <sys/types.h>: Likewise.
* random.c "random.h": include this first to get config.h setup.
<fcntl.h>: Guard inclusion with HAVE_FCNTL_H.
<unistd.h>: Guard inclusion with HAVE_UNISTD_H.
* io.c [#if defined(MSDOS) ||... defined(__CYGWIN__)]: Splice the
backslash continuation back into one long line.
Wed Feb 16 10:11:21 2005 Arnold D. Robbins <arnold@skeeve.com>
* node.c (unref, format_val): Add assertions checking that both
`tmp->wstptr != NULL' and `(tmp->flags & WSTRCUR) != 0' before
freeing `tmp->wstptr'. Thanks to kimura.koichi@canon.co.jp.
* random.c (HAVE_UNISTD_H): Conditionalize include of <unistd.h>.
Thanks to Scott Deifik <scottd@amgen.com>.
Sun Feb 13 18:24:50 2005 Arnold D. Robbins <arnold@skeeve.com>
* io.c (socketopen): Move `#ifdef MSG_PEEK' up to above
declarations too. Thanks to Michal Jaegermann.
* config.guess, config.sub: Updated from Savannah.
Thu Feb 10 15:48:48 2005 Arnold D. Robbins <arnold@skeeve.com>
* regex_internal.c (re_dfa_add_node): Remove variable `type'
and just use `token.type' directly in RE_ENABLE_I18N code below.
Saves a compiler warning, and a good compiler will handle it anyway.
* regexec.c (check_arrival_add_next_nodes): Move decl of `err'
inside #ifdef RE_ENABLE_I18N code where it's used.
* awkgram.y (yylex): Add casts to int before use of `strlen' results
for printf-style precision. Avoid a compiler warning.
* io.c (redirect, do_close): Same for use of tmp->stlen.
Thanks to Michal Jaegermann <michal@harddata.com>.
Wed Feb 9 10:19:15 2005 Stepan Kasal <kasal@ucw.cz>
* Makefile.am (datadir, libexecdir): Removed.
(awkdatadir): Renamed to pkgdatadir.
(pkgdatadir, LDADD): Use the make syntax to refer to other variables,
not @...@.
Wed Feb 9 10:05:46 2005 Arnold D. Robbins <arnold@skeeve.com>
* node.c (r_dupnode): Assign NULL to r->wstr after `getnode'.
Fix count of bytes to copy in call to `memcpy'.
Thanks to Kimura Koichi, <kimura.koichi@canon.co.jp>.
Tue Feb 8 19:26:22 2005 Pat Rankin <rankin@pactechdata.com>
* regcomp.c (init_dfa): Avoid strcasecmp() since regex.c doesn't
use awk.h and none of the assorted other included header files
are guaranteed to declare it.
(parse_expression): Modify casts for the string arguments passed to
build_charclass_op() to fix char * vs unsigned char * mismatch.
(parse_bracket_exp): Likewise add cast for the string argument
passed to build_charclass().
Mon Feb 7 15:04:09 2005 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (make_scalar): Don't use P() macro in definition.
Thanks to Juergen Kahrs <Juergen.Kahrs@barco.com>.
Wed Feb 2 16:36:19 2005 Arnold D. Robbins <arnold@skeeve.com>
* main.c (main): Call `close_io', without its result affecting
the exit status. Super small, super dark corner.
See test/exitval2.awk.
Tue Feb 1 11:58:29 2005 Arnold D. Robbins <arnold@skeeve.com>
* regex.h (__APPLE_CC__): Removed test and definition of __restrict.
Not needed for current MacOS X compiler.
Sun Jan 30 13:56:37 2005 Arnold D. Robbins <arnold@skeeve.com>
Fresh merge with CVS regex routines. Fixes handling of \B.
See tests/gnureop3.awk and also
http://sources.redhat.com/bugzilla/show_bug.cgi?id=693.
CVS base versions:
* regcomp.c: Version 1.92, Thu Jan 27 19:05:20 2005.
* regexec.c: Version 1.77, Thu Jan 27 19:06:34 2005.
* regex_internal.c: Version 1.49, Thu Jan 27 19:07:15 2005.
* regex_internal.h: Version 1.60, Wed Jan 26 22:40:50 2005.
* regexec.c: Version 1.77, Thu Jan 27 19:06:34 2005.
Sat Jan 22 22:30:40 2005 Arnold D. Robbins <arnold@skeeve.com>
Reinstate patch of 18 Nov 2001, for VMS, at least:
* random.c (srandomdev): ifdef-out. Lots of compile time
problems on multiple platforms, and gawk doesn't even
use the routine. The heck with fine-grained solutions.
Thu Jan 20 14:15:32 2005 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (LEX_FOR): Free NAME tokens in transformation of
`for (iggy in foo) delete foo[iggy]' into `delete foo'.
Thanks and a tip of the hatlo to Valgrind.
* dfa.c (_): Clean up stuff here by just including "gettext.h".
Per Bruno Haible.
Wed Jan 19 18:29:23 2005 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Improve parsing of numeric constants
and hex values, via a push from Paul Eggert. See test/hex.awk.
* regex_internal.c (re_node_set_alloc): If `size' is 0, just
zero out the structure. From valgrind.
Tue Jan 18 17:23:25 2005 Arnold D. Robbins <arnold@skeeve.com>
Make gawk multibyte aware. This means that index(), length(),
substr() and match() all work in terms of characters, not bytes.
* awk.h (NODE): Add `wsp' and `wslen' elements to value for wide
string.
(WSTRCUR, wstptr, wstlen, force_wstring): New macros.
(str2wstr, wstrstr, wcasestrstr): New declarations.
* builtin.c (do_index, do_length, do_substr, do_match): Handle wide
strings.
* eval.c (flags2str): Add WSTRCUR.
* node.c (format_val, r_dupnode, mk_number, make_str_node, unref):
Add code to deal with wide strings.
(str2wstr, dump_wstr, wstrstr, wcasestrstr): New functions.
Sun Jan 16 15:10:35 2005 Arnold D. Robbins <arnold@skeeve.com>
* random.h (int32_t): Define this type.
Thu Jan 13 14:38:13 2005 Arnold D. Robbins <arnold@skeeve.com>
Cause `configure --disable-nls' to still allow locale-correct
formating of numeric values.
* builtin.c (format_tree): Change #ifdefs to only test HAVE_LOCALE_H.
Improve code for ' flag so that extraneous separator is not included if
number of digits is multiple of locale separater count (3, 6, 9, etc.)
* dfa.c (dfaparse): Change ifdef to only test #ifdef LC_COLLATE.
* eval.c (fmt_ok): Remove ENABLE_NLS from #ifdef test.
* gettext.h: Include <locale.h> on both sides of test. Should really
be factored out.
* main.c (loc): Remove ENABLE_NLS from #ifdef test.
(main): Same in call to localeconv().
* node.c (isnondecimal): Remove ENABLE_NLS from #ifdef test.
Unrelated:
* regcomp.c (init_dfa): Change `codeset' to `codeset_name' in two
places.
Mon Jan 10 11:49:56 2005 Arnold D. Robbins <arnold@skeeve.com>
Annual sync with glibc.
* getopt_int.h: New file.
* Makefile.am (base_sources): Add it.
* getopt.h, getopt.c, getopt1.c: Updated.
* regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h,
regexec.c: Updated.
Original versions:
getopt_int.h, 1.1, Tue Mar 9 10:31:19 2004
getopt1.c, 1.10, Tue Mar 9 10:35:37 2004
getopt.h, 1.21, Fri Mar 19 00:19:32 2004
getopt.c, 1.53, Wed Mar 10 23:13:26 2004
regcomp.c, 1.87, Mon Dec 6 02:56:42 2004
regex.c, 1.126, Fri Jan 30 05:19:58 2004
regex.h, 1.33, Thu Nov 18 23:50:57 2004
regex_internal.c, 1.46, Thu Jan 6 20:59:49 2005
regex_internal.h, 1.57, Mon Dec 27 16:29:05 2004
regexec.c, 1.75, Mon Dec 27 16:29:52 2004
* regex.h: Add check for __APPLE_CC__ and definition of __restrict.
* regex.c: Add check for _MSC_VER and include <stdio.h>.
* regex_internal.h (_RE_ENABLE_I18N): Change test.
(re_realloc): Add check/fix for SunOS 4.1.x.
* regex_internal.c (build_wcs_upper_buffer): ifdef label
`offsets_needed', add cast in call to `wcrtomb'.
* regcomp.c (build_charclass, build_charclass_op): Remove `unsigned'
from declarations of `char *' params.
(regerror): Remove use of mempcpy.
(peek_token): Disallow \s and \S for gawk.
(build_charclass): Change decl of `class_name' and use it directly.
Nuke variable `name'.
(build_charclass_op): Change decl of `class_name' and `extra'.
Thu Jan 6 16:44:32 2005 Arnold D. Robbins <arnold@skeeve.com>
Improve autoconfiscation stuff for wide character use.
* builtin.c (do_tolower, do_toupper): Conditionally compile
call to `wide_tolower_toupper'.
(wide_tolower_toupper): Conditionally compile typedefs and function.
* mbsupport.h: Add check for having `wint_t', and `iswlower',
`iswupper', `towlower' and `towupper'.
* configure.ac (HAVE_WINT_T): Add test.
(AC_CHECK_FUNCS): Add `wint_t', `iswlower', `iswupper', `towlower'
and `towupper'.
Unrelated change:
* hard-locale.h (hard_locale): Add decl of `xmalloc' to prevent
redeclaration problems on some compilers.
Wed Jan 5 10:20:17 2005 Arnold D. Robbins <arnold@skeeve.com>
Update to Bison 2.0.
* bisonfix.sed: Removed, no longer needed.
* Makefile.am (EXTRA_DIST): Removed bisonfix.sed.
(awkgram.c): Fix build rule.
* awkgram.c: Regenerated.
Tue Jan 4 18:47:56 2005 Arnold D. Robbins <arnold@skeeve.com>
Update to Automake 1.9.4.
* alocal.m4, config.guess, config.sub, install-sh: Updated.
Mon Jan 3 14:08:27 2005 Arnold D. Robbins <arnold@skeeve.com>
Update to Automake 1.9.3.
* INSTALL, alocal.m4, config.guess, config.sub, depcomp,
install-sh, missing, ylwrap: Updated.
Mon Jan 3 11:23:36 2005 Arnold D. Robbins <arnold@skeeve.com>
Fix obscure issue. ^ in RS should only match at the very
beginning of the input. Essentially, the file is one long
string. To do this, use the `not_bol' flag in the `struct
pattern_buffer'. Thanks to Stepan Kasal for pointing out the
problem and to Andreas Schwab for pointing out the mechanism
for a solution.
* awk.h (RE_NEED_START, RE_NO_BOL): New flags for `research'.
(IOP_AT_START): New flag for IOBUF.
(research): Last parameter is now `flags'.
* builtin.c (do_match, sub_common): Change calls to `research'.
* eval.c (interpret, match_op): Same.
* field.c (re_parse_field): Same.
* io.c (spec_setup): Add IOP_AT_START flag.
(iop_alloc): Same.
(rsrescan): Modify logic to check IOP_AT_START and if not on to
add RE_NO_BOL to flags value in call to `research'.
(get_a_record): Clear IOP_AT_START upon return from `*matchrec'.
(iopflags2str): Add IOP_AT_START to table. Also IOP_CLOSED,
which was missing. (Ooops.)
* re.c (research): Last paramater is now flags. Modify logic to
handle RE_NO_BOL case by setting the right bit initially. Clean
up control flow so that it's cleared before returning. If RE_NO_BOL,
don't bother with the dfa matcher, as it doesn't have an analogous
capability.
Wed Dec 22 12:33:48 2004 Arnold D. Robbins <arnold@skeeve.com>
For --exec, don't allow x=y assignments where filenames would be.
Do allow -v. This is because we assume --exec is used mainly for
CGI stuff and we don't want var assigns to affect the code.
Suggested by Stepan Kasal; motivated by reading about web security.
* main.c (disallow_var_assigns): New variable.
(main): Set the var for --exec.
(arg_assign): Check it appropriately.
Sun Dec 19 17:27:09 2004 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_gensub): Make `global' flag smarter, such that
a string numeric constant (e.g., "3") acts like a numeric
constant.
* node.c (r_force_number): Not really related: Only set NUMCUR
if we actually convert some digits.
Sun Dec 19 16:08:50 2004 Arnold D. Robbins <arnold@skeeve.com>
* dfa.h, dfa.c: Synchronize with what's happening in GNU grep
development. Effectively only minor whitespace changes and some
slight code motion of ifdefs and includes.
* hard-locale.h: New file, extracted from old dfa.c.
* Makefile.am (base_sources): Add hard-locale.h.
Sun Dec 19 11:13:45 2004 Arnold D. Robbins <arnold@skeeve.com>
* io.c (socketopen): Change type of `readle' and `namelen'
variables to size_t. For QNX, but a good idea anyway. Thanks
to `Anthony' (rz1a@mail.ru).
Mon Dec 6 11:11:22 2004 Arnold D. Robbins <arnold@skeeve.com>
Undid change of Mar 9 2004, to add gofast patch. It gets things
wrong for gawk. This removes the bandaid of ifdef-ing out the
main check. Eventually this'll all get straightened out in the
GNU grep code.
* dfa.c (buf_offset): Removed.
(SKIP_REMAINS_MB_IF_INITIAL_STATE): Removed use of buf_offset, do
free `mblen_buf', `inputwcs'.
(match_anychar, match_mb_charset, transit_state_consume_1char,
transit_state): Remove use of buf_offset in mblen_buf.
(dfaexec): Use `free' and `malloc', not `realloc'.
Mon Dec 6 10:55:37 2004 Fumitoshi UKAI <ukai@debian.or.jp>
Forwarded from james@nocrew.org, the Debian contact.
* dfa.c (parse_bracket_exp_mb):
1. Build range correctly when IGNORECASE for [a-a] to also get 'A'.
2. For [:lower:] and [:upper:], if ignoring case, set type string
to "alpha". This parallels code in the regex routines.
3. Reset wc1 to EOF when parsing bracket expressions.
Mon Nov 29 18:36:25 2004 Arnold D. Robbins <arnold@skeeve.com>
* io.c (redirect): When allocating a new struct redirect, set
rp->pid to -1, not 0, so that code checking for EOF on an
input pipe works correctly.
Thu Nov 25 14:22:41 2004 Stepan Kasal <kasal@ucw.cz>
* Makefile.am (MAINTAINERCLEANFILES): Add.
* version.in (version_string): Use PACKAGE_STRING.
Tue Nov 23 17:27:38 2004 Stepan Kasal <kasal@ucw.cz>
* re.c: Fix a typo in a comment.
Mon Nov 22 16:47:00 2004 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Add lint check for tawk style modifiers on
regexes, /.../i and /.../s. Not that it'll help anyone.
Wed Oct 27 14:25:18 2004 Stepan Kasal <kasal@ucw.cz>
* builtin.c (do_tolower, do_toupper): Fix the wide char handling,
especially when the lowercased char doesn't ocuppy the same
number of bytes as its uppercase equivalent. Make use of ...
(wide_tolower_toupper): ... this new static function.
Mon Oct 25 11:51:14 2004 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (bchunk, bchunk_one, cksize): Change type of `olen'
to size_t from long. It is the 21st century now, after all...
Thanks to Stepan Kasal.
Mon Oct 11 10:49:09 2004 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Improve lint warnings for non-decimal constants.
* node.c (isnondecimal): Made a little smarter, thanks to Stepan Kasal.
Thu Oct 7 21:59:38 2004 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c (dfamust): Redo fix of 22 Sep to match code from
current GNU grep.
Sun Oct 3 23:06:00 2004 Arnold D. Robbins <arnold@skeeve.com>
* node.c (isnondecimal): Made smarter, so that 0xEE does
register as non-decimal. Added parameter to indicate use of
locale's decimal point and changed declaration and callers.
Tue Sep 28 18:38:17 2004 Arnold D. Robbins <arnold@skeeve.com>
* node.c (isnondecimal): New function, now smarter.
* awk.h (isnondecimal): Changed from macro to function.
Wed Sep 22 11:24:46 2004 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c (dfamust): At end, check results of `malloc'.
Based on bug report from Sorav Bansal <sbansal@stanford.edu>
for grep.
Mon Sep 20 13:18:18 2004 Arnold D. Robbins <arnold@skeeve.com>
New --exec option. Needed for gawk CGI scripts to prevent
arbitrary options and/or source getting passed in from the web.
* main.c (optab): New long option, --exec.
(main): Catch it. Like -f but end option processing.
(usage): Add it to the usage message.
Thanks to John DuBois and Don Stokes for their input.
Unrelated:
* dfa.c (dfaexec): Disabled caching into buffer that bypasses
multibyte initialization, since it can get things wrong. Thanks
to Andreas Schwab <schwab@suse.de>.
Mon Sep 20 12:59:42 2004 Andreas Schwab <schwab@suse.de>
* awkgram.y (nextc): Check for end of lexer buffer before
advancing ring buffer index.
Wed Sep 8 09:54:53 2004 Arnold D. Robbins <arnold@skeeve.com>
* main.c (main): Force LC_NUMERIC locale to "C" before parsing
the program, since a variable assignment with -v can leave the
locale set incorrectly.
Thanks to Sirix <sirix@poczta.onet.pl> for reporting the problem.
Wed Aug 25 18:55:30 2004 Arnold D. Robbins <arnold@skeeve.com>
* main.c (UPDATE_YEAR): New constant at top of file, where we
won't miss it.
(copyleft): Use it.
Sun Aug 22 17:26:39 2004 Stepan Kasal <kasal@ucw.cz>
Define gawk_mb_cur_max even if there is no mbs support, as
``const int'' and assign 1 to it.
This fixes a bug in re.c where #ifdef MBS_SUPPORT was missing.
* awk.h (gawk_mb_cur_max): Declare.
* main.c (gawk_mb_cur_max): Define.
* awkgram.y (nextc_is_1stbyte): Without mbs support, define to 1.
* builtin.c (index_multibyte_buffer): Define a dummy function
when there is no mbs support.
* awkgram.y, builtin.c, re.c: Remove some `#ifdef MBS_SUPPORT'.
Sun Aug 15 22:08:04 2004 Arnold D. Robbins <arnold@skeeve.com>
Import current FreeBSD random.c. Make it work for gawk.
Needed for cases where long is more than 32 bits.
* random.c: Imported from FreeBSD. Header includes tweaked.
* random.h: Typdef gawk_uint32_t appropriately and #define uint32_t
to it.
* configure.ac: Add calls to AC_CHECK_SIZEOF for unsigned int
and unsigned long.
Started with
http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/random.c
Thanks to Andreas Schwab <schwab@suse.de> for the pointer.
Thu Aug 12 13:09:53 2004 Arnold D. Robbins <arnold@skeeve.com>
* main.c (copyleft): Fix copyright year.
Mon Aug 2 12:18:15 2004 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.4: Release tar file made.
Mon Aug 2 12:17:40 2004 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Fix the hack. Do the sed on `Makefile',
not `Makefile.in'. Sigh.
Sun Aug 1 14:48:30 2004 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: MAJOR HACK: At end, remove version.c from Makefile.in
variable `CONFIG_CLEAN_FILES' so that `make distclean' doesn't
remove version.c.
Mon Jul 19 17:07:27 2004 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated from Savannah CVS.
Fri Jul 16 10:59:07 2004 Arnold D. Robbins <arnold@skeeve.com>
* re.c (make_regexp): Bracket code using `gawk_mb_cur_max'
inside `#ifdef MBS_SUPPORT'.
Thu Jul 15 12:36:25 2004 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c (parse_bracket_exp_mb): If doing case folding,
include the other case for regular characters inside [...].
* re.c (make_regexp): Smarten up handling of IGNORECASE,
particularly for multibyte character sets. Sigh.
Wed Jul 14 16:25:23 2004 John Haque <mary1john8@earthlink.net>
* eval.c (interpret): For `Node_K_return', use `copynode'
and not `dupnode' for non-PERM, non-TEMP values.
(func_call): Don't add TEMP flag to returned value.
These two fix a problem uncovered by the July 8 change in
`assoc_lookup'.
Wed Jul 14 16:14:09 2004 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (node_common): Add check `lexeme >= lexptr_begin',
from valgrind run.
Wed Jul 14 16:00:51 2004 John Haque <mary1john8@earthlink.net>
* io.c (rsrescan): Fix off by one error at end of record.
Thu Jul 8 16:59:51 2004 Stepan Kasal <kasal@ucw.cz>
* awkgram.y (output_redir): Make sure not to dereference NULL
pointer. The bug was triggered by the following code:
gawk 'BEGIN{print "date" |& getline}'
No test case created, beacuse of the following:
Correct interpretation involves executing "1" or "0" -- as the user
may have defined this, we would have to override this in the test
script. It's not worth the hassle.
Thu Jul 8 12:59:49 2004 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (load_casetable): Name changed from `load_ignorecase'.
* eval.c (load_casetable): Name changed from `load_ignorecase'.
Fix all uses.
Thu Jul 8 12:32:13 2004 John Haque <mary1john8@earthlink.net>
* awkgram.y (get_src_buf): Fix off-by-one error to avoid "does not end
in newline" messages.
* array.c (assoc_lookup): Small performance hack: for TEMP subs nodes,
use its string memory for ahname.
* ext.c (get_actual_argument): Minor code cleanup.
* builtin.c (do_lshift, do_rshift, do_and, do_or, do_xor, do_compl):
fixed to issue "non-numeric argument" lint warnings before using
`force_number'.
Mon Jun 21 16:53:35 2004 Arnold D. Robbins <arnold@skeeve.com>
More changes from John Haque to rationalize extension functions.
* awk.h (get_curfunc_arg_count): Name changed from
`get_curfunc_parm_count'.
* eval.c (get_curfunc_arg_count): Ditto, body redone to count actual
args passed at call time.
* ext.c (get_argument): Update range check.
(get_actual_argument): Simplify the code.
Mon Jun 14 14:01:16 2004 Arnold D. Robbins <arnold@skeeve.com>
Changes from John Haque and ADR to rationalize extension functions.
* awk.h (check_special, get_curfunc_parm_count, get_actual_argument):
new function declarations.
(get_scalar_argument, get_array_argument): new macros.
* awkgram.y (check_special): new function.
(yylex): Use `check_special' to search `tokentab'.
(dump_funcs): Always count functions, in order to get dynamic ones.
Removed bogus use of `static' on `tab' variable.
* eval.c (struct fcall): Change type of `count' to `size_t'.
(get_curfunc_parm_count): New function.
(push_args): Set `r->rnode' to NULL for local variable.
* ext.c (make_builtin): Add sanity checking for presence and
name of new function, and that it's not a redefinition.
(get_argument): Check that requested arg is within range of actual
number of parameters. Also clean up logic for Node_var_new,
Node_var_array, Node_array_ref.
(get_actual_argument): New function.
* profile.c (pp_builtin): Better handling of dynamic extension function.
Sun Jun 13 14:32:22 2004 Arnold D. Robbins <arnold@skeeve.com>
* io.c (redirect): Conditionalize checking for process recovery
on `#ifdef PIPES_SIMULATED'. Needed for MS-DOS and VMS.
* builtin.c (tmp_integer): Change bracketing of magic test to
`#ifdef HAVE_UINTMAX_T' which is more general and more correct.
Wed Jun 9 21:36:01 2004 Arnold D. Robbins <arnold@skeeve.com>
* re.c (make_regexp): Add dfa matching into IGNORECASE handling.
Tue Jun 8 15:38:56 2004 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (casetable): Remove `const'.
* eval.c (casetable): Remove `const'.
(load_ignorecase): New function. Loads locale-correct values in
upper 128 bytes.
(set_IGNORECASE): Call `load_ignorecase'.
Tue Jun 8 14:04:19 2004 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (get_src_buf): Make sure that value from
`optimal_bufsize' is reasonable. Increase it if not.
Tue Jun 8 13:54:28 2004 John E. Haque <mary1john8@earthlink.net>
* awkgram.y (statement:LEX_FOR): Fix bug in loop to `delete a'
optimization.
* io.c (format_tree): Check for out of range values for
positional specifiers.
Mon Jun 7 17:02:48 2004 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (tmp_integer): Bracket the magic test inside
`#ifndef VMS'.
* awk.h (child_catcher): Remove declaration.
* main.c (main): Remove `signal' calls for SIGCLD, SIGCHLD.
* io.c (child_died, child_signo, child_catcher): Removed.
(get_a_record): Remove code checking for death of child.
(redirect): If `rp' matches and is at EOF and type is input
pipe, and `rp->pid' is not -1, call `wait_any' to reap the
child. This is a heuristic, but it works pretty well.
Sun Jun 6 18:35:17 2004 Arnold D. Robbins <arnold@skeeve.com>
* io.c (get_a_record): Restore use of `memmove' instead of
memcpy. Otherwise some tests break on some systems. We think.
(child_died): Don't reset signal handler; breaks on some S5 systems.
(get_a_record): Reset handler if child_died. Still flaky on Solaris.
* configure.ac (version.c): Made from version.in again, for
non-Unix systems.
* Makefile.am (base_sources): Add version.c back.
* version.in: Include config.h for definition of const.
* main.c (version_string): Add back declaration, don't
include "version.i".
(main): Don't install child_catcher on Sun. (HACK)
Thu Jun 3 14:06:06 2004 Arnold D. Robbins <arnold@skeeve.com>
* main.c (version_string): Removed declaration, since
version.i is included directly.
* version.in: Removed test for definition of const.
Tue Jun 1 19:23:53 2004 Stepan Kasal <kasal@ucw.cz>
* Makefile.am (base_sources): Don't mention version.c, so that
it doesn't get distributed.
* po/POTFILES.in: remove version.c
* configure.ac: Create version.i from version.in.
* main.c: include version.i.
Tue Jun 1 18:33:32 2004 Arnold D. Robbins <arnold@skeeve.com>
Fix problem reported by Stephen Marchant <Stephen.Marchant@Cognex.com>
on Thu, 30 Oct 2003 13:11:42 -0500.
* regex_internal.h (re_realloc): Allow for SunOS pre-Standard C
`realloc' which doesn't accept NULL pointers.
* awk.h (erealloc): Same.
Unrelated. Change suggested by Peter Sobisch <petersob@gmx.net>, have
PROCINFO["version"] be the version of gawk:
* main.c (load_procinfo): Add in version.
Unrelated: Avoid warning:
* main.c (main): Cast calls to `bindtextdomain' and `textdomain' to
void. Avoids diagnostic with `configure --disable-nls'.
* dfa.c (check_matching_with_multibyte_ops): Remove unneeded nested
#ifdef, per Scott Deifik (scottd@amgen.com). Also fix some spelling
errors in comments.
Tue Jun 1 18:26:45 2004 Paul Eggert <eggert@twinsun.com>
Fix a bug reported by Mike Romaniw <msr@micromonumental.com>
to bug-gnu-utils on 2003-09-27: compl(compl(0xf0f)) returned 0xfff
on hosts with 64-bit uintmax_t and 64-bit IEEE-764 double, due to
rounding errors.
* doc/gawk.texi (Bitwise Functions): Leading nonzero bits are
removed in order to fit the result into a C 'double' without rounding
error.
* builtin.c: Include <float.h> if available.
(FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG): Define if not already defined.
(AWKSMALL_MANT_DIG, AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): New macros.
(tmp_integer): New function.
(do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): Use them.
Tue Jun 1 17:40:47 2004 Stepan Kasal <kasal@ucw.cz>
* eval.c (push_args): Set var_value to Nnull_string for
local variables.
Mon May 31 11:49:20 2004 Stepan Kasal <kasal@ucw.cz>
* replace.c: #undef DEBUG before including mktime.c, it has
different meaning there.
Mon May 31 08:25:30 2004 Arnold D. Robbins <arnold@skeeve.com>
* array.c (get_actual): Add extra error message for `delete f'
inside body of function `f'.
Mon May 3 09:53:34 2004 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.in, */Makefile.in: Updated to automake 1.8.4.
* config.guess, config.sub: Same.
* aclocal.m4, depcomp, install-sh: Same.
Mon May 3 09:24:45 2004 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Look for missing `strtoul'.
* replace.c: Include missing_d/stroul.c if not HAVE_STRTOUL.
* io.c (devopen): Use `strtoul' instead of `strtod' for
extracting fd number from "/dev/fd/N". (Thanks to Jim Meyering.)
* field.c (set_FIELDWIDTHS): Use `strtoul' instead of `strtod'
when parsing FIELDWIDTHS values. (Thanks to Jim Meyering.)
Mon Apr 19 20:12:57 2004 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.in, */Makefile.in: Updated to automake 1.8.3.
* config.guess, config.sub: Same.
2004-03-18 Stepan Kasal <kasal@ucw.cz>
* eval.c (make_scalar): Comment clarification.
* array.c (get_actual): Remove the condition ``canfatal''
before ``cant_happen()''; if the data are consistent, we
simply cannot get there with a non-func Node_param_list,
no matter whether we are called via get_array or not.
* awkgram.y (variable): Make one longer message, to help translators.
Tue Mar 9 17:34:10 2004 Arnold D. Robbins <arnold@skeeve.com>
Adapted `gofast' patch from Redhat Enterprise version of grep
to current dfa.c.
* dfa.c (buf_offset): New variable.
(SKIP_REMAINS_MB_IF_INITIAL_STATE): Modified to use it, don't
free `mblen_buf', `inputwcs'.
(match_anychar, match_mb_charset, transit_state_consume_1char,
transit_state): Use buf_offset in mblen_buf.
(dfaexec): Realloc things instead of free and malloc.
Thu Mar 4 16:46:55 2004 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac (AC_FUNC_MBRTOWC): Added.
(AC_CHECK_FUNCS): Removed `mbrtwoc'.
(REGEX_MALLOC): Removed. Not needed for new regex* routines.
* re.c (research): Removed comment and check for return of -2
since that was for old regex using alloca or REGEX_MALLOC.
Wed Mar 3 17:10:16 2004 Arnold D. Robbins <arnold@skeeve.com>
* io.c (close_one): Don't close stdout or stderr; can happen if
/dev/stdout or /dev/stderr are used in redirection and all the
open files get used.
Sun Feb 29 12:17:37 2004 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c (build_charclass, build_charclass_op): Change type of
`class_name' parameter to `const char *' from `const unsigned char *'
and adjust callers.
Thu Feb 26 15:20:22 2004 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (get_src_buf): Rewritten to better manage input and
supplying newlines on command line programs. Fixes problems reading
source files on Cygwin.
Unrelated fixes from mary1john8@earthlink.net:
* node.c (format_val): For no malloc case, free s->stptr if necessary.
* io.c (nextfile): Add missing call to `unref(FILENAME_node->var_value)'
for no files case.
(close_redir): Remove file from redirection list even if fp is
stdout or stderr.
Tue Feb 24 12:11:34 2004 Arnold D. Robbins <arnold@skeeve.com>
* regex_internal.c (build_wcs_upper_buffer): Enclose `offsets_needed'
label in `#ifdef _LIBC' to silence `unused label' compiler warning.
Tue Feb 24 11:57:18 2004 Nelson H.F. Beebe <beebe@math.utah.edu>
* regcomp.c (parse_expression): Add cast to (unsigned char *) in calls
to `build_charclass_op'.
* regex_internal.c (build_wcs_buffer): Add cast to char* in call to
`wcrtomb'.
* regex_internal.h (bitset_not, bitset_merge, bitset_not_merge,
bitset_mask, re_string_char_size_a, re_string_wchar_at,
re_string_elem_size_at): Change to use prototypes.
(re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
Declare as `internal_function'.
* Makefile.am: Add rule to make .i files. This assists in debugging.
* awk.h (m_tree_eval): Add casts to NULL. (Some compilers are just
dumb. ADR)
Mon Feb 23 15:58:39 2004 Arnold D. Robbins <arnold@skeeve.com>
Clean up occupied process slots of children that have died:
* awk.h (child_catcher): New function, declare it.
* main.c (main): Catch SIGCHLD/SIGCLD with `child_catcher'.
* io.c (child_died): New static variable.
(child_catcher): New function, sets `child_died', reinstalls self
as signal handler.
(close_rp): New function: isolates actual fp/iop closing logic.
(close_redir): Call `close_rp'.
(get_a_record): Check `child_died' and call `wait_any(0)' if so.
Add descriptive comment.
Unrelated clean up:
* eval.c (fcalls): Renamed from `fcall_list'. All uses changed.
(pop_fcall, push_args, dump_fcall_stack): Adjusted to use indexing
on `fcalls' instead of a pointer into it. Avoids hassles if `fcalls'
is realloc-ed during recursive tree_evals. Thanks to BWK.
* config.guess, config.sub: Updated from Savannah.
2004-02-19 gettextize <bug-gnu-gettext@gnu.org>
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.14.1.
Wed Feb 18 12:40:09 2004 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (rule): Use `msg' not `warning' for `must have an
an action part' message. `warning' is wrong, since it's a real error.
Mon Feb 16 12:17:39 2004 Arnold D. Robbins <arnold@skeeve.com>
* main.c, eval.c, builtin.c: Change test for `#ifdef HAVE_LOCALE_H'
to `#if ENABLE_NLS && defined(HAVE_LOCALE_H)' so that builds with
`configure --disable-nls' will actually work on non-glibc systems.
Thu Feb 12 02:05:34 2004 Stepan Kasal <kasal@ucw.cz>
Lots of misc changes from Stepan Kasal integrated.
* array.c: Various variables and parameters of static functions
changed from int to long, in order to prevent overflow.
* eval.c (make_scalar): New function; takes care of everything
that has to be done when a node of type Node_var_new or
Node_array_ref changes to a scalar variable.
(tree_eval, get_lhs): Call it.
(tree_eval): From now on, tree_eval(NULL) doesn't work;
it reports an internal error.
* awk.h (m_tree_eval): Likewise for the two macro versions.
* awkgram.y (statement): Make sure the Node_K_return's lnode is
always the return value, never NULL.
* Makefile.am (install-exec-hook, uninstall-links): Make use of
$(VERSION).
(INCLUDES): Renamed to AM_CPPFLAGS.
(AM_CPPFLAGS): The file libintl.h is generated in the
build subdirectory intl, not in the directory $(srcdir)/intl.
(diffout): New target is an alias for ``make -C test diffout.''
* awklib/Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS.
* README_d/README.hpux: Change the whitespace in the appended patch,
so that it applies to the current source.
* posix/gawkmisc.c: Change a tab to a space (needed for the above).
Make version control more in the style of current autotools:
* configure.ac: Remove obsolete versions of macros:
AM_INIT_AUTOMAKE doesn't need any parameters.
AC_OUTPUT shouldn't have any parameters either.
Its parameters go to a new macro: AC_CONFIG_FILES.
AC_CONFIG_HEADERS moved near the end of the file.
* configure.ac: Add [version.c:version.in] to AC_CONFIG_FILES
* version.in: Modify for autoconf substitutions.
* version.c: Remove, it's generated at configure time now.
* fixvers, patchlev.h, unsupported/tandem/ptchlvl.h: Nuke and ...
* Makefile.am, main.c: ... forget them.
Mon Feb 9 12:57:00 2004 Arnold D. Robbins <arnold@skeeve.com>
* awk.h builtin.c eval.c field.c (HUGE): Changed to `UNLIMITED'.
Avoids possible conflict with constant in svid-mode math.h. Thanks to
Roman.Putanowicz@iecn.u-nancy.fr for pointing out the problem.
Fri Feb 6 12:09:55 2004 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Check for `wctype', `wcscoll' and `iswctype'.
* mbsupport.h: New file. Merges and centralizes testing for MBS support.
* Makefile.am (base_sources): Add mbsupport.h to list.
* dfa.c, dfa.h, awk.h (MBS_SUPPORT): Include "mbsupport.h" and use the
test there.
* regex_internal (RE_ENABLE_I18N): Same.
* Makefile.am (CLEANFILES): Added.
Thu Feb 5 18:05:12 2004 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac (HAVE_WCTYPE_T): New test code added.
* dfa.h (wctype_t): Define if system doesn't. Needed here too
for other files that include dfa.h.
* dfa.c (wctype_t): Define if system doesn't.
(lex): Manually fill in arrays used for char class range testing
so will work on c89 and older compilers.
(parse_bracket_exp_mb): Split up an assignment to avoid type complaints.
* main.c (main): When checking for `close_io' failure, only set
`exit_val' to 1 if not already exiting.
* regcomp.c (regerror): Remove use of mempcpy. Generates too
many compiler warnings.
* configure.ac (AC_CHECK_FUNCS): Don't bother checking for it.
Wed Feb 4 17:34:47 2004 Arnold D. Robbins <arnold@skeeve.com>
* getopt.h (__THROW): Only define it if C++. The __GNU_PREREQ
macro is a major headache.
2004-02-02 Paolo Bonzini <bonzini@gnu.org>
* regexec.c (check_matching): Add P_MATCH_FIRST parameter.
(re_search_internal): Pass new parameter to check_matching.
(check_matching): Unless a parenthesized group is found at the
beginning of the regexp, advance P_MATCH_FIRST until we entered
a state different from the initial state.
Mon Feb 2 15:52:37 2004 Arnold D. Robbins <arnold@skeeve.com>
* re.c (research): Change last param to re_search to pass
NULL if `need_start' is false. May give us a marginal speed gain.
Thu Jan 29 17:04:51 2004 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (sub_common): Fix logic for `&' in replacement for
multibyte case. Simplify code a bit.
Tue Jan 20 10:41:45 2004 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Add check for `memmove'.
* replace.c: Include missing_d/memmove.c if don't have `memmove'.
Sun Jan 18 12:01:29 2004 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (sub_common): Add comment and support for 2001 POSIX
behavior when --posix in effect. The masses have been
clamoring for this one.
2004-01-16 gettextize <bug-gnu-gettext@gnu.org>
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.13.1.
* intl/*: Updated to 0.13.1.
Fri Jan 16 08:16:38 2004 Arnold D. Robbins <arnold@skeeve.com>
* getopt.h, getopt.c, getopt1.c: Synced to GLIBC version:
getopt.c: 1.51
getopt.h: 1.18
getopt1.c: 1.9
Thu Jan 15 15:28:48 2004 Arnold D. Robbins <arnold@skeeve.com>
Here we go again:
* regcomp.c, regex.h, regex.c, regex_internal.h, regex_internal.c,
regexec.c: Sync to GLIBC version, but with bug fixes. GLIBC
CVS versions:
regcomp.c: 1.76
regexec.c: 1.55
regex.c: 1.125
regex.h: 1.30
regex_internal.c: 1.39
regex_internal.h: 1.45
regexec.c: 1.55
* acinclude.m4: Removed, not needed for automake 1.8.x.
* configure.ac: Updated to autoconf 2.59.
Everything else updated to automake 1.8x and autoconf 2.59.
Wed Jan 14 14:26:36 2004 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c, dfa.h: Updated manually with most of the changes in
grep 2.5.1. That version lost the ability to match newlines
in the data, so the merge had to be done by hand. Sigh.
2004-01-12 Paolo Bonzini <bonzini@gnu.org>
ALLOCA patch from
http://sources.redhat.com/ml/libc-alpha/2004-01/msg00099.html
added.
* regcomp.c [_LIBC && !RE_ENABLE_I18N]:
Drop code to support this, it is never true.
(build_range_exp) [!_LIBC]: Do not create a range
in MBCSET for a single-byte character set.
(build_range_exp) [_LIBC]: Do not create a range
in MBCSET for a single-byte character set without
collation elements.
(init_dfa): Do not conditionalize on _LIBC, it
just makes the code less clear.
(parse_bracket_exp): Use NON_MATCH variable in
addition to "mbcset->non_match", not as an
alternative.
(build_charclass_op): rename NOT parameter to
NON_MATCH, use it instead of declaring a variable.
(parse_bracket_exp) [!_LIBC]: Pass NULL for MBCSET
if the character set is single-byte.
Wed Jan 7 15:23:04 2004 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (mk_rexp): Set n->re_cnt to 1. Makes reinstated
dfa code actually take effect! Don't know how I missed this.
Unrelated: sync regex code to glibc.
* regcomp.c, regex.h, regex.c, regex_internal.h, regex_internal.c,
regexec.c: Sync to GLIBC version, but with bug fixes. GLIBC
CVS versions:
regcomp.c: 1.74
regex.c: 1.124
regex.h: 1.30
regex_internal.c: 1.39
regex_internal.h: 1.43
regexec.c: 1.55
* regcomp.c (peek_token): Temporarily, we hope, disable \s and \S
operators. Too much trouble to document right now.
* dfa.c (lex): Add code for \s and \S but disable it until
next release.
Wed Dec 24 15:28:57 2003 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (r_tree_eval): For Node_assign_concat, add
call `free_temp(r)'. Thanks to mary1john8@earthlink.net.
Mon Dec 1 10:25:52 2003 Arnold D. Robbins <arnold@skeeve.com>
CONSTVAL not needed if we test PERM instead. Thanks to
mary1john8@earthlink.net. See test/concat3.awk.
* awk.h [CONSTVAL]: Removed.
* eval.c (flag2str): Removed CONSTVAL from table.
(r_tree_eval): For Node_assign_concat, it's enough to check
if l->flags has PERM clear.
* awkgram.y (yylex): Removed use of CONSTVAL for YSTRING and YNUMBER.
Mon Nov 3 16:33:26 2003 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (get_src_buf): Replace `memmove' with `memcpy' for
marginal portability gain to older systems.
* io.c (get_a_record): Ditto.
Sun Nov 2 15:59:27 2003 Arnold D. Robbins <arnold@skeeve.com>
* awk.h [CONSTVAL]: Renamed from `STRCONST'.
* eval.c (flags2str): Fix in table.
(r_tree_eval): For Node_assign_concat, check for the flag for
both left and right hand sides. Also add a `force_string' call
for the right hand side and the left hand side.
* awkgram.y (yylex): Change flag value for YSTRING and add use
of flag for YNUMBER.
Wed Oct 29 14:23:29 2003 Arnold D. Robbins <arnold@skeeve.com>
* awk.h [STRCONST]: New flag value.
* eval.c (flags2str): Add it to table.
(r_tree_eval): For Node_assign_concat, check for the flag so that
we don't clobber string constants given:
s = ""
s = s something
* awkgram.y (yylex): For YSTRING, set STRCONST flag.
Tue Oct 28 18:00:00 2003 Arnold D. Robbins <arnold@skeeve.com>
Force SUBSEP to always have a string value. Per bug report
from mary1john8@earthlink.net.
* awk.h (NODETYPE): New type, Node_SUBSEP.
(set_SUBSEP): Add declaration.
* awkgram.y (isnoeffect, isassignable): Add Node_SUBSPEP case.
* array.c (set_SUBSEP): New function.
* eval.c (nodetypes): Add Node_SUBSEP.
(r_tree_eval, r_get_lhs): Add code for Node_SUBSEP.
* main.c (varinit): Use Node_SUBSEP as type for SUBSEP.
* profile.c (tree_eval, pp_lhs, is_scalar, prec_level): Handle
Node_SUBSEP.
Tue Oct 7 09:26:33 2003 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (NODETYPE): New member `Node_assign_concat'.
* awkgram.y (exp): Look for case of `x = x y' and if so, create a
Node_assign_concat.
* eval.c (interpret): Add case for Node_assign_concat.
* profile.c (prec_level): Ditto.
(tree_eval): Ditto. For variables, call new function `vname' to
print name; handles varname field for -v variables, which end up
including the value.
(vname): New function.
Wed Sep 24 17:32:31 2003 Arnold D. Robbins <arnold@skeeve.com>
Speed up `avoid_dfa' kludge, at least a little:
* awk.h (struct Regexp): Add `has_anchor' member. Make it and
`dfa' member shorts; keeps space the same.
* re.c (make_regexp): Set `has_anchor' member correctly.
(avoid_dfa): Test for `has_anchor' member instead of searching
for it each time.
Sun Sep 21 18:34:32 2003 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (state): Only needs to be 256 bytes, initstate() can't
use any more than that. Well whadayaknow.
(do_rand, do_srand): Call `setstate' after calling `initstate'.
Tue Sep 16 15:44:29 2003 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (interpret): For Node_K_switch, add kludge_need_start stuff
as used in `match_op'. Sigh.
* re.c (make_regexp): Add `no_dfa' variable, which is true if
GAWK_NO_DFA exists in the environment. This enables run time
testing of things with/without the dfa matcher.
Mon Sep 15 18:36:38 2003 Arnold D. Robbins <arnold@skeeve.com>
After much soul searching, reinstated old dfa code. The performance
of the new regex is just disastrous. Sigh.
* awk.h (re_cnt): Reinstated old definition.
(struct Regexp): Added `dfareg' and `dfa' members.
(make_regexp): New last parameter in function, changed decl.
(avoid_dfa): Added declaration.
* awkgram.y (regexp, mk_rexp): Added use of `re_cnt'. Fixed call
to `make_regexp'.
* Makefile.am: Add dfa.h and dfa.c.
* eval.c (match_op): Complexified: added call to `avoid_dfa' and
`kludge_need_start' variable where used to pass FALSE as last parameter
of research().
* field.c (set_FS): Fixed call to `make_regexp'.
* io.c (get_a_record, set_RS): Fixed calls to `make_regexp'.
* re.c (make_regexp): Added last paramter (`dfa') to function.
Complexified the code.
(re_update): Fixed call to `make_regexp'.
(research): Complexified the code, added calls to dfa stuff.
(dfaerror): New function.
(re_update): Fixed call to `make_regexp'.
(avoid_dfa): New function.
Tue Sep 9 15:57:38 2003 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (get_src_buf): Fix calculation of `offset' when shifting
source lines around. In general, improve handling of things when
moving the source code line around. What a mess this code is.
Mon Sep 8 19:08:55 2003 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (fmt_ok): Make provision for %F format and printf %'f flag
here too.
2003-07-23 Christophe Bisiere <bisiere@univ-tlse1.fr> (tiny change)
* posix/regex.h (RE_TRANSLATE_TYPE): Define it to "unsigned char,"
to avoid problems at hosts with signed char.
* posix/regexec.c (re_search_internal): Don't say
"unsigned RE_TRANSLATE_TYPE."
Thu Aug 28 11:09:41 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (nextfile): Change use of variable `files' to make it
clearer that it's a boolean flag.
Tue Aug 26 22:58:15 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (useropen): Add `defined (HAVE_GETGROUPS)' as first test
in `#ifdef'. Brings things in sync with same test in main.c and awk.h.
Tue Aug 26 22:49:37 2003 Arnold D. Robbins <arnold@skeeve.com>
* dbug.h: New file.
* array.c, awkgram.y, builtin.c, eval.c, ext.c, field.c, io.c,
main.c, msg.c, node.c, profile.c, re.c: Converted to use
Fred Fish's `dbug' library. By default compiled out, thus
not affecting speed.
For the nonce, the `dbug' library itself is not shipped with
gawk, since I expect no-one else but me to be using it.
Thu Aug 21 23:15:36 2003 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (numfiles): Change extern decl to long, to match what's
in main.c. Keeps things working on 64-bit systems. Thanks to bug
report from Jan Oravec <jan.oravec@6com.sk>.
Wed Aug 20 14:53:47 2003 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (genflags2str): Move test for out-of-space inside test
for is the bit set.
Mon Aug 11 11:26:51 2003 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c (parse_bracket_exp): If `build_charclass' fails, just pass
its value on as the return value.
Sun Aug 10 16:59:14 2003 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c (build_range_exp): Make sure we don't
get WEOF on range characters.
Tue Aug 5 21:49:32 2003 Arnold D. Robbins <arnold@skeeve.com>
* array.c (get_actual): In `case Node_param_list' add test for
`&& (symbol->flags & FUNC) == 0' to the if.
Sun Jul 13 18:28:38 2003 Arnold D. Robbins <arnold@skeeve.com>
Further bug fix:
* awkgram.y (variable): Give the new variable an lnode
of Nnull_string if it's not an array, even if it is
a Node_var_new.
Fri Jul 11 09:32:21 2003 Arnold D. Robbins <arnold@skeeve.com>
Bug fix:
* eval.c (r_tree_eval): For Node_array_ref, set
tree->orig_array->var_value to Nnull_string too.
Unrelated i18n and POSIX change:
* configure.ac: Add check for local printf supporting %F format.
* awk.h (loc): New variable declaration.
* main.c (loc): Defined.
(main): Call `localeconv' to set loc.
* io.c (format_tree): Add support for printf quote flag, %'d for
decimal formats (not %e, %E), adds thousand separator into value.
2003-07-10 Paul Eggert <eggert@twinsun.com>
* io.c (two_way_open): If /bin/sh cannot be executed, exit
with status 126 consistently.
Mon Jul 7 11:01:43 2003 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.3: Release tar file made.
Mon Jul 7 09:55:49 2003 Arnold D. Robbins <arnold@skeeve.com>
* main.c (copyleft, usage): Make sure to fflush output fp. Per Jim
Meyering, if error, exit non-zero.
* ext.c (get_argument): Fix array paramater handling.
2003-07-06 Paul Eggert <eggert@twinsun.com>
* builtin.c (do_substr): Issue better diagnostics when
d_substr and d_length are NaN, or when 0 < d_length < 1.
Be careful when comparing double to SIZE_MAX, as
the comparison might return the "wrong" answer when
`(double) SIZE_MAX' is a number that is not equal to
SIZE_MAX.
(do_gensub): Watch out for HOW values that are out of range
or are NaN.
(do_dcngettext): dcngettext wants an argument of type
unsigned long, not long, so use a value of that type.
Fri Jul 4 10:58:02 2003 Arnold D. Robbins <arnold@skeeve.com>
* main.c (main): Make option letter 'D' fall through into default
unknown case if not debugging. Let's us have just one version of
`optlist'.
Thu Jun 26 15:25:57 2003 Arnold D. Robbins <arnold@skeeve.com>
* array.c (get_actual): Undo Stepan Kasal change of 2003-06-17.
See test/match2.awk.
Wed Jun 25 15:26:08 2003 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_rand): Change calculation so that result
obeys constraint: 0 <= N < 1. This is per history and POSIX.
Thanks to Nelson Beebe (beebe@math.utah.edu) for reporting
this issue.
Mon Jun 23 15:13:39 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (rs1scan): Per advice from Bruno Haible, it's safe
to skip the multibyte checking code if RS is '\n'. See
the comment in the code. Big performance improvement for
multibyte locales.
2003-06-20 Stepan Kasal <kasal@ucw.cz>
* eval.c (comp_func): if memcmp returns 0, we have to compare
the lengths.
2003-06-19 Stepan Kasal <kasal@ucw.cz>
* eval.c (interpret) <Node_K_arrayfor>: use NULL, not 0, to
initialize the variable list.
(comp_func): array indices no longer are string values,
you have to use ahname_str, ahname_len.
Tue Jun 17 11:53:46 2003 Arnold D. Robbins <arnold@skeeve.com>
* array.c (get_actual): Make check for isparam
smarter: also check for FUNC flag.
2003-06-17 Stepan Kasal <kasal@ucw.cz>
* array.c (get_actual): even if canfatal is FALSE, don't
tolerate existence of things which can't happen.
Mon Jun 16 16:21:44 2003 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Removed m4/Makefile.
* m4/Makefile.am: Removed.
2003-06-16 gettextize <bug-gnu-gettext@gnu.org>
* configure.ac (AC_OUTPUT): Add m4/Makefile.
(AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
Sun Jun 15 20:45:43 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (get_a_record): Enhance logic to fill buffers to include
`|| no_data_left(iop)'.
(rs1scan): Fix logic for setting recm fields for multibyte
character case.
2003-06-10 Stepan Kasal <kasal@ucw.cz>
* awkgram.y (release_all_vars): do not try to release a value of
Node_var_new; after get_lhs, use the lhs directly, do not try
to do (*lhs)->var_value; the Node_var case doesn't need
special treatment.
* builtin.c (do_match): `get_param' is successful iff it returns
Node_var_array---if the variable was new, get_param has already
changed the type.
* field.c (do_split): likewise.
Sun Jun 15 19:36:35 2003 Arnold D. Robbins <arnold@skeeve.com>
* node.c (r_dupnode): Typo fix in hash tables: stptr -> ahname_str.
Thanks to mary1john8@earthlink.net.
* array.c (get_actual): Add `if (canfatal)' before call to
`cant_happen'.
Sun Jun 15 19:25:49 2003 Patrick T.J. McPhee <ptjm@interlog.com>
* awk.h (memcpy_ulong): Add ! WIN32 to ifdefs.
Mon Jun 9 18:38:20 2003 Arnold D. Robbins <arnold@skeeve.com>
* custom.h (hpux): Added stuff to (hopefully) get `tzset'
declared on HP/UX 10 and up.
Mon Jun 9 17:12:24 2003 Patrick T.J. McPhee <ptjm@interlog.com>
* awk.h (ATTRIBUTE_EXPORTED): New macro for dynamic libs on Windows32.
* CONVMFTidx, stack_ptr, do_lint, lintfunc: Now have this attribute.
Mon Jun 9 13:11:33 2003 Arnold D. Robbins <arnold@skeeve.com>
Clean up of Stepan's patches.
* array.c (get_actual): Renamed from r_get_array. Added second
param canfatal if routine should print fatal message when not an array.
(get_actual): Renamed 'prm' to `isparam'.
(array_vname): Add static msglen var; only realloc string if it grows.
Don't use `s += sprintf(...)'. No good on old systems where sprintf
returns char *. Minor formatting cleanups.
(do_adump): Restored separate `a' and `r' variables; helps for debugging.
* awk.h (SCALAR, UNINITIALIZED): Removed entirely, renumbered other flags.
(get_array, get_param): New macros, calls get_actual.
(get_actual): Declaration changed from that of r_get_array.
* awkgram.y (release_all_vars): Restored previous version of code; new
version isn't right for Node_xx variables.
(variable): Minor code cleanup for readability.
* builtin.c (do_match): Use get_param and print our own message when
third parameter is not an array.
* eval.c: Added a few comments here and there, removed some no longer
needed comments.
* field.c (do_split): Use get_param and print our own message when
second parameter is not an array.
Mon Jun 9 11:46:21 2003 Arnold D. Robbins <arnold@skeeve.com>
* array.c (do_delete): Initialize hash1 and last to keep gcc -Wall happy.
* io.c (rsnullscan): Comment out label skip_leading for same reason.
Wed May 28 08:31:23 CEST 2003 Stepan Kasal <kasal@math.cas.cz>
* eval.c (forloops_active, in_function): Nuked.
(pop_all_forloops, pop_fcall_stack): are now inline.
Wed May 28 07:58:35 2003 Stepan Kasal <kasal@math.cas.cz>
* field.c, awk.h (Null_field): no longer static.
* field.c (init_fields): initial value of $0 can be Nnull_string,
no need to copy it.
* eval.c (r_get_lhs) <Node_field_spec>: test for uninitialized field,
which is Nnull_string for $0 and Null_field for $(>0).
* builtin.c (do_print_rec): test for uninitialized $0.
Tue May 27 17:03:02 2003 Stepan Kasal <kasal@math.cas.cz>
* awk.h (Node_var_new): New node type for variables which can be
either scalar or array. From now on, Node_var is always scalar.
(Node_gvar_ref): Nuked, its role can be taken by Node_array_ref.
(orig_var): removed, orig_array is enough.
(SCALAR, UNINITIALIZED): Flags nuked.
(var_uninitialized): new macro to distinguish uninitialized vars;
used in several other macros.
* array.c (r_get_array, array_vname, do_adump): adapt to the
above changes.
* awkgram.y, eval.c, field.c, main.c, node.c, profile.c: ditto.
Tue May 27 14:27:50 2003 Stepan Kasal <kasal@math.cas.cz>
* array.c (r_get_array): New function, which goes all the way
through Node_param_list to actual Node_var_array; if it encounters
non scalar Node_var, it changes it to Node_var_array.
(in_array, do_delete, do_delete_loop, do_adump, assoc_sort_inplace):
Use get_array.
(assoc_lookup): The parameter must be a Node_var_array.
* awk.h (get_array, r_get_array): Declare the new function and define
a macro to speed it up.
* builtin.c (do_match): Use get_array.
* eval.c (interpret) <Node_K_arrayfor>: ditto.
(r_get_lhs) <Node_K_arrayfor>: ditto.
* field.c (do_split): ditto.
Tue May 27 08:23:51 2003 Stepan Kasal <kasal@math.cas.cz>
Changed node->vname meaning for type Node_array_ref and Node_gvar_ref.
It contains only the reference name; one has to (recursively) follow
node->prev_array to find out the call history for the array.
* array.c (array_vname): New function to print the array name.
(assoc_lookup, do_delete): Use array_vname.
* eval.c (interpret, r_tree_eval, r_get_lhs): Use array_vname.
(push_args, pop_fcall): Things have simplified.
* awk.h (array_vname): Declare.
(prev_array): Define.
Sun Jun 8 11:25:36 2003 Stepan Kasal <kasal@ucw.cz>
* awkgram.y (append_right): when using savetail, remember that it
is not necessarily the tail of the list---it's just a pointer to
the last chunk appended.
Thu Jun 5 12:01:41 2003 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_strtonum): Make `strtonum(13)' work.
Wed Jun 4 17:07:06 2003 Corinna Vinschen <vinschen@redhat.com>
* io.c (binmode): Include function for __CYGWIN__ too.
Tue Jun 3 12:40:50 2003 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (interpret): Node_K_switch. For regex case, don't
call `free_temp' on the result of `force_string' if it's equal to
switch_value. Thanks to John DuBois <spcecdt@armory.com>
for finding the problem.
Sun Jun 1 13:08:22 2003 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_tree): For %c, force precision to 1.
Wed May 28 11:55:48 2003 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (isnoeffect, isassignable): Add Node_TEXTDOMAIN to
switches in both functions.
Wed May 28 11:38:59 2003 Stepan Kasal <kasal@math.cas.cz>
* awkgram.y (switch_body): remove rule ``switch_body:/*empty/''
as ``switch_body:case_statements'' covers it---this disambiguation
fixes a reduce/reduce conflict.
Sun May 25 16:23:43 2003 Corinna Vinschen <vinschen@redhat.com>
* configure.ac: Remove linking against /usr/lib/automode.o.
* configure: Regenerate.
Sun May 25 15:19:19 2003 Stepan Kasal <kasal@math.cas.cz>
* awk.h (get_lhs): For an initialized Node_var, you may return
the address of var_value pointer, no matter whether reference
bit was set or not. We were silly slowing down most of the
assignements.
* (get_a_record): after grow_iop_buffer, move recm.rt_start even
if recm.len == 0.
Mon May 19 16:55:59 2003 Arnold D. Robbins <arnold@skeeve.com>
Code for C-style switch statements. Initial version contributed by
Michael Benzinger <Michael.Benzinger@sabre-holdings.com>.
Disabled by default, use `configure --enable-switch' to turn it on.
* configure.ac: New AC_ARG_ENABLE for switch statements.
* awk.h (NODETYPE): New types for switch, case, default keywords
and respective lists.
* awkgram.y: New productions for switch statement. Does checking to
avoid duplicate cases.
* eval.c (nodetypes): New entries for new NODETYPEs.
(interpret): New code to do switch execution.
* profile.c (pprint): New code to print switch statements.
Mon May 19 15:05:43 2003 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Renamed from configure.in.
* fixvers: Now looks in configure.ac.
* Makefile.am: Now cites configure.ac.
* Misc other: Updated to Automake 1.7.5.
Sun May 18 12:03:56 2003 Arnold D. Robbins <arnold@skeeve.com>
* array.c (do_delete_loop): Fix bracing of logic for
tests.
Wed May 14 09:01:16 2003 Stepan Kasal <kasal@math.cas.cz>
Misc patches:
* builtin.c (do_match): if third parameter to `match' is supplied,
store all subexpressions which are applicable, even though there
are some unused between them.
* awkgram.y (yylex): when returning from unterminated REGEXP
(which is /* kludge */), take care to fake a yylval, to
prevent ``internal error'' later.
Sun May 11 15:51:00 2003 Stepan Kasal <kasal@math.cas.cz>
* io.c (rsnullscan, get_a_record): Boundary condition bug fixes.
Sun May 11 15:15:20 IDT 2003 Scott Deifik <scottd@amgen.com>
* awk.h: Add decls for `memcpy_ulong', `memset_ulong', and
MSC defines.
* regex.c: Include <stdio.h> if MSC for size_t.
Mon May 5 15:11:06 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (get_a_record): Only tweak RT's value in place if the current
RS scanner is the same as the last one. Bug report submitted by
John DuBois (<spcecdt@armory.com>).
Fri May 2 14:39:48 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (get_a_record): Add logic at end to be smart about setting
RT. Saves considerable time, esp for default case where RS = "\n".
Wed Apr 30 11:44:38 2003 Arnold D. Robbins <arnold@skeeve.com>
* field.c (do_split): Add check and code for Node_gvar_ref.
* array.c (in_array, do_delete, asort_actual): Same.
* builtin.c (do_split): Same for 3rd arg array parameter.
* eval.c (interpret): Same for Node_K_array_for.
(push_args): Same for evaluating extra args.
Tue Apr 29 15:54:28 2003 Arnold D. Robbins <arnold@skeeve.com>
Record reading code redone/simplified considerably.
* awk.h (IOBUF): Removed total field, no longer used.
* io.c (at_eof, has_data, no_data_left): New macros.
(RECVALUE, SCANSTATE): New enumerated types.
(rs1get_a_record, rsnull_get_a_record, rsre_get_a_record): Removed.
(get_a_record): Rewritten, again. Now contains just buffer and
record code; searching code moved into these functions:
(rs1scan, rsnullscan, rsrescan): New functions to scan a buffer
for record contents and terminator. Fill in values in:
(struct recmatch): Holds found record and terminator.
(spec_setup): Set iop->dataend to indicate data is already in buffer.
(nextfile, inrec): Use new macros instead of flag and pointer tests.
(set_RS): Set scanning function instead of record function.
FWIW, it all passes `make test'.
Sun Apr 27 21:02:39 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (do_close): At end, if do_posix return 0. See comment in code.
Tue Apr 15 09:56:03 2003 Isamu Hasegawa <isamu@yamato.ibm.com>
* configure.in: Check existence of wcrtomb, and wcscoll.
* configh.in: Likewise.
* configure: Re-generate.
Thanks to Kimura Koichi <kimura.koichi@canon.co.jp> for reporting.
Sun Apr 13 16:02:10 2003 Arnold D. Robbins <arnold@skeeve.com>
* main.c (main): Add call to `setlocale' for LC_NUMERIC after program is
parsed.
(arg_assign): Switch back to "C" locale for LC_NUMERIC for command
line assignments; this is per POSIX that period is decimal point for
program and command line assignments and the locale's separator
applies for input, output, and string to number conversion.
2003-03-26 Paul Eggert <eggert@twinsun.com>
* builtin.c [HAVE_INTTYPES_H]: Include <inttypes.h>.
[!HAVE_INTTYPES_H && HAVE_STDINT_H]: Include <stdint.h>.
(CHAR_BIT, INTMAX_MIN, UINTMAX_MAX): Define if the system does not.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): New macros, taken from
coreutils and many other GNU utilities.
(format_tree): When formatting, use widest possible integers
rather than settling with 'long'.
(do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): Likewise,
when doing bitwise operations.
* configure.in (jm_AC_TYPE_LONG_LONG, jm_AC_TYPE_UNSIGNED_LONG_LONG,
jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Add, since the mainline
code now needs this.
* doc/gawk.texi (Control Letters, Bitwise Functions): Document this.
* m4/intmax_t.m4: New file, taken from coreutils (but renamed to
avoid collision with our m4/inttypes.m4).
* m4/longlong.m4: New file, taken from coreutils.
* m4/uintmax_t.m4, m4/ulonglong.m4: Remove; superseded by the above
new m4 files.
* builtin.c (BITS_PER_BYTE): Remove; use CHAR_BIT instead, since
it's the standard name.
(do_lshift, do_rshift): Complain if the shift width is exactly equal
to the word size, too.
Thu Mar 27 10:44:11 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (rs1_get_a_record, rsnull_get_a_record, rsre_get_a_record):
Enhance check for no data left in file to be only if file has
non-zero size. Linux files such as /proc/filesystems stat as a
regular file of size 0, but actually have contents. Ugh.
Thanks to Martin Schlemmer <azarah@gentoo.org> for the bug report.
Wed Mar 26 12:19:32 2003 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_tree): Add a lint warning at label `out_of_range'.
Tue Mar 25 12:24:38 2003 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (variable): For array subscript, if NAME is in the
symbol table, but not a variable, array, or parameter, generate
a syntax error.
(isarray): New function, tests if a symbol can be an array.
* custom.h: Add check for HP/UX, needed for GCC.
Mon Mar 17 09:21:09 2003 Arnold D. Robbins <arnold@skeeve.com>
Allow simultaneous manipulation of a global array directly
and when passed as a parameter.
* awk.h (Node_gvar_ref): New nodetype.
[orig_var]: New macro.
* array.c (do_delete_loop, do_delete): Add logic to handle
seeing Node_gvar_ref.
* eval.c (nodetypes): Add Node_gvar_ref.
(r_tree_eval, r_get_lhs): Add Node_gvar_ref case.
Wed Mar 19 14:10:31 2003 Arnold D. Robbins <arnold@skeeve.com>
This time for sure.
-- Bullwinkle
* Release 3.1.2: Release tar file made.
Wed Mar 19 14:08:11 2003 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y: Production `program --> program error'. Add a return so
that we don't produce an infinite stream of error messages.
Thanks to Michael Mauch <michael.mauch@gmx.de> for pointing this out.
Wed Mar 19 13:45:50 2003 Corinna Vinschen <vinschen@redhat.com>
* regex.c [RE_ENBABLE_I18N]: remove definition; the one in
regex_internal.h is better and makes things work with Cygwin.
Tue Mar 11 11:54:20 2003 Arnold D. Robbins <arnold@skeeve.com>
* regex_internal.h: Don't include <limits.h> after <regex.h> was
included in regex.c, since it could redefine RE_DUP_MAX to a lower
value.
(bitset_set, bitset_clear, bitset_contain): Use 1UL instead of 1 in
left shift operations.
* regex.c: Include <limits.h> before <regex.h>
* regcomp.c (re_compile_fastmap_iter, init_word_char, parse_expression):
Use 1UL instead of 1 in left shift operations.
Mon Mar 10 15:45:37 2003 Corinna Vinschen <vinschen@redhat.com>
* configure.in: Update CYGWIN case to add /usr/lib/automode.o.
Thu Mar 6 11:07:36 2003 Arnold D. Robbins <arnold@skeeve.com>
Updated to automake 1.7.3.
* config.guess, config.sub: Updated from prep.
* Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2 to get .bz2 files.
Tue Mar 4 10:40:46 2003 Arnold D. Robbins <arnold@skeeve.com>
* version.in: Added goop for K&R compilers; forgot that I have to fix
this file which then is used to create version.c.
Mon Mar 3 17:00:44 2003 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: New option --disable-lint.
* awk.h (do_lint, do_lint_old): Conditionally declare based on NO_LINT.
* eval.c (set_LINT): Ifdef out body if NO_LINT.
* main.c (do_lint, do_lint_old): Conditionally compile properly.
(main): Handle --lint argument code.
Fri Feb 28 10:43:07 2003 Arnold D. Robbins <arnold@skeeve.com>
* main.c (main): Add LC_TIME to the things that get set with
setlocale().
* builtin.c (format_tree): Change test of `n0-- <= 0' to ==, avoids
VMS diagnostic.
Thu Feb 27 17:48:29 2003 Pat Rankin <rankin@pactechdata.com>
* regexec.c (proceed_next_node): Cast re_string_get_buffer to char *.
(get_subexp): Likewise.
Tue Feb 25 12:33:41 2003 Arnold D. Robbins <arnold@skeeve.com>
* regex_internal.h, regex_internal.c, regcomp.c, regexec.c:
Make MB_CUR_MAX into thread local variable re_mb_cur_max.
Unrelated, from Scott Deifik:
* io.c (grow_iop_buffer): Add checks for overflow of new buffer size.
Mon Feb 24 13:30:59 2003 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (gawk_mb_cur_max): Declared:
* main.c (gawk_mb_cur_max): Defined, init to 1.
(main): Initialize gawk_mb_cur_max.
* awkgram.y, builtin.c, eval.c, field.c, io.c, re.c (mb_cur_max):
Replaces all instances of MB_CUR_MAX, which is a function call (!)
in glibc. Big speed up, especially for -Fx case, where x is a
single character.
Unrelated:
* awkgram.y (rule): For non-existent action, use a Node_K_print_rec
node.
Sun Feb 23 15:45:20 2003 Arnold D. Robbins <arnold@skeeve.com>
Speed up plain `print' and `print $0':
* awk.h (Node_K_print_rec): New node type.
(do_print_rec): Declare function.
* awkgram.y (simple_stmt): Create humongous test for plain `print'
or `print $0', and if so, use a Node_K_print_rec for it. Modify
test for lint message.
* builtin.c (redirect_to_fp): New function for common code to get fp
and rp for do_print{,f,_rec} functions.
(do_print): Use redirect_to_fp().
(do_printf): Use redirect_to_fp().
(do_print_rec): New function to just print $0 from field_arr[0]
directly; will rebuild the record first if necessary.
* eval.c (nodetypes): Add Node_K_print_rec.
(interpret): Add Node_K_print_rec case.
* profile.c (pprint): Add Node_K_print_rec case.
(pp_print_stmt): If null lnode, print "$0" else print the lnode.
Unrelated:
* regex_internal.h: Add ENABLE_NLS to the condition for using
gettext so that --disable-nls really disables it.
Sat Feb 23 22:46:00 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (rs1_get_a_record, rsnull_get_a_record, rsre_get_a_record):
Modify buffer-filling algorithm to always read one or more multiples
of the blocksize (iop->readsize).
(grow_iop_buffer): Make sure there's room for the current partially
read record and one disk block buffer.
Thu Feb 20 22:02:00 2003 Arnold D. Robbins <arnold@skeeve.com>
* re.c (research): Fix typo in cast of precision value to int.
* regex.h, regex.c, re_internal.h, re_internal.c, regcomp.c, regexec.c:
synced to GLIBC source, maintaining K&R portability changes, and bug
fixes, although losing ability to compile each file separately.
* Makefile.am (SOURCES): Moved placement of regex source files from here ...
(EXTRA_DIST): ... to here.
Tue Feb 18 14:17:33 2003 Arnold D. Robbins <arnold@skeeve.com>
* re.c (research): Cast precision value to int.
* builtin.c (format_tree): For toofew, cast field width value to int.
* io.c (rsre_get_a_record): Initialize restart and reend. Add a variable
to make sure they're set before used at end of function.
(iopflags2str): Removed decl at top and made not static so that GCC
stops complaining that it's defined but not used. Bleah.
Mon Feb 17 11:02:34 2003 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated from prep.
Sun Feb 16 15:47:15 2003 Scott Deifik <scottd@amgen.com>
* awk.h (format_tree, make_str_node): Changed decls to match how
they are called.
* builtin.c (format_tree, sub_common): Same.
* node.c (make_str_node): Same.
Wed Feb 5 14:18:01 2003 Arnold D. Robbins <arnold@skeeve.com>
* awk.h: Removed duplicate decl of set_prof_file(). Removed
undef of const for non-ANSI C; config.h should handle it.
* msg.c (set_loc): Use srcfile and srcline in regular code to shut up
stupid SGI compiler.
Tue Feb 4 14:28:06 2003 Arnold D. Robbins <arnold@skeeve.com>
All relevant files: Copyright year updated to 2003.
Tue Feb 4 13:40:41 2003 Martin C. Brown <mc@whoever.com>
* intl/libgnuintl.h: Preprocessor fixes for MacOS X.
* regex.h: Ditto.
Tue Feb 4 13:39:37 2003 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (builtin_func): New string for use in rationalizing
function parsing and installation code.
Sun Feb 2 16:00:55 2003 Arnold D. Robbins <arnold@skeeve.com>
Cache function body code pointer so that only have to find it the
first time a function is called. This potential for optimization
brought to my attention by Stepan Kasal.
* awk.h [funcbody]: New macro.
* awkgram.y (FUNC_CALL): Set $$->funcbody to NULL.
* eval.c (func_call): Changed to take top-level Node_func_call as the
single parameter. Do the lookup and caching.
(r_tree_eval): Change how func_call() is called in switch.
* profile.c (pp_func_call): Similar changes.
(tree_eval): Ditto.
Sun Feb 2 15:32:42 2003 Stepan Kasal <kasal@math.cas.cz>
ADR: More grammar rationalization/repair from Stepan.
* awkgram.y (common_exp, simp_exp): the rule from getline (without
pipe) has been moved from common_exp to simp_exp.
The redirection of print statements reworked. The idea comes from
mawk-1.3.3; much thanks to Michael Brennan!
* awkgram.y (IO_OUT, IO_IN): new tokens.
(APPEND_OP, TWOWAYIO): swallowed by the above ones.
(in_print, in_parens): new static variables, to trace whether
IO_OUT is expected.
(yylex): emit the new tokens, update in_parens on '(' and ')'.
(exp): the print command(s) reworked.
(oputput_redir): reworked.
(print_expression_list): new non-terminal.
(rexp, rexpression_list opt_rexpression_list): nuked.
(exp, simp_exp): ``cmd|getline'' rule changed to
``cmd IO_IN getline'' and moved from exp to simp_exp.
Unrelated:
* awkgram.y (variable): Don't return Node_func, issue a fatal
error instead.
* eval.c (r_tree_eval, r_get_lhs): Omit special checks for Node_func,
nodes of this type cannot get into the program tree.
* profile.c (tree_eval, pp_lhs): Likewise.
Thu Jan 30 17:42:05 2003 Stepan Kasal <kasal@math.cas.cz>
ADR: Applied lots of patches from Stepan.
* array.c (do_delete_loop): Call after_assign for the loop index.
* field.c (do_split): The third argument to split(), sep, has to be
evaluated and the result dupnoded before assoc_clear is called,
similarily as src. And we needn't to evaluate the third argument
if it's CONSTant regex and the first parameter is null string.
* awk.h (dupnode): Changed to macro, function renamed to r_dupnode.
* node.c (dupnode, r_dupnode): Rename.
* awkgram.y (parms_shadow): Return bool value, ...
(shadow_funcs): ... which will enable us to end the program if
lintfunc is fatal.
(program): Cleanup of the rules defining the ``program'' non-terminal.
(start, program, rule): no value associated,
expression_value is now treated similarily as begin_block and end_block.
(pattern, rule): bison actions for non-terminal `pattern' now
add a new rule to the appropriate Node_rule_list, action for
non-terminal `rule' now only adds the associated code block
to the rnode of Node_rule_node.
(io_allowed): renamed to !begin_or_end_rule.
(append_pattern): New function, adds new Node_rule_node to a rule_list.
(mkrangenode): Deleted, this tiny function was called only once.
(function_body): non-terminal replaced by `action'.
(statements, action, statement): `statements' can now be empty;
both callers had to accomodate to this.
(statements): Don't call isnoeffect($2->type) if
$2 happens to be NULL.
Mon Jan 27 14:12:19 2003 Arnold D. Robbins <arnold@skeeve.com>
* io.c (iop_close): Based on report by Stepan Kasal and because of
his changes, don't call reset_record() when saving a copy of contents
of $0.
* awkgram.y: Improved function parsing error messages for case where
user uses a builtin name as a function name. Based on error report
by Stepan Kasal.
* ext.c (make_builtin): Set FUNC flag for new function. Based on error
report by Stepan Kasal.
Mon Jan 27 14:06:20 2003 Stepan Kasal <kasal@math.cas.cz>
* field.c (reset_record): No longer call set_record(), the code is
moved to the function body. Do not set MAYBE_NUM.
(set_record): Call reset_record() to perform the common tasks.
The prototype has changed, change awk.h and all callers.
Mon Jan 27 10:50:03 2003 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (NODE): `proc' renamed to `builtin,' to fix a conflict
on some systems. Replaced on all spots where it was used.
Sun Jan 26 11:52:01 2003 Arnold D. Robbins <arnold@skeeve.com>
* awk.h [NUMSUBPATS]: New macro.
* builtin.c (do_match): Use it in loop that fills in subpattern info.
* eval.c (r_tree_eval): for Node_assign, don't call free_temp(),
as assign_val() contains dupnode(), which would clear the TEMP
flag. From Stepan Kasal <kasal@math.cas.cz>.
* config.sub: Updated from prep.
Sun Jan 19 22:34:01 2003 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (do_asorti): Add declaration.
* awkgram.y (tokentab): Add asorti() function to table.
* array.c (ASORT_TYPE): New enumerated type for VALUE or INDEX array
sorting.
(assoc_sort_inplace): New second arg of type ASORT_TYPE. Additional code
to rearrange array so rest of merge-sorting works; basically values are
tossed and index moved into value spot.
(asort_actual): Renamed from do_asort(). Takes new ASORT_TYPE argument.
(do_asort): Calls asort_actual(tree, VALUE).
(do_asorti): Calls asort_actual(tree, INDEX).
* main.c (load_procinfo): Free groupset array when done with it.
Thu Jan 16 18:30:50 2003 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_match): Revised to provide start and length
indices in array 3rd parameter.
* config.guess, config.sub: Updated from prep.
Thu Jan 2 11:09:12 2003 Arnold D. Robbins <arnold@skeeve.com>
Updated to bison 1.875.
Tue Dec 31 17:14:45 2002 Arnold D. Robbins <arnold@skeeve.com>
Updated things to automake 1.7.2 and autoconf 2.57.
Tue Dec 31 16:54:44 2002 Arnold D. Robbins <arnold@skeeve.com>
* awk.h [IOP_CLOSED]: New flag.
* io.c (iop_close): Set IOP_CLOSED flag.
(inrec): Check for IOP_CLOSED; if set return EOF.
(rs1_get_a_record, rsnull_get_a_record): Check for EOF before
refilling buffers.
(rsre_get_a_record): Ditto. Also, set RT before updating pointers in IOP.
* Makefile.am (efence): New target to compile with Electric Fence.
2002-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* awk.h (catchsig): Delete prototype.
* main.c (catchsig): Make static and remove excess argument.
(main): Delete unnecessary casts.
* io.c (rs1_get_a_record, rsnull_get_a_record): Mark parameter
with ATTRIBUTE_UNUSED.
Mon Dec 23 11:54:07 2002 Arnold D. Robbins <arnold@skeeve.com>
* regex_internal.h, regex_internal.c, regcomp.c, regexec.c, version.c:
Fixed to compile, once again, under K&R compilers.
* io.c (grow_iop_buffer): Fix calculation of new size to
first subtract 2, double, then add 2 back in.
Fri Dec 20 11:48:42 2002 Arnold D. Robbins <arnold@skeeve.com>
get_a_record split into three routines.
* awk.h (IOBUF): Structure reworked for new code.
* io.c (get_a_record): Now a pointer to different functions.
(rs1_get_a_record, rsnull_get_a_record, rsre_get_a_record): New functions.
(iop_alloc, iop_close): Reworked for new structure.
(do_getline, inrec): Modifiend for new EOF condition.
(iopflags2str): New routine.
Fri Dec 20 11:05:50 2002 Isamu Hasegawa <isamu@yamato.ibm.com>
* regex.c, regex_internal.c, regex_internal.h: Changes to allow separate
compilation of the reg*c files.
* regcomp.c: Fix bug in using translation tables with [[:upper:]] etc.
* Makefile.am: Move regex files into sources from EXTRA_DIST. (ADR)
Mon Dec 9 14:20:42 2002 Stepan Kasal <kasal@math.cas.cz>
* main.c (main): When processing option '-f' don't ignore spaces
if optarg points at the beginning of the current argument
(like ``gawk -f " " file'').
2002-11-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* awkgram.y (stopme): Mark parameter with ATTRIBUTE_UNUSED.
(yyerror): Add ATTRIBUTE_PRINTF_1.
* builtin.c (do_systime, do_rand): Likewise.
* field.c (set_field, re_parse_field, def_parse_field,
posix_def_parse_field, null_parse_field, sc_parse_field,
fw_parse_field): Likewise.
* io.c (pidopen, useropen): Likewise.
* main.c (catchsig): Likewise.
* profile.c (init_profiling): Likewise.
* awk.h (err): Add ATTRIBUTE_PRINTF.
* msg.c (err): Delete redundant prototype. Fix format specifier.
Wed Nov 27 06:04:20 2002 Pat Rankin <rankin@pactechdata.com>
* ext.c [#if !DYNAMIC] (do_ext): Cast string value for error node.
Sun Nov 24 18:23:29 2002 Arnold D. Robbins <arnold@skeeve.com>
From Paul Eggert, with some edits by me.
* builtin.c (do_substr): Consistently use floating point
values for lint messages, so they should be printed pretty
much as the user saw them. Check for overflow before
converting floating point to integer. Do the right thing with
NaNs.
Check for index out-of-range before checking for length
out-of-range, to avoid some nasty effects if address
arithmetic overflows (e.g., indx + length < index).
Allow zero-length substrings when checking for lint if
do_lint == LINT_INVALID.
Sun Nov 24 18:21:06 2002 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (LINT_ALL, LINT_INVALID): New constants.
* main.c (main): Allow --lint=invalid which restricts warning to
things that aren't valid.
* eval.c (set_LINT): Update setting logic.
Wed Nov 20 13:14:58 2002 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (lintfunc): Improve ifdef for attribute to only
work for GCC 3.2 and later.
* io.c (PIPES_SIMULATED): Don't define if on AIX, which
does define TANDEM in one of its header files. Ugh.
Tue Nov 19 15:33:55 2002 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_substr): Use %lu in warnings instead of %d.
Mon Nov 18 14:42:53 2002 Arnold D. Robbins <arnold@skeeve.com>
* config.guess: Synced from ftp.gnu.org.
* config.sub: Ditto.
Sun Nov 17 21:32:49 2002 Arnold D. Robbins <arnold@skeeve.com>
Updated things to automake 1.7.1.
Sun Nov 3 14:33:30 2002 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (r_get_lhs): For variables, always clear UNINITIALIZED,
since the variable is about to be assigned to. From Stepan Kasal.
Fri Nov 1 11:19:01 2002 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (lintfunc): Can only supply attributes for a function
pointer if GCC >= 3. Added ifdefs. Bah, humbug.
2002-10-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* array.c (array_init, concat_exp, assoc_find, do_delete):
Const-ify.
* awk.h (redirect, set_record, pp_func, pp_string_fp, format_val,
parse_escape, make_regexp, research, reisstring, remaybelong):
Likewise.
* awkgram.y (dumpintlstr, dumpintlstr2, func_use, dup_parms,
var_comp, finfo, fcompare, func_use, dumpintlstr, dumpintlstr2):
Likewise.
* builtin.c (stdfile, do_fflush, do_index, category_table):
Likewise.
* eval.c (push_forloop, push_args, PUSH_BINDING, RESTORE_BINDING,
cmp_nodes, op_assign, loop_info, fcall, fmt_ok, set_LINT,
comp_func): Likewise.
* ext.c (do_ext): Likewise.
* field.c (set_record): Likewise.
* io.c (gawk_popen, two_way_open, binmode, redirect, getredirect,
fatal): Likewise.
* node.c (values, format_val, make_str_node, parse_escape): Likewise.
* profile.c (pp_string, pp_match_op, pp_func, pp_string,
pp_string_fp): Likewise.
* re.c (make_regexp, research, reisstring, remaybelong): Likewise.
2002-10-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* awk.h (__attribute__, ATTRIBUTE_UNUSED, ATTRIBUTE_NORETURN,
ATTRIBUTE_PRINTF, ATTRIBUTE_PRINTF_1, __extension__): Define.
(emalloc, erealloc): Fix format specifier warnings.
(do_nextfile):Mark with ATTRIBUTE_NORETURN.
(getredirect): Const-ify.
(msg, error, warning, r_fatal, lintfunc): Mark with
ATTRIBUTE_PRINTF_1.
(r_fatal): Mark with ATTRIBUTE_NORETURN.
* builtin.c (format_tree): Fix format specifier warning.
* eval.c (interpret): Likewise.
* main.c (usage, copyleft, catchsig, nostalgia, version): Mark
with ATTRIBUTE_NORETURN.
* profile.c (dump_and_exit): Likewise.
2002-10-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* array.c (array_init): Use ISDIGIT, not isdigit.
* awk.h (m_tree_eval, force_number, force_string): Use
__extension__ in statement expressions.
* main.c (lintfunc): Fix !__SDTC__ case.
* regex_internal.c (calc_state_hash): Fix inline declaration.
* regexec.c (proceed_next_node): Cast assignment to correct type.
2002-10-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* awk.h (exp_node, Func_ptr): Add prototype arguments.
* awkgram.y (yystype, token, getfname, nextc, pushback,
allow_newline, yylex): Likewise.
* io.c (wait_any): Likewise.
* profile.c (indent_in, indent_out): Likewise.
* random.h (random): Likewise.
2002-10-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* array.c (grow_table): Const-ify.
* awk.h (RE_TRANSLATE_TYPE): Define.
(flagtab, casetable): Const-ify.
(getfname, shadow_funcs, redflags2str): Prototype.
(flags2str, genflags2str, nodetype2str, redflags2str, set_loc,
msg, error, warning, r_fatal): Const-ify.
* awkgram.y (tokentab, snode): Likewise.
* builtin.c (format_tree, do_strftime,
localecategory_from_argument): Likewise.
* eval.c (casetable, nodetypes, nodetype2str, flags2str,
genflags2str): Likewise.
* io.c (redflags2str, socketopen): Likewise.
* main.c (varfile, version_string, lintfunc, optab, copyleft,
varinit, init_vars): Likewise.
* msg.c (srcfile, msg, warning, error, set_loc, r_fatal):
Likewise.
* profile.c (pp_op_assign, pp_match_op, pp_redir): Likewise.
* random.c (sccsid): Likewise.
* version.c, version.in (version_string): Likewise.
Tue Oct 29 10:50:52 2002 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: Update version in AC_INIT and AM_INIT_AUTOMAKE
* fixvers: Make grep for pattern a little smarter.
Mon Oct 28 16:35:39 2002 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (hash): Now a function pointer.
* array.c (gst_hash_string, scramble): New functions.
(awk_hash): Renamed from hash.
(hash): Now a function pointer.
(array_init): Change hash function based on environment for
experimentation.
Mon Oct 28 13:21:20 2002 Arnold D. Robbins <arnold@skeeve.com>
Applied lots of patches from Stepan Kasal, tweaked as needed
for current code base.
* node.c (dupnode): When n->stref overfows, flag the node as PERM.
Same for n->ahname_ref.
(unref): Remove the check for n->stref == LONG_MAX and
n->ahname_ref == LONG_MAX.
* awk.h (make_string): The third argument to make_str_node changed
from FALSE to 0, it's not Boolean.
(free_temp): Evaluate the argument only once, so that we
can call free_temp(tree_eval(n)) for achieving side effects.
(load_environ, load_procinfo): Changed return type to NODE *.
* main.c (load_environ): The ENVIRON_node should be created with type
Node_var_array and lnode set to NULL. Return pointer to the created node
and create an empty hash even on TANDEM.
(load_procinfo): Same mods for PROCINFO_node.
(init_args): ARGV_node should also have lnode set to NULL.
* eval.c (r_tree_eval): case Node_assign moved just above the other
assignment cases.
(op_assign): ++ and -- cases merged with += and -=, respectively.
(push_args): Evaluate all args, even in cases where more args are
supplied then required.
(interpret): In case Node_K_forarray, flag the variable
num_elems also as volatile, so that it survives longjmp() and
can be trusted when linting code.
(r_get_lhs): Case Node_param_list was unreachable (unless
something breaks really badly), remove it;
(r_tree_eval): case Node_var_array removed from the last switch,
it was caught in the first switch above.
* profile.c (tree_eval): Again, case Node_var_array was caught above.
* awkgram.y (variable): Code simplified, making use of the above
changes.
* field.c (sc_parse_field): IGNORECASE only applies to regex based
field-splitting, so remove code that pays attention to it.
(do_split): Don't use parse_field if RS_is_null.
(set_FS): Beware of FS == "\\" even if RS_is_null.
Code changes to make things work better:
* field.c (set_FS): Don't use cmp_nodes() to compare old and new
value of FS, that uses IGNORECASE, which is a bad idea. Improve
logic for choosing sc_parse_field. Ensure that when RS_is_null
but using a single character, that we do pay attention to
case when doing regex splitting.
* io.c (set_RS): Don't use cmp_nodes() to compare old and new
value of RS, that uses IGNORECASE, which is a bad idea.
Mon Oct 28 09:43:14 2002 Arnold D. Robbins <arnold@skeeve.com>
* recomp.c (parse_expression): Change return statement into
two so it'll compile for SGI cc.
* awk.h (STR, CUR): Changed to STRCUR and NUMCUR respectively,
to avoid conflict with STR on some System V systems. Changed
in all source files.
Thu Oct 24 16:14:34 2002 Arnold D. Robbins <arnold@skeeve.com>
* array.c (AVG_CHAIN_MAX): Now a variable, to allow easy experimentation.
(array_init): Pulls a new value from env var AVG_CHAIN_MAX if it
exists and sets the variable.
* awk.h: Add declaration for array_init().
* main.c (main): Call array_init().
Tue Oct 22 11:23:56 2002 Arnold D. Robbins <arnold@skeeve.com>
* bisonfix.sed: Updated for current bison. Death to alloca!
2002-10-21 Isamu Hasegawa <isamu@yamato.ibm.com>
* builtin.c (tolower, toupper): Add casts to char* to fix some
compiler warnings.
* eval.c (cmp_nodes): Ditto.
* regcomp.c (peek_token_bracket): Skip the byte already read.
Wed Oct 16 15:02:09 2002 Arnold D. Robbins <arnold@skeeve.com>
* io.c (set_RS): Make sure to always call set_FS().
2002-10-11 Isamu Hasegawa <isamu@yamato.ibm.com>
* regcomp.c (re_compile_fastmap_iter): Remove the handling
OP_CONTEXT_NODE.
(regfree): Likewise.
(create_initial_state): Likewise.
(analyze): Remove the substitutions which became useless.
(calc_first): Likewise.
(calc_epsdest): Use edests of OP_BACK_REF in case that it has
epsilon destination.
(duplicate_node_closure): New function.
(duplicate_node): Remove the handling OP_CONTEXT_NODE.
(calc_inveclosure): Likewise.
(calc_eclosure): Likewise.
(calc_eclosure_iter): Invoke duplicate_node_closure instead of
direct invocation of duplicate_node.
(parse): Don't use comma operator in the return to avoid compiler
warning.
(parse_reg_exp): Likewise.
(parse_branch): Likewise.
(parse_expression): Likewise.
(parse_sub_exp): Likewise.
(parse_dup_op): Likewise.
* regex_internal.c (re_dfa_add_node): Remove the substitutions
which became useless.
(create_ci_newstate): Remove the handling OP_CONTEXT_NODE.
(create_cd_newstate): Likewise.
* posix/regex_internal.h (re_token_type_t): Remove the obsolete type.
(re_token_t): Likewise.
(re_dfa_t): Likewise.
(re_node_set_remove): New macro.
* regexec.c (check_matching): Remove the handling
OP_CONTEXT_NODE.
(check_halt_node_context): Likewise.
(proceed_next_node): Likewise.
(pop_fail_stack): Fix the memory leak.
(set_regs): Likewise.
(free_fail_stack_return): New function.
(sift_states_backward): Fix the memory leak. Remove the handling
OP_CONTEXT_NODE.
(update_cur_sifted_state): Append some if clause to avoid redundant
call.
(sub_epsilon_src_nodes): Use IS_EPSILON_NODE since it might be a
back reference.
(check_dst_limits): Remove the handling OP_CONTEXT_NODE.
(check_subexp_limits): Likewise.
(search_subexp): Likewise.
(sift_states_bkref): Likewise.
(transit_state_mb): Likewise.
(transit_state_bkref_loop): Likewise.
(transit_state_bkref_loop): Likewise.
(group_nodes_into_DFAstates): Likewise.
(check_node_accept): Likewise.
(sift_ctx_init): Add initializing.
Tue Oct 15 14:18:53 2002 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (set_IGNORECASE): Call set_RS() instead of
set_FS_if_not_FIELDWIDTHS(). The former calls the latter
for us, and also makes IGNORECASE affect RS like it's supposed to.
* field.c (FS_re_yes_case, FS_re_no_case): New variables.
(set_FS): Smarten up routine to not recompile FS_regexp if all
that's changed is IGNORECASE or if switching back to FS from
FIELDWIDTHS. Significant speed-up for cases where IGNORECASE
is assigned to for every record.
* io.c (RS_re_yes_case, RS_re_no_case): New variables.
(set_RS): Similar changes as to set_FS(). In particular,
IGNORECASE changing now affects record splitting too.
* re.c (refree): Set rp->pat.tranaslate to NULL. It comes
from casetable and shouldn't be freed. (Strictly necessary
only for old regex, but a good idea anyway).
Also, call regfree(& rp->pat) instead of manually free()ing
things, since there's dynamically allocated stuff hiding in
the buffer. Avoids a memory leak.
Mon Oct 14 12:02:39 2002 Arnold D. Robbins <arnold@skeeve.com>
Major space reduction in array management. Overhead reduced
to two NODE's per element from three.
* awk.h (ahash): Union is gone.
(hash.ref): new union member.
(ahnext): new definition into hash union.
(ahvalue): new definition into hash union.
(ahname_str): new member, points into hash union.
(ahname_len): new member, points into hash union.
(ahname_ref): new member, points into hash union.
* array.c: Replaces uses of ahname member with string and
length. Set the reference count correctly to 1 on new nodes.
* eval.c (interpret): Case for Node_K_arrayfor. dupnode() the
array indices, and set loop variable to new value made via
make_string().
* node.c (unref, dupnode): Node_ahash nodes are now also
reference counted, a la strings. Similar code is used to
increment/decrement the counts, and/or copy nodes as
needed.
Unrelated:
* awk.h (forsub): Removed. Not used.
Sun Oct 13 16:58:27 2002 Stepan Kasal <kasal@math.cas.cz>
* profile.c (pprint): #undef the temporary defines at the end
of the case.
* eval.c (interpret): Likewise.
(assign_val): we can unref() before doing dupnode().
Also, move the check for NF < 0 from here ...
* field.c (set_NF): ... to here.
* main.c (varinit): no need to call set_NF().
* awkgram.y (statements): don't be so generous when concatenating
`statements' with a `statement'.
2002-10-13 Isamu Hasegawa <isamu@yamato.ibm.com>
* regcomp.c: Synced with development sources.
* regex_internal.c: Synced with development sources.
* regex_internal.h: Synced with development sources.
* regexec.c: Synced with development sources.
Sun Oct 13 21:35:35 2002 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (NODE): reflags is now unsigned long for:
(exec_count): defined to be sub.nodep.reflags. Using `number'
broke pgawk.
* profile.c (Node_K_delete_loop): print out as a for loop
with a comment that it's internally the same as `delete array'.
* eval.c (Node_K_delete_loop): Increment the exec_count. Ooops.
* configure.in (AM_GNU_GETTEXT_VERSION): New macro call.
* custom.h: Updated description of the file at the top.
Thu Oct 10 16:39:51 2002 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (vname, exec_count): Now macros into different
parts of the NODE structure that can be safely used for them.
Saves 16 bytes per NODE.
* eval.c: Changed use of `vname' to `varname' to avoid new
macro.
* main.c (lintfunc): Made ifdefed decls match awk.h.
* eval.c (comp_func): Use memcmp instead of strcmp.
* configure.in (AC_CONFIG_HEADER): Physically append custom.h
to config.h to avoid subdir compiliation problems.
Sun Oct 6 17:36:15 2002 Arnold D. Robbins <arnold@skeeve.com>
Updated to automake 1.7 and bison 1.50.
* INSTALL: Replaced with current version from automake 1.7.
* config.guess: Replaced with current version from automake 1.7.
* config.sub: Replaced with current version from automake 1.7.
* depcomp: Replaced with current version from automake 1.7.
* doc/texinfo.tex: Replaced with current version from automake 1.7.
* install-sh: Replaced with current version from automake 1.7.
* missing: Replaced with current version from automake 1.7.
* mkinstalldirs: Replaced with current version from automake 1.7.
* ylwrap: Replaced with current version from automake 1.7.
* configure.in (DYNAMIC): Updated AC_DEFINE(DYNAMIC) to
three-argument form for autoheader.
* acinclude.m4: Removed includes of jm-mktime.m4 and
largefile.m4, which are now standard parts of Autoconf.
* Makefile.in: Regenerated.
* aclocal.m4: Regenerated.
* awkgram.c: Regenerated.
* awklib/Makefile.in: Regenerated.
* configure: Regenerated.
* doc/Makefile.in: Regenerated.
* test/Makefile.in: Regenerated.
Sun Sep 29 16:47:49 2002 Arnold D. Robbins <arnold@skeeve.com>
* custom.h (__WIN32__): Added from gnuwin32 project, via
Stepan Kasal.
* awkgram.y: For tawk compatibility, added `delete(array)'.
To remain undocumented, since it's WAY non-standard.
Sun Sep 22 22:23:50 2002 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (re_cnt): Removed, not needed since no dfa code.
* awkgram.y (regexp, a_regexp): Removed use of re_cnt.
* re.c (re_update): Ditto.
Thu Sep 19 10:55:37 2002 Arnold D. Robbins <arnold@skeeve.com>
* io.c (binmode): Create function if defined(WIN32) also.
Updated to gettext 0.11.5, autoconf 2.54 and automake 1.6.3.
* aclocal.m4: Regenerated.
* m4/codeset.m4: Updated.
* m4/gettext.m4: Updated.
* m4/glibc21.m4: Updated.
* m4/iconv.m4: Updated.
* m4/lcmessage.m4: Updated.
* m4/lib-ld.m4: Updated.
* m4/lib-link.m4: Updated.
* m4/lib-prefix.m4: Updated.
* m4/progtest.m4: Updated.
* po/Makefile.in.in: Updated.
* po/Rules-quot: Updated.
* po/boldquot.sed: Updated.
* po/en@boldquot.header: Updated.
* po/en@quot.header: Updated.
* po/insert-header.sin: Updated.
* po/quot.sed: Updated.
* po/remove-potcdate.sin: Updated.
Tue Sep 17 23:46:01 2002 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: Moved override of INSTALL to just after
AC_INIT so that it takes effect. Necessary for Autoconf 2.5x.
Mon Sep 16 16:40:57 2002 Stepan Kasal <kasal@math.cas.cz>
* awkgram.y (want_assign): Removed.
(SLASH_BEFORE_EQUAL, ASSIGN): New terminals; ``/='' is now
formed from these two.
(a_slash): New non-terminal, representing either '/' or
SLASH_BEFORE_EQUAL.
(assign_operator): New non-terminal, replaces ASSIGNOP.
(REGEXP): yylex now eats the terminating '/' before
returning REGEXP token.
(exp): The check for C-like comments moved from here
(regexp): ... to here.
(common_exp): New non-terminal; contains common parts of exp
and rexp. (a_relop, relop_or_less): New non-terminals.
(rexp): some rules updated to be analogous to exp.
(output_redir): Can contain only common_exp, not exp in general.
Mon Sep 16 22:51:51 2002 Arnold D. Robbins <arnold@skeeve.com>
* io.c (two_way_open): Move label use_pipes outsidef of ifdef,
just in case.
Thu Sep 12 15:11:28 2002 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (getfname): Return NULL if not found, remove
fatal error. Could be an extension function.
(dump_funcs): Walk symbol table counting functions before
mallocing table, since there could be extension functions,
func_count could be too small.
* profile.c (pp_builtin): Handle NULL return from getfname().
Print it as "extension_function()" if so.
Tue Sep 10 17:33:48 2002 Arnold D. Robbins <arnold@skeeve.com>
Minor code simplification.
* awk.h (in_array): Change return type to NODE*.
(assoc_exists): Remove declaration.
* array.c (in_array): Change return type to NODE *.
Return value is pointer to element value or NULL.
(assoc_exists): Removed function.
* eval.c (r_tree_eval): Case Node_in_array, change value
to test return of in_array() against NULL.
* io.c (pty_vs_pipes): Change test to make a tmp_string()
of the index and call in_array(). Add free_temp() of
subscript and free() of full_index (oops).
2002-09-10 Isamu Hasegawa <isamu@yamato.ibm.com>
* posix/regcomp.c: Wrap #include wchar.h and wctype.h in #if.
(build_range_exp): Add castings to strlen invocations.
(build_collating_symbol): Restore the type of characters from "char"
to "unsigned char", and supplement castings.
(build_collating_symbol): Likewise.
(build_equiv_class): Likewise.
(build_charclass): Likewise.
(seek_collating_symbol_entry): Likewise.
(parse_bracket_exp): Likewise.
(build_word_op): Supplement a casting.
* posix/regex_internal.c: Wrap #include wchar.h and wctype.h in #if.
(re_string_allocate): Fix castings.
(re_string_construct): Likewise.
(re_string_construct_common): Likewise.
(re_string_realloc_buffers): Likewise.
(build_wcs_buffer): Likewise.
(build_wcs_upper_buffer): Likewise.
(re_string_skip_chars): Likewise.
(re_string_reconstruct): Likewise.
* posix/regex_internal.h: Restore the type of characters in
re_string_t and bracket_elem_t from "char" to "unsigned char".
(re_string_elem_size_at): Fix castings.
* posix/regexec.c: Wrap #include wchar.h and wctype.h in #if.
(transit_state_bkref_loop): Restore the type of characters from
"char" to "unsigned char", and append a cast to "char*" pointer in
array subscript.
(check_node_accept_bytes): Likewise.
(find_collation_sequence_value): Likewise.
Thu Sep 5 13:15:09 2002 Arnold D. Robbins <arnold@skeeve.com>
* re.c (remaybelong): New routine.
(reisstring): Simplified the code a bit.
* awk.h (remaybelong): Declaration added.
* io.c (get_a_record): Change fourth grungy special case to
use remaybelong() instead of strchr() on last character.
Wed Sep 4 13:20:26 2002 Arnold D. Robbins <arnold@skeeve.com>
* io.c (do_input): Recode guts of main loop to be easier
to trace with a debugger.
(get_a_record): Fourth grungy special case for RE-based
record splitting added. See explanatory comments there
and test/rebuf.awk.
2002-09-03 Isamu Hasegawa <isamu@yamato.ibm.com>
* posix/regcomp.c (regcomp): Append "__restrict" modifier to avoid
warnings of some compilers.
(build_collating_symbol): Change the type of characters from
"unsigned char" to "char", and append a cast to "char*" pointer in
array subscript.
(build_collating_symbol): Likewise.
(build_equiv_class): Likewise.
(build_charclass): Likewise.
(re_compile_pattern): Remove incorrect cast.
(re_compile_fastmap_iter): Change the type of characters from
"unsigned char" to "char", and append a cast to "char*" pointer
in array subscript.
(parse_bracket_exp): Likewise.
* posix/regex_internal.c (re_string_construct_common): Likewise.
(re_string_allocate): Likewise.
(re_string_construct): Likewise.
(re_string_realloc_buffers): Likewise.
(build_wcs_buffer): Likewise.
(re_string_reconstruct): Likewise.
* posix/regex_internal.h: Change the type of characters in
re_string_t and bracket_elem_t from "unsigned char" to "char".
* posix/regexec.c (regexec): Append "__restrict" modifier to avoid
warnings of some compilers.
(transit_state_bkref_loop): Change the type of characters from
"unsigned char" to "char", and append a cast to "char*" pointer in
array subscript.
(check_node_accept_bytes): Likewise.
(find_collation_sequence_value): Likewise.
Wed Aug 21 15:40:36 2002 Corinna Vinschen <vinschen@redhat.com>
* configure.in: Define --without-libintl-prefix and
--without-libiconv-prefix for Cygwin by default.
* Makefile.am: Call fixvers from $(srcdir).
* awk.h: Don't define O_BINARY on Cygwin.
Wed Aug 21 15:31:57 2002 Andreas Buening <andreas.buening@nexgo.de>
* configure.in (AC_OBJEXT, AC_EXEEXT): Added. Removed OS/2 goo.
* Makefile.am (check-local): Add $(EXEEXT) suffixes, remove OS/2 goo.
* regcomp.c, regex_internal.c, regexec.c: Conditionalize include of
<wchar.h> and <wctype.h> on RE_ENABLE_I18N.
Wed Aug 21 14:43:57 2002 Arnold D. Robbins <arnold@skeeve.com>
* gettext.h (ENABLE_NLS): Add include of locale.h so that things
compile even without optimization. Sheesh.
* io.c (two_way_open, pty_vs_pipes): Conditionalize pty code on
HAVE_TERMIOS_H.
Thu Aug 8 22:16:10 2002 Arnold D. Robbins <arnold@skeeve.com>
* main.c (main): Force LC_NUMERIC locale to "C", esp. for
M$ systems. Ugh.
Wed Aug 7 13:42:01 2002 Arnold D. Robbins <arnold@skeeve.com>
* io.c (get_a_record): Improve test for newlines at beginning of
record but with nothing following it. See test/nulrsend.
Mon Aug 5 10:12:39 2002 Arnold D. Robbins <arnold@skeeve.com>
Add option to use ptys instead of pipes for |&.
Basic plumbing originally from Paolo Bonzini <bonzini@gnu.org>.
* awk.h (RED_PTY): New flag.
(assoc_exists): Add declaration.
* array.c (in_array): Use FALSE not zero for return value.
(assoc_exists): New routine to find and return value for an index
in an array.
* configure.in: test for termios.h and stropts.h, and grantpt function.
* io.c: include termios.h and stropts.h if available.
(redflags2str): Add RED_PTY to table.
(redirect): Add RED_PTY to flags turned off when searching.
(close_redir): close write channel for two-way pipes
that use ptys by sending an EOF.
(two_way_open): If pty_vs_pipe(), use pty's to open two-way pipes as
they are line-buffered by default --> alleviates deadlock problems.
If fails, fall back to using pipes.
(pty_vs_pipe): New function.
* main.c (arg_assign): Clean up English in some of the error messages.
Sun Aug 4 00:37:38 2002 Stepan Kasal <kasal@math.cas.cz>
* re.c (make_regexp): don't pass the error message returned by
re_compile_pattern() to gettext(); it's already gettextized.
(make_regexp): minor reformat of code.
Wed Jul 31 23:50:31 2002 Arnold D. Robbins <arnold@skeeve.com>
Removed dfa code from gawk since not really needed with new regex.
* Makefile.am: Removed dfa.h and dfa.c.
* awk.h (struct Regexp): Removed `dfareg' and `dfa' members.
(make_regexp): Last parameter in function went away, changed decl.
(avoid_dfa): Removed declaration.
* awkgram.y: Fixed call to make_regexp().
* eval.c (match_op): Simplified: removed call to avoid_dfa() and
`kludge_need_start' variable. Instead, pass FALSE as last parameter
of research().
* field.c (set_FS): Fixed call to make_regexp().
* io.c (get_a_record, set_RS): Fixed calls to make_regexp().
* re.c (make_regexp): Removed last paramter (`dfa') from function.
Simplified the code.
(research): Simplified the code, removed calls to dfa stuff.
(dfaerror): Removed function.
(re_update): Fixed call to make_regexp().
(avoid_dfa): Removed function.
Thu Jul 25 21:55:45 2002 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c, regex_internal.c, regex_internal.h, regexec.c: Bug
fixes from Isamu Hasegawa <isamu@yamato.ibm.com> and Stepan Kasal
<kasal@math.cas.cz> applied.
Sat Jul 6 23:28:37 2002 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yyerror): Change text of unexpected newline message to
include end of string.
Mon Jun 17 17:58:55 2002 Arnold D. Robbins <arnold@skeeve.com>
* field.c (do_split): Per Michal Jaegermann, move free_temp(fs)
above label `out'.
Tue Jun 11 23:26:09 2002 Paul Eggert <eggert@twinsun.com>
Update to autoconf 2.53 and automake 1.6.1.
* acconfig.h: Removed.
* m4/isc-posix.m4: Removed.
* m4/jm-mktime.m4: Removed.
* m4/largefile.m4: Removed.
* m4/ssize_t.m4: Removed.
* ansi2knr.c: updated.
* depcomp: updated.
* install-sh: updated.
* missing: updated.
* mkinstalldirs: updated.
* ylwrap: updated.
* configure.in: Improved quoting.
* acinclude.m4: Use `m4_sinclude', not antiquated `sinclude'.
Tue Jun 11 23:08:40 2002 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: Add `getgrent' to list of functions checked
so that awklib/grcat is compiled correctly.
Tue Jun 11 22:18:42 2002 Stepan Kasal <kasal@math.cas.cz>
Improve argument parsing and -v assignment.
* awk.h (struct src): Add additional enum values.
(arg_assign): Return type and arg list changes.
* io.c (nextfile): Add extra arg in call to `arg_assign'.
* main.c (pre_assign): Nuked.
(allocfiles): New variable.
(srcfiles_add, preassigns_add): New macros.
(main): Logic cleaned up.
(add_src): New function.
Use `size_t' for optimal_bufsize function.
* awkgram.y (yylex): `len' is now size_t.
* pc/gawkmisc.pc (optimal_bufsize): Change return type to size_t.
* posix/gawkmisc.c (optimal_bufsize): Change return type to size_t.
* unsupported/atari/gawkmisc.atr (optimal_bufsize): Change return type
to size_t.
* unsupported/tandem/tmisc.c (optimal_bufsize): Change return type to size_t.
* vms/gawkmisc.vms (optimal_bufsize): Change return type to size_t.
* README_d/README.hpux: New file.
Fri May 24 12:23:01 2002 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (init_profiling): Remove default initialization
of `prof_fp' to stderr. Per Stepan Kasal <kasal@math.cas.cz>.
Wed May 15 15:39:17 2002 Arnold D. Robbins <arnold@skeeve.com>
Work through builtin operations to make sure that
anything that might have side effects gets dealt with.
* array.c (do_delete): Evaluate subscript first before
checking if something is or isn't an array.
* builtin.c (sub_common): Evaluate replacement text, and
free it if no match of regex in source text.
Wed May 15 15:30:34 2002 Arnold D. Robbins <arnold@skeeve.com>
Switch to new version of regex from IBM Japan.
* regcomp.c: New file.
* regex.c: Replaced with new version.
* regex.h: Replaced with new version.
* regex_internal.c: New file.
* regex_internal.h: New file.
* regexec.c: New file.
* Makefile.am (EXTRA_SOURCES): New files added.
Tue May 14 17:04:05 2002 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (<locale.h>): Move check and include into gettext.h.
* gettext.h (<locale.h>): Add check and include per patch from
Bruno Haible.
* field.c (do_split): When checking for split of null string,
evaluate seperator if it's not FS, since could have side effects.
At end, free_temp(fs), not free_temp(sep).
Both of these thanks to Stepan Kasal <kasal@math.cas.cz>.
Mon May 13 00:41:31 2002 Arnold D. Robbins <arnold@skeeve.com>
* custom.h (ultrix): Add define GETGROUPS_NOT_STANDARD.
* main.c (init_groupset): For GETGROUPS_NOT_STANDARD, use old way
to set `ngroups'.
2002-05-10 Andreas Schwab <schwab@suse.de>
* dfa.c (parse_bracket_exp_mb): Fix warning.
Thu May 9 22:28:32 2002 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (sub_common): Fix logic for match of null strings to
get correct semantics. See test/gsubtst2.*.
* field.c (do_split): Minor code cleanup; the third arg to split()
is set to be FS by the grammar, so don't need to check it for NULL.
Thanks to Stepan Kasal <kasal@math.cas.cz>.
* awk.h (locale.h): Move include before that of "gettext.h" for systems
that define functions that gettext.h would use when NLS is disabled.
Per bug report from Ayamura Kikuchi <ayamura@ayamura.org>.
Tue May 7 17:31:01 2002 Arnold D. Robbins <arnold@skeeve.com>
Miscellanious patches courtesy of Stepan Kasal <kasal@math.cas.cz>.
* field.c, main.c: Tidy up some comments.
* field.c (set_FIELDWIDTHS): Init fw_alloc to 4 so it isn't
immediately realloced.
* main.c (load_procinfo): Check value of FS/FIELDWIDTHS for
value of PROCINFO["FS"].
* awk.h (set_FS_if_not_FIELDWIDTHS): Removed decl.
* field.c (set_FS_if_not_FIELDWIDTHS): Removed function.
* eval.c (set_IGNORECASE): Use inline code checking `using_fieldwidths()'.
* io.c (set_IGNORECASE): Ditto.
Sun May 5 14:28:34 2002 Arnold D. Robbins <arnold@skeeve.com>
Fix a memory leak in array for loops if the body contains a
`next' or `nextfile' statement. The changes maintain a stack
of active for loops that is pushed and popped for each loop,
and popped entirely for `next', `nextfile', etc.
* eval.c (forloops_active, pop_forloop, pop_all_forloops, push_forloop):
new functions.
(interpret): Case Node_K_arrayfor, call push and pop functions.
Case Node_rule_list: pop loops and pop fcalls after longjmp.
Cases Node_K_next, Node_K_nextfile, Node_K_break and
Node_K_continue, removed check before longjmp.
Case Node_K_exit: add loop check.
(loop_stack, nloops, nloops_active): New variables that implement
the stack.
Wed May 1 16:41:32 2002 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.1: Release tar file made.
Wed May 1 16:07:49 2002 Arnold D. Robbins <arnold@skeeve.com>
* getopt.c: Installed latest version from glibc.
Sun Apr 28 17:19:07 2002 Arnold D. Robbins <arnold@skeeve.com>
* fixvers: Changed patterns to allow test versions of the
form `gawk-3.1.1a'.
* patchlev.h: Patchlevel is now a string constant.
* main.c (version): Print patchlevel using %s, not %d.
* Makefile.am: Rework DEFPATH stuff and datadir stuff yet again.
* config.sub: Updated with current version from ftp.gnu.org.
* config.guess: Ditto.
Upgrade to gettext-0.11.2:
* ABOUT-NLS: Replaced with version from gettext 0.11.2.
* config.rpath: Replaced with version from gettext 0.11.2.
* intl/*: Replaced with version from gettext 0.11.2.
* po/Makefile.in.in: Replaced with version from gettext 0.11.2.
* po/Makevars.template: Replaced with version from gettext 0.11.2.
* po/Rules-quot: Replaced with version from gettext 0.11.2.
* po/boldquot.sed: Replaced with version from gettext 0.11.2.
* po/en@boldquot.header: Replaced with version from gettext 0.11.2.
* po/en@quot.header: Replaced with version from gettext 0.11.2.
* po/insert-header.sin: Replaced with version from gettext 0.11.2.
* po/quot.sed: Replaced with version from gettext 0.11.2.
* po/remove-potcdate.sin: Replaced with version from gettext 0.11.2.
* m4/codeset.m4: Replaced with version from gettext 0.11.2.
* m4/gettext.m4: Replaced with version from gettext 0.11.2.
* m4/glibc21.m4: Replaced with version from gettext 0.11.2.
* m4/iconv.m4: Replaced with version from gettext 0.11.2.
* m4/isc-posix.m4: Replaced with version from gettext 0.11.2.
* m4/lcmessage.m4: Replaced with version from gettext 0.11.2.
* m4/lib-ld.m4: Replaced with version from gettext 0.11.2.
* m4/lib-link.m4: Replaced with version from gettext 0.11.2.
* m4/lib-prefix.m4: Replaced with version from gettext 0.11.2.
* m4/progtest.m4: Replaced with version from gettext 0.11.2.
Wed Apr 17 15:09:45 2002 Arnold D. Robbins <arnold@skeeve.com>
* regex.c (PREFIX): Change test for token concatenation ability
to `#ifdef HAVE_STRINGIZE'. If a cpp has one, it ought to have
the other.
Tue Apr 16 12:26:06 2002 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (tree_eval): Make unary minus case smarter,
use is_scalar test and if false parenthesize expression.
Add Node_TEXTDOMAIN case.
(pp_lhs, is_scalar, prec_level): Add Node_TEXTDOMAIN cases.
Thu Apr 11 21:28:33 2002 Arnold D. Robbins <arnold@skeeve.com>
* array.c (do_adump): Spelling fix in output message.
* builtin.c: Ditto, in multiple routines.
(do_toupper, do_tolower): Add cast to size_t in assigment to mbclen
for some compilers.
* re.c (research): Fix way returning is done to silence some
compiler diagnostics.
Wed Apr 10 19:30:51 2002 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (datadir): Set directly to have `/awk'.
(DEFPATH): Go back to using $(datadir) for path.
Tue Apr 9 17:34:09 2002 Arnold D. Robbins <arnold@skeeve.com>
Upgraded to gettext 0.11.1.
* Makefile.am (LDADD): Use @LIBINTL@ instead of @INTLLIBS@.
* ABOUT-NLS: Version from 0.11.1.
* config.rpath: Version from 0.11.1.
* aclocal.m4: Regenerated based on new files.
* intl/*: Replaced with version from 0.11.1.
* m4/ChangeLog: New file.
* m4/codeset.m4: New file.
* m4/gettext.m4: Version from 0.11.1.
* po/ChangeLog: New file.
* po/Makefile.in.in: Version from 0.11.1.
* po/remove-potcdate.sin: New file.
Mon Apr 8 22:22:58 2002 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (libexecdir): Set directly to have `/awk'.
(DEFPATH): Use $(pkgdatadir) for path.
(install-exec-hook): Add version link for pgawk.
(uninstall-links): Remove pgawk version link.
Wed Mar 20 13:44:21 2002 Isamu Hasegawa <isamu@yamato.ibm.com>
* regex.c (__alignof__): Definition for non-GCC compilers.
Sun Mar 17 17:41:55 2002 Arnold D. Robbins <arnold@skeeve.com>
* io.c (do_pathopen): Malloc buffers to hold constructed
filenames: No Arbitrary Limits! Thanks to keoki@techie.com
for the bug report.
Sun Mar 10 16:59:06 2002 Scott Deifik <scottd@amgen.com>
* awk.h (LOCALEDIR): Provide a definition in case not using
i18n stuff.
Wed Mar 6 18:14:44 2002 Arnold D. Robbins <arnold@skeeve.com>
* main.c (usage): Add some explanatory text and examples at end.
Sun Mar 3 16:42:50 2002 Arnold D. Robbins <arnold@skeeve.com>
* getopt.h, getopt.c, getopt1.c: Update to current version
from glibc CVS.
Fri Feb 22 15:53:38 2002 Isamu Hasegawa <isamu@yamato.ibm.com>
* dfa.c (fetch_wc): Fix type from wchar_t to wint_t.
(parse_bracket_exp_mb): Likewise.
* regex.c (extract_number): Retrieve the sign information from
byte-code in case of AIX.
Thu Feb 21 16:44:24 2002 Arnold D. Robbins <arnold@skeeve.com>
* re.c (resetup): Moved setting re_max_failures into regex.c.
* regex.c (re_max_failures): Set to really big if REGEX_MALLOC
defined. Do this in both places that define re_max_failures.
Thu Feb 21 19:02:22 2002 Isamu Hasegawa <isamu@yamato.ibm.com>
* builtin.c (sub_common): Avoid index_multibyte_buffer invocation
in single byte character environments.
Thu Feb 21 10:08:56 2002 Isamu Hasegawa <isamu@yamato.ibm.com>
* dfa.c (parse_bracket_exp_mb): For ':', use wctype_t in MALLOC,
not wchar_t.
Thu Feb 21 09:52:16 2002 Arnold D. Robbins <arnold@skeeve.com>
Upgraded to automake 1.5 and gettext-0.11.
Also bug fix to multibyte code.
* ABOUT-NLS: upgraded.
* config.guess, config.sub, config.rpath, gettext.h, ylwrap: new files.
* Makefile.am: added above to appropriate places.
* awk.h: Replace libintl.h and macros with include of gettext.h.
(emalloc, erealloc): Add num bytes to error message, put string inside _().
(index_multibyte_buffer): Removed decl.
* awklib/Makefile.am: Use $(EXEEXT) for grcat and pwcat targets.
* builtin.c (index_multibyte_buffer): Made static to this file.
(sub_common): Add checks that replacement string is length > 0 so
that we don't try to malloc(0): this fails on some systems.
* configure.in (AM_GNU_GETTEXT): Update macro for gettext 0.11.
(ALL_LINGUAS): Removed.
* m4/codeset.m4: new file.
* m4/gettext.m4: updated.
* m4/glibc21.m4: new file.
* m4/iconv.m4: new file.
* m4/isc-posix.m4: new file.
* m4/lcmessage.m4: updated.
* m4/lib-ld.m4: new file.
* m4/lib-link.m4: new file.
* m4/lib-prefix.m4: new file.
* m4/progtest.m4: updated.
* intl/*: Replaced with version from gettext 0.11.
* po/*: Revised for gettext 0.11.
Mon Feb 18 14:42:39 2002 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (nondec2awknum): Change assert to runtime check
in case user passed in bad data.
2002-02-17 Paul Eggert <eggert@twinsun.com>
* re.c (resetup): Try to avoid silly limitation of regex.c by
setting re_max_failures to the largest reasonable value.
Sun Feb 17 14:57:43 2002 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (research): If re_search() returns -2, the
match failed since regex couldn't allocate enough memory
for what it needed. Fail with a fatal message instead.
This is a workaround, not a fix, but I don't mess with
regex.[ch].
Fri Feb 8 16:01:11 2002 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (LEX_FOR): Fix case of array loop with body of single
delete statement to actually check the right things to make the
optimization.
* profile.c (tree_eval): Add case for Node_K_delete_loop.
(prec_level): Ditto.
Mon Feb 4 10:38:00 2002 Bruno Haible <bruno@clisp.org>
* awk.h (dcngettext): New macro.
(do_dcngettext): New declaration.
* awkgram.y (tokentab): Add dcngettext.
(snode): Add a warning for incorrect use of dcngettext.
(dumpintlstr): fflush at the end, not in the middle.
(dumpintlstr2): New function.
* builtin.c (localecategory_from_argument): New function, extracted
from do_dcgettext.
(do_dcgettext): Call it.
(do_dcngettext): New function.
Sun Feb 3 17:56:20 2002 Bruno Haible <bruno@clisp.org>
* builtin.c (do_bindtextdomain): Don't free the same variable twice.
* main.c (main): Call setlocale for LC_MESSAGE, to make dcgettext
function work on glibc systems.
Wed Jan 23 15:03:36 2002 Andreas Buening <andreas.buening@nexgo.de>
* configure.in (PATH_SEPARATOR): Code added for OS/2.
Makefile.am (PATH_SEPARATOR): Added.
(DEFPATH): Make use of PATH_SEPARATOR.
Wed Jan 23 14:46:04 2002 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Add test for lasttok != '$' when looking
at _"...". See comments in code.
Wed Aug 15 07:43:10 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* regex.c : Implements the codes for exactn_bin to work correctly
in multibyte environments, in case of invalid multibyte sequence.
Wed Aug 15 07:36:56 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* regex.c : Implements the codes for charset/charset_not to
work in multibyte environments.
Wed Aug 15 05:04:34 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* regex.c : Add some comments.
Wed Aug 15 05:04:15 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* regex.c (count_mbs_length): New function, check the mutibyte
strings and count how many wchar_t the substring occupy.
(CHAR_T): New macro, character type depending on
environments(singlebyte/multibyte).
(UCHAR_T): New macro, unsigned character type.
(COMPILED_BUFFER_VAR): New macro, the buffer containing
the compiled buffer.
Adapt singlebyte/multibyte environments with CHAR_T, UCHAR_T,
and COMPILED_BUFFER_VAR.
Mon Jun 25 09:00:41 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* regex.c : Reorganize code to build code twice. byte_* are
for single byte, wcs_* are for multibyte character sets.
Chose functions according to current locale dynamically.
* regex.c (convert_mbs_to_wcs): New function, convert multibyte
strings to wide character strings for multibyte environments.
Fri Jun 22 05:43:50 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* regex.c (MBS_SUPPORT): New macro, defined if the environment
can handle multibyte characters.
(OFFSET_ADDRESS_SIZE): Offset address size in the
compiled buffer.
Rewrite offset addresses with OFFSET_ADDRESS_SIZE.
Thu Apr 26 08:03:17 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* builtin.c (index_multibyte_buffer) : inspect the buffer and write
the index.
(sub_common) : in multibyte environment, skip multibyte characters
when we check special characters.
* awk.h (index_multibyte_buffer) : add prototype.
* eval.c (cmp_nodes) : in multibyte environment, compare per character.
* field.c (re_parse_field) : in multibyte environment, avoid to
call research() on invalid boundary.
(sc_parse_field) : in multibyte environment, avoid to compare on
invalid boundary.
(null_parse_field) : in multibyte environment, split per
character, not per byte.
* io.c (get_a_record) : in multibyte environment, avoid to compare
on invalid boundary.
Wed Apr 25 08:29:47 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* awk.h (strncasecmpmbs) : add prototype.
* builtin.c (strncasecmpmbs) : new function like strncasecmp but for
multibyte strings.
(do_index) : in multibyte environment, compare per character.
* builtin.c (do_tolower) : in multibyte environment, user towlower
instead of TOLOWER.
(do_toupper) : in multibyte environment, user towupper instead
of TOUPPER.
Tue Apr 24 10:38:06 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
In multibyte environments, handle multibyte characters as single
characters in bracket expressions.
* dfa.h (mb_char_classes) : new structure.
(mbcsets) : new variable.
(nmbcsets) : new variable.
(mbcsets_alloc) : new variable.
* dfa.c (prtok) : handle MBCSET.
(fetch_wc) : new function to fetch a wide character.
(parse_bracket_exp_mb) : new function to handle multibyte character
in lex().
(lex) : invoke parse_bracket_exp_mb() for multibyte bracket expression.
(atom) : handle MBCSET.
(epsclosure) : likewise.
(dfaanalyze) : likewise.
(dfastate) : likewise.
(match_mb_charset) : new function to judge whether a bracket match
with a multibyte character.
(check_matching_with_multibyte_ops) : handle MBCSET.
(dfainit) : initialize new variables.
(dfafree) : free new variables.
Mon Apr 23 01:40:09 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
Implement the mechanism to match with multibyte characters,
and use it for `period' in multibyte environments.
* dfa.h (mbps) : new variable.
* dfa.c (prtok) : handle ANYCHAR.
(lex) : use ANYCHAR for `period' in multibyte environments.
(atom) : handle ANYCHAR.
(state_index) : initialize mbps in multibyte environments.
(epsclosure) : handle ANYCHAR.
(dfaanalyze) : handle ANYCHAR.
(dfastate) : handle ANYCHAR.
(realloc_trans_if_necessary) : new function.
(transit_state_singlebyte) : new function.
(match_anychar) : new function.
(check_matching_with_multibyte_ops) : new function.
(transit_state_consume_1char) : new function.
(transit_state) : new function.
(dfaexec) : invoke transit_state if expression can match with
a multibyte character in multibyte environments.
(dfamust) : handle ANYCHAR.
Fri Apr 20 11:31:24 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
Avoid incorrect state transition in multibyte environments.
* dfa.h (nmultibyte_prop) : new variable.
(multibyte_prop) : new variable.
* dfa.c (addtok) : set inputwcs.
(dfastate) : avoid incorrect state transition in multibyte
environments.
(dfaexec) : likewise.
(dfainit) : init multibyte_prop.
(dfafree) : free multibyte_prop.
(inputwcs): new variable.
(mblen_buf) : new variable contains the amount of remain byte
of corresponding multibyte character in the input string.
Fri Apr 20 06:28:59 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
Handle a multibyte character followed by '*', '+', and '{n,m}'
correctly.
* dfa.c (update_mb_len_index): new function.
Support for multibyte string.
(FETCH) : call update_mb_len_index.
(lex) : check cur_mb_index not to misunderstand multibyte characters.
(atom) : make a tree from a multibyte character.
(dfaparse) : initialize new variables.
(mbs) : new variable.
(cur_mb_len) : new variable.
(cur_mb_index) : new variable.
Thu Apr 19 09:32:47 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* awkgram.y (cur_mbstate) : new varialble containing means current
shift state.
(cur_char_ring) : new varialbe reffering the buffer which contains
last some character from the buffer.
(cur_ring_idx) : new variable containing the current index on
cur_char_ring.
(nextc_is_1stbyte) : new macro, means that last nextc() return a
singlebyte character or 1st byte of a multibyte character.
(nextc) : check the buffer and update cur_ring_char in multibyte
environments.
(pushback) : adjust cur_ring_idx in multibyte environments.
(yylex) : add check whether nextc() returned 1st-byte in multibyte
environments.
* re.c (make_regexp) : in multibyte environment, skip multibyte
characters when we check special characters.
Wed Apr 18 07:58:20 2001 Isamu Hasegawa <isamu@yamato.ibm.com>
* awk.h (MBS_SUPPORT) : New flag, means supporting multibyte strings.
* configure.in : add check for wchar.h, wctype.h, mbrtowc, and mbrlen.
Wed Jan 16 16:32:40 2002 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_strtonum): Simplified. Check first if the
value matches a non-decimal number, and if so convert it.
Otherwise do a regular force_number.
Mon Jan 7 22:12:15 2002 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (statement): moved delete, print, and expressions into
new non-terminal `simple_stmt'. Allow opt_simple_stmt in the
first and third part of a for loop, per latest POSIX, which documents
an otherwise undocumented historical oddity in Unix awk. This has
the pleasant side effect of making line numbers more accurate for
messages involving delete statements.
(opt_simple_stmt, simple_stmt): new non-terminals.
Based on bug report from drj@pobox.com.
Mon Dec 24 14:04:02 2001 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: Changes for VMS with new strftime:
(AC_HEADER_TIME): added
(AC_CHECK_HEADERS): Check for sys/time.h.
(TIME_T_IN_SYS_TYPES_H): Add header check.
* acconfig.h (TIME_T_IN_SYS_TYPES_H): Added.
Wed Dec 19 16:01:58 2001 Peter J. Farley III <pjfarley@dorsai.org>
* configure.in: Add MS-DOS to getpgrp special case.
* dfa.c, getopt.c, regex.c: Fix code to work with --disable-nls.
Wed Dec 19 15:59:25 2001 Eli Zaretskii <eliz@is.elta.co.il>
* profile.c (init_profiling_signals) [__DJGPP__]: Use SIGINT
instead of SIGHUP and SIGQUIT instead of SIGUSR1.
Tue Dec 18 20:56:07 2001 Andreas Buening <andreas.buening@nexgo.de>
More OS/2 stuff.
* awk.h (O_BINARY): Don't redefine for EMX.
* io.c (gawk_popen): Add __EMX__ in case compiling DOS executable.
* configure.in: Add OS/2 to case for manual GETPGRP_VOID.
Tue Dec 4 17:54:30 2001 Arnold D. Robbins <arnold@skeeve.com>
New configure time option, --with-whiny-user-strftime.
* configure.in (AC_ARG_WITH): Add appropriate code for autoconf.
* accondig.h (USE_INCLUDED_STRFTIME): add #undef for it.
* custom.h (USE_INCLUDED_STRFTIME): set things up write.
Tue Dec 4 16:44:07 2001 Andreas Buening <andreas.buening@nexgo.de>
Mongo patch for updated OS/2 support.
* awk.h (TOUPPER, TOLOWER): Define only if not already defined.
* awkgram.y (extproc feature): Add ifdef for __EMX__.
* gawkmisc.c (__EMX__): include pc/gawkmisc.c directly.
* io.c (__EMX__): Added for a number of places in addition to OS2 def.
(two_way_open): Added OS/2 specific code added that uses spawn.
(gawk_popen): ditto.
Mon Dec 3 14:07:56 2001 Arnold D. Robbins <arnold@skeeve.com>
Fix use of getgroups to use dynamic memory, solves
problem of systems where NGROUPS_MAX lies.
* awk.h (groupset, ngroups): New extern variables.
* configure.in (AC_CHECK_FUNCS): Add getgroups to list.
* io.c (user_open): Use global ngroups and groupset variables,
don't call getgroups here.
* main.c (init_groupset): New function to init global
vars using malloc. Declare it at top.
(main): Call init_groupset().
(load_procinfo): Use global ngroups and groupset variables.
Sun Nov 18 11:56:01 2001 Arnold D. Robbins <arnold@skeeve.com>
* random.c (srandomdev): ifdef-out. Lots of compile time
problems on multiple platforms, and gawk doesn't even
use the routine. The heck with fine-grained solutions.
Wed Nov 14 16:12:40 2001 Pat Rankin <rankin@eql.caltech.edu>
* builtin.c (bchunk_one): Use `ofre < 1' instead of `ofre <= 0'
to avoid compiler complaint about suspicious comparison for
unsigned variable. (`ofre == 0' ought to suffice...)
Tue Nov 13 17:27:52 2001 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yyerror): Fix the code to behave like it
used to. Keep "no arbitrary limits" by mallocing the
buffer and freeing it.
Wed Nov 7 16:46:20 2001 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yyerror): Remove dependency upon buf[] to
hold prepended space and `^' pointer. Avoids core dumps
for long source lines.
Sat Nov 3 22:27:21 2001 Arnold D. Robbins <arnold@skeeve.com>
* m4/strtod.m4: Add missing `#endif'. Oops.
Mon Oct 29 14:53:57 2001 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y: Add semicolons in calls to count_args().
Apparently bisoon adds a semicolon to each body
automatically and byacc doesn't.
Sun Oct 28 16:53:18 2001 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_tree): Fix off-by-one error in "ran out
for this one" diagnostic. Also fix lint check for too many
arguments vs. count in format string.
Wed Oct 10 11:01:47 2001 Arnold D. Robbins <arnold@skeeve.com>
* fixvers: Check that files exist before doing `cmp', in
case they're in a source code system and aren't there.
Fix from Grant Erickson (gerickson@brocade.com).
Thu Oct 4 18:20:36 2001 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (r_tree_eval): For comparison, dupnode() results of
evaluation so that we can hang on to them and avoid memory
corruption. Change calls to free_temp() to unref().
Tue Sep 25 15:19:53 2001 Arnold D. Robbins <arnold@skeeve.com>
* io.c (iop_open): Only call os_close_on_exec() for
fd > fileno(stderr).
2001-09-07 Paul Eggert <eggert@twinsun.com>
* io.c (redirect): When deciding to use the fdopen bug hack,
use "__sun" rather than "solaris". No compilers predefine
"solaris", but both GCC and Sun C predefine "__sun".
Thu Aug 30 15:17:12 2001 Arnold D. Robbins <arnold@skeeve.com>
* main.c (copyleft): Use a printf %d for last year of update
to avoid translation strings changing when the file
is updated from now on. Suggestion from Ulrich Drepper.
Thu Aug 23 14:01:14 2001 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (unary minus production): Add check that value
isn't a string. Based on bug report from drj@pobox.com.
* profile.c (tree_eval): For node_val, only test NUMBER
to see if value is numeric, not NUM|NUMBER.
Thu Aug 16 12:21:28 2001 Arnold D. Robbins <arnold@skeeve.com>
* configure.in (ALL_LINGUAS): Added `fr' and `tr'.
* po/fr.po, po/tr.fo: New files.
2001-08-13 Paul Eggert <eggert@twinsun.com>
This patch fixes a bug that causes gawk to rewind standard
input incorrectly. It also removes all instances of fseek,
from the gawk source proper, which should make gawk a bit
more portable.
(The original patch removed off_t & lseek too, but I need
that for something else. ADR.)
* posix/gawkmisc.c (optimal_bufsize):
Don't use lseek on the input, because that might change
its state. Instead, just check whether it is a regular file.
This obviates the need to invoke isatty.
(Also, fix a spelling error in the first line of the source.)
* pc/gawkmisc.pc, unsupported/atari/gawkmisc.atr: Likewise.
* awk.h (S_ISREG): Move this macro here ...
* io.c (S_ISREG): from here.
* protos.h (fseek): Remove prototype; no longer used.
Fri Aug 3 13:38:54 2001 Arnold D. Robbins <arnold@skeeve.com>
* array.c (assoc_lookup): Change assert test on type to real test
to protect against FS[1] = "x" kinds of things. It'd be better
to do this in the grammar, but this is easier and just as
effective.
Undid BECAMEARRAY changes of 25 June 2001 in favor of correct code:
* eval.c (pop_fcall): Change test and comment for freeing n->vname.
(flags2str): removed BECAMEARRAY entry.
* awk.h (BECAMEARRAY): Removed define.
* array.c (assoc_lookup): Removed setting of BECAMEARRAY flag.
Mon Jul 23 17:33:13 2001 Arnold D. Robbins <arnold@skeeve.com>
* io.c (get_a_record): Handle case where RS = "" and input file
is only newlines. See test/onlynl. Bug report by
Michel Jouvin <jouvin@lal.in2p3.fr>.
Wed Jul 4 18:34:19 2001 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (assign_val): Don't allow negative values for NF.
* field.c (set_NF): Robustify field-freeing code to make sure
values are always positive.
Sun Jul 1 19:15:01 2001 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_index): If second string is "", return 1.
Mon Jun 25 19:34:24 2001 Arnold D. Robbins <arnold@skeeve.com>
Further rationalization of treatment of dynamic regexes,
so that profiling code works correctly.
* awk.h (NODETYPE): New type, Node_dynregex.
* awkgram.y (mk_rexp): Use Node_dynregex.
* eval.c (nodetypes): Add Node_dynregex.
(r_tree_eval): Add Node_dynregex to case for match_op().
* profile.c (tree_eval): Add Node_dynregex to case for pp_match_op().
(pp_match_op): Handle Node_dynregex, simplify cases for ~ and !~.
* re.c (re_update): Add assertion that type is Node_regex when flags
indicate CONST.
New lint warning.
* awkgram.y (yylex): Added lint warning that constant with leading
zero is treated as octal or hex.
Generalized code for those who are Strong In The Ways of the Source.
* awk.h: New boolean variable.
* main.c (main): set it.
* eval.c (interpret): For arrays, check it. Remove variable 'first',
not needed anymore.
* profile.c (pp_string_fp): Enable printing of non-ascii characters
verbatim if variable set.
Fix memory corruption on SCO for array vars as params changed globally.
* awk.h (BECAMEARRAY): new flag.
* array.c (assoc_lookup): set the flag as appropriate.
* eval.c (flags2str): Add the flag.
(pop_fcall): Check the flag, don't free memory if set.
Wed Jun 13 18:07:06 2001 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (fmt_index): Actually call erealloc() to grow fmt_list
if that's really necessary. Bug report from David Jones,
djones@zoonami.com.
Sun Jun 10 14:24:48 2001 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_match_op): Rationalized the code.
Thu Jun 7 11:54:36 2001 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (O_BINARY): Don't define if already defined
(as is true for cygwin/gcc --- oops).
Sun Jun 3 13:04:44 2001 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.0: Release tar file made. And there was
rejoicing.
Wed Apr 25 11:44:07 2001 Arnold Robbins <arnold@skeeve.com>
* Makefile.am (AM_MAKEFLAGS): Add definition per advice from
Nelson Beebe.
Tue Apr 24 14:28:00 2001 Arnold Robbins <arnold@skeeve.com>
* io.c (devopen): Patch from Jeurgen to robustify pulling
out hostname, port numbers, etc, to avoid any buffer overrun
problems.
Mon Apr 23 10:26:38 2001 Arnold Robbins <arnold@skeeve.com>
* awkgram.y: Fix grammar so that `print ... |& ".." |& getline'
dies with a parse-time error message.
Sun Apr 22 16:46:48 2001 Arnold Robbins <arnold@skeeve.com>
* io.c (socketopen): Fix from Juergen in recursive call.
Thu Apr 19 18:39:20 2001 Pat Rankin <rankin@eql.caltech.edu>
* awk.h: Really fix logic around include of <sys/types.h>.
* awk.h (callresult): New name for `result' macro.
* eval.c (r_get_lhs, case Node_builtin): Use it.
Thu Apr 19 16:31:09 2001 Pat Rankin <rankin@eql.caltech.edu>
* io.c: Move code around to allow compilation with DEC C.
Thu Apr 19 16:21:56 2001 Arnold D. Robbins <arnold@skeeve.com>
* random.h: Move decl of random() here.
* random.c: Remove decl of random().
Mon Apr 9 11:41:58 2001 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c (dfainit): Initialize more members in the structure,
based on bug report in bug.gnu.utils by aaronl@vitelus.com
(Aaron Lehmann).
* awk.h: Fix logic around include of <sys/types.h>.
Thu Apr 5 20:12:05 2001 Pat Rankin <rankin@eql.caltech.edu>
* dfa.c: for VMS, #include <stddef.h> instead of <sys/types.h>.
* missing_d/mktime.c: likewise.
* random.c: reorder include directives to get gawk config info
from random.h sooner.
[fcntl.h]: guard #include with HAVE_FCNTL_H test.
[unistd.h]: guard #include with HAVE_UNISTD_H test.
* random.c (srandomdev): skip /dev/urandom usage if O_RDONLY
is not defined.
Tue Mar 20 11:07:11 2001 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (function_body): Add opt_nls to end of production.
Tue Mar 20 09:30:32 2001 Pat Rankin <rankin@eql.caltech.edu>
* awk.h (BROKEN_STRNCASECMP): Add decl of strcasecmp.
* io.c (two_way_open): Add `return FALSE;' for fussy compilers.
Sun Mar 18 15:10:56 2001 Arnold D. Robbins <arnold@skeeve.com>
* io.c (gawk_pclose): Set the exit value for close correctly
if the pipe died with a signal.
Wed Mar 7 11:28:52 2001 Arnold D. Robbins <arnold@skeeve.com>
* io.c (get_a_record): Correctly handle the case of a leading
single newline at the front of the file when RS = "".
2001-02-26 Paul Eggert <eggert@twinsun.com>
* COPYING: Incorporate latest version from FSF, which fixes a Y2k bug.
* builtin.c (do_mktime): Allow the user to specify the
tm_isdst member as an optional trailing integer, and to
specify "out-of-range" members. Check for overflow when
subtracting 1 from month or 1900 from year. Allow years just
past INT_MAX, as they work on some hosts when INT_MAX - 1900
is representable as an int.
* doc/gawk.1, doc/gawk.texi: Document the above changes.
Also, document that the origin-zero Gregorian calendar is used.
Fix confusing wording about "midnight" by replacing it with 00:00
("midnight" is also 24:00, the end of the day).
Mention the typical range for time stamps.
Do not assume that years are nonnegative and are less than 10,000.
Suggest TZ=UTC0 instead of TZ=GMT0, as that's how recent versions
of GNU date behave.
GMT is not always the time of day in Greenwich these days.
Fix typos: "Emporer/Era", "1980's", "1970's".
* m4/largefile.m4: Synchronized with latest version.
Tue Feb 27 12:10:11 2001 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_in_array): Change test to tree->type == Node_expression_list.
Wed Feb 7 14:46:50 2001 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (LEX_FOR): Allow newline after `;' in for loops.
Per bug report from Brian Kernighan, bwk@research.bell-labs.com.
Tue Feb 6 18:35:27 2001 Martin C. Brown <mc@whoever.com>
* io.c (socket_open): Conditionalize various options based on
ifdef. Needed for BeOS port.
Tue Feb 6 18:17:13 2001 Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
* regex.c (re_match_2_internal): Case maybe_pop_jump, for
charset and not_charset: change cast from (unsigned char)
to (unsigned). Catches last 8 chars with high bit set
if backtracking. See test/rebt8b1.awk, test/rebt8b2.awk.
Tue Feb 6 11:20:21 2001 Arnold D. Robbins <arnold@skeeve.com>
Have `for (iggy in foo)' save the elements and loop over them.
Make sorted for loops a dynamic test instead of a compile time test.
Still requires being Strong In The Ways Of The Source.
* awk.h: (struct search): removed.
(assoc_scan, assoc_next): removed declarations.
* array.c (assoc_scan, assoc_next): removed functions.
* eval.c (interpret): remove Node_K_array_sorted_for. Change code
at Node_K_arrayfor.
(nodetypes): remove Node_K_array_sorted_for.
* configure.in: removed array sorting test.
* awkgram.y: removed sorted_in keyword and associated code.
Sun Feb 4 14:57:49 2001 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (interpret): use tree->rnode->exec_count to hold count of
times if was true.
profile.c (interpret): ditto.
* main.c (pre_assign): gross hack. malloc fresh copy of assign so can
clear the '=', otherwise screws up profiling print out.
Sun Jan 28 16:16:02 2001 Arnold D. Robbins <arnold@skeeve.com>
Per request from Nelson Beebe, SIGHUP to pgawk dumps profile
and function call stack and exits, SIGUSR1 dumps and continues
running.
* eval.c (dump_fcall_stack): New function, dumps awk function call
stack.
* awk.h (dump_fcall_stack): Add declaration.
(init_profiling_signals): Ditto.
* main.c (main): Call init_profiling_signals.
* profile.c (init_profiling_signals, dump_and_exit, just_dump): new
functions.
Sun Jan 28 15:50:02 2001 Eli Zaretskii <eliz@is.elta.co.il>
* io.c (gawk_popen): Restore the mode of stdin before running the
child process and switch it back if BINMODE is in effect after the
child returns.
(redirect): Restore the mode of stdin before running the child
process.
(close_redir): Switch mode of stdin back to binary if BINMODE is
in effect, after the child returns.
* builtin.c (do_system): Restore the mode of stdin before running
the child process and switch it back if BINMODE is in effect after
the child returns.
* awk.h (os_restore_mode): Add prototype.
Thu Jan 18 14:03:06 2001 Arnold D. Robbins <arnold@skeeve.com>
* custom.h, README_d/README.ultrix: Fixes for Ultrix
from Juergen Kahrs.
Wed Jan 17 11:03:40 2001 Eli Zaretskii <eliz@is.elta.co.il>
* io.c (redirect) [F_GETFL && O_APPEND]: Use binmode in the call
to fdopen.
Mon Jan 15 16:29:52 2001 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (prec_level): Made Node_K_getline higher than <
but lower than others. Allows use of getline with redirection
inside an if.
Wed Jan 10 15:35:06 2001 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (set_BINMODE): Rationalized string assignment.
Sun Jan 7 15:26:16 2001 Arnold D. Robbins <arnold@skeeve.com>
* getopt.h: Removed names in prototypes for getopt_long
and getopt_long_only, fixes problems on MINGW32.
Thu Jan 4 10:13:46 2001 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: Add check for mcheck.h
* main.c: Include mcheck.h if have it.
(main): If TIDYMEM turned on in environment, also call mtrace().
Wed Jan 3 16:41:33 2001 Arnold D. Robbins <arnold@skeeve.com>
Fixed minor memory leaks.
* re.c (re_update): When IGNORECASE changed, unref(t->re_text).
* eval.c (pop_fcall): Fix the logic to correctly free the vname
when copying array args back to their underlying source.
Fixed massive memory leaks.
* node.c (dupnode): If PERM is set, do nothing.
(unref): Fix logic. Always turn off TEMP. Check just for MALLOC
when incrementing the stref.
* array.c (assoc_lookup): Turn off PERM also when saving subscript.
* builtin.c (sub_common): Turn off PERM also when making private copy
of string.
Add a minor memory cleanup facility (undocumented):
* awk.h (do_tidy_mem, release_all_vars): Add declarations.
* main.c (do_tidy_mem): Add declaration.
(main): if $TIDYMEM exists, do_tidy_mem is true, and call mtrace().
* awkgram.y (release_all_vars): New function.
Sun Dec 31 10:47:37 2000 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (in_end_rule): Renamed `parsing_end_rule' to avoid
conflict with global var of same name.
Sun Dec 24 10:36:54 2000 Eli Zaretskii <eliz@is.elta.co.il>
* awkgram.y (snode): Reword the error message about the number of
arguments for a builtin, so as not to use the English `s' as a
plural suffix.
Tue Dec 12 08:38:03 2000 Arnold D. Robbins <arnold@skeeve.com>
* ext.c (do_ext): ifdef out use of `dummy'. Duh.
* regex.c (re_error_msgid): Revert to array of `char *' so that can
compile on K&R compilers. Fix all uses appropriately.
(re_error_msgid_idx): Removed.
Fri Dec 8 11:47:26 2000 Arnold D. Robbins <arnold@skeeve.com>
* ext.c (dummy): Make gcc specific via ifdef.
* builtin.c (do_dcgettext): make conditional compilation smarter.
* msg.c (warning, error, r_fatal): Finish switching back to
multi-version function header.
Wed Dec 6 13:28:58 2000 Arnold D. Robbins <arnold@skeeve.com>
* random.h: include <config.h> to get ssize_t definition.
* awkgram.y (yyerror): Restore multi-version function header,
it seems that what ansi2knr produces doesn't quite do the
job on old compilers.
msg.c (msg): Ditto.
Tue Dec 5 15:05:35 2000 Arnold D. Robbins <arnold@skeeve.com>
* configure.in (AC_C_INLINE): Added macro call.
* Makefile.am (LN): Define it for install hooks.
Sun Dec 3 17:28:53 2000 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (os_setbinmode): Declare new function.
(setmode): Remove definition: conflicts with MacOS X.
* main.c (main): Change call of setmode to os_setbindmode.
* builtin.c (do_dcgettext): Improve ifdef for code, fixes MacOS X.
* custom.h (__APPLE__): Force definition of HAVE_MKTIME, won't
link otherwise. Harumph.
Sun Nov 26 11:58:52 2000 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_dcgettext, do_bindtextdomain): Add calls to
free_temp the various arguments. Sigh.
* io.c (yylex): nuked bstart variable, put all uses of mend variable
into TANDEM ifdef.
* main.c (load_environ): removed cp variable, value never used.
* random.c: Remvoed uses of `inline' keyword.
* Makefile.am (install-exec-hook, uninstall-local): new targets.
Adds creation of gawk-X.Y.Z and awk links, as in 3.0.x.
* configure.in (GAWK_AC_TYPE_SSIZE_T): Added.
m4/ssize_t.m4: new file.
Wed Nov 22 14:47:18 2000 Arnold D. Robbins <arnold@skeeve.com>
After consultation with Brian Kernighan and Michael Brennan,
nuked the abort keyword.
* awk.h (Node_K_abort): removed.
* eval.c (aborting): removed decl.
(interpret): Removed Node_K_abort case.
* io.c (do_input): Removed checks for aborting.
* main.c (aborting): removed.
(main): Removed checks for aborting.
* profile.c (pprint): Removed Node_K_abort case.
* awk.y (LEX_ABORT): All stuff removed.
Wed Nov 22 10:45:57 2000 Arnold D. Robbins <arnold@skeeve.com>
* ext.c (dummy): Move inside #ifdef DYNAMIC. Helps on
PCs and other platforms that don't do dynamic loading.
* awk.h (RED_TCP): New flag, means use shutdown.
io.c (redflags2str): Add RED_TCP.
(SHUT_RD, SHUT_WR, SHUT_RDWR): Add conditional defines.
(redirect): Add RED_TCP to tflag if appropriate. Add more
#ifdef HAVE_SOCKETS as needed.
(close_redir): If RED_TCP set, shutdown(2) on each end of the socket.
Tue Nov 21 16:25:41 2000 Arnold D. Robbins <arnold@skeeve.com>
* awk.y: for (iggy in foo) loops: add test that index
in delete statement is a simple variable.
Tue Nov 14 16:11:39 2000 Arnold D. Robbins <arnold@skeeve.com>
* awk.h: Add appropriate conditional versions of the gettext
functions if we don't have <libintl.h> or if ENABLE_NLS
is not defined or zero.
* configure.in: Add check for libintl.h header.
From Scott Deifik for PCs.
* awk.h (lintwarn): Call set_loc unconditionally, makes
compilation work on PCs.
* builtin.c (do_dcgettext): Compile out cat_tab and code
if not ENABLE_NLS.
* ext.c: for MSC, no long long variable.
* random.c: use clock() instead of gettimeofday().
* builtin.c: Fixed prototypes for new random functions (ADR).
Sun Nov 12 17:45:44 2000 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (parse_next_arg): Fix call to >= num_args so
running out of args check is correct, instead of core dumping.
(format_tree): Save and restore `the_args' and `args_size'
if a nested call is in progress, see explanatory comment.
See also tests/addcomma.
* Makefile.am: Fix things so that gawk/pgawk built first,
even if `make check' called before make. Add some
commentary.
Wed Nov 8 14:39:20 2000 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: Only add -rdynamic for linux.
* dfa.h, dfa.c: upgraded to versions in grep 2.4.2.
Tue Nov 7 18:17:17 2000 Arnold D. Robbins <arnold@skeeve.com>
* All: Switched to ANSI function headers and added
`ansi2knr' automake option. Really cool.
Tue Nov 7 16:57:49 2000 Arnold D. Robbins <arnold@skeeve.com>
* io.c (redirect): Check for O_APPEND in flags when doing
fdopen() of /dev/fd/N. Thanks to bug report from
"John H. DuBois III" <spcecdt@armory.com>.
Tue Nov 7 14:09:14 2000 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (os_is_setuid): declare function.
* main.c (main): call it if do_lint and warn if true.
* awkgram.y (tokentab):
- Made sure all extensions are actually marked as such. Ouch.
- Changed "sort" to "asort". Potential to break too much old code.
* getopt.h, getopt.c, getopt1.c: replaced with current versions
from glibc CVS archive.
Mon Nov 6 18:14:33 2000 Arnold D. Robbins <arnold@skeeve.com>
* random.c: Replaced with recent version from FreeBSD.
Mon Nov 6 15:37:12 2000 Arnold D. Robbins <arnold@skeeve.com>
Major simplification of automake machinery.
* configure.in:
- INSTALL is forced only if not provided in environment
- lots of Makefile.in files removed since move to automake 1.4a
* Makefile.am, */Makefile.am: Moved directories that don't need
the automake machinery into EXTRA_DIST as appropriate and
removed the Makefile{,.am,.in} files as needed.
* eval_p.c, profile_p.c: New files to make it easier with automake
to compile pgawk.
Tue Oct 24 12:20:18 2000 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (valinfo, var_comp, dump_vars): New functions to dump
the list of global variables.
* awk.h: Declare dump_vars.
* main.c (optab): new option "dump-variables".
(main): Code to handle it, set the output file and then call
dump_vars() at the end.
(usage): New option added to usage message.
Sat Oct 21 22:59:59 2000 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (parms_shadow): For a function, check if any
parameters shadow global variables and print a warning.
(shadow_funcs): Go through all functions and call parms_shadow().
(isnoeffect, isassignable): Add Node_LINT and NODE_BINMODE.
* main.c (main): If do_lint, call shadow_funcs().
* awk.h: add declaration of shadow_funcs().
* configure.in: added m4/Makefile and awklib/eg/network/Makefile
to list of generated makefiles.
Tue Oct 17 10:47:35 2000 Arnold D. Robbins <arnold@skeeve.com>
* array.c (assoc_lookup): Reverted change that did dupnode of
array indices. Creates significant problems if index is
numeric value and CONVFMT changes. Added fix to set
bucket->ahname->stfmt to -1 so that force_string never recalculates
the string value, and also turned off NUM and turned on STR.
See test/arynasty.awk.
Mon Oct 16 12:21:26 2000 Arnold D. Robbins <arnold@skeeve.com>
* All: Cleaned up various lint warnings for consistent phrasing.
* awk.y (in_end_rule): New variable for warning about unredirected
getline. It's ok in a BEGIN, but not in an END.
Sun Oct 15 14:14:05 2000 Arnold D. Robbins <arnold@skeeve.com>
* field.c (set_FS): Add lint warning for FS = "".
(do_split): Ditto for 3rd arg = "".
Fri Oct 13 09:17:04 2000 Arnold D. Robbins <arnold@skeeve.com>
* io.c (close_redir): Clear rp->fp on all closes. Remove
rp from list if either closing both ends or both ends
have been closed separately. Add exitwarn message for
co-process.
(flush_io): Add warning message if fflush of co-process
fails. Rationalize return value to either 0 or -1.
* builtin.c (do_gensub): 3rd arg of zero generates a
warning.
(do_fflush): rationalize return value: -1 for unopen or read-only
redirection, status of fflush otherwise.
Wed Oct 11 22:11:19 2000 Arnold D. Robbins <arnold@skeeve.com>
* awk.y (for loop): Check that there is a body as
part of the `is it a delete statement' check.
Thu Oct 5 11:56:42 2000 Arnold D. Robbins <arnold@skeeve.com>
* awk.h, awkgram.y, configure.in, eval.c: enabled
`for (i in_sorted array)' loops for those who
are Strong In The Way Of The Source. So there.
Mon Oct 2 10:09:32 2000 Arnold D. Robbins <arnold@skeeve.com>
* io.c (do_close): make close(x) for non-open x return -1
and update ERRNO. close(FILENAME) no longer does anything
magic; this is all for better consistency with other awks
and is more logical, anyway.
Thu Sep 28 17:27:16 2000 Arnold D. Robbins <arnold@skeeve.com>
* io.c (close_one): Added a lint warning if it becomes
necessary to start multiplexing fd's, per ancient suggestion
from Scott Deifik, <scottd@amgen.com>.
Tue Sep 26 14:41:41 2000 Arnold D. Robbins <arnold@skeeve.com>
* profile.c: Move enum for redirection placement to top
of file, and make the value a parameter to pp_redir.
Fix all the calls. This gets `|&' right everywhere.
Sun Sep 24 16:38:04 2000 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (freenode): set the flags straight to UNINITIALIZED.
* node.c (unref): Fix test for MALLOC|TEMP to test the
actual flags, not zero.
* builtin.c (format_tree): ala print and concat, dupnode
the temp nodes from tree_evaling the arguments. See
test/nasty2.awk.
Mon Sep 18 10:16:58 2000 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (snode): Make match 3rd arg and close 2nd arg fatal
errors if --tradtional.
Thu Sep 14 12:22:42 2000 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (update_ERRNO): Call gettext on result of strerror.
i18n rules.
Wed Sep 13 14:56:11 2000 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (r_tree_eval): Case for Node_concat. Dupnode the
strings ala do_print to get more consistent results.
Compare gawk 3.0.6 to nawk/mawk on test/nasty.awk.
Thanks to Andrew Sumner (andrewsumner@yahoo.com) for
pointing this one out.
Wed Sep 13 10:06:47 2000 Arnold D. Robbins <arnold@skeeve.com>
* io.c (two_way_close_type): New enumerated type.
(close_redir): New third param of type two_way_close_type.
Add smarts to two-way case for different close types.
Only remove it from the redir list if closing is for both ends.
(gawk_pclose): Check that rp->iop != NULL before closing,
all three versions.
* awkgram.y (tokentab): Allow 2nd argument to close.
(snode): Add lint warning.
Sun Sep 10 14:16:10 2000 Arnold D. Robbins <arnold@skeeve.com>
* field.c (set_FIELDWIDTHS): Generate a fatal error upon
encountering a negative width.
Sun Sep 10 10:37:35 2000 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (snode): If first argument to dcgettext is a
string constant and --gen-po, dump the string constant to
the .po file too.
* main.c (nostalgia): Add call to fflush(stderr).
* eval.c (r_tree_eval): Add entries for Node_LINT and for
NODE_TEXTDOMAIN.
Thu Sep 7 10:46:20 2000 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_dcgettext): Per suggestion from Ulrich Drepper,
make the awk interface:
str = dcgettext(string [, domain [, category]])
Wed Sep 6 16:28:12 2000 Arnold D. Robbins <arnold@skeeve.com>
Bring gettext features out to the awk level!
* awk.h: Add declarations of new functions `do_dcgettext'
`do_bindtextdomain', `set_TEXTDOMAIN' and variables
`TEXTDOMAIN', `TEXTDOMAIN_node'. New NODETYPE enum
`Node_TEXTDOMAIN'.
* eval.c (nodetypes): add Node_TEXTDOMAIN at end.
(set_TEXTDOMAIN): new function.
(r_get_lhs): add case for Node_TEXTDOMAIN.
* main.c (varinit): add entry for TEXTDOMAIN.
* node.c (format_val): If INTLSTR use dcgettext of string
and TEXTDOMAIN.
* awkgram.y (tokentab): Add entries for "dcgettext" and
"bindtextdomain".
* builtin.c (do_dcgettext, do_bindtextdomain): new functions.
Tue Sep 5 17:01:34 2000 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_string_fp): Use lower case versions of
isascii and isprint to avoid printing high-bit-set
characters. Make it smarter to break strings at 70
chars or after embedded newline, for --gen-po.
Fix the calls to it everywhere for new boolean option
to yes/no break lines.
* m4/strtod.m4: new file, defines GAWK_AC_FUNC_STRTOD_C89.
* configure.in: GAWK_AC_FUNC_STRTOD_C89 call added
* acinclude.m4: include strtod.m4.
* acconfig.h: add entry for STRTOD_NOT_C89.
Remove entries for BITOPS and NON_DEC_DATA.
* missing/missing.c: add check for STRTOD_NOT_C89, use ours
if set.
* missing/strtod.c: make smarter for input like 0x345.
* awk.h: [STRTOD_NOT_C89]: define strtod gawk_strtod to get
our version. Avoids linker weirdness.
Mon Sep 4 09:16:43 2000 Arnold D. Robbins <arnold@skeeve.com>
* field.c (set_record): fix from Utz-Uwe Haus
<haus@saturn.Math.Uni-Magdeburg.DE> to make sure there's
always enough room in the record.
* builtin.c (nondec2awknum): Fix octal conversions to exit
when hitting a non-digit, and not go to decimal. Make
check for non-octal better. Based on bug report from
Morris_Lee@tvratings.com.
Sun Sep 3 13:52:11 2000 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_tree): Allow positional parameters for
%*.* kinds of things.
Made octal/hex constants and strtonum on by default. Made
--enable-non-decimal-data a runtime switch `--non-decimal-data'.
* configure.in: Removed AC_ARG_ENABLE for --enable-bitops and
--enable-non-decimal-data.
In .developing check, remove the AC_DEFINEs.
* awk.h: Decls for bitwise functions now there by default.
Add decl of `do_non_decimal_data'.
* main.c (do_non_decimal_data): new variable
(optlist): add new entry for `--non-decimal-data'.
(main): turn off `do_non_decimal_data' if `do_traditional'.
(usage): add the new option.
* node.c (r_force_number): make check for non-decimal data a
runtime check based on do_non_decimal_data.
* awkgram.y (yylex): make non-decimal constants a runtime check.
* builtin.c: remove the ifdefs around the bit functions and
nondec2awknum.
Tue Aug 29 18:45:56 2000 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: go back to ARRAYDEBUG if .developing set.
* awkgram.y: use ARRAYDEBUG for adump(), use multiple tests
for stopme().
Mon Aug 28 17:09:06 2000 Arnold D. Robbins <arnold@skeeve.com>
* field.c (do_split): Add check for first arg is null string,
if so, skip the work and return zero.
Mon Aug 14 23:01:55 2000 Arnold D. Robbins <arnold@skeeve.com>
* Add %COUNT$... handling to printf.
awk.h (printf_count): new define in NODE structure.
(format_tree): added decl.
awkgram.y (count_args): new function to set printf_count in
a node.
[print productions]: call the function.
(snode): for do_sprintf, call count_args, set the count
in the lnode.
builtin.c (format_tree): new fourth arg is argument count.
Add smarts to handle the `$' in a format.
(do_sprintf): use new argument to format_tree.
node.c (format_val): ditto.
Sun Aug 13 11:10:41 2000 Arnold D. Robbins <arnold@skeeve.com>
Changes from Alan J. Broder (ajb@woti.com):
- Array third arg to match puts subtexts into the array:
* awk.y (tokentab): "match" gets third arg, and lint warning
* builtin.c (do_match): if third arg there, fill it with subtexts
- New builtin sort function:
* awk.h (do_sort): declared.
* array.c (do_sort, dup_table, merge, merge_sort, assoc_from_list,
assoc_sort_inplace): new functions.
* eval.c (tree_eval): in debug code, make uninitialized var
a warning, not a fatal error. Breaks too many things.
Wed Aug 9 10:51:41 2000 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (func_call): Increment the exec_count on the
function's node; this allows printing a call count for
functions.
profile.c (pp_func): print the count for functions.
* ALL: Changed DEBUG to GAWKDEBUG in all gawk files, so that
I don't get regex/dfa debugging. In some cases, changed
memory-related stuff to MEMDEBUG. Still have work to do.
* awk.h, node.c, profile.c: removed exec_count_init variable;
code has been cleaned up to not need different values for
profiling/not profiling.
Thu Jul 5 21:10:59 2000 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (casetable): Removed the USE_PURE_ASCII stuff; it
was never documented. Latin 1 forever.
* main.c (main): only call `init_profiling' after arg parsing
if `do_profiling' is still false. Avoids resetting `prof_fp'
back to stderr.
2000-02-17 Akim Demaille <akim@epita.fr>
* m4: New directory.
* acinclude.m4: Removed, replaced by m4/*.m4.
* Makefile.am: Adjusted.
Added ACLOCAL_AMFLAGS.
* configure.in Adjusted.
Use AC_SYS_LARGEFILE not GAWK_AC_SYS_LARGEFILE, jm_FUNC_MKTIME,
not GAWK_FUNC_MKTIME.
* acconfig.h: Removed _FILE_OFFSET_BITS, _LARGEFILE_SOURCE and
_LARGE_FILES now templated by m4/largefile.m4.
2000-02-15 Arnold Robbins <arnold@skeeve.com>
* MOVED TO AUTOMAKE AND GETTEXT.
Just about every file touched. Work done by Arno Peters.
Sun Jan 2 14:48:23 2000 Arnold D. Robbins <arnold@skeeve.com>
First edit of the new millenium!
* awk.y (yylex): if lint checking, be obnoxious about gotos.
Mon Oct 25 19:12:02 1999 Arnold D. Robbins <arnold@skeeve.com>
* awk.h: remove C_ALLOCA ifdef.
* main.c (main): remove C_ALLOCA code.
* io.c (do_input): ditto.
Mon Aug 9 17:36:24 1999 Arnold D. Robbins <arnold@skeeve.com>
* bisonfix.sed: unconditionally #undef YYSTACK_USE_ALLOCA.
* configure.in: remove all alloca and ALLOCA related stuff.
* Makefile.in: ditto
Thu Jul 29 18:32:05 1999 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (NODE): exec_count now in #ifndef NO_PROFILING.
* Makefile.in: changes to only recompile eval.c and profile.c to a
special version for profiling.
* custom.h [MSC_VER]: turn on NO_PROFILING to omit the exec_count
and save space.
* node.c (more_nodes): move setting of exec_count to
#ifndef NO_PROFILING.
Thu Jul 1 12:12:05 1999 Arnold D. Robbins <arnold@skeeve.com>
* configure.in (AC_PREREQ): update to 2.13.
GAWK_AC_C_STRINGIZE: convert to AC_C_STRINGIZE.
* aclocal.m4 (GAWK_AC_C_STRINGIZE): remove definition, now
part of autoconf.
* acconfig.h (HAVE_STRINGIZE): ditto.
Wed Apr 28 11:08:05 1999 Arnold D. Robbins <arnold@skeeve.com>
* array.c (assoc_lookup): fix call to free_temp(subs) to after
last use of subs.
Sun Apr 25 16:48:06 1999 Arnold D. Robbins <arnold@skeeve.com>
* io.c (redirect): add lint warning when same file is used for
> and >>.
Thu Apr 22 15:05:30 1999 Arnold D. Robbins <arnold@skeeve.com>
* array.c (assoc_lookup): Fix call to fatal to lintwarn instead.
* node.c (r_force_number): Use `0 &&' to disable warnings about
conversions: they're overzealous, methinks.
Thu Apr 8 14:27:58 1999 Arnold D. Robbins <arnold@skeeve.com>
New features for profiling:
* awk.h (NODE): add `exec_count' member.
(freenode): clear `exec_count' upon free.
* awk.y (func_count): new variable, counts total number of functions.
(func_install): increment func_count.
(struct finfo): information for use in sorting functions when
pretty printing.
(fcompare): compare two finfo structures.
(dump_funcs): print the functions in sorted order for profiling.
(getfname): return the name of a builtin function.
* eval.c (INCREMENT): new macro for counting execution of nodes.
(interpret): call INCREMENT() appropriately.
* main.c (do_profiling): new flag if doing profiling.
`--profiling': new option added to getopt_long machinery.
(main): For profiled version, set do_profile and output file.
Call `dump_prog' and `dump_funcs' if do_profiling at end.
(usage): add new argument.
* node.c (more_nodes, freenode): set exec_count to zero.
* profile.c: new file, does pretty printing and prints counts.
* Makefile.in: update to create two versions of gawk, regular
and `pgawk' which does profiling.
Wed Mar 10 21:38:14 1999 Arnold D. Robbins <arnold@skeeve.com>
* io.c (close_redir): use update_ERRNO() instead of manually
doing it.
Mon Dec 21 15:58:21 1998 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: add BeOS to list of cases where we hardwire
GETPGRP_VOID.
custom.h: remove the #define from __be_os case. Cleaner to
do it all in configure. Based on email from Martin C. Brown,
mc@whoever.com.
Mon Nov 30 20:52:52 1998 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (update_ERRNO): new function, mainly for use by
extension functions.
* awk.h: add decl.
Tue Nov 24 18:13:29 1998 Arnold D. Robbins <arnold@skeeve.com>
* Changes based on submission from Christos Zoulas at D.E. Shaw
that adds the following features:
- checking for use of uninitialized variables
- checking if a string that's not a number converts to 0
- ability to load a dynamic library to add built-ins
- VERSION variable (may or may not stay)
Additional change:
- --lint=fatal makes lint errors become fatal
- LINT="fatal" has the same effect, any other positive
value makes lint errors be just warnings
* Makefile.in (includedir): new variable for gawk header files
(ext.c, ext.o): new source and object files
(OTHERS, extension): new directory for macro with example extension
(install): install header files
* acconfig.h (DYNAMIC): new macro, true if can do dynamic loading
* array.c (assoc_lookup): new parameter `reference' is true if we
want to do reference checking. Add appropriate reference checking
code.
* awk.h (UNITITIALIZED): new flag
(lintfunc): function pointer for correct function to use
(lintwarn): new macro to produce warnings
(result): new macro for func call result, used in commented out
code in eval.c.
(getnode, freenode): revised to set UNINITIALIZED.
(get_lhs): third arg for reference checking, change all calls
-- Add appropriate decls of new/changed functions
* awk.y (tokentab): new builtin "extension" for adding extensions
(node_common): set flags to UNINITIALIZED for Node_var.
* configure.in (dynamic linking): new check. Probably should
be a separate macro.
* eval.c (flag2str): add UNINITIALIZED to the table.
(r_tree_eval): add checks for UNINITIALIZED.
(push_args): appropriate changes for UNINITIALIZED to work.
(r_get_lhs): new third argument for reference checking.
(set_LINT): add code to handle setting `lintfunc' appropriately.
* ext.c: new file, for doing dynamic library extensions.
* extension/*: new directory with simple example code.
* main.c (VERSION_node, EXTENSION_node): new nodes for new vars.
(optab): change for "lint" to allow optional argument.
(lintfunc): definition.
(main): add case in option processing for --lint.
(varinit): add entries for VERSION and EXTENSION.
* node.c (r_force_number): checks that string really is a number.
(morenodes): set UNITIALIZED in the flags.
* re.c (all): change `result' to `res' globally to avoid conflict
with new macro.
* GLOBAL: change lint calls to warning() to lintwarn().
* GLOBAL: change all calls to get_lhs() to have 3rd arg.
* GLOBAL: change all calls to assoc_lookup() to have 3rd arg.
Sun Nov 22 17:07:39 1998 Arnold D. Robbins <arnold@skeeve.com>
* patchlev.h: renamed from patchlevel.h to make life
easier for the PC guys.
(main.c): changed to include patchlev.h.
(Makefile.in): changed to ref patchlev.h where needed.
Sat Nov 7 21:29:52 1998 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (r_get_lhs): case Node_field_spec. Fix the lint
warnings for field reference of null string or non-numeric value.
When turned on, $0 generated a warning! Oops.
Thu Nov 5 16:58:38 1998 Arnold D. Robbins <arnold@skeeve.com>
* main.c (init_fds): new function to pre-open 0, 1, and 2 on
/dev/null if they're not open. Robustness, more or less.
(main): call init_fds.
* io.c (str2mode): add smarts for two-letter strings
such as "rw", "r+", "wr", "w+" and "a+".
Mon Nov 2 16:55:46 1998 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_*): added lint checks for non-numeric
and/or non-string arguments, as appropriate. This should
have been done long ago.
Tue Oct 20 21:56:06 1998 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (LINT_node): new variable for LINT special var
(Node_LINT): new node type.
(set_LINT): declare function.
* main.c (varinit): add LINT variable.
(usage): print an emphatic pointer to the manual for bug reports.
* eval.c (nodetypes): new entry for Node_LINT.
(r_get_lhs): case added for Node_LINT.
(set_LINT): set do_lint from LINT variable.
Mon Oct 19 22:35:46 1998 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: for GCC, add -Wall to get warnings for development.
* Makefile.in (awktab.c): move sed stuff to separate script.
* bisonfix.sed: new script, with old fix and Solaris x86 fix.
* awk.h (nodetype2str): add declaration.
(load_procinfo): add declaration.
Tue Oct 13 22:28:56 1998 Arnold D. Robbins <arnold@skeeve.com>
* Changes to make PROCINFO["FS"] reflect the use of FIELDWIDTHS or FS.
eval.c (assign_val): new function that does the mechanics of
assignment
main.c (load_procinfo): add setting of PROCINFO["FS"] to "FS".
field.c (update_PROCINFO): new function to update the array.
(set_FS): call update_PROCINFO.
(set_FIELDWIDTHS): ditto.
Sun Sep 27 10:18:05 1998 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (reisstring): new prototype.
* re.c (reisstring): new function, returns true if the re did
a simple string match. This is rather simplistic in its logic.
* io.c (get_a_record): in the case that RS is a regexp, AND
the re matched at the exact end of the buffer, add a call to
`reisstring' in case it's a simple string match. If so, we
don't need to read more into the buffer because we don't
have a regex like `x.*y' that might extend longer.
This should be very helpful for interactive /inet clients
where something like `RS = "\r\n"' happens.
Thu Aug 13 22:07:40 1998 Arnold D. Robbins <arnold@skeeve.com>
* io.c (socketopen): fixes from Juergen Kahrs to socket
opening code for "any host".
Tue Jul 14 19:02:33 1998 Arnold D. Robbins <arnold@skeeve.com>
* aclocal.m4 (GAWK_AC_LIB_SOCKETS): removed the caching;
configure gave different results the second time it was run!
Fri Jul 10 09:11:06 1998 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (interpret): minor cleanups: add variable name to
fatal error Node_K_array_for and other minor changes.
Mon Jun 22 16:53:34 1998 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.in (tags, TAGS): add $(LIBSRC).
Tue Jun 2 15:23:05 1998 Arnold D. Robbins <arnold@skeeve.com>
* io.c (devopen): relax previous change, don't require "any",
just that a port be there. The user can put 0 if they
don't care.
Wed May 27 21:33:45 1998 Arnold D. Robbins <arnold@skeeve.com>
* io.c (devopen): for /inet, require that local and remote
ports and the remote hostname be there, and that `any'
be used for a port if they don't care.
Thu May 21 14:13:46 1998 Arnold D. Robbins <arnold@skeeve.com>
* node.c (parse_escape): Add warning that is always on
for \q for any unknown q inside string or regex constant.
I got bit by this myself once too often. Or else I'm
just getting old and senile.
Mon May 4 12:42:49 1998 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (NODETYPE): Sorted the Node_xxx entries for the
builtin variables. Gotta look nice, don't we?
* eval.c (nodetypes): ditto.
(genflags2str): added code to check that we don't
overflow the static buffer. This is just a debugging
routine, not worth the hassle of dynamic allocation.
Mon Mar 2 16:06:16 1998 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.in (dist): remove any embedded copied RCS or CVS
directories.
Mon Feb 23 00:09:52 1998 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (genflags2str): add declaration.
* eval.c (genflags2str): new function.
(flags2str): use new general purpose function.
* io.c (redflags2str): same.
Sun Feb 22 23:57:29 1998 Arnold D. Robbins <arnold@skeeve.com>
Significant changes to add two-way i/o and sockets!!!
* Makefile.in: add @SOCKET_LIBS@ to LIBS variable.
* acconfig.h: add HAVE_SOCKETS and HAVE_PORTALS defs.
* aclocal.m4: new macro GAWK_AC_LIB_SOCKETS.
* awk.h: new node type, Node_redirect_twoway, and new redirection
flags: RED_TWOWAY, and RED_SOCKET.
* awk.y (parser): add TWOWAYIO token and appropriate productions.
(yylex): recognize `|&' token if not traditional.
* builtin.c (do_print, do_printf): flush buffer if TWOWAYIO.
* configure.in: add header checks for networking header files,
add --enable-portals switch, call GAWK_AC_LIB_SOCKETS
* eval.c (nodetypes): add string constant for Node_redirect_twoway.
* io.c (redflags2str): new function.
(redirect): better error message in default case, add code for
Node_redirect_twoway.
(socketopen): new function.
(iop_open, devopen): add recognition of `/inet/...'.
(two_way_open): new function.
Sat Dec 13 21:15:07 1997 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (struct node): new member, `param_list' in union `x', becomes
`node->parmlist' in the code.
* awk.y (func_install): rearranged a bit, to build up a list of
the function parameter names and to save it in the `parmlist' field.
* eval.c (push_args): new parameter, `varnames', which is the list
of variable names. Use this to set the vname field of each
parameter's value as it's created. Special case arrays to include
where they came from, mainly for array vs. scalar diagnostics.
(r_tree_eval): don't set the `vname' field for parameters.
(pop_fcall): free the `vname' field if it's an array.
(func_call): pass in the `parmlist' field to call of push_args().
(r_get_lhs): for Node_subscript, change error message to use
the `vname' field.
(stopme): new do-nothing function for use with debugging code
and setting breakpoints.
Thu Dec 4 15:18:17 1997 Arnold D. Robbins <arnold@skeeve.com>
* awk.y: fixed several lint checks and moved some into
test for do_lint_old.
* eval.c (fmt_index): add value of bad format spec to
error message.
Tue Nov 18 22:19:02 1997 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.in (install): strip the installed binary.
From Anatoly A. Orehovsky (tolik@mpeks.tomsk.su).
Sun Nov 16 22:12:39 1997 Arnold D. Robbins <arnold@skeeve.com>
* array.c (in_array, assoc_lookup): add symbol->vname to
fatal calls for scalar in array context.
Wed Nov 12 22:18:33 1997 Arnold D. Robbins <arnold@skeeve.com>
* awk.h [ISASCII]: on all IS* macros, add cast to unsigned char.
[TOUPPER, TOLOWER]: new macros using unsigned char.
* awk.y: change to use of IS* vs. is* macros.
* builtin.c (nondec2awknum): change to use of IS* vs. is* macros,
change casts for casetable[] from int to unsigned char.
use new TOLOWER, TOUPPER macros
* dfa.c [ISASCII]: on all IS* macros, add cast to unsigned char.
(lex): change isdigit to ISDIGIT.
[TOUPPER, TOLOWER]: new macros using unsigned char, now used.
* eval.c (fmt_ok): change to use of IS* vs. is* macros.
* field.c (sc_parse_field): change to use of IS* vs. is* macros,
change casts for casetable[] from int to unsigned char.
(set_FS): change to use of IS* vs. is* macros.
* io.c (get_a_record): change to use of IS* vs. is* macros,
change casts for casetable[] from int to unsigned char.
* main.c (main): change to use of IS* vs. is* macros.
* node.c (r_force_number, parse_escape): change to use of IS* vs.
is* macros.
* re.c (make_regexp): change to use of IS* vs. is* macros.
* regex.c [ISASCII]: on all IS* macros, add cast to unsigned char.
Sun Oct 19 12:36:47 1997 Arnold D. Robbins <arnold@skeeve.com>
* ALL: Change email address to arnold@gnu.org in all relevant places.
Wed Oct 15 03:38:12 1997 Arnold D. Robbins <arnold@skeeve.com>
* awk.y (yylex): Don't allow newlines after ? or : if do_posix.
Thu Oct 9 19:28:39 1997 Arnold D. Robbins <arnold@skeeve.com>
* custom.h [SEQUENT]: removed; not needed any more since the
mmap code was ripped out.
Wed Oct 8 17:22:03 1997 Arnold D. Robbins <arnold@skeeve.com>
* configure.in: remove check for madvise; don't need it any more
after nuking use of mmap.
Tue Oct 7 11:14:21 1997 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (flags2str): made the code table driven. Shortened a lot.
Tue Sep 30 20:59:17 1997 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (r_get_lhs): case Node_field_spec. Add lint warnings
for field reference of null string or non-numeric value.
Based on patch submitted by Alan Broder, ajb@dtmr.com.
Wed Sep 24 20:47:59 1997 Arnold D. Robbins <arnold@skeeve.com>
* custom.h [TANDEM]: new changes. Finishes up Tandem
integration.
Mon Sep 22 00:42:34 1997 Arnold D. Robbins <arnold@skeeve.com>
* custom.h [__be_os]: remove BROKEN_TOKEN definition.
dfa.c, dfa.h: change `token' to `dfa_token' to avoid BeOS
compile problems.
Thu Aug 7 22:35:17 1997 Arnold D. Robbins <arnold@skeeve.com>
* Changes for BeOS from mc@whoever.com
awk.h (strncasecmp): bracket prototype.
custom.h [__be_os]: new stuff.
dfa.h, dfa.c [BROKEN_TOK]: new ifdefs to use dfa_token, not token.
Fri Aug 1 13:32:49 1997 Arnold D. Robbins <arnold@skeeve.com>
* Tandem changes:
awk.h [TANDEM]: misc additions, as needed.
io.c (get_a_record): changes for fixed length records; not used
on other systems.
main.c (MRL): new variable, TANDEM specific.
(main): update handling -mr option for TANDEM.
(load_environ): comment out whole routine if TANDEM.
missing.c [TANDEM]: new includes.
gawkmisc.c [TANDEM]: include `tmiscc'.
Wed Jul 30 19:53:52 1997 Arnold D. Robbins <arnold@skeeve.com>
* Close-on-exec changes:
awk.h: (os_close_on_exec, os_isdir): new functions.
gawkmisc.c: add include fcntl.h.
configure.in [AC_CHECK_HEADERS]: add fcntl.h.
io.c (devopen, iop_open): change to use os_isdir(), not S_IFDIR().
(redirect, devopen, iop_open, gawk_popen): change all calls to
fcntl() to os_close_on_exec().
Tue Jul 29 11:09:45 1997 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (set_BINMODE): fixed check for digits to use isdigit()
instead of looping over digits and using strchr(). Duh.
Sat Jul 26 22:52:08 1997 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (set_BINMODE): fix so that `-v BINMODE=w' works.
* node.c (r_force_number): add decl of strtod(); makes things
work on MIPS.
* Makefile.in (install-strip): new target.
Fri Jul 18 13:28:05 1997 Arnold D. Robbins <arnold@skeeve.com>
* io.c (redirect, devopen, iop_open, gawk_popen): set the
close-on-exec flag on all files and pipes opened for I/O.
Keeps children run via system() or other pipes from running out
of file descriptors.
(Reported by Kenny McCormack, gazelle@yin.interaccess.com.)
Tue Jul 8 22:18:00 1997 Arnold D. Robbins <arnold@skeeve.com>
* awk.y [LEX_NEXT]: Removed support for `next file' as two words.
Tue Jul 8 06:46:32 1997 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: changes from pjr@jet.UK (Paul J Rippin) from an old
bug report against 2.14.0 that speed up initialization and
rewrite the inner loop into readable code.
Thu Jul 3 11:44:50 1997 Arnold D. Robbins <arnold@skeeve.com>
* Atari support moved into new `unsupported' directory.
awk.h, Makefile.in, gawkmisc.c, and missing.c modified.
Sun Jun 29 14:17:37 1997 Arnold D. Robbins <arnold@skeeve.com>
* awk.y (exp): fixed warning about `x = /foo/'.
Wed Jun 25 09:07:57 1997 Arnold D. Robbins <arnold@skeeve.com>
* PORTS: removed from distribution.
* Makefile.in (MISC): removed PORTS.
Sun Jun 22 11:52:57 1997 Arnold D. Robbins <arnold@skeeve.com>
* BINMODE changes
awk.h (Node_BINMODE): added.
(struct redirect): added mode field to save for io.c:close_one().
(BINMODE, BINMODE_node, set_BINMODE): add declarations.
awk.y (isnoeffect): add Node_BINMODE.
eval.c (nodetypes): add Node_BINMODE string.
(r_tree_eval, r_get_lhs): add cases for Node_BINMODE.
(set_BINMODE): new function.
io.c (binmode): new function.
(nextfile, redirect, gawk_popen): add calls to binmode().
main.c (BINMODE, BINMODE_node): add decls.
(main): add call to setmode() if BINMODE is set.
(varinit): add entry for BINMODE.
Wed Jun 4 21:52:25 1997 Arnold D. Robbins <arnold@skeeve.com>
* configure.in [AC_FUNC_MMAP]: removed call.
* awk.h [struct iobuf]: removed IOP_MMAPED flag and `getrec' member.
* io.c: removed all mmap related code.
Sun Apr 27 16:23:56 1997 Arnold D. Robbins <arnold@skeeve.com>
* aclocal.m4 [GAWK_AC_FUNC_MKTIME]: new macro.
* configure.in (GAWK_AC_FUNC_MKTIME): call it.
Thu Apr 24 23:25:06 1997 Arnold D. Robbins <arnold@skeeve.com>
* io.c (devopen): remove stat test for /dev/foo files. Finally.
Fri Jul 26 09:23:15 1996 Arnold D. Robbins <arnold@skeeve.com>
* Changes to add an abort statement, a la tawk
awk.h (Node_K_abort): new enum value for NODETYPE.
main.c (aborting): new flag variable.
(main): add logic to handle aborting.
eval.c (interpret): add case for Node_K_abort.
io.c (do_input): if aborting, break loop.
awk.y (tokentab): add entry for "abort" keyword
(PRODUCTIONS): add production for LEX_ABORT.
Wed Jul 24 12:49:52 1996 Arnold D. Robbins <arnold@skeeve.com>
* First cut at changes for i18n.
awk.h (do_intl): declare new flag variable.
[INTLSTR]: new flag def.
(m_tree_eval): fix definitions for INTLSTR.
(force_string): fix definitions for INTLSTR.
awk.y (yylex): add _"..." for international strings.
(dumpintlstr): new function.
main.c (do_intl): define new flag variable.
(optab): add "gen-po" entry.
(main): if do_intl, exit, don't run the program.
(gawkoption): add "gen-po" entry.
node.c (r_force_string): call gettext if flags indicate INTLSTR.
Thu Mar 14 06:29:42 1996 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (do_mktime): added declaration of new function.
* builtin.c (do_mktime): new function.
* awk.y (tokentab): added "mktime" to list of gawk extensions.
* missing.c [HAVE_MKTIME]: added include of mktime.c if needed.
Mon Feb 26 22:32:19 1996 Arnold D. Robbins <arnold@skeeve.com>
* io.c (pidopen, useropen): added warnings to use PROCINFO[],
not special files.
* main.c (load_procinfo): new function.
* awk.y (variable): added call to load_procinfo() function.
Mon Aug 7 15:23:00 2000 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.0.6: Release tar file made.
Thu Aug 3 17:47:53 2000 Greg McGary <greg@mcgary.org>
* regex.c: patches for gcc bounded pointer handling.
Thu Aug 3 13:09:09 2000 Arnold D. Robbins <arnold@skeeve.com>
* array.c (in_array, do_delete): fix tests for index equality
when searching through the array to work correctly when
index is "".
Fri Jul 14 21:40:17 2000 Pat Rankin <rankin@eql.caltech.edu>
* builtin.c (format_tree): Workaround a DEC C V5.7 bug by
splitting `strcpy() + 3' into two expressions (the builtin
inline strcpy evidently has erroneous return type of void *
instead of char *; reputedly fixed in V6.1).
* eval.c (C): New macro.
[casetable]: Use it to add explicit casts for the character
values outside the range of 0 to 127.
* missing/strncasecmp.c [C, charmap]: Likewise.
* io.c (redirect): Add EIO check on failed open for VMS.
Fri Jul 14 11:57:23 2000 Arnold D. Robbins <arnold@skeeve.com>
Efficiency hack: turn `for (iggy in foo) delete foo[iggy]'
into moral equivalent of `delete foo'.
* array.c (do_delete_loop): new routine.
* awk.h [NODETYPE]: new Node_K_delete_loop value.
Add declaration of do_delete_loop.
* awk.y [LEX_FOR]: Fix code to recognize special case.
* eval.c (nodetypes): new entry for Node_K_delete_loop.
(interpret): add case for Node_K_delete_loop, add more
diagnostic info in default (cant_happen) case.
Tue Jul 11 22:15:10 2000 Pat Rankin <rankin@eql.caltech.edu>
* awk.y (nextc): Recast unsigned char values back to int to
prevent VAX C from truncating EOF to 255.
Tue Jul 11 14:08:23 2000 Arnold D. Robbins <arnold@skeeve.com>
* array.c (do_delete): switch to string comparison, not
cmp_nodes.
(assoc_find): add call to force_string on subscript.
* eval.c (interpret): Case Node_K_arrayfor: check for
Node_array_ref and fetch original_array. Yowser.
Fri Jun 30 21:57:00 2000 Arnold D. Robbins <arnold@skeeve.com>
* array.c (assoc_lookup): Don't force the subscript
to be a string. Not a good idea after the change
to using dupnode.
Sun Jun 25 15:08:19 2000 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.0.5: Release tar file made.
Wed Jun 14 13:03:45 2000 Arnold D. Robbins <arnold@skeeve.com>
* field.c (set_record): manage a private buffer for $0.
Keeps things safe in case `getline var' rearranges the
IOBUF's contents that $0 is still pointing into.
Tue Jun 13 16:27:55 2000 Paul Eggert <eggert@twinsun.com>
Upgrade to latest and greatest version of largefile code.
* configure.in (AC_CANONICAL_HOST): Remove.
(GAWK_AC_SYS_LARGEFILE): Defer until after AC_MINIX,
to avoid autoconf warnings.
Rewrite largefile configuration so that we don't need to run
getconf and don't need AC_CANONICAL_HOST.
* config.guess, config.sub: Remove these files.
* Makefile.in (MISC): Remove config.guess, config.sub.
* m4/largefile.m4 (GAWK_AC_SYS_LARGEFILE_FLAGS,
GAWK_AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
(GAWK_AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
(GAWK_AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
All uses changed.
Instead of inspecting the output of getconf, try to compile the
test program without and with the macro definition.
(GAWK_AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
for getconf. Instead, check for the needed flags by compiling
test programs.
(GAWK_AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be 500 to
work around glibc 2.1.3 bug.
(GAWK_AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on IRIX if the
installer said otherwise.
(GAWK_AC_SYS_LARGEFILE_FLAGS): Work around a bug in the QNX shell,
which doesn't propagate exit status of failed commands inside
shell assignments.
Wed Jun 7 13:23:09 2000 Arnold D. Robbins <arnold@skeeve.com>
* Updated copyright dates in appropriate files.
Mon May 22 17:29:43 2000 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.in (clean): get `*/core' too.
Sun May 7 16:33:05 2000 Arnold D. Robbins <arnold@skeeve.com>
* array.c (concat_exp): Change ref to `lnode->stlen' and
`lnode->stptr' for SUBSEP to use `var_value->...'.
Tue May 2 09:54:29 2000 Arnold D. Robbins <arnold@skeeve.com>
Fix referencing freed memory as shown by test/arynocls.* tests.
* awk.h [Node_array_ref]: new node type.
[orig_array]: new macro element in NODE structure.
* field.c (do_split): handle case for Node_array_ref, fetch
the original array.
* array.c (in_array, do_delete): ditto.
* eval.c (nodetypes[]): add Node_array_ref string.
(r_tree_eval): handle case for Node_array_ref.
(push_args): push arrays as Node_array_ref, and pass them on.
(pop_fcall): don't unref lnode if it's an array when releasing
local arguments. Check for both Node_array and Node_array_ref.
(r_get_lhs): choke on Node_array_ref as for Node_array.
For Node_subscript, handle Node_array_ref.
Tue May 2 09:52:12 2000 Bruno Haible <haible@clisp.cons.org>
* io.c (redirect): After reopening a `struct redirect', move it to
the head of the list.
Sun Apr 2 17:51:40 2000 Arnold D. Robbins <arnold@skeeve.com>
* re.c (re_update): Check if IGNORECASE has changed, and
if so recompute the re. See test/igncdym.awk.
Mon Mar 20 16:18:34 2000 Arnold D. Robbins <arnold@skeeve.com>
* io.c (set_RS): Added a lint warning about multicharacter RS,
per suggestion from Akim DeMaille (akim@epita.fr).
Sun Feb 13 14:40:32 2000 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (push_args): Fix from Nide Naoyuki <nide@ics.nara-wu.ac.jp>,
re-assign `f' in case tree_eval moved fcall_list around.
Sun Feb 6 11:39:33 2000 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (op_assign): Fix it right. For ++ and --, get the lhs
in the operations, do the op, and then return. For += etc,
get the rhs FIRST, since the lhs can move around as a result,
*then* get the lhs and do the operation. See test/opasnidx.awk.
Tue Feb 1 18:41:40 2000 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (op_assign): reget the rval after regetting
the left hand side. See test/opasnslf.awk for why.
Thu Jan 27 18:06:31 2000 Arnold D. Robbins <arnold@skeeve.com>
* awk.y (yylex): Made ']' not one of the characters
that sets `want_assign' to false. `a[i] /= 2' was
broken. Per bug report from Kristofer T. Karas
<ktk@ktk.bidmc.harvard.edu>.
Wed Dec 22 15:06:37 1999 Arnold D. Robbins <arnold@skeeve.com>
* awk.y: Removed declarations of functions before
definition of `tokentab[]'. They're redundant with
what's in awk.h.
Thu Dec 9 17:01:07 1999 Arnold D. Robbins <arnold@skeeve.com>
* node.c (parse_escape): Add lint warning for unrecognized
escape sequences.
Mon Dec 6 15:17:34 1999 Arnold D. Robbins <arnold@skeeve.com>
* main.c (usage): Changed bug reporting email addresses to
be a reference to `Bugs' node in the online and printed
doc, instead.
Thu Dec 2 13:08:18 1999 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_compl): test `d' for negative inside the do_lint
test, not uval. Ooops.
Fri Nov 26 10:58:36 1999 Arnold D. Robbins <arnold@skeeve.com>
* array.c (assoc_find): ALWAYS compare indexes as strings,
don't use cmp_nodes in case they are numeric. Oh my.
Talk about a Day 1 bug!
Tue Nov 23 11:58:53 1999 Arnold D. Robbins <arnold@skeeve.com>
* regex.c (SYNTAX): cast argument to `unsigned char' instead of
&-ing with 0xFF. Hopefully somewhat more portable, ala 21 Nov 99
changes to awk.y.
Sun Nov 21 22:25:27 1999 Paul Eggert <eggert@twinsun.com>
* aclocal.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
problem with the QNX 4.25 shell, which doesn't propagate exit
status of failed commands inside shell assignments.
Sun Nov 21 20:33:35 1999 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (nextc): remove declaration, don't need it here.
awk.y (nextc): Cast values to unsigned char so that latin-1
characters in strings don't turn themselves into EOF.
Most notably y-umlaut, which is decimal 255.
Mon Nov 1 20:00:25 1999 Arnold D. Robbins <arnold@skeeve.com>
* regex.c (init_syntax_once): move below definition of
ISALNUM etc., then use ISALNUM to init the table, so that
the word ops will work if i18n'ed.
(SYNTAX): And subscript with 0xFF for Latin-1 characters.
Mon Oct 25 18:37:13 1999 Arnold D. Robbins <arnold@skeeve.com>
* awk.h, main.c, io.c: undo previous changes (22 Oct 1999).
* main.c (main): move call to `init_fields()' to before
arg parsing. This allows `-v NF=blah' to work ok.
Fri Oct 22 17:43:40 1999 Arnold D. Robbins <arnold@skeeve.com>
* main.c (arg_assign): Add new arg, `initing' for icky special
casing of -v of special variables. Use it to check for NF.
May need to add other cases later.
(pre_assign): change call arg_assign, passing initing=TRUE;
io.c (nextfile): change call arg_assign, passing initing=FALSE;
awk.h: Change prototype for arg_assign.
Tue Oct 19 16:06:48 1999 Paul Eggert <eggert@twinsun.com>
* io.c (close_redir): Don't munge errno between setting it and
using it.
Wed Oct 6 17:47:47 1999 Arnold D. Robbins <arnold@skeeve.com>
* main.c (arg_assign): return NULL on bad variable. Allows
things like `./3x=stuff' to work as a filename.
Thu Sep 23 21:35:46 1999 Paul Eggert <eggert@twinsun.com>
* aclocal.m4 (GAWK_AC_SYS_LARGEFILE_FLAGS): Work around GCC
2.95.1 bug in HP-UX 10.20 or later. (Had to fix the fix. ADR. :-)
Tue Sep 21 13:31:36 1999 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_tree): For '0', only set zero_flag if we
haven't seen the field width or precision yet.
Mon Aug 9 13:06:01 1999 Arnold D. Robbins <arnold@skeeve.com>
* array.c (assoc_lookup): Removed code that gave each array
a private copy of each index. Balloons memory usage for
no good reason that I can see. Just use dupnode in all
cases.
* configure.in: check for $srcdir/.developing adds extra
defines for my testing/debugging use. Yes, hack alert.
Sun Aug 1 11:02:02 1999 Arnold D. Robbins <arnold@skeeve.com>
* node.c (dupnode): turn off FIELD when copying nodes.
* array.c (do_adump, assoc_dump): new functions for array debugging.
* awk.y (tokentab): conditionally add "adump" function for debugging.
* awk.h: delcare new functions.
Thu Jul 29 23:26:40 1999 Arnold D. Robbins <arnold@skeeve.com>
From wsanchez@apple.com:
* Makefile.in (install-strip): new target, coding stds. compatibility.
* config.guess, config.sub: Add MacOS X recognition.
Thu Jul 29 19:09:19 1999 Arnold D. Robbins <arnold@skeeve.com>
* awk.y (func_install): make `function foo(foo)' a fatal error.
eval.c (r_tree_eval): diagnose use of a function name as a
variable inside the function.
Sun Jul 4 16:53:14 1999 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (eval_condition): add extra braces to avoid
gcc warning. I'm not going to bother for the library
code like dfa and regex.
Wed Jun 30 16:14:36 1999 Arnold D. Robbins <arnold@gnu.org>
* Release 3.0.4: Release tar file made. This time for sure.
Wed Jun 30 16:10:11 1999 Arnold D. Robbins <arnold@gnu.org>
* awk.h: add include of <assert.h>, and comment about config.h
having to be included before any system headers. Otherwise,
with egcs-2.91.66 and later on Linux systems, and possibly
others, things break badly, due to the LFS macros.
* awk.y, builtin.c, eval.c, field.c, io.c: removed include
of assert.h
Wed Jun 9 11:39:19 1999 Paul Eggert <eggert@twinsun.com>
Port the large-file code to AIX, HP-UX, and IRIX.
Add cross-compilation support for large files.
* config.guess, config.sub: New files.
* configure.in (AC_CANONICAL_HOST):
Add; GAWK_AC_SYS_LARGEFILE needs this.
(GAWK_AC_SYS_LARGEFILE): Renamed from GAWK_AC_LARGE_FILES.
* aclocal.m4 (GAWK_AC_SYS_LARGEFILE): Renamed from GAWK_AC_LARGE_FILES.
Add support for AIX and HP-UX.
(GAWK_AC_SYS_LARGEFILE_FLAGS, GAWK_AC_SYS_LARGEFILE_SPACE_APPEND,
GAWK_AC_SYS_LARGEFILE_MACRO_VALUE): New macros.
* acconfig.h (_FILE_OFFSET_BITS, _LARGEFILE_SOURCE, _LARGE_FILES):
New macros.
* Makefile.in (MISC): add config.guess and config.sub so they get
included in the distribution.
Wed Jun 9 11:29:29 1999 Paul Eggert <eggert@twinsun.com>
* io.c (iop_alloc): Don't mmap files whose sizes don't fit in `int'.
[ This isn't really needed, as HAVE_MMAP is #undef'ed at the top,
but it's there in case people want to take their life in their hands. ]
Sun Jun 6 11:28:07 1999 Arnold D. Robbins <arnold@gnu.org>
* BETA Release 3.0.46: Release tar file made.
Wed Jun 2 14:36:24 1999 Arnold D. Robbins <arnold@gnu.org>
* PORTS: Updated with a more recent list of systems
that gawk compiles and tests ok on.
Tue Jun 1 14:24:59 1999 Arnold D. Robbins <arnold@gnu.org>
* BETA Release 3.0.45: Release tar file made.
Tue May 25 16:32:37 1999 Arnold D. Robbins <arnold@gnu.org>
* builtin.c (format_tree): more smarts for weird cases, such as
zero precisions and zero values used with the `#' flag.
Thanks to Andreas Schwab (schwab@gnu.org) for pointing these out.
Wed May 19 14:02:54 1999 Arnold D. Robbins <arnold@gnu.org>
* io.c (do_close): move test for `close(FILENAME)' to after
loop through all open redirections. Fixes problems in obscure
cases with redirections in END rules.
Sun May 16 14:08:39 1999 Arnold D. Robbins <arnold@gnu.org>
* awk.y (yylex): fix group of characters including ',' to
set want_assign = FALSE. Fixes bizarre parsing problems in
function call lists, for example.
* io.c (get_a_record): repair logic for single-leading-newline
case.
Tue May 11 16:48:11 1999 Arnold D. Robbins <arnold@gnu.org>
* aclocal.m4 (GAWK_AC_AIX_TWEAK): new macro.
* configure.in: call it
* Makefile.in: (awklib/all): pass CFLAGS on to sub-make so
that password programs will get AIX magic defines. Avoids
having to tweak program code for those in doc/gawk.texi.
Mon May 3 16:56:23 1999 Arnold D. Robbins <arnold@gnu.org>
* array.c (do_delete): don't free_temp(subs) until after all
references to it are finished.
Mon May 3 13:41:16 1999 Arnold D. Robbins <arnold@gnu.org>
* BETA Release 3.0.44: Release tar file made.
Sun May 2 18:25:43 1999 Arnold D. Robbins <arnold@gnu.org>
* io.c (get_a_record): Do a really good job of stripping newlines
from the front of records when RS = "" and there's only one
newline at the front of the file, which the regex didn't catch.
Wed Apr 28 12:27:49 1999 Arnold D. Robbins <arnold@gnu.org>
* configure.in: more HP stuff: fix the manual alloca code so that
gawk will compile and link on HP systems. See the comments.
Sun Apr 25 13:39:16 1999 Arnold D. Robbins <arnold@gnu.org>
* Makefile.in (gawk): add $(CFLAGS) to linking step.
* configure.in: correctly do AC_FUNC_GETPGRP on HP systems too.
Tue Apr 13 20:21:00 1999 Arnold D. Robbins <arnold@gnu.org>
* BETA Release 3.0.43: Release tar file made.
Tue Apr 13 19:02:20 1999 Arnold D. Robbins <arnold@gnu.org>
* io.c (useropen, pidopen): add casts to int on arguments to
silence gcc warnings.
* regex.c (regcomp,regexec,regfree): add ifdef for APPLE.
Thu Feb 4 10:38:02 1999 Arnold D. Robbins <arnold@gnu.org>
* custom.h: hacks for BeOS. Not documented in the manual right now.
* configure.in: hacks for BeOS. Check for HP-UX and define C_ALLOCA
if not using gcc. I wish they'd just fix bison already.
Sun Dec 20 16:57:38 1998 Arnold D. Robbins <arnold@gnu.org>
* BETA Release 3.0.42: Release tar file made.
Sun Nov 15 21:05:39 1998 Arnold D. Robbins <arnold@gnu.org>
* io.c (gawk_popen): Add WIN32 to list of systems that use
the non-real-pipe version. From the PC gawk guys.
Wed Nov 4 11:32:24 1998 Arnold D. Robbins <arnold@gnu.org>
* BETA Release 3.0.41: Release tar file made.
Tue Nov 3 16:24:35 1998 Arnold D. Robbins <arnold@gnu.org>
* eval.c (r_get_lhs): Fix the cases for the special variables,
don't unref their current value if it's the same as the internal
copy; perhaps the current one is used in a concatenation or some
other expression somewhere higher up in the call chain. Ouch.
See test/getnr2tm.awk.
Sun Nov 1 15:24:52 1998 Arnold D. Robbins <arnold@gnu.org>
* builtin.c (format_tree): improve handling of zero-fill
when a precision is present. See test/zeroflag.awk.
Wed Oct 28 20:40:17 1998 Arnold D. Robbins <arnold@gnu.org>
* eval.c (r_tree_eval): Case for Node_concat. Get lengths
separately, in case one expression has a side effect that
that changes another. Ugly, but it keeps gawk from core
dumping. See test/nasty.awk.
Sun Oct 18 21:27:24 1998 Arnold D. Robbins <arnold@gnu.org>
* awk.y (append_right): bug fix, if `list' or `new' are NULL,
return `list', so that things don't break too badly.
* regex.c (re_compile_fastmap): remove unused variable `num_regs'.
Thu Oct 8 19:36:57 1998 Arnold D. Robbins <arnold@gnu.org>
* BETA Release 3.0.40: Release tar file made.
Mon Jul 27 10:14:33 1998 Arnold D. Robbins <arnold@gnu.org>
* node.c (parse_escape): Remove assignment with side effects
from ISXDIGIT test. Thanks to "Mihai T. LAZARESCU"
<mihai@ccmserv.polito.it> for pointing this out.
Mon Apr 27 11:31:32 1998 Arnold D. Robbins <arnold@gnu.org>
* main.c (usage): fix the email address for the bug list.
(copyleft): update the copyright year.
Mon Mar 23 21:22:32 1998 Arnold D. Robbins <arnold@gnu.org>
* eval.c (r_get_lhs): make sure that values of type
Node_param_list don't have the FUNC flag set. This means
we don't allow the use of a function name as a variable or
array from within the function.
Sun Mar 22 19:12:32 1998 Paul Eggert <eggert@twinsun.com>
* aclocal.m4 (GAWK_AC_LARGE_FILES): new macro that checks for
large file support, and updates CPPFLAGS, LDFLAGS, LIBS as
needed.
* configure.in: call GAWK_AC_LARGE_FILES.
* Makefile.in (CPPFLAGS, LDFLAGS): Let autoconf configure.
(COMPFLAGS): Add $(CPPFLAGS).
Mon Mar 16 14:06:41 1998 Arnold D. Robbins <arnold@gnu.org>
* field.c (using_FIELDWIDTHS): new macro.
(using_fieldwidths): use new macro.
(do_split): in case for FS_DFLT, also check that
we're not using FIELDWIDTHS. Otherwise, split() would use
FIELDWIDTHS, not current value of FS. Oops.
Sun Nov 16 20:08:59 1997 Arnold D. Robbins <arnold@gnu.org>
* builtin.c (sub_common): fix for count of matches in gsub
from Geert.Debyser@esat.kuleuven.ac.be.
Wed Oct 15 03:38:12 1997 Arnold D. Robbins <arnold@gnu.org>
* field.c (set_FS): Use `sc_parsefield' if the value of FS is not
alphabetic OR if not ignoring case. Bug fix if IGNORECASE
is true and FS happens to be '^'. Sheesh, talk about obscure.
(rebuild_record): Add more smarts to the code that sets up the
fields. Thanks to Alan J. Broder (ajb@dtmr.com).
Sun Oct 5 11:56:52 1997 Arnold D. Robbins <arnold@gnu.org>
* configure.in: if ISC add -D_SYSV3 to CFLAGS, per email from
Mario Vanoni (vanonim@dial.eunet.ch).
Fri Sep 26 00:57:49 1997 Arnold D. Robbins <arnold@gnu.org>
* awk.y (append_right): return if either list is NULL. Prevents
syntax errors from causing core dumps.
Wed Sep 17 15:34:15 1997 Arnold D. Robbins <arnold@gnu.org>
* field.c (rebuild_record): set things up so that all fields point
into the new record and release any changed fields without
causing memory leaks. Avoids problems when fields are extended
with the value of $0 or other fields and then $0 is assigned to.
Mon Sep 15 16:12:55 1997 Arnold D. Robbins <arnold@gnu.org>
* builtin.c (do_print): when testing for NUMBER, make sure
it's not a string too. Thanks to Michael Brennan for
clarifying the semantics.
Sun Sep 14 19:55:12 1997 Arnold D. Robbins <arnold@gnu.org>
* node.c (format_val): always format values ourselves: avoids
problems if OFMT is bizarre, like %s.
Sun Sep 14 00:08:53 1997 Arnold D. Robbins <arnold@gnu.org>
* io.c (get_a_record): replace all occurrences of the test
`grRS == FALSE' with `RS_is_null' which makes ` RS = "\0" '
actually work, is clearer code, and actually makes use of
the `RS_is_null' variable!
Sun Aug 17 07:15:12 1997 Arnold D. Robbins <arnold@gnu.org>
* field.c (set_FS): Change logic to always set parse_field, even
if FS hasn't changed. Thanks to Igor Sheyn for catching this.
Wed Aug 6 21:04:37 1997 Arnold D. Robbins <arnold@gnu.org>
* io.c (VMS et al gawk_popen): use pclose, not fclose, if
iop_alloc fails.
Wed Jul 30 19:53:52 1997 Arnold D. Robbins <arnold@gnu.org>
* awk.y [variable]: fix case for subscript if $3 == NULL.
Sun Jul 27 22:47:30 1997 Arnold D. Robbins <arnold@gnu.org>
* awk.y (get_src_buf): don't close file if it's stdin.
Sun Jul 27 22:47:15 1997 Pat Rankin <rankin@eql.caltech.edu>
* io.c (#if VMS: vmsrtl_fileno): new routine.
(#if VMS: fileno): new macro substituted for stdio one.
Thu Jul 17 20:05:59 1997 Arnold D. Robbins <arnold@gnu.org>
* builtin.c (do_print): When OFMT != CONVFMT, create a new
temporary node with just the numeric value valid and format it,
and use that for printing. Avoids memory corruption.
Wed Jul 16 10:01:16 1997 Arnold D. Robbins <arnold@gnu.org>
* regex.c: When SYNTAX_TABLE is defined, but not emacs, then
CHAR_SET_SIZE is not defined, though used in regcomp. It should
be taken out of #ifdef SYNTAX_TABLE. Fix from bug group, from
Akim Demaille, demaille@inf.enst.fr.
* awk.h (isnondecimal): make test a little smarter.
builtin.c (nondec2awknum): add bailout for decimal numbers, e.g.
`00.1'. Fix from Larry Schwimmer <rosebud@cyclone.Stanford.EDU>.
Thu Jun 19 19:00:40 1997 Arnold D. Robbins <arnold@gnu.org>
* eval.c (interpret): case Node_K_next, Node_K_nextfile: fatal
error if called from BEGIN or END.
(Fixed completely Mon May 3 13:31:42 1999.)
Mon Jun 9 22:40:04 1997 Arnold D. Robbins <arnold@gnu.org>
* builtin.c (nondec2awknum): Allow `f' and `F' in hexadecimal numbers.
Gotta get more sleep...
* array.c (assoc_lookup): Fix from Tom Karzes (karzes@equator.com)
for memory leak when forcing type to Node_var_array.
Thu May 15 12:49:08 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Release 3.0.3: Release tar file made.
Wed May 14 08:06:08 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (do_close): add lint warning if closing something that
isn't open.
Tue May 13 12:14:12 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* random.c, builtin.c: remove __GLIBC__ tests, since it breaks
`make test'. I prefer consistency across platforms.
* Makefile.in (gawk): undid April 25 changes and added comment.
Putting COMPLAGS in breaks with -g on VMS POSIX.
Sun May 11 14:48:04 1997 Darrell Hankerson <hankedr@mail.auburn.edu>
* io.c [MSC_VER]: add cases for WIN32.
* regex.c [MSC_VER]: add cases for WIN32.
Sun May 11 07:04:01 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (do_print): in the loop that evaluates each expression
to be printed, do a dupnode to avoid bizarre output. Thanks to
Michal for finding this problem.
* awk.y (yylex): fix scanning of hexadecimal constants.
Wed May 7 15:09:25 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (get_a_record): fix casetable indexing with cast to int.
Keeps Michal happy.
Tue May 6 16:40:19 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* eval.c (func_call): removed unneeded variables.
Mon May 5 21:17:37 1997 Pat Rankin <rankin@eql.caltech.edu>
* missing/strftime.c [case 'v', VMS_EXT]: for VMS date format, two
digit day of month should not be zero padded on the 1st through
the 9th.
Mon May 5 06:33:47 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* regex.h, regex.c: merge with current GLIBC version.
Mon May 5 06:33:47 1997 Pat Rankin <rankin@eql.caltech.edu>
* io.c (nextfile): move the check for null return from iop_open
in the normal case and add one for the "no args" case.
Fri Apr 25 16:52:33 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* array.c (grow_table): add a bunch more large primes so arrays
can get really big. Thanks to christos@deshaw.com.
* all files: remove ifdef'ed out code and update copyrights.
* Makefile.in (gawk): add $(COMPFLAGS) to command line.
* eval.c (flags2str): added case for FIELD.
Thu Apr 24 22:39:23 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* COPYING: changed to current official version from FSF.
* regex.c: merge with GLIBC version.
* awk.h [_GNU_SOURCE]: bracket definition inside ifdef.
(NODE.source_line): move name member out of `x' union and
into `nodep'; avoids problems doing diagnostics.
(nondec2num): put decl into #if BITOPS || NONDECDATA
* posix/gawkmisc.c, missing/system.c, missing/strtod.c,
missing/strerror.c: move to generic GPL statement at top.
* builtin.c (nondec2num): put into #if BITOPS || NONDECDATA
Wed Apr 23 22:14:14 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* dfa.c: misc changes for really pedantic SGI compilers.
* builtin.c: bracket defs of random() etc for GLIBC.
* random.c: bracket whole file for GLIBC.
* configure.in: extra goop for GETPGRP test for VMS POSIX.
* custom.h [VMS]: remove hard definition of GETPGRP_VOID.
Fri Apr 18 07:55:47 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* BETA Release 3.0.34: Release tar file made.
Tue Apr 15 21:35:45 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
NEW UNDOCUMENTED FEATURE. USE THE SOURCE LUKE!
* acconfig.h [NONDECDATA]: new macro.
* awk.h: add decl of do_strtonum.
* awk.y (tokentab): add entry for strtonum function.
* builtin.c (do_strtonum): new function.
* configure.in (non-decimal-data): new --enable-* option.
* node.c (r_force_number): change to allow non-decimal data inside
ifdef NONDECDATA.
Tue Apr 15 06:32:50 1997 Pat Rankin <rankin@eql.caltech.edu>
* missing/strftime.c (malloc, realloc, getenv, strchr): only
declare these when STDC_HEADERS is not defined.
<stdlib.h, string.h>: include these when STDC_HEADERS is defined.
* awk.h (freenode, tree_eval, m_tree_eval): reorganize definitions.
* alloca.c (malloc): if malloc is already defined as a macro,
presumeably by config.h, don't define or declare it.
Wed Apr 9 22:45:27 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in [COMPFLAGS]: per suggestion from Karl Berry, put
$(CFLAGS) last.
Tue Apr 8 23:54:46 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* eval.c (interpret): For Node_K_break and Node_K_continue, if
treating them like `next', also check the function call stack
and pop it if necessary.
Mon Apr 7 18:22:37 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.h: Add decls of new routines do_compl() and set_loc().
* awk.y (tokentab): add entry for "compl" function.
* builtin.c (do_compl): new function to do ones complement.
(do_substr): rationalized yet again, now notices negative start
and length parameters.
* eval.c (push_args): fix if call_list gets realloc'ed in the
middle of things. Avoids crash for deeply nested function calls.
* main.c (catch_sig): add call to set_loc().
* msg.c (set_loc, srcfile, srcline): new function and private
variables to help out in tracing down source of error messages.
Fri Mar 28 08:42:27 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (iop_alloc, iop_close): Undo changes of Feb 11, apparently
other cleanups in io.c made mmap stuff start working again.
BAH! It's a mess, the test suite still fails. I'm leaving the
mmap stuff undefined for now. It'll probably get ripped out in 3.1.
Thu Mar 27 08:48:57 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* custom.h [_SEQUENT_]: undef HAVE_MMAP.
Wed Mar 26 09:08:16 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (iop_alloc): fix definition to make it static.
Mon Mar 24 23:09:07 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* field.c (init_fields, etc..): more clean up use of Null_field
and the various flags.
* node.c (unref): if a field, free the node itself. Fixes
memory leak problems.
Sun Mar 23 22:51:09 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.h [FIELD]: new flag for node->flags field.
* builtin.c (sub_common): if FIELD is set, dup the string.
* field.c (init_fields): set up a new Null_field global var.
(init_fields, set_field, set_record) use the FIELD flag.
(getfield): use Null_field instead of private variable.
* io.c (wait_any): comment out calls to pclose and iop_close,
caused weird race conditions. See test/pipeio1.awk. Thanks
to Darrell Hankerson for tracing this one down.
Tue Mar 18 20:57:18 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* dfa.c (inboth): free templist; plugs memory leak.
* field.c (init_fields, grow_fields_arr, set_field, rebuild_record,
set_record): remove PERM flag from entries in fields_arr[]. Fixes
nasty memory leak.
Tue Mar 18 06:33:00 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.y (dup_parms): robustified against parameter errors.
Sun Mar 16 21:31:40 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
NEW UNDOCUMENTED FEATURE. USE THE SOURCE LUKE!
* acconfig.h [BITOPS]: new macro. If set, do octal & hex and bit ops.
* awk.h [isnondecimal]: new macro, and decl of new functions.
* awk.y (yylex): add recognition of octal and hex constants.
* builtin.c (do_and, do_or, do_xor, do_lshift, do_rshift): new
functions that do bit operations.
(nondec2awknum): new function to convert octal or hex to double.
* configure.in: Add AC_ARG_ENABLE for bit operations.
* node.c (r_force_number): add octal and hex conversion.
Sun Mar 16 21:28:56 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.h [IOP_NOFREE_OBJ]: new macro.
* io.c (iop_open, iop_alloc): add new third parameter, which is
either NULL, meaning allocate a new IOP, or the address of one
already allocated. Have a static one in the `nextfile'
routine, and use the IOP_NOFREE_OBJ flag for it. All of this
keeps us from reading freed memory. The `swaplns' test fails
otherwise.
(iop_close): if IOP_NOFREE_OBJ is set, don't free the IOBUF.
Wed Feb 26 06:21:02 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* eval.c (in_function, pop_fcall_stack, pop_fcall, push_args):
new functions. These manage "frames" of awk function call arguments.
The problem is that a `next' or a `nextfile' from a function
leaks memory. These changes allow us to free up that memory.
(interpret): for Node_K_next and Node_K_nextfile, check if in
a function call and free all function call frames.
Fri Feb 21 06:23:19 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Misc changes from Katsuyuki Okabe <HGC02147@niftyserve.or.jp>:
* builtin.c (do_substr): change a %d to %ld in warning message.
* eval.c (op_assign): fix format string for warning about %=.
Wed Feb 19 23:29:02 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* main.c (main): add do_intervals to condition that causes
resetup() to be called again. Makes the --re-interval option
actually work. What a concept.
Fri Feb 14 09:47:31 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c [#include "awk.h"]: undef HAVE_MMAP to just use the old code.
Something is causing a file descriptor leak, and this is getting to
be just too much hair. I reserve the right to rip out the mmap
code entirely at a future date.
Tue Feb 11 06:28:29 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (iop_alloc): for an mmap'ed file, close the file descriptor,
and then touch each page to get a private copy. Fixes nasty case
of truncating our input file.
(iop_close): don't call close on mmap'ed file.
Wed Feb 5 17:59:04 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* eval.c (interpret): For Node_K_delete, just call do_delete; let
it handle the case of `delete array'.
* array.c (do_delete): Changed to handle case of `delete array',
and made smarter if the array is actually an uninitialized
parameter.
Sun Jan 26 22:58:29 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* getopt.h, getopt.c, getopt1.c: replaced with new versions from
GLIBC 2.
Sun Jan 19 23:37:03 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* eval.c (nodetype2str): not static, for debugging.
(flags2str) new function: for debugging.
* field.c (get_field): add new var that is like Nnull_string but
does not have numeric attributes, so that new fields are strings.
(set_record): turn off PERM flag before unrefing fields and field 0.
* array.c (in_array): always evaluate subscript, could have
side effects.
* builtin.c (do_strftime): way increase size of buffer to make sure
we don't have overflow problem. Keeps Paul Eggert happy.
* custom.h [__amigaos__]: define fork to vfork. From Fred Fish.
* dfa.c: move include of config.h to top, for RSXNT. From Kai
Uwe Rommel.
(ISALPHA, etc): change from Jacob Engelbrecht (jaen@novo.dk)
to better handle non-ascii environments.
* gawkmisc.c: remove amigados case, posix should now work fine.
* amiga/*: nuked per previous entry.
* Makefile.in: removed all references to amiga
* io.c [HAVE_SYS_PARAM_H]: Add #undef RE_DUP_MAX to avoid
spurious conflict with regex.h.
(flush_io): remove amiga ifdefs, not needed anymore.
(spec_setup): set getrec field for special files. Fix from
Mark Gray (markgray@pdt.net).
* node.c (more_nodes): fix to get the last entry in the array.
Wed Jan 8 17:42:37 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io.c (mmap_get_record): Fix return value if file ends without
record separator.
Fri Jan 3 19:57:16 1997 Pat Rankin <rankin@eql.caltech.edu>
* awk.y (get_src_buf): Test for an empty source file by detecting
an initial read of 0 bytes rather than by relying on info from
stat().
Wed Dec 25 11:25:22 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Release 3.0.2: Release tar file made.
Wed Dec 25 11:17:32 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in (install, uninstall): use $(srcdir)/patchlevel.h.
Thanks to Richard Levitte, LeViMS@stacken.kth.se.
(install): remove chmod command; let $(INSTALL_PROGRAM) use -m.
Mon Dec 23 20:36:59 1996 Pat Rankin <rankin@eql.caltech.edu>
* custom.h (#if VMS_POSIX): Define GETPGRP_VOID.
Fri Dec 20 08:59:55 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* getopt.c, getopt1.c: comment out the `#if defined (_LIBC) ||
!defined (__GNU_LIBRARY__)' and `#endif' to force use of this
getopt, even on systems like linux. This will be handled
better in 3.1 / glibc 2.
Thu Dec 19 22:52:39 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.y (yylex): In several places, after yyerror(), add call to
exit(). Otherwise, infinite messages. This should probably
be handled better.
Wed Dec 18 22:42:10 1996 Darrel Hankerson <hankedr@mail.auburn.edu>
* getopt.c (_getopt_internal): if 'W' and ';', if optind == argc,
return c, don't fall through.
Wed Dec 18 10:09:44 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* configure.in [AC_PREREQ]: Update to 2.12 in order to switch to
autoconf 2.12. Lots of other files will be rebuilt automatically.
[AM_SANITY_CHECK_CC]: Removed, autoconf does it now.
* aclocal.m4 [AM_SANITY_CHECK_CC]: Removed, autoconf does it now.
Tue Dec 17 22:23:16 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (do_strftime): fix case if format string is "".
Also fix it if format is not "" but result of strftime is "".
See comments in code.
Tue Dec 10 23:09:26 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Release 3.0.1: Release tar file made.
Tue Dec 10 22:39:41 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in (dist): add dependency on `info'. Remove line that
does makeinfo.
(install): use $(LN) not $(LN_S) to link gawk gawk-version.
Sun Dec 8 07:53:44 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in (gawk): took COMPFLAGS out of link line for help
on VMS posix. Shouldn't (I hope) affect anything else.
Thu Nov 28 11:52:24 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* configure.in (AC_PROG_INSTALL): Set INSTALL to install-sh.
Tue Nov 26 22:42:00 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* PORTS: Updated list of systems.
* Makefile.in (install): Fix some typos and add some improvements
for Ultrix.
Sun Nov 24 22:16:26 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (do_printf): if no args, fatal error. Return silently
if --traditional.
Thu Nov 7 20:54:43 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (inrec): make sure EOF hasn't already happened before
trying to read; prevents accessing freed buffer. Thanks to
Michal Jaegermann.
* Makefile.in [AWKSRC]: add random.h.
random.h: new file, redefines names of the `random' functions.
random.c, builtin.c: add include of random.h.
Thu Nov 7 09:06:21 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.y (snode): undo 4 Oct change, put do_split code back.
field.c (do_split): restore old code; add test for CONST, so
that re_parse_field is used if third arg to split is a regexp
constant.
Mon Nov 4 12:57:11 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* main.c (main): Research -m[fr] options don't need literal '='
characters. Brian's documentation was confusing. Fixed, not
that anyone actually uses these options with gawk.
Sun Nov 3 11:23:21 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* field.c (def_parse_field): add \n to list of acceptable white space.
(posix_def_parse_field): new routine, just like def_parse_field(),
but only allows space and tab as separators.
(do_split, set_FS): make appropriate choice between the two
*def_parse_field() routines.
Fri Oct 25 10:13:06 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* configure.in: remove test for random.
* Makefile.in: add random.c to list of files always compiled.
* missing.c: remove HAVE_RANDOM test.
* builtin.c: remove ifdef's for HAVE_RANDOM.
[GAWK_RAND_MAX]: use constant we know works with our random().
* random.c: new file - moved from missing/ directory.
Wed Oct 23 19:46:01 1996 Pat Rankin <rankin@eql.caltech.edu>
* builtin.c (do_tolower, do_toupper): Add `unsigned char *' casts.
Tue Oct 22 21:27:52 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c [GAWK_RANDOM_MAX]: Try to make definition a bit
smarter; don't use RAND_MAX if it's equal to SHRT_MAX, blows
things up.
Tue Oct 22 08:49:20 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* main.c (copyleft): update copyright date to 1996.
too many files to list: update copyright date to 1996.
Sun Oct 20 12:21:09 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.y, dfa.c, eval.c, io.c, re.c: added various FIXME comments.
Sat Oct 19 22:06:42 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* eval.c (nodetype2str): make static, add prototype.
* field.c (sc_parse_field): cast array subscripts to int to
shut up gcc warnings.
* gawkmisc.c: add prototype for xmalloc.
* awk.h: add prototype for getredirect.
* builtin.c (do_fflush): remove extern decl of getredirect.
* io.c (get_a_record, mmap_get_record): change decl of rs to int,
to shut up gcc warnings.
* awk.y (isassignable): add a default to switch to quiet gcc.
* getopt.c (_getopt_internal): give default value to `indfound'.
Fri Oct 18 09:00:49 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* regex.h [RE_SYNTAX_AWK]: add RE_CONTEXT_INDEP_ANCHORS.
Thu Oct 17 22:32:55 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* aclocal.m4 [AM_SANITY_CHECK_CC]: added.
* configure.in: use it.
Thu Oct 17 21:43:25 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* configure.in: add checks for locale.h and setlocale().
awk.h: include locale.h and define out setlocale() if not available.
main.c (main): call setlocale().
builtin.c (do_tolower, do_toupper): use unsigned char pointers,
to get other charsets right in different locales.
Wed Oct 16 21:32:53 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (format_tree): Change initial buffer size to 512
and use a constant. Allows large values of %f per bug report
from sheyn@cs.bu.edu.
Wed Oct 16 21:22:08 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in [MISC]: removed TAGS and tags
(local-distclean): added TAGS and tags
(maintainer-clean): removed TAGS and tags
Wed Oct 16 12:28:43 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* main.c (version): Add call to copyleft(), per new standards.
version.c: Fix text of version string to match new standards.
Sun Oct 6 22:19:45 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* regex.c: updated to Emacs 19.34b base.
Sun Oct 6 21:57:34 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* re.c (make_regexp): fixed to handle \8 and \9 in the middle
of a regexp.
Fri Oct 4 10:26:16 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.y (snode): remove case for do_split; always making the
third arg a Node_regex is wrong.
field.c (do_split): rationalized to distinguish `/ /' from `" "'.
Generally fixed up.
* node.c (parse_escape): Allow single digit \x escapes.
1996-10-02 Paul Eggert <eggert@twinsun.com>
* builtin.c (format_tree):
Fix bug in %d and %i format: NaNs, and values
in the range LONG_MAX+1 .. ULONG_MAX, were mishandled.
Don't assume that double values <= -1 are converted to unsigned
long in the expected way; the C Standard doesn't guarantee this.
1996-10-02 Paul Eggert <eggert@twinsun.com>
* awk.h (INT_MAX): Remove unused symbol.
Mon Sep 30 22:19:11 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* getopt.c (_getopt_internal): If 'W' is in the optstring followed
by a ';' then search through the long opts table. This makes
`-W foo=bar' same as `--foo=bar'.
* main.c (main): 'W' now prints an error message.
(gawk_option): deleted the routine.
Sun Sep 29 23:04:54 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (sub_common): fix several bugs with gsub when
matching null strings. See test/gsubtest.awk.
Fri Sep 20 17:35:54 1996 Pat Rankin <rankin@eql.caltech.edu>
* alloca.c (NULL): don't define if <config.h> has already done so.
Fri Sep 20 11:54:31 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (do_print): evaluate all the expressions first and
then print them. Avoids surprising behavior. See test/prtoeval.awk
for an example.
Tue Sep 10 06:21:40 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.h [FUNC]: new flag, marks a Node_parameter_list as really
being the function name; allows more checking in awk.y.
* awk.y (isassignable): now takes a NODE * instead of a type, to
check if a function parameter is marked FUNC, then it's the function
name, which is not assignable. Fix call from snode().
(function_prologue): mark function name as FUNC.
(yyerror): don't call exit() anymore; gawk will now report
all syntax errors.
Sun Sep 1 19:36:30 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* field.c (rebuild_record): after building new field 0, go through
all old fields, and if they used to point into the old one,
have them point into the new one. Then turn off PERM flag before
unref-ing field 0.
Wed Aug 28 19:13:34 1996 Arnold D. Robbins <arnold@math.utah.edu>
* eval.c (set_IGNORECASE): Correctly parenthesize bit operations
in test and fix logic for string value.
Wed Aug 28 22:06:33 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* main.c (usage): add email addresses for bug reporting, per
change in GNU Coding Standards from RMS.
Sun Aug 11 23:13:22 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in (install): correct use of $(INSTALL_PROGRAM).
Thu Aug 8 23:29:43 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* parse.y (isassignable): new function, checks in type can
be assigned to.
(snode): changed checking for 3rd arg of gsub to be more
general, supersedes earlier change.
Thu Aug 8 13:58:26 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* parse.y (snode): If third arg to sub or gsub is builtin
function, complain, since can't substitute into result.
* eval.c (r_get_lhs): diagnose Node_builtin as an error, instead
of falling through into default case and using cant_happen().
Thu Aug 1 07:13:14 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* regex.h [RE_DEBUG]: new macro.
[RE_SYNTAX_GNU_AWK]: add RE_DEBUG.
[RE_SYNTAX_POSIX_AWK]: add RE_INTERVALS.
* regex.c (re_set_syntax): add #ifdef DEBUG code to turn on `debug'
flag if RE_DEBUG set, and turn off debug if not set and debug
was on.
* main.c (main): remove `do_intervals = TRUE' from `if (do_posix)',
it's now handled in the definition of RE_SYNTAX_POSIX_AWK.
Mon Jul 29 17:49:07 1996 Pat Rankin <rankin@eql.caltech.edu>
* io.c (O_ACCMODE): define it if <fcntl.h> doesn't.
Mon Jul 29 12:02:48 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* eval.c (set_IGNORECASE): made somewhat smarter. gawk -v IGNORECASE=0
was acting the same as -v IGNORECASE=1. Thanks to Darrell Hankerson
for the bug report.
Fri Jul 26 12:04:43 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.h (format_val): add declaration of new routine.
* node.c (format_val): new routine, abstracts old guts of
r_forcestring; accepts format string and index as additional params.
(r_force_string): changed to call format_val.
* builtin.c (do_print): don't tree_eval the tree twice in case
OFMTidx != CONVFMTidx; doing so could cause side effects
(from bug report by Tobias Rettstadt, xassp@ipds.uni-kiel.de).
Instead, call format_val.
Mon Jul 22 21:59:15 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (iop_close): change check for "is $0 in the input buffer"
to use `< (iop->buf + iop->secsiz + iop->size)' instead of
`< iop->end'. The latter is bogus if EOF has been hit on the
file. Fix from Darrel Hankerson based on bug report by
Charles Howes (howes@grid.direct.ca). See test/eofsplit.awk.
Thu Jul 18 19:43:20 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (sub_common): backed out change of Feb 14 in favor of:
(do_gensub): Changed to use make_string and then to |= TEMP
flag, based on bug report and patch from Katsuyuki Okabe,
hgc02147@niftyserve.or.jp.
Thu Jul 18 19:23:53 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* custom.h: added ifdef for QNX, based on bug report from
Michael Hunter, mphunter@qnx.com.
Mon Jul 15 09:31:01 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (redirect): When finding the rp pointer, if it's not
NULL, set str = rp->value. This gets the '\0' terminated
version. Motivated by bug report from John Hawkinson
(jhawk@bbnplanet.com).
Sun Jul 14 18:40:26 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* configure.in: added call to AC_CHECK_LIB(m, fmod), since
apparently some systems have fmod in the math library.
Portability: the Holy Grail. Sigh.
Sun Jul 14 18:08:01 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.h: add Jim Meyerings ISASCII etc hacks for ctype macros.
* builtin.c (do_toupper, do_tolower, sub_common): changed to use
upper-case versions of ctype macros.
* main.c (main): ditto.
* node.c (r_force_number, parse_escape): ditto.
Sun Jul 14 06:34:18 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* field.c (set_record): made it always do the PERM flag.
Fixes cases where $0 is assigned to, e.g. by gsub, keeps
the fields valid.
(get_field): removed the call to reset_record in
case where ! field0_valid. We want to leave the fields alone
if they've been changed.
Thu Jul 11 23:04:20 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (devopen): change tests of (flag & O_fooONLY) to
(flag & O_ACCMODE) == O_fooONLY. Per (long standing) bug
report from Chapman Flack.
(close_redir): change final conditional to just (status != 0)
so that ERRNO always set; the warning had its own `if (do_lint)'
anyway.
* eval.c (do_split): force type of array to be Node_var_array
instead of Node_var. Per (long standing) bug report from
Chapman Flack.
Thu Jul 11 22:17:14 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in (install): added symlink of gawk to awk if
no awk in $(bindir).
(LN_S): new variable for symlinking.
(uninstall): remove awk if it's the same gawk.
* Configure.in: Added call to AC_PROG_LN_S for Makefile.in.
Sun Jul 7 15:47:13 1996 Arnold D. Robbins <arnold@infographix.com>
* main.c (main): made `--posix' turn on interval expressions.
Gawk now matches its documentation. (What a concept!)
Wed Jul 3 15:02:48 1996 Arnold D. Robbins <arnold@infographix.com>
* regex.h, regex.c: upgraded to changes from Emacs 19.31.
Fri May 17 08:46:07 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (get_a_record): added `continued' flag. Fix from
Darrell Hankerson for when RS = "\n|something".
Wed May 15 02:34:55 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in (awklib/all): now depends on gawk, fixes problem
with parallel make.
Tue May 14 15:02:52 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (format_tree): fix handling of '*' to deal with
negative value for fieldwidth -- make positive and turn on
left justify. Per bug report from Michael Brennan.
Sun May 12 20:42:06 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* eval.c (r_get_lhs): case Node_subscript. Check if array name
is actually a function, fatal error if so.
Sun May 5 10:11:52 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (redirect): call flush_io() before creating a new output pipe,
per bug report from Brian Kernighan (bwk@research.bell-labs.com).
Fri Mar 15 06:38:33 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in (install): use $(INSTALL_PROGRAM), not $(INSTALL).
(local-distclean): add `*~' to list of files to be removed.
(CFLAGS): now contains just @CFLAGS@.
(COMPFLAGS): replaces use of CFLAGS, has CFLAGS plus all the
other stuff.
Wed Mar 13 14:19:38 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (mmap_get_record): fixed to not place sentinel at end
of mmap'ed object. Won't work if file is exact multiple of
disk block size. See comments in code for more info.
Thanks to Rick Adams (rick@uunet.uu.net) for help in testing.
Sun Mar 10 22:50:23 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* io.c (do_close): notice if we were called as `close(FILENAME)'
and arrange to close the current input file. This turns out
to be easy to do, just call `nextfile(TRUE)'. Based on bug report
from Pascal A. Dupuis, <dupuis@lei.ucl.ac.be>.
Thu Mar 7 08:08:51 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* field.c (init_fields, grow_fields, set_field, rebuild_record):
Nuke the `nodes' array everywhere. Anytime a field is unref'ed,
allocate a new node that is a copy of Nnull_string. This avoids
subtle memory management problems when doing a lot of assignment
to fields, and tweaking of NF. Make sure that fields_arr[0] always
has a type of Node_val!
* field.c (set_NF): If NF is decremented, clear fields between
NF and parse_high_water, otherwise if NF incremented, clear
fields between parse_high_water and NF.
* eval.c (nodetype2str): new function, used for diagnostics.
eval.c (interpret): use nodetype2str when finding invalid node.
Mon Mar 4 09:02:28 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (do_toupper, do_tolower): use isascii along with
isupper/islower before changing case, in case characters have
the high bit set. This is a hack.
Mon Feb 26 22:24:44 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (sub_common): if no match, and called from gensub,
don't free the temporary string, since the tmp_number then
writes over it.
Sun Feb 25 23:13:01 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (format_tree): fixed %c to treat user input as
numeric also by adding test for MAYBE_NUM.
Tue Feb 20 12:25:50 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* configure.in: Added AC_FUNC_MMAP call and add madvise to
list of functions to look for.
* awk.h [IOP_ISMAPPED]: new flag value for mmap support and new
`getrec' structure member in struct iobuf.
* io.c (iop_alloc, iop_close): changed to map/unmap input file
into memory if possible.
(mmap_get_record): new function to actually retrieve the
record from mmaped file.
Thu Feb 1 08:56:46 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (do_substr): fixed lint message to use indx+1 when
start position is past end of string.
Sun Jan 28 07:00:56 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (do_substr): rationalized handling of missing length
argument, as well as various accompanying lint warnings. Previous
code was slightly bogus. Talk about your Day 1 bugs.
Thu Jan 25 14:09:11 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* builtin.c (do_substr): if length exceeds length of actual
string, do computation of needed substring length *after*
the lint warning.
Wed Jan 24 10:06:16 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* Makefile.in (gawk): Add $(CFLAGS) to link line.
(Makefile): target depends on the Makefile.in files.
(OTHERS): Added TAGS and tags to the distribution.
(local-distclean): New rule.
(distclean): Use it.
(maintainer-clean): Don't `make distclean' before running submakes,
since that removes makefiles needed for the submakes.
* builtin.c (do_strftime): Remove hard coded limit on length of result.
Based on code from Paul Eggert (eggert@twinsun.com).
Mon Jan 22 13:16:37 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* main.c (usage): takes new fp parameter which is either
stdout for `--help' (per the GNU Coding Standards) or stderr
if an error occurs. Fix all calls.
(version): prints to stdout per the coding stds.
(copyleft): prints to stdout now, not stderr, and exits.
Fri Jan 19 08:10:29 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* regex.h [RE_GNU_AWK]: added RE_CONTEXT_INDEP_OPS to set of
bits we turn off for regular operation. Breaks things like
/^+[0-9]+/ to match a literal `+' at the beginning of, say,
a phone number.
Wed Jan 10 23:19:36 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* 3.0.0 polished up and release tar file made.
Wed Dec 27 11:46:16 1995 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* 2.94.0 released to porting group (no, I haven't been good
about this file; I'll do better once 3.0 is released).
Mon Aug 28 23:04:30 1995 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* awk.h updated for NeXT - bracket TRUE/FALSE
* io.c (get_a_record): removed shadowing of 'start' in
* Makefile.in and doc/Makefile.in: fixed to use gawk.1 and gawk.texi,
instead of gawk.1.in and gawk.texi.in.
Mon Aug 25 11:04:30 1995 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* 2.90.0 released to porting group.
Fri Aug 18 12:43:31 1995 Arnold D. Robbins <arnold@puny.ssc.com>
* ChangeLog created.
|