summaryrefslogtreecommitdiff
path: root/ChangeLog
blob: 9faab84194d669da67cfd7c8c05704fbee47c788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
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
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
2010-01-08  Eric Blake  <ebb9@byu.net>

	Address remaining 'make syntax-check' findings.
	* gnulib: Update to latest.
	* Makefile.am (tests/package.m4): Avoid @@ substitution.
	(src_m4_LDADD): Link with libiconv.
	* m4/m4private.h (STREQ): New macro.
	* m4/resyntax.c (m4_regexp_syntax_encode): Use it.
	* src/main.c (process_file): Likewise.
	(includes): Drop unused header.
	* m4/macro.c (m4_arg_equal): Adjust comment.
	* m4/syntax.c: Likewise.
	* m4/system_.h: Avoid useless preprocessor parenthesis.
	* ltdl/m4/stackovf.m4 (M4_SYS_STACKOVF): Likewise.
	* src/stackovf.c: Likewise.
	(setup_stackovf_trap): Mark diagnostics.
	* modules/mpeval.c (includes): Move quotearg.h inclusion...
	* modules/evalparse.c (includes): ...to where it is used.
	* cfg.mk (local-checks-to-skip): Exempt tests that cause spurious
	failures, but first fix what they were intended to detect.
	(_makefile_at_at_check_exceptions): Allow an exception.

2010-01-07  Eric Blake  <ebb9@byu.net>

	Use correct license on auxiliary documentation.
	* gnulib: Update to latest.
	* AUTHORS: Use GFDL 1.3, not 1.2.
	* README-alpha: Likewise.
	* README: Likewise.
	* THANKS: Likewise.
	* doc/STYLE: Likewise.
	* modules/README: Likewise.
	* NEWS: Place under GFDL.
	* TODO: Likewise.
	* cfg.mk (old_NEWS_hash): Update.

	Address 'make sc_error_message_uppercase' failures.
	* m4/output.c (m4_freeze_diversions): Silence false positive.
	* src/main.c (main): Use 'warning', not 'Warning', in messages.
	* m4/utility.c (m4_verror_at_line): Likewise.
	* doc/m4.texinfo (Operation modes, Macro Arguments, Undefine)
	(Defn, Pushdef, Indir, Builtin, Ifdef, Ifelse, Dumpdef, Trace)
	(Debuglen, Debugfile, Dnl, Changeresyntax, Standard Modules)
	(Index macro, Regexp, Substr, Translit, Patsubst, Format, Incr)
	(Eval, Mkstemp, Syncoutput, Improved forloop)
	(Improved fatal_error): Adjust expected output.
	* tests/builtins.at (define, mkdtemp, mkstemp): Likewise.
	* tests/freeze.at (loading format 1, reloading unknown builtin):
	Likewise.
	* tests/macros.at (Arity and defn, 'Arity, defn, and freeze')
	(pushdef/popdef): Likewise.
	* tests/null.err: Likewise.
	* tests/options.at (deprecated options, POSIXLY_CORRECT)
	(--fatal-warnings, --regexp-syntax, --syncoutput): Likewise.
	* tests/others.at (nul character, stdin seekable): Likewise.
	* tests/modules.at (AT_CHECK_M4_MODTEST, modules: text):
	Likewise.

	Address 'make sc_cast_of_argument_to_free' failures.
	* m4/m4private.h (DELETE): Adjust comment and fix parentheses.
	* m4/m4.c (m4_delete): Use it to avoid warning.
	* m4/module.c (install_builtin_table, module_remove): Likewise.
	* m4/symtab.c (m4_symbol_value_delete, m4_symbol_value_copy):
	Likewise.
	* .x-sc_cast_of_argument_to_free: New file.
	* Makefile.am (syntax_check_exceptions): Distribute exceptions.

	More whitespace cleanup.
	* HACKING: Nuke trailing whitespace.
	* examples/WWW/Makefile: Likewise.
	* examples/WWW/_footer.htm: Likewise.
	* examples/WWW/_header.htm: Likewise.
	* examples/WWW/m4lib/bugs.m4: Likewise.
	* examples/WWW/m4lib/html.m4: Likewise.
	* examples/WWW/m4lib/menu.m4: Likewise.
	* examples/WWW/m4lib/visions.m4: Likewise.
	* examples/esyscmd.m4: Likewise.
	* examples/fstab.m4: Avoid space-tab.
	* examples/patsubst.m4: Likewise.
	* NEWS: Prefer space over tab for alignment.
	* THANKS: Likewise.
	* TODO: Likewise.
	* bootstrap: Likewise.
	* configure.ac: Likewise.
	* ltdl/m4/stackovf.m4: Likewise.
	* m4/hash.c: Likewise.
	* m4/hash.h: Likewise.
	* m4/input.c: Likewise.
	* m4/m4.c: Likewise.
	* m4/m4module.h: Likewise.
	* m4/m4private.h: Likewise.
	* m4/macro.c: Likewise.
	* m4/module.c: Likewise.
	* m4/output.c: Likewise.
	* m4/path.c: Likewise.
	* m4/resyntax.c: Likewise.
	* m4/symtab.c: Likewise.
	* m4/syntax.c: Likewise.
	* m4/system_.h: Likewise.
	* modules/evalparse.c: Likewise.
	* modules/format.c: Likewise.
	* modules/gnu.c: Likewise.
	* modules/import.c: Likewise.
	* modules/load.c: Likewise.
	* modules/m4.c: Likewise.
	* modules/m4.h: Likewise.
	* modules/modtest.c: Likewise.
	* modules/mpeval.c: Likewise.
	* modules/perl.c: Likewise.
	* modules/shadow.c: Likewise.
	* modules/stdlib.c: Likewise.
	* modules/time.c: Likewise.
	* modules/traditional.c: Likewise.
	* src/freeze.c: Likewise.
	* src/main.c: Likewise.
	* src/stackovf.c: Likewise.
	* tests/stackovf.test: Likewise.
	* doc/STYLE: Mention the change.

2010-01-05  Eric Blake  <ebb9@byu.net>

	Document new indentation policy.
	* HACKING: Document indentation policy.
	* .x-sc_prohibit_tab_based_indentation: New file.
	* cfg.mk (sc_prohibit_tab_based_indentation): New rule.
	* Makefile.am (syntax_check_exceptions): Ship exception.

	Switch to indentation by space, not tab.
	* .gitmodules: Convert leading tabs to spaces.
	* TODO: Likewise.
	* bootstrap: Likewise.
	* configure.ac: Likewise.
	* examples/WWW/m4lib/html.m4: Likewise.
	* examples/WWW/m4lib/layout.m4: Likewise.
	* examples/WWW/m4lib/menu.m4: Likewise.
	* ltdl/m4/debug.m4: Likewise.
	* ltdl/m4/gmp.m4: Likewise.
	* ltdl/m4/m4-obstack.m4: Likewise.
	* ltdl/m4/stackovf.m4: Likewise.
	* m4/builtin.c: Likewise.
	* m4/debug.c: Likewise.
	* m4/hash.c: Likewise.
	* m4/hash.h: Likewise.
	* m4/input.c: Likewise.
	* m4/m4.c: Likewise.
	* m4/m4module.h: Likewise.
	* m4/m4private.h: Likewise.
	* m4/macro.c: Likewise.
	* m4/module.c: Likewise.
	* m4/output.c: Likewise.
	* m4/path.c: Likewise.
	* m4/resyntax.c: Likewise.
	* m4/symtab.c: Likewise.
	* m4/syntax.c: Likewise.
	* m4/utility.c: Likewise.
	* modules/evalparse.c: Likewise.
	* modules/format.c: Likewise.
	* modules/gnu.c: Likewise.
	* modules/load.c: Likewise.
	* modules/m4.c: Likewise.
	* modules/m4.h: Likewise.
	* modules/mpeval.c: Likewise.
	* modules/perl.c: Likewise.
	* modules/stdlib.c: Likewise.
	* modules/time.c: Likewise.
	* src/freeze.c: Likewise.
	* src/m4.h: Likewise.
	* src/main.c: Likewise.
	* src/stackovf.c: Likewise.
	* tests/builtins.at: Likewise.
	* tests/freeze.at: Likewise.
	* tests/generate.awk: Likewise.
	* tests/modules.at: Likewise.
	* tests/others.at: Likewise.
	* tests/stackovf.test: Likewise.
	* tests/testsuite.at: Likewise.

	Update copyright year.
	All files impacted, via 'make update-copyright'.  Additionally:
	* .gitignore: Ignore backup files.

	Prepare to bulk update copyright year.
	* gnulib: Update.
	* ltdl/m4/gnulib-cache.m4: Import update-copyright module.
	* cfg.mk (update-copyright-env): Enforce longhand behavior.
	* .x-update-copyright: New file.
	* Makefile.am (syntax_check_exceptions): Distribute exception.
	* ltdl/m4/debug.m4: Add FSF copyright.
	* ltdl/m4/m4-error.m4: Fix FSF name in copyright.
	* ltdl/m4/m4-getopt.m4: Likewise.
	* ltdl/m4/m4-gettext.m4: Likewise.
	* ltdl/m4/m4-obstack.m4: Likewise.
	* ltdl/m4/m4-regex.m4: Likewise.
	* ltdl/m4/m4-rename.m4: Likewise.
	* ltdl/m4/m4-syscmd.m4: Likewise.
	* modules/modtest.m4: Likewise.
	* modules/perl.m4: Likewise.
	* modules/shadow.m4: Likewise.
	* modules/stdlib.m4: Likewise.
	* modules/time.m4: Likewise.
	* modules/time2.m4: Likewise.
	* tests/iso8859.m4: Likewise.

	Use gnulib maintainer-makefile module.
	* ltdl/m4/gnulib-cache.m4: Import maintainer-makefile module.
	* cfg.mk (local-checks-to-skip): Drop changelog-check; add
	sc_cast_of_x_alloc_return_value.
	(gnu_ftp_host-alpha, gnu_ftp_host-beta, gnu_ftp_host-major)
	(gnu_rel_host): Delete; provided by maint.mk.
	(old_NEWS_hash): New macro.
	* .prev-version: New file.
	* .x-sc_require_config_h: Likewise.
	* .x-sc_require_config_h_first: Likewise.
	* Makefile.am (syntax_check_exceptions, EXTRA_DIST): Ship new
	files.
	* maint.mk: Remove from version control; use gnulib instead.
	* .gitignore: Update.

	Update to latest gnulib.
	* gnulib: Update.
	* ltdl/m4/gnulib-cache.m4: Import xoset.
	* m4/output.c (includes): Ensure that gnulib oset usage will
	call xalloc_die on memory failure.
	* Makefile.am (src/getopt.h): Update snippet from gnulib.
	(LINK_WARNING_H, ARG_NONNULL_H): New macros.

	Fix testsuite failure on newer glibc.
	* tests/testsuite.at (AT_CHECK_M4): Tolerate alternate getopt
	spellings.
	* tests/options.at (deprecated options, unknown option)
	(--debugmode): Adjust expected output accordingly.
	Reported by Ralf Wildenhues.

2009-11-26  Eric Blake  <ebb9@byu.net>

	Update to newer gnulib.
	* gnulib: Update.
	* ltdl/m4/gnulib-cache.m4: Import inttypes, setenv, and unsetenv
	modules.
	* modules/m4.c (m4_make_temp): Adjust gen_tempname client.
	* bootstrap (src_modules): Pick up getopt-gnu and its
	dependencies.
	* configure.ac (gl_VERSION_ETC): Support ./configure
	--with-packager.
	(AC_CHECK_FUNCS_ONCE): Rely on gnulib for setenv, unsetenv.
	* ltdl/m4/m4-getopt.m4: Rewrite to match current gnulib.
	* Makefile.am (src/getopt.h): Likewise.
	* modules/stdlib.c (setenv, unsetenv): Rely on gnulib.

2009-08-24  Eric Blake  <ebb9@byu.net>

	Pick up gnulib fixes for sub-process execution.
	* gnulib: Update.
	* tests/others.at (stdin and stdout closed): New test, to avoid
	regression introduced on 1.4 branch on 2008-07-17.
	* NEWS: Document the change.

	A status of 127 does not always imply esyscmd failure.
	* modules/gnu.c (esyscmd): Silence gnulib message; regression
	introduced 2009-03-13.
	* doc/m4.texinfo (Sysval): Test this.
	* NEWS: Document the change.

2009-06-26  Eric Blake  <ebb9@byu.net>

	Use bitrotate for hashing.
	* gnulib: Update to latest.
	* ltdl/m4/gnulib-cache.m4: Import bitrotate module.
	* m4/hash.c (m4_hash_string_hash): Use it.

	Fix description of limits on diversions.
	* doc/m4.texinfo (Diversions): Fix grammar.  Be less pessimistic
	about limitations.
	* THANKS: Update.
	Reported by Elias Benali.

2009-06-17  Eric Blake  <ebb9@byu.net>

	Stress test for hash resizing.
	* tests/builtins.at (define): Enhance test.

2009-06-15  Eric Blake  <ebb9@byu.net>

	Document why bootstrap might touch state of tree.
	* bootstrap: Fix typos.  Add comment.
	* HACKING: Add notes about this scenario.
	* gnulib: Update to latest version.
	* .gitignore: Track gnulib changes.

	Drop .cvsignore and redundant .gitignore files.
	* .cvsignore: Delete.  We are moving further away from CVS.
	* build-aux/.cvsignore: Likewise.
	* doc/.cvsignore: Likewise.
	* examples/.cvsignore: Likewise.
	* ltdl/.cvsignore: Likewise.
	* m4/.cvsignore: Likewise.
	* modules/.cvsignore: Likewise.
	* po/.cvsignore: Likewise.
	* src/.cvsignore: Likewise.
	* tests/.cvsignore: Likewise.
	* .gitignore: Consolidate from other files.
	* build-aux/.gitignore: Delete, now that it is consolidated.
	* doc/.gitignore: Likewise.
	* examples/.gitignore: Likewise.
	* ltdl/.gitignore: Likewise.
	* m4/.gitignore: Likewise.
	* modules/.gitignore: Likewise.
	* po/.gitignore: Likewise.
	* src/.gitignore: Likewise.
	* tests/.gitignore: Likewise.
	* bootstrap: Simplify accordingly.  Sync gnulib tree prior to
	libtoolize, to avoid libtool overwriting config.guess.

	Avoid compiler warning.
	* m4/macro.c (process_macro): Use correct type for isdigit.

2009-06-13  Eric Blake  <ebb9@byu.net>

	Avoid snprintf link failures.
	* ltdl/m4/gnulib-cache.m4: Import snprintf-posix module.
	Reported by Ralf Wildenhues.

2009-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	Avoid pointer arithmetic on `void *'.
	* modules/m4.c (dump_symbol_CB): Cast obstack_base return value
	to `char *' before using it.

2009-05-04  Eric Blake  <ebb9@byu.net>

	Silence verbose testsuite runs.
	* tests/testsuite.at (m4_version_prereq): Bump to recent
	autoconf.git version where stdout-nolog was added.
	* tests/builtins.at (esyscmd, syscmd): Use new stdout-nolog.
	* tests/freeze.at (AT_TEST_FREEZE): Likewise.
	* tests/others.at (stderr closed): Likewise.
	* HACKING: Mention new requirement.
	* bootstrap: Likewise.
	Reported by Ralf Wildenhues.

2009-04-21  Eric Blake  <ebb9@byu.net>

	Be more explicit about default quoting characters.
	* doc/m4.texinfo (Quoted strings): Call out characters by name.
	* THANKS: Update.
	Suggested by Mehul Sanghvi.

2009-04-16  Eric Blake  <ebb9@byu.net>

	Use gnulib rename module.
	* ltdl/m4/gnulib-cache.m4: Import rename module.  At the moment,
	we don't tickle either of the platform bugs that it fixes, but it
	is better to be safe than sorry.

	Require newer automake features.
	* configure.ac (AM_INIT_AUTOMAKE): Add dist-xz, color-tests,
	parallel-tests, and silent-rules.  Drop dist-lzma.
	* HACKING: Update minimum requirements.
	* gnulib: Update to latest version.

	Mention release of 1.4.13.
	* NEWS: Update to match release on branch-1.4.
	* doc/m4.texinfo (History): Update release history.
	(copying): Finish conversion to GFDL 1.3, started 2008-11-04.

2009-03-23  Eric Blake  <ebb9@byu.net>

	Exploit git submodule by adding appropriate symlinks.
	* bootstrap: No longer copy files from gnulib.
	* COPYING: Change to symlink pointing into gnulib.
	* INSTALL: Likewise.
	* build-aux/compile: Likewise.
	* build-aux/config.guess: Likewise.
	* build-aux/config.sub: Likewise.
	* build-aux/depcomp: Likewise.
	* build-aux/install-sh: Likewise.
	* build-aux/mdate-sh: Likewise.
	* build-aux/missing: Likewise.
	* build-aux/texinfo.tex: Likewise.
	* .cvsignore: Reflect these changes.
	* .gitignore: Likewise.
	* build-aux/.cvsignore: New file.
	* build-aux/.gitignore: Likewise.

	Make gnulib a git submodule.
	* .gitmodules: New file.
	* gnulib: Record which version of gnulib has been tested.
	* bootstrap: Aid in submodule usage.
	* cfg.mk (gnulib_dir): Alter default location of gnulib.
	* HACKING: Mention how to use submodule.

2009-03-21  Eric Blake  <ebb9@byu.net>

	Use memcmp2 to simplify lexicographic comparisons.
	* ltdl/m4/gnulib-cache.m4: Import memcmp2.
	* modules/m4.c (dumpdef_cmp_CB): Use it.

2009-03-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	Fix m4.1 build race, exposed by parallelism through GNUmakefile.
	* Makefile.am (SUBDIRS): Add doc.
	(Documentation rules): Move ...
	* doc/Makefile.am: ... to this new file.
	* configure.ac (AC_CONFIG_FILES): Generate doc/Makefile.

2009-03-13  Eric Blake  <ebb9@byu.net>

	Try to tolerate spaces in directory names in testsuite.
	* tests/null.m4: Provide shell quoting, in case __program__
	contains spaces.

	Fix awk script portability.
	* checks/get-them: In gsub, properly escape {.
	Reported by Gary V. Vaughan.

	Make bootstrap easier on Solaris.
	* bootstrap: Add GNULIB_SRCDIR.  Useful when a wrapper script
	gnulib-tool exists earlier on the path to work around /bin/sh
	failure in parsing $GNULIB_SRCDIR/gnulib-tool.

2009-03-13  Eric Blake  <ebb9@byu.net>

	Allow configuration choice in syscmd shell.
	* ltdl/m4/m4-syscmd.m4: New file.
	* configure.ac (M4_SYSCMD): Use it to provide
	--with-syscmd-shell.
	(AC_CHECK_HEADERS_ONCE): No longer need to worry about
	<sys/wait.h>.
	* modules/m4.c (syscmd): Use it to avoid hard-coding the shell
	location.
	* modules/gnu.c (esyscmd): Likewise.
	* doc/m4.texinfo (Syscmd, Esyscmd): Document this.
	* README: Document new configure option.
	* NEWS: Likewise.

	Use gnulib pipe module instead of popen(3).
	* ltdl/m4/gnulib-cache.m4: Import pipe and wait-process modules.
	* modules/gnu.c (M4_SYSVAL_EXITBITS, M4_SYSVAL_TERMSIGBITS):
	Delete.
	(esyscmd): Rewrite with pipe module.
	Resolves a failure on AIX, reported by Gary V. Vaughan.

	Use gnulib execute module instead of system(3).
	* ltdl/m4/gnulib-cache.m4: Import execute module.
	* m4/utility.c (m4_info_name): New function.
	* m4/m4module.h (m4_info_name): New prototype.
	* modules/m4.c (syscmd): Rewrite with execute module.
	(M4_SYSVAL_EXITBITS, M4_SYSVAL_TERMSIGBITS, m4_sysval): Move
	computation...
	* modules/gnu.c (M4_SYSVAL_EXITBITS, M4_SYSVAL_TERMSIGBITS)
	(esyscmd): ...here.
	Resolves a failure on AIX, reported by Gary V. Vaughan.

2009-03-05  Eric Blake  <ebb9@byu.net>

	Improve web-manual maintainer rule.
	* maint.mk (web-manual): Factor package-specific detail...
	* cfg.mk (manual_title): ...to new variable.

2009-02-23  Eric Blake  <ebb9@byu.net>

	Speed up translit when from argument is short.
	* modules/m4.c (translit): Use memchr2 when possible.
	* tests/builtins.at (translit): Add tests.
	* NEWS: Document this.

2009-02-18  Eric Blake  <ebb9@byu.net>

	Prefer buffer over byte operations.
	* modules/format.c (format): Use memchr for speed.
	* modules/gnu.c (substitute): Likewise.
	* m4/macro.c (locate_dollar): Inline into only caller...
	(process_macro): ...and rearrange for readability.
	* m4/input.c (consume_buffer): Allow C++ compilation.
	* doc/m4.texinfo (Changesyntax): Enhance test.

	Speed up esyscmd with buffer reads.
	* modules/gnu.c (esyscmd): Read blocks directly into obstack,
	rather than repeatedly reading bytes.  Detect read errors.

	Avoid risk of stack overflow.
	* m4/output.c (insert_file): Avoid stack allocation of large
	buffer.

	Synchronize THANKS with branch.
	* THANKS: Import more names.

	Improve handling of $ in syntax table.
	* m4/m4module.h (m4_is_syntax_single_dollar): New function.
	(M4_SYNTAX_DOLLAR, M4_SYNTAX_LBRACE, M4_SYNTAX_RBRACE): Change to
	be context rather than basic syntax categories.
	(M4_SYNTAX_MASKS): Adjust macro.
	* m4/m4private.h (struct m4_syntax_table): Add dollar and
	is_single_dollar members.
	(m4_is_syntax_single_dollar): Add fast alternative.
	* m4/syntax.c (m4_syntax_create, reset_syntax_set): Adjust to
	account for change to context categories.
	(m4_set_syntax): Manage is_single_dollar.
	(m4_is_syntax_single_dollar): New function.
	* m4/macro.c (locate_dollar): New helper function.
	(process_macro): Use it to speed up macro expansion.
	* m4/input.c (m4__next_token): Adjust client.
	* doc/m4.texinfo (Changesyntax): Document this.

2009-02-17  Eric Blake  <ebb9@byu.net>

	Sync changecom documentation with branch.
	* doc/m4.texinfo (Changecom): Tweak wording.
	* NEWS: Import changes from the branch.

	Stage 29b: Process quotes and comments by buffer, not bytes.
	Search for quote and comment delimiters by buffer when possible.
	Memory impact: none.
	Speed impact: noticeable improvement, from fewer function calls.
	* ltdl/m4/gnulib-cache.m4: Import memchr2 module.
	* m4/input.c (m4__next_token): Add buffer reads to quote and
	comment parsing.
	* NEWS: Document this.

2009-02-16  Eric Blake  <ebb9@byu.net>

	Stage 29a: Process dnl and macro names by buffer, not bytes.
	Enhance input engine to provide lookahead buffer, rather than
	forcing clients to call next_char for every byte.  Utilize this
	for the simplest clients.
	Memory impact: none.
	Speed impact: noticeable improvement, from fewer function calls.
	* ltdl/m4/gnulib-cache.m4: Import freadptr and freadseek modules.
	* m4/input.c (struct input_funcs): Add virtual functions
	buffer_func and consume_func.
	(file_buffer, file_consume, string_buffer, string_consume)
	(composite_buffer, composite_consume, eof_buffer): Implement
	them.
	(file_funcs, string_funcs, composite_funcs, eof_funcs): Update
	vtables accordingly.
	(buffer_retry): New sentinel.
	(next_buffer, consume_buffer): New functions.
	(m4_skip_line, match_input, consume_syntax): Use them for faster
	parsing.
	Suggested by Bruno Haible.

	Unify single and multi-character delimiter handling.
	* m4/input.c (MATCH): Add a parameter.
	(m4__next_token): Simplify logic and reduce redundancy.
	(m4__next_token_is_open): Adjust caller.
	* m4/syntax.c (m4_set_comment, m4_set_quotes): Handle delimiters
	of differing lengths.
	(m4_set_syntax): Recognize restoration of single delimiters.

	Revamp changesyntax vs. changequote interactions.
	* m4/m4module.h (M4_SYNTAX_VALUE): Delete unused macro.
	(M4_SYNTAX_SUSPECT): New macro.
	* m4/m4private.h (struct m4_syntax_table): Add suspect field.
	* m4/syntax.c (check_is_single_quotes, check_is_single_comments)
	(check_is_macro_escaped): Delete, by inlining body...
	(m4_set_syntax): ...into here.  Improves handling between
	changesyntax and changequote/changecom.
	(add_syntax_set, subtract_syntax_set, set_syntax_set): Simplify,
	and let suspect field track needed cleanup.
	(m4_set_quotes, m4_set_comment): Adjust meaning of
	is_single_quotes and is_single_comment flags to always be true if
	only one delimiter exists, regardless of its length.  Ensure that
	the syntax categories M4_SYNTAX_LQUOTE and M4_SYNTAX_BCOMM are
	only used on 1-byte delimiters.
	(add_syntax_attribute, remove_syntax_attribute): Change signature
	to allow the use of fewer casts.  Adjust the suspect field when
	necessary.
	(m4_reset_syntax, set_quote_age): Adjust callers.
	* m4/input.c (m4__next_token, m4__next_token_is_open): Simplify
	callers.
	* doc/m4.texinfo (Changesyntax): Update documentation and tests.

	Improve changesyntax documentation.
	* doc/m4.texinfo (Changesyntax): Merge two tables into one
	multitable.

	Fix regression in multicharacter quotes, from 2008-01-26.
	* m4/input.c (m4__next_token): Fix typo.
	* tests/builtins.at (changequote): Enhance test.

2009-02-13  Eric Blake  <ebb9@byu.net>

	Speed up parsing when detecting input file change.
	* m4/input.c (next_char): Clear input_change flag.  Bug introduced
	2006-10-25.

2009-02-12  Eric Blake  <ebb9@byu.net>

	Avoid quadratic code when walking definition stack.
	* examples/stack_sep.m4: Use linear, not quadratic
	implementation.
	* doc/m4.texinfo (Improved copy): Fix documentation, based on
	recent autoconf bug fix.
	* tests/others.at (recursion): Enhance test.

2009-02-11  Eric Blake  <ebb9@byu.net>

	Stage 28c: Warn on embedded NUL in remaining cases.
	Ensure all remaining warnings can handle embedded NUL.
	Memory impact: none.
	Speed impact: none noticed.
	* m4/m4module.h (m4_debug_decode, m4_parse_truth_arg): Add
	parameter.
	* m4/macro.c (m4_macro_call): Improve diagnostic.
	* modules/m4.c (defn): Likewise.
	* m4/debug.c (m4_debug_decode): Handle embedded NUL.
	* m4/utility.c (m4_parse_truth_arg): Likewise.
	* modules/format.c (arg_int, arg_long, arg_double): Likewise.
	(arg_string): New function.
	(ARG_INT, ARG_LONG, ARG_STR, ARG_DOUBLE): Update callers.
	* src/main.c (main): Likewise.
	* src/freeze.c (reload_frozen_state): Likewise.
	* modules/gnu.c (debugmode, syncoutput): Likewise.
	* tests/options.at (--regexp-syntax): Adjust test.
	* tests/freeze.at (reloading nul): Likewise.
	* tests/null.m4: Likewise.
	* tests/null.out: Likewise.
	* tests/null.err: Likewise.

	Stage 28b: Warn on embedded NUL in file arguments.
	Quote warning messages related to file and other NUL-terminated
	system commands.
	Memory impact: none.
	Speed impact: none noticed.
	* m4/path.c (m4_path_search): Quote file names in message.
	* modules/m4.c (syscmd, include, m4_make_temp): Handle embedded
	NUL.
	* modules/gnu.c (debugfile, esyscmd): Likewise.
	* tests/others.at (nul character): Adjust test.
	* tests/builtins.at (mkdtemp, mkstemp): Likewise.
	* tests/null.m4: Likewise.
	* tests/null.out: Likewise.
	* tests/null.err: Likewise.

	Stage 28a: Warn on embedded NUL in numeric arguments.
	Quote warning messages related to numeric parsing in order to
	handle embedded NUL.
	Memory impact: none.
	Speed impact: none noticed.
	* m4/m4module.h (m4_numeric_arg): Adjust prototype.
	* m4/utility.c (m4_numeric_arg): Add parameter.
	* modules/gnu.c (debuglen): Adjust callers.
	* modules/m4.c (incr, decr, divert, undivert, m4exit, substr)
	(index): Likewise.
	* modules/evalparse.c (m4_evaluate): Likewise.
	* modules/stdlib.c (setenv, getpwuid, srand): Likewise.
	* modules/time.c (ctime, gmtime, localtime, mktime, strftime):
	Likewise.
	* doc/m4.texinfo (Changesyntax): Fix typo.
	* tests/others.at (nul character): Adjust test.
	* tests/null.m4: Likewise.
	* tests/null.out: Likewise.
	* tests/null.err: Likewise.

2009-02-11  Eric Blake  <ebb9@byu.net>

	Avoid regression in popdef(undef).
	* doc/m4.texinfo (Trace): Enhance test, to cover regression
	recently fixed on the branch.

2009-02-09  Eric Blake  <ebb9@byu.net>

	Enhance index to support starting offset.
	* modules/m4.c (index): Add optional third argument.
	* NEWS: Document this.
	* doc/m4.texinfo (Index macro): Likewise.
	(Macro Arguments): Adjust tests.

2009-01-24  Eric Blake  <ebb9@byu.net>

	Add URLs to --help output.
	* src/main.c (usage): Use enhanced version-etc features.

2009-01-07  Eric Blake  <ebb9@byu.net>

	Enhance substr to support replacement text.
	* doc/m4.texinfo (Substr): Document new semantics.
	* modules/m4.c (substr): Support optional fourth argument.
	* NEWS: Document this.

	Enhance substr to support negative values.
	* doc/m4.texinfo (Substr): Document new semantics, and how to
	simulate old.
	* modules/m4.c (substr): Support negative values.
	* NEWS: Document this.

2009-01-05  Eric Blake  <ebb9@byu.net>

	Maintainer cleanups.
	* HACKING: Remove mention of xdelta.
	* Makefile.am (EXTRA_DIST, MAINTAINERCLEANFILES): Let gnulib take
	care of distributing gendocs.sh.
	* maint.mk (web-manual): Use new feature of gendocs.
	* ltdl/m4/gnulib-cache.m4: Regenerate.

2008-12-24  Eric Blake  <ebb9@byu.net>

	Relax eval as allowed by POSIX 2008.
	* modules/evalparse.c (m4_evaluate): Warn, not error, on invalid
	operator.  Quote expression in warning.
	* modules/mpeval.c (includes): Add quotearg.h.
	* doc/m4.texinfo (Eval, Improved forloop): Update tests.
	* NEWS: Update to reflect 1.6 support for `?:'.

2008-12-23  Eric Blake  <ebb9@byu.net>

	Add debugmode(o) to control dumpdef output location.
	* m4/m4module.h (M4_DEBUG_TRACE_OUTPUT_DUMPDEF): New enumerator.
	(M4_DEBUG_TRACE_VERBOSE): Update.
	* m4/debug.c (m4_debug_decode): Support new debug option.
	* src/freeze.c (produce_debugmode_state): Likewise.
	* modules/m4.c (dumpdef): When set, force dumpdef to stderr rather
	than the debug file.
	* src/main.c (usage): Document it.
	* doc/m4.texinfo (Debugmode, Dumpdef, Debugging options)
	(Debugfile): Likewise.
	* NEWS: Likewise.
	Based on an autoconf bug report by Paolo Bonzini.

	Make --debugfile argument optional.
	* src/main.c (long_options): Make the argument optional, to allow
	setting debug file back to stderr.
	(main): Make --debugfile order-dependent.
	(usage): Document this.
	* doc/m4.texinfo (Debugging options): Likewise.
	* NEWS: Likewise.
	* tests/options.at (--debugfile): Enhance test.
	(--safer): Adjust to new semantics.

2008-12-22  Eric Blake  <ebb9@byu.net>

	Use @var correctly.
	* doc/m4.texinfo (Operation modes, Preprocessor features)
	(Limits control, Frozen state, Debugging options)
	(Dynamic loading features): Use lower case names in @var.
	(Improved copy): Use @code, not @var, as appropriate.

2008-12-18  Eric Blake  <ebb9@byu.net>

	Deal with M4 1.4.x limitation on builtin tokens.
	* doc/m4.texinfo (Composition): Mention limitation on curry.
	(Improved copy): New node.
	(Stacks): Fix typo.
	* examples/stack.m4: Likewise.
	* examples/stack_sep.m4: New file.
	* Makefile.am (dist_pkgdata_DATA): Distribute it.

2008-12-15  Eric Blake  <ebb9@byu.net>

	Double size of temp file cache.
	* m4/output.c (tmp_file, tmp_file_owner): Split...
	(tmp_file1, tmp_file2, tmp_file1_owner, tmp_file2_owner): ...into
	two variables.
	(tmp_file2_recent): New variable.
	(m4_tmpopen, m4_tmpclose, m4_tmpremove, m4_tmprename)
	(m4_output_exit): Adjust callers.

	Use fewer seeks on cached files.
	* m4/output.c (m4_tmpfile): Use write, not append mode.
	(m4_tmpopen): Add parameter to decide when to skip seeks.
	(m4_tmprename, m4_make_diversion, insert_diversion_helper)
	(m4_freeze_diversions): Adjust callers.

	Cache most recently spilled diversion.
	* m4/output.c (tmp_file, tmp_file_owner): New variables, for
	1-deep cache of spilled diversions.
	(m4_tmpfile): Open in append mode, since we might revisit
	diversion without closing it now.
	(m4_tmpopen): Check cache first.
	(m4_tmpclose): Update cache, rather than closing.  Add parameter.
	(m4_tmpremove): Close cache before removing.
	(m4_tmprename): Deal with open files when renaming.
	(m4_output_exit): Close cache before exiting.
	(make_room_for, m4_make_diversion, insert_diversion_helper):
	Adjust callers.
	* ltdl/m4/m4-rename.m4 (M4_RENAME): New file.
	* configure.ac (M4_RENAME): Invoke it.

	Correctly track size of in-memory diversions.
	* m4/output.c (insert_diversion_helper): Correctly track total
	in-memory diversion size after undivert.

	Avoid quadratic behavior for some cases of divert/undivert.
	* m4/output.c (struct m4_diversion): Improve comments.
	(m4_tmpname, m4_make_diversion): Strengthen preconditions.
	(m4_tmprename): New function.
	(m4_output_init, m4_output_exit): Move after internal functions.
	(make_room_for): Don't bother copying uninitialized bytes.
	(insert_diversion_helper): Transfer metadata, rather than copying
	contents, when undiverting into a previously unused diversion.
	* tests/builtins.at (divert): Add a check to the test.
	* doc/m4.texinfo (Undivert): Enhance test.
	* NEWS: Document the speedup.

2008-12-02  Eric Blake  <ebb9@byu.net>

	Stage 27: Allow embedded NUL in text processing macros.
	Pass NUL through regular expressions, format, and translit, and
	diagnose it in eval and changeresyntax.  Improve warning
	capabilities of format.
	Memory impact: none.
	Speed impact: none noticed.
	* modules/m4.c (m4_expand_ranges): Don't append extra bytes.
	(translit): Manage NUL bytes.
	* modules/format.c (format): Likewise.
	* modules/gnu.c (substitute, regexp_substitute): Likewise.
	(m4_resyntax_encode_safe): Add parameter.
	(regexp, patsubst, renamesyms): Update callers.
	(regexp_compile): Adjust error message.
	* modules/evalparse.c (m4_evaluate): Use consistent message.
	(end_text): New variable.
	(eval_init_lex): Add parameter.
	(eval_lex): Detect embedded NUL.
	* src/freeze.c (reload_frozen_state): Likewise.
	* doc/m4.texinfo (Format): Update to cover new behavior.
	(Eval): Mention that result is unquoted.
	* tests/freeze.at (reloading nul): Enhance test.
	* tests/null.m4: Likewise.
	* tests/null.err: Update expected output.
	* tests/null.out: Likewise.
	* tests/options.at (--regexp-syntax): Likewise.

2008-11-28  Eric Blake  <ebb9@byu.net>

	Resync NEWS with branches.
	* NEWS: Mention 1.4.12, update state of 1.6.

2008-11-26  Eric Blake  <ebb9@byu.net>

	Keep COPYING in repository.
	* Makefile.am (MAINTAINERCLEANFILES): Don't remove COPYING.
	* .cvsignore: Don't ignore it.
	* .gitignore: Likewise.
	* COPYING: Store in repository, per automake 1.10.2
	recommendation.

2008-11-26  Eric Blake  <ebb9@byu.net>

	Document optimized forloop.
	* doc/m4.texinfo (Improved forloop): Mention alternate style that
	avoids define overhead.
	* examples/forloop3.m4: New file.
	* Makefile.am (dist_pkgdata_DATA): Distribute it.

	Document copy composite using stack_foreach and curry.
	* doc/m4.texinfo (Stacks): New node, to document pushdef stack
	manipulation.
	(Ifelse): Move define_blind...
	(Composition): ...to this new node.  Document currying, then use
	it to implement copy and rename.
	* examples/curry.m4: New file.
	* examples/stack.m4: Likewise.
	* Makefile.am (dist_pkgdata_DATA): Distribute them.

2008-11-04  Eric Blake  <ebb9@byu.net>

	Upgrade to FDL 1.3.
	* ltdl/m4/gnulib-cache.m4: Replace fdl module with fdl-1.3.
	* Makefile.am (doc_m4_TEXINFOS, MAINTAINERCLEANFILES): Reflect
	file change.
	* doc/m4.texinfo (GNU Free Documentation License): Likewise.

2008-10-22  Eric Blake  <ebb9@byu.net>

	Give nicer error if user modifies testsuite but lacks autoconf.
	* Makefile.am (AUTOM4TE): Use missing in the definition.

2008-10-09  Eric Blake  <ebb9@byu.net>

	Allow user to choose which sed to use in testsuite.
	* tests/atlocal.in (SED): Inherit from configure results.
	* tests/builtins.at (__m4_@&t@version__, divert, esyscmd)
	(mkstemp, syscmd): Use $SED.
	* tests/generate.awk (new_test): Likewise.
	* tests/options.at (deprecated options, unknown option)
	(--debugmode, --help and --version): Likewise.
	* tests/testsuite.at (AT_CHECK_M4): Likewise.
	* tests/others.at (directory, stderr closed, stdin seekable)
	(stdout closed): Likewise.
	(nul character): Likewise.  Also, skip test if sed can't handle
	NUL bytes.

	Clean up testsuite invocation.
	* tests/atlocal.in: Fix copyright notice.
	* Makefile.am (TESTS_ENVIRONMENT): Delete; it wasn't being used.
	(check-local, installcheck-local): Adjust clients.  Add missing
	dependency.

2008-09-25  Eric Blake  <ebb9@byu.net>

	Tweak error message on command line failure.
	* m4/m4private.h (includes): Use "quotearg.h".
	* src/main.c (process_file, main): Use nicer quotes for file name
	in error messages.
	* m4/input.c (file_clean, m4_push_file): Likewise.
	* m4/module.c (m4__module_open): Likewise.
	* src/freeze.c (produce_frozen_state, reload_frozen_state):
	Likewise.
	* modules/gnu.c (debugfile): Likewise.
	* modules/m4.c (undivert, include): Likewise.
	* tests/others.at (directory, stdin closed): Update tests.
	* tests/options.at (file names, --debugmode): Likewise.
	* doc/m4.texinfo (Debugmode): Likewise.

	Unify error handling for reading directories.
	* m4/path.c (m4_path_search): Factor open attempts...
	(m4_fopen): ...into new function, to reject directories.
	* tests/others.at (directory): Enhance test.
	* doc/m4.texinfo (Include): Document that directories cannot be
	input files.

	Avoid bugs on platforms that mishandle trailing /.
	* ltdl/m4/gnulib-cache.m4: Import fopen module.
	* tests/others.at (directory): New test.

2008-09-16  Eric Blake  <ebb9@byu.net>

	Fix bootstrap for Solaris /bin/sh.
	* bootstrap: Avoid shell quoting pitfall.

2008-09-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	Typos in source code comments.
	* modules/m4.c: Fix typos in comments.
	* m4/input.c: Likewise.
	* src/main.c: Likewise.

2008-08-29  Eric Blake  <ebb9@byu.net>

	Fix manual date information.
	* doc/m4.texinfo: UPDATED refers to the day the manual was built,
	not the release date of M4.
	Based on a bison patch by Akim Demaille.

2008-08-27  Eric Blake  <ebb9@byu.net>

	Tweak -d examples.
	* doc/m4.texinfo (Invoking m4): Fix example, since order of -d
	matters.
	(Dumpdef): Fix typo.

2008-08-23  Eric Blake  <ebb9@byu.net>

	Allow debugmode control over whether defn(undef) warns.
	* ltdl/m4/gnulib-cache.m4: Import verify module.
	* m4/m4module.h (M4_DEBUG_TRACE_DEREF, M4_DEBUG_TRACE_INITIAL):
	New values.
	(M4_DEBUG_TRACE_VERBOSE, M4_DEBUG_TRACE_DEFAULT): Adjust.
	* m4/m4.c (m4_create): Start with debugmode = d.
	* src/main.c (usage): Mention this.
	(main): Let -E impact debug mode.
	* m4/utility.c (m4_symbol_value_lookup): Squelch undefined warning
	if flag is clear.
	* modules/gnu.c (builtin, inder): Likewise.
	* m4/debug.c (m4_debug_decode): Parse new mode.
	* src/freeze.c (produce_debugmode_state): Accomodate new mode.
	* doc/m4.texinfo (Debugging options): Mention change in the
	default behavior.
	(Debugmode): Mention new flag d.
	(Operation modes): Mention interaction with -E.
	(Undefine, Defn, Pushdef, Indir, Builtin, Dumpdef): Document and
	test its effect.
	* tests/options.at (--debugmode): Update tests.
	* tests/freeze.at (reloading debugmode): Likewise.
	* NEWS: Document this.
	Reported by Ralf Wildenhues; without this patch, M4 1.6+ would be
	incompatible with Autoconf 2.62.

2008-08-22  Eric Blake  <ebb9@byu.net>

	Improve --debugmode behavior.
	* m4/m4module.h (m4_debug_decode): Simplify interface.
	* m4/debug.c (m4_debug_decode): Remove parameter, and handle
	setting the new value.
	* modules/gnu.c (debugmode): Adjust caller.
	* src/freeze.c (reload_frozen_state): Likewise.
	* src/main.c (main): Likewise.
	(usage): Fix default for --debug.
	* doc/m4.texinfo (Debugging options): Add an example.

2008-08-21  Eric Blake  <ebb9@byu.net>

	Avoid regression in defn(undef).
	* doc/m4.texinfo (Trace): Enhance test, to cover regression
	recently fixed on the branch.

2008-08-18  Eric Blake  <ebb9@byu.net>

	Remove deprecated -N option; fixes a regression from 2006-09-14.
	* src/main.c (DIVERSIONS_OPTION): Delete.
	(long_options, OPTSTRING, main): Remove -N/--diversions option.
	* doc/m4.texinfo (Limits control): Remove it from the manual.
	* NEWS: Mention that it is gone.
	* tests/options.at (deprecated options): Update test.

	Improve 'git diff' of manual source.
	* .gitattributes (*.texi*): Add diff attribute.
	* bootstrap: Tell git how to use it.
	Inspired by Jim Meyering's similar patch for coreutils.

2008-08-07  Bruno Haible  <bruno@clisp.org>  (tiny change)

	Run m4 tests prior to gnulib unit tests.
	* Makefile.am (SUBDIRS): Swap order of directories.

2008-08-03  Eric Blake  <ebb9@byu.net>

	Stage 26: Allow embedded NUL in macro definitions.
	Clean up final few locations that did not track macro definitions
	by length, to allow embedded NUL.  Make m4_arg_len callers aware
	of issue of flattening builtins when determining length.
	Memory impact: none.
	Speed impact: none noticed.
	* m4/m4module.h (m4_arg_len): Add parameter.
	(M4ARGLEN): Provide default for the parameter.
	* m4/m4private.h (includes): Share xmemdup0.h among all libm4
	files.
	* m4/macro.c (m4_arg_len): Fail if builtins are not flattened.
	* m4/syntax.c (includes): Rely on m4private.h for xmemdup0.
	* m4/symtab.c (includes): Likewise.
	(m4_symbol_value_copy): Use xmemdup0.
	* m4/module.c (install_macro_table): Likewise.
	* src/freeze.c (reload_frozen_state): Likewise.
	* tests/freeze.at (reloading nul): Enhance test.
	* tests/null.m4: Likewise.
	* tests/null.err: Update expected output.
	* tests/null.out: Likewise.

	Fix regression in commenting unbalanced quotes, from 2008-02-16.
	* m4/m4private.h (m4__token_type): Add M4_TOKEN_COMMENT.
	* m4/input.c (m4__next_token, m4_print_token): Supply new token
	type for comments.
	* m4/macro.c (expand_token): Penalize comments, as they can
	contain unbalanced quotes; latent bug since 2007-12-07, exposed by
	passing $@ references built from comments.
	(expand_argument): Adjust caller.
	* tests/others.at (Comments): Enhance test to catch it.
	* NEWS: Mention the fix.

2008-07-30  Eric Blake  <ebb9@byu.net>

	Fix regression in trace output, introduced 2008-05-08.
	* m4/input.c (m4__push_symbol): When cloning chains, break pointer
	back to original chain; latent bug from 2008-02-02 that did not
	cause misbehavior until trace output read unfinished chain.
	* tests/builtins.at (debug): Add test for this.

2008-07-28  Eric Blake  <ebb9@byu.net>

	Optimize iteration examples.
	* examples/forloop2.m4: Avoid excess indir, by passing current
	counter value as parameter.
	* examples/foreachq3.m4: Avoid unneeded ifelse, by injecting an
	ignored argument.
	* doc/m4.texinfo (Improved forloop, Improved foreach): Update the
	documentation to match.

2008-07-26  Eric Blake  <ebb9@byu.net>

	Give example for O(n) foreach on m4 1.4.x.
	* examples/foreachq4.m4: New file.
	* Makefile.am (dist_pkgdata_DATA): Distribute it.
	* tests/others.at (recursion): Test it.
	* doc/m4.texinfo (Improved foreach): Document linear foreach with
	m4 1.4.5 and greater.

2008-07-19  Eric Blake  <ebb9@byu.net>

	Resynchronize docs from branch.
	* doc/m4.texinfo (Undefine, Pushdef): Mention warning on undefined
	name, particularly since the old documentation didn't match code.
	(Standard Modules): Add caveat about using __m4_version__.

2008-07-11  Eric Blake  <ebb9@byu.net>

	Bump required automake to 1.10a; regression introduced 2008-01-22.
	* configure.ac (AM_INIT_AUTOMAKE): Undo requirement downgrade to
	1.10.1, since we also rely on pkglibexecdir.
	* HACKING: Fix minimum requirement.
	* bootstrap: Likewise.
	* THANKS: Update.
	Reported by Joel E. Denny.

	Avoid bogus whitespace in @ovar, @dvar.
	* doc/m4.texinfo (ovar, dvar): Add @c.
	Based on patch by Ralf Wildenhues to Autoconf manual.

2008-06-23  Eric Blake  <ebb9@byu.net>

	Adjust to new gnulib-tool layout.
	* ltdl/m4/gnulib-cache.m4: Reformat.

	Fix bootstrap comment.
	* bootstrap: DOWNLOAD_PO was previously removed.

2008-06-19  Eric Blake  <ebb9@byu.net>

	Revert speed regression from 2008-06-16.
	* m4/output.c (m4_shipout_int): Avoid obstack_printf in hot path.
	* modules/m4.c (numb_obstack): Likewise.
	* m4/input.c (MATCH): Use fewer conditionals, and factor
	adjustment of S...
	(match_input): ...here for smaller code size.
	* m4/syntax.c (m4_reset_syntax, m4_set_quotes, m4_set_comment):
	Supply trailing NUL to delimiters, to meet contract of faster
	MATCH.

2008-06-18  Eric Blake  <ebb9@byu.net>

	Whitespace cleanup.
	* m4/m4module.h: Use consistent spacing for pointer parameters.
	* m4/m4private.h: Likewise.

	Stage 25b: Handle embedded NUL in changesyntax and friends.
	Track quote and comment delimiters by length, to allow embedded
	NUL.  Improve changesyntax to support assigning syntax to NUL.
	Memory impact: none.
	Speed impact: none noticed.
	* m4/m4module.h (m4_set_quotes, m4_set_comment, m4_set_syntax):
	Add parameter.
	(m4_reset_syntax): New prototype.
	* m4/syntax.c (add_syntax_set, subtract_syntax_set)
	(set_syntax_set, m4_set_quotes, m4_set_comment): Add parameter, to
	handle embedded NUL.
	(m4_set_syntax): Likewise.  Also, split code to reset the table...
	(m4_reset_syntax): ...into a new function.
	(m4_syntax_create): Adjust callers.
	* m4/input.c (match_input, MATCH): Add parameter.
	(m4__next_token, m4__next_token_is_open): Adjust callers.
	* modules/m4.h (m4_expand_ranges_func): Add parameter.
	* modules/m4.c (dumpdef): Handle NUL in dumped quotes.
	(changequote, changecom, translit, m4_expand_ranges): Track
	delimiter length.
	* modules/gnu.c (changesyntax): Handle embedded NUL.
	* src/freeze.c (reload_frozen_state): Adjust callers.
	* tests/freeze.at (reloading nul): Enhance test.
	* tests/null.m4: Likewise.
	* tests/null.out: Update expected output.
	* tests/null.err: Likewise.

2008-06-16  Eric Blake  <ebb9@byu.net>

	Stage 25a: Use obstack_printf for easier output.
	Convert macro tracing and other locations to use obstack_printf
	rather than hand-rolled equivalents.  Ensure that embedded NUL in
	trace output does not truncate the trace string.
	Memory impact: none.
	Speed impact: noticeable penalty, from obstack_printf overhead.
	* ltdl/m4/gnulib-cache.m4: Import obstack-printf-posix module.
	* m4/macro.c (trace_format): Delete; use obstack_printf instead.
	(trace_header, trace_pre, trace_post): All callers updated.
	* m4/output.c (m4_shipout_int, m4_tmpname): Use obstack_printf.
	(m4_divert_text): Speed up syncline output.
	* modules/m4.c (dumpdef): Handle embedded NUL.
	(numb_obstack): Speed up eval output.
	(maketemp): Use obstack_printf.
	* modules/format.c (format): Likewise.

	Add missing const qualifications.
	* m4/resyntax.c (m4_resyntax_map): Declare array elements as
	const.
	* modules/gnu.c (m4_builtin_table, m4_macro_table): Likewise.
	* modules/import.c (m4_builtin_table): Likewise.
	* modules/load.c (m4_builtin_table, m4_macro_table): Likewise.
	* modules/m4.c (m4_builtin_table): Likewise.
	* modules/modtest.c (m4_builtin_table, m4_macro_table): Likewise.
	* modules/mpeval.c (m4_builtin_table, m4_macro_table): Likewise.
	* modules/perl.c (m4_builtin_table, m4_macro_table): Likewise.
	* modules/shadow.c (m4_builtin_table, m4_macro_table): Likewise.
	* modules/stdlib.c (m4_builtin_table): Likewise.
	* modules/time.c (m4_builtin_table): Likewise.
	* modules/traditional.c (m4_macro_table): Likewise.

2008-06-10  Eric Blake  <ebb9@byu.net>

	Avoid corrupted frozen file if NUL appears on block boundary.
	* m4/output.c (insert_file): Separate consecutive quotearg blocks
	with \<newline>, in case last byte of first block was NUL.

2008-06-03  Eric Blake  <ebb9@byu.net>

	Fix printf type mismatches.
	* m4/m4module.h (m4_bad_argc): Alter parameter type.
	* m4/m4private.h (struct m4_call_info): Alter call_id type.
	* m4/macro.c (expand_macro, m4__adjust_refcount): Use correct
	specifiers.
	* m4/utility.c (m4_bad_argc): Likewise.

	Borrow bootstrap ideas from gnulib.
	* bootstrap (options, DOWNLOAD_PO): Remove --download-po; the
	advertized subset of languages didn't work.  Use --skip-po
	instead, for consistency with gnulib bootstrap.
	(func_get_translations): Use rsync, not wget.
	(func_update_po): Use a reference directory, to avoid changing
	timestamps on unchanged .po files.
	* TODO: Update accordingly.

	Fix fallout from previous patch.
	* doc/m4.texinfo (Builtin): Adjust expected output.

2008-06-02  Eric Blake  <ebb9@byu.net>

	Stage 24c: Improve display of macro names with embedded NUL.
	Quote instances of problematic characters in macro names when
	presented to user.  Track location via call_info rather than
	munging context for every expansion.
	Memory impact: none.
	Speed impact: slight penalty, due to more bookkeeping.
	* m4/m4module.h (m4_push_string_init): Add parameters.
	* m4/m4private.h (struct m4_macro_args): Remove argv0 and
	argv0_len, now redundant with info.
	(m4__push_wrapup_init): Add parameter.
	* m4/input.c (m4_push_string_init, m4__push_wrapup_init): Track
	location from caller, rather than context.
	(composite_peek, composite_read, match_input): Adjust callers.
	* m4/utility.c (m4_symbol_value_lookup): Quote macro name.
	(m4_verror_at_line): Allow NUL in macro name.
	* m4/macro.c (trace_flush, m4_trace_prepare, trace_pre): Allow NUL
	in trace.
	(expand_macro): No longer munge context location.
	(collect_arguments, m4_arg_text, m4_arg_empty, m4_arg_len)
	(m4_make_argv_ref, m4_push_arg, m4_wrap_args): Adjust callers.
	* modules/gnu.c (builtin, indir): Likewise.
	* tests/null.m4: Enhance test.
	* tests/null.err: Adjust expected output.
	* tests/null.out: Likewise.

	Stage 24b: Allow embedded NUL in macro names.
	Use length rather than NUL-termination when tracking macro names.
	All APIs dealing with symbol table changed.
	Memory impact: none.
	Speed impact: slight penalty, due to more bookkeeping.
	* m4/m4module.h (m4_symtab_apply_func, m4_symbol_lookup)
	(m4_symbol_pushdef, m4_symbol_define, m4_symbol_popdef)
	(m4_symbol_rename, m4_symbol_delete): Add length parameter.
	(m4_string): New type.
	* ltdl/m4/gnulib-cache.m4: Import xmemdup0 module.
	* m4/hash.c (m4_hash_string_hash, m4_hash_string_cmp): Account for
	length.
	* m4/symtab.c (m4_symtab_delete, m4_symtab_apply, symtab_fetch)
	(m4__symtab_remove_module_references, symbol_destroy_CB)
	(m4_symbol_lookup, m4_symbol_pushdef, m4_symbol_define)
	(m4_symbol_popdef, m4_symbol_rename, m4_set_symbol_name_traced)
	(m4_symbol_delete): Likewise.
	* modules/m4.h (struct m4_dump_symbol_data): Adjust type to allow
	passing length.
	* m4/macro.c (expand_token): Adjust all callers.
	* m4/module.c (install_builtin_table, install_macro_table):
	Likewise.
	* m4/utility.c (m4_symbol_value_lookup): Likewise.
	* modules/gnu.c (indir, renamesyms, m4symbols): Likewise.
	* modules/m4.c (define, undefine, pushdef, popdef)
	(dumpdef_cmp_CB, dump_symbol_CB, m4_dump_symbols, dumpdef)
	(traceon, traceoff): Likewise.
	* src/main.c (main): Likewise.
	* src/freeze.c (dump_symbol_CB, reload_frozen_state): Likewise.
	* tests/freeze.at (reloading nul): Augment test.
	* tests/null.out: Adjust expected output.

	Stage 24a: Use full call context in error reporting.
	Replace const char *macro_name with const m4_call_info *call, so
	that the next patch can pass the length of macro_name with
	embedded NUL.  Simplifies handling of global state.
	Memory impact: none.
	Speed impact: none noticed.
	* m4/m4module.h (m4_error, m4_warn): Change parameter type.
	(m4_error_at_line, m4_warn_at_line): Delete.
	(m4_debug_set_output, m4_skip_line, m4_bad_argc, m4_numeric_arg)
	(m4_parse_truth_arg, m4_symbol_value_lookup): Adjust all clients.
	* m4/m4private.h (m4__next_token): Likewise.
	* m4/utility.c (m4_verror_at_line): Alter parameter, and use
	caller's location if caller is provided.
	(m4_error, m4_warn): Change parameter type.
	(m4_error_at_line, m4_warn_at_line): Delete.
	(m4_bad_argc, m4_numeric_arg, m4_parse_truth_arg)
	(m4_symbol_value_lookup): Adjust all callers.
	* m4/debug.c (set_debug_file, m4_debug_set_output): Likewise.
	* m4/input.c (m4_skip_line, m4__next_token): Likewise.
	* m4/macro.c (expand_argument, collect_arguments, m4_macro_call)
	(process_macro): Likewise.
	* modules/m4.h (m4_make_temp_func): Likewise.
	* modules/evalparse.c (m4_evaluate): Likewise.
	* modules/format.c (arg_int, arg_long, arg_double, format):
	Likewise.
	* modules/gnu.c (builtin, changeresyntax, changesyntax, debugfile)
	(debuglen, debugmode, esyscmd, indir, mkdtemp, patsubst, regexp)
	(renamesyms, syncoutput, regexp_compile, substitute)
	(regexp_substitute, m4_resyntax_encode_safe): Likewise.
	* modules/m4.c (define, undefine, pushdef, popdef, ifdef, ifelse)
	(m4_dump_symbols, defn, syscmd, incr, decr, divert, undivert, dnl)
	(include, maketemp, mkstemp, m4exit, traceon, traceoff, substr):
	Likewise.
	* modules/stdlib.c (setenv, getpwuid, srand): Likewise.
	* modules/time.c (ctime, gmtime, localtime, mktime, strftime):
	Likewise.
	* tests/options.at (--syncoutput): Add test for invalid
	command-line argument.  Split xfailed portion...
	(--syncoutput and diversions): ...into new test.
	(unknown option): New test.
	* tests/freeze.at (reloading unknown builtin): Update expected
	output.

	Adjust to recent gnulib change.
	* configure.ac (AB_INIT): Delete, now that gnulib does this.

2008-05-28  Eric Blake  <ebb9@byu.net>

	Improve frozen debugmode behavior.
	* m4/debug.c (m4_debug_decode): Make empty debugmode additive.
	* src/main.c (main): Interleave -d with files.
	* tests/options.at (--debugmode): Update test.
	* tests/freeze.at (reloading debugmode): New test.
	* doc/m4.texinfo (Debugging options, Debugmode): Document the
	change.
	* NEWS: Likewise.

2008-05-27  Eric Blake  <ebb9@byu.net>

	Fix some testsuite failures on Solaris 8.
	* tests/builtins.at (esyscmd, syscmd): Skip tests if system(2) is
	broken.
	* tests/others.at (stderr closed): Likewise.  Also support Solaris
	wording for EBADF.
	(stdin closed): Skip test if closed stdin gets reopened.
	(stdout closed): Support Solaris wording for EBADF.
	* tests/testsuite.at (AT_CHECK_M4): Likewise.

	Fix configure message nesting, broken since 2001-09-20.
	* ltdl/m4/gmp.m4 (M4_LIB_GMP): Don't cache result; the test is
	not expensive, and AC_MSG_WARN doesn't work in AC_CACHE_CHECK.

	Support 'make dist' with BSD make.
	* Makefile.am (TESTSUITE_AT, MAINTAINERCLEANFILES): Qualify uses
	of the generated file tests/generated.at.
	(EXTRA_DIST, $(TESTSUITE)): Likewise for tests/package.m4.
	* tests/others.at (stdout closed): Accomodate OpenBSD /bin/sh.

2008-05-24  Eric Blake  <ebb9@byu.net>

	Test NUL in frozen files.
	* tests/testsuite.at (AT_CHECK_M4): Add parameter.
	* tests/freeze.at (reloading nul): New test.
	(AT_TEST_FREEZE): Inhibit -d when reloading frozen file.
	(reloading unknown builtin): Likewise.

2008-05-23  Eric Blake  <ebb9@byu.net>

	Improve handling of frozen file errors.
	* src/freeze.c (produce_frozen_state): Detect write failures.
	(reload_frozen_state): Use close_stream.
	* tests/freeze.at (freezing failure): New test.
	* THANKS: Update.
	Reported by Jean-Charles Longuet.

2008-05-19  Eric Blake  <ebb9@byu.net>

	In frozen file, split consecutive strings with newline.
	* src/freeze.c (dump_symbol_CB): Add newline to 'T', 'F'.
	(produce_frozen_state): Likewise for 'Q', 'C'.
	(reload_frozen_state): Parse the new layout.
	[GET_DIRECTIVE]: Fix format 1 regression from 2008-05-13.
	* tests/freeze.at (loading format 2): Rewrite to new format.
	(reloading unknown builtin): Likewise.
	(loading format 1): Make sure backslash-newline is not
	interpreted.
	* doc/m4.texinfo (Frozen file format 2): Document the format.
	* NEWS: Document this change.

	Fix xgettext options.
	* po/Makevars (XGETTEXT_OPTIONS): The " must be passed to
	xgettext.

	Fix spelling of René Seindal's name in --version output.
	* ltdl/m4/gnulib-cache.m4: Import propername module.
	* src/main.c (AUTHORS): Rewrite in terms of proper_name.
	* po/Makevars (XGETTEXT_OPTIONS): Detect new functions.
	* HACKING: Mention new prerequisite of gperf.

2008-05-18  Eric Blake  <ebb9@byu.net>

	Allow freezing the trace status of macros.
	* src/freeze.c (produce_symbol_dump): Let undefined traced macros
	through.
	(dump_symbol_CB): Also freeze trace state.
	* tests/freeze.at (reloading traced macros): New test.
	* doc/m4.texinfo (Using frozen files): Update documentation to
	mention new state.
	(Frozen file format 1): Improve synchronization with branch.
	(Frozen file format 2): Reorder directives, and add `d', `t'.
	* NEWS: Document this change.

2008-05-15  Eric Blake  <ebb9@byu.net>

	Fix frozen file regression in pushdef stacks from 2001-09-01.
	* src/freeze.c (dump_symbol_CB): Push all values on the stack, not
	just the current definition.
	(reverse_symbol_value_stack): New helper method.
	* tests/freeze.at (AT_TEST_FREEZE): New helper macro.
	(reloading pushdef stack): New test.
	(reloading unknown builtin): Enhance test.

2008-05-13  Eric Blake  <ebb9@byu.net>

	Fix frozen file regression in diversions from 2007-01-21.
	* m4/output.c (insert_diversion_helper): Add parameter.
	(m4_insert_file): Move contents...
	(insert_file): ...to this new helper, with added parameter.
	(m4_insert_diversion, m4_undivert_all, m4_freeze_diversions):
	Update callers.
	* src/freeze.c (produce_mem_dump): Simplify.
	* tests/freeze.at (large diversion): Test for this.

	Improve error message when frozen file is invalid.
	* src/freeze.c (decode_char): Add parameter.  Allow \<newline>
	line continuations.
	(reload_frozen_state): Track current line.
	* tests/freeze.at (loading format 1, loading format 2): Update to
	test this.

2008-05-10  Eric Blake  <ebb9@byu.net>

	Detect integer overflow when loading frozen file.
	* src/freeze.c (reload_frozen_state) [GET_NUMBER]: Rewrite to fail
	immediately on overflow.
	* tests/freeze.at (loading format 2): Test this.
	Reported by Jim Meyering.

2008-05-08  Eric Blake  <ebb9@byu.net>

	Stage 23: allow tracing of indirect macro calls.
	Track all trace information as part of the argv struct, rather
	than temporarily resetting global state.  Teach indir to trace
	macros that it invokes.
	Memory impact: slight penalty, due to larger argv struct.
	Speed impact: none noticed.
	* m4/m4module.h (m4_input_block): Remove.
	(m4_call_info): New opaque type.
	(m4_trace_prepare, m4_arg_info): New prototypes.
	(m4_macro_call, m4_push_string_finish, m4_input_print): Change
	prototypes.
	* m4/m4private.h (struct m4_macro_args): Add info field.
	(struct m4_call_info): New structure.
	(m4_arg_info): New accessor.
	* m4/input.c (m4_input_block): Make typedef local.
	(m4_push_string_init): Initialize length.
	(m4_push_string_finish, m4_input_print): Change signature, so that
	printing can be done before finalization.
	(struct input_funcs): Add parameter to print_func.
	(file_print, string_print, composite_print): Adjust accordingly.
	* m4/macro.c (trace_header, trace_flush, trace_pre, trace_post):
	Change signatures for stacked trace messages, and for using call
	context.
	(trace_prepre): Export and rename...
	(m4_trace_prepare): ...to this, for use by indir.  Alter signature
	to use call context.
	(collect_arguments): Alter signature, to manage new field.
	(expand_macro): Change call context management.  Move tracing...
	(m4_macro_call): ...here.  Remove redundant parameter.
	(m4_arg_argc): New function.
	(m4_make_argv_ref): Replace unused skip parameter with new trace
	parameter; manage new field.
	* modules/gnu.c (builtin, indir): Adjust callers.
	* src/main.c (usage): Update debugmode flag summary.
	* tests/null.m4: Enhance test.
	* tests/null.err: Update expected output.
	* tests/macros.at (Tracing Hanoi Towers): Likewise.
	* doc/m4.texinfo (Trace): Mention more about trace formatting.
	(Debugmode): Enhance description of 'c' and 'x'.  Enhance test to
	cover line numbering details in traces.
	(Debuglen): Enhance test to cover indir tracing.
	* NEWS: Mention these changes.
	Reported by Akim Demaille in the autoconf TODO file in 2000.

2008-05-07  Eric Blake  <ebb9@byu.net>

	Test for traceon regression just fixed in branch-1.6.
	* doc/m4.texinfo (Trace): Enhance test.
	* NEWS: Port news item from branch.

2008-05-05  Eric Blake  <ebb9@byu.net>

	Stage 22: allow builtin token concatenation outside $@.
	Adjust the input and argument parsing engines to append builtins
	alongside text.  Make define warn when builtins must be
	flattened.
	Memory impact: slight penalty, with fewer builtins flattened.
	Speed impact: slight penalty, from more bookkeeping.
	* m4/m4module.h (m4_is_arg_composite): New prototype.
	(m4_symbol_value_copy): Change return type.
	(m4_arg_text): Add parameter.
	(M4ARG): Adjust callers.
	* m4/m4private.h: Adjust comments.
	* m4/symtab.c (m4_symbol_value_copy): Detect when builtins are
	flattened.
	* m4/input.c (init_builtin_token): Add parameter, and allow
	concatenating builtins.
	(m4__next_token): Adjust caller.
	* m4/macro.c (m4_is_arg_composite): New function.
	(expand_argument): Allow builtin concatenation.
	(m4_arg_text): Add parameter.
	(m4__arg_adjust_refcount, m4__arg_print): Adjust callers.
	(m4_arg_equal): Fix comparison of builtin tokens.
	* modules/m4.c (define, pushdef): Warn when flattening builtins.
	* doc/m4.texinfo (Define): Remove dead comment.
	(Defn): Update to reflect code changes.
	* tests/builtins.at (defn): Remove xfail.
	* NEWS: Document this change.

2008-05-03  Eric Blake  <ebb9@byu.net>

	Document define_blind.
	* doc/m4.texinfo (Ifelse): Add a new composite macro.
	* THANKS: Update.
	Suggested by Mike R.

2008-05-01  Eric Blake  <ebb9@byu.net>

	Avoid -Wshadow compiler warnings.
	* m4/output.c (threshold_diversion_CB): s/div/diversion/.
	* m4/macro.c (make_argv_ref, arg_symbol, m4_arg_symbol)
	(m4_is_arg_text, m4_is_arg_func, m4_arg_text, m4_arg_empty)
	(m4_arg_len, m4_arg_func, m4__arg_print, m4_make_argv_ref)
	(m4_push_arg, m4__push_arg_quote): s/index/arg/.
	* modules/format.c (format): Likewise.
	* modules/m4.c (ifelse): Likewise.

	Improve debugmode testing, based on recent branch-1.6 regressions.
	* doc/m4.texinfo (Debugmode): Enhance tests.
	* tests/generate.awk: Run tests from stdin, not input.m4.  Support
	stderr munging when using -I examples.

	Fix regression in define from 2008-02-22.
	* m4/m4module.h (m4_symbol_value_copy): Add parameter.
	* m4/symtab.c (m4_symbol_value_copy): Support copying $@
	back-references.
	* m4/macro.c (expand_argument): Update callers.
	* modules/m4.c (define, pushdef): Likewise.
	* tests/builtins.at (define): Enhance test to catch this.

2008-04-21  Eric Blake  <ebb9@byu.net>

	Simplify previous patch.
	* tests/m4.in: Compress assignment.
	Suggested by Gary V. Vaughan.

	Fix --disable-shared testsuite regression from previous patch.
	* tests/m4.in: Export M4MODPATH, so that recursive m4 invocations
	will also work.

	Fix spelling of attribution to Christopher Strachey.
	* doc/m4.texinfo (History, Inhibiting Invocation): Fix typo.
	* THANKS: Update.
	Reported by Fernando Carrijo.

2008-04-17  Eric Blake  <ebb9@byu.net>

	Fix testsuite bug when SIGPIPE is ignored.
	* tests/builtins.at (divert): Consume all of m4's output, to avoid
	spurious write failure.
	* src/main.c (main): In batch mode, restore default handling of
	SIGPIPE.
	* doc/m4.texinfo (Operation modes): Document SIGPIPE behavior.
	* THANKS: Update.
	Reported by Bob Proulx, via his autobuilder.

2008-04-15  Eric Blake  <ebb9@byu.net>

	Fix 'make installcheck' after './configure --prefix-progname'.
	* tests/testsuite.at (AT_CHECK_M4): Allow overriding the m4
	program name.
	(HELP_OTHER, PREPARE_TESTS): Document and use $M4.
	* tests/builtins.at (patsubst): Avoid space-tab.
	(divert, mkdtemp, mkstemp): Adjust tests to use $M4.
	* tests/options.at (--debugfile): Likewise.
	* tests/others.at (stdin seekable): Likewise.
	(fstab): Avoid space-tab.
	* Makefile.am (installcheck-local): Accomodate transformed name.
	(DISTCHECK_CONFIGURE_FLAGS): Ensure no regressions, by using gm4
	during 'make distcheck'.
	* cfg.mk: New file, borrowed from branch.

	Update prerequisite tools to match recent releases.
	* configure.ac (AC_PREREQ): Rely on released autoconf.
	(LT_PREREQ): Rely on released libtool.
	* tests/testsuite.at (m4_version_prereq): Update dependence.
	* bootstrap: Mention prerequisites.

	Work around OS/2 limitation of printf(1).
	* tests/null.m4: Use m4, not printf, to generate NUL byte.
	* tests/null.out: Check for esyscmd failure.
	Reported by Elbert Pol.

2008-04-14  Eric Blake  <ebb9@byu.net>

	Stage 21b: $@ concatenates builtins, m4wrap takes builtins.
	Improve arg_print to handle builtin tokens when printing to a
	known chain, rather than always flattening builtins.  This allows
	m4wrap and $@ back-references to handle embedded builtin tokens.
	Memory impact: none.
	Speed impact: slight penalty, from more bookkeeping.
	* m4/m4module.h (m4_push_builtin): Add parameter.
	(m4_builtin_print, m4_push_wrapup_init, m4_push_wrapup_finish)
	(m4_arg_print, m4_symbol_value_print): Rename and reduce scope...
	* m4/m4private.h (m4__builtin_print, m4__push_wrapup_init)
	(m4__push_wrapup_finish, m4__arg_print, m4__symbol_value_print):
	...to these, in some cases adding a parameter.
	(m4__append_builtin): New prototype.
	* m4/builtin.c (m4_builtin_print): Alter signature to print
	builtin to a growing symbol chain.
	* m4/symtab.c (m4__symbol_value_print): Alter signature.
	(m4_symbol_print, dump_symbol_CB): Adjust callers.
	* m4/input.c (builtin_peek, builtin_read, builtin_unget)
	(builtin_print, builtin_funcs): Delete, handled via composite
	blocks now.
	(struct m4_input_block): Delete u.builtin member.
	(init_builtin_token): Only use composite block.
	(m4__append_builtin): New function.
	(m4_push_builtin, m4__push_wrapup_init): Alter signature.
	(m4__push_symbol): Allow builtin tokens.
	(m4__push_wrapup_finish): Rename.
	(composite_print, m4_print_token): Adjust callers.
	* m4/macro.c (m4_wrap_args, collect_arguments): Allow builtin
	tokens.
	(m4__arg_print): Alter signature.
	(trace_prepre, trace_pre, m4_arg_text, m4_arg_equal): Adjust
	callers.
	* modules/m4.c (m4wrap): Allow builtin tokens.
	(defn, errprint): Adjust callers.
	* modules/gnu.c (builtin): Likewise.
	* doc/m4.texinfo (M4wrap): New test.
	(Debuglen): Adjust expected output.

	Stage 21a: Optimize checks for end of input.
	Create a new polymorphic input block type, which always fails with
	CHAR_EOF, so that remaining input routines no longer have to check
	for NULL input block.
	Memory impact: none.
	Speed impact: noticeable improvement, from fewer conditionals.
	* m4/input.c (eof_funcs, input_eof): New objects.
	(eof_peek, eof_read, eof_unget): New functions.
	(file_clean, m4_push_string_init, pop_input, m4_push_wrapup_init)
	(m4_pop_wrapup, next_char, peek_char, unget_input, m4_input_init)
	(m4_input_exit): Use placeholder to guarantee non-NULL isp and
	wsp.
	(next_char): Rename retry to allow_unget, and change sense for
	easier manipulation.  All callers changed.

	Improve OS/2 detection.
	* modules/gnu.c (m4_macro_table): Ensure all possible identifiers
	are defined, not just the first.  The testsuite ensures that
	exactly one gets defined.
	* m4/system_.h [__EMX__]: OS/2 is not Unix-compatible, no matter
	what other pre-defined macros it has.
	* THANKS: Update.
	Reported by Elbert Pol.

	Ensure __m4_version__ is unquoted.
	* tests/builtins.at (__m4_@&t@version__): Augment test.

	Avoid GNU make failure on tarball.
	* Makefile.am (EXTRA_DIST): Distribute cfg.mk and maint.mk.

2008-04-10  Eric Blake  <ebb9@byu.net>

	Allow back-referenced macro names; fixes 2008-03-13 regression.
	* m4/m4module.h (m4_symbol_value_lookup): Change prototype.
	* m4/utility.c (m4_symbol_value_lookup): Change signature.
	* modules/m4.c (undefine, popdef, ifdef, m4_dump_symbols, defn):
	Adjust all callers.
	* tests/others.at (ifndef): New test.

	Be namespace clean for M4 version; fixes 2008-04-08 regression.
	* configure.ac (version): Rename...
	(M4_VERSION): ...to this, since using 'version' broke po.m4.

2008-04-09  Eric Blake  <ebb9@byu.net>

	Mention 1.4.11 release.
	* doc/m4.texinfo (History, Defn, Ifdef, Ifelse, M4wrap)
	(Extensions, Improved foreach): Distinguish 1.4.11 and 1.6.
	(Format): Add test of C99 hex-float parsing.
	* NEWS: Mention 1.4.11 release.
	* tests/builtins.at (divert): Add additional test.

2008-04-08  Eric Blake  <ebb9@byu.net>

	Overhaul inter-version releases to work with git.
	* configure.ac (version): New variable, which has nicer version
	contents when using git 1.5.5+, hardcoded to 1.9a otherwise.
	(TIMESTAMP): Delete, since CVS id expansion died with transition
	to git.
	(AM_INIT_AUTOMAKE): Use version to decide gnu vs. gnits.
	* build-aux/mkstamp: Delete, no longer used.
	* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Kill, to speed up
	rebuilds when timestamps don't matter.
	(MKSTAMP): Delete, no longer used.
	(EXTRA_DIST): No longer worry about mkstamp.
	(.version): New rule and distributed file.
	(doc/m4.1, tests/package.m4): Depend on .version, not
	configure.ac, for timestamp.
	* ltdl/m4/gnulib-cache.m4: Import git-version-gen module.
	* modules/gnu.c (__m4_version__): TIMESTAMP no longer exists.
	* src/main.c (main): Likewise.

2008-03-28  Eric Blake  <ebb9@byu.net>

	Use GNUmakefile module.
	* ltdl/m4/gnulib-cache.m4: Import gnumakefile module.
	* Makefile.am: Split off maintainer rules...
	* maint.mk: ...into this new file.

2008-03-18  Eric Blake  <ebb9@byu.net>

	Stage 20b: make m4wrap obey POSIX fifo ordering.
	Improve input engine to support location changes within symbol
	chains, then convert m4wrap to always build symbol chain.
	Memory impact: none.
	Speed impact: slight penalty, from more m4wrap bookkeeping.
	* m4/m4module.h (m4_wrap_args): Add prototype.
	* m4/m4private.h (enum m4__symbol_chain_type): Add M4__CHAIN_LOC.
	(struct m4__symbol_chain): Add struct u_l.
	* m4/input.c (m4_push_wrapup_init, m4_push_wrapup_finish): Use
	new link type.
	(composite_peek, composite_read, composite_clean): Handle location
	link.
	* m4/macro.c (m4_wrap_args): New function.
	* modules/m4.c (m4wrap): Use it.
	* doc/m4.texinfo (M4wrap): Sync with branch and POSIX.
	(Extensions): Document extension of multiple arguments.
	(Location, Improved m4wrap): Adjust example to match FIFO order.
	* tests/builtins.at (wrap): Likewise.
	* NEWS: Document this change.

2008-03-17  Eric Blake  <ebb9@byu.net>

	Stage 20a: reduce unget's in input engine.
	Now that out-of-range input placeholders like CHAR_BUILTIN are
	consumed outside of next_char, next_token should always consume
	rather than peek at the first character.  Fewer peeks results in
	less ungetc overhead.
	Memory impact: none.
	Speed impact: noticeable improvement, from fewer function calls.
	* m4/input.c (struct input_funcs): Alter read_func prototype.
	(next_char, file_read, buildin_read, string_read, composite_read):
	Add allow_argv parameter.
	(init_builtin_token, init_argv_symbol): Require all prior input to
	be consumed.
	(m4_skip_line, match_input, consume_syntax): Adjust callers.
	(m4__next_token): Consume first byte without peek.

	Update for fresh bootstrap.
	* ltdl/m4/gnulib-cache.m4: Updated copyright from upstream.

2008-03-15  Eric Blake  <ebb9@byu.net>

	Document join, in order to fix bug in m4wrap example.
	* examples/join.m4: New file.
	* examples/wraplifo2.m4: Likewise.
	* Makefile.am (EXTRA_DIST): Add new files.
	* doc/m4.texinfo (Improved m4wrap): New node.
	(Defn, Location): Enhance tests.
	(Shift): Document the composite macro join.
	(Incompatibilities): Move documentation of LIFO vs. FIFO...
	(M4wrap): ...here, to match improved example.

2008-03-13  Eric Blake  <ebb9@byu.net>

	Stage 19c: allow builtin tokens in more macros.
	Allow builtin tokens inside symbol chains, although for now, they
	are not allowed inside comments or quotes.  Enable builtin token
	handling in more macros, if only to consistently diagnose invalid
	macro names.
	Memory impact: none.
	Speed impact: slight impact, due to more bookkeeping.
	* m4/m4module.h (m4_symbol_value_lookup, m4_builtin_print): New
	prototypes.
	* m4/m4private.h (enum m4__symbol_chain_type): Add
	M4__CHAIN_FUNC.
	(struct m4__symbol_chain): Add builtin member.
	* m4/utility.c (m4_symbol_value_lookup): New method.
	* m4/builtin.c (m4_builtin_print): New function.
	* m4/symtab.c (m4_symbol_value_print): Use it.
	* m4/input.c (builtin_print): Likewise.
	(m4__push_symbol): Allow pushing builtin tokens.
	(composite_peek, composite_read, composite_unget, composite_clean)
	(composite_print): Handle builtin tokens.
	(init_builtin_token): Allow builtin tokens from composite input.
	(m4__next_token): Flatten builtins inside comment or string.
	* m4/macro.c (expand_argument): Strengthen assertion.
	(collect_arguments, m4_arg_equal, m4_arg_print, m4_push_args):
	Handle builtin tokens.
	(arg_symbol): Add parameter, and allow NULL level.
	(m4_arg_symbol, m4__push_arg_quote): Adjust callers.
	(m4_arg_text): Ensure all builtins have been flattened.
	* modules/m4.c (defn, dumpdef, popdef, traceoff, traceon)
	(undefine, m4_dump_symbols): Warn on invalid macro names.
	(ifdef, ifelse, shift): Handle builtin tokens.
	* modules/gnu.c (m4symbols): Likewise.
	* doc/m4.texinfo (Defn, Ifdef, Ifelse): Document and test the new
	behavior.
	(Debuglen): Likewise, and remove xfail.
	* NEWS: Mention the change.

	Stage 19b: invert sense of bit for handling builtin tokens.
	Pass builtin tokens by default, rather than as the exception, so
	that the logic can consistently refer to flattening arguments.
	Memory impact: none.
	Speed impact: none.
	* m4/m4module.h (M4BUILTIN_ENTRY): New convenience macro.
	(M4_BUILTIN_GROKS_MACRO): Rename...
	(M4_BUILTIN_FLATTEN_ARGS): ...and invert sense.
	(m4_symbol_value_groks_macro, m4_symbol_groks_macro): Likewise...
	(m4_symbol_value_flatten_args, m4_symbol_flatten_args): ...to
	this.
	* m4/m4private.h (VALUE_MACRO_ARGS_BIT)
	(m4_symbol_value_groks_macro): Likewise...
	(VALUE_FLATTEN_ARGS_BIT, m4_symbol_value_flatten_args): ...to
	this.
	* m4/symtab.c (m4_symbol_value_groks_macro): Likewise...
	(m4_symbol_value_flatten_args): ...to this.
	* m4/macro.c (collect_arguments): Accomodate changed sense.
	* m4/module.c (m4__module_open): Require arguments if flattening
	is requested.
	* m4/input.c (m4_push_string_finish): For now, flatten all
	builtins pushed as back-references.
	* modules/gnu.c (m4_builtin_table, builtin): Adjust all clients.
	* modules/import.c (m4_builtin_table): Likewise.
	* modules/load.c (m4_builtin_table): Likewise.
	* modules/modtest.c (m4_builtin_table): Likewise.
	* modules/mpeval.c (m4_builtin_table): Likewise.
	* modules/perl.c (m4_builtin_table): Likewise.
	* modules/shadow.c (m4_builtin_table): Likewise.
	* modules/stdlib.c (m4_builtin_table): Likewise.
	* modules/time.c (m4_builtin_table): Likewise.
	* modules/m4.c (m4_builtin_table): Likewise.
	(mkstemp): Undo #undef hack from 2006-10-23, now that macro names
	are stringized without preprocessor expansion.
	* doc/m4.texinfo (Defn): Update comments to match reality.
	(Debuglen): Update test now that user macros pass builtin tokens.

	Stage 19a: sort and cache builtins loaded by a module.
	Rather than repeatedly using dlsym to browse the builtin table,
	copy off the table at module load time.  Then, the input engine
	merely refers to the copy instead of duplicating information.
	Memory impact: slight penalty, due to more memory per module, but
	offset by less memory in input engine.
	Speed impact: slight improvement, due to faster builtin	lookups.
	* m4/m4module.h (m4_set_symbol_value_builtin): Delete.  Use
	m4_builtin_find_by_* instead.
	(m4_builtin_find_by_func): Change return type.
	* m4/m4private.h (m4__builtin): New struct.
	(m4_module): Add sorted list of loaded builtins.
	(struct m4_symbol_value): Change type of builtin value.
	(m4__set_symbol_value_builtin): New prototype and fast accessor.
	(m4_get_symbol_value_func, m4_get_symbol_value_builtin): Adjust to
	new field type.
	* m4/symtab.c (m4_set_symbol_value_builtin): Rename...
	(m4__set_symbol_value_builtin): ...and populate additional fields,
	based on new type.
	(m4_get_symbol_value_func, m4_get_symbol_value_builtin): Adjust to
	new field type.
	* m4/module.c (install_builtin_table): Use cached table.
	(compare_builtin_CB): New helper function.
	(m4__module_open): Populate table.
	(module_remove): Free table.
	* m4/builtin.c (compare_builtin_name_CB): New helper function.
	(m4_builtin_find_by_name): Rewrite to use sorted table.
	(m4_builtin_find_by_func): Change return type.
	* m4/input.c (struct m4_input_block): Simplify u_b, since most
	fields can be determined from builtin.
	(builtin_peek, builtin_read, builtin_unget, init_builtin_token)
	(m4__next_token): Alter parsing so that only init_builtin_token
	consumes a builtin.
	(builtin_print, m4_push_builtin): Adjust all users.
	* tests/macros.at (Arity, defn, and freeze): Fix typo.

	Consistently cast malloc results, for C++ compilation.
	* m4/builtin.c (m4_builtin_find_by_name): Add cast.
	* m4/hash.c (m4_hash_new, m4_get_hash_iterator_next, node_new)
	(m4_hash_resize, maybe_grow): Likewise.
	* m4/m4.c (m4_create): Likewise.
	* m4/macro.c (expand_macro): Likewise.
	* m4/output.c (m4_tmpname): Likewise.
	* m4/path.c (search_path_add): Likewise.
	* m4/symtab.c (m4_symtab_create, m4_symbol_value_create)
	(symtab_fetch): Likewise.
	* m4/syntax.c (m4_syntax_create): Likewise.
	* modules/gnu.c (regexp_compile): Likewise.
	* src/main.c (main): Likewise.
	* src/freeze.c (reload_frozen_state): Likewise.

2008-03-06  Eric Blake  <ebb9@byu.net>

	Fix nested builtin(`shift',$@) regression from 2008-02-23.
	* m4/macro.c (make_argv_ref): Don't output expansion text when
	making wrapper for builtin or indir.
	* tests/builtins.at (builtin): New test.
	* NEWS: Document the fix.
	Reported by Andreas Schwab.

2008-03-04  Eric Blake  <ebb9@byu.net>

	The gnulib module free was deprecated.
	* ltdl/m4/gnulib-cache.m4: Remove free module.

2008-02-29  Eric Blake  <ebb9@byu.net>

	Import news from 1.4.10b.
	* NEWS: Update from branch.

2008-02-23  Eric Blake  <ebb9@byu.net>

	Stage 18: try harder to reuse argv in recursion.
	When pushing arguments that contain an existing $@ ref, reuse the
	ref rather than creating another layer of wrappers.
	Memory impact: noticeable improvement, due to better $@ reuse.
	Speed impact: noticeable improvement, due to O(n^2) to O(n)
	reduction in unboxed recursion.
	* m4/macro.c (make_argv_ref): Avoid wrapping $@ when possible.
	(m4_push_args): Let make_argv_ref take care of pending data.
	* doc/m4.texinfo (Improved foreach): Tweak wording to match new
	performance capability.
	* tests/others.at (recursion): Add tests to avoid performance
	regression.

2008-02-22  Eric Blake  <ebb9@byu.net>

	Update NEWS.
	* NEWS: Document change to __gnu__ on 2008-02-11.

	Stage 17: pass argv through quoted strings.
	Allow the concatenation of $@ references with other text input
	inside quoted contexts, which requires distinguishing between a
	wrapper around many arguments vs. a reference serving as part of a
	single argument.  Also optimize based on whether argv contains
	builtin tokens that might need flattening to the empty string.
	Memory impact: noticeable improvement, due to O(n^2) to O(n)
	reduction from total reuse of $@ references.
	Speed impact: noticeable improvement, due to O(n^2) to O(n)
	reduction in boxed recursion.
	* m4/m4module.h (m4_arg_equal, m4_arg_len): Add parameter.
	(M4ARGLEN): Adjust definition.
	* m4/m4private.h (struct m4__symbol_chain): Add has_func member.
	(struct m4_symbol_value): Add wrapper and has_func members.
	(struct m4_macro_args): Add flatten and has_func members.
	* m4/input.c (append_quote_token): Return argv refs inside quoted
	strings.
	(init_argv_symbol): Populate new fields.
	* m4/macro.c (expand_argument, collect_arguments, make_argv_ref)
	(m4_make_argv_ref): Likewise.
	(arg_symbol, arg_mark, m4_is_arg_text, m4_is_arg_func): Use new
	fields.
	(m4_arg_equal, m4_arg_len): Handle quoted argv references, and add
	new parameter.
	* modules/m4.c (ifelse): Adjust caller.

2008-02-22  Gary V. Vaughan  <gary@gnu.org>

	Fix regression in argument collection, from 2008-01-21.
	* m4/input.c (m4__next_token): When DEBUG_INPUT is defined,
	undo argument collection optimisation for strings, so that
	m4_print_token doesn't abort when it otherwise receives an
	unprintable M4_SYMBOL_VOID type token.

2008-02-20  Eric Blake  <ebb9@byu.net>

	Stage 16: cache quotes and improve m4_arg_print.
	Cache rather than always copying quotes when pushing $@ refs; in
	particular, reconstruct single-byte quotes on the fly.  Allow NUL
	through m4wrap.  Improve sharing of code that prints arguments.
	Memory impact: slight improvement, due to cached quotes.
	Speed impact: slight improvement, due to less copying.
	* m4/m4module.h (m4_symbol_value_print, m4_symbol_print)
	(m4_arg_print): Adjust prototypes.
	(m4_dump_args): Delete.
	(m4_push_wrapup): Split...
	(m4_push_wrapup_init, m4_push_wrapup_finish): ...into these
	prototypes.
	* m4/m4private.h (struct m4_syntax_table): Add cached_quote
	member.
	(m4__quote_cache, m4__quote_uncache): New prototypes.
	* m4/syntax.c (m4_syntax_create): Initialize the cache.
	(m4__quote_cache): New function.
	(m4_set_syntax): Update caller.
	* m4/symtab.c (m4_symbol_value_print): Add parameter.
	(m4_symbol_print, dump_symbol_CB): Adjust all callers.
	* m4/utility.c (m4_dump_args): Delete; callers should use
	m4_arg_print instead.
	* m4/input.c (m4_push_wrapup_init, m4_push_wrapup_finish): Split
	implementation, and allow embedded NUL.
	(m4_print_token, pop_input, composite_print, composite_peek):
	(composite_read, append_quote_token): Adjust all callers.
	* m4/macro.c (trace_prepre, m4_arg_text, make_argv_ref):
	Likewise.
	(m4_arg_print): Add parameters.
	(trace_pre): Rewrite in terms of m4_arg_print.
	* modules/m4.c (errprint): Likewise.
	(m4wrap): Rewrite to allow embedded NUL.
	(dumpdef): Adjust caller.
	* doc/m4.texinfo (Debuglen): Enhance debuglen test.
	* tests/null.m4: Test for NUL in m4wrap.
	* tests/null.out: Update expected output.

	Fix out-of-bounds read for sanitized macro names, from 2008-02-06.
	* m4/utility.c (m4_verror_at_line): Properly terminate the string.
	Reported by Ralf Wildenhues.

	* doc/m4.texinfo (Debuglen, Changesyntax): Fix typos.

2008-02-19  Eric Blake  <ebb9@byu.net>

	Clean up example on filtering defined symbols.
	* doc/m4.texinfo (Foreach, Improved foreach): Document another
	shortcoming in foreach.m4, and improve filter example by using
	foreach2.m4.

	* src/main.c (usage): Fix typo.

2008-02-18  Eric Blake  <ebb9@byu.net>

	Avoid some magic numbers.
	* m4/m4private.h (CHAR_EOF, CHAR_BUILTIN, CHAR_QUOTE, CHAR_ARGV)
	(CHAR_RETRY): Define in terms of UCHAR_MAX.
	* m4/syntax.c (m4_syntax_create, set_syntax_set)
	(reset_syntax_set, check_is_single_quotes)
	(check_is_single_comments, check_is_macro_escaped)
	(m4_set_quotes, m4_set_comment): Likewise.
	* modules/gnu.c (regexp_compile): Likewise.
	* modules/m4.c (translit): Likewise.
	* src/freeze.c (produce_syntax_dump): Likewise.
	Reported by Ralf Wildenhues.

2008-02-16  Eric Blake  <ebb9@byu.net>

	Add regression test for multi-character quote recursion.
	* examples/foreach2.m4: Use $0 rather than spelling out name.
	* examples/foreachq2.m4: Likewise.
	* examples/forloop2.m4: Likewise.
	* examples/hanoi.m4: Likewise.
	* examples/trace.m4: Likewise.
	* doc/m4.texinfo (Improved forloop): Document advantage of $0.
	(Improved foreach): Adjust dump from file.

	Stage 15: return argv refs back to collect_arguments.
	Collect an entire $@ reference at once rather than one argument at
	a time, outside of quotes (but inside quotes, $@ is still
	flattened for now).  The skip_last field allows concatenation of
	$@ with other text when collecting arguments.
	Memory impact: noticeable improvement, due to better reuse of $@.
	Speed impact: noticeable improvement, due to less parsing.
	* m4/m4private.h (CHAR_ARGV): New input engine sentinel.
	(enum m4__token_type): Add M4_TOKEN_ARGV.
	(struct m4__symbol_chain): Add skip_last member to argv link.
	(m4__next_token): Add parameter.
	* m4/input.c (peek_char, file_peek, builtin_peek, string_peek)
	(composite_peek, m4__next_token): Add new parameter.
	(composite_read, append_quote_token): Support argv in quotes.
	(init_argv_symbol): New function.
	(m4__push_symbol, match_input, consume_syntax)
	(m4__next_token_is_open, m4_print_token): Adjust callers.
	* m4/macro.c (m4_macro_expand_input, m4__arg_adjust_refcount)
	(arg_mark, m4_arg_text, make_argv_ref): Likewise.
	(expand_argument, collect_arguments): Handle new token.
	(arg_symbol): Drill through $@ reference.
	* m4/syntax.c (set_quote_age): Detect disabled comments.
	* m4/symtab.c (dump_symbol_CB) [DEBUG_SYM]: Fix debug code.

2008-02-15  Eric Blake  <ebb9@byu.net>

	* modules/gnu.c (regexp_compile): Use a fastmap for regex speed.

2008-02-13  Eric Blake  <ebb9@byu.net>

	Fix texinfo grammar.
	* doc/m4.texinfo (Eval, Incompatibilities): Use @. after capital.
	(History): Use @: after abbreviations.
	(M4exit): Use correct Latin abbreviation.
	(Dumpdef, Debugmode, Frozen file format 2): Use correct spacing
	between sentences.

2008-02-11  Eric Blake  <ebb9@byu.net>

	Allow builtin text macros to specify number of arguments.
	* m4/m4module.h (struct m4_macro): Add argument limits to builtin
	text macros.
	* m4/module.c (install_macro_table): Allow text macros to warn on
	extra arguments.
	* modules/gnu.c (m4_macro_table): Update all clients.
	* modules/load.c (m4_macro_table): Likewise.
	* modules/mpeval.c (m4_macro_table): Likewise.
	* modules/perl.c (m4_macro_table): Likewise.
	* modules/shadow.c (m4_macro_table): Likewise.
	* modules/traditional.c (m4_macro_table): Likewise.
	* modules/modtest.c (m4_macro_table): Likewise.  Also add text
	macros, for testing this.
	* doc/m4.texinfo (Standard Modules): Update text, and enhance
	test.
	* tests/modules.at (modules: text): New test.

	Fix regression in command line -D option, from 2006-08-25.
	* m4/m4private.h (m4_symbol_value_create): Delete fast accessor.
	* m4/m4module.h: Fix typo.
	* m4/symtab.c (m4_symbol_value_create): Prime the maximum number
	of arguments.
	* tests/macros.at (Command line define): Enhance test.
	* tests/others.at (nul character): Enhance test.
	* tests/null.m4: Likewise.
	* tests/null.out: Likewise.

	Use gnulib's git-merge-changelog driver when available.
	* .gitattributes: Add merge attributes for ChangeLog.
	* bootstrap: Install driver, if not already present.

2008-02-06  Eric Blake  <ebb9@byu.net>

	Fix security hole introduced 2007-11-23.
	* m4/utility.c (m4_verror_at_line): Properly escape macro names.
	* src/main.c (main): Manage quoteargs defaults.
	* doc/m4.texinfo (Indir): Document and test this.

	Using raw strtod is not portable.
	* ltdl/m4/gnulib-cache.m4: Import the strtod module.

2008-02-02  Eric Blake  <ebb9@byu.net>

	Consistently use size_t for number of arguments.
	* m4/m4module.h (m4_builtin_func): Alter prototype.
	(struct m4_builtin): Adjust type of min_args, max_args.
	(M4BUILTIN, M4BUILTIN_HANDLER): Adjust all builtins.
	(m4_bad_argc, m4_dump_args, m4_macro_call, m4_arg_argc)
	(m4_arg_symbol, m4_is_arg_text, m4_is_arg_func, m4_arg_text)
	(m4_arg_equal, m4_arg_empty, m4_arg_len, m4_arg_func)
	(m4_arg_print, m4_push_arg): Adjust all clients.
	* m4/m4private.h (struct m4__symbol_chain, m4_symbol_value)
	(m4_macro_args): Adjust type of various fields.
	(m4__push_arg_quote): Adjust all clients.
	* m4/input.c (m4_pop_wrapup): Likewise.
	* m4/macro.c (m4_macro_call, trace_pre, make_argv_ref)
	(arg_symbol, m4_arg_symbol, m4_is_arg_text, m4_is_arg_func)
	(m4_arg_text, m4_arg_equal, m4_arg_empty, m4_arg_len)
	(m4_arg_func, m4_arg_print, m4_make_argv_ref, m4_push_arg)
	(m4__push_arg_quote, m4_push_args, m4_arg_argc): Likewise.
	* m4/utility.c (m4_bad_argc, m4_dump_args): Likewise.
	* modules/evalparse.c (m4_evaluate): Likewise.
	* modules/gnu.c (changesyntax): Likewise.
	* modules/m4.c (m4_dump_symbols, undefine, popdef, ifelse, defn)
	(undivert, traceon, traceoff): Likewise.
	* modules/m4.h (m4_dump_symbols_func): Likewise.
	* modules/perl.c (perleval): Likewise.

	Stage 14b: allow pushing argv references.
	Push a $@ reference to the input engine in one go, rather than
	pushing each element.  For now, argument collection still gets one
	argument of a $@ at a time; but the penalties of this patch make
	it easier to manage $@ efficiently in future patches.
	Memory impact: noticeable penalty, due to larger struct and O(n)
	to O(n^2) on unboxed recursion.
	Speed impact: noticeable penalty, due to more bookkeeping.
	* m4/m4private.h (struct m4__symbol_chain): Add comma and quotes
	fields.
	(struct m4_macro_args): Add level field.
	(m4__arg_adjust_refcount, m4__push_arg_quote): New prototypes.
	* m4/input.c (m4__push_symbol, composite_peek, composite_read)
	(composite_unget, composite_clean, composite_print): Support $@
	refs.
	* m4/macro.c (collect_arguments): Populate new field.
	(expand_macro): Move argv cleanup...
	(m4__arg_adjust_refcount): ...to this new function.
	(m4_arg_symbol, m4_make_argv_ref, m4_push_arg): Factor...
	(arg_symbol, make_argv_ref, m4__push_arg_quote): ...to these new
	helper functions, to add parameters.
	(m4_push_args): Adjust caller.
	* m4/symtab.c (m4_symbol_value_print): Likewise.

	Stage 14a: allow printing argv references.
	Refactor symbol-value printing code for better sharing, and to
	allow printing a contiguous text representation of a $@ ref.
	Memory impact: none.
	Speed impact: none.
	* m4/m4module.h (m4_arg_print): New prototype.
	(m4_symbol_value_print): Alter prototype.
	* m4/input.c (struct input_funcs): Add parameter to peek_func.
	(file_peek, builtin_peek, string_peek): Ignore new parameter.
	(composite_peek): Ignore new parameter, for now.
	(composite_clean, pop_input): Rework to minimize indirection, and
	to avoid infinite recursion in next patch.
	* m4/macro.c (trace_prepre, trace_pre): Adjust callers.
	(m4_arg_print): New function.
	* m4/symtab.c (m4_symbol_value_print): Update signature.
	(m4_symbol_print): Update caller.
	* m4/output.c (m4_shipout_string_trunc): Update comments.
	* m4/syntax.c (set_quote_age): Require comma as argument separator
	when dealing with $@ as a unit.
	* tests/builtins.at (ifelse): Augment test.
	* doc/m4.texinfo (Changesyntax): Document changesyntax deficiency.

2008-01-31  Eric Blake  <ebb9@byu.net>

	Kill hack for M4 1.4.4.
	* configure.ac (AM_GNU_GETTEXT_INTL_SUBDIR): Delete, now that
	we require new enough autoconf which in turn requires M4 1.4.5.

2008-01-31  Gary V. Vaughan  <gary@gnu.org>
	and Eric Blake  <ebb9@byu.net>

	Depend on new libtool to use non-recursive build.
	* configure.ac (LT_PREREQ): Bump to alpha release version.
	(LTDL_INIT): Choose nonrecursive mode.  Perform sanity check that
	installed libtool has correct symbols.
	* Makefile.am (SUBDIRS): Drop ltdl, now that it is built from the
	top level.
	(AM_CPPFLAGS): Drop directories covered by libtool.
	(AM_LDFLAGS): Drop -no-undefined, covered by libtool.
	(include_HEADERS, noinst_LTLIBRARIES, EXTRA_LTLIBRARIES): New
	macros, used by libtool.
	(lib_LTLIBRARIES): Also used by libtool.
	(ltdl/libltdlc.la): Delete, now that libtool does this.
	* bootstrap: Mention new requirements.
	(LIBTOOLIZE): Provide default program, and run libtoolize prior to
	autoreconf.
	(autoreconf): Also neutralize libtoolize, since it is run early.
	* HACKING: Mention updated prerequisites.

2008-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	Fix build failure if installed libltdl is used.
	* Makefile.am (m4_libm4_la_DEPENDENCIES): Use $(LTDLDEPS).

2008-01-28  Eric Blake  <ebb9@byu.net>

	Depend on newer autoconf, for testsuite -C dir.
	* Makefile.am (CD_TESTDIR): Delete, no longer required.
	(check-local, installcheck-local, clean-local-tests): Use new -C
	option from autotest.
	* configure.ac (AC_PREREQ): Bump to 2.61a.347.
	* bootstrap: Mention new dependency.
	* HACKING: Likewise.

2008-01-27  Eric Blake  <ebb9@byu.net>

	Stage 13: push composite text tokens.
	Support pushing composite tokens, allowing back-references to be
	reused through multiple macro expansions.  Add hueristic that
	avoids creating new reference when pushing existing references.
	Memory impact: noticeable improvement due to better reference
	reuse, except for O(n) to O(n^2) copying in boxed recursion.
	Speed impact: slight penalty, due to more bookkeeping.
	* m4/m4private.h (m4__push_symbol): Adjust prototype.
	* m4/input.c (m4__push_symbol): Add parameter, and support
	composite tokens.
	(append_quote_token): Add parameter, and support inlining of short
	text.
	(m4__next_token): Adjust caller.
	* m4/macro.c (m4_push_arg, m4_push_args): Likewise.

2008-01-26  Eric Blake  <ebb9@byu.net>

	Stage 12c: add macro for m4_arg_len.
	Make a common action easier to type.
	Memory impact: none.
	Speed impact: none.
	* m4/m4module.h (M4ARGLEN): New macro.
	* m4/macro.c (process_macro): Adjust all callers.
	* m4/utility.c (m4_dump_args): Likewise.
	* modules/m4.c (divert, maketemp, mkstemp, m4wrap, len, index)
	(substr): Likewise.
	* modules/gnu.c (builtin, indir, mkdtemp, patsubst, regexp)
	(renamesyms): Likewise.
	* modules/stdlib.c (setenv): Likewise.

	Stage 12b: add m4_string_pair.
	Make passing quote delimiters around more efficient.
	Memory impact: none.
	Speed impact: slight penalty, due to more bookkeeping.
	* m4/m4module.h (m4_string_pair): New type.
	(m4_get_syntax_quotes, m4_get_syntax_comments): New prototypes.
	(m4_symbol_value_print, m4_symbol_print, m4_shipout_string_trunc):
	Alter signature.
	* m4/m4private.h (struct m4_string): Delete.
	(struct m4_syntax_table): Combine quote and comment members.
	(m4_get_syntax_lquote, m4_get_syntax_rquote, m4_get_syntax_bcomm)
	(m4_get_syntax_ecomm): Adjust accessors.
	(m4_get_syntax_quotes, m4_get_syntax_comments): New fast
	accessors.
	* m4/symtab.c (m4_symbol_value_print, m4_symbol_print):
	Alter signatures.
	* m4/input.c (string_print, composite_print, m4_input_print):
	All callers updated.
	* m4/syntax.c (m4_syntax_delete, m4_set_syntax)
	(check_is_single_quotes, m4_set_quotes, set_quote_age)
	(m4_get_syntax_lquote, m4_get_syntax_rquote)
	(m4_get_syntax_quotes, check_is_single_comments, m4_set_comment)
	(m4_get_syntax_bcomm, m4_get_syntax_ecomm)
	(m4_get_syntax_comments): Likewise.
	* m4/macro.c (trace_prepre, trace_pre, m4_push_args): Likewise.
	* m4/output.c (m4_shipout_string, m4_shipout_string_trunc):
	Likewise.
	* modules/m4.c (dumpdef, m4_make_temp): Likewise.
	* src/freeze.c (produce_frozen_state): Likewise.
	* tests/freeze.at (reloading unknown builtin): Update test.

	Stage 12a: make m4_symbol_chain a union.
	Shrink size of symbol chains by using a union.
	Memory impact: slight improvement, due to smaller struct.
	Speed impact: slight improvement, due to less bookkeeping.
	* m4/m4private.h (enum m4__symbol_chain_type): New enum.
	(struct m4_symbol_chain): Rename...
	(struct m4__symbol_chain): ...to this, since it is internal.
	* m4/symtab.c (m4_symbol_value_copy, m4_symbol_value_print): All
	callers updated.
	* m4/input.c (struct m4_input_block, m4__push_symbol)
	(composite_peek, composite_read, composite_unget)
	(composite_clean, composite_print, m4__make_text_link)
	(append_quote_token): Likewise.
	* m4/macro.c (expand_macro, arg_mark, m4_arg_symbol, m4_arg_text)
	(m4_arg_equal, m4_arg_len, m4_make_argv_ref, m4_push_arg)
	(m4_push_args): Likewise.

2008-01-23  Eric Blake  <ebb9@byu.net>

	Adjust to recent libtool interface change.
	* configure.ac (LT_PREREQ): Require bleeding-edge libtool.
	(LT_WITH_LTDL): Delete, now that it is obsolete.
	(LTDL_INIT): Use new libtool macro.

2008-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
	and Eric Blake  <ebb9@byu.net>

	Rely on newer automake.
	* configure.ac (AM_INIT_AUTOMAKE): Require 1.10.1, and add lzma
	distribution.
	* bootstrap: Update automake requirement.
	(func_version): Fix --version output, broken since 2007-08-06.
	* HACKING: Likewise.  Add lzma requirement.
	* Makefile.am (clean-local-src): Not needed any more with newest
	Automake.
	(clean-local): Adjust.
	* TODO: Remove completed item.

2008-01-22  Eric Blake  <ebb9@byu.net>

	Doc tweak.
	* doc/m4.texinfo (Renamesyms): Avoid underfull hbox, and improve
	example.

2008-01-21  Eric Blake  <ebb9@byu.net>

	Stage 11: full circle for single argument references.
	Pass quoted strings through to argument collection in a single
	action, so that an argument can be reused throughout macro
	recursion if it remains unchanged.
	Memory impact: noticeable improvement, due to more reuse in
	argument collection stacks; O(n^2) to O(n) on boxed recursion.
	Speed impact: noticeable improvement, due to less copying.
	* m4/m4module.h (m4_arg_text): Add parameter.
	(M4ARG): Adjust.
	* m4/m4private.h (CHAR_QUOTE): New input engine sentinel.
	(m4__make_text_link): New prototype.
	(struct m4_symbol_chain): Add quote_age member.
	(struct m4_symbol_value): Add end member to chained symbol.
	(struct m4_macro_args): Add wrapper member.
	* m4/symtab.c (m4_symbol_value_print): Print composite tokens.
	(m4_symbol_value_copy, m4_symbol_value_delete): Recognize
	composite tokens.
	* m4/input.c (make_text_link): Rename...
	(m4__make_text_link): ...to this, and export.
	(m4_push_string_finish): Adjust caller.
	(make_text_link, m4__push_symbol): Update new field.
	(file_read, builtin_read, string_read, composite_read, next_char):
	Add parameter.
	(m4_skip_line, match_input, consume_syntax): Adjust callers.
	(append_quote_token): New function.
	(m4__next_token): Pass quoted strings onto argument collection.
	(m4_print_token) [DEBUG_INPUT]: Update.
	* m4/macro.c (expand_argument): Collect composite arguments.
	(collect_arguments): Update new field.
	(expand_macro): Reduce ref-count of back-references after use.
	(arg_mark, m4_arg_symbol, m4_make_argv_ref): Adjust to new member
	names.
	(m4_is_arg_text): Also recognize composite symbols as text.
	(m4_arg_text, m4_arg_len): Merge composite symbols as needed.
	(m4_arg_equal): Compare composite symbols.
	(m4_push_arg, m4_push_args): Handle composite symbols.
	(m4_arg_symbol): Relax assertion.
	(process_macro): Use single-argument references.
	* m4/output.c (m4_shipout_string_trunc): Update comment.
	* tests/macros.at (Rescanning macros): Augment test.

2008-01-16  Eric Blake  <ebb9@byu.net>

	Stage 10: avoid extra copying of strings and comments.
	When collecting tokens that are immune to further expansion, avoid
	copying data from one obstack to another by outputting it into the
	destination obstack to begin with.  Also reduce copying done in
	format builtin.
	Memory impact: slight improvement, due to better obstack usage.
	Speed impact: noticeable improvement, due less data copying.
	* ltdl/m4/gnulib-cache.m4: Import intprops and vasnprintf-posix
	modules.
	* m4/m4private.h (m4__token_type): Adjust prototype.
	* m4/input.c (m4__next_token): Support new parameter.
	* m4/macro.c (m4_macro_expand_input, expand_token)
	(expand_argument, collect_arguments): Adjust callers.
	* modules/m4.c (ntoa): Tighten buffer size.
	* m4/output.c (m4_tmpname): Guarantee no buffer overflow.
	* modules/format.c (arg_int, arg_long, arg_double): New helper
	functions, to detect overflow or unparsed characters.
	(ARG_INT, ARG_LONG, ARG_STR, ARG_DOUBLE): Adjust to check for
	missing or excess arguments.
	(format): Likewise, and also output directly into obstack if there
	is room.
	* doc/m4.texinfo (History): Update for new year.
	(Format): Test for new warnings.

2008-01-15  Eric Blake  <ebb9@byu.net>

	* TODO: Update with some newer URLs.

	Verify linear `index'.
	* tests/builtins.at (index): New test.
	(translit): Make test take longer, to make quadratic algorithms
	more apparent.

2007-12-20  Eric Blake  <ebb9@byu.net>

	Stage 9: share rather than copy single-arg refs.
	Use hooks of previous patch to create back-references to arguments
	in the input engine, and inline short text rather than always
	creating a FIFO link.  Also start testing embedded NUL behavior.
	Until the argument collection engine also shares references, the
	memory usage increases.
	Memory impact: noticeable penalty, due to longer life of argv
	changing O(n) to O(n^2) on boxed recursion.
	Speed impact: slight improvement, due less data copying.
	* ltdl/m4/gnulib-cache.m4: Import memmem and quote modules.
	* m4/m4module.h (m4_arg_scratch): New prototype.
	* m4/m4private.h (m4__push_symbol): Add parameter.
	(m4_arg_scratch): Add fast accessor.
	(struct m4): Add expansion_level member, taken...
	* m4/macro.c (expansion_level): ...from here.  Adjust all users.
	(expand_argument): Minor cleanup.
	(expand_macro): Track scratch space per macro call.
	(m4_arg_scratch): New function.
	(m4_make_argv_ref): Call new function.
	(m4_push_arg): Push reference to $0.
	(m4_push_args): Rework separator usage, since separators will
	usually be inlined.
	(process_macro): Allow embedded NUL.
	* m4/input.c (INPUT_INLINE_THRESHOLD): New define.
	(m4__push_symbol): Add parameter.  Inline short strings, and save
	references through rescanning.
	* m4/symtab.c (m4_set_symbol_value_text): Weaken assertion.
	* modules/m4.c (errprint, index): Handle NUL transparently.
	(dumpdef, translit): Use scratch space, rather than expansion
	stack.
	* modules/gnu.c (renamesyms, m4symbols): Likewise.
	* tests/others.at (nul character): New test.
	(iso8859): Quote absolute file name, remove XFAIL.
	* tests/iso8859.m4: Avoid raw NUL in output.
	* tests/null.m4: New file.
	* tests/null.out: Likewise.
	* tests/null.err: Likewise.
	* Makefile.am (OTHER_FILES): Distribute new files.
	* .gitattributes: Treat new files as text.

2007-12-17  Eric Blake  <ebb9@byu.net>

	Stage 8: extend life of references into argv.
	Add hooks to lengthen the lifetime of arguments reused in a macro
	expansion, rather than always discarding arguments at the end of
	expand_macro.  Rework the expand_macro obstacks to handle longer
	lifetimes.  For now, the hooks remain unused.
	Memory impact: slight penalty, due to larger structs.
	Speed impact: slight penalty, due to more bookkeeping.
	* m4/system_.h (obstack_regrow): Delete.
	* m4/m4private.h (struct m4_symbol_chain): Add level field.
	(m4__push_symbol): Adjust prototype.
	(m4__adjust_refcount): New prototype.
	(DEBUG_MACRO) [DEBUG]: New debug control.
	(struct m4__macro_arg_stacks): New structure.
	(struct m4): Add arg_stacks, stacks_count fields.
	* m4/m4module.h (m4_make_argv_ref): Add parameter.
	* m4/macro.c (argc_stack, argv_stack): Delete, replaced by
	context->arg_stacks.
	(m4_macro_expand_input) [DEBUG_MACRO]: Add debug hooks,
	conditional on M4_DEBUG_MACRO envvar.
	(collect_arguments): Adjust signature.
	(expand_macro): Rework obstack handling.
	(m4__adjust_refcount, arg_mark): New functions.
	(m4_make_argv_ref): Populate new field.
	(m4_push_arg, m4_push_args): Track inuse.
	(process_macro): One less cast.
	* m4/m4.c (m4_delete): Clean up arg_stacks.
	* m4/input.c (make_text_link): Use new field.
	(m4__push_symbol, file_clean): Update signature.
	(composite_read): Bump refcount when done with reference.
	(composite_clean): New function.
	(pop_input): Adjust caller.
	* m4/debug.c (m4_debug_message): Make assertion match comment.
	* modules/gnu.c (builtin, indir): Adjust callers.
	* tests/builtins.at (ifelse): New test.
	(exp): Move and rename...
	* tests/others.at (countdown): ...to this.
	* doc/m4.texinfo (Improved foreach): Fix tracing usage in
	example.

2007-12-13  Eric Blake  <ebb9@byu.net>

	Yet more rewording.
	* doc/m4.texinfo (Inhibiting Invocation): Missed one instance in
	the previous patch.

	* THANKS: Update.

2007-12-13  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)

	* doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
	example.
	Reported by Giovanni Toffetti.

2007-12-11  Eric Blake  <ebb9@byu.net>

	Stage 7: use chained input support in input parser.
	Allow the LIFO input engine to rescan a macro expansion composed
	of smaller chunks of FIFO data, rather than the old approach of a
	monolithic string.  For now, all chunks are still copied.
	Memory impact: slight penalty, due to FIFO chain overhead.
	Speed impact: slight penalty, due to extra bookkeeping.
	* m4/m4private.h (m4__push_symbol): New prototype.
	(struct m4_symbol_chain): Add const-safety.
	* m4/symtab.c (m4_symbol_value_print): Simplify.
	(dump_symbol_CB): Update caller.
	* m4/input.c (struct m4_input_block): Alter u_c member, first
	introduced 2006-10-25, but unused until now.
	(composite_peek, composite_read, composite_unget)
	(composite_print, init_builtin_token): Rewrite accordingly.
	(m4_push_wrapup): No longer need trailing NUL.
	(m4__push_symbol, make_text_link): New functions.
	(m4_push_string_finish): Use them.
	* m4/macro.c (m4_push_arg, m4_push_args): Likewise.
	(expand_macro): Simplify logic of nesting_limit.
	* src/main.c (main): Likewise.
	* doc/m4.texinfo (Dumpdef): Augment test.

2007-12-08  Eric Blake  <ebb9@byu.net>

	Stage 6: convert builtins to push arg at a time.
	Add new methods to factor all builtins whose expansion includes an
	argument, making back-reference creation easier in future patches.
	Factor out length-limited printing to obstacks, and use -1 rather
	than 0 for unlimited length.
	Memory impact: none.
	Speed impact: slight improvement, due to better code sharing.
	* m4/m4module.h (m4_shipout_text): Rename...
	(m4_divert_text): ...to this, to avoid confusion with m4_shipout_*
	that does not worry about sync lines.
	(m4_shipout_string_trunc): New prototype.
	* m4/output.c (m4_shipout_text): Rename...
	(m4_divert_text): ...to this.
	(m4_shipout_string): Move guts...
	(m4_shipout_string_trunc): ...to this new function.
	* m4/macro.c (m4_push_arg, m4_push_args): New functions.
	(expand_token, process_macro): Update callers.
	* m4/input.c (string_print): Likewise.
	* modules/m4.c (ifdef, ifelse, shift, substr, translit, divert):
	Likewise.
	* modules/gnu.c (patsubst): Likewise.
	(debuglen): Use SIZE_MAX for unlimited debug length.
	* src/main.c (main): Likewise.
	* m4/m4.c (m4_create): Default max_debug_length to SIZE_MAX, not
	zero.

2007-12-07  Eric Blake  <ebb9@byu.net>

	Minor security fix: Quote output of mkstemp.
	* modules/m4.c (m4_make_temp): Produce quoted output.
	* doc/m4.texinfo (Mkstemp, Mkdtemp): Update the documentation and
	tests.

	Stage 5: add notion of quote age.
	Cache the quoting rules that were in effect when a string was
	parsed, to avoid reparsing that string if no changequote or other
	quote age change took place in the meantime.  A quote_age of 0 is
	always safe, but does not benefit from caching.
	Memory impact: slight improvement, due to smaller struct in input
	engine.
	Speed impact: slight penalty, due to more bookkeeping.
	* m4/m4module.h (m4_get_symbol_value_quote_age): New prototype.
	(m4_set_symbol_value_text): Adjust prototype.
	(m4_has_syntax): Factor out the unsigned char cast.
	* m4/m4private.h (struct m4_syntax_table): Add syntax_age and
	quote_age members.
	(m4__quote_age, m4__safe_quotes): New accessor macros, no need for
	functions at this point.
	(struct m4_symbol_value, struct m4_macro_args): Add quote_age
	member.
	(m4_set_symbol_value_text): Adjust fast accessor.
	(m4_get_symbol_value_quote_age): New fast accessor.
	* m4/symtab.c (m4_set_symbol_value_text): Add parameter.
	(m4_get_symbol_value_quote_age): New function.
	(m4_symbol_value_copy): Adjust callers.
	* m4/macro.c (expand_token): Add parameter, and track quote age.
	(expand_argument, collect_arguments): Track quote age.
	(m4_macro_expand_input, process_macro, m4_make_argv_ref)
	(m4_macro_expand_input): Update callers.
	(m4_arg_text, m4_arg_len, m4_arg_func): Abort on type mismatch.
	* m4/input.c: Comment cleanups.
	(struct m4_input_block): Reduce size.
	(m4__next_token): Report quote age.
	(m4_push_builtin, init_builtin_token): Update callers.
	* m4/utility.c (skip_space): Adjust callers.
	* m4/module.c (install_macro_table): Likewise.
	* m4/syntax.c (m4_set_syntax): Initialize and update quote age.
	(m4_set_quotes, m4_set_comment): Detect no-op changes, and update
	quote age.
	(set_quote_age): New helper function.
	(check_is_single_quotes, check_is_single_comments): Adjust
	callers.
	* src/freeze.c (reload_frozen_state): Likewise.
	* src/main.c (main): Likewise.
	* modules/m4.c (define, pushdef): No need to set macro text.
	* tests/builtins.at (changequote, defn): New tests.
	* examples/wrapfifo.m4: New file.
	* examples/wraplifo.m4: New file.
	* Makefile.am (dist_pkgdata_DATA): Distribute new examples.

2007-12-04  Eric Blake  <ebb9@byu.net>

	Fix builds with OpenBSD make.
	* Makefile.am (HELP2MAN): New macro.
	(dist_man_MANS, doc/m4.1): Fix rules for building m4.1 into
	srcdir.
	* README: Update copyright.
	* HACKING: Mention help2man and makeinfo dependencies.

2007-11-29  Eric Blake  <ebb9@byu.net>

	Stage 4: route indir, builtin through ref; make argv opaque.
	Finish making struct opaque to all but the input engine, by
	reworking obstack usage in expand_macro to better support creation
	of a $@ reference.  Canonicalize the empty argument, to allow
	pointer comparison optimizations.
	Memory impact: slight penalty, due to larger struct.
	Speed impact: slight improvement, due to fewer function calls.
	* m4/system_.h (obstack_regrow): Fix precedence.
	* m4/m4module.h (m4_arg_equal, m4_arg_empty, m4_make_argv_ref):
	New prototypes.
	(struct m4_macro_args): Move...
	* m4/m4private.h (struct m4_macro_args): ...here, making it opaque
	to modules.  Add has_ref member.
	(bool_bitfield): New helper typedef.
	(struct m4_symbol_chain): Add flatten and len members.
	* m4/macro.c (empty_symbol): New placeholder, for optimizing
	comparison with empty string.
	(m4_macro_expand_input): Initialize it.
	(collect_arguments): Alter signature, and populate new fields.
	(trace_pre, trace_post): Remove redundant parameter.
	(expand_macro): Alter handling of obstacks.
	(m4_arg_symbol): Account for wrapped argv.
	(m4_arg_equal, m4_arg_empty, m4_make_argv_ref): New methods.
	(m4_arg_text, m4_arg_len, m4_arg_func): Use new methods.
	* modules/m4.c (ifelse, syscmd): Likewise.
	* modules/evalparse.c (m4_evaluate): Likewise.
	(undefine, popdef, m4_dump_symbols): Optimize.
	* modules/gnu.c (builtin, indir, esyscmd, debugfile): Use new
	methods.
	(changesyntax, regexp): Optimize.
	* m4/output.c (diversion_storage): Use typedef.

	Stage 3b: cache length, rather than computing it, in modules.
	Use cached token length in builtins and output engine.
	Memory impact: none.
	Speed impact: noticeable improvement, due to fewer function calls.
	* m4/hash.c (m4_hash_remove): Avoid double free on remove
	failure.
	* m4/output.c (m4_shipout_string): Change semantics of len param.
	(m4_shipout_int): Use cached length.
	* m4/input.c (m4_push_string_finish): Likewise.
	* modules/m4.h (m4_make_temp_func): Add parameter.
	* m4/macro.c (expand_token, m4_arg_len): Use cached length.
	(collect_arguments, expand_macro): Alter signature.
	(trace_format): Don't use out-of-scope buffer.
	(process_macro): All callers changed.
	* m4/utility.c (m4_dump_args): Likewise.
	* m4/symtab.c (m4_symbol_value_print): Likewise.
	* modules/gnu.c (__file__, __program__, builtin, indir)
	(m4symbols, mkdtemp, regexp_compile, regexp_substitute,
	renamesyms, patsubst, regexp, regexp_compile): Likewise.
	* modules/load.c (m4modules): Likewise.
	* modules/m4.c (defn, m4wrap, maketemp, m4_make_temp)
	(numb_obstack, ifdef, ifelse, divert, len, substr): Likewise.
	* modules/perl.c (perleval): Likewise.
	* modules/stdlib.c (getcwd, getenv, getlogin, getpwnam, getpwuid)
	(hostname, uname, setenv): Likewise.
	* modules/mpeval.c (numb_obstack): Likewise.
	* src/freeze.c (dump_symbol_CB): Likewise.
	* doc/m4.texinfo (Renamesyms, Dumpdef, Changesyntax): Adjust test.
	* tests/builtins.at (mkstemp): Likewise.
	* tests/others.at (iso8859): XFAIL this test, now that
	length-based handling allows NUL through part but not all of M4.

2007-11-28  Eric Blake  <ebb9@byu.net>

	Stage 3a: cache length, rather than computing it, in libm4.
	Cache the length of a token in the input engine and symbol table,
	to avoid repeating lots of strlen calls.  Additionally, by using
	obstack length rather than strlen, the input engine can now
	support embedded NUL.
	Memory impact: slight penalty, due to larger struct.
	Speed impact: slight improvement, due to fewer function calls.
	* m4/m4module.h (struct m4_macro_args): Cache length.
	(m4_get_symbol_len, m4_get_symbol_value_len): New accessors.
	(m4_set_symbol_value_text): Change signature.
	* m4/m4private.h (struct m4_symbol_value): Store string length.
	(m4_get_symbol_value_text, m4_get_symbol_value_placeholder)
	(m4_set_symbol_value_placeholder): Update accordingly.
	(m4_set_symbol_value_text): Change signature.
	(m4_get_symbol_value_len): New accessor.
	* m4/input.c (struct m4_input_block, string_peek, string_read)
	(string_unget, string_print, m4_push_string_finish)
	(m4_push_wrapup): Track length of string input.
	(m4__next_token): Adjust all users of symbol text to track length,
	too.
	* m4/macro.c (expand_argument, collect_arguments): Likewise.
	* m4/module.c (install_macro_table): Likewise.
	* modules/gnu.c (builtin, indir): Likewise.
	* modules/m4.c (define, pushdef): Likewise.
	* src/main.c (main): Likewise.
	* src/freeze.c (reload_frozen_state): Likewise.
	* m4/symtab.c (m4_symbol_value_copy): Likewise.
	(m4_get_symbol_value_len): New function.
	(m4_get_symbol_value_text, m4_get_symbol_value_placeholder)
	(m4_set_symbol_value_text, m4_set_symbol_value_placeholder):
	Adjust implementation.

2007-11-27  Eric Blake  <ebb9@byu.net>

	Stage 2: use accessors, not direct reference, into argv.
	Outside of macro.c, use accessor methods rather than direct access
	into the argv struct.
	Memory impact: none.
	Speed impact: slight penalty, due to increased function calls.
	* m4/m4private.h (m4_arg_argc): New fast accessor.
	* m4/m4module.h (m4_arg_argc, m4_arg_symbol, m4_is_arg_text)
	(m4_is_arg_func, m4_arg_text, m4_arg_len, m4_arg_func): New
	prototypes.
	(m4_builtin_func, M4BUILTIN, M4BUILTIN_HANDLER, m4_dump_args)
	(m4_macro_call): Make argc unsigned.
	(M4ARG): Use new accessors.
	* modules/m4.c (define, pushdef): Likewise.
	(undefine, popdef, ifelse, m4_dump_symbols, defn, undivert)
	(traceon, traceoff): Make argc unsigned.
	* modules/m4.h (m4_dump_symbols_func): Likewise.
	* modules/evalparse.c (m4_evaluate): Likewise.
	* modules/gnu.c (builtin, indir): Use new accessors.
	(changesyntax): Make argc unsigned.
	* modules/perl.c (perleval): Likewise.
	* m4/utility.c (m4_dump_args): Use new accessors.
	* m4/macro.c (trace_pre): Likewise.
	(m4_arg_symbol, m4_arg_argc, m4_is_arg_text, m4_is_arg_func)
	(m4_arg_text, m4_arg_len, m4_arg_func): New functions.
	(expand_macro, trace_pre, trace_post, m4_macro_call): Update argc
	usage.

2007-11-24  Eric Blake  <ebb9@byu.net>

	Stage 1: convert m4_symbol_value** into new object.
	Pass a variable-size wrapper structure instead of an array to
	builtins, so that subsequent optimizations in the structure need
	not impact every builtin client.
	Memory impact: slight penalty, since struct is larger than array.
	Speed impact: slight penalty, due to increased bookkeeping.
	* ltdl/m4/gnulib-cache.m4: Import flexmember module.
	* m4/m4module.h (m4_macro_args): New type, will be opaque to
	modules later.
	(m4_builtin_func, M4BUILTIN, M4BUILTIN_HANDLER, m4_dump_args)
	(m4_macro_call): Alter signature to use m4_macro_args object.
	(M4ARG): Redefine to access new struct.
	* m4/m4private.h (M4_SYMBOL_COMP): New enumerator.
	(struct m4_symbol_chain): New type.
	(struct m4_symbol_value): Add chain alternative.
	* m4/macro.c (collect_arguments): Build new struct.
	(expand_macro, m4_macro_call, process_macro, trace_pre)
	(trace_post): Adjust implementation to use it.
	* m4/utility.c (m4_dump_args): Likewise.
	* modules/gnu.c (builtin, indir): Likewise.
	* modules/format.c (format): Likewise.
	* modules/m4.h (m4_dump_symbols_func): Likewise.
	* modules/m4.c (m4_dump_symbols, define, pushdef, defn, ifelse)
	(shift, include, errprint, m4wrap): Likewise.
	* modules/evalparse.c (m4_evaluate): Likewise.

	Pass only macro name to utility functions.
	* m4/m4module.h (m4_bad_argc, m4_numeric_arg): Adjust signature.
	* m4/utility.c (m4_bad_argc, m4_numeric_arg): Adjust
	implementation.
	* m4/macro.c (m4_macro_call): Adjust callers.
	* modules/gnu.c (builtin, debuglen): Likewise.
	* modules/m4.c (ifelse, incr, decr, divert, undivert, m4exit)
	(substr): Likewise.
	* modules/evalparse.c (m4_evaluate): Likewise.
	* modules/stdlib.c (setenv, getpwuid, srand): Likewise.
	* modules/time.c (ctime, gmtime, localtime, mktime, strftime):
	Likewise.

2007-11-23  Eric Blake  <ebb9@byu.net>

	Add macro name to debugfile messages.
	* m4/m4module.h (m4_debug_set_output): Add parameter.
	* m4/debug.c (m4_debug_set_output, set_debug_file): Pass macro
	name through.
	* modules/gnu.c (debugfile): Adjust caller.
	* modules/m4.c (m4exit): Likewise.
	* src/main.c (main): Likewise.

	Factor out handling of macro name in error messages.
	* m4/m4module.h (m4_error, m4_error_at_line, m4_warn)
	(m4_warn_at_line): Add new parameter.
	* m4/utility.c (m4_verror_at_line): New helper method.
	(m4_error, m4_error_at_line, m4_warn, m4_warn_at_line): Add new
	parameter.
	(m4_bad_argc, m4_numeric_arg, m4_parse_truth_arg): All callers
	changed.
	* m4/debug.c: Likewise.
	* m4/input.c: Likewise.
	* m4/macro.c: Likewise.
	* m4/module.c: Likewise.
	* m4/output.c: Likewise.
	* m4/path.c: Likewise.
	* modules/evalparse.c: Likewise.
	* modules/format.c: Likewise.
	* modules/gnu.c: Likewise.
	* modules/load.c: Likewise.
	* modules/m4.c: Likewise.
	* modules/mpeval.c: Likewise.
	* src/freeze.c: Likewise.
	* src/main.c: Likewise.

2007-11-14  Eric Blake  <ebb9@byu.net>

	Handle some defn corner cases differently.
	* doc/m4.texinfo (Defn): Update documentation; although this still
	doesn't match the branch, since it may be changed before 2.0.
	* m4/macro.c (expand_argument): Consistently ignore builtins in
	concatenation contexts.
	* m4/m4private.h (m4__symbol_type): Fix C89 compliance bug.

2007-11-13  Eric Blake  <ebb9@byu.net>

	Note: Patches titled Stage 0 through N form a series of patches
	which decreases the algorithmic complexity of tail recursion in
	macro expansions from O(n^2) to O(n) in both time and memory, then
	performs cleanups, such as handling of embedded NUL, made easier
	by the code refactoring.

	Stage 0: Fix memory leak in tail recursion.
	Free expansion text in the input engine as soon as it is parsed,
	rather than when the recursive expansion completes.
	Memory impact: noticeable improvement, due to reduction from
	O(n^2) to O(n) on recursion.
	Speed impact: minor improvement, due to better memory usage.
	* m4/input.c (pop_input): Add flag parameter and return type.
	(next_char): Adjust caller.
	(m4_push_string_init): Let go of memory earlier.

2007-11-07  Eric Blake  <ebb9@byu.net>

	* tests/macros.at (Rescanning macros): Test more corner cases.

2007-11-06  Eric Blake  <ebb9@byu.net>

	* build-aux/mkstamp: Rename from ltdl/config/mkstamp.

	* Makefile.am (tests/package.m4): Work around bash bug.
	Reported by Ralf Wildenhues.

2007-11-05  Eric Blake  <ebb9@byu.net>

	For consistency with other GNU projects, use build-aux directory.
	* configure.ac (AC_CONFIG_AUX_DIR): Change ltdl/config to
	build-aux.
	* bootstrap (config_aux_dir): Likewise.
	* Makefile.am (config_aux_dir): Likewise.
	* ltdl/m4/gnulib-cache.m4: Use --aux-dir option.

2007-11-02  Eric Blake  <ebb9@byu.net>

	Update some documentation about version control.
	* NEWS: M4 is now stored in git.
	* HACKING: Likewise.
	* README: Likewise.
	* bootstrap: Likewise.
	* commit: Delete, now that CVS commits are no longer necessary.
	* ltdl/config/mailnotify: No longer necessary; git's patch
	generation and mail capability is more powerful.

	Update to recent gnulib changes.
	* ltdl/m4/gnulib-cache.m4: Replace fprintf-posix, vasprintf-posix,
	xprintf, and xvasprintf with xprintf-posix and xvasprintf-posix.

2007-11-01  Eric Blake  <ebb9@byu.net>

	Improve error message when early end of file occurs.
	* doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
	(M4wrap): Adjust to new messages.
	(Improved capitalize): Enhance test.
	* m4/m4private.h (m4__next_token): Adjust prototype.
	* m4/input.c (m4__next_token): Add new parameter, and improve
	error message.
	* m4/macro.c (m4_macro_expand_input, collect_arguments): Adjust
	callers.
	(expand_argument): Likewise, and add parameter.

2007-10-31  Eric Blake  <ebb9@byu.net>

	Test more corner cases.
	* tests/macros.at (Rescanning macros): Beef up test.
	* doc/m4.texinfo (Changecom): Beef up test.
	(Improved foreach): Document alternate foreachq style.
	* examples/foreachq3.m4: New file.
	* examples/loop.m4: New file.
	* Makefile.am (dist_pkgdata_DATA): Distribute them.

2007-10-28  Eric Blake  <ebb9@byu.net>

	More test coverage for autoconf usage patterns.
	* doc/m4.texinfo (Shift): Document cond macro, and add new test.
	* tests/macros.at (Rescanning macros): New test.
	* tests/builtins.at (include): Augment test.

2007-10-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am: Adjust getopt handling to latest gnulib layout.

2007-10-27  Eric Blake  <ebb9@byu.net>

	Document one use of changequote(`(',`)').
	* doc/m4.texinfo (Changequote): Add new test, based on recent
	autoconf addition of m4_expand.

2007-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (dist_pkgdata_DATA): Add examples/capitalize2.m4.

2007-10-22  Eric Blake  <ebb9@byu.net>

	Never let printf failures go undetected.
	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	xprintf'.
	* m4/system_.h: Include xprintf.h.
	* m4/debug.c (m4_debug_message_prefix, m4_debug_message): Wrap all
	use of printf, xprintf.
	* m4/input.c [DEBUG_INPUT]: Likewise.
	* m4/module.c [DEBUG_MODULES]: Likewise.
	* m4/output.c (m4_shipout_text, m4_shipout_int)
	(m4_freeze_diversions): Likewise.
	* m4/path.c [DEBUG_INCL]: Likewise.
	* m4/symtab.c [DEBUG_SYM]: Likewise.
	* m4/syntax.c [DEBUG_SYNTAX]: Likewise.
	* modules/modtest.c (export_test): Likewise.
	* src/freeze.c (produce_resyntax_dump, produce_syntax_dump)
	(produce_module_dump, dump_symbol_CB, produce_frozen_state):
	Likewise.
	* src/main.c (usage): Likewise.
	* po/POTFILES.in: Adjust to new file.
	* po/Makevars (XGETTEXT_OPTIONS): Likewise.

2007-10-18  Eric Blake  <ebb9@byu.net>

	Fix 'm4 -F file -t undefined'.
	* src/freeze.c (produce_symbol_dump): Skip trace placeholders.
	* src/freeze.c (dump_symbol_CB): Also skip void symbols.
	* tests/freeze.at (reloading unknown builtin): Test for this bug.
	* m4/m4module.h (m4_symtab_apply): Add parameter.
	* m4/symtab.c (m4_symtab_apply): Ignore trace placeholders when
	requested.
	(m4_symtab_delete, symtab_dump): Adjust callers.
	* modules/m4.c (m4_dump_symbols): Likewise.

2007-10-09  Eric Blake  <ebb9@byu.net>

	Fix regexp regression of 2007-09-29.
	* modules/gnu.c (substitute): Allow NULL buf when no
	subexpressions were present.
	(regexp): Handle \ escapes even with empty regex.
	* doc/m4.texinfo (Regexp, Patsubst): Catch this bug.

	Cache regex compilation for another autoconf speedup.
	* modules/gnu.c	(gnu_buf): Replace...
	(REGEX_CACHE_SIZE, regex_cache): ...with new declarations.
	(m4_pattern_buffer): Add fields.
	(m4_regexp_compile): Rename...
	(regexp_compile): ...to this, and drop no_sub parameter.
	Implement caching.
	(M4FINISH_HANDLER): Clean up entire cache.
	(m4_regexp_search): Rename...
	(regex_search): ...to this, adjust to new struct contents, and add
	no_sub parameter.
	(m4_regexp_substitute): Rename...
	(regexp_substitute): ...to this.
	(substitute, patsubst, regexp, renamesyms): Adjust callers.

2007-10-02  Eric Blake  <ebb9@byu.net>

	Document quoting pitfalls in capitalize.
	* doc/m4.texinfo (Patsubst): Use the examples directory.  Also
	document shortfall.
	(Improved capitalize): New node.
	* examples/capitalize.m4: Update to match manual.
	* examples/capitalize2.m4: New file.

2007-10-01  Eric Blake  <ebb9@byu.net>

	Another Autoconf usage pattern optimization.
	* modules/m4.c (m4_index): Optimize search for one byte.
	* doc/m4.texinfo (Index macro, Regexp, Patsubst): Test the new
	code paths.

2007-09-29  Eric Blake  <ebb9@byu.net>

	Optimize for Autoconf usage pattern.
	* modules/gnu.c (regexp, patsubst): Handle empty regex faster.

	* tests/testsuite.at (AT_CHECK_M4): Slight optimization.

2007-09-24  Eric Blake  <ebb9@byu.net>

	Create .gitignore alongside .cvsignore.
	* bootstrap (version control): Update to reflect git usage.

2007-09-13  Eric Blake  <ebb9@byu.net>

	* AUTHORS: Fix typo.

2007-09-12  Gary V. Vaughan  <gary@gnu.org>

	Be consistent about using 'module' for m4_module types and
	'handle' for lt_dlhandle types:

	* m4/m4private.h (m4_symbol_value): Rename handle element to
	method.  Changed all references.
	(VALUE_MODULE, SYMBOL_MODULE): Renamed from VALUE_HANDLE and
	SYMBOL_HANDLE respectively.  Changed all references.
	* m4/m4module.h (M4INIT_HANDLER, M4FINISH_HANDLER): Ditto.
	* m4/builtin.c (m4_builtin_find_by_name)
	(m4_builtin_find_by_func): Use module as the parameter name for
	pointers of type 'm4_module'.
	* m4/module.c (module_remove, m4_get_module_name)
	(install_builtin_table, install_macro_table)
	(m4_module_make_resident, m4__module_next, m4_module_refcount):
	Ditto.
	* src/freeze.c (produce_module_dump): Ditto.
	* m4/input.c (m4_input_block): Rename handle element to method.
	Changed all references.
	* m4/symtab.c (m4__symtab_remove_module_references): Ditto.
	* modules/load.c: Use module as the variable name for pointers
	of type 'm4_module'.
	* modules/m4.c: Ditto.
	* modules/perl.c: Ditto.
	* modules/shadow.c: Ditto.

2007-09-07  Eric Blake  <ebb9@byu.net>

	Add refcount builtin.
	* modules/load.c (refcount): New builtin.
	(m4modules): Use correct type.
	* doc/m4.texinfo (Refcount): New section.
	* m4/m4private.h (struct m4_module): Add refcount member.
	(m4_module_refcount) [NDEBUG]: Add faster accessor macro.
	* m4/module.c (m4_module_load): Add symbols to table on first
	load by m4, regardless of other libltdl loads of same module.
	(m4_module_refcount): Use new struct member, rather than relying
	on libltdl count which might be inflated by unrelated loads.
	(m4__module_interface): Optimize.
	(m4__module_next, m4__module_find): Avoid assertions that could
	trigger with unrelated libltdl loads.
	(m4__module_open): Track m4 load count.
	(m4__module_exit): Only unload what m4 loaded.
	(module_remove): Track m4 unloads.
	* NEWS: Document new builtin.

	More conversion to m4_module*.
	* src/freeze.c (produce_module_dump, dump_symbol_CB)
	(reload_frozen_state): Use correct type.
	* m4/input.c (struct m4_input_block): Likewise.
	* m4/symtab.c (dump_symbol_CB): Likewise.

	* AUTHORS: Simplify, to match libtool and autoconf layout.
	* THANKS: Sync with branch.

2007-09-06  Eric Blake  <ebb9@byu.net>

	Wrap lt_dlhandle in struct m4_module.
	* m4/m4module.h (includes): No longer require clients to know
	about lt_dlhandle.
	(m4_module): New opaque declaration.
	(m4_export): Delete unused type.
	(M4INIT_HANDLER, M4FINISH_HANDLER, m4_module_init_func)
	(m4_module_finish_func, m4_module_load, m4_get_module_name)
	(m4_builtin_find_by_name, m4_builtin_find_by_func): Use new
	wrapper.
	(m4_module_makeresident, m4_module_refcount): New declarations.
	* m4/m4private.h (includes): Move <ltdl.h> here.
	(m4_module): New declaration.  Simple for now, but intended for
	growth.
	(m4__module_open, m4__module_next, m4__module_find)
	(m4__symtab_remove_module_references): Use new wrapper.
	* m4/builtin.c (m4_builtin_find_by_name, m4_builtin_find_by_func):
	Likewise.
	* m4/module.c (m4_get_module_name, m4_module_import)
	(m4_module_load): Likewise.
	(install_builtin_table, install_macro_table): Likewise.  Also,
	change return type since these always returned NULL and no one
	used the result.
	(m4_module_makeresident, m4_module_refcount): New functions.
	(m4_module_unload, m4__module_next, m4__module_find): Use new
	wrapper.
	(m4__module_open): Populate new wrapper, and associate it with the
	lt_dlhandle.
	(m4__module_exit): Use new wrapper.
	(module_remove): Likewise.  Reclaim storage on last use.
	(module_close): Delete, and inline into module_remove.
	* m4/symtab.c (m4__symtab_remove_module_references): Use new
	wrapper.
	* modules/load.c (load_init): Use new API.
	* modules/m4.c (m4_export_table): Kill unused declaration.
	(m4_init): Use new API.
	* modules/shadow.c (shadow_init): Use new API.
	* src/main.c (main): Adjust callers.
	* src/freeze.c (reload_frozen_state): Likewise.
	* tests/modules.at (unload load module): New test.

2007-09-03  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap (ltdl/m4/.cvsignore): Add xstrtol module macros.
	* src/m4/.cvsignore: Add xstrtol module sources.

2007-09-03  Gary V. Vaughan  <gary@gnu.org>

	Work around a bug in darwin's awk:

	* bootstrap (func_get_translations): Use $AWK instead of raw
	`awk' so that the user can use an alternative implementation
	if the first awk in PATH doesn't behave as expected.
	(func_get_translations): The first awk script mangles the last
	entry passed to it for at least the awk implementation shipped
	with Darwin 8.10.1.  Capture $3 into a variable too to work-
	around that problem.

2007-08-29  Gary V. Vaughan  <gary@gnu.org>

	As gnulib xstrtol is only used by main, and unconditionally pulls
	in a copy of getopt, undo bootstrap change from 2007-08-11 below,
	and copy the xstrtol code into src/ so that main() can use it
	without pushing the extra code into libm4:

	* bootstrap (src_modules): Add getopt and xstrtol modules.
	* Makefile.am (src_m4_SOURCES): Add xstrtol sources.
	* po/POTFILES.in: Move gnu/xstrtol-error.c to src/xstrtol-error.c.

2007-08-11  Eric Blake  <ebb9@byu.net>

	Another upstream xstrtol change.
	* po/POTFILES.in: Track changes in files containing messages.
	* bootstrap (src_modules): getopt is now pulled into libgnu.a, no
	need to grab it separately.
	* src/main.c (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
	No longer needed.
	(size_opt): Adjust to latest xstrtol interface.

2007-08-10  Eric Blake  <ebb9@byu.net>

	Documentation improvements.
	* doc/m4.texinfo (Defn): Resync with branch.
	(Compatibility, Extensions): Sync with branch.

2007-08-07  Eric Blake  <ebb9@byu.net>

	Adjust to gnulib xstrtol changes.
	* src/main.c (size_opt): Adjust signature, so that error strings
	are easier to translate.
	(OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT): New macros
	for tracking long options.
	(main): Track which long option was used.
	* tests/options.at (--debuglen, --nesting-limit): Adjust to change
	in error message.
	(deprecated options): Test that --arglength spelling shows up in
	error message.

2007-08-06  Eric Blake  <ebb9@byu.net>

	Normalize all GPL license notices.
	* m4/COPYING.LIB: Delete - libm4 is not distributed under LGPLv2
	at this time.
	* Makefile.am: Update license wording.
	* bootstrap: Likewise.
	* commit: Likewise.
	* configure.ac: Likewise.
	* ltdl/config/mailnotify: Likewise.
	* ltdl/config/mkstamp: Likewise.
	* ltdl/m4/debug.m4: Likewise.
	* ltdl/m4/gmp.m4: Likewise.
	* ltdl/m4/m4-error.m4: Likewise.
	* ltdl/m4/m4-getopt.m4: Likewise.
	* ltdl/m4/m4-gettext.m4: Likewise.
	* ltdl/m4/m4-obstack.m4: Likewise.
	* ltdl/m4/m4-regex.m4: Likewise.
	* ltdl/m4/stackovf.m4: Likewise.
	* m4/builtin.c: Likewise.
	* m4/debug.c: Likewise.
	* m4/hash.c: Likewise.
	* m4/hash.h: Likewise.
	* m4/input.c: Likewise.
	* m4/m4.c: Likewise.
	* m4/m4module.h: Likewise.
	* m4/m4private.h: Likewise.
	* m4/macro.c: Likewise.
	* m4/module.c: Likewise.
	* m4/output.c: Likewise.
	* m4/path.c: Likewise.
	* m4/resyntax.c: Likewise.
	* m4/symtab.c: Likewise.
	* m4/syntax.c: Likewise.
	* m4/system_.h: Likewise.
	* m4/utility.c: Likewise.
	* modules/evalparse.c: Likewise.
	* modules/format.c: Likewise.
	* modules/gnu.c: Likewise.
	* modules/import.c: Likewise.
	* modules/load.c: Likewise.
	* modules/m4.c: Likewise.
	* modules/m4.h: Likewise.
	* modules/modtest.c: Likewise.
	* modules/mpeval.c: Likewise.
	* modules/perl.c: Likewise.
	* modules/shadow.c: Likewise.
	* modules/stdlib.c: Likewise.
	* modules/time.c: Likewise.
	* modules/traditional.c: Likewise.
	* po/Makevars: Likewise.
	* src/freeze.c: Likewise.
	* src/m4.h: Likewise.
	* src/main.c: Likewise.
	* src/stackovf.c: Likewise.
	* tests/builtins.at: Likewise.
	* tests/freeze.at: Likewise.
	* tests/generate.awk: Likewise.
	* tests/m4.in: Likewise.
	* tests/macros.at: Likewise.
	* tests/modules.at: Likewise.
	* tests/options.at: Likewise.
	* tests/others.at: Likewise.
	* tests/stackovf.test: Likewise.
	* tests/testsuite.at: Likewise.

2007-07-22  Eric Blake  <ebb9@byu.net>

	Fix diversions on NetBSD, when fopen(name,"a+") seeks to end.
	* m4/output.c (m4_tmpopen): Explicitly seek to beginning.
	* tests/builtins.at (divert): Enhance test to cover this.
	* THANKS: Update.
	Reported by Thomas Klausner.

2007-07-20  Eric Blake  <ebb9@byu.net>

	Fix 'make distcheck' issues.
	* bootstrap: Add more files that might be more up-to-date in
	gnulib.
	* Makefile.am (EXTRA_DIST): No longer distribute removed diff.
	* config/m4/gnulib-cache.m4: Update to latest gnulib.

2007-07-16  Eric Blake  <ebb9@byu.net>

	* po/POTFILES.in: Track recent translation additions from gnulib
	updates.

2007-07-14  Eric Blake  <ebb9@byu.net>

	Reflect upstream license .texi changes.
	* doc/m4.texinfo (Copying): Rename node...
	(GNU General Public License): ...to this.
	(GNU Free Documentation License): Adjust node location.
	* local/doc/gpl-3.0.texi.diff: Remove file.

2007-07-10  Eric Blake  <ebb9@byu.net>

	Upgrade to GPLv3, and document 1.4.10.
	* bootstrap: Adjust to GPLv3.
	(func_update): Port from branch.
	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool
	--local-dir=local --import gpl-3.0'.
	* doc/m4.texinfo (History): Mention 1.4.11.
	(Copying This Package): New appendix.
	* NEWS: Document 1.4.10.
	* local/doc/gpl-3.0.texi.diff: New file.
	* Makefile.am: Update license.
	(doc_m4_TEXINFOS, EXTRA_DIST): Distribute additions.
	* commit: Update license.
	* configure.ac: Likewise.
	* ltdl/config/mailnotify: Likewise.
	* ltdl/config/mkstamp: Likewise.
	* ltdl/m4/debug.m4: Likewise.
	* ltdl/m4/gmp.m4: Likewise.
	* ltdl/m4/m4-error.m4: Likewise.
	* ltdl/m4/m4-getopt.m4: Likewise.
	* ltdl/m4/m4-gettext.m4: Likewise.
	* ltdl/m4/m4-obstack.m4: Likewise.
	* ltdl/m4/m4-regex.m4: Likewise.
	* ltdl/m4/stackovf.m4: Likewise.
	* m4/builtin.c: Likewise.
	* m4/debug.c: Likewise.
	* m4/hash.c: Likewise.
	* m4/hash.h: Likewise.
	* m4/input.c: Likewise.
	* m4/m4.c: Likewise.
	* m4/m4module.h: Likewise.
	* m4/m4private.h: Likewise.
	* m4/macro.c: Likewise.
	* m4/module.c: Likewise.
	* m4/output.c: Likewise.
	* m4/path.c: Likewise.
	* m4/resyntax.c: Likewise.
	* m4/symtab.c: Likewise.
	* m4/syntax.c: Likewise.
	* m4/system_.h: Likewise.
	* m4/utility.c: Likewise.
	* modules/evalparse.c: Likewise.
	* modules/format.c: Likewise.
	* modules/gnu.c: Likewise.
	* modules/import.c: Likewise.
	* modules/load.c: Likewise.
	* modules/m4.c: Likewise.
	* modules/m4.h: Likewise.
	* modules/modtest.c: Likewise.
	* modules/mpeval.c: Likewise.
	* modules/perl.c: Likewise.
	* modules/shadow.c: Likewise.
	* modules/stdlib.c: Likewise.
	* modules/time.c: Likewise.
	* modules/traditional.c: Likewise.
	* po/Makevars: Likewise.
	* src/freeze.c: Likewise.
	* src/m4.h: Likewise.
	* src/main.c: Likewise.
	* src/stackovf.c: Likewise.
	* tests/builtins.at: Likewise.
	* tests/freeze.at: Likewise.
	* tests/generate.awk: Likewise.
	* tests/m4.in: Likewise.
	* tests/macros.at: Likewise.
	* tests/modules.at: Likewise.
	* tests/options.at: Likewise.
	* tests/others.at: Likewise.
	* tests/stackovf.test: Likewise.
	* tests/testsuite.at: Likewise.

2007-07-09  Eric Blake  <ebb9@byu.net>

	* modules/format.c (format): Avoid undefined behavior with %c.

2007-07-01  Gary V. Vaughan  <gary@gnu.org>

	The translation project has moved.
	* bootstrap (func_get_translations): Use the new translation
	project url.
	(TP_URL): Removed.

2007-06-26  Karl Berry  <karl@freefriends.org>  (tiny change)

	Match Free Software Directory categories.
	* doc/m4.texinfo (dircategory): Update.

2007-05-31  Eric Blake  <ebb9@byu.net>

	Add extension to divert builtin.
	* modules/m4.c (builtin_divert): Immediately divert second
	argument.
	* m4/output.c (m4_output_text): Allow 0 length.  Fixes regression
	from two days ago.
	(m4_shipout_text): Short-circuit on zero length.
	* tests/freeze.at (loading format 2): Expand test to catch
	regression.  Also check out-of-range version.
	* tests/builtins.at (divert): Expand test to check corner cases
	of extension.
	* doc/m4.texinfo (Divert): Document the extension.
	* NEWS: Likewise.
	Reported by Daniel Richard G.

2007-05-30  Eric Blake  <ebb9@byu.net>

	Port format improvements from branch.
	* doc/m4.texinfo (History): Mention upcoming 1.4.10 release.
	(Format): Enhance section.
	* modules/format.c (format): Accept %'hhd, and issue warnings on
	unrecognized specifiers.
	* modules/gnu.c (builtin_format): Adjust how format is called.

2007-05-28  Eric Blake  <ebb9@byu.net>

	* tests/options.at (--syncoutput): Add xfailed test.

	Fix sync line interaction with multiline comments.
	* doc/m4.texinfo (Preprocessor features): Improve documentation.
	(Syncoutput): Improve testsuite.
	(Incompatibilities): Add testcase, and document bug.
	* src/freeze.c (reload_frozen_state): Don't interfere with
	synclines when reloading state.
	* m4/input.c (m4__next_token): Report line where multiline tokens
	start.
	* m4/m4private.h (m4__token_type): Add parameter.
	* m4/m4module.h (m4_output_text): Export.
	(m4_shipout_text): Add parameter.
	* src/macro.c (m4_macro_expand_input, expand_token)
	(expand_argument): Adjust callers so that line is passed from
	input to output.
	* m4/output.c (output_text): Rename...
	(m4_output_text): ...to this, and export.
	(m4_insert_file, insert_diversion_helper): Update callers.
	(m4_shipout_text): Take new parameter for start line of token.
	Output at most one syncline per token.
	Reported by Sergey Poznyakoff.

	Fix large diversion corner cases.
	* tests/freeze.at (large diversion): New test.
	* m4/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
	(make_room_for): Use NULL, not 0, for pointers.
	(m4_freeze_diversions): Allow freezing large diversions.
	(insert_diversion_helper): Avoid using rewind.

	Also run gnulib unit tests during make check.
	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool
	--tests-base=tests/gnu --with-tests'.
	* configure.ac (AC_CONFIG_FILES): Build tests/gnu testdir.
	* Makefile.am (SUBDIRS): Run gnulib tests before ours.

2007-05-25  Eric Blake  <ebb9@byu.net>

	* m4/system_.h: Include <stdint.h>, for intmax_t.
	* THANKS: Update.
	Reported by Daniel Richard G.

2007-05-24  Eric Blake  <ebb9@byu.net>

	Provide consistent shift semantics regardless of hardware.
	* modules/m4.c (numb_lshift, numb_rshift, numb_urshift): Mask
	before shifting.
	(number, unumber): Always use [u]intmax_t.
	Reported by Gary V. Vaughan.

	Support POSIX flush semantics on all platforms.
	* modules/m4.c (m4_sysval_flush): Rely on gnulib.
	* ltdl/m4/gnulib-cache.m4: Fix typo in previous commit.

	Work around cygwin and mingw fseeko bugs.
	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	fseeko'.
	* modules/m4.c (m4_sysval_flush): Prefer fseeko over fseek.

2007-04-25  Eric Blake  <ebb9@byu.net>

	Test that regression in 1.4.9's eval doesn't recur.
	* doc/m4.texinfo (Eval): Check negative division.
	* THANKS: Update.

2007-04-12  Eric Blake  <ebb9@byu.net>

	Allow for running test in sticky or setgid directory.
	* tests/builtins.at (mkdtemp): Adjust test.

	Don't test for broken sed too soon.
	* tests/others.at (stdin seekable): Rearrange subtests.

	Work around 'stdin seekable' shortcoming on glibc.
	* ltdl/m4/gnulib-cache.m4: Use closein instead of closeout.
	* tests/others.at (stdin closed): Adjust to new output.
	* src/main.c (process_file): No need to return anything.
	(main): Use close_stdin instead of close_stdout.
	Reported by Ralf Wildenhues.

	Enable autobuild usage.
	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	autobuild'.
	* configure.ac (AB_INIT): Output autobuild information.

2007-04-11  Eric Blake  <ebb9@byu.net>

	Address testsuite shortcoming in 'stdout full' on glibc.
	* tests/others.at (stdout full): Adjust expected output when more
	than 1k text is printed to /dev/full.
	Reported by Ralf Wildenhues.

2007-04-10  Eric Blake  <ebb9@byu.net>

	* tests/macros.at (Arity and defn): Fix quoting.

2007-04-09  Eric Blake  <ebb9@byu.net>

	Address failure of 'seekable stdin' on Mac OS X.
	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	fflush'.

2007-04-07  Eric Blake  <ebb9@byu.net>

	Include <config.h> first in all C files, and not in headers.
	Fixes regression for --disable-assert builds from 2007-04-02.
	* src/m4.h (includes): Don't include config.h here.
	* m4/m4private.h (includes): Likewise.
	* m4/builtin.c: Include config.h before anything else.
	* m4/debug.c: Likewise.
	* m4/hash.c: Likewise.
	* m4/input.c: Likewise.
	* m4/m4.c: Likewise.
	* m4/macro.c: Likewise.
	* m4/module.c: Likewise.
	* m4/symtab.c: Likewise.
	* m4/syntax.c: Likewise.
	* m4/utility.c: Likewise.
	* src/freeze.c: Likewise.
	* src/stackovf.c: Likewise.

2007-04-03  Eric Blake  <ebb9@byu.net>

	* modules/m4.c (numb_ratio, numb_divide, numb_modulo): Avoid
	SIGFPE on x86 architectures.
	Reported by Ralf Wildenhues.

2007-04-02  Eric Blake  <ebb9@byu.net>

	Fix warnings from last commit.
	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	fprintf-posix sprintf-posix'.
	* m4/macro.c (expand_macro, trace_format): Use correct specifier
	for size_t.
	(process_macro): Avoid negative array index.
	* src/freeze.c (produce_resyntax_dump, produce_module_dump)
	(dump_symbol_CB, produce_frozen_state): Use correct specifier for
	size_t.

2007-04-02  Gary V. Vaughan  <gary@gnu.org>

	Get rid of the last 'differs in signedness' compiler warnings:

	* m4/macro.c (process_macro): m4_get_symbol_value_text() returns
	a regular 'char *', so variables to store the return address,
	and iterate through it should be regular 'char *' too.
	* m4/input.c (m4_input_block): The start and current members of
	the string part of this union store regular 'char *' types, so
	they should be regular 'char *' types too.

2007-04-02  Gary V. Vaughan  <gary@gnu.org>

	M4 was designed to have a small number of header files defining
	the interfaces to several source files each.  Keeping this in
	mind allows us to tidy things up considerably.  Having done this,
	it becomes clear that some of the installed headers reference
	other headers which are not installed (but that's another patch):

	* m4/m4private.h (stdio--.h, stdlib--.h, unistd--.h): Moved from
	here...
	* m4/system_.h (gnu/stdio--.h, gnu/stdlib--.h, gnu/unistd--.h):
	...to here, so client modules can benefit too.
	(assert.h, errno.h, limits.h, sys/stat.h): Include one here at the
	lowest level to save doing it multiple times elsewhere.
	* m4/debug.c (stdio.h): Removed.  The portable <gnu/stdio--.h>
	is already included via m4private.h.
	* modules/time.c (stdio.h): Ditto.
	* modules/gnu.c (stdlib.h): Ditto resp <gnu/stdlib--.h>.
	* modules/stdlib.c (stdlib.h, unistd.h): Ditto resp <gnu/stdlib--.h>
	and <gnu/unistd--.h>,
	* m4/m4private.h (m4module.h): Use angle brackets for an installed
	file.
	* m4/hash.h (system.h): Ditto.
	* modules/gnu.c (progname.h): Removed.
	* src/freeze.c (m4/system.h, m4private.h): Already included vi m4.h.
	* m4/m4private.h (assert.h, errno.h): Already included via
	m4/m4module.h.
	* m4/input.c (ctype.h): Ditto.
	* m4/module.c (ltdl.h): Ditto.
	* m4/output.c (errno.h, limits.h, stdio.h, sys/types.h, sys/stat.h)
	(unistd.h): Ditto.
	* m4/path.c (config.h, stdlib.h): Ditto.
	* m4/utility.c (config.h): Ditto.
	* modules/evalparse.c (assert.h, ctype.h): Ditto.
	* modules/gnu.c (assert.h, ctype.h, errno.h): Ditto.
	* modules/import.c (assert.h): Ditto.
	* modules/m4.c (assert.h, errno.h): Ditto.
	* modules/modtest.c (assert.h): Ditto.
	* modules/stdlib.c (sys/types.h): DittAo.
	* src/m4.h (ctype.h, errno.h, string.h, sys/types.h, ltdl.h):
	Ditto.
	* src/stackovf.c (assert.h): Ditto.
	* modules/gnu.c (m4/m4module.h, m4private.h): Build using the faster
	private interfaces when NDEBUG is defined.
	* modules/import.c (m4/m4module.h, m4private.h): Ditto.
	* modules/load.c (m4/m4module.h, m4private.h): Ditto.
	* modules/m4.c (m4/m4module.h, m4private.h): Ditto.
	* modules/modtest.c (m4/m4module.h, m4private.h): Ditto.
	* modules/mpeval.c (m4/m4module.h, m4private.h): Ditto.
	* modules/perl.c (m4/m4module.h, m4private.h): Ditto.
	* modules/shadow.c (m4/m4module.h, m4private.h): Ditto.
	* modules/time.c (m4/m4module.h, m4private.h): Ditto.
	* modules/traditional.c (m4/m4module.h, m4private.h): Ditto.
	* src/m4.h (locale.h): Moved from here...
	* src/main.h: ...to here.
	(m4private.h): Already included via m4.h.
	* src/stackovf.c (m4private.h): Ditto.

2007-03-28  Gary V. Vaughan  <gary@gnu.org>

	* Makefile.am (stamp-vcl): Removed.
	(CONFIG_STATUS_DEPENDENCIES): Depend directly on ChangeLog.

2007-03-28  Eric Blake  <ebb9@byu.net>

	* src/main.c (usage): Improve note to TRANSLATORS.
	* m4/system_.h (EXIT_FAILURE): Reflect gnulib changes.

	* tests/builtins.at (__m4_version__): Fix bug when TIMESTAMP is
	empty.

2007-03-24  Eric Blake  <ebb9@byu.net>

	* m4/output.c (m4_output_init): Update to latest gnulib.
	* bootstrap (ltdl/m4/.cvsignore): No longer track generated
	.cvsignore in CVS.
	* NEWS: Reflect release of 1.4.9.
	* THANKS: Update.

2007-03-07  Eric Blake  <ebb9@byu.net>

	* AUTHORS: Update

	Exercise gnulib's new POSIX *printf modules.
	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	vasprintf-posix'.
	* modules/format.c (format): Support %a and %A.
	* doc/m4.texinfo (Format): Test this addition.
	* NEWS: Document this addition.

2007-03-03  Eric Blake  <ebb9@byu.net>

	* m4/input.c (m4__next_token): Fix synclines when in batch mode.
	* doc/m4.texinfo (M4exit): Synch another section.
	(Syncoutput): Make similar to other sections.

2007-03-01  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo: Improve the indices.
	(Concept index): Rearrange to be last.
	(Sysval): Merge from branch.

	* doc/m4.texinfo (Syscmd, Esyscmd): Merge more doc sections.

2007-02-28  Eric Blake  <ebb9@byu.net>

	POSIX XCU ERN 137 was approved.
	* modules/mpeval.c (numb_extension): Delete.
	* modules/m4.c (numb_extension): Likewise.
	* modules/evalparse.c (comma_term, condition_term): Always
	implement ?: and , operators.
	* m4/symtab.c: Update comment to match reality.
	* src/freeze.c (produce_frozen_state, reload_frozen_state): Avoid
	dereferencing context directly when accessor exists.
	* src/main.c (usage): Prefer GNU_M4 over EMACS.
	(struct macro_definition): Rename...
	(struct deferred): ...to match usage.  All uses changed.
	* doc/m4.texinfo (Eval): Document this change.
	(Operation modes, Changeresyntax): Fix wording to prefer GNU_M4
	over emacs.
	(Preprocessor features, Changesyntax): Fix inaccuracies.
	* NEWS: Import branch NEWS items for 1.4.x series.  Document
	change in eval.

	POSIX XCU ERN 118 was approved.
	* modules/m4.c (define): Kill posixly_correct distinction in
	define behavior, since POSIX says GNU behavior complies.
	* tests/builtins.at (define): Restore original semantics.
	* doc/m4.texinfo (Pushdef): Document portability issues with
	define.
	(Incompatibilities): Clean up wording of what POSIX requires.
	* NEWS: Document this.

2007-02-26  Eric Blake  <ebb9@byu.net>

	Re-enable clean bootstrap on cygwin.
	* Makefile.am (AM_LDFLAGS): For now, export all symbols from
	modules, since otherwise we run afoul of current libtool
	limitations on cygwin and mingw.

2007-02-25  M. Levinson  <levinsm@users.sourceforge.net>  (tiny change)

	* src/freeze.c (reload_frozen_state): Avoid dereferencing freed
	memory.  Fixes regression introduced 2007-01-20.

2007-02-25  Eric Blake  <ebb9@byu.net>

	* tests/freeze.at (loading format 2): Augment test to catch
	regression introduced on 2007-01-20.
	* THANKS: Update.
	Reported by M. Levinson.

	* m4/system_.h (includes, EXIT_SUCCESS, EXIT_FAILURE): Adjust to
	latest gnulib.

2007-02-05  Eric Blake  <ebb9@byu.net>

	* tests/options.at (--fatal-warnings): New test.
	* tests/others.at (stdin seekable): Exit on error.
	* m4/m4private.h (M4_OPT_WARN_EXIT_BIT): New bit.
	(m4_get_warnings_exit_opt): Access it.
	* m4/m4module.h (m4_context_opt_bit_table): Access it.
	* m4/utility.c (m4_error, m4_error_at_line): Only force an exit
	on -EE.
	(m4_warn, m4_warn_at_line): Change exit status on -E, and force
	exit on -EE.
	* src/m4.c (usage): Document new -E behavior.
	(main): Make -E an additive option.
	* doc/m4.texinfo (Operation modes): Document the change.
	Reported by Ralf Wildenhues.

	* tests/others.at (stdin seekable): Fix bug in test.
	* ltdl/m4/gnulib-cache.m4: Gnulib module strstr no longer exists.

	* m4/input.c (struct m4_input_block): Remove unused field traced.

2007-02-03  Eric Blake  <ebb9@byu.net>
	and Bruno Haible  <bruno@clisp.org>  (tiny change)

	* doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
	the examples.
	Reported by Bruno Haible.

2007-01-31  Eric Blake  <ebb9@byu.net>

	* m4/resyntax.c (m4_regexp_syntax_encode): Detect allocation
	failure.

2007-01-26  Eric Blake  <ebb9@byu.net>

	* m4/symtab.c (includes): Adjust to latest gnulib.
	* modules/m4.c (includes): Likewise.

2007-01-23  Eric Blake  <ebb9@byu.net>

	* m4/m4module.h (M4_SYNTAX_ASSIGN): Delete this unused
	extension to make enough room.
	(M4_SYNTAX_IGNORE): Change value to zero, since the (commented)
	code in input.c special cases this category.
	(M4_SYNTAX_LBRACE, M4_SYNTAX_RBRACE): New values in preparation
	for define(eleventh,${11}) extension.
	* m4/syntax.c: Update comments accordingly.
	(m4_syntax_create, m4_syntax_code): Handle { and }.
	* m4/input.c (m4__next_token): Likewise.
	* src/freeze.c (produce_frozen_state): Support new categories.
	(reload_frozen_state): When loading version 1, disable syntax
	features not present in 1.4.x.
	* tests/freeze.at: Sort and rename existing tests.
	(loading format 1): Ensure we don't break v1 frozen files that
	used raw ${.
	(loading format 2, reloading changecom, reloading changesyntax):
	New tests.
	* doc/m4.texinfo (Changesyntax, Frozen file format 1): Document
	the new syntax categories.
	(Arguments): Update the FIXME comment.
	(M4wrap): Merge examples from branch, before worrying about fixing
	m4wrap to obey POSIX.
	(Using frozen files): Start merging from branch.
	* NEWS: Update.

2007-01-20  Eric Blake  <ebb9@byu.net>

	* src/freeze.c (produce_char_dump): Delete.  Replace with...
	(produce_mem_dump): ...this new function, to encode more strings.
	Also make the coding easier to read and slightly more compact.
	(produce_syntax_dump): Only dump non-default syntax codes.
	(produce_module_dump, dump_symbol_CB, produce_frozen_state):
	Encode non-ASCII characters in user-supplied strings.
	(GET_STRING): Accept escape sequences in version 2.
	* NEWS: Document this change.
	* TODO: Update.

2007-01-16  Eric Blake  <ebb9@byu.net>

	Port patch from branch for stack overflow detection on BSD/OS.
	* ltdl/m4/stackovf.m4 (M4_SYS_STACKOVF): Check for stack_t.ss_sp.
	* src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
	! HAVE_STACK_T_SS_SP]: Use this check.
	Reported by Chris McGuire.

2007-01-15  Eric Blake  <ebb9@byu.net>

	* tests/builtins.at (__m4_version__): New test.
	* modules/traditional.c (m4_macro_table): Provide windows and os2
	macros, as appropriate.  Add __traditional__ macro.
	* modules/mpeval.c (m4_macro_table): Name the macro __mpeval__,
	not __gmp__, to match module name.
	* modules/load.c (m4_macro_table): Name the macro __load__, not
	__modules__, to match module name.
	* doc/m4.texinfo (History, Shell commands, Platform macros): Merge
	from the branch.
	(Standard Modules): Improve wording.
	(Incompatibilities): Move platform macros into their own node.
	(Load, Unload): Use actual examples.
	* NEWS: Document this change.
	* THANKS: Update.

2007-01-13  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Mpeval): Add tests.
	* tests/testsuite.at (AT_CHECK_GMP): New filter, factored from...
	* tests/builtins.at (gmp): ...here.  Rename test to...
	(mpeval): ...this.
	* tests/generate.awk (new_test): Filter out mpeval tests when gmp
	is not available.
	* m4/m4module.h (m4_get_no_gnu_extensions_opt): Merge
	no_gnu_extensions with posixly_correct_opt, since they were set in
	sync.
	* m4/m4private.h (struct m4): Remove no_gnu_extensions.
	* src/main.c (main): Update caller.
	* src/freeze.c (reload_frozen_state): Likewise.
	* modules/m4.c (m4wrap): Likewise.

2007-01-12  Eric Blake  <ebb9@byu.net>

	* m4/syntax.c (m4_set_comment): XCU ERN 131 was approved by
	POSIX, so update the comment.
	* doc/m4.texinfo (Inhibiting Invocation): XCU ERN 130 was
	approved by POSIX, so we can always have blind macros, even when
	POSIXLY_CORRECT.
	(Ifelse): Mention the term `blind builtin'.

2007-01-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* doc/m4.texinfo: Fix a couple of typos.

2007-01-08  Eric Blake  <ebb9@byu.net>

	* ltdl/m4/gnulib-cache.m4: Update for new year.
	* ltdl/m4/gmp.m4 (_M4_LIB_GMP): Cover all error cases.
	Reported by Ralf Wildenhues.

2007-01-06  Eric Blake  <ebb9@byu.net>

	* m4/m4private.h (to_uchar): Move...
	* m4/m4module.h: here, so modules can use it.
	* src/main.c (usage, long_options): Support --posix as a synonym
	for --traditional.
	* modules/m4.c (numb_invert): Detect unsupported x**-y.
	(numb_incr, numb_urshift, numb_extension): New macros.
	(numb_obstack): Port patch from branch to support radix 1 output.
	* modules/mpeval.c (numb_obstack): Use \ for ratios.
	(numb_incr, numb_urshift, numb_extension): New macros.
	(mpq2mpz): Warn rather than error.
	* modules/evalparse.c (URSHIFT, NEGATIVE_EXPONENT): New
	enumerators.
	(eval_error): Rearrange, so that all ignorable errors are less
	than SYNTAX_ERROR.
	(eval_text, last_text): Obey C++ type safety rules.
	(numb_pow): Change return type.
	(exp_term): Adjust caller.
	(m4_evaluate): Fail on bad exponent.
	(logical_or_term, logical_and_term): Ignore failed ** in short
	circuit.
	(eval_lex): Fix typos when detecting <<= and >>=.  Use \ instead
	of : for ratio.  Support >>>, ,, and ?:.  Port patch from branch
	to parse radix 1 numbers.
	(condition_term, comma_term): New parse functions.
	(shift_term): Support >>>.
	(m4_evaluate): Port patch from branch to output radix 1 numbers.
	Warn instead of error for most parse problems.
	* doc/m4.texinfo (Limits control, Eval): Document these changes.
	* NEWS: Document new operators and new command line option.

2007-01-04  Eric Blake  <ebb9@byu.net>

	* configure.ac (AC_SYS_LARGEFILE): Guarantee large file support.

2007-01-03  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Format, Incr): More merges.
	(Eval): Ensure C precedence rules are met.
	* modules/evalparse.c (BADOP, INVALID_OPERATOR): New enumerators.
	(not_term, logical_not_term): Delete; these are same precedence
	as other unary operators.
	(equality_term): New; these are lower precedence than relational
	operators.
	(eval_lex, simple_term, m4_evaluate): Recognize forbidden C
	operators for better error messages.
	(logical_or_term, logical_and_term): Short-circuit out the error
	of division by zero.
	(unary_term): Allow consecutive unary operators.
	* modules/m4.c (int2numb, numb2int): Delete; these potentially
	truncate bits.
	(numb_not, numb_eor, numb_ior, numb_and): Update callers.
	* modules/mpeval.c (reduce1, reduce2): Protect macros better.
	* NEWS: Document this change.

2006-12-27  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Substr, Patsubst): Merge more sections from the
	branch.
	* modules/m4.c (substr): Merge from branch.

2006-12-26  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Changesyntax): Check for regressions with
	changesyntax(W=...).

2006-12-22  Eric Blake  <ebb9@byu.net>

	* m4/m4module.h (m4_set_syntax): Change signature.
	* modules/gnu.c (m4_resyntax_encode_safe): Reduce error to
	warning.
	(changesyntax): Likewise, and update caller.
	* m4/m4private.h (m4_syntax_table): Add orig member.
	* m4/syntax.c (m4_set_quotes, m4_set_comment): Merge from branch.
	Don't set is_single_quotes and is_single_comments when the begin
	character is shadowed by another syntax type.
	(m4_syntax_create): Populate default syntax table.
	(add_syntax_attribute): Don't lose quote assignment.
	(remove_syntax_attribute): Only allow removing rquote or ecomm.
	(add_syntax_set, subtract_syntax_set, set_syntax_set)
	(reset_syntax_set): New helper routines.
	(m4_set_syntax): Alter semantics - NUL key reverts entire syntax
	to default, and empty chars reverts that key to default.
	(check_is_single_quotes, check_is_single_comments): New helper
	routines.
	* modules/m4.c (changecom): Merge from branch.
	* m4/input.c (m4__next_token): Rearrange token recognition order
	to macro, quote, comment, in order to match traditional
	implementations.
	* src/freeze.c (reload_frozen_state): Update caller.
	* doc/m4.texinfo (Changequote, Changecom): Merge from branch, with
	modifications.
	(Changeresyntax): Revise to match style of surrounding sections
	and add more examples.
	(Changesyntax): Likewise, and update to new semantics.
	* NEWS: Document this change.

	* doc/m4.texinfo (Operation modes): Avoid underfull hbox.
	(M4wrap, Eval, Errprint): Fix typos.
	(Divnum): Not necessary to redivert in example.

2006-12-21  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Len, Index macro, Regexp): More section merging
	from branch.

2006-12-19  Eric Blake  <ebb9@byu.net>

	* modules/m4.h (m4_sysval_flush_func): Adjust prototype.
	* modules/m4.c (m4_sysval_flush): Add parameter, so that m4exit
	can track write errors without all other callers warning multiple
	times.
	(sysval_flush_helper): New function.
	(dumpdef, syscmd, errprint, m4exit): Adjust callers.
	* modules/gnu.c (esyscmd): Likewise.
	* tests/others.at (stdout closed, stdout full): Error message
	update.

2006-12-16  Eric Blake  <ebb9@byu.net>

	* src/main.c: Fix missing include.

	* src/main.c (main): Check for errors when closing stdin.
	* modules/m4.c (m4exit): Missed part of previous patch: flush
	stdin before a successful exit.
	Reported by Ralf Wildenhues.

2006-12-14  Eric Blake  <ebb9@byu.net>

	* modules/m4.c (m4_sysval_flush): Flush stdin before exiting, as
	required by POSIX.
	* tests/others.at (stdin seekable): New test.

2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* doc/m4.texinfo: Fix some typos.

2006-12-04  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Undivert, Divnum, Cleardivert): Merge more doc
	sections.
	(Modules): Make style consistent.

2006-11-16  Eric Blake  <ebb9@byu.net>

	* bootstrap: Relax m4 requirement, thanks to...
	* configure.ac (Gettext support): ...this workaround to the 1.4.4
	bug.  Undoes restriction added on 2006-11-09.

	* tests/builtins.at (esyscmd, syscmd): Redo, since spilled
	diversions are now closed when not active.
	(divert): Remove check now in the manual.
	* tests/others.at (stderr closed): Likewise.
	(stdout closed): Add a check.
	* doc/m4.texinfo (Include, Search Path, Diversions, Divert): Sync
	more docs with branch.

2006-11-14  Eric Blake  <ebb9@byu.net>

	Remerge sparse diversion handling from branch.
	* ltdl/m4/gnulib-cache.m4: Replace avltree-list with
	avltree-oset.
	* m4/output.c (diversion_table): Change type to gl_oset_t.
	(m4_output_init, m4_output_exit, cleanup_tmpfile, make_room_for)
	(m4_make_diversion, insert_diversion_helper, m4_insert_diversion)
	(m4_undivert_all, m4_freeze_diversions): Adjust all callers.
	(div0, diversion_storage): New variables.
	(diversions, equal_diversion_CB): Deleted.
	(threshold_diversion_CB): New callback.
	(m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
	functions.
	(m4_tmpfile): Move cloexec action here.

	* m4/resyntax.c (m4_regexp_syntax_encode): Avoid bug with signed
	char.

2006-11-13  Eric Blake  <ebb9@byu.net>

	Add several new command line options.
	* src/main.c (usage): Update.
	(OPTSTRING, long_options): Add --pushdef, --popdef, --gnu,
	--traceon, --traceoff, --syncoutput, --warnings, --unload-module.
	Make --regexp-syntax argument optional.
	(main): Support new options.  Fix regression in interactive
	behavior from Nov 8.
	* m4/m4private.h (M4_OPT_SYNCOUTPUT_BIT): Rename from
	M4_OPT_SYNC_OUTPUT_BIT.
	* m4/m4module.h (m4_context_opt_bit_table): Rename sync_output to
	syncoutput, to match option.
	(m4_parse_truth_arg): New prototype.
	* m4/utility.c (m4_parse_truth_arg): Implement it.
	* m4/output.c (m4_shipout_text): Adjust sync_output caller.
	* modules/gnu.c (syncoutput): Adjust sync_output caller, and use
	m4_parse_truth_arg.
	* doc/m4.texinfo (Operation modes, Dynamic loading features)
	(Preprocessor features, Limits control, Debugging options)
	(Command line files): Update documentation.
	* tests/builtins.at (mkstemp): Simplify.
	* tests/macros.at (Command line pushdef): New test.
	(Command line define): Improve.
	* tests/options.at (--traceon and --traceoff, --syncoutput): New
	tests.
	(POSIXLY_CORRECT): Likewise.
	(deprecated options): Augment.
	(--regexp-syntax): Update, now that -r takes optional arg.
	* NEWS: Reformat.  Document new options.

2006-11-11  Eric Blake  <ebb9@byu.net>

	One step closer to allowing C++ compilation - don't blindly
	convert between char* and unsigned char*.
	* m4/m4module.h (m4_set_syntax): Change signature.
	* m4/m4private.h (m4_string): Use signed char.
	(m4_get_syntax_lquote, m4_get_syntax_rquote, m4_get_syntax_bcomm)
	(m4_get_syntax_ecomm): No longer a need to cast.
	* m4/syntax.c (m4_set_syntax, m4_syntax_create, m4_set_quotes):
	Reflect this change.
	* m4/macro.c (expand_argument): Simplify.
	(expand_token): Use proper type.
	* src/freeze.c (reload_frozen_state): Likewise.
	* m4/input.c (MATCH, match_input): Likewise.
	* modules/m4.c (translit): Likewise.
	* modules/gnu.c (substitute): Simplify.

	* m4/macro.c (trace_format): Use canonical type name.
	* m4/output.c (m4_freeze_diversions): Likewise.
	* src/freeze.c (produce_module_dump, dump_symbol_CB)
	(produce_frozen_state): Likewise.
	* m4/m4private.h (to_uchar): Grab from branch.
	* m4/input.c (string_peek, string_read): Use it.
	* m4/utility.c (skip_space): Likewise.
	* src/main.c (main): Likewise.
	* doc/m4.texinfo (Translit): Remerge from branch.
	* tests/builtins.at (translit): Test 8-bit range.
	* modules/m4.c (m4_expand_ranges): Merge from branch.

2006-11-09  Eric Blake  <ebb9@byu.net>

	* bootstrap: Validate that installed M4 is powerful enough.
	Reported by Gary V. Vaughan, analyzed by Stepan Kasal.

2006-11-08  Eric Blake  <ebb9@byu.net>

	Merge deferred handling of -D option from branch.
	* doc/m4.texinfo (Debugging options, Preprocessor features)
	(Dynamic loading features, Operation modes, Invoking m4):
	Document this change.
	* src/main.c (OPTSTRING): Specify in-order processing.
	(process_file): New function.
	(main): Use it to interleave files and deferred options.
	* tests/macros.at (Command line define): New test.
	* tests/generate.awk: Allow '@comment file' as first example
	within a node.
	* tests/options.at (option grouping): Update to reflect actual
	POSIX semantics.
	(file names): New test.

2006-11-07  Eric Blake  <ebb9@byu.net>

	* m4/output.c (cleanup_tmpfile, m4_insert_diversion_helper): Check
	for failure.

	* tests/builtins.at (m4exit): New test; failed on cygwin before
	this patch.
	* m4/output.c (cleanup_tmpfile): Close files before removing
	directory.
	(make_room_for, m4_output_exit): Ensure that atexit handler
	invoked from m4_error sees consistent state.

	* doc/m4.texinfo (Errprint): Merge another doc node.
	* tests/builtins.at (dumpdef, errprint): New tests.
	* modules/m4.c (errprint): Merge from branch: flush before
	printing to stderr.

2006-11-02  Eric Blake  <ebb9@byu.net>

	* bootstrap: Update bootstrap requirement wording.
	Reported by Bruno Haible.

2006-10-31  Eric Blake  <ebb9@byu.net>

	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	strstr'.
	* doc/m4.texinfo (Translit): Merge from branch.
	* modules/m4.c (divert, substr): Ignore excess arguments.
	(index, translit): Merge from branch.
	* tests/builtins.at (translit): Add a test.

2006-10-30  Eric Blake  <ebb9@byu.net>

	* m4/m4private.h (m4_get_symbol_value_module): Delete accidental
	checkin.
	* m4/symtab.c (m4_get_symbol_value_module): Likewise.

	* modules/m4.c (m4_make_temp): Make safe across libtool.
	* m4/symtab.c (dump_symbol_CB) [DEBUG_SYM]: Avoid warnings.
	* configure.ac (--with-modules): Accomodate changed module
	location when doing './configure --enable-debug'.

2006-10-28  Eric Blake  <ebb9@byu.net>

	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	config-h.'

2006-10-27  Eric Blake  <ebb9@byu.net>

	* bootstrap (gnulib): No longer a need to patch after gnulib-tool
	--update.
	* configure.ac (AM_GNU_GETTEXT_VERSION): Bump requirement to
	0.16, since 0.15 is incompatible with our automake requirement.

	* m4/macro.c (expand_argument): Fix missing initialization.
	* m4/m4private.h (struct m4_symbol_value): Store entire
	m4_builtin, not just the func.
	(m4_get_symbol_value_func): Update.
	(m4_get_symbol_value_builtin, m4_set_symbol_value_builtin): New
	fast accessors.
	* m4/m4module.h (m4_get_symbol_value_builtin)
	(m4_get_symbol_builtin): New prototypes.
	(m4_set_symbol_value_func): Delete, replace with...
	(m4_set_symbol_value_builtin): New function.
	(m4_builtin_find_by_name): Change signature.
	* m4/symtab.c (m4_symbol_value_print): Simplify.
	(m4_get_symbol_value_func): Update.
	(m4_get_symbol_value_builtin): New function.
	(m4_set_symbol_value_func): Delete, replace with...
	(m4_set_symbol_value_builtin): New function.
	(dump_symbol_CB) [DEBUG_SYM]: Simplify.
	* m4/builtin.c (m4_builtin_find_by_name): Change signature.
	* m4/input.c (struct m4_input_block): Remove unused trace member.
	(m4_push_builtin, builtin_print, init_builtin_token): Update
	callers.
	* m4/module.c (install_builtin_table): Likewise.
	* src/freeze.c (reload_frozen_state): Likewise.
	* modules/gnu.c (builtin): Make it possible to retrieve a builtin
	token, even after the builtin has been undefined.
	* doc/m4.texinfo (Builtin): Document new capability.
	* NEWS: Likewise.

	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	tempname'.
	* modules/m4.c (m4_make_temp): Use it.
	* tests/builtins.at (mkstemp, mkdtemp): Update message wording.

2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (dist_pkgdata_DATA): Distribute recently-added
	files.

2006-10-26  Eric Blake  <ebb9@byu.net>

	Silence -O2 -Wall -Wwrite-strings warnings.
	* m4/m4private.h (m4_symbol_value): Const-ify text.
	* m4/m4module.h (m4_get_symbol_value_text)
	(m4_get_symbol_value_placeholder, m4_set_symbol_value_text)
	(m4_set_symbol_value_placeholder): Likewise.
	* m4/macro.c (expand_token, expand_argument, expand_macro): Fix
	fallout.
	* m4/symtab.c (m4_symbol_value_delete, m4_symbol_value_copy)
	(m4_get_symbol_value_text, m4_get_symbol_value_placeholder)
	(m4_set_symbol_value_text, m4_set_symbol_value_placeholder):
	Likewise.
	* modules/format.c (format): Likewise.
	* src/main.c (main): Likewise.
	* src/freeze.c (produce_symbol_dump, dump_symbol_CB): Likewise.
	* modules/shadow.c (shadow, test): Likewise.
	* m4/output.c (m4_make_diversion): Don't hold on to empty
	diversions.
	(m4_output_init, make_room_for, m4_undivert_all): Don't type-pun.
	(m4_freeze_diversions): Likewise.  Don't use uninitialized
	variable.

	Convert diversions to list instead of sparse array, part 2.
	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	avltree-list'.
	* m4/output.c (m4_diversion): Add next pointer and divnum members.
	(diversion_table): Convert to a list instead of a sparse array.
	(free_list): Maintain free list of reclaimed diversions.
	(equal_diversion_CB, cmp_diversion_CB): New functions.
	(m4_output_init): Set up list.
	(m4_output_exit): Tear down list.
	(make_room_for, m4_undivert_all, m4_freeze_diversions): Change
	list iteration.
	(m4_make_diversion): Change creation of new diversions.
	(m4_insert_diversion_helper): New function, to avoid list
	searches.
	* tests/builtins.at (divert): The test now passes.
	* NEWS: Document this improvement.

	Convert diversions to list instead of sparse array, part 1.
	* m4/m4module.h (m4_shipout_text, m4_shipout_string): Use size_t
	for length.
	* m4/output.c (diversion, total_buffer_size, output_unused):
	Track size in size_t.  All users changed.
	(struct diversion): Reduce size now, to compensate for part 2.
	(m4_make_diversion, make_room_for): Avoid malloc overflow.
	(m4_output_exit): Fix typo in assert.
	(m4_output_init, make_room_for, m4_make_diversion)
	(m4_insert_diversion, m4_freeze_diversions): Adjust users of
	struct m4_diversion to disambiguate the new union.
	* tests/builtins.at (divert): Detect this failure.

2006-10-25  Eric Blake  <ebb9@byu.net>

	* m4/m4module.h (m4_push_builtin): Add parameter.
	* modules/m4.c (defn): Update caller.
	* m4/input.c (file_read_init, string_read_init): No longer
	needed.
	(input_funcs): Change signature of read_func, all callers
	updated.
	(composite_peek, composite_read, composite_unget),
	(composite_print, composite_funcs): New input type.  Not yet
	fully utilized, but one step closer to fixing defn.
	(m4_input_block): Make every input block track current file and
	line.  Rename some members.  Remove unused out_line.  Add support
	for composite input block.
	(input_change): New flag.
	(file_peek, file_read, file_clean, file_unget, file_print):
	Update callers.
	(m4_push_file, m4_push_builtin, m4_push_string_init)
	(m4_push_string_finish, m4_push_wrapup, m4_pop_wrapup)
	(m4_skip_line, pop_input): Track input block changes.
	(m4_pop_wrapup): Avoid overflow.
	(init_builtin_token): Handle composite input.
	(next_char): Handle input block changes.
	* doc/m4.texinfo (Location): Remerge from branch.

	* src/m4.h (includes): Need <locale.h> after all; fixes
	regression from yesterday.

	* m4/system_.h (obstack_regrow): New macro.  Hopefully glibc will
	accept it someday.
	* m4/macro.c (expand_macro): Avoid referencing invalid memory.
	Handle nesting the argc obstack.
	(expand_token): Avoid unnecessary malloc.
	(collect_arguments): Copy name before invalidating it.
	(argc_stack, argv_stack): New variables.
	(m4_macro_expand_input): Initialize argc and argv stacks once per
	file, instead of once per macro.

2006-10-24  Eric Blake  <ebb9@byu.net>

	* src/m4.h (includes): Add gettext.h, for N_.  Assume setlocale.

2006-10-23  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Macro Arguments, Incompatibilities): Remerge
	from branch regarding stripped leading whitespace.

	* modules/m4.c (includes): Use safe headers even when configured
	with --enable-assert.
	(m4_builtin_table, m4_make_temp): Work around fact that mkstemp is
	#defined as mkstemp_safer.

2006-10-21  Eric Blake  <ebb9@byu.net>

	* modules/m4.c (m4_make_temp): Change signature.
	(maketemp, mkstemp): Update callers.
	* modules/m4.h (m4_make_temp_func): New export.
	* modules/gnu.c (mkdtemp): New macro.
	* doc/m4.texinfo (Operation modes): Document interaction with
	--safer.
	(Mkdtemp): New node.
	* tests/builtins.at (mkdtemp): New test.
	(mkstemp): Check for umask effect.
	* NEWS: Document new builtin.

	* tests/generate.awk (normalize): Update recognition of trailing
	spaces in tests.
	* doc/m4.texinfo: Minor formatting fixes from branch.
	(Foreach, Improved foreach): Merge from branch.
	* examples/foreach.m4: Merge from branch.
	* examples/foreachq.m4: New file from branch.
	* examples/foreach2.m4: Likewise.
	* examples/foreachq2.m4: Likewise.

	* doc/m4.texinfo (titlepage): Add myself as author.
	* src/main.c (AUTHORS): Likewise.

2006-10-19  Eric Blake  <ebb9@byu.net>

	* modules/m4.c (m4_make_temp, mkstemp): New functions.
	(maketemp): Add POSIX behavior and a warning.
	* tests/others.at (maketemp): Move this test...
	* tests/builtins.at (mkstemp): ...to here, and beef up.
	* tests/options.at (--safer): Update to new warning message.
	* doc/m4.texinfo (Mkstemp): Sync from branch.
	(Extensions): Update maketemp behavior.
	* NEWS: Document that maketemp now always warns.

	* tests/generate.awk: For ease of doc-writing, simplify selection
	of '-Ipath/to/examples' to '@comment examples'.
	* examples/forloop.m4: Simplify.
	* examples/forloop2.m4: New file.
	* examples/quote.m4: New file.
	* doc/m4.texinfo (Improved forloop): New node.
	(Manual): Clarify use of examples directory.
	(Shift, Forloop): Resync from branch.
	(Include, Location): Update to new usage of examples directory.

	* m4/system_.h (includes): Pick up <unistd.h> before checking for
	_POSIX_VERSION.
	(gettext_noop): Don't define here, let gettext.h do it instead.
	* po/POTFILES.in: Update entries to reflect gnulib imports.

2006-10-16  Eric Blake  <ebb9@byu.net>

	* ltdl/m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
	configmake'.
	* configure.ac (AM_INIT_AUTOMAKE): Bump requirement to 1.10a, for
	pkglibexecdir support.
	* Makefile.am (m4_libm4_la_SOURCES, m4/pathconf.h): No longer
	worry about pathconf.h, now that gnulib does it for us.
	(pkgmodincludedir): Simplify.
	(pkglibexecdir): Delete, now that automake does this.
	* m4/module.c (m4__module_init): Use PKGLIBEXECDIR.
	* src/main.c (usage): Likewise.
	* m4/symtab.c (m4_symbol_value_groks_macro): Fix typo.

	* doc/m4.texinfo: Port some changes from the branch.
	(Invoking m4): Promote to a chapter, instead of a section of
	Preliminaries.
	(Operation modes, Dynamic loading features, Preprocessor features)
	(Limits control Frozen state, Debugging options)
	(Command line files): Subdivide into new sections.
	(Cleardivert): Rename from cleardiv.

2006-10-14  Eric Blake  <ebb9@byu.net>

	* tests/others.at (stdin closed): Update to match previous patch.

	* m4/input.c (file_clean): Don't close stdin twice, POSIX says it
	is not portable.
	Reported by Ralf Wildenhues.

	* modules/m4.c (undivert): Merge from branch.
	* doc/m4.texinfo (Improved fatal_error): Fix typo.
	(Improved exch): New node, copied from branch.
	(Improved cleardivert): Update from branch.
	* THANKS: Update.

2006-10-13  Eric Blake  <ebb9@byu.net>

	* configure.ac (AC_CONFIG_HEADERS): Name the template config.hin,
	not config-h.in.
	* modules/gnu.c (builtin, indir): Transparently handle builtin
	tokens from defn.
	* doc/m4.texinfo (Indir, Builtin): Remerge from branch.
	* m4/input.c (m4_pop_wrapup): Display debug message when switching
	to wrapped text.
	(m4_input_init): No need to use empty file any more.
	(file_print): Display correct file name.
	* m4/utility.c (m4_error, m4_warn): Ensure we don't try to
	dereference a NULL file name.
	* m4/m4module.h (m4_pop_wrapup): New parameter.
	(m4_symbol_value_groks_macro, m4_symbol_groks_macro): New
	prototypes.
	* m4/m4private.h (m4_symbol_value_groks_macro): Faster version.
	* m4/symtab.c (m4_symbol_value_groks_macro): New method.
	* src/main.c (main): Adjust caller.
	* tests/options.at (--debugmode): Test more output from -dV.

2006-10-12  Eric Blake  <ebb9@byu.net>

	* m4/input.c (m4_print_token) [DEBUG_INPUT]: Modernize.

	* m4/m4private.h (m4__next_token_is_open): New prototype.
	* m4/m4module.h (m4_push_single): Delete; push_string is an
	adequate interface, and removing support for this simplifies the
	input engine.
	(m4_push_wrapup): New parameter.
	(m4_is_syntax): Delete; m4_has_syntax is sufficient.
	(M4_SYNTAX_LQUOTE, M4_SYNTAX_BCOMM, M4_SYNTAX_MASKS): Make
	start-quote and start-comment exclusive from other syntax
	categories.
	* m4/syntax.c: Likewise.
	* m4/input.c (input_funcs): Make polymorphic without requiring
	clients to know whether they are located at isp.  All users
	changed.
	(file_names): New variable.
	(m4_input_init): Initialize it.
	(m4_push_file): Use it.
	(m4_input_exit): Free it after use.
	(m4__next_token): Simplify slightly.
	(m4__peek_token): Rename and simplify...
	(m4__next_token_is_open): ... to this.  In particular, this
	allows us to avoid a double ungetc, which POSIX doesn't
	guarantee.
	(struct m4_input_block, m4_push_single, single_peek, single_read):
	Remove support for single characters, as the input engine now
	guarantees we don't need it.
	(file_unget, string_unget, m4_input_print, unget_input):
	Strengthen assertions.
	(file_init_funcs, file_read_init): New for file reading.
	(string_init_funcs, string_read_init): New for wrapped text.
	(m4_push_string_init, m4_push_string_finish, m4_push_wrapup):
	Support wrapped text with locations.
	(m4_skip_line): Support dnl across include file boundary.
	(peek_char): Don't pop input when peeking.
	(file_peek): Peek can be called at the end of the file.
	(string_read): Don't read beyond string bounds.
	* m4/macro.c (expand_token, collect_arguments): Update callers.
	(expand_macro): Report errors at location of open parenthesis.
	(expand_token, expand_argument, process_macro): Avoid negative
	array dereferences with m4_has_syntax.
	* m4/utility.c (skip_space): Likewise.
	* modules/m4.c (m4wrap): Update caller.
	* tests/builtins.at (__file__, __line__, dnl): New tests.
	* tests/options.at (--debugmode): Normalize the output.
	* doc/m4.texinfo (Macro Arguments, Dnl, History, Location):
	Remerge recent changes from branch.
	(Improved fatal_error): New node from branch.

2006-10-11  Eric Blake  <ebb9@byu.net>

	* src/main.c (usage, long_options): Add --debugmode as an alias
	for --debug, to match macro name.
	* tests/options.at (--debugmode): Rename from --debug, and test
	for new alias.
	(--discard-comments): Augment test.
	* doc/m4.texinfo (Invoking m4, Debugmode): Document this.
	* NEWS: Likewise.

2006-10-10  Eric Blake  <ebb9@byu.net>

	Trace improvements: debugmode(c) was always printing the last two
	lines paired, combine them; and show non-text expansions.
	* m4/macro.c (trace_prepre): Update to show what the macro will
	expand to.
	(trace_pre): No need to special-case on debugmode(c).
	(trace_post): Likewise.  Also, show non-text expansions.
	(expand_macro): Update caller.  Collecting arguments can change
	debug mode, so cache values beforehand.
	(trace_format): Remove support for unused %l%S%r, and fix support
	for %z to match gcc's attribute((printf)).
	(trace_header): Update caller.
	* m4/input.c (struct m4_input_block): Rename from input_block.
	(struct input_funcs): Add print_func member.
	(file_print, builtin_unget, builtin_print, string_print)
	(m4_input_print): New functions.
	(m4_push_string_finish): Change return type.
	(m4_push_file): Fix missing use of close parameter.
	* m4/debug.c (m4_debug_decode): Don't clear pending traces.
	* m4/m4module.h (m4_input_print): New prototype.
	* tests/builtins.at (debug, esyscmd, multiquotes, syscmd): Update
	to match behavior change.
	* tests/options.at (--debug): Likewise.
	* tests/macros.at (Propagation of traceon)
	(Propagation of --trace): Likewise.
	* tests/others.at (stderr closed, stdout closed, stdin closed):
	Likewise.
	* doc/m4.texinfo (Forloop): Simplify.
	(Trace): Update to changed behavior.
	(Debugmode): Document this change.
	* src/main.c (usage): Likewise.
	* NEWS: Likewise.

2006-10-09  Eric Blake  <ebb9@byu.net>

	* m4/path.c (m4_include_env_init): Don't alter result of getenv.
	Reported by Ralf Wildenhues.

	* modules/gnu.c (gnu_buf): Rename from buf to silence -Wshadow.

2006-10-07  Eric Blake  <ebb9@byu.net>

	* m4/m4module.h (m4_set_exit_failure): New prototype.
	* m4/utility.c (m4_set_exit_failure): New function.
	* modules/m4.c (m4exit): Use it to avoid yet another global
	variable export in libm4.

2006-10-06  Eric Blake  <ebb9@byu.net>

	* m4/output.c (cleanup_tmpfile): Exit nonzero on failure to clean
	up.
	* tests/others.at (stdout closed): Fix final check.

	Replace uses of tmpfile with clean-temp, since tmpfile is
	incompatible with closeout.
	* tests/builtins.at (esyscmd, syscmd): Don't use pipe; it loses
	exit status of m4.
	* tests/others.at (stderr closed): Likewise.
	* tests/testsuite.at (M4_ONE_MEG_DEFN): Actually hit one meg.
	* ltdl/m4/gnulib-cache.m4: Augment with gnulib-tool --import
	clean-temp.
	* m4/output.c [!HAVE_TMPFILE]: Delete dead code.
	(m4_tmpfile, cleanup_tmpfile): New functions.
	(make_room_for, m4_insert_diversion): Use clean-temp module.
	* configure.ac (AC_CHECK_FUNCS_ONCE): No longer check for
	tmpfile.
	* doc/m4.texinfo (Diversions): Document new use of $TMPDIR.

	* m4/utility.c (m4_numeric_arg): Merge from branch.
	* modules/gnu.c (debuglen): New builtin.
	* src/main.c (usage, ARGLENGTH_OPTION, long_options, main):
	Rename --arglength to --debuglen.
	* tests/options.at (--arglength): Rename to --debuglen.
	(deprecated options): Augment test.
	* doc/m4.texinfo (Invoking m4): Document the name change.
	(Debugmode): Rename from Debug Levels.
	(Debugfile): Rename from Debug Output.
	(Debuglen): New node.
	* NEWS: Document these changes.

	* modules/m4.c (m4exit): Fix typo.  Ensure desired exit status in
	case closing a module exits.

	* modules/m4.c (m4exit): Merge from branch.
	* m4/m4.c (m4_delete): Avoid assertion triggered by last patch.

2006-10-05  Eric Blake  <ebb9@byu.net>

	* ltdl/m4/gnulib-cache.m4: Augment with gnulib-tool --import
	closeout.
	* Makefile.am (m4_libm4_la_DEPENDENCIES): Add missing dependency.
	* src/main.c (main): Close stdout on exit.
	* m4/debug.c (set_debug_file): Check for write failure.
	* m4/m4.c (m4_delete): Don't mask write failure.
	* tests/testsuite.at (AT_CHECK_M4): Allow tracing by expanding
	macros before calling AT_CHECK.
	(M4_ONE_MEG_DEFN): New helper macro.
	* tests/others.at (stdout full): New test.
	(stderr closed, stdin closed, stdout closed): Augment.
	* tests/builtins.at (syscmd): New test.
	(esyscmd): Augment.

2006-10-04  Eric Blake  <ebb9@byu.net>

	* tests/builtins.at: Alphabetize tests.
	* tests/testsuite.at (AT_CHECK_M4): Allow choosing stdin.
	* tests/generate.awk (new_test): Fix underquoting.
	* tests/others.at (maketemp): Rename from misc.
	(stdin closed, stdout closed, stderr closed): New tests.

2006-10-03  Eric Blake  <ebb9@byu.net>

	Avoid all global variables in modules, so that --disable-static
	can work on cygwin.
	* examples/incl.m4: New file, from branch.
	* Makefile.am (dist_pkgdata_DATA): Distribute it.
	* doc/m4.texinfo (Location): Merge this section from branch.
	(Include): Update the test.
	* tests/generate.awk (new_test): Allow for VPATH build
	pre-processing of expected __program__ output.
	* m4/m4module.h (m4_current_diversion, m4_output_current_line):
	Avoid global variables.
	(m4_context_field_table): Add current_diversion, output_line.
	(m4_output_init, m4_make_diversion): Add parameter.
	(m4_get_program_name, m4_set_program_name): New accessors.
	* m4/m4private.h (m4_get_current_diversion),
	(m4_set_current_diversion, m4_get_output_line)
	(m4_set_output_line): New accessors.
	* m4/utility.c (m4_get_program_name, m4_set_program_name): New
	methods.
	* modules/m4.c (divnum, divert): Adjust callers.
	* modules/gnu.c (__program__): Likewise.
	* m4/output.c (m4_output_init, m4_make_diversion)
	(m4_freeze_diversions, m4_shipout_text, m4_make_diversion)
	(m4_insert_diversion): Likewise.
	* m4/input.c (file_clean, m4_push_file): Likewise.
	* src/freeze.c (reload_frozen_state): Likewise.
	* src/main.c (main, usage): Likewise.

	Partially plug memory leak when unloading gnu module.
	* tests/modules.at (unload gnu module): New test.
	* modules/gnu.c (gnu_LTX_m4_finish_module): New function.
	(m4_regexp_compile): Move static storage to module visibility.
	* tests/options.at (--debug): Adjust to new output.

2006-09-29  Eric Blake  <ebb9@byu.net>

	Even when not the first option, --help can't have side effects.
	* tests/options.at (--debugfile): Detect bugs in this area.
	* tests/testsuite.at (AT_CHECK_M4): Avoid a process when ignoring
	stderr.
	* src/main.c (main): Fix it by deferring debugfile change.  Also,
	defer closing streams until after module tracing is done.
	* modules/gnu.c (debugfile): Make message consistent with command
	line.
	* doc/m4.texinfo (Invoking m4): Touch up the documentation.
	* NEWS: Document this fix.

	* modules/m4.c (dnl): Include macro name in warning message.
	* m4/input.c (m4_skip_line): Add parameter.
	* m4/m4module.h (m4_skip_line): Likewise.
	* src/main.c (usage): Update wording.
	* doc/m4.texinfo (Inhibiting Invocation): Add xfailed test until
	issue of blind macros vs. POSIX is resolved.
	(Dnl): Merge another node from branch.

	* ltdl/m4/gnulib-cache.m4: Augment with gnulib-tool --import
	xstrtol.
	* m4/system_.h (N_): Define.
	* src/main.c (main): Validate numeric arguments.
	(size_opt): New function, idea borrowed from coreutils.
	* m4/macro.c (expand_macro): -L0 implies no limit.
	* doc/m4.texinfo (Invoking m4): Document this change.
	* NEWS: Likewise.
	* tests/options.at: (--arglength, --nesting-limit)
	(--regexp-syntax): New tests of argument validation.

2006-09-28  Eric Blake  <ebb9@byu.net>

	* tests/options.at: Alphabetize the tests.

2006-09-27  Eric Blake  <ebb9@byu.net>

	* m4/m4module.h (m4_symbol_value_print, m4_symbol_print): Add
	another parameter to print module info.
	* m4/macro.c (trace_pre): Adjust caller.
	* modules/m4.c (M4BUILTIN_HANDLER): Likewise.
	* doc/m4.texinfo (Dumpdef, Debug Levels): Document this.
	* NEWS: Document this.

	* ltdl/m4/gnulib-cache.m4: Augment with gnulib-tool --import
	strnlen.
	* m4/symtab.c (symbol_value_print): Rename to...
	(m4_symbol_value_print): ...this, and...
	(m4_symbol_print): Update to allow -L length truncation.  Now
	truncation also affects dumpdef output and builtin names.
	* m4/m4private.h (nesting_limit, max_debug_argument_length):
	Switch to size_t.
	* m4/m4module.h (m4_symbol_print): Add parameter.
	(m4_symbol_value_print): New function.
	* modules/m4.c (dumpdef): Allow length truncation.
	* m4/macro.c (trace_pre): Use m4_symbol_print, rather than
	repeating code.
	* doc/m4.texinfo (Invoking m4): Document -l better.
	(Dumpdef, Debug Levels): Document the effect of -l.
	* NEWS: Document this change.

	* modules/m4.c (m4_dump_symbols, errprint, m4wrap)
	(m4_expand_ranges): Ensure we aren't picking up partial object on
	obstack.
	* modules/stdlib.c (setenv): Allow extra arguments.
	* modules/time.c (ctime): Avoid side effect in call to
	obstack_grow.
	* modules/gnu.c (m4_regexp_substitute): Likewise.
	(renamesyms): Avoid extra obstack_init.
	* src/freeze.c (reload_frozen_state): Remove debug comment.
	(produce_frozen_state): Simplify fprintf to puts where possible.
	* modules/modtest.c (modtest_init, modtest_finish): Likewise.
	* modules/import.c (import, symbol_fail, modules_fail): Likewise.
	* m4/macro.c (trace_flush): Likewise.
	* m4/debug.c (m4_debug_message_prefix): Likewise.
	* m4/path.c (include_dump): Likewise.
	* m4/module.c (module_remove): Likewise.
	(install_builtin_table): Simplify malloc and string
	concatenation.

2006-09-26  Eric Blake  <ebb9@byu.net>

	* m4/m4module.h (m4_symbol_print): New prototype.
	(M4_DEBUG_TRACE_STACK): New enumerator.
	(m4_is_debug_bit): Allow use without requiring m4private.h.
	* m4/symtab.c (symbol_value_print, m4_symbol_print): New
	functions.
	* modules/m4.c (dump_symbol_CB, m4_dump_symbols): Speed up
	callback.
	(dumpdef): Allow printing pushdef'd stacks.
	* m4/debug.c (m4_debug_decode): Add new 's' debug mode.
	* src/main.c (usage): Document it.
	* doc/m4.texinfo (Dumpdef, Debug Levels): Likewise.
	* NEWS: Likewise.

	* configure.ac (AC_CONFIG_HEADERS): Place <config.h> with other
	gnulib headers.
	* Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce length
	of lines during make.
	(AM_CPPFLAGS): Remove unneeded include path.
	(src_m4_CPPFLAGS): Remove redundant include path.
	* m4/system_.h Make preprocessor indentation consistent.
	(M4_DIRSEP_CHAR, M4_PATHSEP_CHAR, M4_GNUC_FORMAT): Remove unused
	macros.
	(UNIX, W32_NATIVE, OS2): Update platform recognition macros from
	branch.
	(M4_GNUC_PRINTF, M4_GNUC_SCANF, M4_GNUC_NORETURN)
	(M4_GNUC_CONST, M4_GNUC_UNUSED): Mangle names properly for header.
	(bool, true, false): Don't undefine here; stdbool takes care of
	that.
	* src/m4.h (includes): Assume config.h, and several standard
	headers.
	(__CYGWIN__, WIN32): Don't define here; let system.h do it.
	* m4/m4private.h: Assume config.h.
	* m4/output.c: Likewise.
	* m4/path.c: Likewise.
	* m4/resyntax.c: Likewise.
	* m4/utility.c: Likewise.
	* modules/gnu.c: Likewise.
	* modules/import.c: Likewise.
	* modules/load.c: Likewise.
	* modules/m4.c: Likewise.
	* modules/modtest.c: Likewise.
	* modules/mpeval.c: Likewise.
	* modules/perl.c: Likewise.
	* modules/shadow.c: Likewise.
	* modules/stdlib.c: Likewise.
	* modules/time.c: Likewise.
	* modules/traditional.c: Likewise.

2006-09-21  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Invoking m4): Add clarification on option
	processing behavior.
	* tests/options.at (option grouping): Test this.
	* THANKS: Update.
	Reported by Mikhail Teterin.

	* bootstrap: Add --force option, based on idea from coreutils.
	* README: Document that ./bootstrap and autoreconf are for
	developers, and not lightly done in tarballs.

2006-09-20  Eric Blake  <ebb9@byu.net>

	* src/main.c (usage, OPTSTRING, main): Rename -e to -i.  Make
	warnings consistent.
	(long_options, HASHSIZE_OPTION): Warn on -H.
	* doc/m4.texinfo (Invoking m4): Document this.
	* tests/options.at (deprecated options): Update.

	Change the default of interactive sessions to match sh.
	* src/main.c (usage): Document this.
	(enum interactive_choice): New enum.
	(main): Use it to defer decision of interactive until after
	argument processing.
	* doc/m4.texinfo (Invoking m4): Document this.
	* NEWS: Likewise, plus add missing mention of -b.
	Reported by Stepan Kasal.

2006-09-19  Eric Blake  <ebb9@byu.net>

	* src/main.c (usage, main, DEBUGFILE_OPTION): Deprecate -o as
	well as --error-output; the goal is to add -o/--output in some
	future version with semantics like gcc or autom4te.
	* doc/m4.texinfo (Invoking m4, Dumpdef, Debug Output, Errprint):
	(Extensions): Reflect this update.
	(Renamesyms): Add another test.
	(Defn): Xfail for now, so that `make check' is happy.
	* NEWS: Document this change.
	* tests/generate.awk: Mark dynamic loading tests as such.  Allow
	xfailing tests.
	* tests/macros.at (Renamesyms collisions): New test, exposing
	renamesyms' coredump.
	* tests/options.at (--debugfile, --safer): Update to match
	change.

	* m4/debug.c (set_debug_file): Fix regression in -o when stdout
	and stderr are same file, introduced 2003-07-23.
	* tests/options.at (--debugfile): New test, to catch the bug.
	(deprecated options): Test --error-output.
	* src/main.c (usage, main, long_options, ERROR_OUTPUT_OPTION):
	Deprecate --error-output, and replace it with --debugfile.
	* doc/m4.texinfo (Invoking m4, Debug Output, Dumpdef, Errprint):
	Document this change.
	* NEWS: Likewise.

2006-09-18  Eric Blake  <ebb9@byu.net>

	* modules/load.c (modules): Rename to...
	(m4modules): ...this, since it is an English word with 0
	arguments.
	* modules/gnu.c (symbols, m4symbols): Likewise.
	* doc/m4.texinfo (Listing Modules): Rename to...
	(M4modules): ...this.
	(Symbols): Rename to...
	(M4symbols): ...this.
	(Load, Foreach, Trace, Answers): Update to new spellings.
	* NEWS: Document this.

	* modules/m4.c (traceon, traceoff): Change to Solaris semantics,
	such that without arguments, the global trace flag is changed
	rather than walking the table of all currently-defined macros.
	(set_trace_CB): No longer needed.
	* m4/m4module.h (m4_set_symbol_name_traced): Add a parameter.
	(m4_set_symbol_traced): Delete.
	(m4_symtab_create): Nuke the nuke parameter.
	* m4/m4private.h (m4_get_symbol_value): Delete.
	* m4/symtab.c (m4_symbol_popdef): No more need for nuke_trace.
	(m4_set_symbol_name_traced): Free undefined entries that are no
	longer traced.
	(symbol_destroy_CB): Update caller.
	* m4/m4.c (m4_create): Update caller.
	* src/main.c (main): Likewise.
	(usage): Fix typo in last commit.
	* doc/m4.texinfo: Minor cleanups throughout.
	(Debugging, Dumpdef, Trace, Debug Levels, Debug Output): Merge
	more nodes from branch.
	(Trace): Document new semantics, and how to simulate the old.
	* tests/builtins.at (multiquotes): Adjust to new semantics.
	* NEWS: Update somewhat.

2006-09-14  Eric Blake  <ebb9@byu.net>

	Add --safer option, per debian bug 5898.
	* src/main.c (usage): Document new option.
	(SAFER_OPTION): New enumerator.
	(main): Set the option bit.
	* m4/m4module.h (m4_context_opt_bit_table): Declare new bit
	accessors.
	* m4/m4private.h (M4_OPT_SAFER_BIT): New macro.
	(m4_get_safer_opt): New accessor.
	* modules/gnu.c (esyscmd, debugfile): Disable when --safer.
	* modules/m4.c (syscmd, maketemp): Likewise.
	* doc/m4.texinfo (Invoking m4, Debug Output, Syscmd, Esyscmd)
	(Sysval, Maketemp): Add tests of this.
	* tests/options.at (--safer): Likewise.

2006-09-13  Eric Blake  <ebb9@byu.net>

	* tests/modules.at (AT_CHECK_M4_MODTEST): Use AT_CHECK_M4, for
	stderr filtering.
	Reported by Ralf Wildenhues.

	Fix installcheck.
	* Makefile.am (check_LTLIBRARIES): Build test libraries in the
	tests directory, so we can be sure an installed build is not
	picking up uninstalled non-test libraries.
	(check-local, installcheck-local): Depend on test libraries.
	* tests/modules.at (AT_CHECK_M4_MODTEST): Don't use options
	after file name.  Fix quoting.  Remove skipping the test, now
	that makefile guarantees test modules will exist.
	(Freezing modules, modules: shadow, modules: unload)
	(modules: trace): Always put test modules in module path.
	(modules: importing): Likewise, and rely on AT_CHECK_M4 for
	stderr munging.
	* src/main.c (usage): Document default module search path.
	(import_environment, frozen_file_to_read, frozen_file_to_write):
	Move...
	(main): ...here.
	* tests/testsuite.at (AT_CHECK_M4): Filter stderr here...
	* tests/m4.in: ...not here.
	Reported by Ralf Wildenhues.

2006-09-08  Eric Blake  <ebb9@byu.net>

	* bootstrap: Kill unrelated copy-n-paste code from argument
	parsing.  Let Makefile generate testsuite.
	* Makefile.am (EXTRA_DIST): Remove examples/WWW/man/Makefile.

2006-09-07  Eric Blake  <ebb9@byu.net>

	* m4/m4module.h (m4_peek_input): No longer export.
	(m4_error_at_line, m4_warn_at_line): New prototypes.
	(m4_is_symbol_void): New macro.
	(m4_push_file): Update prototype.
	* m4/m4private.h (m4__peek_token): New prototype.
	(M4_TOKEN_OPEN, M4_TOKEN_COMMA, M4_TOKEN_CLOSE): New enumerators.
	* m4/utility.c (m4_error_at_line, m4_warn_at_line): New functions.
	* src/main.c (main): Allow reading from stdin twice.
	* modules/m4.c (include): Adjust to new prototype.
	* m4/input.c: General comment cleanup.
	(file_peek, file_read, file_unget, push_file): Set end flag on
	EOF, so that we don't call getc twice.
	(push_file, file_clean): Port fix from branch to avoid closing
	stdin prematurely.
	(pop_input): Port fix from branch to avoid reading free'd memory
	when input ends mid-string.
	(m4_pop_wrapup): Port fix from branch to allow multiple m4wraps.
	(string_peek, string_read): Always use unsigned char.
	(m4_skip_line): Warn when dnl cut short by EOF.
	(peek_input): Rename from m4_peek_input.
	(match_input): Update signature, to distinguish between `(' token
	and multi-char quote or comment beginning with `('.
	(m4_input_exit): Cleanup now done in m4_pop_wrapup.
	(m4__peek_token): New function, ported from branch.
	(m4__next_token): Update to new token types.
	* m4/macro.c (expand_token, expand_argument): Use peek_token.
	* doc/m4.texinfo (Pseudo Arguments, Defn, Answers): Fix typos.
	(Invoking m4): Remerge from branch.

	* Makefile.am ($(TESTSUITE)): Revert patch from 2006-09-05...
	(check-local): and put dependency here.
	Reported by Ralf Wildenhues.

2006-09-05  Eric Blake  <ebb9@byu.net>

	* m4/m4module.h (m4_debug_message): New prototype.
	(M4_DEBUG_TRACE_MODULE): New debug bit.
	* m4/m4private.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
	(M4_DEBUG_MESSAGE2): Delete these macros.
	* m4/debug.c (m4_debug_message): New method.
	(m4_debug_decode): Add module tracing as flag `m'.
	* m4/input.c (m4_push_file, file_clean): Use new method.
	* m4/path.c (m4_path_search): Likewise.
	* po/Makevars (XGETTEXT_OPTIONS): Likewise.
	* m4/module.c (install_builtin_table, install_macro_table)
	(m4__module_open, module_close, module_remove): Promote several
	module debug messages outside of DEBUG_MODULES.
	(m4__module_init, module_remove) [DEBUG_MODULES]: Don't mix
	DEBUG_MODULES with normal trace output.
	* src/main.c (usage): Document new flag.
	* doc/m4.texinfo (Debug Levels): Likewise.
	* Makefile.am ($(TESTSUITE)): Add missing dependency.
	* tests/m4.in: Neutralize platform-dependent module filenames.
	* tests/options.at (--debug): Update expected output.

2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* doc/m4.texinfo: Fix some typos.
	* tests/others.at: Likewise.

2006-09-05  Eric Blake  <ebb9@byu.net>

	* m4/input.c (lex_debug): Remove dead code that broke compilation
	with --enable-debug.
	* m4/module.c (install_builtin_table, install_macro_table)
	(m4__module_init, m4__module_open, module_close)
	(module_remove): Fix compilation when --enable-debug.
	* m4/output.c (m4_shipout_text): Likewise.
	* ltdl/m4/debug.m4 (M4_CHECK_DEBUGGING): Preload all static
	libraries when --enable-debug.
	* configure.ac (DYNAMIC_MODULES): New variable, to pass
	information to testsuite.
	(modules to preload): Determine modules after we know whether
	shared libraries are supported.
	* tests/atlocal.in (DYNAMIC_MODULES): Substitute this into
	testsuite.
	* tests/testsuite.at (AT_CHECK_DYNAMIC_MODULE): New macro.
	* tests/modules.at (Freezing modules, AT_CHECK_M4_MODTEST)
	(modules: shadow, modules: unload, modules: importing)
	(modules: trace): Use new macro.
	* tests/builtins.at (gmp): Likewise.

	* m4/macro.c (expansion_level, macro_call_id): Change to size_t.
	All users updated.
	(expand_token): Avoid assertion just added to docs.
	(expand_macro): Track pending expansions, for when a symbol's
	definition changes during argument collection.
	(m4_macro_call, process_macro): Operate on symbol value, not
	symbol, since symbol may have changed during argument collection.
	* m4/m4private.h (m4_symbol_value): Add pending_expansions member.
	(VALUE_PENDING, SYMBOL_PENDING, VALUE_DELETED_BIT): New defines.
	(m4_get_symbol_value): Add fast macro version.
	* m4/m4module.h (M4_BUILTIN_FLAGS_MASK): New enumerator.
	(m4_macro_call): Adjust prototype.
	* m4/module.c (install_builtin_table): Check that flags are valid
	when creating builtin.
	* m4/symtab.c (m4__symtab_remove_module_references): Use
	m4_symbol_value_delete, rather than inlining it.
	(m4_symbol_value_copy): Copy placeholder text.
	(symbol_popval): Use m4_symbol_value_delete.
	(m4_symbol_value_delete): Implementation was missing when NDEBUG.
	Handle pending expansions.
	* modules/gnu.c (indir): Update to new prototype.
	* doc/m4.texinfo: Fix menus to be consistent with section names.
	(Defn): Add test that macro tokens flatten to empty string;
	triggered an assert before this patch.
	(Ifelse): Merge another node.
	(Loops): Split into...
	(Forloop, Foreach): New nodes; work is still underway on them.
	(Answers): Add more info on foreach macro; work is still underway.
	(Indir): Add test that indir collects arguments before looking up
	macro.
	* TODO: Update based on this patch.

2006-09-01  Eric Blake  <ebb9@byu.net>

	* m4/m4.c (m4_create): Fix latent bug since 2003-10-08.
	* m4/hash.h (m4_free_hash_iterator): New prototype.
	* m4/hash.c (struct m4_hash) [!NDEBUG]: Add iter member, to
	ensure we don't do unsafe things while iterating.
	(HASH_ITER, ITER_CHAIN): New accessor macros.
	(m4_hash_new, m4_hash_resize, maybe_grow): Fix malloc typing bug.
	(m4_hash_delete, m4_hash_insert): Unsafe while iterating.
	(m4_hash_remove) [!NDEBUG]: Enforce safety while iterating.
	(m4_get_hash_iterator_next) [!NDEBUG]: Track current iterators,
	to catch unsafe actions.
	(m4_free_hash_iterator): New function, to avoid memory leaks, and
	when debugging, to track safe actions.
	(m4_hash_apply): Avoid memory leak.
	* m4/symtab.c (m4_symtab_apply): Likewise.
	* ltdl/m4/gnulib-cache.m4: Remove getopt from here; it is pulled
	in manually to src/ for now.
	* tests/builtins.at (gmp): Add keyword module.
	* tests/modules.at (Freezing modules, modules: shadow)
	(modules: unload, modules: importing, modules: trace): Likewise.

2006-08-30  Eric Blake  <ebb9@byu.net>

	* m4/utility.c (m4_warn): Factor "Warning" out of messages into
	here.
	(m4_bad_argc, m4_numeric_arg): Update all callers.
	* m4/macro.c (m4_macro_call): Likewise.
	* doc/m4.texinfo (Defn, Pushdef): Fix typos in last commit.
	(Indir, Builtin, Ifdef): More doc merges.
	(Loops): Mention that documenting foreach would be nice.
	(Macro Arguments, Defn, Builtin, Ifdef, Ifelse, Changesyntax)
	(Include, Eval, Location, M4exit): s/input.m4/stdin/.
	* modules/gnu.c (indir, builtin): Warn, not error, on undefined.
	(substitute, syncoutput): Update all m4_warn callers.
	* modules/m4.c (undefine, popdef, m4_dump_symbols, defn)
	(traceon, traceoff): Make warning message consistent.
	(define, pushdef): Update all m4_warn callers.
	* tests/generate.awk: Choose file name so that documentation can
	show command-line behavior.
	* tests/builtins.at (define): Update to new wording.
	* tests/macros.at (pushdef/popdef): Likewise.
	* tests/freeze.at (loading format 1): Likewise.
	* tests/modules.at (AT_CHECK_M4_MODTEST): Likewise.

	* doc/m4.texinfo (Undefine, Defn, Pushdef): More doc merges from
	the branch.
	(Defn): Add failing test case for mixing text and builtin.
	(Renamesyms): Improve wording, and identify core dump that needs
	fixing.

2006-08-29  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Quoting Arguments, Definitions, Define)
	(Arguments, Pseudo Arguments): More doc merges from the branch.
	(Macro expansion): Turn example into test.
	(Pseudo Arguments): Add example of avoiding argument.
	* modules/m4.c (undefine, popdef): Accept multiple arguments.
	(define, pushdef): Warn on non-text macro name.
	(ifelse, m4_dump_symbols, defn, traceon, traceoff): Tweak
	warning/error messages.
	(ifdef): Ignore extra arguments.
	* m4/symtab.c (m4_symbol_value_copy): Avoid memory leak.
	(m4__symtab_remove_module_references): Check that there is no leak.
	* tests/macros.at (pushdef/popdef): Update to new message.
	* tests/builtins.at (define): Likewise.
	* tests/freeze.at (loading format 1): Likewise.
	* tests/modules.at (AT_CHECK_M4_MODTEST): Likewise.

	* m4/m4private.h (m4_get_syntax_lquote, m4_get_syntax_rquote)
	(m4_get_syntax_bcomm, m4_get_syntax_ecomm) [NDEBUG]: Use same type
	as accessor function, to avoid compiler warning.
	* m4/module.c (m4__module_open): Move declaration of variable to
	avoid compiler warning.
	* src/main.c (main): Avoid shadowing a global variable.
	* src/freeze.c (produce_symbol_dump): Avoid unused variable
	warning when NDEBUG.
	* tests/options.at (--discard-comments, --import-environment)
	(--debug, --prepend-include, --help and --version): Rename tests
	to name option tested.

2006-08-28  Eric Blake  <ebb9@byu.net>

	* m4/utility.c (m4_bad_argc): Move assertion out of hot path...
	* m4/module.c (install_builtin_table): ...to here, and add
	assertion that blind macros require arguments.
	* m4/m4module.h (struct m4_builtin): Document restrictions that
	must be met during module loading.
	* modules/gnu.c (changeresyntax, changesyntax): These are blind,
	so require an argument to avoid	triggering assertion.
	(debugfile): Tweak error message.

2006-08-25  Eric Blake  <ebb9@byu.net>

	* m4/m4module.h (M4_BUILTIN_GROKS_MACRO, M4_BUILTIN_BLIND)
	(M4_BUILTIN_SIDE_EFFECT): New enumerators.
	(struct m4_builtin): New member flags replaces groks_macro_args,
	blind_if_no_args.  min_args and max_args are now 0-based.
	Rearrange members to reduce size on platforms where function
	pointers are 64 bits but regular pointers are 32.
	(m4_bad_argc): Add argument.
	* m4/m4private.h (VALUE_SIDE_EFFECT_ARGS_BIT): New define.
	* m4/utility.c (m4_bad_argc): Simplify calculation, and take side
	effect into account.
	* m4/module.c (install_builtin_table): Adjust all users affected
	by this API change.
	* m4/macro.c (m4_macro_call): Likewise.
	* src/freeze.c (reload_frozen_state): Likewise.
	* modules/m4.c (builtin_functions, ifelse, syscmd): Likewise.
	* modules/gnu.c (builtin_functions, builtin, esyscmd): Likewise.
	* modules/import.c (builtin_functions): Likewise.
	* modules/load.c (builtin_functions): Likewise.
	* modules/modtest.c (builtin_functions): Likewise.
	* modules/mpeval.c (builtin_functions): Likewise.
	* modules/perl.c (builtin_functions): Likewise.
	* modules/shadow.c (builtin_functions): Likewise.
	* modules/stdlib.c (builtin_functions): Likewise.
	* modules/time.c (builtin_functions, mktime_functions)
	(strftime_functions): Likewise.
	* doc/m4.texinfo (Loops): Update test now that shift is blind.
	(Macro Arguments): Fix typo in test.
	(Patsubst): Fix typo in test.
	* modules/gnu.c (m4_regexp_substitute): Don't skip empty match at
	end of string.  Fix return value when ignore_duplicates.
	* tests/builtins.at (patsubst): Fix typo in test.

	* tests/options.at (debug-flags): Update to reflect new message.
	(deprecated options, prepend-include, help and version): New
	tests.
	* tests/testsuite.at (AT_CHECK_M4): Avoid hanging testsuite if
	test omits an input file name.
	* src/main.c (long_options, main): Add -B/--prepend-include.
	(usage): Document it.
	(main): `m4 --help --version' now displays help, not version.
	* ltdl/m4/gnulib-cache.m4: Augment with gnulib-tool --import
	dirname filenamecat.
	* m4/m4module.h (m4_add_include_directory): Add parameter.
	* m4/m4private.h (m4__include_init): New prototype.
	* m4/m4.c (m4_create): Put `.' on path before options are
	collected.
	* m4/path.c (includes): Assume C89.  Use gnulib for file name
	management.
	(m4__include_init): New function.
	(search_path_add): Allow prepending.
	(m4_add_include_directory, search_path_env_init): Adjust callers.
	(m4_path_search): Relative names now invoke path search, since
	`.' might not be first.
	* doc/m4.texinfo (Invoking m4, Search Path): Document new option.

2006-08-25  Bruno Haible  <bruno@clisp.org>  (tiny change)
	and Eric Blake  <ebb9@byu.net>

	* bootstrap: Run autopoint before gnulib-tool, since autopoint
	0.15 installs macros obsoleted by current gnulib.

2006-08-25  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Macro Arguments): Another section merged;
	testsuite failures now exposed.

2006-08-23  Eric Blake  <ebb9@byu.net>

	* doc/m4.texinfo (Quoted strings, Other tokens, Comments)
	(Input processing): More doc merges from the branch.
	(Regular expression syntax): Add introductory text.
	(Inhibiting Invocation): More doc merges from the branch.
	(Other tokens): Reorder after comments.
	* tests/generate.awk: Allow passing options to doc examples.

2006-08-22  Eric Blake  <ebb9@byu.net>

	* tests/options.at (debug-flags): New test.
	* m4/m4module.h (M4_DEBUG_TRACE_VERBOSE): Make sure this value is
	not negative, to distinguish failure in m4_debug_decode.
	(m4_debug_decode): Add new parameter.
	* modules/gnu.c (regexp): Slight cleanup.
	(renamesyms): Ignore excess arguments.
	(syncoutput): Make case-insensitive, warn on bad argument.
	(debugmode): Factor -+ handling out to...
	* m4/debug.c (m4_debug_decode): ...here.
	(m4_debug_message_prefix): Fix spacing.
	* src/main.c (main): Let -d option adjust flags.
	* m4/input.c (file_clean): Avoid printing empty file name.
	* doc/m4.texinfo (Syncoutput): Document new range of input.
	(Invoking m4): Document use of multiple -d flags.

	Start porting various fixes from the branch that use gnulib.
	* ltdl/m4/gnulib-cache.m4: Augment with gnulib-tool --import
	binary-io cloexec close-stream fopen-safer getopt gnupload mkstemp
	regexprops-generic stdlib-safer unlocked-io.
	* m4/debug.c (m4_debug_set_output): Close debug file on exec.
	* m4/path.c (m4_path_search): Close input file on exec, reject
	empty file name, fix parameter naming.
	* m4/output.c (make_room_for): Close diversion file on exec.
	(includes): Assume C89 headers.
	(tmpfile): For now, we don't want tmpfile-safer, because we want
	clean-temp later.
	* m4/m4private.h (includes): Use various gnulib headers.
	* doc/regexprops-generic.texi: Use gnulib's copy.

	* configure.ac (AM_INIT_AUTOMAKE): Bump automake requirement.
	* AUTHORS: Add copyright.
	* ChangeLog: Likewise.
	* README: Likewise.  Require automake 1.9b or later.
	* HACKING: New file.
	* README-alpha: Add copyright.
	* THANKS: Likewise.  Update.
	* doc/STYLE: Add copyright, and tweak for changed directories.
	* modules/README: Add copyright, and tweak for libtool version.
	* examples/COPYING: New file.
	* examples/WWW/COPYING: Likewise.
	* examples/WWW/m4lib/COPYING: Likewise.
	* modules/shadow.m4: Add copyright.
	* modules/perl.m4: Likewise.
	* modules/modtest.m4: Likewise.
	* modules/stdlib.m4: Likewise.
	* modules/time.m4: Likewise.
	* modules/time2.m4: Likewise.
	* po/Makevars: Likewise.
	* tests/iso8859.m4: Likewise.
	* tests/m4.in: Likewise.
	* NEWS: Add (C) to copyright.
	* TODO: Likewise.
	* m4/system_.h: Likewise.
	* tests/atlocal.in: Likewise.
	* tests/builtins.at: Likewise.
	* tests/freeze.at: Likewise.
	* tests/generate.awk: Likewise.
	* tests/macros.at: Likewise.
	* tests/modules.at: Likewise.
	* tests/options.at: Likewise.
	* tests/others.at: Likewise.
	* tests/testsuite.at: Likewise.
	* m4/utility.c: Spell out copyright years.
	* src/main.c: Likewise.

	* doc/m4.texinfo (Bugs, Manual, Syntax): Sync from branch.

2006-08-21  Eric Blake  <ebb9@byu.net>

	* configure.ac (AC_CHECK_HEADERS_ONCE): Check for <sys/wait.h>.
	* modules/gnu.c (esyscmd): Use -1 for failure.  Set sysval to 0
	when no arguments are given, but without losing warning about 0
	arguments.
	* modules/m4.c (syscmd): Likewise.
	(includes): Assume C89.
	(m4_sysval): Make static.
	(M4_SYSVAL_EXITBITS, M4_SYSVAL_TERMSIGBITS): New macros.
	(sysval): Port calculation from branch.

2006-08-20  Eric Blake  <ebb9@byu.net>

	* m4/macro.c (expand_macro): Move argument check...
	(m4_macro_call): ...to here, so indir will warn.
	* modules/gnu.c (__program__): New macro, ported from branch.
	(builtin): Perform argument check.
	(changesyntax): Avoid out-of-bounds read.

	* modules/gnu.c (includes): Assume stdlib.h, errno.
	(m4_regexp_compile): Add no_sub parameter, avoid memory leaks.
	(substitute): Add caller parameter, avoid out-of-bounds memory
	references.
	(m4_regexp_substitute, patsubst, regexp, renamesyms): Adjust
	callers.

2006-08-16  Eric Blake  <ebb9@byu.net>

	* po/POTFILES.in: Add more files that contain translatable
	strings.
	* po/Makevars (XGETTEXT_OPTIONS): Add options to pass more
	information to translators.
	(USE_MSGCTXT): New var for gettext 0.15.
	* m4/input.c (file_clean, m4_push_file, m4__next_token): Start
	debug/trace messages in lower case.
	* m4/macro.c (expand_argument): Likewise.
	* m4/path.c (m4_path_search): Likewise.
	* src/main.c (main): Likewise.

2006-08-14  Eric Blake  <ebb9@byu.net>

	* src/main.c (usage): Document --import-environment.
	* doc/m4.texinfo (History, Invoking m4): Synchronize from branch.

2006-08-11  Eric Blake  <ebb9@byu.net>

	* bootstrap (func_get_translations): Only remove files when doing
	full update.
	(func_update_po): Avoid CDPATH problems.

2006-08-10  Eric Blake  <ebb9@byu.net>

	* bootstrap (func_get_translations): New function.
	(func_update_po): Borrow ideas from tar to correctly pull in
	translations from newer location.

2006-08-09  Eric Blake  <ebb9@byu.net>

	* bootstrap: Recent gnulib no longer has jm_* macros to worry
	about.
	* ltdl/m4/gnulib-cache.m4: Augment with gnulib-tool --import
	verror.
	* m4/m4module.h (M4ERROR, M4WARN): Delete, replaced by...
	(m4_error, m4_warn): ... these new prototypes.
	(m4_current_file, m4_current_line): Move into context, rather
	than leaving as globals.
	(m4_insert_file, m4_insert_diversion, m4_freeze_diversions)
	(m4_undivert_all, m4_input_init): Now takes context.
	* m4/utility.c (m4_error, m4_warn): New functions.
	* m4/m4private.h: Assume errno exists.
	(struct m4): Move warning_status to a bit flag,
	and add exit_status.  Adjust accessors accordingly.
	* src/main.c (print_program_name_CB): No longer needed.
	(main): Use new m4_get_fatal_warnings_opt.
	* m4/debug.c: Adjust all callers of M4WARN and M4ERROR, and abort
	instead of issuing "INTERNAL ERROR".  Pass context when needed,
	and use new accessors.
	* m4/input.c: Likewise.
	* m4/macro.c: Likewise.
	* m4/output.c: Likewise.
	* m4/utility.c: Likewise.
	* modules/evalparse.c: Likewise.
	* modules/gnu.c: Likewise.
	* modules/load.c: Likewise.
	* modules/m4.c: Likewise.
	* modules/mpeval.c: Likewise.
	* src/freeze.c: Likewise.
	* src/main.c: Likewise.
	* tests/macros.at: Adjust to new message format.
	* tests/builtins.at: Likewise.
	* tests/freeze.at: Likewise.
	* tests/modules.at: Likewise.
	* doc/m4.texinfo: Likewise.

	* configure.ac (AM_GNU_GETTEXT, AM_GNU_GETTEXT_VERSION): Require
	newer gettext 0.15.

2006-08-03  Eric Blake  <ebb9@byu.net>

	* src/stackovf.c (setup_stackovf_trap): Port patch from branch to
	gracefully handle ENOSYS.
	* TODO: Update.
	* THANKS: Update.

2006-07-28  Eric Blake  <ebb9@byu.net>

	* src/freeze.c (reload_frozen_state): Copy string when creating
	placeholder, to avoid memory corruption.
	* m4/symtab.c (symbol_popval): Avoid memory leak.
	(m4_symbol_rename): Avoid shadowing rename function.
	(dump_symbol_CB, symtab_dump) [DEBUG_SYM]: Fix compilation.
	* tests/freeze.at (reloading unknown builtin): Add test.
	* tests/generate.awk: Capture m4.texinfo line number in
	testsuite.log, not just generated.at.

	Port idea from branch that a frozen file can request an unknown
	builtin without producing a warning unless the builtin is
	actually used.
	* m4/m4private.h (m4__symbol_type): Add M4_SYMBOL_PLACEHOLDER.
	(m4_is_symbol_value_placeholder, m4_get_symbol_value_placeholder)
	(m4_set_symbol_value_placeholder): New accessors.
	* m4/m4module.h (m4_is_symbol_placeholder),
	(m4_get_symbol_value_placeholder),
	(m4_set_symbol_value_placeholder),
	(m4_get_symbol_placeholder): Likewise.
	* m4/symtab.c (m4_is_symbol_value_placeholder),
	(m4_get_symbol_value_placeholder),
	(m4_set_symbol_value_placeholder): Likewise.
	(dump_symbol_CB): Handle new symbol type.
	* m4/macro.c (trace_pre): Likewise.
	(m4_macro_call): Warn when invoking a placeholder.
	* modules/m4.c (dumpdef): Handle dumping a placeholder.
	(defn): Warn when referencing a placeholder.
	* src/freeze.c (dump_symbol_CB): Ignore placeholder when
	freezing.
	(reload_frozen_state): When reloading unknown builtin, install a
	placeholder instead of warning.
	* tests/freeze.at (loading format 1): Allow warning when
	popdef'ing undefined function.

2006-07-27  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)

	* m4/hash.c (m4_hash_string_hash): Don't case-fold in the hash
	function. Shift by 7, not 3, for consistency with
	gnulib/lib/hash.c. Don't assume hash word is 32 bits.

2006-07-27  Eric Blake  <ebb9@byu.net>

	* src/main.c (usage): Update to match branch.
	(main): Update --version info to distinguish between program name
	`m4' and package name `GNU M4'.
	(AUTHORS): Translate René Seindal's name.
	* configure.ac (TIMESTAMP): Remove now-redundant parentheses.
	* Makefile.am (doc/m4.1): Update to match branch.
	* m4/m4.c (DEFAULT_NESTING_LIMIT): Raise to 1024, to match
	branch.

	* m4/system_.h (EXIT_MISMATCH): Define.
	* src/main.c (main): Don't clear syntax table for version 1.
	(usage): Document exit status.
	* src/freeze.c (reload_frozen_state): Port GET_DIRECTIVE from the
	branch, and require V directive to appear first in file.  Fix
	broken logic for detecting F and T in version 1 files.

2006-07-22  Eric Blake  <ebb9@byu.net>

	* src/main.c (stackovf_handler): Document the problems in our
	overflow handler.
	* src/stackovf.c: Forward port changes in branch to use POSIX
	sa_sigaction when available.
	(process_sigsegv): Avoid buffer overrun when error string is
	translated, although the fact that we translate in a signal
	handler is still a bug.
	* ltdl/m4/stackovf.m4 (M4_SYS_STACKOVF): Forward port changes
	from branch to modernize checks.

	* modules/format.c (format): Avoid compiler warning that str may
	be used uninitialized.

	* m4/m4private.h (DEBUG_MODULES, DEBUG_STKOVF) [DEBUG]: Fix
	spelling.
	(DEBUG_SYNTAX) [DEBUG]: Turn on more debug.
	(DEBUG_MACRO): Remove unused macro.
	* src/stackovf.c: Avoid compiler warnings.
	* m4/input.c: Likewise.
	* m4/module.c: Likewise.
	* m4/output.c: Likewise.
	* m4/path.c: Likewise.
	* m4/symtab.c: Likewise.
	* m4/syntax.c: Likewise.

2006-07-20  Eric Blake  <ebb9@byu.net>

	* ltdl/m4/gnulib-cache.m4: gnulib-tool has changed again.
	Regenerate to explicitly ask for --assume-autoconf=2.60.

2006-07-19  Eric Blake  <ebb9@byu.net>

	* po/ChangeLog: Merge into main ChangeLog, then delete file.
	* THANKS: Update.

	* doc/m4.texinfo (copying): Relax restriction on front-cover and
	back-cover texts.

2006-07-17  Eric Blake  <ebb9@byu.net>

	* configure.ac (AM_GNU_GETTEXT_VERSION): Bump requirement to
	0.14.5.

	* ltdl/m4/gnulib-cache.m4: Augment with `gnulib-tool --import
	xvasprintf'.
	* modules/format.c (includes): Use xvasprintf.h.
	(format): Make static.  Avoid buffer overflow, that can lead to
	arbitrary code execution exploit.  Only pass unsigned char to
	is*().  Support F, g, and G specifiers.
	* doc/m4.texinfo (Format): Expose buffer overrun bug.  Document
	new specifiers.

2006-07-17  Gary V. Vaughan  <gary@gnu.org>

	Ensure M4 compiles correctly with -DDEBUG, and use a single
	consistent definition of various /DEBUG_[A-Z]+/ symbols:

	* m4/input.c: Have commented out out DEBUG_INPUT only by default.
	(m4_print_token): Use m4_get_symbol_value_text and
	m4_get_symbol_value_func calls instead of obsolescent VALUE_TEXT
	and VALUE_FUNC respectively.
	(m4__next_token): Use m4_print_token call instead of obsolescent
	print_token symbol.
	* m4/module.c: Have commented out out DEBUG_MODULE only by default.
	* m4/output.c: Similarly for DEBUG_OUTPUT.
	* m4/path.c: Similarly for DEBUG_INCL.
	* m4/symtax.c: Similarly for DEBUG_SYM.
	* m4/syntax.c: Similarly for DEBUG_SYNTAX.
	* src/stackovf.c: Similarly for DEBUG_STACKOVF.
	* m4/m4private.h (DEBUG): Add DEBUG_OUTPUT and DEBUG_STACKOVF to
	preprocessor macros defined with -DDEBUG compiles.

2006-07-17  Gary V. Vaughan  <gary@gnu.org>  (tiny change)

	* bootstrap: Correct typo in --download-po argument parsing.

2006-07-15  Eric Blake  <ebb9@byu.net>

	* ltdl/m4/gnulib-cache.m4: Augment with `gnulib-tool --import
	gendocs fdl'.
	* tests/generate.awk (normalize): Recognize @tabchar.
	* doc/m4.texinfo (Top): Start merging from branch.  Remove tabs.
	Fix menus.  Upgrade FDL license from 1.1 to 1.2.  Fix overfull
	hboxes.
	(Index macro, Shell commands, Incompatiblities): Rename nodes
	from Index, UNIX commands, Other incompat.
	(Platform macros, Using frozen files, Frozen file format 1)
	(Frozen file format 2, Copying This Manual, Indices): New nodes.
	* Makefile.am (EXTRA_DIST): Distribute gendocs.
	(MAINTAINERCLEANFILES): Clean up files from gnulib.
	(doc_m4_TEXINFOS): Depend on fdl.texi.
	(web-manual): New maintainer target.

2006-07-14  Gary V. Vaughan  <gary@gnu.org>

	* doc/m4.texinfo (Modules):  RMS asked me for an explanation of
	the modular architecture of M4.  The result is paraphrased here
	for the benefit of future readers of the manual.

2006-07-14  Gary V. Vaughan  <gary@gnu.org>  (tiny change)

	* Makefile.am (TESTSUITE_AT): Add missing tests/freeze.at.

2006-07-14  Eric Blake  <ebb9@byu.net>

	* src/main.c (main): Avoid compiler warning.
	* modules/gnu.c (renamesyms): Remove unused variable.

2006-07-14  Gary V. Vaughan  <gary@gnu.org>

	* m4/m4module.h (m4_regexp_syntax_decode, m4_regexp_syntax_encode)
	(m4_get_regexp_syntax_opt, m4_set_regexp_syntax_opt): Declare
	new functions for managing regexp syntax options.
	* m4/m4private.h (m4): Add regexp_syntax field.
	* m4/resyntax.c: New file implements the above.
	* Makefile.am (m4_libm4_la_SOURCES): Add m4/resyntax.c.
	* modules/gnu.c (RE_SYNTAX_BRE, RE_SYNTAX_ERE, builtin_eregexp)
	(builtin_epatsubst, builtin_erenamsyms, m4_regexp_do)
	(m4_patsubst_do, m4_renamesyms_do): Removed.
	(builtin_changeresyntax): New builtin to change regular expression
	syntax.
	(m4_resyntax_encode_safe): Factor out diagnostics code.
	* src/freeze.c (produce_resyntax_dump): New function to dump
	default regexp syntax specifier to frozen file.
	(reload_frozen_state): Updated to action 'R' directive.
	* src/main.c (usage): Describe new -r option.
	(long_options, OPTSTRING): Declare it.
	(main): Encode and store cli regexp syntax option argument.
	* tests/freeze.at (regexp syntax): New test that regexp syntax
	survives freezing.
	* tests/generate.awk (m4_pattern_allow): Updated for renamesyms.
	* doc/m4.texinfo (Erenamesyms and Renamesyms, Eregexp and Regexp)
	(Epatsubst and Patsubst): Renamed to...
	(Renamesyms, Regexp, Patsubst): ...these respectively. Updated
	documentation and added new examples.
	(Changeresyntax): New section describing changeresyntax builtin,
	and regexp syntax names.
	(Regular expression syntax): New section describing differences
	between various regular expression syntaxes.
	(Frozen files): Document 'R' directive.
	* NEWS: Updated.

2006-07-13  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap: Enhanced to work more like our other scripts:
	Add a copyright statement; support --version and --help; accept a
	--download-po option with argument as a substitute for DOWNLOAD_PO
	in the environment.

2006-07-11  Eric Blake  <ebb9@byu.net>

	* Makefile.am (doc/m4.1): Port patch from branch that avoids
	intermediate file.
	* ltdl/m4/gnulib-cache.m4: Regenerate since upstream gnulib-tool
	changed.

2006-07-10  Gary V. Vaughan  <gary@gnu.org>  (tiny change)

	* tests/builtin.at (patsubst, regexp):  Adjust these tests, now
	that `\0' is no longer accepted.

	* src/main.c (usage): Alphabetize options within their sections.

	* modules/gnu.c (m4_regexp_search, regsub, substitute)
	(esyscmd):  Improve comments.

	* modules/gnu.c (substitute): Remove old warning for \0.
	(substitute_warned): No longer required.  Removed.

	* modules/gnu.c: Put macro definitions into alphabetical order.

2006-07-07  Eric Blake  <ebb9@byu.net>

	* tests/freeze.at (loading format 1): New file, with new test.
	* tests/testsuite.at: Include it.
	* tests/macros.at (Arity, defn, and freeze): Add frozen keyword.
	* tests/modules.at (Freezing modules): Likewise.

	* configure.ac (AC_PREREQ): Autoconf 2.60 is now out.
	(AC_CHECK_HEADERS): Assume signal.h.
	(AC_CHECK_HEADERS_ONCE): Use new feature to shrink configure.
	(AC_CHECK_FUNCS_ONCE): Likewise.
	* src/m4.h (includes): Assume signal.h.

2006-07-05  Eric Blake  <ebb9@byu.net>

	Fix all testsuite failures on cygwin.
	* doc/m4.texinfo (Syscmd, Esyscmd): Forward-port updates from
	branch-1_4.  Solves testsuite failure when uninstalled m4 is
	shadowed by redefinition of PATH in libtool wrapper.
	* Makefile.am (module_ldflags): Don't forget AM_LDFLAGS, which
	contains the -no-undefined required by cygwin.
	(TESTS_ENVIRONMENT): Export abs_top_builddir.
	* tests/others.at (misc): Port to platforms where /etc/passwd
	does not exist or does not contain user named root.
	* tests/modules.at (AT_CHECK_M4_MODTEST): Look in correct
	directory.
	* tests/builtins.at (define, divert): Avoid overquoting.
	* tests/generate.awk (new_group): Likewise.

2006-07-05  Gary V. Vaughan  <gary@gnu.org>

	The regs_allocated field in a struct re_pattern_buffer refers
	to the state of a particular re_registers struct when used in
	successive matches using the same compiled pattern.  Avoid a
	SEGV in `renamesyms' resulting from using a new re_registers
	with an existing re_pattern_buffer:

	* modules/gnu.c (m4_pattern_buffer): Wrapper struct for associated
	pattern buffer and registers.
	(m4_regexp_search): New function to call re_regexp_search with
	correctly matched pattern buffer and register instantiations.
	(m4_regexp_compile): Return an m4_pattern_buffer.  Adust all
	callers.

2006-07-04  Gary V. Vaughan  <gary@gnu.org>

	* ltdl/m4/m4-getopt.m4 (M4_GETOPT): Update to take into account
	changes to gnulib getopt.m4 since last build.
	* Makefile.am (src_m4_SOURCES): Only compile shipped getopt module
	if the system getopt fails M4_GETOPT tests.

2006-06-22  Eric Blake  <ebb9@byu.net>

	* Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
	Reported by Bruno Haible.

2006-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* m4/module.c (m4__module_exit): Avoid ltdl memory leak.

2006-06-19  Eric Blake  <ebb9@byu.net>

	* THANKS: Update.

2006-06-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (src_m4_DEPENDENCIES): Make dependency explicit.
	(clean-local): Split into and depend upon...
	(clean-local-tests, clean-local-src): ...these two.  The latter
	removes the libtool object directory below `src', to work around
	a buglet in Automake, failing to list it.
	(EXTRA_DIST): Distribute modules/perl.c.

2006-06-19  Eric Blake  <ebb9@byu.net>

	* Makefile.am ($(srcdir)/doc/m4.1): No need to list $(srcdir) in
	right side of dependency; VPATH does that.
	(stamp-vcl): Update to use libtool's algorithm.
	(EXTRA_DIST): Distribute stamp-vcl.
	Reported by Ralf Wildenhues.
	(TESTSUITE): Revert earlier change that used absolute path, as
	that broke 'make dist' in VPATH.  Stick with $(srcdir) instead.
	(EXTRA_DIST): Revert earlier change of $(TESTSUITE).
	(TESTS_ENVIRONMENT) [USE_GMP]: Revert earlier addition, since
	atlocal takes care of it instead.
	(check-local, installcheck-local, clean-local): Inline absolute
	path to testsuite here, rather than relative path to testsuite
	elsewhere.

2006-06-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* m4/m4private.h (DELETE): Cast away const here...
	* src/stackovf.c (stackovf_exit): ...to avoid cast-as-lvalue here.
	* src/freeze.c (reload_frozen_state): Avoid uninitialized
	variable warning.

2006-06-19  Eric Blake  <ebb9@byu.net>

	* Makefile.am (doc/m4.1): Build in $(srcdir), to match where
	.info pages are built.
	Reported by Ralf Wildenhues.
	(EXTRA_DIST): Inline definition of testsuite, so that make dist
	works again.

2006-06-16  Eric Blake  <ebb9@byu.net>

	Follow recommendations from autoconf manual for autotest.
	* Makefile.am (TESTSUITE): Factor the $(srcdir) out of uses, and
	turn it into an absolute path until autotest provides an option
	that allows us to avoid changing directories.  Properly quote
	throughout.
	(TESTS_ENVIRONMENT) [USE_GMP]: Inform testsuite about GMP.
	(check-recursive): Delete unused target.
	($(TESTSUITE)): Atomically update testsuite.
	(CD_TESTDIR): Simplify.
	(m4__cd): Delete unused macro.
	(check-local): Let TESTSUITEFLAGS influence the run.
	(installcheck-local): Let TESTSUITEFLAGS override
	AUTOTEST_PATH.  Add dependencies.
	(clean-local): Clean up.
	(DISTCLEANFILES, MAINTAINERCLEANFILES): Add directory location.
	* README: Document how to use the testsuite.

2006-06-15  Eric Blake  <ebb9@byu.net>

	* configure.ac (M4_DEFAULT_PRELOAD): Fix typo in last commit.

	* ltdl/m4/m4-error.m4 (M4_ERROR): Use M4_ instead of m4_ to avoid
	clashes with m4sugar.
	* ltdl/m4/m4-getopt.m4 (M4_GETOPT): Likewise.
	* ltdl/m4/m4-gettext.m4 (M4_GNU_GETTEXT): Likewise.
	* ltdl/m4/m4-obstack.m4 (M4_OBSTACK): Likewise.
	* ltdl/m4/m4-regex.m4 (M4_REGEX): Likewise.
	* ltdl/m4/gmp.m4 (_M4_LIB_GMP): Likewise.
	* ltdl/m4/stackovf.m4 (M4_SYS_STACKOVF): Likewise.
	* ltdl/m4/debug.m4 (M4_CHECK_DEBUGGING): Likewise.
	* configure.ac: Likewise.
	(M4_DEFAULT_PRELOAD): Use as a macro, not shell variable.
	* Makefile.am (src_m4_CPPFLAGS): Use STACKOVF as a makefile
	conditional.
	* ltdl/m4/m4-gnulib.m4: Delete, no longer needed.

	Reduce compiler warnings.  Inside GMP, mpq_t is an array type, so
	const mpq_t is not assignable from plain mpq_t.  Avoid
	type-punning warnings caused trying to mix these types.
	* modules/mpeval.c (numb_ior, numb_eor, numb_and, numb_lshift),
	(numb_rshift, numb_divide, numb_modulo): Remove const qualifier.
	* modules/evalparse.c (or_term, xor_term, and_term, shift_term),
	(mult_term, exp_term): Remove type-punning casts.
	(numb_pow): Remove const qualifier.
	* src/freeze.c (reload_frozen_state): Fix typo in messages.
	Fix variables that can be used uninitialized, which fixes
	security hole where malicious frozen file can execute arbitrary
	code.

2006-06-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (modules_mpeval_la_LIBADD): Readd $(LIBADD_GMP).

2006-06-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
	and Eric Blake  <ebb9@byu.net>

	Allow `make dist' to work again.
	* Makefile.am (EXTRA_DIST): doc/helptoman.pl is gone.
	(MAINTAINERCLEANFILES): Avoid redundant mention of dist_man_MANS.
	(cvs-dist): Fix typo.
	* NEWS: Match current version number.

2006-06-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (AM_CPPFLAGS):  Add $(LTDLINCL), so the right
	ltdl.h is used.

	* bootstrap: Do not run libtoolize manually, this is done
	correctly by autoreconf.  Invoke autoreconf with --no-recursive
	to avoid unnecessary rerunning of autotools for libltdl.

2006-06-13  Eric Blake  <ebb9@byu.net>

	* THANKS: Update.

2006-06-12  Eric Blake  <ebb9@byu.net>

	* m4/output.c [HAVE_MKTEMP]: Gnulib provides mkstemp, so don't
	bother with mktemp.
	* src/m4.h: Don't declare mktemp.
	* m4/input.c (m4__next_token): Avoid bzero.
	* configure.ac (AC_CHECK_FUNCS): Remove obsolete checks.
	* Makefile.am (doc/m4.1): Depend on installed help2man, rather
	than distributing outdated helptoman.pl.
	* doc/helptoman.pl: Delete.

2006-06-10  Eric Blake  <ebb9@byu.net>

	* README (Patches): Document the current dependence on CVS
	builds of autotools.
	* ltdl/m4/gnulib-cache.m4: Update, and use --macro-prefix=M4.
	* configure.ac: Use consistent quoting throughout.
	(AC_PREREQ): Bump to 2.59d.
	(AC_INIT): Package name begins with uppercase.
	(AC_ARG_WITH): Use AS_HELP_STRING.
	(AM_INIT_AUTOMAKE): Enable gnits mode.
	(AC_ISC_POSIX, AM_PROG_CC_STDC, AC_PROG_INSTALL, AC_PROG_MAKE_SET),
	(AC_PROG_AWK, AM_C_PROTOTYPES, AC_C_CONST, AC_HEADER_STDC),
	(AC_CHECK_HEADERS, AC_FUNC_ALLOCA, AC_FUNC_VPRINTF): Remove checks
	done by gnulib or automake, or which autoconf has declared
	obsolete.
	* m4/m4private.h (Includes): Assume C89 or better, and use errno
	unconditionally.
	* m4/output.c (Includes): Likewise.
	* modules/gnu.c (Includes): Likewise.
	* modules/m4.c (Includes): Likewise.
	* src/m4.h (Includes): Likewise.

	* README-alpha: Update web address.
	* README: Likewise. Change encoding to ASCII.  Remove old advice
	about cygwin.  Document bootstrapping dependency.
	* AUTHORS: Update from branch-1_4.
	* THANKS: Likewise.  Change encoding to UTF-8.
	* BACKLOG: Delete.  This file is too old and unmaintained to be
	worthwhile.
	* ChangeLog: Change encoding to UTF-8.

	Avoid compiler warnings.
	* m4/macro.c (trace_format): Don't mark this as a printf format,
	since we don't accept the same set of modifiers as printf.  It
	would be nice if gcc let us specify a custom format archetype.
	* src/main.c (main): Cast away const.

2006-06-10  Andreas Schwab  <schwab@suse.de>  (tiny change)
	    Eric Blake  <ebb9@byu.net>

	* modules/time.c (ctime): Pass correctly typed variable to
	m4_numeric_arg.
	(gmtime): Likewise.
	(localtime): Likewise.
	(strftime): Likewise.
	* m4/utility.c (m4_numeric_arg): For now, document arbitrary
	limit inherent in this interface.

2006-05-08  Bruno Haible  <bruno@clisp.org>  (tiny change)

	* modules/m4.c (WEXITSTATUS): Provide fallback definition.
	(sysval): Use WEXITSTATUS.
	* modules/gnu.c (esyscmd): Set sysval to 0xffff, to accomodate both
	big-endian and little-endian wait status definitions.

2006-05-06  Eric Blake  <ebb9@byu.net>

	* po/Makevars (MSGID_BUGS_ADDRESS): Add.
	* po/POTFILES.in (src/getopt.c, src/version-etc.c): These files live
	in src, not gnu.

2006-05-06  Eric Blake  <ebb9@byu.net>

	* configure.ac (LT_CONFIG_LTDL_DIR): Inform libtool which
	subdirectory to use.
	(support for -pipe): Move after LT_INIT, since it relies on
	libtool internals.

2006-05-05  Eric Blake  <ebb9@byu.net>

	* Makefile.am (doc/m4.1): Use $@, not $(srcdir)/doc/$@.

	* THANKS: Update.

2006-05-05  Bruno Haible  <bruno@clisp.org>
	and Eric Blake  <ebb9@byu.net>

	* configure.ac (gl_SOURCE_BASE, gl_M4_BASE, gl_MODULES): Move to...
	* ltdl/m4/gnulib-cache.m4: ...this new file, per new gnulib-tool
	usage pattern.
	* bootstrap: Update usage of gnulib-tool.

2006-05-04  Eric Blake  <ebb9@byu.net>

	* Makefile.am (doc/m4.1): Use EXEEXT on built binary.
	Cleanup whitespace.

2005-12-05  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap (func_update_po): Synch with CVS GNU tar.  wget 1.9.x
	and 1.10.x support --cache=off, so $WGETFLAGS are not necessary.
	Reported by Eric Blake <ebb9@byu.net>

2005-12-04  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap (func_update_po): Test and set $WGETFLAGS to disable
	http caching as -C is no longer supported by wget 1.10.x.
	Reported by Eric Blake <ebb9@byu.net>

2005-10-20  Gary V. Vaughan  <gary@gnu.org>

	* m4/module.c (caller_id): To match libtool-2.0 interface, changed
	to ...
	(iface_id): ...an lt_dlinterface_id type.
	(m4__module_find): New abstraction for lt_dlhandle_fetch.  Use
	throughout, instead of calling obsolete lt_dlhandle_find directly.
	(m4__module_next): Use multiloader-safe lt_dlhandle_iterate.  Use
	throughout, instead of calling obsolete lt_dlhandle_next.
	* m4/m4private.h (m4__module_find): Declare it.
	* m4/builtin.c (m4_builtin_find_by_name, m4_builtin_find_by_func):
	Use m4__module_next instead of obsolete lt_dlhandle_next.

2005-10-20  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap (func_update_po): Update pofiles directly from the
	translation project.
	* po/LINGUAS, po/cs.po, po/de.po, po/el.po, po/fr.po, po/it.po,
	po/ja.po, po/nl.po, po/pl.po, po/ru.po, po/sv.po: No need to store
	these files under source control anymore.
	Suggested by Eric Blake <ebb9@byu.net>

2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>

	* ltdl/m4/m4-gnulib.m4: Update FSF contact address.  Somehow this
	file escaped the address updates on 2005-05-01.

2005-07-07  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap: Allow user overriding of gnulib-tool location, and
	correctly determine module source directories whether gnulib-tool
	is given as a relative or absolute path, or is found by searching
	PATH.
	Reported by Eric Blake <ebb9@byu.net>

2005-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* ltdl/m4/debug.m4 (m4_CHECK_DEBUGGING): Make sure that both $rm
	and $RM are defined for various versions of
	AC_LIBTOOL_COMPILER_OPTION.

	* bootstrap (AUTORECONF): New variable to allow user overriding of
	autoreconf path.

2005-07-07  Gary V. Vaughan  <gary@gnu.org>

	* doc/m4.texinfo (History): Add better notes on the ancestory of
	GNU m4, and other historical interest.

2005-05-08  Gary V. Vaughan  <gary@gnu.org>

	* m4/symtab.c (m4_symbol_rename): New function that performs a low
	level symbol rename.
	* m4/m4module.h (m4_symbol_rename): Declare it as part of the API.
	* modules/gnu.c (regsub): Factored out of m4_epatsubst_do...
	(m4_patsubst_do, m4_renamesyms_do): ...wrappers that use
	regsub...
	(erenamesyms, renamesyms): ...builtins that use these to implement
	macro renaming by regular expression.
	* doc/m4.texinfo (Erenamesyms and Renamesyms): Document them.
	* tests/generate.awk: Allow some forbidden `m4_' prefixed symbols
	to stop the new generated tests from choking.

2005-05-07  Gary V. Vaughan  <gary@gnu.org>

	Since most of the build is handled from a single Makefile.am now,
	we can teach make about the dependencies between the m4 binary and
	the preopened modules it is built against:

	* configure.ac (PREOPEN_DEPENDENCIES): Substitute for a list of
	preopened modules.
	* Makefile.am (src_m4_DEPENDENCIES): Rebuild the m4 program if any
	of the preopened modules have changed.

2005-05-07  Gary V. Vaughan  <gary@gnu.org>

	* configure.ac (gl_MODULES): Add mkstemp for machines that don't
	have a native implementation.

2005-05-06  Gary V. Vaughan  <gary@gnu.org>

	* src/m4.h (EXIT_SUCCESS, EXIT_FAILURE): Removed.  These are
	handled already by gnu/exit.h.

	* configure.ac (gl_MODULES): Add assert to support a
	--disable-assert configure time option for NDEBUG setting.

	* Makefile.am (src_m4_SOURCES): Add version-etc-fsf.c.
	* bootstrap (src_modules): Add version-etc-fsf.
	* src/main.c (version_etc_copyright): Removed.

	* ltdl/m4/m4-getopt.m4 (m4_GETOPT): Synch with gnulib/getopt.m4.

2005-05-04  Gary V. Vaughan  <gary@gnu.org>

	* src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
	recognition macros.
	* src/freeze.c (produce_frozen_state): Use \n line-endings even
	on Windows, so that the frozen file reader will work.
	Reported by Josef T. Burger <bolo@bolo.com>

2005-05-04  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>

	Forward port of a patch that allowed m4-1.4.2 to compile on
	QNX 6.3:

	* configure.ac (AC_CHECK_HEADERS):  Add signal.h,
	sys/signal.h.
	* src/m4.h: And include them as appropriate.
	* src/main.c, src/stackovf.h: Don't include signal.h literally;
	m4.h will include the correct file.

2005-05-04  Gary V. Vaughan  <gary@gnu.org>

	* m4/m4private.h: Make errno visible for the sources patched
	below.

2005-05-04  Paul Eggert  <eggert@twinsun.com>

	* src/main.c (print_program_name_CB): Preserve errno, since
	M4ERROR relies on this.
	* modules/gnu.c (m4_esyscmd): Clear errno before calling popen.
	* modules/m4.c (m4_maketemp): Clear errno before calling mkstemp.
	* m4/path.c (m4_path_search): Don't let "free" trash errno when
	returning NULL.

	* m4/output.c (m4_insert_file): Don't assume errno has a valid
	value simply because fread returns zero.  This fixes a
	portability bug reported by Marion Hakanson in
	<http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.

2005-05-04  Santiago Vila  <sanvila@debian.org>

	* tests/stackovf.test: Use tempfile if available.

2005-05-04  Robert Bihlmeyer  <robbe@orcus.priv.at>  (tiny change)

	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
	* m4/output.c (m4_insert_file): Do not mix buffered and
	unbuffered I/O, as this breaks on the Hurd.

2005-05-04  Gary V. Vaughan  <gary@gnu.org>

	Gnulib has changed again.  Reimport.  Adjust.  Rinse.  Repeat.
	Automake and Libtool now agree on subdir-objects and LTLIBOBJS,
	and libtoolize does a better job of ltdl importing now too, so
	take advantage of that while updating the tree:

	* acm4, config: Moved from here...
	* ltdl/m4, ltdl/config: ...to here.
	* doc/Makefile.am, m4/Makefile.am, modules/Makefile.am,
	src/Makefile.am, tests/Makefile.am: Removed...
	* Makefile.am: ...and migrated to here, with adjustments to
	compensate for relative path differences.
	* commit: Adjust relative paths.
	* configure.ac: Adjust relative paths.
	(AC_PREREQ): 2.59 isn't strictly new enough, we also need a
	patch.
	(LT_PREREQ): 2.0 isn't released yet, but will work when it is!  In
	the meanwhile, CVS HEAD libtool is needed.
	(AM_INIT_AUTOMAKE): Added subdir-objects declaration. 1.9.5 isn't
	stricly new enough, we also need a patch.
	(AM_PROG_CC_C_O): Required for subdir-objects in Automake.
	(AC_WITH_LTDL): Replaced with LT_WITH_LTDL.
	(gl_MODULES): Don't list getopt and version-etc, as they don't
	belong in libm4.
	* bootstrap: After running gnulib-tool to import the listed
	modules, fetch getopt and version-etc into src manually.
	(ltdldir): Change to ltdl.
	* src/main.c: Adjust for changes in version-etc API.
	* ltdl/m4/m4-getopt.m4: New macro to mirror gnulib's getopt.m4,
	but works when the getopt module isn't to be included in the lib.
	* README: Add note about patching autoconf and automake to
	bootstrap CVS m4.

2005-05-02  Matt Kraai  <kraai@debian.org>  (tiny change)

	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
	* doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
	empty file rather than to a nonexistent file.  This closes a
	common security hole.
	* modules/m4.c (m4_maketemp): Implement the above, by using
	mkstemp rather than mktemp.

2005-05-01  Gary V. Vaughan  <gary@gnu.org>

	The FSF are moving offices today.  Changed their contact address
	in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
	`51 Franklin Street, Fifth Floor, MA 02110-1301'.

2005-03-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)

	* tests/Makefile (clean-local): Ignore testsuite cleanup
	failures.

2005-03-11  Per Bothner  <per@bothner.com>  (tiny change)

	* tests/Makefile (clean-local): Only run the testsuite cleanup
	if the testsuite has been generated.

2005-02-11  Stepan Kasal  <kasal@ucw.cz>

	* TODO: slight clarification of the example of qindir usage.

2005-02-08  Gary V. Vaughan  <gary@gnu.org>

	* TODO: Add qindir requirement, and defn bug.
	From Stepan Kasal  <kasal@ucw.cz>

2005-02-08  Stepan Kasal  <kasal@ucw.cz>

	* TODO: Add ``execution stack'', fix a typo.
	* doc/m4.texinfo: Typos.

2004-12-24  Eric Blake  <ebb9@byu.net>

	* configure.ac (INCLUDE_STDBOOL_H): Account for gnulib's move
	to the gnu subdirectory.
	* acm4/m4-error.m4 (INCLUDE_ERROR_H): Likewise.
	* acm4/m4-obstack.m4 (INCLUDE_OBSTACK_H): Likewise.
	* acm4/m4-regex.m4 (INCLUDE_REGEX_H): Likewise.
	* m4/system_.h: Likewise, in non-configured includes.

2004-10-14  Noah Misch  <noah@cs.caltech.edu>,
	    Gary V. Vaughan  <gary@gnu.org>

	* m4/m4.c (m4_context_field_table, m4_context_opt_bit_table):
	Protect definitions from macro expansion under -DNDEBUG by
	parenthesising the expanded function names.
	* m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
	(m4_get_syntax_bcomm, m4_get_syntax_ecomm)
	(m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
	(m4_is_syntax_macro_escaped): Similarly protect function
	definitions from macro expansion under -DNDEBUG by #undefing the
	matching macro names before each definition.  Also, move all the
	function definitions to the end of the file so that any
	invocations in the rest of the file pick up the fast macro
	versions.
	* m4/m4private.h (m4_set_symbol_table, m4_set_syntax_table)
	(m4_set_debug_file, m4_set_trace_messages)
	(m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
	(m4_set_nesting_limit_opt, m4_set_debug_level_opt)
	(m4_set_max_debug_arg_length_opt): New fast macro versions of the
	option setter functions.

2004-09-23  Gary V. Vaughan  <gary@gnu.org>

	* po/POTFILES.in: Reflect move of gnulib files from gnulib/m4
	to gnu.

2004-09-23  Gary V. Vaughan  <gary@gnu.org>

	* src/main.c: Include gnulib files from the correct directory.

	* gnulib/*: Don't store any of the gnulib files in arch, as they
	generate spurious changes.
	* Makefile.am (ACLOCAL_AMFLAGS): Remove gnulib/acm4 since the
	gnulib macros now share our macro directory.
	(SUBDIRS): Descend into `gnu' rather than `gnulib'.
	* bootstrap: Call gnulib-tool to import from the gnulib tree.
	(gl_AC_HEADER_INT_TYPES_H, gl_AC_HEADER_STDINT_H,
	gl_AC_TYPE_UINTMAX_T): Patch gnulib.m4 to define these in terms of
	the gettext macros from autopoint that overwrite the gnulib-tool
	imported versions.  Import sources and Makefile.am into the `gnu'
	directory.  Changed all callers.
	* configure.ac (gl_EARLY, gl_SOURCE_BASE, gl_M4_BASE, gl_MODULES,
	gl_INIT): Call these gnulib-tool macros instead of the hardcoded
	for imported modules.
	* acm4/m4-error.m4, acm4/m4-gettext.m4, acm4/m4-obstack.m4,
	acm4/m4-regex.m4: Use AC_BEFORE to enforce ordering rather than
	hardcoding the gnulib macros they wrap.

2004-07-15  Gary V. Vaughan  <gary@gnu.org>

	Latest CVS libtool can preload modules in libraries, including
	its own module loaders!  Tweak m4 so that it doesn't try to treat
	libltdl's module loaders as m4 modules when freezing and on exit:

	* gnulib/acm4/*.m4: Don't store these files in arch since they
	generate spurious changes.
	* bootstrap: Simplify initial libtoolize call, since CVS
	libtoolize is smarter these days.
	* doc/Makefile.am (%.1): Make the helptoman call work with a VPATH
	build.
	* m4/module.h (m4__module_exit): Missing declaration.
	* m4/m4private.h (m4__module_next): New function declaration.
	* m4/module.c (m4__module_next): lt_dlhandle_{firs,nex}t
	encapsulation.  Changed all callers.
	(m4__module_interface): New function to verify m4 loadable module
	interfaces.
	(m4__module_init): Register the interface validator.
	(m4__module_exit): Only close my own modules.
	* modules/m4.c (unistd.h): Provide missing declaration.
	(m4_set_sysval, m4_sysval_flush, m4_dump_symbols)
	(m4_expand_ranges): More missing declarations.
	* modules/modtest.c (export_test): Ditto.
	* src/Makefile.am (AM_CPPFLAGS): Add libltdl directory.
	* src/main.c (main): Bump copyright year.
	* tests/modules.at: Fix sed syntax error.


2004-06-17  Gary V. Vaughan  <gary@gnu.org>

	Tweaking to enable compilation with latest CVS libtool and
	libltdl.  We can't just dump the library files directly into the
	m4 directory anymore now that libltdl is built from pieces itself:

	* bootstrap: Rewritten to use latest libtoolize sanely, and to
	set up libltdl subdirectory.
	* configure.ac (AC_CONFIG_AUX_DIR): Point to our own, not the
	gnulib subdirectory's config.
	(TIMESTAMP): Use $ac_aux_dir for VPATH builds.
	(m4_pattern_forbid): Remove the cruft to deal with renamed jm_
	macros from gnulib.
	(AC_LIB_LTDL): Latest libltdl is a sub-project with its own
	configure.ac, so use AC_WITH_LTDL instead.
	* Makefile.am (SUBDIRS): Add libltdl.
	* acm4/m4-regex.m4 (jm_INCLUDED_REGEX): Updated.  gnulib now uses
	gl_INCLUDED_REGEX.
	* m4/Makefile.am (AM_CPPFLAGS): Add INCLTDL.
	(libm4_la_SOURCES): Remove ltdl.c and ltdl.h.
	(libm4_la_LIBADD): Add LIBLTDL.
	* m4/ltdl.c, m4/ltdl.h: Removed.
	* m4/m4module.h: Include canonical ltdl.h.
	* po/*.po: Updated.

2004-06-14  Gary V. Vaughan  <gary@gnu.org>

	* gnulib/import: Now updates makefile fragments, and configure.ac.
	* gnulib/m4/gnulib.am: New file.  Generated makefile fragments.
	* gnulib/m4/Makefile.am: include it.
	* gnulib/acm4/intmax.m4, gnulib/acm4/longdouble.m4,
	gnulib/acm4/longlong.m4, gnulib/acm4/printf-posix.m4,
	gnulib/acm4/signed.m4, gnulib/acm4/size_max.m4,
	gnulib/acm4/wchar_t.m4, gnulib/acm4/wint_t.m4,
	gnulib/acm4/xsize.m4: New macro files from latest gnulib import.
	* gnulib/acm4/alloca.m4, gnulib/acm4/inttypes_h.m4,
	gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-prefix.m4,
	gnulib/acm4/error.m4, gnulib/acm4/po.m4, gnulib/acm4/regex.m4,
	gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
	gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
	gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
	gnulib/acm4/free.m4, gnulib/acm4/gettext.m4,
	gnulib/acm4/glibc21.m4: Updated macro files from latest gnulib
	import.
	* gnulib/m4/getopt_int.h: New source file from latest gnulib
	import.
	* gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/getopt1.c,
	gnulib/m4/obstack.c, gnulib/m4/obstack.h, gnulib/m4/regex.c,
	gnulib/m4/unlocked-io.h, gnulib/m4/version-etc.c,
	gnulib/m4/xmalloc.c, gnulib/m4/getopt.c, gnulib/m4/getopt.h:
	Updated source files from latest gnulib.

2004-02-29  Gary V. Vaughan  <gary@gnu.org>

	* config/mailnotify: New file for mailing commit notifications,
	imported from cvs-utils.
	* commit: Updated from cvs-utils and tweaked for m4.

2003-12-01  Gary V. Vaughan  <gary@gnu.org>

	* config/mkstamp: Updated from CVS libtool.
	* configure.ac: Generate a gnu coding standards compliant version
	number, and use it for the banner.
	* Makefile.am (stamp-vcl): New rules to force m4 to be regenerated
	mhen the TIMESTAMP changes in ChangeLog, but the file modification
	time doesn't (e.g. in cvs commit).  Otherwise dist tarballs will
	contain the previous version number.
	* src/main.c: Make --version output conform to the GNU standard.

	* configure.ac (AM_INIT_AUTOMAKE): Require 1.7g...
	* modules/Makefile.am (gnu_la_SOURCES, load_la_SOURCES,
	m4_la_SOURCES, traditional_la_SOURCES, modtest_la_SOURCES,
	shadow_la_SOURCES, import_la_SOURCES, stdlib_la_SOURCES,
	time_la_SOURCES): ...so that these are defaulted correctly, and
	can be removed from this file.
	(AM_LDFLAGS): Add -module...
	(gnu_la_LDFLAGS, load_la_LDFLAGS, m4_la_LDFLAGS,
	traditional_la_LDFLAGS, modtest_la_LDFLAGS, shadow_la_LDFLAGS,
	import_la_LDFLAGS, stdlib_la_LDFLAGS, time_la_LDFLAGS): ...so that
	the individual settings can be removed.
	* m4/Makefile.am (libm4_la_LIBADD): Add $(LTLIBINTL) here once...
	* module/Makefile.am (gnu_la_LIBADD, load_la_LIBADD,
	m4_la_LIBADD, traditional_la_LIBADD, modtest_la_LIBADD,
	shadow_la_LIBADD, import_la_LIBADD, stdlib_la_LIBADD,
	time_la_LIBADD): ...so that these are picked up as a deplib of
	libm4 and don't need to be set explicitly.

2003-11-18  Gary V. Vaughan  <gary@gnu.org>

	* modules/Makefile.am (pkglibexec_LTLIBRARIES): Remove perl.la
	from the standard build.  It is too fragile.

	* gnulib/acm4/libtool.m4, m4/ltdl.c, m4/ltdl.h: Reimported from
	CVS libtool after merging m4 changes across to libtool.

	* m4/symtab.c (m4_symtab_create): Fix a careless use of sizeof.
	* m4/path.c (search_path_add): Ditto.

2003-11-13  Gary V. Vaughan  <gary@gnu.org>

	* configure.ac (AC_LIBTOOL_TAGS): Don't include shell code for
	libtool tags we don't use in configure.  This reduces the size
	of the script from over 1Mb to under 700Kb.

2003-11-13  Gary V. Vaughan  <gary@gnu.org>

	The import script was not written properly, and the last gnulib
	import was incomplete.  Fixed that problem, and reimport our
	gnulib dependencies, which picks up the address calculation
	overflow checks described by Paul below.  Also tweak the clients
	of the gnulib xalloc module not to use deprecated macros:

	* gnulib/import: Recurse through module dependencies rather than
	naively descending only one level.
	* configure.ac: Add calls to gnulib's strnlen and extension module
	macros.
	* gnulib/m4/Makefile.am: Add snippets from gnulib's strnlen and
	extension modules.
	* gnulib/acm4/extensions.m4, gnulib/acm4/xalloc.m4,
	gnulib/m4/alloca.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
	gnulib/m4/stdbool_.h, gnulib/m4/unlocked-io.h, gnulib/m4/xalloc.h,
	gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Updated from CVS
	gnulib.
	* gnulib/acm4/libtool.m4: Updated from CVS libtool.
	* m4/hash.c (m4_get_hash_iterator_next): Use `xzalloc (S)' in
	place of `xcalloc (1, S)'.
	* m4/m4.c (m4_create): Likewise.
	* m4/m4private.h (m4_symbol_value_create): Likewise.
	* m4/symtab.c (symtab_fetch): Likewise.
	* m4/syntax.c (m4_syntax_create): Likewise.
	* src/freeze.c (reload_frozen_state): Likewise.
	* m4/path.c (search_path_add): Eliminate use of deprecated NEW
	macro.
	* m4/symtab.c (m4_symtab_create): Likewise.

2003-11-13  Gary V. Vaughan  <gary@gnu.org>

	* tests/module.at: Comment typo.

2003-10-10  Gary V. Vaughan  <gary@gnu.org>

	* tests/modules.at (modules: importing): Apply some lateral
	thinking, and use AT_CHECK to compare the output of a sed pass
	over stderr against the canonical strerror string.

	* tests/modules.at (modules: importing): Edit the generated stderr
	output to canonicalize strerror output, before a comparison.

2003-10-10  Gary V. Vaughan  <gary@gnu.org>

	Tru64UNIX perl is sloppy with namespace pollution.  This patch is
	careful not to trip over the mess:

	* modules/perl.c: Some builds of perl install headers that contain
	`#define try __builtin_try'.  Be sure to undefine that macro
	before `m4/hash.h' gets included, which uses the `try' symbol.
	* m4/system_.h: Similarly for `bool'.  Undefine `bool', `true' and
	`false' before including `stdbool.h'.
	(DELETE):  This symbol is not in m4's namespace, and is in any
	case only used internally...
	* m4/m4private.h (DELETE): ...so move it to here.
	Reported by Martin MOKREJS <mmokrejs@natur.cuni.cz>

2003-10-08  Paul Eggert  <eggert@twinsun.com>

	Don't use XMALLOC and XCALLOC.  Once we install the
	corresponding patch into gnulib, this will fix some
	address-calculation overflow bugs on hosts where calloc (A, B)
	returns garbage when A*B overflows.

	* m4/hash.c (m4_hash_new, node_new, m4_hash_resize,
	maybe_grow, m4_get_hash_iterator_next): Replace XMALLOC with
	xmalloc, XCALLOC with xcalloc.
	* m4/m4.c (m4_create): Likewise.
	* m4/m4private.h (m4_symbol_value_create): Likewise.
	* m4/output.c (m4_output_init): Likewise.
	* m4/symtab.c (symtab_fetch, m4_set_symbol_traced): Likewise.
	* m4/syntax.c (remove_syntax_attribute): Likewise.
	* src/freeze.c (reload_frozen_state): Likewise.
	* src/main.c (main): Likewise.

2003-10-07  Gary V. Vaughan  <gary@gnu.org>

	* Makefile.am (ACLOCAL_AMFLAGS): Search in the new acm4 and
	gnulib/acm4 directories for aclocal m4 macros.
	* gnulib/Makefile.am (EXTRA_DIST): Removed.
	(MAINTAINERCLEANFILES): Add Makefile.in.
	* configure.ac (m4_GNULIB_MODULES): Use it to declare which gnulib
	modules we use.
	* acm4/m4-gnulib.m4 (m4_GNULIB_MODULES): New macro.
	* gnulib/import: New file.  Temporary script for updating gnulib
	imported files, until gnulib-tool is working.
	* gnulib/config/codeset.m4, gnulib/config/error.m4,
	gnulib/config/exitfail.m4, gnulib/config/extensions.m4,
	gnulib/config/getopt.m4, gnulib/config/gettext.m4,
	gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
	gnulib/config/intdiv0.m4, gnulib/config/inttypes-pri.m4,
	gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
	gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
	gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
	gnulib/config/lib-prefix.m4, gnulib/config/malloc.m4,
	gnulib/config/nls.m4, gnulib/config/obstack.m4,
	gnulib/config/onceonly_2_57.m4, gnulib/config/po.m4,
	gnulib/config/progtest.m4, gnulib/config/realloc.m4,
	gnulib/config/regex.m4, gnulib/config/restrict.m4.
	gnulib/config/stdbool.m4, gnulib/config/stdint_h.m4,
	gnulib/config/strerror_r.m4, gnulib/config/strndup.m4,
	gnulib/config/strnlen.m4, gnulib/config/strtol.m4,
	gnulib/config/uintmax_t.m4, gnulib/config/ulonglong.m4,
	gnulib/config/unlocked-io.m4, gnulib/config/xalloc.m4,
	gnulib/config/xstrndup.m4: Removed.
	* gnulib/acm4/alloca.m4, gnulib/acm4/codeset.m4,
	gnulib/acm4/error.m4, gnulib/acm4/exitfail.m4,
	gnulib/acm4/extensions.m4, gnulib/acm4/free.m4,
	gnulib/acm4/getopt.m4, gnulib/acm4/gettext.m4,
	gnulib/acm4/glibc21.m4, gnulib/acm4/iconv.m4,
	gnulib/acm4/intdiv0.m4, gnulib/acm4/inttypes-pri.m4,
	gnulib/acm4/inttypes.m4, gnulib/acm4/inttypes_h.m4,
	gnulib/acm4/isc-posix.m4, gnulib/acm4/lcmessage.m4,
	gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-link.m4,
	gnulib/acm4/lib-prefix.m4, gnulib/acm4/malloc.m4,
	gnulib/acm4/nls.m4, gnulib/acm4/obstack.m4,
	gnulib/acm4/onceonly_2_57.m4, gnulib/acm4/po.m4,
	gnulib/acm4/progtest.m4, gnulib/acm4/realloc.m4,
	gnulib/acm4/regex.m4, gnulib/acm4/restrict.m4.
	gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
	gnulib/acm4/strerror_r.m4, gnulib/acm4/strndup.m4,
	gnulib/acm4/strnlen.m4, gnulib/acm4/strtol.m4,
	gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
	gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
	gnulib/acm4/xstrndup.m4: Reimported from CVS gnulib with
	gnulib/import script.
	* gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/error.c,
	gnulib/m4/error.h, gnulib/m4/exitfail.c, gnulib/m4/free.c,
	gnulib/m4/malloc.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
	gnulib/m4/realloc.c, gnulib/m4/regex.c, gnulib/m4/strtol.c,
	gnulib/m4/version-etc.c, gnulib/m4/version-etc.h,
	gnulib/m4/xalloc.h, gnulib/m4/xmalloc.c: Updated from CVS
	gnulib with gnulib/import script.
	* configure.ac, gnulib/m4/Makefile.am: Manually insert anticipated
	guards ready for gnulib-tool to autoupdate on import.
	* config/debug.m4, config/gmp.m4, config/m4-error.m4,
	config/m4-gettext.m4, config/m4-obstack.m4, config/m4-regex.m4,
	config/stackovf.m4: Moved from here...
	* acm4/debug.m4, acm4/gmp.m4, acm4/m4-error.m4,
	acm4/m4-gettext.m4, acm4/m4-obstack.m4, acm4/m4-regex.m4,
	acm4/stackovf.m4: ...to here, to separate aclocal macros from
	configure time helper scripts.
	* config/error.m4: Removed; superceded by gnulib/acm4/error.m4.
	* m4/hash.c, m4/m4.c, m4/macro.c, m4/module.c, m4/output.c,
	m4/path.c, m4/symtab.c, m4/syntax, m4/system_.h, modules/m4.c,
	src/main.c, src/stackovf.c: s/xfree/free/g to comply with new
	gnulib xalloc.h.
	* src/main.c (version_etc_copyright): Only output the current
	year.
	(version_etc): Call with new variadic API.

2003-09-16  Gary V. Vaughan  <gary@gnu.org>

	* gnulib/m4/version-etc.c, gnulib/m4/version-etc.h: Import
	version-etc module from CVS gnulib.
	* po/POTFILES.in: Add gnulib/m4/version-etc.c.
	* src/Makefile.am: Build it.
	* src/main.c: Use it.

	* gnulib/m4/exit.h: Import exit module from CVS gnulib.
	* gnulib/m4/Makefile.am (pkginclude_HEADERS): Add exit.h.
	* m4/system_.h: Don't define EXIT_SUCCESS and FAILURE, include
	exit.h instead.

2003-09-15  Charles Wilson  <cygwin@cwilson.fastmail.fm>,
	    Gary V. Vaughan  <gary@gnu.org>

	* bootstrap: Separate options.
	* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
	* gnulib/m4/Makefile.am (stdbool.h): Use srcdir, gnulib_srcdir is
	not set.
	* modules/Makefile.am (gnu_la_LIBADD, load_la_LIBADD)
	(m4_la_LIBADD, mpeval_la_LIBADD, traditianal_la_LIBADD)
	(modtest_la_LIBADD, import_la_LIBADD, perl_la_LIBADD)
	(shadow_la_LIBADD, stdlib_la_LIBADD, time_la_LIBADD): Add
	$(LTLIBINTL) for gettext support on cygwin.
	* src/Makefile.am (m4_LDADD): Remove $(INTLLIBS), since we now
	have $(LTLIBINTL) from the preloaded module la files.
	* README: Remove the warning about using --disable-nls on Windows
	machines.

2003-09-15  Gary V. Vaughan  <gary@gnu.org>

	* gnulib/m4/regex.c:  s/<regex.h>/"regex.h"/ or else the compiler
	picks up the system regex.h if gl_REGEX decides gnulib/m4/regex.c
	is required.

2003-09-12  Gary V. Vaughan  <gary@gnu.org>

	* doc/STYLE: Document the gnulib header naming conventions, and
	#include policy.
	* gnulib/m4/error_.h, gnulib/m4/gettext_.h, gnulib/m4/obstack_.h,
	gnulib/m4/regex_.h: Renamed to gnulib/m4/error.h,
	gnulib/m4/gettext.h, gnulib/m4/obstack.h, gnulib/m4/regex.h
	respectively.
	* gnulib/m4/Makefile.am: Remove the rules to build these headers.

	* gnulib/m4/strtol.c, gnulib/config/strtol.m4: Import strtol
	module from CVS gnulib.
	* configure.ac (AC_REPLACE_FUNCS): Remove strtol.
	(gl_FUNC_STRTOL): In favour of the module macro.

2003-09-12  Gary V. Vaughan  <gary@gnu.org>

	Replace the getopt code with CVS gnulib getopt.  The source files
	detect whether they are in a glibc environment and preprocess away
	all of the code if there is a system getopt, so we can compile
	them into the m4 executable unconditionally:

	* gnulib/m4/getopt.c, gnulib/m4/getopt1.c, gnulib/m4/getopt.h,
	gnulib/config/getopt.m4: Import getopt module from CVS gnulib.
	* configure.ac (gl_GETOPT): Use this instead of homebrew inline
	macros.
	* src/getopt.c, src/getopt1.c, src/gnu-getopt.h: Removed old
	version.
	* src/Makefile.am: Adjust.
	* src/main.c: Always include our shipped getopt.h.
	* po/POTFILES.in: Use new location of getopt.c.

2003-09-12  Gary V. Vaughan  <gary@gnu.org>

	* configure.ac (AC_CONFIG_FILES): Remove config/Makefile.
	* config/Makefile.am: Removed.  Automake 1.8 distributes the files
	in this directory automatically.
	* Makefile.am (EXTRA_DIST): Except config/mkstamp.

	* configure.ac (pkglibexecdir): Don't try and set it here, PACKAGE
	isn't set yet.
	* m4/Makefile.am (MODULE_PATH): Removed. Calculate pkglibexecdir
	inline.
	* modules/Makefile.am (pkglibexecdir): Set it here.
	(pkgmodincdir): Renamed to pkgmodincludedir).  Changed all clients.

	* gnulib/m4/regex.c, gnulib/m4/regex_.h, gnulib/config/regex.m4:
	Import regex module from CVS gnulib.
	* gnulib/config/restrict.m4: Ditto for dependee module restrict.
	* config/m4-regex.m4 (m4_REGEX): Wrap gnulib/config/regex.m4, but
	do extra substitutions for Makefile.
	* configure.ac: Use it.
	* gnulib/m4/Makefile.am: Maybe install regex.h after linking it
	from regex_.h if necessary.
	* m4/system_.h: Include the correct version of regex.h.
	* m4/regex.c, m4/regex.h, config/regex.m4: Removed legacy
	version.
	* po/POTFILES.in: Use new location of regex.c.

	* gnulib/m4/Makefile.am (EXTRA_DIST): Removed malloc.c and
	realloc.c: automake distributes these files already.

2003-09-12  Gary V. Vaughan  <gary@gnu.org>

	Replace the xstrzdup code by importing the xstrndup module from
	CVS gnulib, along with its dependencies: strndup and strnlen:

	* gnulib/m4/xstrndup.c, gnulib/m4/xstrndup.h,
	gnulib/config/xstrndup.m4: Import xstrndup module from CVS
	gnulib.
	* gnulib/m4/strndup.c, gnulib/m4/strndup.h,
	gnulib/config/strndup.m4: Ditto wrt strndup.
	* gnulib/m4/strnlen.c, gnulib/config/strnlen.m4: Ditto wrt
	strnlen.
	* gnulib/m4/Makefile.am: Add rules from newly imported modules.
	However, contrary to gnulib, we install xstrndup.h.
	* configure.ac (AC_REPLACE_FUNCS): Remove xstrzdup.
	* gnulib/lib/xstrzdup.c: Delete.  This was never a gnulib file, it
	is an artifact of the old m4 portability layer.
	* configure.ac (gl_XSTRNDUP): This is the gnulib equivalent.
	* m4/system_.h: Include xstrndup.h.
	* m4/macro.c (process_macro): Call xstrndup, not xstrzdup.

2003-09-11  Gary V. Vaughan  <gary@gnu.org>

	Reimport the latest xalloc module from CVS gnulib, and adjust the
	m4 sources to take advantage of xalloc xfree.  Also create a new
	macro DELETE with the same semantics as the old m4 XFREE macro,
	and carefully tweak callers:

	* gnulib/config/xalloc.m4, gnulib/m4/xalloc.h: Updated from CVS
	gnulib.
	* m4/utility.c (xfree): Removed.  This function is now supplied by
	gnulib xalloc.
	* m4/m4private.h (WITH_DMALLOC): Removed XFREE redefine.
	* m4/path.c (search_path_add): Use NEW macro from xalloc.h.
	* m4/symtab.c (m4_symtab_create): Ditto.
	* m4/system_.h: Removed XFREE redefine.
	(DELETE): New macro with same functionality as the original m4
	XFREE macro, but based on xalloc.h now.  Changed all callers.
	* src/main.c (main): Use XMALLOC macro.
	* m4/hash.c, m4/macro.c, m4/symtab.c, m4/syntax.c: Use xfree
	instead of XFREE.
	* m4/output.c (m4_output_exit): Use DELETE instead of XFREE.

2003-09-10  Gary V. Vaughan  <gary@gnu.org>

	Import the xalloc module from CVS gnulib, along with its
	dependencies: exitfail, malloc and realloc. We had different
	semantics for our XFREE and a function xfree() not supplied by
	gnulib, so also a bit of work to keep everything running
	smoothly:

	* configure.ac (AC_REPLACE_FUNCS): Removed xmalloc and xstrdup.
	(gl_XALLOC): Use gnulib equivalents.
	* gnulib/config/exitfail.m4, gnulib/m4/exitfail.h,
	gnulib/m4/exitfail.c: Import exitfail module from CVS gnulib.
	* gnulib/config/malloc.m4, gnulib/m4/malloc.c: Ditto wrt malloc.
	* gnulib/config/realloc.m4, gnulib/m4/realloc.c: Ditto wrt
	realloc.
	* gnulib/config/xalloc.m4, gnulib/m4/xalloc.h,
	gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Ditto wrt xalloc.
	* gnulib/m4/Makefile.am: Add fragment from gnulib for newly
	imported modules.
	(pkgincdir): Removed.  Use pkgincludedir instead.
	* m4/m4private.h (XFREE): xfree already checks for NULL.
	* m4/system_.h: Use xalloc module, and remove macros already
	supplied by xalloc.h.
	* m4/utility.c (xfree): xalloc does not yet implement xfree, so
	moved the old definition from m4/xmalloc.c to here for now.

2003-09-09  Gary V. Vaughan  <gary@gnu.org>

	Import the error and progname modules from CVS gnulib.  Our old
	error.c subsumed the functionality of both, so a little adjustment
	was required to accomodate the split in sources.  Also added more
	wrapper macros to choose between a system installed error.h or our
	shipped gnulib error module:

	* m4/error.c, m4/error.h: Removed.
	* m4/Makefile.am: Adjust.
	(pkgincdir): Removed.  Use pkgincludedir instead.
	* m4/module.h, src/main.c: Don't include `m4/error.h'.
	* m4/system_.h (INCLUDE_ERROR_H): Add a substitution for suitable
	error.h.
	* gnulib/m4/progname.c: Imported from CVS gnulib.
	* gnulib/m4/progname.h: Ditto.
	* src/main.c: Adjust to use progname module.
	* gnulib/m4/error.c: Imported from CVS gnulib.
	* gnulib/m4/error_.h: Ditto.
	* gnulib/m4/Makefile.am: Build the error module into our libgnu.la
	if appropriate, and link a local error.h if the system version is
	missing.
	(libgnu_la_SOURCES) Add progname module sources.
	* gnulib/config/error.m4: Imported from CVS gnulib.
	* gnulib/config/strerror_r.m4: Ditto.
	* config/m4-error.c: New file.  Wrap gnulib error.m4 but arrange
	to have ERROR_H for Makefile substitutions and tell system.h
	whether the system error.h should be used, or a locally installed
	version.
	* configure.ac (jm_PREREQ_ERROR): Replaced by a call to m4_ERROR.

2003-09-09  Gary V. Vaughan  <gary@gnu.org>

	* gnulib/m4/Makefile.am (MOSTLYCLEANFILES): Typo
	s/gettext_.h/gettext.h/.

	* bootstrap: Revert 2003-09-04 patch now that CVS autoconf and
	automake have been fixed.

	* config/m4-obstack.m4 (m4_FUNC_OBSTACK): D'oh! Now that we wrap
	gl_OBSTACK, which in turn calls AC_FUNC_OBSTACK, don't rerun bits
	of code originally snarfed from AC_FUNC_OBSTACK!!! While I'm here
	rename to m4_OBSTACK in light of wrapping gl_OBSTACK.

2003-09-09  Gary V. Vaughan  <gary@gnu.org>

	The gnulib obstack module requires the gnulib gettext module for
	systems that do not have GNU gettext installed.  Because we use
	-Ignulib/m4 in our Makefiles it is not safe to drop gettext.h in
	that directory incase it clashes with the system gettext.h.  This
	delta uses gettext_.h and extra rules in the Makefile to make a
	link to gettext.h when needed:

	* Makefile.am (auxdir): Removed.  No longer used.
	* configure.ac (ac_aux_dir): Removed AC_SUBST.  No longer used.
	(TIMESTAMP): List path to `mkstamp' literally, as ac_aux_dir has
	moved.
	(AC_CONFIG_LIBOBJ_DIR): Declare this for possible future single
	Makefile based build.
	(AC_CONFIG_AUX_DIR): Now we use gnulib/config where the majority
	of the macros are kept.
	* Makefile.am (ACLOCAL_MFLAGS): Search gnulib/config first.
	* configure.ac (AM_INIT_AUTOMAKE): Require 1.7a.
	* config/Makefile (ACLOCAL_MACROS): Removed.  Automake 1.7a
	distributes these automatically.
	* config/regex.m4 (jm_WITH_REGEX): Fixed underquoting to prevent
	warning from automake-1.7a.
	* config/debug.m4 (M4_AC_CHECK_DEBUGGING): Renamed to
	m4_CHECK_DEBUGGING for consistency with gnulib prefixes.  Changed
	all callers.
	* config/m4-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto
	wrt. m4_FUNC_OBSTACK.
	* config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto
	wrt. m4_sys_STACKOVF.
	* config/gmp.m4 (_M4_AC_LIB_GMP, M4_AC_LIB_GMP): Ditto
	wrt. _m4_LIB_GMP, m4_LIB_GMP.
	(ac_gmp_save_LIBS, ac_cv_using_lib_gmp): Don't use autoconf's
	namespace.  Renamed to m4_gmp_save_LIBS and m4_cv_using_lib_gmp
	respectively.
	* config/m4-gettext.m4: New file to set GETTEXT_H appropriately.
	* gnulib/m4/Makefile.am: Added a new block to make an appropriate
	gettext.h link on deficient systems.
	(pkginc_HEADERS): Mention $(GETTEXT_H).
	(EXTRA_HEADERS): Mention gettext.h.
	* gnulib/config/gettext_.h: New file from gnulib's gettext.h.
	* gnulib/config/codeset.m4, gnulib/config/gettext.m4,
	gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
	gnulib/config/intdiv.m4, gnulib/config/inttypes-pri.m4,
	gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
	gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
	gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
	gnulib/config/lib-prefix.m4, gnulib/config/nls.m4,
	gnulib/config/po.m4, gnulib/config/progtest.m4,
	gnulib/config/stdint_h.m4, gnulib/config/uintmax_t.m4,
	gnulib/config/ulonglong.m4: Imported from CVS gnulib.

2003-09-05  Gary V. Vaughan  <gary@gnu.org>

	We can't mirror the gnulib directory structure here, since we need
	to be able to eg. `#include <m4/obstack.h>' from our source files,
	which is much easier if the local obstack.h is created in a
	directory named m4.  Rather than trying to symlink everything into
	the m4 directory, now we build a libtool convenience library from
	the sources we get from gnulib and link that with libm4.la:

	* gnulib/config/extensions.m4: Imported from CVS gnulib.
	* gnulib/config/unlocked-io.m4: Ditto.
	* gnulib/m4/unlocked-io.h: Ditto.
	* gnulib/m4/obstack.m4, gnulib/m4/onceonly_2_57.m4,
	gnulib/m4/stdbool.m4: All moved to gnulib/config directory.
	* gnulib/lib/obstack.c, gnulib/lib/obstack_.h,
	gnulib/lib/stdbool_.h: All moved to gnulib/m4 directory.
	* m4/strtol.c, m4/xmalloc.c, m4/xstrdup.c, m4/xstrzdup.c: Ditto.
	* m4/Makefile.am: Adjust.
	* gnulib/Makefile.am (EXTRA_DIST): Name just the additional gnulib
	macros we redistribute.
	* gnulib/m4/Makefile.am: New file.  Build libgnu.la convenience
	library among others.
	(GNULIB_SRCS, GNULIB_MACROS): Removed.
	* Makefile.am (ACLOCAL_AMFLAGS): Adjust.
	* config/m4-obstack.m4: Adjust.
	* po/POTFILES.in: Adjust.
	* configure.ac: Reformatting.  Call newly imported gnulib macros.
	* m4/builtin.c, m4/macro.c, m4/module.c, m4/utility.c: Removed
	bogus calls of `#include "m4.h"'.
	* Makefile.am: INCLUDES has been deprecated in favour of
	AM_CPPFLAGS.
	* m4/Makefile.am: Ditto.
	* modules/Makefile.am: Ditto.
	* src/Makefile.am: Ditto.

2003-09-05  Gary V. Vaughan  <gary@gnu.org>

	* config/Makefile.am: Reverting yesterdays patch for VPATH builds.

2003-09-04  Gary V. Vaughan  <gary@gnu.org>

	Migrate the obstack support into the gnulib directories for easy
	synchronisation with upstream files in gnulib:

	* config/gnu-obstack.m4: Moved from here...
	* config/m4-obstack.m4: ...to here.
	* config/Makefile.am (SPECIFIC_MACROS): Adjust.
	* m4/obstack.c, m4/obstack_.h: Moved from here...
	* gnulib/obstack.c, gnulib/obstack.h: ...to here.
	* po/POTFILES.in: Adjust.
	* gnulib/Makefile.am (GNULIB_SRCS, GNULIB_MACROS): Adjust.
	* m4/Makefile.am: Add a whole new section to link the obstack
	sources from the gnulib tree if necessary.
	* gnulib/m4/onceonly_2_57.m4, gnulib/m4/obstack.m4: New macros
	from gnulib.
	* config/m4-obstack.m4: Rewrite as a wrapper for
	gnulib/m4/obstack.m4.

2003-09-04  Gary V. Vaughan  <gary@gnu.org>

	GNU M4 currently builds with a number of files adapted from
	upstream sources.  Recently the gnulib project on savannah.gnu.org
	has pulled together a great many of these externally maintained
	files.  This delta is the beginnings of isolating those files
	maintained in gnulib to make it easy to synchronise M4 with the
	upstream files prior to releases.

	* Makefile.am (ACLOCAL_AMFLAGS): Mention gnulib/m4 macro
	directory.
	(SUBDIRS): Added new gnulib subdirectory.
	* configure.ac (AC_CONFIG_FILES): Add new gnulib tree Makefiles.
	* config/stdbool.m4: Moved from here...
	* gnulib/m4/stdbool.m4: ...to here.
	* m4/stdbool_.h: Moved from here...
	* gnulib/lib/stdbool_.h: ...to here.
	* gnulib/Makefile.am: New file.  Make sure the gnulib tree is
	distributed.
	* m4/Makefile.am: Adjust gnulib/modules/stdbool:Makefile.am based
	code to work with new stdbool_.h location.
	(gnulib_srcdir): New.

2003-09-04  Gary V. Vaughan  <gary@gnu.org>

	* config/Makefile.am (MAINTAINERCLEANFILES, ACLOCAL_MACROS)
	(STANDARD_TOOLS, SPECIFIC_MACROS): Needed `$(srcdir)/' for VPATH
	builds to work.
	(SPECIFIC_TOOLS): New variable.  Moved mkstamp to here.
	(EXTRA_DIST): Use it.

	* bootstrap: CVS autoreconf leaves file droppings.  Remove
	aclocal.m4t incase autoreconf doesn't.

2003-08-29  Gary V. Vaughan  <gary@gnu.org>

	* m4/gnu-obstack.h: Updated from CVS gnulib.  For consistency with
	the other gnulib imports, renamed to m4/obstack_.h.
	* m4/obstack.c: Updated from CVS gnulib.
	* m4/Makefile.am (EXTRA_HEADERS): Adjust.
	* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Merge in additional
	header tests from gnulib obstack module.  AC_CONFIG_LINKS knows
	about vpath already, and $top_srcdir upsets CVS Automake, so the
	$top_srcdir reference was removed.

	* m4/system-h.in: For consistency with the gnulib imports, renamed
	to m4/system_.h.
	* m4/Makefile (EXTRA_HEADERS): Adjust.
	* configure.ac (AC_CONFIG_FILES): Adjust.

	* m4/stdbool_.h: New file from gnulib for systems without their
	own.
	* m4/Makefile.am: Add snippets from gnulib for C99 bool support.
	* config/stdbool.m4: New file.  Macros from gnulib for same.
	* configure.ac: Use it.

2003-08-27  Gary V. Vaughan  <gary@gnu.org>

	* config/debug.m4: `perl -pi.bak -e 's/(Copyright) (\d)/$1 (C) $2/g'`
	* config/gmp.m4: Ditto.
	* config/gnu-obstack.m4: Ditto.
	* config/stackovf.m4: Ditto.
	* m4/builtin.c: Ditto.
	* m4/debug.c: Ditto.
	* m4/error.c: Ditto.
	* m4/error.h: Ditto.
	* m4/gnu-obstack.h: Ditto.
	* m4/hash.c: Ditto.
	* m4/hash.h: Ditto.
	* m4/input.c: Ditto.
	* m4/m4.c: Ditto.
	* m4/m4module.h: Ditto.
	* m4/m4private.h: Ditto.
	* m4/macro.c: Ditto.
	* m4/module.c: Ditto.
	* m4/obstack.c: Ditto.
	* m4/output.c: Ditto.
	* m4/path.c: Ditto.
	* m4/regex.c: Ditto.
	* m4/regex.h: Ditto.
	* m4/strtol.c: Ditto.
	* m4/symtab.c: Ditto.
	* m4/syntax.c: Ditto.
	* m4/utility.c: Ditto.
	* m4/xmalloc.c: Ditto.
	* m4/xstrdup.c: Ditto.
	* m4/xstrzdup.c: Ditto.
	* modules/evalparse.c: Ditto.
	* modules/format.c: Ditto.
	* modules/gnu.c: Ditto.
	* modules/import.c: Ditto.
	* modules/load.c: Ditto.
	* modules/m4.c: Ditto.
	* modules/m4.h: Ditto.
	* modules/modtest.c: Ditto.
	* modules/mpeval.c: Ditto.
	* modules/perl.c: Ditto.
	* modules/shadow.c: Ditto.
	* modules/stdlib.c: Ditto.
	* modules/time.c: Ditto.
	* modules/traditional.c: Ditto.
	* src/freeze.c: Ditto.
	* src/getopt.c: Ditto.
	* src/getopt1.c: Ditto.
	* src/m4.h: Ditto.
	* src/main.c: Ditto.
	* src/stackovf.c: Ditto.

	* config/gmp.m4 (M4_AC_LIB_GMP): Use AC_INCLUDES_DEFAULT:
	ac_default_headers is an autoconf internal variable.
	* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
	* config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.

	* configure.ac (AC_CONFIG_FILES): Add tests/atlocal.
	* tests/Makefile.am (TESTS_ENVIRONMENT): Revert the 2003-08-14
	delta.

2003-08-15  Gary V. Vaughan  <gary@gnu.org>

	* configure.ac (AC_HEADER_STDBOOL, INCLUDE_STDBOOL_H): Check for
	C99 bool.
	* system-h.in (m4_boolean): Removed in favour of using C99 bool if
	possible or faking one with a typedef.  Changed all callers.

2003-08-15  Gary V. Vaughan  <gary@gnu.org>

	Still cleaning up the users' module API, by taking out the stuff
	that isn't used by any existing modules, and moving specialised
	functions out of libm4 and into the module they are used by.

	* m4/m4module.h (m4_skip_space): No need to export this.  Moved...
	* m4/utility.c (m4_skip_space): ...to here the home of its only
	use, made static and renamed to `skip_space'.  Changed all
	callers.
	* m4/m4module.h (m4_expand_ranges): Removed prototype.
	* m4/utility.c (m4_expand_ranges): Moved definition from here...
	* modules/m4.c (m4_expand_ranges): ...to here, and exported using
	ltdl.
	* modules/m4.h (m4_expand_ranges_func): For lt_dlsym import
	casting .
	* modules/gnu.c (builtin_syntax): Import and use in this
	builtin implementation.
	* m4/m4module.h (M4_DEBUG_PRINT1, M4_DEBUG_PRINT2, M4_DEBUG_PRINT3):
	Not used.  Deleted.
	* m4/macro.c (trace_flush): Except here where the macro is now
	manually inlined.
	* m4/m4module.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
	(M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): Only used internally, so
	moved...
	* m4/m4private.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
	(M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): ...to here.

2003-08-14  Gary V. Vaughan  <gary@gnu.org>

	* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use the interrim new
	compiler based AC_CHECK_HEADER that was introduced in
	autoconf-2.56.
	* config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.
	* config/gmp.m4 (AC_LIB_GMP): Ditto. And renamed to M4_AC_LIB_GMP.
	* configure.ac: Use renamed M4_AC_LIB_GMP.

	* config/debug.m4 (M4_AC_CHECK_DEBUGGING): Don't AC_REQUIRE a
	macro that requires arguments! This stops the shell's bad
	substitution error at configure time.

	* tests/Makefile.am (TESTS_ENVIRONMENT): Now we can pass make
	variables to the testsuite shell.  Set the value of USE_GMP so
	that the gmp test will run!
	(check-local, clean-local): Use the TESTS_ENVIRONMENT variable.

2003-08-11  Gary V. Vaughan  <gary@gnu.org>

	Libltdl already has an excellent mechanism for accessing C symbols
	in modules.  Lets use that!  Remove all the exporting cruft and
	just use lt_dlsym in conjunction with a few conventions to
	simplify module writers' jobs.  Also removed the table address
	caching code and otherwise simplified the module loader quite a
	bit.  To access exported symbols in other modules, first the
	exporting module must name the symbols <modname>_LTX_<symname>,
	and the importing module must define a function type called
	<symname>_func.  The importer then adds
	M4_MODULE_IMPORT(<modname>, <symname>) at the top of any function
	that wishes to call out to the exported functions.  Care must be
	taken that <symname> is non-NULL in the importing module incase
	M4_MODULE_IMPORT fails, but otherwise it can be called as if the
	definition was in the importers source.  Study
	`modules/{gnu.c,m4.{c,h}' for a model example.  At the moment,
	m4_module_import will attempt to automatically load a module
	required for symbol access if it is not loaded already.

	* TODO: Removed the items fixed in this delta.
	* m4/ltdl.c (lt_dlhandle_find): New function to find a handle by
	module name.
	* m4/ltdl.h (lt_dlhandle_find): Declare it.
	* m4/module.c (m4_module_unload): Use it.
	* src/freeze.c (reload_frozen_state): Ditto.
	* m4/m4module.h (m4_export): Deleted.  Removed all references.
	(M4_MODULE_IMPORT): New user convenience macro for importing
	arbitrary symbols from other modules.
	* m4/module.c (m4_module_import): New function to service
	M4_MODULE_IMPORT macro.
	(module_data): Removed.  Looking up the tables on demand with
	lt_dlsym, rather than caching their addresses here simplifies the
	code substantially.
	(m4_get_module_builtin_table, m4_get_module_macro_table):
	Removed.  Changed all callers.
	(set_module_macro_table, set_module_builtin_table): Renamed to
	install_macro_table and install_builtin_table respectively, and
	simplified now that the cache is no more.
	* modules/gnu.c (builtin_symbols): Use this new mechanism to
	import m4_dump_symbols from the m4 module.
	(builtin_esyscmd): Likewise for m4_set_sysval and
	m4_sysval_flush.
	* modules/m4.c (m4_export_table): Removed.  Functions are
	addressed with the new mechanism which doesn't need this.
	(m4_set_sysval): New exported accessor function to prevent
	problems with variable access on inferior architectures.
	* modules/m4.h (m4_sysval_flush_func, m4_set_sysval_func)
	(m4_dump_symbols_func): Typedefs required by M4_MODULE_IMPORT so
	that we can have some type safety.
	* modules/modtest.c (export_test): C level exported function for
	testing the new import mechanism.
	* modules/import.c: New file for the import end of the test.
	* modules/Makefile.am (pkglibexec_LTLIBRARIES): Added import.la.
	* tests/modules.at: New test cases for intermodule symbol
	importing.

2003-08-07  Gary V. Vaughan  <gary@gnu.org>

	* m4/m4module.c (m4_string): Moved from here...
	* m4/m4private.c (m4_string): ...to here.

	* m4/utility.c (dumpdef_cmp): Removed stale declaration.

2003-07-29  Gary V. Vaughan  <gary@gnu.org>

	* m4/m4module.h (M4_DEFAULT_NESTING_LIMIT): This value is
	already available to module writers through
	m4_{get,set}_nesting_limit_opt(), so moved from here...
	* m4/m4.c (DEFAULT_NESTING_LIMIT): ...to here and renamed.
	(m4_create): Use it.

2003-07-28  Gary V. Vaughan  <gary@gnu.org>

	Aside from auditing path.c for m4module.h api obfuscation, this
	delta introduces the concept of private struct members in opaque
	data types to GNU m4: See the STYLE file for details.

	* TODO: Remind ourselves that a rewrite of path.c is needed.
	* m4/m4module.h (m4_search_path, struct m4_search_path_info):
	Moved from here...
	* m4/m4private.h (m4__search_path, m4__search_path_info): ...to
	here and renamed.  These type definitions are for internal api use
	only.  Changed all callers.
	* m4/m4module.h (m4_search_path_env_init, m4_search_path_add):
	Moved from here...
	* m4/path.c (search_path_env_init, search_path_add): ...to here
	and renamed.  These calls were never used outside this file.
	Changed all callers.
	(dirpath): Moved functionality of this static declaration...
	* m4/m4private.h (struct m4): ...to this new internal only
	search_path field.  Changed all callers.
	(m4__get_search_path): Added new internal api accessor.
	* m4/path.c (m4_search_path_info_new):  Removed.  Not used.
	(m4_include_init): Removed...
	* m4/m4.c (m4_create): ...because the new m4 field is now
	initialised here.
	(m4_delete): Recycle search_path memory.
	* src/main.c (main): Don't call m4_include_init now that it's
	gone!
	* doc/STYLE: Document convention for private fields in opaque
	ADTs.

2003-07-24  Gary V. Vaughan  <gary@gnu.org>

	Sometimes exporting the address of a symbol from a module isn't
	enough for other modules to call that symbol correctly.  If
	custom data types are used for function parameters, they need to
	be known to the caller.  This change introduces the concept of
	$(prefix)/include/modules/$(modulename).h to declare those
	structures.  Also we move m4_dump_symbols from libm4 to the m4
	module to show this concept in action.

	* m4/m4module.h (m4_dump_symbol_data): Moved from here...
	* modules/m4.h (m4_dump_symbol_data): ...to this new file for
	exporting data structures from modules/m4.c.
	* modules/m4.c, modules/gnu.c: Include it.
	* modules/Makefile.am (pkgmodinc_HEADERS): Install it.
	* m4/m4module.h (m4_dump_symbol_CB, m4_dump_symbols): Removed
	prototypes.
	* m4/utility.c (dumpdef_cmp, m4_dump_symbol_CB, m4_dump_symbols):
	Moved from here...
	* modules/m4.c (dumpdef_cmp_CB, dump_symbol_CB, m4_dump_symbols):
	...to here, with slight renaming.
	(m4_export_table): Prototype and add m4_dump_symbols.
	* m4/symtab.c (m4_is_symbol_value_void): Needed for an external
	definition of m4_dump_symbols.
	* m4/m4module.h (m4_is_symbol_value_void): Prototype it.
	* m4/m4private.h (m4_is_symbol_value_void): Fast macro version.

2003-07-24  Gary V. Vaughan  <gary@gnu.org>

	Create an export table in modules/m4.c in readiness for beefing up
	the module loader to track module exports and imports.

	* m4/m4module.h (m4_debug_flush_files): Removed prototype.
	* m4/debug.c (m4_debug_flush_files): Moved...
	* modules/m4.c (m4_sysval_flush): ...to here and renamed.
	* modules/gnu.c (builtin_esysval): Use it.
	* m4/m4module.h (m4_export): New type for declaring module symbols
	for export.
	* modules/m4.c (m4_export_table): List symbols exported from this
	module for use by other modules.

2003-07-24  Gary V. Vaughan  <gary@gnu.org>

	An experiment: There is loads of code in libm4 which should be in
	the m4 module, but is also used by another module. Just because
	some linkers won't cope with calls across dynamic runtime loaded
	objects I initially left the code in libm4.  It will tidy the
	module api immensely if this code moves to the right place, I just
	need to remember to invent a suitable calling mechanism at some
	point.  For now, only modules that are statically linked and
	preloaded will get this treatment, so the only platforms that will
	break are those that require all symbols to be resolved at link
	time.

	* TODO: Reminder that what I am doing could reduce portability
	unless I do something more robust later.
	* m4/m4module.h (m4_sysval): No longer exported from libm4.
	* m4/utility.c (m4_sysval): No longer declared in libm4.
	* modules/Makefile.am: Reformatting.
	* modules/m4.c (m4_sysval): Declare it at place of use.
	* modules/gnu.c (m4_sysval): Import it for use in esyscmd.

2003-07-23  Gary V. Vaughan  <gary@gnu.org>

	* m4/m4module.h: Reformatting and rearranging lines a bit.
	(m4_obstack): Save typing by typedefing `struct obstack'.  Changed
	all users.
	(m4_call_macro, m4_expand_input): Renamed...
	(m4_macro_call, m4_macro_expand_input): ...to these.  Changed all
	callers.
	(m4_expansion_level, m4_process_macro): Moved...
	* m4/macro.c (expansion_level, process_macro): ...to here, and
	made static.

	* m4/m4module.h (program_name): Not used by modules at all, so
	moved...
	* src/main.c (program_name): ...to here.
	(print_program_name): Renamed...
	(print_program_name_CB): ...to conform to the STYLE guide.

2003-07-23  Gary V. Vaughan  <gary@gnu.org>

	More refactoring of the m4module.h API.  Replace #defines with an
	enum, and move non-public functions out of the public API.

	* m4/debug.c (stdarg.h, varargs.h): Remove variadic header
	inclusion.
	* m4/macro.c (stdarg.h): Add ANSI C variadic header.
	* m4/debug.c (m4_debug, trace): Moved...
	* m4/m4private.h (struct m4): ...to fields of this struct.
	(m4_get_debug_file, m4_get_trace_messages): New fast access macros
	for the new fields.
	* m4/debug.c (m4_debug_init, m4_debug_exit): Removed functions...
	* src/main.c (m4_debug_init, m4_debug_exit): ...invocations...
	* m4/m4.c (m4_create, m4_delete): ...and handled here instead.
	* m4/m4module.h (m4_context_field_table): Add entries for new
	debug_file and trace_messages fields.
	(M4_DEBUG_TRACE_ARGS, M4_DEBUG_TRACE_EXPANSION)
	(M4_DEBUG_TRACE_QUOTE, M4_DEBUG_TRACE_ALL, M4_DEBUG_TRACE_LINE)
	(M4_DEBUG_TRACE_FILE, M4_DEBUG_TRACE_PATH, M4_DEBUG_TRACE_CALL)
	(M4_DEBUG_TRACE_INPUT, M4_DEBUG_TRACE_CALLID)
	(M4_DEBUG_TRACE_VERBOSE): Replaced #defines with an enum.
	(m4_is_debug_bit): New macro to simplfy checks against the debug
	bits above.
	(m4_trace_format, m4_trace_header, m4_trace_flush)
	(m4_trace_prepre, m4_trace_pre, m4_trace_post): Removed
	prototypes.
	* m4/debug.c (m4_trace_format, m4_trace_header, m4_trace_flush)
	(m4_trace_prepre, m4_trace_pre, m4_trace_post): Moved...
	* m4/macro.c (trace_format, trace_header, trace_flush)
	(trace_prepre, trace_pre, trace_post): ...to these newly static
	functions, since they are only ever used from this file.  Changed
	all callers.

2003-07-17  Gary V. Vaughan  <gary@gnu.org>

	Change the macros for checking syntax so that matching against
	multiple possible syntax classes can be done with a single
	comparison some of the time.  The various classes are now bits of
	an int that can be checked with bitwise logic operators.

	* m4/m4module.h (M4_SYNTAX_IGNORE, M4_SYNTAX_OTHER)
	(M4_SYNTAX_SPACE, M4_SYNTAX_OPEN, M4_SYNTAX_CLOSE, M4_SYNTAX_COMMA)
	(M4_SYNTAX_DOLLAR, M4_SYNTAX_ACTIVE, M4_SYNTAX_ESCAPE)
	(M4_SYNTAX_ASSIGN, M4_SYNTAX_ALPHA, M4_SYNTAX_NUM)
	(M4_SYNTAX_LQUOTE, M4_SYNTAX_RQUOTE, M4_SYNTAX_BCOMM)
	(M4_SYNTAX_ECOMM): Replaced #defines with an enum.
	(M4_SYNTAX_ALNUM): Removed.  Changed all callers.
	(M4_IS_IGNORE, M4_IS_OTHER, M4_IS_SPACE, M4_IS_OPEN, M4_IS_CLOSE)
	(M4_IS_COMMA, M4_IS_DOLLAR, M4_IS_ACTIVE, M4_IS_ESCAPE)
	(M4_IS_ASSIGN, M4_IS_ALPHA, M4_IS_NUM, M4_IS_LQUOTE, M4_IS_RQUOTE)
	(M4_IS_BCOMM, M4_IS_ECOMM, M4__IS_STRING, M4_IS_IDENT): Removed.
	Replace all calls with invocations of these...
	(m4_is_syntax, m4_has_syntax): ...New macros.
	* src/freeze.c (produce_syntax_dump): Remove mask argument, which
	is no longer required with new macros.  Changed all callers.

2003-07-15  Gary V. Vaughan  <gary@gnu.org>

	* m4/input.c (CHAR_EOF, CHAR_BUILTIN, CHAR_RETRY): These token
	values are returned as part of the internal interface, so they
	need to be moved...
	* m4/private.h: ...to here.
	* m4/macro.c (expand_token): Check for out of range
	m4_peek_input() results before looking up in the syntax table.
	(collect_arguments): Ditto.

	* NEWS: Note `$' syntax class.

2003-07-08  Paul Eggert  <eggert@twinsun.com> and
	    Gary V. Vaughan  <gary@gnu.org>

	Conform to POSIX if the POSIXLY_CORRECT environment is set.
	--traditional `define' now smashes all the definitions.

	* NEWS: Explain this.
	* doc/m4.texinfo (Defn): `defn' takes any number of arguments.
	(Extensions): Explain that extensions that are incompatible with
	POSIX are disabled if POSIXLY_CORRECT is set.
	(Incompatibilities): Remove.
	(Define, Other Incompat): Explain difference
	between GNU and POSIX behavior of define, pushdef, popdef.
	* m4/m4.c (m4_get_posixly_correct_opt): New undef.
	* m4/m4module.h (m4_context_opt_bit_table): Add POSIXLY_CORRECT entry.
	* m4/m4private.h (M4_OPT_POSIXLY_CORRECT_BIT): New macro.
	(m4_get_posixly_correct_opt): New macro.
	* m4/m4macro.c (m4_process_macro): Disable $10, $abc etc. if
	POSIXLY_CORRECT.
	* modules/m4.c (builtin_functions): defn now takes any number of args.
	(builtin_define): Smash all the definitions if
	POSIXLY_CORRECT.
	(builtin_defn)): Allow any number of arguments.
	(builtin_undivert): Do not allow nonnumeric arguments
	if POSIXLY_CORRECT.
	* src/main.c (main): Set posixly-correct behavior if either
	POSIXLY_CORRECT is set, or if -G is given.
	* tests/builtins.at: New test for smashed definitions.

2003-06-27  Gary V. Vaughan  <gary@gnu.org>

	* doc/m4.texinfo (Changesyntax): Document Dollar syntax class.
	* m4/m4module.h (M4__SYNTAX_STRING): New syntax class. Be careful
	not to slow the parser down.
	(M4__IS_STRING): New macro to test string syntax class membership.
	* m4/syntax.c: Adjust docucomment.
	(m4_syntax_create): Add a default M4_SYNTAX_DOLLAR element.
	(m4_syntax_code): Translate `$' -> M4_SYNTAX_DOLLAR.
	* m4/input.c (init_builtin_token): Comment typo.
	(m4__next_token): Comment typo.
	Accept M4_SYNTAX_DOLLAR items into M4_TOKEN_STRING type tokens
	by using the new M4__IS_STRING macro.
	* m4/macro.c (m4_process_macro): Use M4_IS_DOLLAR to test for
	variable references in macro expansions.

	* doc/m4.texinfo (Eregexp and Regexp): Typo.
	(Epatsubst and Patsubst): Typo.
	(Eval): Typo.

2003-06-26  Gary V. Vaughan  <gary@gnu.org>

	Move the global variables that pertain to syntax to a new `struct
	m4_syntax_table', and then add one of these to `struct m4'.  The
	ripple effect through the code to both change formerly global
	references, and make sure a suitable context is available in
	lexical scope is disproportionately large compared to the size of
	the change proper.  This change is a large part of decoupling
	syntax.c from the rest of the code that uses it.

	* m4/m4private.h (struct m4): Add a syntax field.
	* m4/m4.c (m4_create): Initialise it,
	(m4_delete): Recycle it.
	(m4_get_symtab): Remove hand coded version...
	(m4_get_symbol_table): ...and generate this with cpp.  Changed all
	callers.
	* m4/m4module.h (m4_context_field_table): Add an extra field so we
	can generate m4_get_symbol_table.  Add a new row for
	m4_get_syntax_table.
	(M4SYNTAX): Syntactic sugar for module writers.
	(m4_symtab): Renamed to m4_symbol_table.  Changed all callers.
	(m4_syntax_table): New home for syntax related formerly global
	variables.
	* m4/m4private.h (struct m4_syntax_table): Define it.
	* m4/input.c (m4_input_init): Initialisation of these formerly
	global variables moved...
	* m4/syntax.c (m4_syntax_create): ...to here.
	* m4/input.c (m4_input_exit): And similarly, recycling of the
	memory used by those values moved...
	* m4/syntax.c (m4_syntax_delete): ...to here.
	* m4/m4module.h (DEF_LQUOTE, DEF_RQUOTE, DEF_BCOMM, DEF_ECOMM):
	Moved to m4/m4private.h.
	* m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
	(m4_get_syntax_bcomm, m4_get_syntax_ecomm)
	(m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
	(m4_is_syntax_macro_escaped): New accessors for m4_syntax_table
	objects.  Changed all callers that used to directly access the
	global equivalents.
	(m4__single_quotes, m4__single_comments, m4__use_macro_escape):
	Removed and incorporated into m4_syntax_table structure.
	* m4/utility.c (lquote, rquote, bcomm, ecomm): Ditto.
	* m4/syntax.c (m4_set_syntax): Now returns an error status,
	instead of requiring a `struct m4' to generate its own errors.
	Changed all callers.
	* src/main.c (main): Now that the syntax table is initialised as
	part of m4_create, we have to manually wipe the syntax entries if
	we are about to read a frozen file.

2003-06-26  Gary V. Vaughan  <gary@gnu.org>

	* doc/STYLE: Added notes on callback naming schemes.

	* m4/module.c (m4_set_module_macro_table)
	(m4_set_module_builtin_table): Declarations weren't changed when
	definitions were renamed on 2003-06-19.

	* m4/hash.c (m4_hash_resize): ifdefed out.  This function is
	neither used nor particularly appropriate since it exposes the
	internal workings of the hash module.  I haven't yet decided
	whether to remove it entirely.

2003-06-20  Gary V. Vaughan  <gary@gnu.org>

	Two related changes, and a huge knockon effect throughout the
	source: Moved the option variables out of global space and into
	`struct m4'; made `m4_symtab' a real datatype, so that its api
	is not marred passing `struct m4' around just so it can decide
	whether to keep traced symbol names or not.  Added setters and
	getters for the formerly global option variables, and obviously
	changed a vast number of functions to take a `struct m4' and use
	the getter funcs to find option values.

	* m4/utility.c (interactive, sync_output, debug_level)
	(no_gnu_extensions, prefix_all_builtins, suppress_warnings)
	(max_debug_argument_length, warning_status, nesting_limit)
	(discard_comments): Removed.
	* m4/m4module (warning_status, no_gnu_extensions, nesting_limit)
	(debug_level, max_debug_argument_length, prefix_all_builtins)
	(suppress_warnings, discard_comments, interactive, sync_output):
	Removed from here...
	* m4/m4private.h (struct m4): ...and equivalent fields added to
	this structure.
	(m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
	(m4_get_nesting_limit_opt, m4_get_debug_level_opt)
	(m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
	(m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
	(m4_get_interactive_opt, m4_get_sync_output_opt): Fast access
	macros for the new fields.
	* m4/m4module.h (m4_context_field_table)
	(m4_context_opt_bit_table): Helper macros used to generate
	prototypes, setters and getters for new option fields
	consistently.
	* m4/m4.c (m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
	(m4_get_nesting_limit_opt, m4_get_debug_level_opt)
	(m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
	(m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
	(m4_get_interactive_opt, m4_get_sync_output_opt)
	(m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
	(m4_set_nesting_limit_opt, m4_set_debug_level_opt)
	(m4_set_max_debug_arg_length_opt, m4_set_prefix_builtins_opt)
	(m4_set_suppress_warnings_opt, m4_set_discard_comments_opt)
	(m4_set_interactive_opt, m4_set_sync_output_opt): Addressable
	setter and getter functions generated by cpp from
	m4_context_field_table and m4_context_opt_bit_table, exported as
	part of the module api.  Changed all callers.
	* m4/symtab (struct m4_symtab): Used as the concrete type for
	m4_symtab now.
	(m4_symtab_create): Allocate and initialise a new struct.
	(m4_symtab_apply): New function that works like m4_hash_apply, but
	with different callbacks specific to symbol tables.  Changed all
	callers.
	(symbol_destroy, arg_destroy, arg_copy): Renamed
	symbol_destroy_CB, arg_destroy_CB, arg_copy_CB to remind me that
	they have unused parameters for a reason!
	(dump_symbol_CB): New callback to dump the contents of a single
	symbol.
	(symtob_dump): Rewritten in terms of dump_symbol_CB.
	* m4/utility.c (m4_dump_symbol): Renamed to m4_dump_symbol_CB.
	Changed all callers.
	* m4/m4.c (m4_create): By default point the `nuke_trace_bit' field
	of the contained `m4_symtab' at the `no_gnu_extensions' field.
	Although I'm not convinced these semantics are correct, they are
	at least consistent with how things were before this delta.  Also
	set the default nesting limit to M4_DEFAULT_NESTING_LIMIT.

2003-06-19  Gary V. Vaughan  <gary@gnu.org>

	Tie down the interface to libm4 some more.  Make more structures
	opaque to modules by moving them to m4private.h, and writing
	setters and getters.  To win back the speed penalty for doing this
	also wrote macroized versions that do know about structure layout
	in m4private.h and #include that file into modules when NDEBUG is
	defined at compile time.  There are still some accessor macros in
	m4private.h that need to go, but that is not necessary to clean
	the module api up.

	* m4/m4module.h (m4_symbol_type): Moved...
	* m4/m4private.h (m4__symbol_type): ...to here.
	* m4/symtab.c (m4_get_symbol_value, m4_get_symbol_traced)
	(m4_set_symbol_traced, m4_set_symbol_name_traced)
	(m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
	(m4_get_symbol_func, m4_symbol_value_create)
	(m4_symbol_value_delete, m4_set_symbol_value_text)
	(m4_set_symbol_value_func): New exported api to symbols.
	(m4_get_symbol_value_type): Replaced by m4_is_symbol_value_text
	and m4_is_symbol_value_func.
	* m4/m4module.h: Prototype these guys.
	* m4/module.c (m4_set_module_macro_table)
	(m4_set_module_builtin_table): Make these static, there is no
	reason to pollute the api with them.
	* m4/m4private.h: Reformatting.
	(m4_get_symtab): Only define when NDEBUG is defined.
	(m4_get_symbol_value, m4_get_symbol_traced)
	(m4_set_symbol_traced, m4_set_symbol_name_traced)
	(m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
	(m4_get_symbol_func, m4_symbol_value_create)
	(m4_symbol_value_delete, m4_set_symbol_value_text)
	(m4_set_symbol_value_func): Macro implementations of the new
	functions when NDEBUG is defined.
	(SYMBOL_TRACED, SYMBOL_VALUE, SYMBOL_TYPE, SYMBOL_TEXT)
	(SYMBOL_FUNC, VALUE_TYPE, VALUE_TEXT, VALUE_FUNC): Removed.
	Superceded by the above.  All callers changed.
	(M4ARG): Removed.  This is no longer different to the
	m4/m4module.h definition.
	* modules/gnu.c, modules/m4.c: Only include m4private.h when
	NDEBUG is defined.  That way we exercise the same (albeit slower)
	api that external modules must use.

2003-06-18  Gary V. Vaughan  <gary@gnu.org>

	Renamed some of the types and their accessors to make more sense.
	Now we have a SYMTAB in which we store SYMBOLs, and each SYMBOL
	has a stack of SYMBOL_VALUEs.

	* m4/m4module.h (m4_token, m4_get_token_type, m4_get_token_text)
	(m4_get_token_func, m4_token_copy): Renamed to m4_symbol_value,
	m4_get_symbol_value_type,  m4_get_symbol_value_text,
	m4_get_symbol_value_func and m4_symbol_value_copy respectively.
	Changed all callers.
	(m4_symbol_type): s/M4_TOKEN_/M4_SYMBOL_/
	(m4_get_token_type): Renamed
	* m4/input.c (m4_next_token): Renamed to m4__next_token, and moved
	to the internal api.
	* m4/m4private.h: s/TOKEN_ARG_/SYMBOL_ARG_/
	s/TOKEN_/VALUE_/
	(m4__symtab_init, m4__symtab_exit): Removed prototypes.
	(m4_token_arg): Renamed to m4_symbol_arg. Changed all callers.
	(m4__token_type): Moved here from m4module.h.
	(m4__next_token): Renamed from m4_next_token.
	* m4/symtab.c: Removed some of the parameterised macro support
	functions for modularisation later.
	(m4_token_copy): Renamed to m4_symbol_value_copy, and use new
	m4_hash_dup to perform a true deep copy of the SRC.
	(arg_copy): Callback for m4_symbol_value_copy.
	* utility.c (m4_token_get_type, m4_token_text, m4_token_func):
	Renamed to m4_get_symbol_value_type, m4_get_symbol_value_text and
	m4_get_symbol_value_func.  Changed all callers.

2003-06-18  Gary V. Vaughan  <gary@gnu.org>

	Tidy up style of hash.[ch] in accordance with doc/STYLE.

	* m4/hash.c: Internal symbol renaming and formatting.
	(m4_hash_dup): New function to facilitate deep copies of hash
	tables.
	(m4_hash_apply_func): Returns a void* now, which is a richer type
	for returning exceptions (NULL means keep going).
	(m4_hash_apply): Ditto.
	* m4/hash.h: Declare exported symbols with an explicit extern.
	Reformated.

2003-06-17  Gary V. Vaughan  <gary@gnu.org>

	Still refactoring furiously.  This delta represents a change in
	semantics to symtab.c.  Instead of building temporary m4_tokens
	in the caller, and copying fields in the methods, we now create
	the actual m4_token for hashing in the caller so the methods just
	slot them in directly.  Also, this means that we don't lookup a
	symbol and get back an allocated but VOID token to copy fields
	into, we create the token we want to push and pass that to
	m4_symbol_define or m4_symbol_pushdef.  And that's it.  There are
	a few other small changes to stop knowledge of the implementation
	of symtab.c leaking out into other files.

	* m4/macro.c (expand_argument): Comment typo corrected.
	* m4/symtab.c (symtab_fetch): New function to fetch the address of
	an interned symbol.
	(m4_symbol_pushdef): Take an extra value parameter and use this
	directly as the new top of the value stack.  All callers changed
	to build a token and pass responsibility for memory in, rather
	than copying as we used to.
	(m4_symbol_define): Also use the new value parameter directly as a
	replacement for the top of the value stack.  All callers changed
	to build a token as above.
	(m4_set_symbol_traced): New function to set the traced bit on the
	named symbol, creating it if necessary.
	(symbol_popval): The guts of the old m4_symbol_popdef.
	(m4_symbol_popdef): Use it.
	* m4/builtin.c (m4_symbol_set_token): Removed,
	(m4__symbol_set_builtin, m4__symbol_set_macro): Removed and
	replaced...
	* m4/module.c (m4_set_module_builtin_table)
	(m4_set_module_macro_table): ...with these more orthogonal
	functions.
	* m4/m4module.h (m4_macro_pushdef, m4_macro_define)
	(m4_builtin_pushdef, m4_builtin_define): Removed.  No longer
	required.
	* m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE)
	(m4_arg_signature_parse): Moved...
	* m4/symtab.c: ...to here.
	* m4/input.c (m4_token_copy): Arghh... I'm amazed this didn't
	screw something up. Moved...
	* m4/symtab.c (m4_token_copy): ...to here, and fixed so that it
	actually does a proper deep copy of source to dest.

2003-06-16  Gary V. Vaughan  <gary@gnu.org>

	Further refactoring to stabilise the module API.  Renaming some
	functions for orthogonality, and judicious definition migration to
	move things out of the set of exported symbols.

	* doc/STYLE: New file.  Notes on coding style.
	* m4/m4module.c: Updated bitrotted docucomment at the top of the
	file.
	(m4_module_name, m4_module_builtins, m4_module_macros): Renamed to
	m4_get_module_name, m4_get_module_builtin_table,
	m4_get_module_macro_table which are verb phrases.  Changed all
	callers.
	* m4/builtin.c (m4_builtin_table_install, m4_macro_table_install):
	Moved to...
	* m4/module.c (m4_set_module_builtin_table)
	(m4_set_module_macro_table): ...here, and renamed. Changed all
	callers.
	* m4/m4module.c (m4_module_data): This...
	* m4/m4private.c (struct m4_module_data): ...and this...
	* m4/module.c (module_data) ...consolidated here and no longer
	exported.  Changed all callers.

2003-06-16  Gary V. Vaughan  <gary@gnu.org>

	Begin work on lifting the curse of the global variables.  To start
	with create a `struct m4' context container, and replace
	`m4__symtab' with `context->symtab' throughout.  This means
	initialising a context container in main, and adjusting many
	functions between main and the module entry points so that the
	container gets passed through.  It would have been nice to
	defer this until after 1.5, but it has a major effect on the
	user's module writing ABI, so it needs to be addressed now - at
	least in the areas that impact the ABI.  An interrelated change
	in the symtab API removes the dependency on a global symbol table,
	and instead focuses on a passed table (from the context
	container).

	* TODO: Reminders for finishing context functionality.
	* m4/Makefile.am (libm4_la_SOURCES): Add m4.c.
	* m4/m4.c: New file. Manage new struct m4 objects to eliminate
	global variables and eventually allow m4 to be reentrant.
	* m4/m4private.h (m4): Define the new structure here...
	(M4_SYMTAB, m4_get_symtab): ...so we can have fast accessors that
	don't carry the overhead of a function call.
	* m4/m4module.h: Prototype extern functions from m4/m4.c.
	(m4): Declare type for new struct m4 objects.
	(M4SYMTAB): User macro to ease finding the symbol table for the
	current context for module developers.
	(m4_symbol_token): Renamed to m4_symbol_set_token which contains a
	verb.
	(M4_BUILTIN, m4_builtin_func, M4_BUILTIN_HANDLER)
	(m4_builtin_define, m4_builtin_pushdef, m4_builtin_table_install)
	(m4_call_macro, m4_dump_symbols, m4_expand_input)
	(M4_FINISH_HANDLER, M4_INIT_HANDLE, m4_macro_define)
	(m4_macro_pushdef, m4_macro_table_install, m4_module_load)
	(m4_module_unload, m4_process_macro, m4_symbol_set_token): Add an
	m4* context parameter. Changed definitions and all callers.
	(m4_symtab): Alias for m4_hash to decouple the
	m4_symtab api from m4_hash.
	(m4_symtab_apply, m4_symtab_apply_func): Use m4_symtab instead of
	m4_hash.
	(m4_symtab_create): New function to return an initialised
	m4_symtab.
	(m4_symtab_delete): New function to delete an m4_symtab's memory.
	(m4_symbol_define, m4_symbol_delete, m4_symbol_lookup)
	(m4_symbol_popdef, m4_symbol_pushdef): Add an m4_symtab parameter
	instead of simply using the global m4__symtab.  Changed
	definitions and all callers.
	* m4/m4private.h (m4__symtab_remove_module_references): Ditto.
	* m4/symtab.c (m4__symtab_init, m4__symtab_exit): Removed.
	* src/main.c (main): Create a context and use that instead of the
	former global m4__symtab.

2003-06-13  Gary V. Vaughan  <gary@gnu.org>

	* m4/hash.c (m4_hash_apply): Pass an initial hash table parameter
	to the callback.  Callbacks should not need to hardcode the
	hashtable they are working from, nor should we have to waste the
	userdata parameter to pass the table in.
	* m4/hash.h (m4_hash_apply_func): Require the initial table
	parameter.
	* m4/symtab.c (symtab_destroy): Use the passed table instead
	of hardcoding m4__symtab.
	(m4_symbol_popdef): Don't use the userdata parameter to pass the
	table to arg_destroy.
	(arg_destroy): Use the hash parameter, ignore userdata.
	* modules/m4.c (set_trace): Make it fit the m4_hash_apply_func
	prototype.
	(traceon, traceoff): Call set_trace with the extra initial
	parameter.

2003-06-13  Gary V. Vaughan  <gary@gnu.org>

	More refactoring to stabilise the module api, this time for
	symtab.c.  Additionally, start to pay attention to function names
	that don't contain a verb like they should.

	* m4/m4module.h (m4_symtab_apply): Reintroduced this function as a
	wrapper for m4_hash_apply to decouple the symtab module from the
	hash module.
	(m4_symbol_builtin, m4_symbol_macro): Renamed to
	m4__symbol_set_builtin and m4__symbol_set_macro.  Changed all
	callers.
	(m4_symbol_delete): Create a macro version to save a function
	call.
	(m4_token_t, m4_data_t): These violate the POSIX reserved
	namespace.  Renamed to m4_token_type and m4_symbol_type. Changed
	all callers.
	(m4_token_type): Renamed to m4_token_get_type.
	(m4_symtab, m4_symtab_init, m4_symtab_remove_module_references)
	(m4_symtab_exit): Removed from the exported module
	api...
	* m4/m4private.h (m4__symtab, m4__symtab_init)
	(m4__symtab_remove_module_references, m4__symtab_exit): ...and
	renamed and added to the internal api. Changed all callers.
	(m4_symtab_apply): A faster macro version of the function for
	users of the internal api.
	* m4/symtab.c (m4_symbol_destroy, m4_arg_destroy): Renamed to
	symbol_destroy and arg_destroy.
	(symtab_debug): Added a prototype.
	(m4_symtab_apply, m4_symbol_delete): Moved to the end of the file
	so that callers in this file get the faster macro versions from
	m4/m4private.h.

2003-06-12  Gary V. Vaughan  <gary@gnu.org>

	Refactoring modules to rationalise the API into an external
	documented (eventually!) API for use by modules in the `m4_'
	namespace declared in m4/m4module.h, an internal API between the
	source files we ship (including our shipped modules) in the `m4__'
	namespace declared in m4/m4private.h and making the rest as
	cohesive as possible with liberal use of the `static' keyword.
	This change represents an audit to m4/module.c along these
	guidelines.

	* m4/m4module.h (m4_module_close_all, m4_module_find_by_builtin):
	Removed.  No longer used.
	(m4_module_close): Removed prototypes.
	(m4_module_init, m4_module_open, m4_module_unload_all): Removed
	from the exported module api...
	* m4/m4private.h (m4__module_init, m4__module_open)
	(m4__module_exit): ...and renamed and added to the internal api.
	Changed all callers.
	(BUILTIN_SYMBOL, MACRO_SYMBOL, INIT_SYMBOL, FINISH_SYMBOL):
	Centralised definitions after renaming...
	* m4/module.c (M4_BUILTIN_SYMBOL, M4_MACRO_SYMBOL, M4_INIT_SYMBOL)
	(M4_FINISH_SYMBOL): ...and removing from here.
	(m4_module_dlerror, m4_module_remove, m4_module_close)
	(m4_caller_id): Not exported at all, so renamed to module_dlerror,
	module_remove, module_close and caller_id.
	(MODULE_SELF_NAME): New macro to make reporting self errors
	easier.
	(m4_module_load, module_close, module_remove): Use it.
	* m4/m4private.h (USER_MODULE_PATH_ENV): Macro to hold "M4MODPATH"
	name.
	* src/main.c (main): Use it.

2003-06-12  Gary V. Vaughan  <gary@gnu.org>

	* README: Remove references to --enable-changeword, which has been
	removed from the code.

2003-06-11  Gary V. Vaughan  <gary@gnu.org>

	Getting rid of the annoying bug with configure --enable-debug,
	which spewed -e: command not found errors.  This was an interaction
	between libtool-1.5's LT_AC_COMPILER_OPTION, and config/debug.m4.
	You'll need to re-bootstrap the m4 tree with cvs libtool (HEAD or
	branch-1-5) to get the full fix.

	* config/debug.m4 (M4_AC_CHECK_DEBUGGING): Require libtools version
	of AC_LIBTOOL_COMPILER_OPTION (which now requires LT_AC_PROG_SED),
	and then use the probed value of $SED.
	(AC_LIBTOOL_COMPILER_OPTION): Removed. Don't conditionally define
	this, it messes up the AC_REQUIRE stack.

2003-06-10  Gary V. Vaughan  <gary@gnu.org>

	* m4/symtab.c (m4_symbol_popdef): Need to pass the hash address to
	the destroy callback.
	(m4_arg_destroy): Use the hash address to free the hash node key
	field.

2003-06-06  Gary V. Vaughan  <gary@gnu.org>

	First cut at formal parameters in macros.

	* configure.ac (AC_REPLACE_FUNCS): Add xstrzdup.
	* m4/xstrzdup.c: New file.
	* m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE): Start size for
	associative array of parameter names to details.
	(m4_symbol_token): Capture macro names with parameter lists.
	(m4_arg_signature_parse): And build an associative array to hang
	from the symbol structure to map names to details.
	* m4/hash.c (m4_hash_new): Break the m4_hash_new followed by
	m4_hash_resize idiom.  Now that we potentially add a little hash
	table to many of the entries in the symbol table, added an extra
	arg to set the initial size.  Changed all callers.
	(m4_hash_apply): New function that is basically a generalised
	version of...
	* m4/symtab.c (m4_symbol_apply): ...this.  Now deleted.  Adjusted
	all callers to call m4_hash_apply instead.
	(m4_arg_destroy): Recycle memory used by an m4_token_arg.
	(m4_symbol_popdef): Use m4_arg_destroy to help recycle the
	m4_arg_signature association that might be attached to the symbol,
	* m4/hash.h (m4_hash_apply_func): Replacement type for...
	* m4/m4module.h (m4_symtab_apply_func): ...this.  Now deleted.
	(M4_SYNTAX_ASSIGN): Placeholder for assigning default values in
	parameter lists.
	(M4_IS_ASSIGN): Detect characters with M4_SYNTAX_ASSIGN syntax.
	(M4_IS_IDENT): Detect characters that can be safely used in
	parameter names.
	* m4/syntax.c (m4_syntax_init): Add an M4_SYNTAX_ASSIGN character.
	* m4/macro.c: Corrected grammar in some comments.  Use `token'
	rather than `td' for m4_token variables.
	(m4_process_macro): If we find a dollar followed by some
	M4_IS_IDENT characters, replace that with the contents of the argv
	entry with offset stored in the m4_token_arg associated with the
	collected identifier.

2003-06-05  Gary V. Vaughan  <gary@gnu.org>

	Begin preparations for supporting formal parameters in m4 macros.

	* m4/m4private.h (struct m4_token_arg): Placeholder for holding
	the details of a formal parameter.
	(m4_token): Add an arg_signature member to hold a hash table for
	looking up formal parameters.
	* m4/input.c: Update more bitrotted comments.
	(m4_push_builtin): Initialise arg_signature member.
	(init_builtin_token): Copy arg_signature member.
	* m4/m4module.h (m4_builtin_pushdef, m4_builtin_define)
	(m4_macro_pushdef, m4_macro_define): Rewritten as macros to
	replace...
	* m4/builtin.c (m4_builtin_pushdef, m4_builtin_define)
	(m4_macro_pushdef, m4_macro_define): ...these, And...
	(m4_symbol_token): ...wrapped around this new function, which
	vastly simplifies the arguments required by the functions it
	replaces.
	Changed all callers.

2003-06-05  Gary V. Vaughan  <gary@gnu.org>

	* m4/macro.c: Format changes.

2003-06-04  Gary V. Vaughan  <gary@gnu.org>

	* m4/input.c: Updated various bitrotted comments.
	(m4_push_builtin): Just pass the whole m4_token, rather than
	extracting all the fields in the caller.  This also allows us to
	check the token type for consistency.
	(macro_funcs, macro_peek, macro_read, m4_push_macro, CHAR_MACRO):
	Renamed to builtin_funcs, builtin_peek, builtin_read,
	m4_push_builtin and CHAR_BUILTIN for consistency with the rest of
	the code.  Changed all callers.
	(struct input_block): Similarly renamed u_m member to u_b, and
	changed all callers.
	(m4_next_token): Use bzero to initialise the data fields.
	* m4/m4module (m4_push_macro): Renamed to m4_push_builtin.

2003-05-29  Gary V. Vaughan  <gary@gnu.org>

	These changes were necessary to get m4 to build on my iBook
	running "powerpc-apple-darwin6.6" using Apples build of gcc "gcc
	(GCC) 3.1 20020420 (prerelease)":

	* src/main.c: Don't include dlfcn.h, ltdl.h handles correct
	inclusion of module loader headers.
	* modules/Makefile.am: Use AM_LDFLAGS, not LDFLAGS.
	* m4/Makefile.am: Ditto.
	(libm4_la_LIBADD): Added $(LTLIBINTL).
	* m4/utility.c (program_name): Removed declaration in favour of
	the one already in error.c!
	* m4/m4module.h (program_name): Define to program_invocation_name
	when using GNU C library. Use an explicit extern declaration.
	(interactive, sync_output, debug_level, hash_table_size)
	(no_gnu_extensions, prefix_all_builtins, max_debug_argument_length)
	(suppress_warnings, warning_status, nesting_limit, discard_comments)
	(lquote, rquote, bcomm, ecomm, m4_bad_argc, m4_skip_space)
	(m4_numeric_arg, m4_shipout_int, m4_shipout_string, m4_dump_args)
	(m4_debug, m4_debug_init, m4_debug_exit, m4_debug_decode)
	(m4_debug_flush_files, m4_debug_set_output, m4_debug_message_prefix)
	(m4_trace_prepre, m4_trace_pre, m4_trace_post, m4_sysval)
	(m4_expansion_level, m4_expand_ranges, m4_expand_input)
	(m4_call_macro, m4_process_macro, m4_syntax_table, m4_current_file)
	(m4_current_line, m4_current_diversion, m4_output_current_line):
	Don't rely on default, use an explicit extern.
	* m4/error.h (error, error_at_line, error_print_progname)
	(error_message_count, error_one_per_line): Ditto.
	* m4/ltdl.c: Update from CVS libtool.
	* m4/ltdl.h: Ditto.
	* commit: Update from CVS cvs-utils.

2002-11-04  gettextize  <bug-gnu-gettext@gnu.org>

	* po/Makefile.in.in: Upgrade to gettext-0.11.5.
	* po/boldquot.sed: New file, from gettext-0.11.5.
	* po/en@boldquot.header: New file, from gettext-0.11.5.
	* po/en@quot.header: New file, from gettext-0.11.5.
	* po/insert-header.sin: New file, from gettext-0.11.5.
	* po/quot.sed: New file, from gettext-0.11.5.
	* po/remove-potcdate.sin: New file, from gettext-0.11.5.
	* po/Rules-quot: New file, from gettext-0.11.5.

2002-11-04  Akim Demaille  <akim@epita.fr>

	* doc/m4.texinfo (Esyscmd): Don't grep, use something easier:
	running m4 itself.
	* tests/others.at (iso8859): Use abs_srcdir, not srcdir.

2002-11-04  Akim Demaille  <akim@epita.fr>

	* config/Makefile.am (ACLOCAL_MACROS): Ship the Gettext macros.

2002-11-04  Akim Demaille  <akim@epita.fr>

	* configure.ac: Automake 1.7.1, Autoconf 2.54, Gettext 0.11.5,
	used as `external', and Libtool 1.4.3.
	(LINGUAS): Remove.
	(LTLIBOBJS): Don't play with it.
	* intl/: Remove.
	* Makefile.am (SUBDIRS): Remove intl.
	(ACLOCAL_AMFLAGS): Add -I config.
	(EXTRA_DIST): Add config/config.rpath.
	* po/LINGUAS: New.
	* po/Makevars: New.
	* modules/perl.c (M4INIT_HANDLER): Don't prototype xs_init.

2002-05-29  Gary V. Vaughan  <gary@gnu.org>

	Preparations for refactoring syntax tables to allow reverse
	lookups [fetch me a M4_SYNTAX_OPEN], without compromising the
	speed of normal lookups in an array of unsigned short.

	* m4/input.c (single_quotes, single_comments, use_macro_escape):
	Moved from here...
	* m4/m4private.h (m4__single_quotes, m4__single_comments,
	m4__use_macro_escape): ...to here, and renamed.  The `m4__' prefix
	is for internal symbols which unavoidably pollute the global
	namespace, but are not published APIs.
	Adjusted all callers.
	* m4/input.c (m4_syntax_init, m4_syntax_code, m4_set_quotes,
	m4_set_comment, m4_set_syntax, set_syntax_internal,
	unset_syntax_attribute): Moved from this file...
	* m4/syntax.c: New. ...to this file.
	Also added an m4_syntax_exit stub for orthogonality.
	* src/main.c (main): Use it.
	* m4/Makefile.am (libm4_la_SOURCES): Add syntax.c.
	* m4/m4module.h: Reformatting.  New prototypes.

2002-05-29  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap (aclocal_apiversion): The aclocal apiversion is
	distinct from the automake release number (in that the apiversion
	apparently has no micro-version-component).
	(aclocal_apilibdir): Use it.

2002-05-28  Gary V. Vaughan  <gary@gnu.org>

	* m4/hash.c (m4_hash_resize): New function.
	* m4/hash.h: Add prototype.
	* m4/symtab.c (m4_symtab_init):  Use it.  This could do with some
	benchmarking to find a good value for, say, autoconf.  This is
	already a little quicker than before for me.

	* m4/symtab.c (m4_symtab_hash, m4_symtab_cmp): Moved from here...
	* m4/hash.c (m4_hash_string_hash, m4_hash_string_cmp): .. to here,
	and reenamed.
	* m4/hash.h: Adjust prototypes.

2002-01-22  Akim Demaille  <akim@epita.fr>

	* bootstrap (aclocal_apilibdir): New, to cope with Automake's new
	APIVERSION scheme.
	* tests/Makefile.am (package.m4): New.
	* tests/atlocal.in: Adjust to CVS Autotest.
	* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use AC_LIBOBJ.
	* configure.ac: LIBOBJ is a forbidden string.
	Simplify AM_INIT_AUTOMAKE invocation.
	* config/Makefile.am (ACLOCAL_MACROS): Add amversion.m4 and
	options.m4.

2002-01-21  gettextize  <bug-gnu-utils@gnu.org>

	* po/Makefile.in.in: Upgrade to gettext-0.10.40.

2001-10-19  Akim Demaille  <akim@epita.fr>

	* m4/module.c, m4/output.c, src/main.c: Normalize error messages.

2001-10-19  Akim Demaille  <akim@epita.fr>

	* m4/input.c (m4_next_token): Display where was opened what is
	not closed.

2001-10-19  Akim Demaille  <akim@epita.fr>

	* m4/macro.c (expand_argument): Display where was opened what is
	not closed.

2001-10-18  Akim Demaille  <akim@epita.fr>

	* m4/input.c, modules/m4.c: Formatting changes.

2001-10-17  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap: s/configure.in/configure.ac/

2001-10-16  Gary V. Vaughan  <gary@gnu.org>

	* m4/symtab.c (m4_symbol_destroy): This function calls
	m4_symbol_popdef, which recycles a symbols memory when the last
	definition is popped.  Since we were passing the address of the
	symbol name found in the symbol table, and it was being removed
	partway through m4_symbol_destroy() we were referencing freed
	memory for the balance of the function.  Now we take a copy of the
	symbol name tring and use that as a key into the symbol
	table... that way if the original symbol name is freed, the copy
	is still valid.

2001-10-13  Akim Demaille  <akim@epita.fr>

	* m4/ltdl.c: Update.

2001-10-13  Akim Demaille  <akim@epita.fr>

	* src/main.c, src/freeze.c, m4/debug.c, m4/input.c, m4/macro.c:
	Don't gettextize internal error messages.

2001-10-13  Akim Demaille  <akim@epita.fr>

	* tests/macros.at (Arity and defn): New failing test.
	(Arity, defn, and freeze): New.

	Fix `Arity and defn'.

	* m4/input.c (m4_push_macro): Don't forget the arity.
	* modules/m4.c (defn): Likewise.

2001-10-13  Akim Demaille  <akim@epita.fr>

	* tests/builtins.at (pushdef/popdef, trace, trace2, trace3): Move
	to...
	* tests/macros.at (pushdef/popdef, Tracing Hanoi Towers)
	(Propagation of traceon, Propagation of --trace): this new file.

2001-10-13  Akim Demaille  <akim@epita.fr>

	* m4/utility.c (m4_numeric_arg): Use the usual (argc, argv, ...)
	interface instead of (name, argc...).
	Upon failure, specify which argument was guilty.
	Adjust callers.

2001-10-13  Akim Demaille  <akim@epita.fr>

	* modules/evalparse.c: Save translators' time: don't translate
	internal error messages.
	(m4_evaluate): Simplify/normalize error messages.
	* doc/m4.texinfo (Eval): Adjust.

2001-10-13  Akim Demaille  <akim@epita.fr>

	* m4/macro.c (expand_macro): Let m4_bad_argc handle the cases
	where no checking is needed.
	* m4/utility.c (m4_bad_argc): Use the usual (argc, argv, ...)
	interface instead of (name, argc...).
	Adjust callers.
	* modules/gnu.c (m4_patsubst_do): Don't check argc, done
	elsewhere.

2001-10-13  Akim Demaille  <akim@epita.fr>

	* m4/utility.c (m4_bad_argc): Display user argument counts, i.e.,
	exclude the builtin name from the count.
	* modules/m4.c (ifelse): Do not use the regular argc mechanism, as
	calling ifelse with a single argument is valid.
	* doc/m4.texinfo (Ifelse): Add an example where ifelse is invoked
	with 1 and 2 args, mostly to strengthen the test suite.

2001-10-13  Akim Demaille  <akim@epita.fr>

	* m4/output.c (m4_make_diversion, m4_insert_file)
	(m4_insert_diversion, +m4_freeze_diversions): Ansify.

2001-10-12  Gary V. Vaughan  <gary@gnu.org>

	* m4/input.c (init_builtin_token):  Renamed from init_macro_token,
	since we call these things builtins in the rest of the code!

	* modules/gnu.c (m4_regexp_compile): s/%0/%s/

2001-10-12  Gary V. Vaughan  <gary@gnu.org>

	Rather than forcing each builtin definition to manage its own
	argument range checking, tabulate the maxima and minima for all
	builtins in each module.  This forces us to consider what the
	valid ranges for each builtin should be, and moves the checking
	code out of each builtin implementation and into the builtin
	caller infrastructure.

	* m4/m4module.h (struct m4_builtin): Add argument minima and
	maxima.
	* m4/m4private.h (struct m4_token): Reflect them here too.
	* m4/input.c (struct input_block): ...and here.
	(m4_token_copy): New function for token copying.
	(init_macro_token): Copy them from a token to the input stack.
	(m4_next_token): Don't forget to initialise them for text
	macros.
	* m4/macro.c (expand_argument): Use m4_token_copy, and also
	check argument counts before calling the builtin handler.
	* m4/symtab.c (m4_symbol_builtin): Take minima and maxima params.
	(m4_symbol_macro): Likewise.
	* m4/builtin.c (m4_builtin_pushdef): Add min_args and max_args
	parameters.  Updated all callers.
	(m4_builtin_define): Ditto.
	(m4_macro_pushdef, m4_macro_define): Ditto.
	* m4/symtab.c (m4_symbol_builtin, m4_symbol_define): Ditto.
	* modules/evalparse.c:  Declare argument counts for defined
	builtins and remove explicit calls to m4_bad_argc().
	* modules/gnu.c: Ditto.
	* modules/load.c: Ditto.
	* modules/m4.c: Ditto.
	* modules/modtest.c: Ditto.
	* modules/mpeval.c: Ditto.
	* modules/perl.c: Ditto.
	* modules/shadow.c: Ditto.
	* modules/stdlib.c: Ditto.
	* modules/time.c: Ditto.
	* TODO: Updated.

2001-10-10  Gary V. Vaughan  <gary@gnu.org>

	The trace semantics now attach the trace bit to a symbol name.
	For as long as a traceon(`foo') is active, calls to foo will be
	traced regardless of intervening undefines or module unloads.
	Fixed the flag propogation issues differently to the fixes
	reverted with the last attempt at nailing down trace:

	* m4/m4private.h:  This file is not visible outside of the m4
	source tree, so I removed all the `M4_' and `m4_' prefixes to save
	on typing.  Updated all clients.
	(m4_token): New typedef contains the fields that need to be passed
	around with the low level tokeniser.
	(m4_token_data):  Removed.
	(m4_symbol): Now contains the traced flag again.
	* m4/symtab.c:  Rewritten again.  Now we don't remove symbols with
	the trace bit set.  This change is contained entirely within this
	module and doesn't leak out into the callers.  Updated all
	clients.
	(m4_symbol_builtin, m4_symbol_macro):  Adjusted to make use of the
	new fields in m4_token.  Updated all clients.
	* m4/builtin.c (m4_builtin_pushdef):  Needs a flags argument so
	that `groks_macro_args' and `blind_if_no_args' flags are retained
	when defn() results are passed around in m4 code.  Updated all
	callers.
	(m4_builtin_define): Ditto.
	(m4_macro_pushdef, m4_macro_define): Ditto.
	* m4/input.c (struct input_block): Add a flags field to facilitate
	the above.
	(m4_push_macro):  ...use it.
	(init_macro_token):  Retrieve it.
	(m4_next_token): Initialise it.
	* m4/macro.c (expand_argument):  Copy it.
	* m4/m4module.h: Adjust.
	* tests/builtins.at:  Adjust the expected output of the trace
	tests to reflect the change in semantics.
	* tests/modules.at (modules: trace):  Check that unloading a
	module which supplies a traced symbol definition doesn't lose te
	trace bit.

2001-10-07  Gary V. Vaughan  <gary@gnu.org>

	* modules/gnu.c (m4_macro_table): Display the timetamp when
	expanding __m4_version__.

	* configure.ac (--with-modules): Forgot a comma in the
	AC_HELP_STRING parameter list.

2001-10-05  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap: Remove aclocal.m4t when it is no longer required.

2001-10-05  Akim Demaille  <akim@epita.fr>

	* tests/Makefile.am: Adjust for gnuprog2.
	* tests/m4.in: There can be a leading path.
	* tests/modules.at (AT_CHECK_M4_MODTEST): No need for $4 and $5.
	* tests/testsuite.at: Adjust to the most recent Autotest.
	(AT_CHECK_M4_FILTER): Fix and rename as...
	(AT_TEST_M4): this.
	* tests/others.at: Use it.

	* config/gmp.m4 (_AC_LIB_GMP): In order to read the content of a
	variable in shell scripts, one uses `$'...

2001-10-04  Gary V. Vaughan  <gary@gnu.org>

	* configure.ac: `rm -f $m4_getopt_h' was lost.

2001-10-04  Gary V. Vaughan  <gary@gnu.org>

	* configure.ac (TIMESTAMP): Display with AS_BOX at configure
	time.  Define it for config.h in order to...
	* src/main.c (main): ...display the timestamp for --version.

2001-10-04  Akim Demaille  <akim@epita.fr>

	* modules/gnu.c (m4_regexp_do, m4_patsubst_do): Extracted from
	previous builtins `regexp' and `patsubst'.
	(regexp, patsubst): Use them.
	(eregexp, epatsubst): New builtins.
	* doc/m4.texinfo (Patsubst, Regexp): Rename and complete as...
	(Epatsubst and Patsubst, Eregexp and Regexp): these.
	(Extensions): More info on REs.

2001-10-04  Akim Demaille  <akim@epita.fr>

	* modules/modtest.c (init_handler): Consistently output to stderr.
	(finish_handler): New.
	(test): The `if' is an `assert'.
	* tests/modules.at: Adjust.

2001-10-04  Akim Demaille  <akim@epita.fr>

	* m4/utility.c (m4_bad_argc): Detail the mismatches.

2001-10-01  Akim Demaille  <akim@epita.fr>

	* tests/generate.awk: Tag the tests with `documentation'.
	* tests/modules.at (AT_CHECK_M4_MODTEST): New.
	Use the make the existing modtest tests more uniform, and complete
	the set of possibilities.

2001-10-01  Akim Demaille  <akim@epita.fr>

	* config/gmp.m4: Consult the user before using GMP: use
	--without-gmp.
	* configure.ac: Adjust.
	* modules/gmp.c: No protection needed as the module is not built
	if GMP is not used.

2001-10-01  Akim Demaille  <akim@epita.fr>

	* tests/generate.awk: Remove debugging code.
	(fatal): Specify the current location.

	* m4/debug.c, m4/macro.c, m4/utility.c, modules/format.c,
	* modules/gnu.c, modules/m4.c: Use M4ARG.

2001-10-01  Akim Demaille  <akim@epita.fr>

	* modules/gnu.c (RE_SYNTAX_BRE, RE_SYNTAX_ERE): New.
	(m4_regexp_compile): New.
	(regexp, patsubst): Use it.

2001-09-30  Gary V. Vaughan  <gary@gnu.org>

	Reinstate the memory handling improvements from the patch I just
	reverted.  Relevant ChangeLog entries repeated here:

	* m4/module.c (m4_module_remove): New function that holds the core
	of the old m4_module_unload.
	(m4_module_unload): Use it.
	(m4_module_unload_all): When we know the modules will never be
	used again (i.e. on exit), free up as much module memory as
	possible.  There are still some artifacts from resident modules
	living inside ltdl.c, but everything else is freed.
	* m4/debug.c (m4_debug_exit): Free memory allocated in
	m4_debug_init().
	* m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
	* m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
	* src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
	* m4/m4module.h: Updated prototypes.
	* m4/hash.c (m4_hash_exit): Free the nodes on the free list.
	* m4/hash.h: Updated prototypes.
	* src/main.c (main): Use all these new functions to clean up as
	much memory as possible before exit.

2001-09-30  Gary V. Vaughan  <gary@gnu.org>

	Reverted my large patch for removing the old m4_symbol
	structure on 2001-09-20.  We are still not happy about the way
	trace works in conjunction with defn and undefine, and leaving
	the reverted patch active prevents us from moving the traced
	bit from the definition back to the symbol.

2001-09-30  Gary V. Vaughan  <gary@gnu.org>

	* configure.in: Moved to...
	* configure.ac: ...here.  Added a libtool like timestamped
	banner, and tidied up the libltdl cruft.
	* config/mkstamp: Script to extract a timestamp from ChangeLog.
	* modules/Makefile.am (INCLTDL):  Removed.  This is required
	only when libltdl is configured in a subdirectory.
	* src/Makefile.am: Ditto.
	(LIBADD_DL):  No need to add this again, libtool already knows
	that libm4.la depends on it.
	* m4/Makefile.am: Automake sets variables from AC_SUBST.  Use
	them.

	* TODO: stackovf.c is basically broken.
	Reported by Marc Espie <espie@schutzenberger.liafa.jussieu.fr>

2001-09-28  Akim Demaille  <akim@epita.fr>

	* tests/Makefile.am (EXTRA_DIST): `m4' is not to be shipped.

2001-09-27  Akim Demaille  <akim@epita.fr>

	* tests/m4.in: Don't use short options.
	Simplify the stderr signature normalization.

2001-09-27  Akim Demaille  <akim@epita.fr>

	tests/m4 shall be position independent.

	* tests/m4.in: New.
	* tests/m4: Remove.
	* tests/testsuite.at: No args to AT_INIT.
	* configure.in, tests/Makefile.am: Adjust.

2001-09-22  Akim Demaille  <akim@epita.fr>

	Autotest has changed again.

	* tests/Makefile.am (DISTCLEANFILES): Add package.m4.
	(package.m4): Remove.
	* configure.in: Adjust to LIBADD_GMP.

2001-09-21  Gary V. Vaughan  <gary@gnu.org>

	* config/gmp.m4 (AC_ARG_WITH): Removed.
	(GMP_LIB): Renamed to LIBADD_GMP for consistency.
	(AC_LIB_GMP): When performing a test compile against libgmp,
	include the header gmp.h if possible, and link against -lgmp.  If
	they both work define USE_GMP.
	* modules/Makefile.am (mpeval_la_LIBADD): Add LIBADD_GMP.
	(mpeval_LTX_init_func): Complain on load that there was no libgmp
	at compile time.

2001-09-20  Gary V. Vaughan  <gary@gnu.org>

	* m4/evalparse.c: Moved to...
	* modules/evalparse.c:  ...here.  This code is shared between
	modules/mpeval.c and modules/m4.c, so there is no need to pollute
	the libm4 API with its details.  Moderately rewritten to interface
	into its clients more simply.
	* m4/eval.c: Deleted.  Migrated functionality to...
	* modules/m4.c: ...here.
	(builtin_eval):  Implemented in terms of the new interface style.
	* modules/mpeval.c (builtin_mpeval): Ditto.
	* m4/m4module.h: Removed references to the former m4/eval.c.
	* m4/Makefile.am (libm4_la_SOURCES):  Removed eval.c.
	(EXTRA_libm4_la_SOURCES): Deleted.
	* modules/Makefile.am (EXTRA_m4_la_SOURCES): Reference evalparse.c.
	(EXTRA_mpeval_la_SOURCES): Reference evalparse.c.

2001-09-20  Akim Demaille  <akim@epita.fr>

	* config/gmp.m4 (AM_WITH_GMP): Rename as...
	(AC_LIB_GMP): this.
	By default, use gmp.
	Massive revamping.
	* configure.in: Adjust.
	Use Automake conditionals for USE_GMP.
	Always compute sizeof (long long int).
	This was a bug BTW, as `eval' (not `mpeval') depends on it:
	before, it was used _only_ if mpeval was not activated.
	* modules/Makefile.am (pkglibexec2dir, +pkglibexec2_LTLIBRARIES)
	(mpeval_la_LIBADD): New macros.
	* modules/mpeval.c: No longer be conditioned by WITH_GMP.
	Indent.
	* tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Create package.m4.
	* tests/atlocal.in, tests/builtins.at: Depend upon USE_GMP, not
	WITH_GMP.

2001-09-20  Akim Demaille  <akim@epita.fr>

	* tests/Makefile.am (package.m4): New.
	* tests/testsuite.at: Adjust AT_INIT and AT_VICTIMS.

2001-09-20  Gary V. Vaughan  <gary@gnu.org>

	More cleanup.  After the last patch, m4_symbol holds nothing but
	the head of a chain of m4_token_data.  So I have removed the old
	m4_symbol, so that m4_token_data chains are stored directly in the
	value cell of a hash table node.  But there's more... m4_symbol
	was a more natural name for the symbol value cell, and now that it
	is gone I have renamed the former m4_token_data structure to
	m4_symbol.  This change turned out to be a pig to get right, since
	the original code didn't need to modify the value cell itself,
	since changing the chain happened inside the m4_symbol that used
	to be returned -- I had to pass the address of the value cell
	across various function calls, incase the head value changed.  I
	also tightened up the memory management to help me find a nasty
	memory corruption bug that took me all night to track down...

	* m4/m4private.h (struct m4_symbol): Removed.
	(struct m4_token_data): Renamed to `struct m4_symbol'.  Updated
	all references.
	* m4/hash.c (m4_hash_iterator_value): Return the address of the
	value cell.  Updated all callers.
	* m4/symtab.c: Took advantage of the simplification in the data
	structures to rewrite a lot of this file more simply.  There is
	still some room for optimisation here, but we should tackle that
	systematically closer to the release.

	* m4/ltdl.c: Added dmalloc support, and fixed some memory leaks it
	revealed.  This version is ahead of CVS libtool until I get chance
	to flush my changes.
	* m4/module.c (m4_module_remove): New function that holds the core
	of the old m4_module_unload.
	(m4_module_unload): Use it.
	(m4_module_unload_all): When we know the modules will never be
	used again (i.e. on exit), free up as much module memory as
	possible.  There are still some artifacts from resident modules
	living inside ltdl.c, but everything else is freed.
	* m4/debug.c (m4_debug_exit): Free memory allocated in
	m4_debug_init().
	* m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
	* m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
	* src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
	* m4/m4module.h: Updated prototypes.
	* m4/hash.c (m4_hash_exit): Free the nodes on the free list.
	* m4/hash.h: Updated prototypes.
	* src/main.c (main): Use all these new functions to clean up as
	much memory as possible before exit.

2001-09-18  Gary V. Vaughan  <gary@gnu.org>

	The `traced' flag needs to be attached to the definition of a
	symbol rather than the current symbol containing the definition.
	Implementing this showed up some long standing post 1.4 bugs in
	flag propogation which I also fixed.

	* m4/m4private.h (struct m4_symbol): Remove the traced flag.
	(struct m4_token_data): And add it back in here.
	* m4/input.c (init_macro_token): Propogate the traced flag
	correctly.
	* m4/macro.c (expand_argument): Ditto.
	* tests/builtins.at (trace2, trace3): New tests based on Akim's
	sadistic email ;-)

2001-09-08  Gary V. Vaughan  <gary@gnu.org>

	* m4/m4private.h (struct m4_token_data): Simplified by removing
	the redundant `traced' flag, and one level of structure nesting.
	(M4_TOKEN_DATA_FUNC_TRACED): Removed.
	* m4/input.c (init_macro_token): No need to initialise removed
	`traced' field.
	* m4/macro.c (expand_argument): No need to copy it either.
	* m4/utility.c (m4_token_data_func_traced): Or provide an access
	function.

	* m4/hash.c (m4_hash_bucket_insert): Symbol shadowing is no longer
	dependant on multiple symbols with the same key, so preserving
	relative symbol order in each bucket during resizing is no longer
	required.  The resize function is considerably faster as a result.

	* m4/m4module.h, m4/builtin.c, m4/symtab.c:
	s/m4_symbol_insert/m4_symbol_define/g;
	s/m4_builtin_insert/m4_builtin_define/g;
	s/m4_macro_insert/m4_macro_define/g.  Updated all callers.

2001-09-08  Gary V. Vaughan  <gary@gnu.org>

	Get rid of m4_symbol_lookup_t entirely.  With Akim's earlier
	commits, the m4_lookup_symbol dispatch function is split into
	specialised functions that must be called directly.

	* m4/m4module.h (m4_symbol_lookup_t): Removed.
	* m4/symtab.c (m4_lookup_symbol): Removed.
	(m4_symbol_builtin, m4_symbol_macro): New functions.
	* m4/builtin.c (m4_builtin_define): Split into...
	(m4_builtin_pushdef, m4_builtin_insert): ...these.
	(m4_macro_define): Split into...
	(m4_macro_pushdef, m4_macro_insert): ...these.
	* src/main.c (main): Set command line macros from `-D' parameters
	using `m4_macro_define'.

2001-09-08  Gary V. Vaughan  <gary@gnu.org>

	* m4/symtab.c (m4_symtab_remove_module_references):  Renamed as
	this from m4_remove_table_reference_symbols().
	* m4/m4module.h, m4/module.c: Updated all references.

2001-09-07  Akim Demaille  <akim@epita.fr>

	* modules/stdlib.c, modules/times.c: Misc cleanups.

2001-09-07  Akim Demaille  <akim@epita.fr>

	* configure.in: We now need Autoconf 2.52e.
	* m4/m4module.h (m4_symbol_lookup_t): Remove `M4_SYMBOL_POPDEF'
	and `M4_SYMBOL_DELETE'.
	* m4/symtab.c (m4_lookup_symbol, symtab_debug): Adjust.
	* src/main.c (main): Adjust.

2001-09-06  Gary V. Vaughan  <gary@gnu.org>

	Fix the obstack.h problem once and for all!  At configure time we
	can test for a system supplied obstack.h:  depending on the
	result, we now generate system.h with an #include of the correct
	header.  As a bonus, I've also added a --with-included-obstack,
	incase the user doesn't like the system obstack for some
	reason... and also we can test the shipped obstack on a system
	that has oe of its own.  We also now need to be careful to add
	build directories to the include search path, since the generated
	system.h will be in the build tree.

	* configure.in (AC_CONFIG_FILES): Generate system.h from
	system-h.in.
	* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Determine whether to
	include the system obstack header or the copy shipped with M4.
	Allow the user to override configure and force the build to use
	the shipped version.
	* m4/system-h.in: New file, template for...
	* m4/system.h: ...this.  Now deleted.
	* m4/m4module.h: Include system.h before everything else.
	* src/freeze.c: Ditto.
	* m4/Makefile.am (dist-hook): Remove generated system.h.
	(INCLUDES): Check builddir for generated headers before checking
	srcdir.
	* modules/Makefile.am (INCLUDES): Ditto.
	* src/Makefile.am (INCLUDES): Ditto.

2001-09-05  Gary V. Vaughan  <gary@gnu.org>

	* TODO: Remove the items that have been addressed already.

2001-09-05  Akim Demaille  <akim@epita.fr>

	* src/main.c (main): Standardize --version.

2001-09-05  Akim Demaille  <akim@epita.fr>

	* modules/format.c (format): Have a bigger `str'.

2001-09-05  Akim Demaille  <akim@epita.fr>

	Rationalize warnings, reporting the macro name as if it were a
	program name, and assertions.

	* m4/m4module.h (m4_lookup_symbol): Prototype, it is still used.
	(M4WARN): New.
	* m4/symtab.c (m4_lookup_symbol, m4_symbol_popdef)
	(m4_symbol_delete):
	Use assert for internal errors.
	* m4/utility.c (m4_bad_argc, m4_numeric_arg, m4_dump_symbols): Use
	M4WARN.
	* modules/m4.c (undefine, defn, traceon, traceoff, dumpdef): use
	M4WARN and assert.
	* tests/builtins.at (pushpop): Adjust.

2001-09-05  Akim Demaille  <akim@epita.fr>

	* m4/symtab.c (m4_symbol_insert): Don't use `foo () || bar ()'
	with pointers.

2001-09-05  Akim Demaille  <akim@epita.fr>

	* m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_LOOKUP.
	* m4/macro.c, m4/symtab.c: Adjust.

2001-09-05  Akim Demaille  <akim@epita.fr>

	* m4/symtab.c (m4_symbol_popdef, m4_symbol_delete): Rename as...
	(m4_symbol_pop, m4_symbol_del): this.
	(m4_symbol_lookup, m4_symbol_pushdef, m4_symbol_insert)
	(m4_symbol_popdef, m4_symbol_delete): New.
	(m4_lookup_symbol): Adjust.
	* m4/m4module.h, src/main.c, modules/gnu.c, modules/m4.c: Adjust.

2001-09-05  Akim Demaille  <akim@epita.fr>

	* m4/m4module.h (m4_symbol_lookup): Rename as...
	(m4_symbol_lookup_t): this.

2001-09-05  Akim Demaille  <akim@epita.fr>

	* m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_IGNORE,
	unused.
	* m4/symtab.c (m4_lookup_symbol): Adjust.

2001-09-03  Gary V. Vaughan  <gary@gnu.org>

	Bootstrap will now work with Libtool 1.4.1 or higher:
	* bootstrap: Remove stale autom4te.cache files when
	rebootstrapping.
	* config/Makefile.am (ACLOCAL_MACROS):  Add ltdl.m4 and
	libtool.m4.
	* bootstrap: Ignore acinclude.m4 now the we include ltdl.m4 and
	libtool.m4 directly.
	Run libtoolize to refresh ltmain.sh.
	* config/ltmain.sh:  Deleted.
	* acinclude.m4: Deleted.
	* m4/ltdl.c, m4/ltdl.h: Updated from libtool-1.4.1.

	* config/debug.m4 (AC_LIBTOOL_COMPILER_OPTION): Provide a fallback
	implementation for the cvs impaired libtool user.

2001-09-03  Akim Demaille  <akim@epita.fr>

	* m4/symtab.c (m4_lookup_symbol): Give more details when reporting
	internal errors.
	Avoid using `default' in switch, as it hides useful compiler
	warnings when a case is forgotten.

2001-09-03  Akim Demaille  <akim@epita.fr>

	* src/main.c (MODULE_SHORTOPT, MODULEPATH_SHORTOPT): Remove, there
	is no such thing as `WITH_MODULES'.

2001-09-03  Akim Demaille  <akim@epita.fr>

	Improve the test suite's selfcontainedness.

	* doc/m4.texinfo: Let `input.m4' be the input file, not `in'.
	(Include, Undivert): Tag the other input files.
	* tests/generate.awk: Catch `@comment file:'.
	`-I $src' is no longer needed.
	`next' is really like `return': the rest is skipped.
	Adjust to `input.m4'.
	(fatal): New function.
	* tests/foo, tests/incl.m4: Remove.

2001-09-01  Gary V. Vaughan  <gary@gnu.org>

	The shadowing mechanism and, infact, the whole symbol table
	implementation was creaking under the weight of the features piled
	on top of it.  We now have a separate hash table module which will
	dynamically resize to keep symbol density withing good performace
	limits, and a new symtab module layered above it.  Symbol lookups
	are now marginally more efficient (since the shadowed flag is no
	longer required) and symbol removal, such as on module unload, is
	considerably faster due to a reorganisation of the data structures
	used in symtab.c.

	* src/main.c (main):  Don't mention `-H'.
	* doc/m4.texinfo (Invoking m4): Document that -H no longer has any
	effect.
	* NEWS: Updated.
	* m4/hash.c: New generalised dynamic hash table data structure
	management module.
	* m4/hash.h: Public interface.
	* m4/Makefile.am (pkginc_HEADERS): Add hash.h.
	(libm4_la_SOURCES): Add hash.c.
	* m4/symtab.c: More or less rewritten from scratch, within the
	bounds of the previous API.
	(m4_symtab_apply): A cleaner version of the old hack_all_symbols
	call.  Updated all callers.
	* m4/m4module.c: #include <m4/hash.h>, and changed all affected
	declarations to reflect API changes.
	(M4INIT): Generate a declaration too, to avoid the warning with
	--enable-debug builds.
	(M4FINISH): Ditto.
	(HASHMAX): Removed.
	* m4/utility.c (hash_table_size):  Removed.
	(m4_dump_symbols): Rewritten to build and qsort an array of symbol
	names, which are then looked up by builtin_dumpdef() as necessary.
	This implies a small speedup in builtin_symbols(), which discarded
	all of the symbol info under the old call.
	* m4/m4private.h (m4_symbol): Removed shadowed flag -- symbol
	shadowing is implicit in respect to the new data structures.
	symbol names are no longer duplicated here, they are stored in the
	key field of the hash table.
	Moved macro_args and blind_no_args...
	(m4_token_data): ...to here.
	m4/macro.c (expand_macro):  Added a name argument since the symbol
	name is no longer copied into each struct m4_symbol.  Modified all
	callers.
	(collect_arguments):  Ditto.
	* modules/m4.c (set_trace): Ditto.
	* modules/gnu.c (builtin_symbols): Updated.
	* src/freeze.c (produce_symbol_dump): Much improved in light of
	the improved symbol table layout.

2001-09-01  Gary V. Vaughan  <gary@gnu.org>

	* m4/m4private.h (SYMBOL_NEXT): Move into m4's name space; renamed
	to M4_SYMBOL_NEXT.
	(SYMBOL_TRACED): Similarly renamed by prefixing with `M4_'.
	(SYMBOL_SHADOWED, SYMBOL_MACRO_ARGS, SYMBOL_BLIND_NO_ARGS,
	SYMBOL_NAME, SYMBOL_TYPE, SYMBOL_TEXT, SYMBOL_FUNC,
	SYMBOL_HANDLE): Ditto.
	* m4/builtin.c, m4/macro.c, m4/symtab.c, m4/utility.c,
	modules/gnu.c, modules/m4.c, src/freeze.c,
	src/main.c:  Updated all references.

	* src/Makefile.am (m4_SOURCES): Don't list $(M4OBJS) here, since
	Automake 1.5 chokes on dynamic source file lists,  Besides, it is
	already listed in m4_LDADD... how did that ever used to work?
	* configure.in (getopt.h): Use AC_CONFIG_LINKS instead of a manual
	link.
	* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
	Suggested by Tim Van Holder <tim.van.holder@pandora.be>

	* tests/m4: Don't call the m4 wrapper script with libtool, it
	works fine all by itself.

2001-08-30  Gary V. Vaughan  <gary@gnu.org>

	The experimental `changeword' feature never took off, and has
	no obvious advantages over `changesyntax' to compensate the
	enormous speed penalty it carries:
	* configure.in (ENABLE_CHANGEWORD): Removed.
	* m4/m4module.h (m4_set_word_regexp): Removed.
	* m4/m4private.h (m4_token_data): Removed original_text field.
	* m4/utility.c (m4_token_data_orig_text): Removed.
	* m4/input,c: Removed all conditional ENABLE_CHANGEWORD code.
	* m4/macro.c: Ditto.
	* src/main.c: Ditto.
	* modules/Makefile.am (changeword.la): Removed.
	* modules/changeword.c: File removed.
	* doc/m4.texinfo: References to changeword and --word-regexp
	removed.
	* po/POTFILES.in: modules/changeword.c removed.
	* tests/atlocal.in (ENABLE_CHANGEWORD): Removed.
	* tests/builtins.at (changeword): Test removed.

2001-08-30  Akim Demaille  <akim@epita.fr>

	* bootstrap.sh: Create aclocal.m4 instead of modifying it.
	This also help having a single list of m4 files: in
	config/Makefile.am.
	* config/Makefile.am (STANDARD_MACROS): Rename as...
	(ACLOCAL_MACROS): this.
	(list-standard-macros): Remove.
	(spy): New.

2001-08-29  Gary V. Vaughan  <gary@gnu.org>

	In an attempt to moderate my egomania...
	* tests/modules.at: Remove attributions.

	* tests/generate.awk: When making substitutions to "@&t@", either
	"&" or "\&" in the substitution string argument to gsub refer back
	to the matched text.  "@\\&t@" seems to work though, Tests 43 and
	67 now pass for me.

2001-08-29  Akim Demaille  <akim@epita.fr>

	* tests/others.at (changeword, ddivert, debug, esyscmd, exp, gmp)
	(include, indir, multiquotes, patsubst, pushdef/popdef, regexp)
	(sync-lines, trace, translit, undivert, wrap): Move to...
	* tests/builtins.at: this new file.
	* tests/others.at (Discard comments, import-environment): Move to...
	* tests/options.at: this new file.

2001-08-29  Akim Demaille  <akim@epita.fr>

	* tests/others.at (Freezing modules)
	(--module-directory: absolute path, modpath2, modpath3)
	(M4MODPATH: absolute path, modtest, shadow, unload): Move to...
	* tests/modules.at: here, new file.
	* tests/others.at, tests/generate.awk: Add a banner.
	* tests/testsuite.at: Adjust.
	(AT_CHECK_M4_FILTER): New, but unused.

2001-08-29  Akim Demaille  <akim@epita.fr>

	* tests/testsuite.at (AT_CHECK_M4): Don't pass -I, let the tests
	handle that.
	* tests/others.at (wrap): Inline wrap.m4.
	(shadow): Inline shadow.m4.
	(iso8859): Don't specify the path from top_srcdir, but from srcdir.
	* tests/m4: Simplify.

2001-08-29  Akim Demaille  <akim@epita.fr>

	* tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Use autom4te's
	--language.

2001-08-29  Akim Demaille  <akim@epita.fr>

	* tests/generate.awk (normalize): s/@__@/@&t@/.

2001-08-28  Akim Demaille  <akim@epita.fr>

	* examples/indir.m4, tests/others.at (indir): s/nonsens/nonsense/.

2001-08-28  Gary V. Vaughan  <gary@gnu.org>

	* bootstrap (generate.awk): Generate test cases with new script.

2001-08-27  Akim Demaille  <akim@epita.fr>

	* tests/Makefile.am (installcheck-local): Don't use
	`dc_install_base' which is not visible here, but `exec_prefix'
	which is clearly the RT anyway.
	* tests/testsuite.at (AT_CHECK_M4): Don't pass -M here since it is
	related to testing a now installed m4.
	* tests/m4: Do it here.

2001-08-27  Akim Demaille  <akim@epita.fr>

	* tests/others.at (indir): Formatting change.

2001-08-27  Akim Demaille  <akim@epita.fr>

	* tests/Makefile.am (installcheck-local): New.
	* tests/testsuite.at (AT_CHECK_M4): Pass `-b' so that C-c works on
	the test suite.
	Prefer options over envvars.
	* src/main.c (main): First bug caught by the test suite (yeah!):
	--batch lacked a `break' which resulted in an accidental
	invocation of --discard-comments.

2001-08-27  Akim Demaille  <akim@epita.fr>

	* tests/others.at (capitalize, changeword, comments, ddivert)
	(debug, esyscmd, exp, foreach, forloop, fstab, hanoi, include)
	(misc, multiquotes, patsubst, pushdef/popdef, regexp, reverse)
	(sysv-args, trace, translit, undivert): Don't rely on files in
	examples/: AT_DATA them.

2001-08-27  Akim Demaille  <akim@epita.fr>

	Let the test suite use a wrapper around the not installed m4 to
	pretend it is (installed).

	* bootstrap (aclocal.m4): Output AC_SUBST's and AM_CONDITIONAL's in
	such a way that m4 does not process them.
	* configure.in: The package name seems to be `m4', not `M4'.
	* tests/m4: New.
	* tests/atlocal.in (at_package, M4): Remove.
	* tests/testsuite.at, tests/others.at: Use m4, not $M4.

2001-08-27  Akim Demaille  <akim@epita.fr>

	* tests/Makefile.am (CLEANFILES): Remove.
	(DISTCLEANFILES, clean-local): New.
	* examples/mktests.sh: Remove.

2001-08-27  Akim Demaille  <akim@epita.fr>

	* Makefile.am (AUTOMAKE_OPTIONS): 1.5.
	Don't use aclocal: it's written by hand.
	* aclocal.m4: m4_include all the files instead of being built by
	aclocal.
	* bootstrap: Help automake find the AC_SUBSTs and AM_CONDITIONALs
	until it reads the traces by itself.
	* configure.in: Require Autoconf 2.42c as we are now using
	AC_CONFIG_TESTDIR instead of AT_CONFIG.
	Catch unexpanded `jm_' macros.
	* config/atconfig.m4: Remove.
	* config/error.m4: new.
	* config/Makefile.am: Ship the files included by aclocal.m4.
	* tests/Makefile.am (TESTSUITE_SOURCES): Rename as...
	(TESTSUITE_AT): this, to please Automake.
	(TESTSUITE): This target uses autotest/autotest.m4, not
	autotest/general.m4.
	* tests/testsuite.at: Prereq Autotest 2.52c.
	* examples/Makefile.am (pkgdata_DATA): Rename as...
	(dist_pkgdata_DATA): this.
	* doc/Makefile.am (man_MANS): Rename as...
	(dist_man_mans): this.

2001-08-20  Gary V. Vaughan  <gary@gnu.org>

	* m4/system.h [cygwin*]:  Thanks to Paul Sokolovsky and
	Robert Collins, building on Cygwin no longer requires Windows
	import and export symbol decorations.
	* m4/m4module.h (M4_SCOPE) [cygwin*]:  Deleted all occurences.
	* m4/error.h (M4_SCOPE) [cygwin*]: Ditto.
	* m4/debug.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
	* m4/error.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
	* m4/input.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
	* m4/macro.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
	* m4/output.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
	* m4/utilty.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
	* m4/xmalloc.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
	* configure.in (LIBM4_DLL_IMPORT) [cygwin*]:  Don't set this
	anymore.
	* src/Makefile.am (AM_CPPFLAGS) [cygwin*]: Don't use it either!
	* modules/Makefile.am (AM_CPPFLAGS) [cygwin*]: Ditto.

2001-08-20  Gary V. Vaughan  <gary@gnu.org>

	Ansify the source.  Previously we had a mix, where my code was
	in a K&R compatible style, and the preexisting code was in ANSI
	style.  Nothing is lost wrt release 1.4 by reverting to ANSI,
	and now the code base is much cleaner.

	* m4/system.h:  Remove M4_PARAMS macro and all users.  Remove
	VOID macro and all users.
	* m4/m4module.h:  Ansify function prototypes and headers.
	* m4/builtin.c:  Ditto.
	* m4/evalparse.c:  Ditto.
	* m4/input.c:  Ditto.
	* m4/macro.c:  Ditto.
	* m4/module.c:  Ditto.
	* m4/output.c:  Ditto.
	* m4/path.c:  Ditto.
	* m4/symtab.c:  Ditto.
	* m4/utility.c:  Ditto.
	* modules/format.c:  Ditto.
	* modules/gnu.c:  Ditto.
	* modules/m4.c:  Ditto.
	* modules/mpeval.c:  Ditto.
	* src/freeze.c:  Ditto.
	* src/m4.h:  Ditto.
	* src/main.c:  Ditto.

2001-08-20  Akim Demaille  <akim@epita.fr>

	* config/atconfig.m4: s/EOF/ATEOF/, so that configure can be
	generated with stock 2.52.

2001-08-20  Akim Demaille  <akim@epita.fr>

	* config/atconfig.m4: New, until part of Autoconf per se.
	* configure.in (AT_CONFIG): Use it.
	Adjust.
	* tests/mkconfig.sh, tests/atconfig.in, tests/defs: Remove.
	* tests/atlocal.in: New.
	* tests/generate.awk: For the time being, the empty quadrigraph is
	`@__@'.
	* tests/others.at (changeword, gmp): Check the configuration
	variable against `yes'.
	* tests/testsuite.at (dnl): Allow it, as it's used all over the
	place.

2001-08-20  Akim Demaille  <akim@epita.fr>

	* m4/utility.c (m4_numeric_arg): Spell out the culprit.
	* modules/m4.c (undivert): Disable the possibility of undiverting
	several files at once: it is not documented, it is inconsistent
	with the other macros, it can be straightforwardly mocked by
	several invocations, and most importantly, it prevents the
	possibility of other kinds of extension.
	Use `m4_numeric_arg'.

2001-08-20  Akim Demaille  <akim@epita.fr>

	* examples/include.m4: Typo.
	* tests/generate.awk: Really add it.
	* tests/Makefile.am: Adjust.
	* tests/others.at (Discard comments): It sure fails without `-c'.
	(include, undivert): Add -I examples/.

2001-08-20  Akim Demaille  <akim@epita.fr>

	Use sprintf, not ecft and friends since it is standard, portable,
	simplifies the code, and since the latter is even deprecated
	according to the GNU libc documentation.

	* modules/format.c: Drop evct support.

2001-08-19  Gary V. Vaughan  <gary@gnu.org>

	* config/debug.m4 (M4_AC_CHECK_DEBUGGING): Cleaned up.  Don't test
	for `-pipe' here...
	* configure.in: ...do it here instead.

	* c-boxes.el: Deleted.
	* m4/builtin.c: Reformat box comments to be closer to GNU
	standards.
	* m4/debug.c:  Ditto.
	* m4/eval.c:  Ditto.
	* m4/evalparse.c:  Ditto.
	* m4/input.c:  Ditto.
	* m4/m4module.h:  Ditto.
	* m4/macro.c:  Ditto.
	* m4/output.c:  Ditto.
	* m4/symtab.c:  Ditto.
	* m4/utility.c:  Ditto.
	* modules/changeword.c:  Ditto.
	* modules/format.c:  Ditto.
	* modules/gnu.c:  Ditto.
	* modules/load.c:  Ditto.
	* modules/m4.c:  Ditto.
	* modules/modtest.c:  Ditto.
	* modules/mpeval.c:  Ditto.
	* modules/perl.c:  Ditto.
	* modules/shadow.c:  Ditto.
	* modules/stdlib.c:  Ditto.
	* modules/time.c:  Ditto.
	* src/freeze.c:  Ditto.
	* src/main.c:  Ditto.

2001-08-17  Gary V. Vaughan  <gary@gnu.org>

	* m4/module.c: Fixup some errors in the description comment.

2001-08-17  Akim Demaille  <akim@epita.fr>

	* tests/others.at (iso8859): Specify the path to the M4 test file.
	* tests/testsuite.at (AT_CHECK_M4): Normalize the path of input
	files in error messages.

2001-08-17  Akim Demaille  <akim@epita.fr>

	* tests/testsuite.at (AT_CHECK_M4): Anchor M4PATH in $top_srcdir.
	* tests/others.at: Adjust input files paths.
	* tests/atconfig.in: Set top_builddir.
	* tests/Makefile.am: Adjust.
	`testsuite' is in src, not build.

2001-08-17  Akim Demaille  <akim@epita.fr>

	* tests/Makefile.am (EXTRA_DIST): Ship generate.awk.
	(generate.at): Install a temporary hack until the actual
	generate.awk is added to the repository.
	* tests/atconfig.in: New.

2001-08-17  Akim Demaille  <akim@epita.fr>

	Really apply the patch ``Drop Autoconf 2.13 compatibility.''

2001-08-17  Akim Demaille  <akim@epita.fr>

	* doc/m4.texinfo: Promote proper quotation.

2001-08-17  Akim Demaille  <akim@epita.fr>

	Remove the non Autotest tests.

	* tests/other-tests/capitalize.test,
	* tests/other-tests/changeword.test,
	* tests/other-tests/comments.test, tests/other-tests/ddivert.test,
	* tests/other-tests/debug.test,
	* tests/other-tests/discard-comments.m4,
	* tests/other-tests/discard-comments.test,
	* tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
	* tests/other-tests/foreach.test, tests/other-tests/forloop.test,
	* tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
	* tests/other-tests/gmp.m4, tests/other-tests/gmp.test,
	* tests/other-tests/hanoi.test,
	* tests/other-tests/import-environment.m4,
	* tests/other-tests/import-environment.test,
	* tests/other-tests/include.test, tests/other-tests/indir.test,
	* tests/other-tests/iso8859.m4, tests/other-tests/iso8859.test,
	* tests/other-tests/misc.test, tests/other-tests/modfreeze.test,
	* tests/other-tests/modpath1.test, tests/other-tests/modpath2.test,
	* tests/other-tests/modpath3.test, tests/other-tests/modpath4.test,
	* tests/other-tests/modtest.test,
	* tests/other-tests/multiquotes.test,
	* tests/other-tests/patsubst.test, tests/other-tests/pushpop.test,
	* tests/other-tests/regexp.test, tests/other-tests/reverse.test,
	* tests/other-tests/shadow.test, tests/other-tests/stackovf.test,
	* tests/other-tests/sync-lines.m4,
	* tests/other-tests/sync-lines.test,
	* tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
	* tests/other-tests/translit.test, tests/other-tests/undivert.test,
	* tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
	* tests/other-tests/wrap.test: Remove.

	* tests/run-test, tests/get-them: Remove.
	* tests/Makefile.am: Adjust.

2001-08-17  Akim Demaille  <akim@epita.fr>

	others.at no longer depends on other-tests/.

	* tests/others.at (stackovf): You're actually...
	(sync-lines): this.
	(modfreeze, modpath1, modpath2, modpath3, modpath4, modtest, shadow)
	(unload.test): Keep their authorship.
	(discard-comments, gmp, import-environment, modfreeze)
	(sync-lines): Embed the input files.
	* tests/stackovf.test: Copy from other-tests/stackovf.test.
	* tests/iso8850.m4: Copy from other-tests/iso8859.m4.

2001-08-17  Akim Demaille  <akim@epita.fr>

	* doc/m4.texinfo (Esyscmd): Fix the paths in the Vice example.
	(M4exit): Tag the exit status of the example.
	* tests/get-them: Adjust.
	* tests/generate.awk: New, based on get-them.
	* tests/Makefile.am: Adjust to generate `generated.at'.
	* tests/testsuite.at: Adjust.
	(AT_CHECK_M4): Don't overquote.  Blush...

2001-08-17  Akim Demaille  <akim@epita.fr>

	Start using Autotest.  atconfig creation is still lacking.

	* examples/patsubst.m4, modules/modtest.m4, modules/shadow.m4,
	* examples/reverse.m4, tests/other-tests/import-environment.m4,
	* tests/other-tests/iso8859.m4: Don't produce trailing blanks.
	* tests/other-tests/import-environment.test: Don't check LANGUAGE
	as it might be `unset', or set to `C'.
	* tests/other-tests/iso8859.test, tests/other-tests/modpath1.test,
	* tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
	* tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
	* tests/other-tests/patsubst.test, tests/other-tests/reverse.test,
	* tests/other-tests/shadow.test: Adjust.
	* tests/testsuite.at, tests/others.at: New.
	* tests/Makefile.am: Adjust.

2001-08-17  Akim Demaille  <akim@epita.fr>

	Drop Autoconf 2.13 compatibility.

	* configure.in (changeword): No need to undefine it, as anyway if
	it's defined, M4sugar moved it as m4_changeword.
	And anyway, proper quotation is enough.
	(m4_pattern_allow): As it exists in 2.50, just use it.
	(AC_OUTPUT): Split in AC_CONFIG_FILES and AC_CONFIG_COMMANDS.
	Don't handle Gettext's duties, let it handle them.
	* config/gnu-obstack.m4: Use m4_pattern_allow directly.

2001-08-17  Akim Demaille  <akim@epita.fr>

	* modules/m4.c (m4_dumpdef): Output to stderr, not m4_debug.
	(m4_errprint): Use fputs.
	* doc/m4.texinfo (Invoking m4) <--error-output>: errprint and
	dumpdef are not concerned.
	(Dumpdef, Errprint): Emphasize their insensitivity to
	--error-output.
	* doc/Makefile.am: Add `TAGS' support.
	(MAINTAINERCLEANFILES): Remove texinfo.tex and mdate-sh which are
	in `config/' now.
	* config/Makefile.am (MAINTAINERCLEANFILES): New.

2001-08-17  Akim Demaille  <akim@epita.fr>

	* modules/Makefile.am (ETAGS_ARGS): New.

2001-08-17  Akim Demaille  <akim@epita.fr>

	* m4/symtab.c (m4_hack_all_symbols, m4_lookup_symbol): Formatting
	changes.

2001-08-17  Akim Demaille  <akim@epita.fr>

	* m4/builtin.c (m4_macro_define): Do not reset SYMBOL_TRACED.

2001-08-17  Akim Demaille  <akim@epita.fr>

	* m4/m4module.h (m4/list.h): Don't include it.

2001-08-16  Gary V. Vaughan  <gary@gnu.org>

	m4_modules are no more, we use lt_dlhandles directly and let
	latest libltdl features manage the list of loaded modules.
	* acinclude.m4: Regenerated.
	* m4/ltdl.c: Updated from master copy.
	* m4/module.c: Reimplemented to take advantage of advances in
	libltdl.
	* m4/builtin.c (m4_builtin_find_by_name): Traverse loaded module
	list with lt_dlhandle_next.
	(m4_builtin_find_by_func): Ditto.
	(m4_builtin_table_install): Use lt_dlhandle.
	(m4_macro_define): Ditto.
	(m4_macro_table_install): Ditto.
	m4/module.h: Prototype new module management API.
	(m4_modules): No longer required.
	(m4_module_init_t, m4_module_finish_t): POSIX namespace
	violations, renamed to...
	(m4_module_init_func, m4_module_finish_func): ...these,
	respectively.
	(M4INIT_HANDLER): Clean way to declare init functions in modules.
	(M4FINISH_HANDLER):  And similarly for finish functions.
	* m4/system.h (_CONC): Used by M4INIT_HANDLER and M4FINISH_HANDLER
	-- Add indirection to the CONC macro so that arguments are
	correctly expanded.
	* modules/modtest.c (m4_init_module):  Replaced with M4INIT_HANDLER.
	* modules/shadow.c (m4_init_module):  Ditto.
	Due to new init function semantics, be careful to perform the
	initialisation only on first load.
	* modules/perl.c (m4_init_module):  Ditto. And Ditto.
	(m4_finish_module): Replaced with M4FINISH_HANDLER.
	Due to new finish function semantics, be careful to perform the
	finalisation only on first load.
	* m4/m4private.h (m4_module): Removed in favour of...
	(m4_module_data): ...structure without all the wrapper fields.
	Instances of this new structure are stored associated lt_dlhandles
	with lt_dlcaller_data_set().
	* m4/builtin.c (m4_builtin_define): Takes a handle argument
	instead of the old module argument.
	(m4_builtin_table_install): Ditto.
	* modules/load.c (m4_resident_module):  Removed.  This is no
	longer implemented as a magic symbol...
	* modules/m4.c (m4_resident_module): Ditto.
	* modules/load.c (M4INIT_HANDLER): ...the module init function now
	uses the ltdl api to make the module resident.
	* modules/m4.c (M4INIT_HANDLER): Ditto.
	* modules/load.c (builtin_modules): Traverse the loaded module
	list with lt_dlhandle_next.
	(builtin_load): Much simplified in light of the reimplemented
	module loader.
	* src/freeze.c (produce_module_dump):  Cleaned up and optimised in
	light of the m4/module.c rewrite.
	(produce_symbol_dump): Ditto.
	(reload_frozen_state): Ditto.
	* m4/list.c, m4/list.h: Files deleted.  No longer required.
	* m4/Makefile.am (pkginc_HEADERS): Delete list.h reference.
	(libm4_la_SOURCES): Delete list.c reference.
	* m4/m4private.h (m4_token_data):  Add a handle field.  This
	eliminates many of the searches to find the handle associated with
	various tokens that are passed between functions.
	(struct m4_symbol):  Removed the module field.  The
	module association does not belong with the symbol...
	* m4/input.c (struct m4_builtin): ...it belongs with the builtin
	that the module implementation code is from.  Added a handle
	field.
	(m4_push_macro): Add a `handle' argument.  Changed all callers.
	(init_macro_token):  Set the `handle' field for the
	m4_token_data.
	* m4/macro.c (expand_argument): Copy the new handle field during
	reassignment.
	* modules/m4.c (macro_install): Use the new handle field to
	optimise the search for the correct builtin structure, and pass
	the handle details to m4_builtin_define.

2001-08-15  Akim Demaille  <akim@epita.fr>

	* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Be sure `m4/' exists
	when creating `m4/obstack.h'.
	* tests/Makefile.am (TESTS_ENVIRONMENT): Pass top_srcdir and
	top_builddir.
	* tests/defs: Make them absolute.
	(CDPATH) Neutralize.
	* tests/gethem: Use them.

2001-08-14  Gary V. Vaughan  <gary@gnu.org>

	* config/ltmain.sh: Doh!  Import again for a quoting fix that
	prevented any regression test from passing.

	* m4/m4module.h (obstack.h): Choose between installed version
	and shipped version based on configure tests.
	* src/freeze.c (obstack.h): Ditto.

	* acconfig.h: Removed.  No longer required.

	* bootstrap: Rewritten to play nicely with Autoconf 2.5x.
	* configure.in (MY_NAME, MY_VERSION): Define these once, and feed
	them to AC_INIT and AM_INIT_AUTOMAKE.
	* Makefile.am (AUTOMAKE_OPTIONS): Remove `gnits' which would
	disallow MY_NAME and MY_VERSION arguments to AM_INIT_AUTOMAKE.
	* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Don't choke on
	shell variable m4_cv_func_obstack_h.
	* tests/defs (M4): Be more careful about relative path to libtool
	script and m4 binary by using $srcdir.

	* src/main.c (main): Use lt_dlinsertsearchdir to prepend -M
	optargs to the existing libltdl search path.
	* acinclude.m4: Regenerate from latest libtool,m4 and ltdl.m4.
	* m4/ltdl.c: Updated.
	* m4/ltdl.h: Ditto.
	* config/ltmain.sh: Ditto.

2001-08-11  Gary V. Vaughan  <gary@gnu.org>

	* src/main.c (main): Add `-b' (for `batch') mode switch to force
	interactive mode off.

2001-08-10  Akim Demaille  <akim@epita.fr>

	* configure.in: Require Autoconf 2.52.
	(AC_ARG_PROGRAM): Remove, handled by Automake.
	(m4_getopt): Rename as...
	(m4_getopt_h): this.
	Allow the tokens `m4_cv_*', `m4_top_srcdir', and `m4_getopt_h'.
	Undefine `changeword' only if defined.
	* config/gnu-obstack.m4: Require Autoconf 2.52.
	(M4_AC_FUNC_OBSTACK): Rename `m4_obstack' and `m4_obstack_h'.
	Allow this token.

2001-08-09  Yuji Minejima  <ggb01164@nifty.ne.jp>

	* doc/m4.texinfo: Fix some typos, and apply some small
	clarifications.

2001-08-09  Andreas Schwab  <schwab@suse.de>

	* src/main.c (main): Fix improper uses of error (missing format
	string).

2001-08-07  Akim Demaille  <akim@epita.fr>

	Improve `make distcheck'.

	* configure.in: Be sure to be able to run `mkconfig.sh' when src
	!= build.
	* Makefile.am (dist-hook): Remove, as it is no longer needed.
	* doc/m4.texinfo (Include): Add missing blank.
	* m4/Makefile.am (EXTRA_DIST): Distribute gnu-obstack.h and
	obstack.c.

2001-08-07  Akim Demaille  <akim@epita.fr>

	* m4/evalparse.c: A better introductory comment.
	* m4/m4module.h (M4_DEBUG_PRINT2): s/M4_debug/m4_debug/.
	* m4/macro.c: Adjust old comments.
	* modules/README: Typo.

2001-08-07  Akim Demaille  <akim@epita.fr>

	* config/gnu-obstack.m4: New.

2001-08-07  Akim Demaille  <akim@epita.fr>

	* config/Makefile.am, config/stackovf.m4: New.
	* configure.in, Makefile.am: Adjust.

2001-08-05  gettextize  <bug-gnu-utils@gnu.org>

	* po/Makefile.in.in: Upgrade to gettext-0.10.39.
	* po/cat-id-tbl.c: Remove file.
	* po/stamp-cat-id: Remove file.

2001-04-08  Roderick Koehle <Roderick.Koehle@infineon.com>

	* modules/format.c (format):  Formatting for %f was not
	interpreting the position of the decimal point correctly for
	whole numbers.

2000-12-01  Gary V. Vaughan  <gary@gnu.org>

	* TODO:  Removed m4exit bug.
	* modules/load.c (m4_resident_module): Make this module resident.
	* module/m4.c (m4_resident_module): Ditto.
	* m4/modules.c (m4_module_load):  Use new ltdl resident modules
	feature to mark modules as resident if they export
	`m4_resident_module' as TRUE.
	(m4_module_unload): Do not remove resident modules, and take care
	with symbol insertion and deletion with resident modules.
	* m4/ltdl.c, m4/ltdl.h: Update to latest unreleased versions to
	use resident modules feature.

2000-11-30  Gary V. Vaughan  <gary@gnu.org>

	* TODO: Updated.  Removed some cruft that has since been fixed
	or implemented.  Added some more entries.
	* NEWS: Updated.
	* README: Updated.
	* modules/README: Updated.
	* doc/m4.texinfo: Updated.

	* modules/gnu.c (builtin_functions): Make indir orthogonal to
	builtin, in that each is recognised as a macro only with parameters
	(builtin_indir): Passing 0 arguments is now an error, as with
	builtin.

	* src/main.c (usage): Added missing description of `-c' option.

2000-11-29  Gary V. Vaughan  <gary@gnu.org>

	Consolidate the myriad of dispersed test scripts into the
	tests subdirectory.  I think I now have all the file where I
	want them, so there shouldn't be anymore upheaval =)O|
	Honest!
	* tests/Makefile.am: Updated to run the new tests added below.
	* tests/other-tests/capitalize.test, tests/other-tests/comments.test,
	tests/other-tests/ddivert.test, tests/other-tests/debug.test,
	tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
	tests/other-tests/foreach.test, tests/other-tests/forloop.test,
	tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
	tests/other-tests/hanoi.test, tests/other-tests/include.test,
	tests/other-tests/indir.test, tests/other-tests/misc.test,
	tests/other-tests/modfreeze.test, tests/other-tests/modpath1.test,
	tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
	tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
	tests/other-tests/multiquotes.test, tests/other-tests/patsubst.test,
	tests/other-tests/pushpop.test, tests/other-tests/regexp.test,
	tests/other-tests/reverse.test, tests/other-tests/shadow.test,
	tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
	tests/other-tests/translit.test, tests/other-tests/undivert.test,
	tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
	tests/other-tests/wrap.test:  New tests based on the contents
	of the tests removed below.
	* examples/Makefile.am, modules/Makefile.am:  Updated to
	reflect removed tests.
	* examples/defs,modules/defs: Removed.
	* examples/capitalize.test, examples/comments.test,
	examples/ddivert.test, examples/debug.test,
	examples/esyscmd.test, examples/exp.test,
	examples/foreach.test, examples/forloop.test,
	examples/fstab.test, examples/hanoi.test,
	examples/include.test, examples/indir.test,
	examples/misc.test, examples/multiquotes.test,
	examples/patsubst.test, examples/pushpop.test,
	examples/regexp.test, examples/reverse.test,
	examples/sysv-args.test, examples/trace.test,
	examples/translit.test, examples/undivert.test,
	examples/wrap.test, modules/frozen.m4, modules/modfreeze.test,
	modules/modpath1.test, modules/modpath2.test,
	modules/modpath3.test, modules/modpath4.test,
	modules/modtest.test, modules/shadow.test,
	modules/unfrozen.m4, modules/unload.test: Removed.

	Move the implementation of GMP support for the mpeval() builtin
	into a loadable module that depends on libgmp.  mpeval() and
	eval() share a common parser, now in m4/evalparser.c; the code
	in m4/numb.c and m4/numb.h is now physically split between
	m4/eval.c (the eval() backend) and modules/mpeval.c (the
	mpeval() backend), rather than being differentiated by cpp
	macros and multiple inclusion.  The mpeval module is always
	built but will generate an diagnostic if it is used from an
	installation that didn't link in the gmp library.
	* modules/Makefile.am: build and install the new mpeval module.
	* modules/mpeval.c: Now contains the former parts of m4/numb.c
	and m4/numb.h that are required for gmp support in mpeval().
	* m4/Makefile.am (libm4_la_SOURCES): Removed evalmp.c.
	* m4/evalmp.c:  Removed.
	* m4/m4module.h: Removed conditional prototype for
	m4_mp_evaluate().
	* m4/eval.c: Rewritten.  Contains the former parts of m4/numb.c
	and m4/numb.h that do not rely on gmp.
	* m4/evalparse.c:  New file, contains the shared parts of the
	eval() and evalmp() parser implementations, and is no longer
	unencumbered by cpp magic to uncover the right parts.
	* m4/numb.h:  Removed.  It's former contents are split between
	m4/eval.c and modules/mpeval.c.
	* m4/numb.c: ditto.

	* tests/other-tests/changeword.test: New test.  Rudimentary
	testing of changeword builtin runs only if --wnable-changeword
	was used at configure time.
	* tests/mkconfig.sh: Solaris sed (at least) does not parse nested
	alternation correctly.  Split into two expressions to compensate.
	* m4/input.c (m4_input_init): Use m4_ prefix on m4_set_word_regexp.
	* modules/Makefile.am: Build changeword module.
	* modules/changeword.c (m4_macro_table): Define __m4_changeword__
	only when --enable-changeword was passed to configure.
	(builtin_changeword): If --enable-changeword was not used, then
	report that changeword() builtin has no support in m4 binary.

2000-11-28  Gary V. Vaughan  <gary@gnu.org>

	* src/main.c (main): Fixed a particularly nasty bug is
	user_search_path setting -- the -M flag processing must be
	extremely careful with search path ordering, or else the default
	installed module directory (possibly containing modules from a
	previous release) is placed earlier in the search path than any -M
	arguments (which are relied upon to load uninstalled modules with
	most of the tests in the regresion suite).

	* modules/load.c (builtin_load):  Nasty hack to prevent adding
	symbols to symtab again if a module is loaded more than once.
	* modules/m4.c (builtin_ifelse): removed unused variable argv0.

	* m4/symtab.c (m4_remove_table_reference_symbols):  Fixed a
	possible NULL pointer dereference.

	* m4/module.c (m4_module_find_by_modname): Renamed from
	m4_module_modname_find.   Fixed all references.
	(m4_module_find_by_builtin):  New function.

	* modules/modfreeze.test: load the `load' module with each
	invocation.
	* src/freeze.c (produce_frozen_state): Simplified in light of
	module field in m4_symbol.  Allow a third argument for text macros
	to name the originating module.
	(reload_frozen_state): ditto.
	* m4/m4module.h:  Fixup prototypes.
	* m4/builtin.h (m4_builtin_define): Add a module argument so
	that symbols can be registered against the defining module.
	(m4_macro_define): ditto.
	* m4/m4private.h (m4_symbol): Make the module field const to save
	on casting in the rest of the code.
	(SYMBOL_MODULE): New macro.

	* m4/symtab.c (m4_remove_table_reference_symbols): Fixed stupid
	symbol reference maintenance bugs when removing a symbol from the
	symtab.

	* src/stackovf.c (setup_stackovf_trap): Fixed some memory leaks.

2000-11-27  Gary V. Vaughan  <gary@gnu.org>

	* configure.in (m4_cv_func_obstack): A better check for whether
	libc has an obstack implementation.
	* m4/Makefile.am (EXTRA_libm4_la_SOURCES): add gnu-obstack.h.

	* configure.in (--with-modules): Changed semantics.  This
	option is now used to list modules to be preopened.
	* src/m4.h: #include "ltdl.h" unconditionally.
	* src/main.c: Removed all dependencies on WITH_MODULES.
	* src/freeze.c: ditto.
	* modules/Makefile.am: ditto.
	* m4/m4.c (builtin_m4exit): ditto.
	* modules/modpath1.test: ditto.
	* modules/modpath2.test: ditto.
	* modules/modpath3.test: ditto.
	* modules/modpath4.test: ditto.
	* modules/modtest.test: ditto.
	* modules/shadow.test: ditto.
	* modules/unload.test: ditto.

	* m4/Makefile.am (libm4_la_SOURCES): Removed obstack.c, since it
	comes up on demand in LTLIBOBJS now.
	* configure.in (getopt_long):  Creating and relying on a link for
	getopt.h on hosts with no getopt_long() of thier own works
	correctly now.  This is necessary so that callers of getopt_long()
	can simply `#include <getopt.h>': the naive way of doing this
	would end up using our own getopt.h and the installed
	getopt_long(), which is asking for trouble!
	(obstack_init): A similar argument applies to obstack.h and
	obstack_init().

	* m4/ltdl.c: Upgraded to latest bleeding edge version again.
	On Solaris-2.5 (at least) the native dlopen implementation
	gets confused about m4.o when looking for module "m4".  This
	version always looks for .la an .$lib_ext suffixed names first
	to work around the problem.  Sigh.

	* po/POTFILES.in: Take account of these file movements.
	* src/Makefile.am (m4_SOURCES): removed eval.c.
	(EXTRA_m4_SOURCES): removed numb.c and numb.h.
	* m4/Makefile.am (libm4_la_SOURCES): added eval.c.
	(EXTRA_libm4_la_SOURCES): added numb.c and numb.h.
	* modules/m4.c (builtin_eval): Use m4_evaluate().
	* m4/eval.c: Moved here from src/eval.c to facilitate
	implementation of eval() builtin as part of the `m4' loadable
	module.
	(m4_evaluate): renamed from evaluate for namespace cleanliness.
	* m4/numb.c: Moved here from src/numb.c, since it is #included
	into eval.c at compile time.
	* m4/m4module.h (m4_evaluate): Added prototype.
	* src/m4.h (evaluate): Removed prototype.

2000-11-25  Gary V. Vaughan  <gary@gnu.org>

	* modules/perl.c (builtin_perleval):  Use PL_na for
	compatibility with perl-5.6.

	* src/main.c (main):  It is now safe to
	``m4_module_install("m4")'', without tripping over the m4
	binary itself!
	* m4/ltdl.h, m4/ltdl.c: Upgraded to latest bleeding edge
	versions having fixed the insidious module search order bug.

	* m4/Makefile.am (libm4_la_LIBADD): New magic -- we are
	supposed to be using @LIBADD_DL@; @DLLDFLAGS@ is dead.

	* configure.in: Figure out whether to use the installed
	getopt.h or the supplied one.
	* src/Makefile.am: ditto.

	* po/POTFILES.in: List files in their new positions.

	* config/ltmain.sh:  This needs to be checked in to match the
	libtool macros copied to acinclude.m4 (until a released
	libtool copes with m4's needs).
	* bootstrap:  Run gettextize.

2000-11-24  Gary V. Vaughan  <gary@gnu.org>

	* AUTHORS:  Added my details.
	* TODO: updated.
	* NEWS: updated.
	* bootstrap: temporary update until released libtool catches up.

	* All files:  Use new GNU GPL copyright blurb with current contact
	address.

	* configure.in (LTLIBOBJS): Use canonical code for calculation of
	this variable.

	* config: renamed acm4 directory to config to be more like
	other autoconfiscated packages.

	* configure.in (M4_AC_CHECK_DEBUGGING): Use it.
	* config/debug.m4:  New file implementing configure macros to add
	suitable debug flags to the compiler invocation.

	* modules/load.c:  New file implementing the ``load'' and
	``unload'' builtins.
	* tests/get-them:  Set the module search directory to the modules
	build directory in generated tests.
	* modules/shadow.test: ditto.
	* modules/modtest.test: ditto.
	* modules/modpath1.test: ditto.
	* modules/modpath2.test: ditto.
	* modules/modpath3.test: ditto.
	* modules/modpath4.test: ditto.
	* modules/modtest.test: ditto.
	* modules/modfreeze.test: ditto.
	* modules/unload.test: ditto.

	* modules/changeword.c:  New file implementing the ``changeword''
	builtin as a loadable module.
	* modules/mpeval.c:  New file implementing the ``mpeval'' builtin
	as a loadable module.

	* src/main.c (main):  Load the gnu module if m4 was started
	normally -- i.e. without the -G option.
	* modules/gnu.c:  New file implementing a new loadable module wuth
	definitions for all the gnu extension builtins.
	* modules/format.c:  Moved here from src/format.c.  Now included
	directly by gnu.c.

	* src/main.c (main):  Load the traditional module if m4 was
	started in `no_gnu_extensions' mode.
	* modules/traditional.c:  New file implementing the ``unix'' macro,
	required when m4 is executed in traditional mode, as a loadable
	module.

	* src/main.c:  Renamed from m4.c to avoid confusion with
	modules/m4.c.
	(main):  Always load the m4 module.
	* modules/m4.c:  New file implementing a new loadable module with
	definitions for all m4 builtins that are not gnu extensions.

	* m4/Makefile.am:  Adjusted to take new files below into account.
	* m4/m4module.h: Prototypes for exported functions and types moved
	to this directory from the src directory.
	* m4/m4private.h: Moved here from src/m4private.h to facilitate
	the migration of all builtin implementations to loadable modules.
	* m4/macro.c: Moved this file here from the src directory,
	renaming all exported symbols to use the prefix ``m4_''.
	* m4/builtin.c: ditto.
	* m4/module.c: ditto.
	* m4/symtab.c: ditto.
	* m4/debug.c: ditto.
	* m4/input.c: ditto.
	* m4/output.c: ditto.
	* m4/path.c: ditto.
	* m4/ltdl.h, m4/ltdl.c: ditto.
	* m4/utility.c: Odd functions moved here from files in the src
	directory to facilitate builtin migration.

2000-08-12  Gary V. Vaughan  <gary@gnu.org>

	* src/builtin.c (dump_symbols): Use "Undefined name `%s'" for
	error message, to make translators' jobs a little easier.
	(builtin_builtin): ditto.
	(builtin_traceon): ditto.
	(builtin_traceoff): ditto.
	Reported by Akim Demaille <akim@epita.fr>

	* m4/Makefile.am (pkgincdir):  Deleted.  Use automake's built in
	pkgincludedir instead.

	* m4/m4module.h (rquote): Renamed with a prefix of `m4_' since
	it is exported globally.  Fixed all references.
	(lquote): ditto.
	(bcomm): ditto.
	(ecomm): ditto.
	(DEF_RQUOTE): Renamed with a prefix of `M4_' since it is exported
	globally.  Fixed all references.
	(DEF_LQUOTE): ditto.
	(DEF_BCOMM): ditto.
	(DEF_ECOMM): ditto.

2000-07-28  Gary V. Vaughan  <gary@gnu.org>

	* NEWS: updated.
	* TODO: updated.

	* configure.in (AC_CHECK_FUNCS): added bzero and calloc.
	(AC_OUTPUT): touch stamp-h.in, not stamp-h.

	* doc/m4.texinfo: Fixed to work with --html option of makeinfo.
	Removed `Prev', `Next' and `Up' fields of all @nodes now that
	makeinfo calculates them for us, and to make any future
	reorganisation easier.
	(Frozen files): Document format version 2.
	`V' now takes argument `2'.
	`F' can take a single argument if symbol and builtin names
	are the same, or 3 arguments if the builtin is from a module.
	New `S' specification for saving syntax table contents.
	New `M' specification for saving loaded module names.
	* src/freeze.c: Implement them.
	* src/input.c (syntax_code): For interpreting frozen syntax
	state.

	* examples/Makefile.am:  Add the contents of the WWW directory to
	the distribution.
	* examples/WWW/Makefile:  ditto,
	(%.htm): Compares file contents (not just sizes) to determine
	whether a change has occured.
	* examples/WWW/_header.htm: Bumped version number.
	* examples/WWW: Regenerated content.

	* m4/Makefile.am (AUTOMAKE_OPTIONS): Support for non-ANSI
	compilers comes much easier without ansi2knr.
	* src/Makefile.am (AUTOMAKE_OPTIONS): ditto.

	* m4/list.c: New generic list container type.
	* m4/list.h: Interface to new container type.
	* m4/Makefile.am (pkginc_HEADERS): Install list.h.
	(libm4_la_SOURCES): compile and link list.c.
	* src/builtin.c (builtin_tables): Use list container.
	* src/module.c (symtab): ditto.
	* src/symtab.c (symtab): ditto.

	* m4/system.h: New file for common preprocessor definitions.
	* m4/Makefile.am (pkginc_HEADERS): install system.h.
	* m4/error.c: Use system.h in place of inline preprocessor.
	* m4/error.h: ditto.
	* m4/module.c: ditto.
	* m4/module.h: ditto.
	* m4/xmalloc.c: ditto.

	* m4/error.h (error_one_per_line): Make M4_GLOBAL_DATA for WIN32
	compatibility.
	* m4/xmalloc.c (xmalloc_exit_failure): ditto.

	* m4module.h (syntax_table): Renamed with a prefix of `m4_' since
	it is exported globally.  Fixed all references.
	(builtin): ditto.
	(module_init_t): ditto.
	(module_finish_t): ditto.
	(token_data): ditto.
	(SYNTAX_OTHER): Renamed with a prefix of `M4_' since
	it is exported globally.  Fixed all references.
	(SYNTAX_IGNORE): ditto.
	(SYNTAX_SPACE): ditto.
	(SYNTAX_OPEN): ditto.
	(SYNTAX_CLOSE): ditto.
	(SYNTAX_COMMA): ditto.
	(SYNTAX_DOLLAR): ditto.
	(SYNTAX_ACTIVE): ditto.
	(SYNTAX_ESCAPE): ditto.
	(SYNTAX_ALPHA): ditto.
	(SYNTAX_NUM): ditto.
	(SYNTAX_ALNUM): ditto.
	(SYNTAX_LQUOTE): ditto.
	(SYNTAX_RQUOTE): ditto.
	(SYNTAX_BCOMM): ditto.
	(SYNTAX_ECOMM): ditto.
	(SYNTAX_VALUE): ditto.
	(SYNTAX_MASKS): ditto.
	(IS_OTHER): ditto.
	(IS_IGNORE): ditto.
	(IS_SPACE): ditto.
	(IS_OPEN): ditto.
	(IS_CLOSE): ditto.
	(IS_COMMA): ditto.
	(IS_DOLLAR): ditto.
	(IS_ACTIVE): ditto.
	(IS_ESCAPE): ditto.
	(IS_ALPHA): ditto.
	(IS_NUM): ditto.
	(IS_ALNUM): ditto.
	(IS_LQUOTE): ditto.
	(IS_RQUOTE): ditto.
	(IS_BCOMM): ditto.
	(IS_ECOMM): ditto.
	(TOKEN_EOF): ditto.
	(TOKEN_NONE): ditto.
	(TOKEN_STRING): ditto.
	(TOKEN_SPACE): ditto.
	(TOKEN_WORD): ditto.
	(TOKEN_SIMPLE): ditto.
	(TOKEN_MACDEF): ditto.

	* m4/m4module.h (voidstar): Removed in favour of `VOID' for
	consistency.  Fixed all references.
	(STRING): Renamed to `m4_string' for consistency, and because if
	is exported globally.  Fixed all references.
	(token_type): Renamed to `m4_token_t' for the same reasons.
	(token_data_type): Renamed to `m4_token_data_t' for the same
	reasons.

	* m4/m4module.h (XCALLOC): Wrapper macro which handles type
	sizes.
	(XMALLOC): ditto.
	(XREALLOC): ditto.
	(XFREE): Wrapper macro which avoids freeing NULL pointers.

	* m4/m4module.h (m4_macro):  New type for module defined user
	macros.
	* modules/modtest.c (m4_macro_table):  Define module user macros.
	* modules/shadow.c (m4_macro_table):  ditto.

	* m4/m4module.h (M4BUILTIN_HANDLER):  For defining handlers
	declared with M4BUILTIN.

	* m4/xmalloc.c: Use memset if bzero is not available when
	emulating calloc with malloc.
	(xcalloc): Fallback to malloc/bzero if calloc is not available.
	(xfree): Added for consistency.  Will not try to free NULL
	pointers.
	* src/m4.c (xfree):  Deleted in favour of the above.
	* m4/xmalloc.c (WITH_DMALLOC): preprocess away the entire file if
	linking with libdmalloc.
	* m4/xstrdup.c (WITH_DMALLOC): ditto.

	* modules/frozen.m4:  New test case.
	* modules/unfrozen.m4:  ditto.
	* modules/modfreeze.test:  New test.
	* modules/unload.test:  ditto.
	* modules/Makefile.am (EXTRA_DIST):  Distribute them.
	(TESTS): Use them.
	* modules/modpath1.test:  Don't try this test if module support is
	not compiled in.
	* modules/modpath2.test: ditto.
	* modules/modpath3.test: ditto.
	* modules/modpath4.test: ditto.
	* modules/modtest.test: ditto.
	* modules/shadow.test: ditto.

	* modules/perl.c: New module.
	* modules/perl.m4: Example of using it.
	* modules/Makefile.am (perl_la_SOURCES):  Build new perl module.

	* src/m4.c (main): Assume interactive mode if STDIN is connected
	to a tty.
	Changed startup sequence slightly so that syntax is not
	initialised from here when loading a frozen file.

	* src/builtin.c:  Much improved macro definition style.
	* src/m4private.h:  Internal structures for m4_builtin and
	m4_macro instances.  These are not exposed to module writers.
	* src/module.c (module_modname_find):  Find a module structure
	from the its name.
	(make_macro_table):  Build an internal macro table from a external
	definition.
	(make_builtin_table):  Build an internal builtin table from an
	external definition.

	* src/module.c (module_unload): Be extremely careful to remove
	builtins and macros that match the module being unloaded -- no
	longer assume that the top element can be removed incase another
	odule defines an identical name.
	* src/symtab.c (remove_table_reference_symbols): remove all symbol
	table entries which refer to a given builtin table.
	* src/builtin.c (remove_tables): Use it!

2000-07-13  Thomas Tanner  <tanner@ffii.org>

	* Makefile.am (SUBDIRS): we need modules/ for "make dist"
	* acm4/modules.m4: deleted
	* bootstrap: don't libtoolize libltdl!
	* configure.in: AC_SUBST INCLTDL and LIBLTDL, -with-modules flag:
	if set, enable WITH_MODULES and add modules to DLPREOPEN
	* examples/misc.test: redirect standard output
	* lib/Makefile.am: don't use DLLDFLAGS
	* lib/m4module.c: include necessary headers to silence GCC -Wall
	* lib/m4regex.c: fixes to silence GCC -Wall
	* modules/Makefile.am: don't use DLLDFLAGS, add INCLTDL to INCLUDES,
	  build modules conditionally
	* modules/shadow.c: define symbol aliases before using them
	* modules/test.c: define symbol aliases before using them
	* po/de.po: update translation
	* src/Makefile.am: delete pathconf.h, set MODULE_PATH to
	pkglibexecdir, don't use DLLDFLAGS, add INCLTDL to INCLUDES and
	LIBLTDL to LIBS.
	* src/m4.c: initialize libltdl's preloaded symbols via
	LTDL_SET_PRELOADED_SYMBOLS
	* src/module.c: libltdl's memory management must be initialized
	before calling lt_dlinit!, fix warnings

2000-01-18  Gary V. Vaughan  <gary@gnu.org>

	* README:  Caveat about nls not supported by dll architecture on
	Windows.

	* TODO (MODULE SPECIFIC ISSUES): more ideas for the future.

	* tests/Makefile.am (stamp-TESTS):  now works with VPATH.
	* src/Makefile.am (m4_LDADD):  use $(builddir) for VPATH.
	* modules/Makefile.am (LIBS): ditto.
	(INCLUDES): search $(top_srcdir) (for eg. <m4/error.h>) and then
	$(top_srcdir)/m4 (for only <m4module.h>).
	* modules/shadow.test: fixed for VPATH.
	* modules/modtest.test: ditto.
	* modules/modpath4.test: ditto.
	* modules/modpath3.test: ditto.
	* modules/modpath2.test: ditto.
	* modules/modpath1.test: ditto.

	* modules/time.test: Removed due to timezone dependence,
	* modules/Makefile.am (TESTS): Removed time.test.

	* configure.in: Use $3 of AC_DEFINE so that we can,,,
	* acconfig.h: Remove everything except the gettext parameters.
	* acm4/gmp.m4: Add a serial number, and take advantage of $3 of
	AC_DEFINE.
	* acm4/ltdl.m4:  Updated to latest from libtool cvs.
	* acm4/modules.m4:  Remove code which duplicates ltdl.m4 and
	increment serial number.

	* Makefile.am (SUBDIRS): Moved @MODULES_DIR@ to compile before
	src dir and immediately after libm4 is built for confidence that
	it doesn't rely on the src directory.
	(SUBDIRS): Moved doc dir to the end since helptoman.pl and
	makeinfo stop the build on cygwin (because they don't work).

	* src/m4.h: use GNU standard #if HAVE_CONFIG_H ideom.

	* m4/m4private.h: ...is not a public header, so moved to src.
	Add `#include <config.h>', `#define _COMPILING_M4' and
	`#include "m4.h".
	* m4/Makefile.am (noinst_HEADERS): remove m4private.h.
	* src/Makefile.am (noinst_HEADERS): add m4private.h.
	* src/builtin.c: `#include "m4private.h"' now takes care of the
	above.  Duplicates removed.
	* src/debug.c: ditto.
	* src/eval.c: ditto.
	* src/evalmp.c: ditto.
	* src/format.c: ditto.
	* src/freeze.c: ditto.
	* src/input.c: ditto.
	* src/m4.c: ditto.
	* src/macro.c: ditto.
	* src/module.c: ditto.
	* src/numb.h: ditto.
	* src/output.c: ditto.
	* src/path.c: ditto.
	* stackovf.c: ditto.
	* symtab.c: ditto.

	* po/POTFILES.in: compensate for renaming of lib/*.
	* m4/Makefile.am (CLEANFILES): @EXEEXT@ left libtool wrapper behind.
	(INCLUDES): Look first in $(top_srcdir) (for eg. <m4/error.h>),
	and then in $(top_srcdir)/lib (for eg. "m4private.h").
	* src/Makefile.am (m4_LDADD): replace libi/libm4.la with
	m4/libm4.la.
	* m4/m4error.h:  Renamed error.h, for installation to
	$prefix/include/m4..
	* m4/m4obstack.h:  Renamed obstack.h, for same reason.
	* m4/m4regex.h: Renamed regex.h, for same reason.
	* m4/m4error.c:  Renamed error.c, and use #include "error.h".
	* m4/m4obstack.c: Renamed obstack.c, and fix #includes.
	* m4/m4regex.c: Renamed regex.c, and fix #includes.

	* lib: moved to m4 to easily support header installation to
	$prefix/include/m4.
	* Makefile.am (SUBDIRS): renamed lib dir to m4.
	* configure.in (AC_OUTPUT): reference m4/Makefile.in.
	* acm4/regex.m4: Point to m4/regex.c.

	* examples/foreach.m4:  Sanitise quoting.
	* examples/foreach.test:  New torture test.
	From Akim Demaille <akim@epita.fr>

2000-01-17  Gary V. Vaughan  <gary@gnu.org>

	* src/ltdl.c: Use access() to abort doomed module load attempts
	if module file does not exist.

	* src/Makefile.am (m4_SOURCES, EXTRA_SOURCES): getopt.o and
	getopt1.o will already be used if appropriate, so I moved getopt.c
	and getopt1.c from m4_SOURCES to EXTRA_SOURCES.

	* modules/modpath1.test: Use correct filename in header line.
	* modules/modpath2.test: ditto.
	* modules/modpath3.test: ditto.
	* modules/modpath4.test: ditto.

	Without these changes lt_dlopen("test") attempts to
	LoadLibrary("/bin/test") on Windows, which although harmless
	generates a spurious error message which spoils most of the tests:
	* modules/Makefile.am (EXTRA_DIST): s/test.m4 /modtest.m4 /
	(TESTS): s/test.test /modtest.test /
	(pkglibexec_LTLIBRARIES): s/test.la /modtest.la /
	(test_la_SOURCES, test_la_LDFLAGS): renamed to use modtest.
	* modules/modpath1.test: s/test.m4 /modtest.m4 /
	* modules/modpath2.test: ditto.
	* modules/modpath4.test: ditto.
	* modules/modpath3.test: s/-m test /-m modtest /
	* modules/shadow.m4: use {un,}loadmodule(`modtest').

2000-01-16  Gary V. Vaughan  <gary@gnu.org>

	* src/ltdl.c (find_file): Updated to new version with fixed memory
	allocation bug in `next'.
	* src/ltdl.h: updated to match.

	* modules/Makefile.am:  Cleaned up and reordered.

2000-01-16  René Seindal  <rene@seindal.dk>

	* modules/Makefile.am (TESTS): New tests for the module system.

	* modules/*.test: New files.

	* src/m4.c (main): Added call to module_init().
	Treats -M and -m as the arguments -D -U and -t, ie deferred.

	* src/m4.h: Added declaration of module_init().

	* src/module.c (module_init): No longer static

	* modules/Makefile.am ({test,shadow,time,stdlib}_la_LDFLAGS):
	Added to shut up automake about non standard libtool library
	names.

	* src/module.c: Disabled DEBUG by default.

	* modules/README: Changed example from unload.m4 to shadow.m4

	* modules/shadow.m4: Renamed from unload.m4

	* modules/Makefile.am (EXTRA_DIST): Removed unload.m4.

	* src/m4.c (main): Functionality for -m and -M were reversed.
	Fixed.

2000-01-12  Gary V. Vaughan  <gary@gnu.org>

	* doc/help2man.pl: updated to version 1.020.

	* lib/COPYING.LIB:  updated to version 2.1.

	* lib/m4module.h: restructure the M4_SCOPE code to work when
	creating a dll which links with libm4.la and both DLL_EXPORT
	(for the new dll) and LIBM4_DLL_IMPORT (for m4module.h) are
	both defined.

2000-01-11  Gary V. Vaughan  <gary@gnu.org>

	Merged the following changes from my tree:

	1999-06-15  Gary V. Vaughan  <gary@gnu.org>

	* configure.in (AC_LIBTOOL_WIN32_DLL): Declare that m4 has been
	ported to compile shared libs.

	* configure.in (LIBM4_DLL_IMPORT): Discover whether we need to
	use `__declspec(dllimport)' when linking libm4.la on win32.
	* src/Makefile.am (m4_LDFLAGS): Use dllimport if necessary.

	* configure.in (M4OBJS): Discover whether we need the shipped
	implementation of getopt_long.
	* src/Makefile.am (m4_LDADD): Link the getopt objects into the
	main binary here, as opposed to the module library in lib/libm4.la.

	1999-06-14  Gary V. Vaughan  <gary@gnu.org>

	* modules/README: Updated to describe the improved libltdl based
	module scheme.
	* README (cygwin): Added some compilation notes for building m4
	correctly under cygwin.
	* TODO: Cleaned out the entries for the module system since they
	are now implemented.

	* *.[ch]: __P is in the compiler's reserved namespace, so replaced
	all instances of __P with M4_PARAMS.

	* lib/getdate.h: removed unreferenced file.

	* lib/m4private.h: New file to define the private interface to the
	token_data struct, which must be shared between m4module.c, and
	builtin.c but not exported to modules built from the installed
	m4module.h since it's size changes depending on compile time
	options.

	* src/m4.h: Lots of stuff moved to lib/m4module.h.

	* lib/m4module.h: New file to define the interface available when
	compiling m4 modules.
	* lib/m4module.c: Moved parts of builtin.c, and m4.c which are
	necessary for module compilation into this new file.

	* lib/Makefile.am (include_HEADERS): install headers (renamed to
	avoid nameclash with other system headers) necessary for compiling
	modules.
	(libm4_la_SOURCES): always include error.c, obstack.c and regex.c
	so that modules can include the (renamed) installed headers and
	be guaranteed a matching implementation.
	* lib/m4error.h: renamed from error.h.
	* lib/m4obstack.h: renamed from obstack.h.
	* lib/m4regex.h: renamed from regex.h.
	* configure.in (AC_REPLACE_FUNCS):  Don't look for a system
	implementation, simply include the shipped version
	unconditionally, otherwise it is hard for a module to know
	whether the m4obstack.h header it is using matches the
	implementation it ends up linking against.
	(jm_WITH_REGEX):  Include regex into libm4 unconditionally for
	the same reason.

	1999-05-18  Gary V. Vaughan  <gary@gnu.org>

	* examples/misc.test: Don't run this test on machines which don't
	have a root user in /etc/passwd (e.g. cygwin).

	* tests/get-them (/^@example$/): Error messages might have a
	``.exe'' suffix to the program name, or else use the libtool
	``.libs/lt-m4'' binary, or generally have an unexpected path.  All
	of these cases are now catered for when comparing error messages
	in generated tests.
	* tests/other-tests/*.test: ditto.
	* examples/*.test: ditto.

	* tests/defs (M4): use libtool execute mode.
	* examples/defs (M4): ditto.

	* tests/get-them (END): explicitly close any open file.
	(printthem): In a regular expression, '{' is the start of a repeat
	count!  Use `[{]' for a literal open brace.
	(/^@node /): Don't use substr on a string shorter than the trim
	length.

	1999-05-17  Gary V. Vaughan  <gary@gnu.org>

	* configure.in (LTLIBOBJS): calculated from LIBOBJS, and
	substituted.
	(AC_LIBTOOL_DLOPEN): declare that this package will use dlopen.

2000-01-10  Andreas Schwab  <schwab@suse.de>

	* tests/other-tests/gmp.test: Find config.sh in build directory.

	* configure.in: Find tests/mkconfig.sh in $srcdir.

	* configure.in: Define HAVE_SIGINFO_T if siginfo_t is defined in
	<signal.h> (for SUS2 compliant systems).

	* src/stackovf.c: Check for HAVE_SIGINFO_T in addition to
	HAVE_SIGINFO_H.

2000-01-10  René Seindal  <rene@seindal.dk>

	* Prerelease 1.4o.

	* TODO, NEWS: Cleaned up and updated.

	* src/m4.c (main): New variable exit_status for exit status in
	case of unreadable files.  Now m4 will exit with EXIT_FAILURE if a
	file cannot be read instead of EXIT_SUCCESS.

	* src/builtin.c (m4_indir): Changed error message to help
	translators (from Akim Demaille <demaille@inf.enst.fr>).

	* lib/obstack.[hc], getopt*.[ch]: Updated to newest version from
	Cygnus.

	* lib/error.[hc], lib/regex.[hc], lib/strtol.c: Updated to version
	from glic 2.1.2.

	* src/input.c (match_input): Reordering of code, to avoid multiple
	calls to push_string_init() from obstack_grow(), which can happen
	with some compilers (found and fixed by James Bonfield
	<jkb@mrc-lmb.cam.ac.uk>).

	* src/stackovf.c: Added prototypes for ultrix.
	(setup_stackovf_trap): Added __P to cast.
	(Both reported by John David Anglin <dave@hiauly1.hia.nrc.ca>)

2000-01-09  René Seindal  <rene@seindal.dk>

	* doc/m4.texinfo (Changequote): Added comment about changing
	quotes when the old quote is a part of the new.

	* src/builtin.c (expand_ranges): Added break after trailing dash.
	This caused misbehavious on some systems (found and fixed by Akim
	Demaille <demaille@inf.enst.fr>).

	* AUTHORS: Thomas Tanner included

	* acconfig.h: Added entry for ss_sp (see below).

	* configure.in (use_stackovf): Added check for stack_t with member
	ss_base instead of ss_sp (BSDI notably).  (Reported by Paul Eggert
	<eggert@twinsun.com>).

	* doc/m4.texinfo (Frozen files): Added a simpler example for
	generating frozen files from several input files.

1999-11-14  Paul Eggert  <eggert@twinsun.com>

	* po/POTFILES.in: Add lib/getopt.c, lib/obstack.c,
	lib/regex.c, lib/xmalloc.c.

1999-11-10  René Seindal  <rene@seindal.dk>

	* Makefile.am (ACLOCAL_AMFLAGS): Passes -I acm4 to aclocal.

	* src/module.c: reindented.
	(module_load): return if this is a repeated load of same module.
	(module_init): slight change of logic to avoid repeated
	initialisation debug messages.

	* Makefile.am (DIST_SUBDIRS): Added to ensure modules/ is included
	in the distribution.

	* modules/Makefile.am (test_la_LDFLAGS): set to -module to silence
	automake warnings about missing lib prefix.
	(time_la_LDFLAGS): ditto
	(stdlib_la_LDFLAGS): ditto

1999-11-10  Paul Eggert  <eggert@twinsun.com>

	* src/m4.h: Include error.h, since our macros use error.
	* src/m4.c: Don't need to include error.h.

1999-11-09  Paul Eggert  <eggert@twinsun.com>

	* src/m4.h (voidstar): Define to void * if __STDC__ is defined
	and zero, as Solaris 7 cc does.
	(bcopy): Remove macro; no longer needed with new obstack.h.

	* src/output.c (freeze_diversions): Don't assume that a
	diversion size can fit in `int'.  Check for diversion file
	size too large to be printed with `unsigned long'.

	* src/Makefile.am (CFLAGS): Omit -Wall.

	* src/stackovf.c (setup_stackovf_trap): Remove cast to unsigned.

	* src/debug.c (trace_format):
	Use ANSI C if (defined __STDC__ && __STDC__) || defined PROTOTYPES.

	* src/freeze.c (produce_frozen_state):
	Don't assume string lengths fit in int.

1999-10-13  René Seindal  <rene@seindal.dk>

	* po/cs.po: Czech translation added.

	* po/sv.po: Updated Swedish translation.

	* po/ru.po: Updated Russian translation.

	* po/pl.po: Updated Polish translation.

	* po/el.po: Greek translation added.

1999-10-13  René Seindal  <rene@seindal.dk>

	* configure.in (ALL_LINGUAS): Added Greek translation (el).
	(ALL_LINGUAS): Added Czech translation (cs).

1999-03-30  Gary V. Vaughan  <gary@gnu.org>

	* src/builtin.c: moved module loading functions into...
	* src/module.c: entirely new implementation using libltdl.
	* po/POTFILES.in: added src/module.c.
	* modules/Makefile.am (LTLIBRARIES): Removed lib prefix as these
	are modules, not linktime libraries.
	(LDFLAGS): added -no-undefined -module and -avoid-version flags.
	* modules/stdlib.c (m4_macro_table): use <name>_LTX collision
	avoidance on exported symbols.
	* modules/test.c (m4_macro_table, m4_init_module,
	m4_finish_module): ditto.
	* modules/time.c (m4_macro_table): ditto.

	* modules/time2.m4: new file which requires command line loading
	of modules.
	* src/m4.c (--load-module): dynamically load named runtime module
	into running executable before reading the source.
	(--module-directory): prepend a directory to the module search
	path.
	(module_init()): Do this the first time we load a module instead;
	if the module subsystem is broken normal m4 scripts can still run.
	* src/m4.h (install_builtin_table): is now exported.

1999-03-26  Gary V. Vaughan  <gary@gnu.org>

	* src/module.c: removed.  No longer required.
	* po/POTFILES.in: removed src/module.c.

	* Makefile.am (MAINTAINERCLEANFILES): Remove all the files that
	the bootstrap script can recreate.
	* acm4/Makefile.am (MAINTAINERCLEANFILES): ditto.
	* doc/Makefile.am (MAINTAINERCLEANFILES): ditto.
	* examples/Makefile.am (MAINTAINERCLEANFILES): ditto.
	* lib/Makefile.am (MAINTAINERCLEANFILES): ditto.
	(AUTOMAKE_OPTIONS): reduced strictness to allow COPYING.LIB.
	* modules/Makefile.am (MAINTAINERCLEANFILES): ditto.
	* src/Makefile.am (MAINTAINERCLEANFILES): ditto.
	* tests/Makefile.am (MAINTAINERCLEANFILES): ditto.

	* acinclude.m4: removed.  `aclocal -I acm4' handles this much
	better.
	* acm4/Makefile.am (ACINCLUDE_M4): ditto.
	* acm4/gettext.m4: removed.  It causes a multiple definition vs.
	the installed gettext.m4 file when running aclocal.

1999-03-25  Gary V. Vaughan  <gary@gnu.org>

	* configure.in (AM_INIT_AUTOMAKE): bumped version number to
	distinguish this from the last prerelease.
	(AC_LIBLTDL_CONVENIENCE):  build libltdl as a convenience library
	in its own subdirectory.

	* modules/Makefile.am (*_SOURCES): renamed to use libtool's "no
	lib prefix on a module" feature.
	(LDFLAGS): Added `-module -avoid-version' flags to build
	versionless module libraries.
	* src/builtin.c (m4_load_module): use libltdl.
	(module_unload_all): use libltdl.
	* src/m4.c (module_init): initialise module loading on demand for
	better diagnostics, and so that m4 will still work even if
	the module code is broken.
	* src/m4.h (module_init): removed.  No longer relevant.
	* modules/stdlib.c (m4_macro_table): use stdlib_LTX_ prefix on
	exported symbols for compatibility with dlpreopening.
	* modules/test.c (m4_macro_table, m4_init_module,
	m4_finish_module): ditto.
	* modules/time.c (m4_macro_table): ditto.

	* bootstrap: New file.  Runs all the autoutils in the right order
	after a fresh checkout, or a make maintainer-clean.

1999-02-18  Akim Demaille  <demaille@inf.enst.fr>

	* src/builtin.c (dump_symbols): New function, factoring common
	content of m4_dumpdef and m4_symbols.
	(m4_dumpdef): Use it.
	(m4_symbols): New function, implementing `symbols'.  Use it.
	* doc/m4.texinfo: Fixed missing commas after @xref, so that the
	file compile with modern makeinfo.
	(Symbols): New node, documenting symbols.
	(direntry): Modernize.

1998-12-11  René Seindal  <rene@seindal.dk>

	* src/builtin.c (predefined_tab): New predefined macros
	__m4_changeword__, __m4_gmp__ and __m4_modules__ for testing for
	configure time options.

1998-12-01  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* src/module.c (module_try_load): Don't try to be clever and
	overwrite argument string.  Instead allocate all constructed
	strings locally, since they can have arbitrary lengths.  Make
	arguments pointers to const.
	(module_search): Simplify due to above change.

1998-11-29  René Seindal  <rene@seindal.dk>

	* Prerelease 1.4n.

	* tests/Makefile.am (OTHER_TESTS, OTHER_FILES): New tests.

	* tests/other-tests/import-environment.{m4,test}: New test.

	* tests/other-tests/discard-comments.{m4,test}: New test.

	* doc/m4.texinfo (Invoking m4): Updated for --discard-comments.

	* src/m4.c (main): New option -c --discard-comments.
	New global variable discard_comments.

	* src/m4.h (token_type): New TOKEN_NONE for tokens to be
	discarded, ie never returned from next_token().
	Added declaration of discard_comments.

	* src/input.c (next_token): Now loops until token type is not
	TOKEN_NONE.  Comments are now given this type when comments should
	be discarded.

	* doc/m4.texinfo (Invoking m4): Updated for --import-environment
	and mpeval.

1998-11-28  René Seindal  <rene@seindal.dk>

	* src/m4.c (main): New option --import-environment (no single
	letter option).

	* When configured with --with-gmp both the normal (fast) eval()
	and the gmp aware mpeval() are defined.  To restore previous
	bahaviour use "define(`eval', defn(`mpeval'))".

	* tests/other-tests/gmp.m4: Changed to use mpeval().

	* src/evalmp.c: New file for compiling eval.c as gmp aware.
	Just defines USE_GMP if WITH_GMP is defined and includes eval.c.

	* src/eval.c: Now includes "numb.c" directly.  Everything in this
	file must by static, except evaluate(), which is changed to
	mp_evaluate() if USE_GMP in force.

	* src/numb.c: Changed to be included by eval.c instead of being
	compiled separately.  Everything is declared static.

	* src/numb.h: Removed declarations of functions, as numb.c is now
	included by eval.c.

	* src/builtin.c: Declaration of m4_mpeval() added.
	Inserted `mpeval' in builtin table.
	(do_eval): New function with common code for m4_eval and m4_mpeval.
	(m4_mpeval): New function for gmp version of eval.

	* src/m4.h: Declaration of mp_evaluate().

	* src/Makefile.am (m4_SOUCES): Includes mpeval.c.
	(EXTRA_m4_SOURCES): Now has numb.c and numb.h

	* src/m4.c (main): m4 --version also shows which options were used
	for compilation, such as: "GNU m4 1.4n (options: modules gmp)"

1998-11-27  René Seindal  <rene@seindal.dk>

	* Error messages now always print program name before input file
	name as specified by GNU coding standards.  Reported by Akim
	Demaille <demaille@inf.enst.fr>.

	* doc/m4.texinfo (Include): Change due to changed error message
	format.
	(Eval): Do.

	* tests/get-them: Minor change to sed script due to changed error
	message format.

	* src/m4.c (print_program_name): New func used to print program
	name, input file and line number in error ().  Used as an
	error_print_progname handler.
	(reference_error): Removed.
	(main): Assigns error_print_progname.

	* src/m4.h (M4ERROR): Removed reference_error ().

1998-11-25  René Seindal  <rene@seindal.dk>

	* Updated to libtool 1.2b.

	* src/builtin.c (install_builtin_table): Added braces to avoid
	warning of ambiguous 'else'.

	* src/module.c: Inserted search path code from path.c modified to
	use new interface.
	(module_init): Configured default path used only if M4MODPATH is
	not set.
	(module_try_load): Now reads libMODULE.la as generated by libtool
	for actual module name.
	(module_load): Gives better error messages on failure.

	* src/m4.h: Added declarations of structures and functions for
	generic search path handling.

	* src/path.c: Removed all module specific code and introduced new
	functions of more generic search path handling.

1998-11-24  René Seindal  <rene@seindal.dk>

	* configure.in: Defines INTLINCL to -I$(top_srcdir)/intl if using
	included gettext, as <libintl.h> might not be found
	otherwise. Reported by Andrew Bettison <andrewb@zip.com.au>.

1998-11-22  René Seindal  <rene@seindal.dk>

	* src/output.c (insert_diversion): Fixed bug that might cause m4
	to read from standard output!  Triggered by input
	'divert(1)undivert(0)'.  Test for divnum>0 changed to divnum>=0,
	so now 'undivert(0)' does nothing.

1998-11-18  René Seindal  <rene@seindal.dk>

	* Prerelease 1.4m.

	* src/input.c (set_word_regexp): Fixed a bug, where word_regexp
	could be changed when compiling a illegal regexp, causing later
	use of the regexp to dump core.

	* src/module.c (module_load): Changed error message to conform to
	standards.

	* src/m4.c (usage): Added message about reporting bugs.

	* doc/m4.texinfo (Changeword): Corrected a wrong example.
	(Changeword): Added note about the type of regexps used.

	* ltconfig, ltmain.sh: New files from Libtool 1.2.

	* configure.in: Added calls to AM_ENABLE_SHARED, AM_DISABLE_STATIC
	and AM_PROG_LIBTOOL.

	* acm4/modules.m4 (AM_WITH_MODULES): Redone completely to work
	with libtool.

	* modules/Makefile.am: Changed completely to compile modules using
	libtool.  The modules are compiled as shared libraries, and are
	renamed when installed.

	* src/m4.h, src/module.c, acm4/modules.m4, acconfig.h: Renamed
	USE_SHL_LOAD to HAVE_SHL_LOAD

	* src/builtin.c (shipout_string): Now tests for a NULL string.

	* src/module.c: New level of indirection around non-portable
	functions to load shared objects.  Intended to encapsulate the non
	portable parts better and to reduce the number of #ifdefs in the
	code.

	* Makefile.am (DIST_SUBDIRS): Instead of EXTRA_DIST for added
	directory modules/ to the distribution.

1998-11-15  René Seindal  <rene@seindal.dk>

	* Prerelease 1.4l.

	* modules/stdlib.c: New module `stdlib' defining some standard
	functions: getcwd, getlogin, getpid, getppid, getuid, getpwnam,
	getpwuid, hostname, rand, srand, getenv, setenv, unsetenv, uname.

	* src/builtin.c (shipout_string): New convenience function for
	builtins and modules.

	* src/module.c (module_load): Tentative support for
	shl_load/shl_findsym, but I cannot test it.  Copied from MetaHTML.

	* Makefile.am (SUBDIRS): Directory modules added if configured.

	* modules/Makefile.am: Now correctly compiles and installs
	modules in pkglibexecdir.

	* src/m4.h: WITH_MODULES defined iff HAVE_DLOPEN or USE_SHL_LOAD.
	These two are now initialised by autoconf macros.

	* src/path.c (module_env_init): MODULE_PATH is always on the
	search path.

	* src/Makefile.am: Now generated pathconf.h which defined the
	default MODULE_PATH.

	* configure.in (pkglibexecdir): Added defintion of pkglibexecdir,
	where modules are installed.

	* acm4/modules.m4: Enhanced with code from MetaHTML, contributed
	by Brian J. Fox <bfox@datawave.net>.  This change allow modules to
	build and install automatically, and it is prepared for other
	interfacec than dlopen().

	* src/builtin.c (predefined_tab): Added __m4_version__ for the
	current version of GNU m4.  It is a GNU extension.

1998-11-14  René Seindal  <rene@seindal.dk>

	* tests/Makefile.am (GENERATED_TESTS): Added new
	generated-tests/changesy.8.test

	* doc/m4.texinfo (Changesyntax): Documentation for escape
	syntax class.

	* src/macro.c (expand_token): Check for escaped macro call before
	symbol table lookup.

	* src/builtin.c (m4_changesyntax): Added `@' flag to define escape
	characters

	* src/input.c: New static variable use_macro_escape, which is TRUE
	iff some character has code SYNTAX_ESCAPE
	(input_init): Added initialisation of use_macro_escape.
	(check_use_macro_escape): New function to synchronise
	use_macro_escape with the syntax table.
	(set_quotes): Added call to check_use_macro_escape()
	(set_comment): Do.
	(set_syntax): Do.
	(next_token): Added new case for IS_ESCAPE.

	* src/m4.h (SYNTAX_ESCAPE): Defined as simple syntax category.

1998-10-13  René Seindal  <rene@seindal.dk>

	* Prerelease 1.4k.

	* tests/Makefile.am (GENERATED_TESTS): Renamed gentest to
	generated-tests.

	* tests/Makefile.am (OTHER_TESTS, OTHER_FILES): Added manually
	maintained tests in tests/other-tests.  These currently tests for
	8-bit transparency, multiple precision arithmetic and sync-line
	output.  Test for stackoverflow detection does not work.

	* examples/Makefile.am (TESTS): Added tests for all example files.

	* examples/mktests.sh: New file.  Help program for creating test
	files.

	* tests/mkconfig.sh: New file to generate tests/config.m4 and
	tests/config.sh.  This is for tests of configure selectable
	features.  Picks up all set WITH_ and ENABLE_ veriables from
	config.h

	* src/path.c (path_search): Added argument 'char **expanded_name'
	to return the expanded name.

	* src/m4.h: Added 2nd argument to declaration of path_search().

	* src/m4.c (main): Added 2nd argument to path_search().

	* src/freeze.c (reload_frozen_state): Do.

	* src/builtin.c (m4_undivert): Do.
	(include): Do.

1998-10-11  René Seindal  <rene@seindal.dk>

	* acm4/Makefile.am (ACINCLUDES_M4): Added gmp.m4 and modules.m4

	* acm4/modules.m4: New file.  Defines AM_WITH_MODULES.

	* acm4/gmp.m4: New file.  Defines AM_WITH_GMP.

	* configure.in: Introduced AM_WITH_MODULES and AM_WITH_GMP.

	* AUTHORS, ChangeLog: Changed all dates to ISO 8601.

	* intl/: Updated to GNU gettext 0.10.35.

	* doc/m4.texinfo (Format): Documented that format is blind.

	* src/builtin.c (builtin_tab): Builtin format marked as blind.

1998-10-07  René Seindal  <rene@seindal.dk>

	* Prerelease 1.4j.

	* tests/Makefile.am (GENERATED_TESTS): Changed .m4 extension to
	.test, as the files are no longer just m4 input.

	* tests/get-them (FILE): Changed .m4 extension to .test.

	* src/m4.h (token_type): New token type TOKEN_SPACE introduced.
	Otherwise quoted strings with leading whitespace first in a macro
	argument would be eliminated.

	* src/macro.c (expand_token): Handles new token type TOKEN_SPACE.
	(expand_argument): Do.

	* src/input.c (next_token): SPACE and NUM/OTHER characters are only
	grouped together iff both quote and comment strings are single
	character.  Otherwise they might include a comment/quote leader.
	(next_token): Returns new token type TOKEN_SPACE.

	* src/builtin.c (push_builtin_table): New function to push a
	builtin_table on the stack without installing its contents.
	(find_builtin_by_name): Added call to push_builtin_table() if
	reading frozen files.  Otherwise the builtins named in the frozen
	files could not be found.
	(install_builtin_table): Changed to use push_builtin_table()

1998-10-04  René Seindal  <rene@seindal.dk>

	* po/pl.po: Polish translation added.

	* po/POTFILES.in: src/module.c added.

1998-10-04  René Seindal  <rene@seindal.dk>

	* Prerelease 1.4i.

	* configure.in (ALL_LINGUAS): Added Polish pl.po

1998-10-03  René Seindal  <rene@seindal.dk>

	* Many files: Incorporated changes to implement dynamic modules.
	Detailed comments in src/modules.c and modules/README

	* src/module.c: New file, implements the OS dependant parts of
	dynamic module loading.

	* src/Makefile.am (m4_SOURCES): Added module.c

	* src/builtin.h: New file, declares some functions from builtin.c
	that are of use for other modules (shipout_int, numeric_arg,
	skip_space, bad_argc), and the macros ARG() and DECLARE().

	* src/builtin.c (install_builtin_table): New function.  Each
	module brings in a builtin_table, which is pushed on a stack.
	(struct builtin_table): New struct for list of builtin_tables.
	(m4_loadmodule): New function to implement builtin "loadmodule".
	(shipout_int): No longer static, to be used by modules.
	(numeric_arg): do.
	(skip_space): do.
	(bad_argc): do.
	(builtin_init): changed to call install_builtin_table()
	(find_builtin_by_name): Now searches all builtin_tables
	(find_builtin_by_addr): do.

	* src/path.c: Reorganised to allow for two search paths, one for
	include files and one for modules.

	* src/m4.h: Added declarations for new functions in module.c and
	in path.c.

	* src/m4.c (main): Added call to module_init().

	* modules: New directory with a few demo modules.

	* Makefile.am (EXTRA_DIST): Added modules/* since modules/ is not
	in SUBDIRS.

	* configure.in: Added modules/Makefile to AC_OUTPUT.

	* configure.in: Added code to implement --with-modules.  Tests for
	<dlfcn.h> and -ldl.

	* acconfig.h: Added WITH_MODULES

1998-10-02  René Seindal  <rene@seindal.dk>

	* examples/Makefile.am (pkgdata_DATA): Removed special target for
	check and variables TESTS.  These tests are now run from the
	tests/ directory.

	* tests/Makefile.am (OTHER_TESTS): Added tests from the example/
	directory.  The files stay there but the tests are run from the
	tests/ directory.

	* tests/Makefile.am (EXTRA_DIST): Added run-test.

	* tests/run-test: New file.  Run a test manually

	* tests/Makefile.am, tests/get_them: Moved automatically generated
	tests (from the manual) to sub directory tests/gentest/.  The
	tests/ directory had gotten a bit messy.

1998-09-06  Erick Branderhorst  <Erick.Branderhorst@asml.nl>

	* examples/{comments,ddivert,debug,iso8859,reverse,sysv-args,\
	wrap}.test: Added a few testcases.

1998-08-21  Erick Branderhorst  <Erick.Branderhorst@asml.nl>

	* Prerelease 1.4h.

	* lib/Makefile.am (noinst_HEADERS): regex.h added

	* configure.in (jm_WITH_REGEX, jm_PREREQ_ERROR):
	acm4/{error,regex}.m4 (from fileutils-3.16u.tar.gz).

	* acm4/Makefile.am: created providing rules to create
	$(top_srcdir)/acinclude.m4 to be used by aclocal.

	* tests/defs (LANGUAGE, LC_ALL, LANG): force them to be
	`C'. Reported by Ulrich Drepper.

	* Makefile.am (SUBDIRS): Removed checks directory
	* configure.in (AC_OUTPUT): Removed checks/Makefile

	* doc/m4.texinfo (Patsubst,example): @comment added to preserve
	the space when m4.texinfo is edited and whitespace.el is active.
	(Defn,example): idem.

1998-08-20  Erick Branderhorst  <Erick.Branderhorst@asml.nl>

	* doc/m4.texinfo (Esyscmd): grep ../Makefile instead of
	../COPYING. ../Makefile is a file which is certainly present when
	test is executed in testSubDir. One can't be sure that the COPYING
	file is in .. or ../.. in all situations, the ../Makefile is
	always there.

	* doc/m4.texinfo (Include): adjusted expected test output
	according to new tests, i.e. the input will always come from the
	file `in' created by the test.

	* tests/Makefile.am: Added three lines at the top to get
	esyscmd.1.test working.

	* tests/get-them: modified to generate clearer tests who will need
	less maintenance when new test examples are created in
	`doc/m4.texinfo'. All tests are small (nearly stand-alone, they
	need the generic file `defs') shell scripts creating `in', `ok',
	`out' and when apropriate `okerr' and `err' in the directory
	`testSubDir' when executed. The compare of `ok' and `out'
	(and of `okerr' and `err') will be the exit status of the test.
	`out' must match `ok' (and `okerr' must match `err') for the test
	to be succesful.

	* tests/[a-b]\{1,8\}.[0-9]+.test: This namespace is reserved for
	the tests generated by tests/get-them getting it input normally
	from doc/m4.texinfo. The namespace tests/[a-b]+[0-9]+.test (no `.'
	(dot) before the numeric part) is reserved for all other (hand
	written) tests. The `+' means one or more times.

1998-08-12  Erick Branderhorst  <Erick.Branderhorst@asml.nl>

	* doc/Makefile.am (EXTRA_DIST): helptoman.pl and $(MANS) to
	supported short man page to refer to info documentation
	* helptoman.pl: added
	* configure.in: AC_PATH_PROG(PERL,perl)
	* Makefile.am (SUBDIRS): doc after src

	* libitized with libit 0.5 from
	ftp://ftp.iro.umontreal.ca/pub/contrib/pinard/maintenance/libit.

	* configure.in (AC_REPLACE_FUNCS): added xmalloc xstrdup
	* lib/Makefile.am (libm4_a_SOURCES): removed automakely supported
	 replacement functions, (libm4_a_LIBADD): @LIBOBJS@
	* configure.in (AM_WITH_REGEX), acconfig.h (WITH_REGEX): added
	  lib/rx.{c,h}: added
	* configure.in (AC_CHECK_FUNC): getopt_long

	* src/m4.c (usage): Report bugs to m4-bugs@gnu.org.

	* TODO: added entry about dependencies

1998-08-10  René Seindal  <rene@seindal.dk>

	* Prerelease 1.4f

	* doc/m4.texinfo (Changesyntax): Added documentation for the macro
	"changesyntax".

	* src/builtin.c (m4_changesyntax): Added builtin macro
	"changesyntax" to modify the syntax table.

	* src/input.c, src/m4.h, src/macro.c: Implemented an input syntax
	table.  All categories are assigned a syntax code and tokens are
	read according to this table.

1998-08-09  René Seindal  <rene@seindal.dk>

	* src/numb.{c,h}: New files, implements multiple precision eval
	using GNU gmp.  Originally submitted by John Gerard Makecki
	(johnm@vlibs.com), later modified.  Tested with GNU gmp 2.0.2.

	* doc/m4.texinfo (Eval): Added documentation for multiple
	precision arithmetic library support.

	* src/m4.{c,h}, src/eval.c, src/builtin.c, configure.in: Changes
	to accommodate multiple precision eval.

1998-08-07  René Seindal  <rene@seindal.dk>

	* src/input.c (MATCH, match_input), src/m4.h: changed definition
	of comment and quote strings to `unsigned int' to allow eight bit
	chars (reported by andrewb@zip.com.au (Andrew Bettison)).

	* src/builtin.c, doc/m4.texinfo: Builtin `syncoutput' added by
	patch from Mike Howard <mike@clove.com>

1998-08-06  René Seindal  <rene@seindal.dk>

	* gettext.m4: corrected AM_WITH_NLS to handle use of installed
	-lintl.

1998-08-03  René Seindal  <rene@seindal.dk>

	* Prerelease 1.4e

	* src/m4.h: Added ifdef ENABLE_NLS around include of <libintl.h>
	and _ macro.  M4 now builds with --disable-nls.

	* src/m4.c (main): reintroduced textdomain(PACKAGE) to get gettext
	to look for right message catalogs.  Call indef'ed by ENABLE_NLS.

	* configure.in (ALL_LINGUAS): Added complete list of translations:
	de fr it ja nl ru sv.

1998-05-23  Erick Branderhorst  <Erick.Branderhorst@asml.nl>

	* po/nl.po: Dutch translation by Erick Branderhorst.

	* po/fr.po: French translation by Erick Branderhorst, based on the
	translations by François Pinard in fr.msg and m4.cod.

1998-05-22  Erick Branderhorst  <Erick.Branderhorst@asml.nl>

	* Prerelease 1.4d.

	* src/m4.c: #include <signal.h> not <sys/signal.h>.

	* src/Makefile.am: CFLAGS = -Wall @CFLAGS@.

	* checks/Makefile.am: explicit list tests in CHECKS.

	* configure.in, {,src,doc,lib,examples,checks}/Makefile.am,
	src/{ansi2knr.{1,c}} doc/{m4.texinfo,mdate-sh}, missing,
	mkinstalldirs, install-sh: Added automake (1.3) support.

	* lib/{alloca.c,error.{c,h},get{date.h,opt.{c,h},opt1.c},
	obstack.{c,h},regex.{c,h},strtol.c,xmalloc.c,xstrdup.c}:
	Used libitize (0.4) to update.

	* configure.in, ABOUT-NLS, intl/*, po/*: Added gettextize
	(0.10.25) support. Removed LOCALE, fr.msg, m4.cod and adjusted
	README accordingly.

	* src/stackovf.c: #ifdef USE_STACKOVF ... #endif to (de-)activate
	stack overflow functionality.

1994-12-03  François Pinard  <pinard@iro.umontreal.ca>

	* Prerelease 1.4.1.

	* Makefile.in (realclean-local): Delete stamp-h.in.

	* configure.in, {,src,lib}/Makefile.in, src/m4.h, src/m4.c:
	Localize, adapting from how it is done in sharutils.

	* fr.tt: New file, for French.

	* configure.in, {,*/}Makefile.in, acconfig.h, src/m4.c,
	src/freeze.c: Rename PRODUCT to PACKAGE.

1994-11-26  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Check for <libintl.h> and <locale.h>.
	* src/m4.h, src/builtin.c, src/debug.c, src/eval.c, src/macro.c,
	src/stackovf.c: Rename _ to __P.
	* src/m4.h: Declare _ as a macro returning its argument, or else,
	include <libintl.h> and declare _ as gettext.
	* src/m4.c: Possibly include <locale.h> and call setlocale.
	* src/m4.c, src/builtin.c, src/debug.c, src/eval.c, src/freeze.c,
	src/input.c, src/macro.c, src/output.c, src/path.c,
	src/stackovf.c, src/symtab.c: Use _ macro over all localizable
	strings.

1994-11-07  François Pinard  <pinard@iro.umontreal.ca>

	* doc/Makefile.in (stamp-vti): Use new -r option to date.

	* configure.in: Put --with-gmp in place, in prevision for John
	Gerard's work.
	* acconfig.h: Document WITH_GMP.

1994-11-05  François Pinard  <pinard@iro.umontreal.ca>

	* Release 1.4.

	* doc/Makefile.in (realclean): Also remove stamp-vti.
	Reported by Eric Backus.

1994-11-02  François Pinard  <pinard@iro.umontreal.ca>

	* src/freeze.c (produce_frozen_state): If the frozen file cannot
	be opened, return immediately after producing the error message.
	Reported by Andreas Schwab.

	* configure.in: Check for const only after having found possible
	ANSIfying compiler flags, this is of no use to check it before.
	Reported by Alexander Lehmann.

1994-11-01  François Pinard  <pinard@iro.umontreal.ca>

	* src/macro.c (collect_arguments): Cast obstack arguments to
	(voidstar), so avoiding compiler warnings.
	Reported by Joseph E. Sacco.

	* src/freeze.c (produce_frozen_state): Cast printed lengths to
	(int) so they correspond to %d format items.
	Reported by Joseph E. Sacco.

	* src/m4.c (main): Cast the argument to xfree to (voidstar).
	* src/symtab.c (free_symbol): Idem.
	Reported by Karl Vogel.

1994-10-31  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (DISTFILES): Distribute BACKLOG.

	* configure.in: Define PRODUCT and VERSION.
	* acconfig.h: Document PRODUCT and VERSION.
	* src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
	constant string m4 and variable or parameter named version.

1994-10-30  François Pinard  <pinard@iro.umontreal.ca>

	* src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
	__STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
	defines __STDC__ to 0, for indicating it is *not* ANSI!
	Reported by Kaveh R. Ghazi.

	* configure.in: Added obsolescent tests for AIX and Minix.

	* doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
	which texclean does not exist anymore.
	Reported by Eric Backus, Jim Meyering, John David Anglin and
	Joseph E. Sacco.

1994-10-29  François Pinard  <pinard@iro.umontreal.ca>

	* aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
	Reported by John David Anglin.

	* src/ansi2knr.c: New version, sent by Peter Deutsch.
	* aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
	ANSI2KNR, depending on the fact the compiler is ANSI or not.
	* src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
	Remove the sed filter after ansi2knr for debug.c.  Use $O instead
	of $U, put underline in extensions rather than in basenames.  Use
	implicit rules, now that regularity makes this possible.
	Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
	of ansi2knr whenever it is needed.
	* configure.in: Adjusted for correct STACKOVF substitution.
	* src/debug.c (trace_format): When not __STDC__, use (...) as a
	parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
	Reported by David MacKenzie.

	* Makefile.in: Remove binprefix.  Use transform_name instead.
	Reported by David MacKenzie.

	* doc/Makefile.in: Create version.texi, use it, clean it.
	Reported by Jim Meyering.

1994-10-28  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (all, install, uninstall): Depend on Makefile.

	* Makefile.in: For actions invoking $(MAKE) from within compound
	sh statements, exit non-zero if the sub-make fails.  Otherwise,
	the top-level make may exit successfully when it should fail.
	Reported by Jim Kingdon.

	* {,/*}Makefile.in: Use && after all cd, in case they fail.

	* {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
	(dist): Use PRODUCT and VERSION instead of tricks on .fname.
	* configure.in: Substitute PRODUCT and VERSION.

	* {,*/}Makefile.in (dist): Always try a hard link before a copy.

1994-10-27  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (mostlyclean-local): Do not remove *~.
	* */Makefile.in (mostlyclean): Idem.
	Reported by Robert E. Brown and Richard Stallman.

1994-10-09  François Pinard  <pinard@iro.umontreal.ca>

	* src/m4.h: Get rid of CONFIG_BROKETS.

1994-10-02  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Use AC_ARG_PROGRAM.
	* aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
	Reported by David MacKenzie.

1994-10-01  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Do not add -O to CFLAGS for GNU C, now that
	configure does it automatically.
	Reported by Jim Meyering.

1994-09-23  François Pinard  <pinard@iro.umontreal.ca>

	* src/stackovf.c: Declare the handler_t typedef earlier in the
	code, use it for stackovf_handler.
	(setup_stackovf_trap): Use RETSIGTYPE instead of void while
	casting sigsegv_handler.
	Reported by Robert Bernstein.

	* src/m4.c (main): Initialize program_name to argv[0] without
	basename'ing it.
	Reported by Karl Berry.

1994-09-18  François Pinard  <pinard@iro.umontreal.ca>

	* src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
	Reported by Karl Berry.

1994-09-14  François Pinard  <pinard@iro.umontreal.ca>

	* lib/Makefile.in (mostlyclean): Added.
	(TAGS): Make in $(srcdir).

	* configure.in: Use `choke me' in test, like everywhere!

	* {doc,examples,lib,src}/Makefile.in (check): Deleted, as
	unreacheable and useless.

	* doc/Makefile.in (texclean): Deleted, merged in mostlyclean.

	* lib/Makefile.in (DISTFILES): Distribute TAGS.
	(distclean): Do not remove TAGS.
	(realclean): Remove it.
	* Makefile.in: Make TAGS in lib also, not just in src.
	Reported by Karl Berry.

	* Makefile.in (distclean, realclean): Instead of recursively
	calling $(MAKE) for the -local part, allow parallel execution of
	-recursive and -local, only delay the removal of config.status,
	which is repeated in both goals.

1994-09-13  François Pinard  <pinard@iro.umontreal.ca>

	* Release 1.3.

	* Makefile.in: Group all *clean-recursive goals in one, using sed
	to remove `-recursive' while calling make recursively.  Also, use
	a subshell for each recursive $(MAKE).
	Reported by Jim Meyering.

	* src/m4.h (memcpy): Define with bcopy for BSD systems.
	Reported by Kaveh R. Ghazi.

	* src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
	4.1.3 requires -ldl to link even ansik2nr, and we need a way to
	specify it.

	* configure.in: Use date instead of touch for stamp-h.
	* Makefile.in (stamp-h.in): Idem.

	* Makefile.in (distclean, realclean): Force serial execution of
	both goals, in case parallel makes are being used.
	Reported by Jim Meyering.

	* src/Makefile.in (DISTFILES): Distribute TAGS.
	(distclean): Do not remove TAGS.
	(realclean): Remove it.
	Reported by Karl Berry.

1994-09-10  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
	to old names, for following Autoconf.

1994-09-08  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (MDEFINES): Remove INSTALL substitutions, for
	./install.sh will not be correctly referred to in sub-Makefiles.
	Reported by John David Anglin.

	* doc/Makefile.in (texclean): Remove *.cps and *.fns too.
	Reported by Eric Backus.

	* Makefile.in, checks/Makefile.in, doc/Makefile.in,
	examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
	config.status into remaking this directory's Makefile only.
	* Makefile.in (stamp-h): Do not check nor touch stamp-h.
	* configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
	Reported by Jim Meyering.

1994-09-06  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Correct stack overflow detection logic, taking
	care of systems having only incomplete implementations (like for
	Pyramid 9820 OSx 5.0d).
	Reported by Kaveh R. Ghazi.

	* src/Makefile.in (TAGS): Remote -t from etags call.

1994-09-02  François Pinard  <pinard@iro.umontreal.ca>

	* lib/Makefile.in (install): Depend on all.

1994-08-31  François Pinard  <pinard@iro.umontreal.ca>

	* examples/Makefile.in (mostlyclean): Do not depend on texclean.
	Reported by Jim Meyering and John David Anglin.

	* Makefile.in (distclean-local): Delete config.log.
	Reported by Jim Meyering.

	Solidify frozen files with respect to -P:
	* src/m4.c: Have -P set prefix_all_buitins variable instead of
	calling a function by that name.  Declare the variable.
	* src/m4.h: Adjust declaration for prefix_all_buitins.
	* src/builtin.c (builtin_init): Merge in functionality from
	previous prefix_all_buitins function, while making entries in the
	symbol table, but not modifying the builtin description itself.

	* src/freeze.c (reload_frozen_state): Add a useless `break;',
	because *many* compilers do not accept an empty `default:'.
	Reported by Akiko Matsushita, Eric Backus, John David Anglin,
	Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.

	* configure.in: Use AC_TYPE_SIGNAL.
	* src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
	Reported by Robert Bernstein.

	* checks/Makefile.in (check): Modify PATH so check-them will find
	m4 in the src directory.
	* Makefile.in (check): Don't.
	Reported by Akiko Matsushita and Jim Meyering.

	* src/output.c (make_room_for, output_character_helper): New
	functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
	a per buffer MAXIMUM_BUFFER_SIZE.

	* src/output.c (output_text): New function, for optimizing the
	output of strings of characters.  Use it.

1994-08-30  François Pinard  <pinard@iro.umontreal.ca>

	* doc, src: New directories reorganizing the distribution.
	* doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
	files.
	* Makefile.in: Adjusted.
	* configure.in: Configure new Makefiles.

	* m4.h: Declare STRING typedef.  Use it for comment and quote
	strings, adjusting all references.  (This is the rudiments of a
	beginning for the eventual withdrawal of NUL terminated strings.)
	* output.c (shipout_text): Accept a length parameter, and use it.
	All callers adjusted.

1994-08-29  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Include <unistd.h> if it exists.
	* stackovf.c: Don't.

	Clean up for current_diversion variable:
	* output.c: Move current_diversion from builtin.c.
	* m4.h: Declare current_diversion so builtin.c can access it.
	* output.c (output_init, make_diversion): Initialize or update
	current_diversion.
	* builtin.c (builtin_init, m4_divert): Leave current_diversion
	alone.

	Remove limit on number of diversions:
	* output.c: Replace ndiversion by diversions, declare it.
	(output_init): Allocate only diversion 0.
	(make_diversion): Allocate new diversions as needed.
	* m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
	* m4.c: Still accept -N, but do nothing with it.
	Reported by David MacKenzie.

	Freeze diversions:
	* output.c (freeze_diversions): New function.
	* m4.h: Declare freeze_diversions.
	* freeze.c: Document frozen file format, revise it, call
	freeze_diversions to add diversions to frozen format, and code to
	reload them properly.
	* m4.c: Do not undivert automatically at end when status being
	frozen.  Do not call builtin_init when reloading frozen state.

	Speed up diversion processing:
	* output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
	COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
	structure and variables, cached variables out of output_diversion,
	reallocate_diversion_for and OUTPUT_CHARACTER.
	(shipout_text, make_diversion, insert_diversion): Adapted to new
	structures.
	(insert_file): Use better buffering.
	Reported by David MacKenzie.

1994-08-28  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
	dist works from another build directory.

1994-08-27  François Pinard  <pinard@iro.umontreal.ca>

	* symtab.c (hack_all_symbols): Use hash_table_size instead of
	constant HASHMAX, for -H option to work better.

	* builtin.c (DECLARE): Simplify by using _ ().

	* freeze.c: New file.
	* Makefile.in: Compile it, distribute it.
	* m4.c: Recognize, document and process --freeze-state (-F) and
	--reload-state (-R) options.  Pass a true flag to builtin_init
	only if no reloading some state.
	* builtin.c (define_builtin): Remove static specifier.
	(find_builtin_by_name): Remove static specifier.
	(builtin_init): Accept and obey a flag argument.
	* m4.h: Add declarations for freeze.c, changes for builtin.c.

1994-08-24  François Pinard  <pinard@iro.umontreal.ca>

	* builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
	specifier.

	* configure.in: Implement --with-dmalloc.
	* acconfig.h: Document WITH_DMALLOC.
	* m4.h: Add code for when WITH_DMALLOC.

1994-08-15  François Pinard  <pinard@iro.umontreal.ca>

	* m4.c (long_options): Use "error-output", the dash was missing.
	Reported by Akiko Matsushita.

1994-08-12  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Include <sys/types.h>.
	* builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
	* m4.h: Declare len_lquote and len_rquote as size_t, not int.
	int.
	* input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
	as size_t, not int.
	* builtin.c (dump_args): Declare len as size_t, not int.

	* debug.c: Prototype the forward declaration of debug_set_file.

	* builtin.c (m4_undivert):  Replace div by file, for avoiding the
	shadowing of this variable.
	* output.c (insert_diversion): Idem.

	* input.c: Delete def_rquote, def_lquote, def_bcomm and	def_ecomm.
	(input_init): Duplicate default quote and comment strings.
	(set_quotes): Free previous quote strings in all cases.  Duplicate
	even default quote strings.
	(set_comment): Free previous comment strings in all cases.
	Duplicate even default comment strings.

	* configure.in: Updated for Autoconf 2.0.
	* Makefile.in (distclean-local): Also delete config.cache.

	* m4.c (usage): Reorganize the --help output by topic.  Include a
	description for debugging flags.

1994-07-29  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: If sigaction is available and SA_ONSTACK defined,
	use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
	defined, use sigvec.  Else don't compile stackovf.c.
	* stackovf.c (setup_stackovf_trap): Idem.
	Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
	and Simon Leinen.

1994-07-21  François Pinard  <pinard@iro.umontreal.ca>

	* m4.c (usage): Replace printf par fputs.

1994-07-18  François Pinard  <pinard@iro.umontreal.ca>

	* Release 1.2

1994-07-17  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Check for sigaction and sigvec.  Add a new delayed
	check for RLIMIT_STACK, combine in the checking for getrlimit.
	All those things are not universally available.
	* stackovf.c: Split setting up the trap handler and catching
	signals, for better taking care of various configure outcomes.
	* examples/stackovf.sh: Correct a typo.
	Reported by Eric Backus, Jim Avera and Jim Meyering.

1994-07-16  François Pinard  <pinard@iro.umontreal.ca>

	* ansi2knr.c: New version sent by its author, Peter Deutsch.

1994-07-15  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in: Modify so parallel make will not try making
	lib/libm4.a twice simultaneously.
	Reported by Jim Meyering.

1994-07-14  François Pinard  <pinard@iro.umontreal.ca>

	* stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
	error message, for when no code possibility exists.  Even if this
	line is completely #ifdef'ed out, it brings a syntax error.
	Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.

	* Makefile.in (install): Have install depend on all too, for lib
	to be remade as needed.

	* examples/stackovf.sh: Try ksh, bsh and bash for shells
	providing ulimit, instead of using only ksh.
	Reported by Jim Avera and Joseph E. Sacco.

1994-07-12  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (check): Have it depend on all instead of m4.  In
	this way, a change in lib will be detected and processed.

	* builtin.c (numeric_arg): Use strtol and verify the conversion,
	instead of using sscanf which stops as soon as there is a
	non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
	and divert(1xyzzy) were all accepted without any warning or error
	messages.
	* m4.h: Declare strtol as long if not including stdlib.h.
	* configure.in: Check for limits.h, and replace strtol if missing.
	* lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
	* lib/strtol.c: New file, from elsewhere.
	Reported by Andreas Schwab.

1994-07-07  François Pinard  <pinard@iro.umontreal.ca>

	* macro.c (expand_macro): Cast value to (boolean) prior to
	assigning it to traced.
	Reported by Tom McConnell.

	* Makefile.in (m4): Always make all in lib first.
	Reported by Jim Meyering.

1994-07-06  Jim Avera <jima@netcom.com>

	* stackovf.c: Isolated OS-dependent sections; Improved portability,
	adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
	handlers), and a default error message if the fault address is not
	available (when neither siginfo.h nor BSD sigcontext are supported).
	* configure.in: Changes for stackovf.h: Check for sigcontext,
	sigaction, sigstack, and define rlim_t as int if necessary.
	* acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
	* examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
	* ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.

1994-07-05  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Use AC_SET_MAKE.
	* Makefile.in: Use @SET_MAKE@.
	Reported by Jim Meyering.

	* checks/check-them: Do not trap on SIGQUIT or SIGALRM.
	Reported by Ian Taylor.

1994-07-02  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
	because siginfo.h is unrelated to standard headers, and siginfo.h
	is already checked for.
	Reported by Joseph E. Sacco.

	* acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
	PROTOTYPES.
	* aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
	AC_PROTOTYPES.

1994-06-29  François Pinard  <pinard@iro.umontreal.ca>

	* builtin.c (substitute): Use \& to represent this part of the
	string which was matched by the whole regexp, instead of
	representing the whole string.  Any usage of \0 issues a warning
	and acts like \&, it will disappear in some subsequent release.

1994-06-27  François Pinard  <pinard@iro.umontreal.ca>

	* m4.c: Complete prototype for forwarded declaration of usage.

	* input.c (init_macro_token): Correct own reference in error
	message.  Previous name get_macro_func was referred to instead.
	(next_char):  Correct own reference in error message.  Previous
	name advance_input was referred to instead.

	* m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
	* eval.c (logical_or_term, logical_and_term, or_term, xor_term,
	and_term, not_term, logical_not_term, cmp_term, shift_term,
	add_term, mult_term, exp_term, unary_term, simple_term): Add
	prototype to forwarded declarations.  Declare parameter v1 as
	eval_t * instead of int *.  Same for local variable v2 in dyadic
	functions.  Same for result in exp_term.
	* builtin.c (m4_eval): Declare value as eval_t instead of int.
	(ntoa): Declare value as eval_t instead of int.  Declare uvalue as
	unsigned_eval_t instead of unsigned int.  Change casts accordingly.
	(shipout_int): Cast first argument of ntoa to eval_t.
	Reported by Thorsten Ohl.

	* macro.c: Complete the prototypes of forwarded expand_macro and
	expand_token.
	Reported by Thorsten Ohl.

	* m4.h: Define voidstar as void * or char * depending on __STDC__.
	The Ultrix 3.1 compiler cannot do much with void pointers.

	* builtin.c (dumpdef_cmp): Replace void * by voidstar.
	* m4.c (xfree):  Replace void * by voidstar.
	Reported by Tom McConnell.

	* ansi2knr.1: New, from elsewhere.
	* Makefile.in (DISTFILES): Distribute ansi2knr.1

	* Makefile.in (stamp-h.in): Avoid running ./config.status if
	stamp-h does not exist yet.  This avoids running it a second time
	just after the initial ./configure.
	Reported by David MacKenzie and Tom McConnell.

	* m4.h: Replace the enum debug_info declaration with a series of
	#define's.  The Ultrix 3.1 compiler would otherwise need casting
	(int) to most references, when used in expressions.
	Reported by Tom McConnell.

1994-06-25  François Pinard  <pinard@iro.umontreal.ca>

	* aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
	following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
	calls the compiler.  Previously, FP_PROTOTYPES was only calling
	the preprocessor; by not being subject to CFLAGS, this was
	discouraging those flags asking for ANSI compilation.
	* acconfig.h: Document HAVE_PROTOTYPES.
	* configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
	* m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
	Reported by Eric Backus.

	* configure.in: Substitute CFLAGS and LDFLAGS, taking their value
	from the environment.  Default CFLAGS to -g if not set.
	* Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
	* lib/Makefile.in: Have CFLAGS substituted from configure.
	Reported by Eric Backus and Tom McConnell.

	* configure.in: m4_undefine changeword before using AC_ENABLE.

	* m4.h: Declare prototypes for error (for ANSI compilers only),
	prefix_all_builtins and reference_error.
	Reported by Tom McConnell.

	* input.c (set_word_regexp): Do not try to initialize the array
	test from a string, this does not work with non-ANSI compilers.
	Reported by Eric Backus.

	* Makefile.in (dist): Clean examples/ before saving it.
	(distclean-local): Also remove stamp-h.
	Reported by Eric Backus.

	* Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
	non ANSI compilers.
	Reported by Tom McConnell.

	* checks/Makefile.in (clean): Depends on mostlyclean.
	(mostlyclean): New goal.

1994-06-24  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (DISTFILES): Distribute install.sh.
	* install.sh: New file, copied from elsewhere.
	Reported by Assar Westerlund and Kaveh R. Ghazi.

1994-06-23  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
	* acconfig.h: Explain ENABLE_CHANGEWORD.

	[These modifs all depend upon ENABLE_CHANGEWORD and are adapted
	from code provided by Pete Chown]
	* m4.h: Add original_text field to u_t variant of union u.
	Declare TOKEN_DATA_FUNC macro.
	* builtin.c: Declare changeword.
	(m4_changeword): New function.
	* input.c: Include "regex.h", define variables with word regexps.
	(input_init): Initialize the word regexp.
	(set_word_regexp): New.
	(next_token): Declare local variables, use the previous code if
	default_word_regexp is true.  Else, match using a new code.  Save
	the original text.
	* macro.c (expand_token): Ship out original text if not a macro
	name.
	Reported by Krste Asanovic and Pete Chown.

	[These modifs all depend upon ENABLE_CHANGEWORD]
	* m4.h: Declare external user_word_regexp.
	* m4.c: Declare user_word_regexp, and initialize it from
	--word-regexp or -W, or NULL if not specified.
	* input.c: Use user_word_regexp if specified, instead of
	DEFAULT_WORD_REGEXP.

	* Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
	agree with it.

	* Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
	* checks/Makefile.in: Empty the suffix list.
	Reported by Geoff Russell, Joel Sherrill and Roland McGrath.

	* m4.c: Declare nesting_limit and initialize it to 250.
	Implement -LNUMBER or --nesting-limit=NUMBER to change its
	value.
	* m4.h: Declare nesting_limit as external.
	* macro.c (expand_macro): Stop execution whenever nesting limit
	is exceeded.
	Reported by Bengt Mertensson.

	* eval.c (evaluate): Diagnose excess characters in eval input.
	Things like `eval(08)' used to return 0 with no diagnostic.

	* m4.h: Capitalize first letter of all macro arguments in
	definitions.

	* m4.c: Declare warning_status, initialize it to 0.  Add new
	option -E, or --fatal-warnings, which sets warning_status to
	EXIT_FAILURE instead.
	* m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
	EXIT_FAILURE if not otherwise done by header files.
	* m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
	* m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
	eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
	argument of all M4ERROR calls.
	Reported by Noah Friedman.

	* examples/incl-test.m4: Renamed from incl_test.m4.
	* examples/include.m4: Include incl-test.m4 instead of
	incl_test.m4.
	* examples/multiquotes.m4: Renamed from multi-quotes.m.

1994-06-22  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
	that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
	also tested it on a Sun Sparc workstation running SunOS 4.x.

	* format.c (format): When not HAVE_EFGCVT, m4 was failing the
	49.format check, abusing a `union values' argument with sprintf
	without selecting the proper field.  Now, save the formatting type
	first, delaying the fetch of the corresponding argument.
	Reported by Joseph E. Sacco and Tom Quinn.

	* format.c (format): Remove const from char *fmt declaration when
	not HAVE_EFGCVT, because a NUL may be forced into it.

	* m4.h: Declare atof() when not STDC_HEADERS.
	Reported by Joseph E. Sacco.

	* Regenerate configure using Autoconf 1.11, this corrects a
	problem about an incorrect cpp seting on NeXT 3.1.
	Reported by Alexander Lehmann.

1994-06-05  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h (_): Change argument from `x' to `Args'.

1994-04-22  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Rename Args() to _().
	* m4.h: Remove extern specifier from all function declarations.

1994-04-22  Jim Avera <jima@netcom.com>

	* stackovf.c: New file implementing stack-overflow detection.
	* configure.in: Check for getrlimit, sigaction.  If all of
	standard headers, getrlimit and sigaction, define USE_STACKOVF and
	substitute ${U}stackovf.o for STACKOVF.
	* acconfig.h: Declare USE_STACKOVF.
	* Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
	* m4.h: Declare setup_stackovf_trap().
	* m4.c: Call setup_stackovf_trap().
	* tests/stackovf_test.sh: New file.

1994-04-13  François Pinard  <pinard@iro.umontreal.ca>

	* checks/Makefile.in: Rename .all-stamp to stamp-checks.

	* Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.

1994-01-30  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Remove definition of volatile, not used anymore.
	Reported by Jim Meyering and Joseph E. Sacco.

	* m4.h: Consistently use `do { ... } while (0)' in macros, instead
	of `if ... else /* nothing */' for if macros.
	Reported by Jim Meyering.

	* builtin.c (m4_regexp): Reorganize the code for avoiding a
	warning from gcc about `repl' possibly used before defined.
	Reported by Jim Meyering.

	* m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
	Reported by Jim Meyering.

1994-01-25  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Move the conditional definition of volatile after the
	inclusion of system files, because they may define it first.

1994-01-04  François Pinard  <pinard@iro.umontreal.ca>

	* checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
	get around a problem with Alpha make seeing a syntax error, there.
	Reported by Vern Paxson.

1994-01-03  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
	Reported by Richard Stallman.

1993-12-25  François Pinard  <pinard@iro.umontreal.ca>

	* configure.in: Correct test for strerror, AC_FUNC_CHECK was used
	instead of AC_HAVE_FUNCS.
	Reported by Noah Friedman.

1993-12-01  François Pinard  <pinard@iro.umontreal.ca>

	* m4.c: Initialize show_help and show_version to zero.

	* m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
	Use them in exit() and usage() calls.

1993-11-27  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Delete extern sys_nerr, sys_errlist declarations, and
	syserr() macro.  Delete errref, add reference_error and M4ERROR.
	* m4.c: Replace errref, which was returning an input reference
	string, with reference_error, which prints it on standard error.
	* builtin.c, output.c: Use errno as second parameter to error,
	instead of using syserr() with %s.
	* *.c: Use M4ERROR instead of error: no more errref() with %s.
	Doing so, the program name appears after the input reference
	instead of before, which eases M-x next-error processing.

1993-11-24  François Pinard  <pinard@iro.umontreal.ca>

	* checks/get-them: Escape braces with backslashes in patterns,
	because HPUX-9.01 awk needs this.
	Reported by Jim Meyering.

1993-11-22  François Pinard  <pinard@iro.umontreal.ca>

	* builtin.c: Declare "FILE *popen ();".

	* m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
	macros, replace error_message_prefix() declaration by errref()'s.
	Declare xrealloc, for use in errref().
	* m4.c: Delete error_message_prefix() function, add errref().
	* *.c: Use error() systematically in place of all error macros,
	now that error() flushes stdout first.  Make needed adjustments.

	* m4.h: Remove const in sys_errlist[] declaration, it creates
	conflicts on SGI and Alpha.
	Reported by Kaveh R. Ghazi.

1993-11-20  François Pinard  <pinard@iro.umontreal.ca>

	* m4.c: Include <getopt.h> instead of "getopt.h".

	* configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
	* acconfig.h: New, for documenting HAVE_EFGCVT.
	* Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
	use them wherever appropriate.  Also use -I. for compilations.
	* lib/Makefile.in: Use -I.. for compilations.
	* *.c: Include <config.h> or "config.h".

	* m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
	* configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.

1993-11-17  François Pinard  <pinard@iro.umontreal.ca>

	* builtin.c (m4_eval): Cast strlen to (int) before comparing.

	* input.c (input_init): Initialize quote and comment strings
	explicitely instead of calling set_quotes and set_comment: by
	doing so, we ensure we do not free uninitialized variables.

	* checks/check-them: Reverse arguments to both diff, so the
	expected is on the left and the obtained on the right.

	* m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
	macros. Delete declarations for m4error, warning, fatal and
	internal_error, add declaration for error_message_prefix.
	* m4.c:  Delete m4error, warning, fatal and internal_error
	routines, add error_message_prefix routine.
	* *.c: Replace m4error routine calls with MESSAGE* macro calls,
	warning with WARNING*, fatal with FATAL* and internal_error with
	INTERNAL_ERROR*.
	* Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
	this is not needed anymore.

	* m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
	DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
	and debug_message, add declaration for debug_message_prefix.
	* debug.c: Remove static specifier for FILE *debug declaration.
	Delete debug_print and debug_message routines, add
	debug_message_prefix routine.
	* builtin.c, debug.c: Replace debug_print routine calls with
	DEBUG_PRINT* macro calls.
	* input.c, path.c: Replace debug_message routine calls with
	DEBUG_MESSAGE* macro calls.

	* m4.h: Remove inclusion of <varargs.h>.
	* debug.c: Include <stdarg.h> or <varargs.h>.
	(trace_format): Use stdarg instead of varargs if __STDC__.

	* configure.in: Remove checks for vfprintf and _doprnt.  These
	implementations use varargs tricks which are not portable enough.
	* lib/vfprintf.c: Deleted.
	* lib/_doprnt.c: Deleted.
	* lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
	Reported by Joel Sherrill.

	* path.c (add_include_directory): Use xstrdup.

	* builtin.c (find_builtin_by_name): Declare static.

	* *.[ch]: Add const to a few "char *" declarations.

	* configure.in: Remove commented tests for fileno() and fstat().
	* debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.

	* debug.c (debug_flush_files): New.
	* m4.h: Declares it.
	* builtin.c (m4_syscmd, m4_esyscmd): Use it.
	Reported by Nicolas Pioch.

1993-11-12  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
	Reported by Joel Sherrill.

	* builtin.c (prefix_all_builtins): Instead of the table size, use
	the null entry at end for stopping the loop.  It was overwritten.
	Reported by Andreas Schwab and Jim Meyering.

	* builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
	Reported by Kaveh R. Ghazi.

	* macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
	Reported by Karl Vogel.

1993-11-09  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Do not define volatile if already defined.
	Reported by René Seindal.

	* lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!

	Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
	Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.

1993-11-08  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Define strchr and strrchr in terms of index and rindex,
	instead of the other way around.
	* builtin.c, m4.c, path.c: Use strchr instead of index.

	* input.c (next_char): Remove a "break;" after a "return ...;".
	Reported by Tom McConnell.

1993-11-08  François Pinard  <pinard@iro.umontreal.ca>

	* Release 1.1

	* configure.in: Do not copy check files in the build hierarchy.
	* checks/check-them: Identify the m4 version being checked.  For
	finding m4, look in $PATH instead of in the parent directory.
	* Makefile.in (check): Prepend `pwd` to $PATH before checking.
	* checks/Makefile.in (.all-stamp): Always create check files in
	the source hierarchy, not anymore in the build hierarchy.
	(check): cd to the source hierarchy before performing checks.
	Do not copy nor clean COPYING anymore, take it from `..'.
	Reported by Tom McConnell.

	* Makefile.in (Makefile): Use $(SHELL).
	(config.status): Use $(SHELL).  Use "config.status --recheck"
	instead of "configure --no-create", which is obsolete.
	Reported by Tom McConnell.

1993-11-05  François Pinard  <pinard@iro.umontreal.ca>

	* m4.c (usage): Use "%s" instead of "m4" in format string.
	Reported by Jim Meyering.

	* Makefile.in: Distribute mkinstalldirs.
	Reported by Pierre Gaumond.
	Reported by Jim Meyering.
	Reported by Tom McConnell.
	Reported by Andreas Gustafsson.

	* checks/check-them: Renamed from checks/check_them.
	* checks/get-them: Renamed from checks/get_them.
	* checks/.all-stamp: Renamed from checks/.all_stamp.
	* checks/Makefile.in: Changed accordingly.
	Reported by Jim Meyering.

1993-11-04  François Pinard  <pinard@iro.umontreal.ca>

	* lib/Makefile.in (dist): Correct permissions on files.

	* output.c: Declare tmpfile, some systems don't.

1993-11-03  François Pinard  <pinard@iro.umontreal.ca>

	* checks/Makefile.in (dist): Correct permissions on files.

	* Makefile.in (dist): Ensure recursive linking for subdirectory
	`examples', also set read/write permissions on all its files.

	* mkinstalldirs: New, from elsewhere.
	* Makefile.in: Use it.

	* debug.c: Synchronize debug messages and regular output when
	the debug file and stdout are redirected to the same file.
	* configure.in: Add (commented) checks for fileno and fstat.
	Reported by Jim Avera.

	* builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
	etc., arguments, then ignore the superfluous one.  m4 used to
	diagnose missing arguments and return the empty string.
	Reported by Nick S. Kanakakorn.

1993-11-02  François Pinard  <pinard@iro.umontreal.ca>

	* m4.c (main): At end of all input, ensure all undiverted text
	goes to the main output stream.
	Reported by Andreas Gustafsson.

	* m4.c (main): exit (0), instead of return 0.

	* m4.c: Implement -P and --prefix-builtins.
	* builtin.c: Delete const specifier on builtin_tab.
	(prefix_all_builtins): New.
	Reported by Noah Friedman.
	Reported by Scott Bartram.

	* c-boxes.el: New, from elsewhere.
	* Makefile.in: Distribute it.

	* m4.h: Do not define bcopy if <string.h> defines it.
	Reported by Stephen Perkins.

	* builtin.c (define_macro): Allow a missing second argument, in
	which case it is implied empty.  Affects define and pushdef.
	Reported by Eric Allman.

1993-11-01  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
	struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
	* builtin.c: Initialize all the blindness fields in builtin_tab.
	(define_builtin): Copy the blindness of a builtin into its symbol.
	* macro.c (expand_token): Avoid processing a blind builtin if the
	next character is not an opening parenthesis.
	Reported by David MacKenzie.
	Reported by Noah Friedman.

	* configure.in: Ensure an exit status of 0 on completion.
	Reported by Vivek P. Singhal.

	* eval.c (eval_lex): Admit both lower and upper case letters for
	bases greater than 10.  Only lower case letters were accepted.

	* eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
	Reported by Krste Asanovic.

	* eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
	* eval.c (logical_not_term): New name for not_term.
	* eval.c (xor_term): New, between or_term and and_term.
	* eval.c (not_term): New, between and_term and logical_not_term.
	* eval.c (shift_term): New, between cmp_term and add_term.
	Reported by Krste Asanovic: ~, ^, <<, >>.
	Reported by Ben A. Mesander: ** vs ^.

	* m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
	* m4.h: Delete xrealloc.c.
	* lib/xmalloc.c: New, from elsewhere.
	* lib/xstrdup.c: New, from elsewhere.
	* lib/Makefile.in: Distribute and compile them.

	* m4.c: Change progname to program_name.
	* builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
	* lib/error.c: New, from elsewhere.
	* lib/Makefile.in: Distribute and compile error.c.
	* configure.in: Check AC_VPRINTF and for strerror.
	* m4.c: Delete cmd_error.  Use error instead.
	* m4.c: Change label capitalisation to "ERROR", "Warning", etc.

	* m4.h: Delete #define const, let Autoconf takes care of this.

	* m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
	Merge parse_args into main.  Declare argv to be `char *const *',
	then remove superfluous casts.

	* m4.c: Rename --no-gnu-extensions to --traditional.
	Reported by Ben A. Mesander.

	* m4.c (usage): Add a status parameter.  Supply one in various
	calls.  Add --help processing.  Remove -V for --version.

	* lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.

	* lib/Makefile.in: Have an AR=ar declaration.
	Reported by Eric Backus.
	Reported by Bjorn R. Bjornsson.
	Reported by Tom Tromey.
	Reported by Kristine Lund.
	Reported by Marion Hakanson.

1993-10-30  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
	Reported by Noah Friedman.

1993-10-25  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in: Remove MDEFINES and cleanup.

1993-06-09  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
	Create a gzip file.

1993-02-06  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
	ensure 777 mode for directories, so older tar's will restore file
	modes properly.

1993-01-17  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
	so the installer can override automatically configured choices.
	Reported by Karl Berry.

1993-01-15  François Pinard  <pinard@iro.umontreal.ca>

	* lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
	previous version was not working properly on m68k-hp-bsd4.3.
	Reported by Roland McGrath.

	* lib/_doprnt.c: Stolen from Oleo distribution.
	* configure.in: Check for _doprnt.c if vfprintf.c selected.
	* lib/Makefile.in: Distribute _doprnt.c.
	Do not distribute regex.[ch].old anymore.

1993-01-01  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
	Richard wants it there.

1992-12-27  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in: Add DEFS to MDEFINES.
	* lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
	(libm4.a): Remove the library before creating it.
	(distclean): Remove tags and TAGS too.

1992-12-23  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (dvi, m4.dvi): New goals.

	* builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
	macro.c, output.c, path.c, symtab.c: Change Copyright from
	1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.

	* examples/divert.m4: Deleted, this bug has been corrected.

	* Makefile.in (texclean, mostlyclean): New goals.

	* Makefile.in (clean): Remove clutter from ansi2knr.
	Reported by Pierre Gaumond.

1992-12-20  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
	might well use CFLAGS is s/he needs it.

	* Makefile.in: Allow installation of info files from a separate
	build directory.
	Reported by Jason Merrill.
	Reported by David MacKenzie.
	Reported by Skip Montanaro.
	Reported by Erez Zadok.
	Reported by Assar Westerlund.

1992-12-19  François Pinard  <pinard@iro.umontreal.ca>

	* Release 1.0.3
	This is still a	beta release for the future GNU m4 version 1.1.

	* lib/alloca.c: New, from elsewhere.
	* lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).

	* m4.h: Do not define index/rindex if already defined.  If
	FALSE/TRUE are already defined, do not redefine them, but merely
	define boolean typedef to int.

	* Makefile.in: Use $(DEFS) while compiling ansi2knr.
	* ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
	because some C compilers do not like connectives with #ifdef.
	* m4.h: Define `volatile' only if __GNUC__, instead of once for
	__GNUC__ and once for __STDC__.
	* lib/regex.h: Leave const alone, AC_CONST will take care of it.

	* checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
	Makefile dependencies.  Without it, make keeps destroying and
	remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.

	* m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
	to diversion/DIVERSION, this was a spelling error.

	* m4.c: Declare version[], remove #include "version.h".
	* version.h: Deleted.
	* Makefile.in: Remove references to version.h.

	* output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
	production, by using a simpler and more robust algorithm.  This
	solves the problem of synclines sometimes written in the middle of
	an output line.  Delete sync_line() and output_lines variable.
	* m4.h: Remove sync_line prototype and output_lines declaration.
	* input.c (next_char), output.c (shipout_text): Remove references
	to output_lines.
	* input.c (push_file, pop_file): Merely put the value -1 in
	output_current_line instead of calling sync_line, for delaying a
	single `#line NUM FILE' before next output line.  Do not test
	for sync_output, because this is unnecessary clutter.
	* output.c (make_divertion, insert_divertion): Idem.
	* input.c: Rename must_advance_line to start_of_input_line, for
	consistency.

	* debug.c (trace_header): Select a new debug line format, which
	better complies with GNU standards for formatting error messages.
	With option `-dfl', M-x next-error might be used on the output.
	* m4.c (vmesg): Adjust format of error output to GNU standards.
	* m4.texinfo: Adjust examples for `make check' to work.

	* m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
	case for enum debug_info constants, which were all lower case.

	* builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
	re_search_2.
	* lib/regex.[ch]: Use new version from textutils 1.3.6, with some
	collected patches.  I tried a few times using newer regex.[ch], it
	mysteriously stopped aborting with this one.  Insecure feeling...
	* lib/Makefile.in: Distribute regex.[ch].old, just in case!

1992-12-18  François Pinard  <pinard@iro.umontreal.ca>

	* m4.c: Change `--no-warnings' to `--silent'.
	Reported by David MacKenzie.

	* m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
	leave it off for now.  See comment in m4.c for justification.
	Reported by David MacKenzie.

	* configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
	* m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.

	* Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.

	* Makefile.in: Ensure recursive cleaning is done before local
	cleaning for all clean goals.

	* builtin.c (ntoa): Ensure the value is always interpreted as a
	signed quantity, whatever the radix is.

1992-11-18  Jim Meyering  <meyering@idefix>

	* builtin.c, format.c, input.c: Split long lines.
	* m4.c: Use typedef macro_definition instead of struct
	macro_definition.
	* symtab.c: Use typedef symbol instead of struct symbol.

1992-11-17  François Pinard  <pinard@iro.umontreal.ca>

	* *.[ch]: Remove all trailing whitespace, in code and comments.

	* configure.in: Find some awk.
	* Makefile.in: Add $(AWK) to MDEFINES.
	* checks/Makefile.in: Transmit $(AWK) to get_them.
	* checks/get_them: Use $AWK instead of gawk.  Add a close in the
	awk script when switching files, because without this, mawk runs
	out of file descriptors.

1992-11-16  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (realclean): Delete m4.info*.
	Reported by Jim Meyering.

	* Makefile.in: Adjust and link with checks/Makefile.
	* checks/Makefile.in: New.
	* configure.in: Output checks/Makefile.

	* checks/get_them: Have the dnl header of each test more
	recognizable by next-error, also use a better message.

1992-11-16  Jim Meyering  <meyering@idefix>

	* m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
	And use that only if __GNUC__ since we're using it's GCC-specific
	semantics that tell the compiler the associated function doesn't
	return.

	* builtin.c (substitute): Don't use character as an array index.
	(dumpdef_cmp): Make formal arguments `const void *' to avoid
	warnings with gcc -W -Wall on systems with qsort prototype.
	(m4_errprint): Cast obstack_finish to `char *' to avoid warnings
	from gcc -W -Wall.

	* eval.c (most functions): Add parentheses to assignments used
	as truth values go avoid warnings from gcc -Wall.

	* input.c, m4.c, output.c, path.c, symtab.c: Declare static
	any functions that don't need external scope.

	* builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
	(many functions and arrays): Declare `const'.

1992-11-15  François Pinard  <pinard@iro.umontreal.ca>

	* *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
	removing the declaration from m4.h.  Also rename false to FALSE
	and true to TRUE.

	* lib/Makefile.in (Makefile): New goal.

	* Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
	so heavily loaded.  It gets more easily overridable, calling make.
	Reported by Jim Meyering.

	* Makefile.in (dist): Get .fname from the current directory name,
	instead of from version.h.  I need updating many files manually,
	when the version changes, version.h is just one of them.

1992-11-14  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Remove the tag `boolean' on the enum introducing typedef
	`boolean'.  This tag conflicts with <sys/types.h> on SVR4.
	Reported by Tom McConnell.

1992-11-13  François Pinard  <pinard@iro.umontreal.ca>

	* m4.texinfo: Correct the examples for 33.divert, 38.divnum,
	39.cleardiv, which were describing missing or spurious newlines.
	Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
	do not depend on machine word size, `/bin/false' implementation,
	or `wc' output format.  `make check' is more dependable, now.

	* checks/check_them: Summarize the failed tests by listing their
	name, at end.  If none, issue `All checks successful'.  Output
	`Checking' instead of `Input file:'.

	* checks/get_them, checks/check_them: Reindented.

	* Makefile.in (dist): chmod a+r before making the tar file.

1992-11-12  François Pinard  <pinard@iro.umontreal.ca>

	* builtin.c (m4_dnl): Diagnose any parameter to `dnl'.

	* input.c (next_token): Reinitialize token_buttom just after using
	it as a watermark with obstack_free.  Or else, a future token, big
	enough for triggering reallocation of the obstack chunk, could
	void the initialized value of token_buttom, later causing panic in
	obstack_free.  Rename token_buttom to token_bottom everywhere.

	* m4.h: Before declaring errno, first include <errno.h> and
	ensure that it does not define errno.
	Reported by Richard Stallman.

1992-11-11  François Pinard  <pinard@iro.umontreal.ca>

	* builtin.c: Define and use DECLARE macro for builtins.

	* builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
	argument, this is a common idiom for introducing long comments.

	* builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
	arguments.  The last argument was silently ignored.

	* m4.c (cmd_error): Add a missing semicolon before va_end().

1992-11-10  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in: Now handle protoized sources.  Define and use U.
	Compile and use ansi2knr with old compilers.  Update DISTFILES.
	Add `aclocal.m4' to `configure' dependencies.
	* ansi2knr.c: New, from Ghostscript distribution.
	* configure.in: Define U through FP_PROTOTYPES for old compilers.
	Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
	* aclocal.m4: New, provide FP_PROTOTYPES.
	* m4.h: Conditionnaly protoized through Args, save for varags.
	* builtin.c: Protoized.  Then:
	Include <sys/types.h> if size_t is not defined, before "regex.h".
	(m4_ifelse): Fetch built-in name properly for diagnostic.
	(m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
	(m4_regexp): Add const to `msg' declaration.
	(m4_patsubst): Add const to `msg' declaration.
	* debug.c: Protoized, save for varargs.
	* eval.c: Protoized.
	* format.c: Protoized.
	* input.c: Protoized.
	* m4.c: Protoized, save for varargs.  Then:
	(xfree): Accept void * instead of char *.
	(xmalloc): Return void * instead of char *.
	(xrealloc): Accept and return void * instead of char *.
	* macro.c: Protoized.
	* output.c: Protoized.
	* path.c: Protoized.  Then cast some (char *) over xmalloc's.
	* symtab.c: Protoized.

1992-11-06  François Pinard  <pinard@iro.umontreal.ca>

	* m4.texinfo: Remove directory from diagnostics in 30.include,
	51.eval, 56.errprint and 57.m4exit tests.

	* m4.h: Remove declarations for int or void system functions, they
	cause more conflicting trouble than they make good.

	* configure.in: Avoid configuration header file.  Add some tests.
	* m4.h: Remove #include "config.h".
	* Makefile.in, lib/Makefile.in: Implement Autoconf interface.
	Then, rewritten for better compliance with GNU standards.

1992-11-05  François Pinard  <pinard@iro.umontreal.ca>

	* format.c (format): Avoid syntax error if not HAVE_EFGCVT,
	because of a misplaced #endif.

	* Many *.[hc] files: Correct intra-line spacing here and there,
	according to GNU indent 1.6 advice.

	* configure.in: New, using Autoconf 1.2.
	* m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
	* Delete old configure.in, configure, etc/configure.in,
	etc/configure, lib/configure.in, lib/configure and config/*.
	Reported by Jason Merrill.

	* symtab.c (hash): Change (char) NULL to '\0'.
	Reported by Jason Merrill.

	* Delete .vers, etc/newdist.sh, etc/newvers.sh and
	etc/nextvers.sh.  Release numbers will be edited `by hand'.
	* version.h: De-automatize, force value in.

	* m4.c: Changes in order to use a newer getopt.h.
	Reported by David MacKenzie.

	* checks/: New name for examples/.
	* checks/get_them: New location for etc/get_examples.
	* checks/check_them: New location for etc/check_examples.
	* Makefile.in, checks/get_them, checks/check_them: Adjust.
	* lib/vfprintf.c: New location for etc/vfprintf.c.
	* Delete empty etc/.
	* examples/: New name for test/.

1992-03-10  François Pinard  <pinard@iro.umontreal.ca>

	* Makefile.in (check): Add m4 as dependency.

	* m4.c: Accept --no-warnings instead of --no_warnings, and
	--no-gnu-extensions instead of --no_gnu_extensions.  Make the
	usage message more informative.
	Reported by David MacKenzie.

1992-03-09  François Pinard  <pinard@iro.umontreal.ca>

	* etc/check_examples: New name for check_examples.sh.
	* etc/get_examples: New name for get_examples.sh.
	* Makefile.in, etc/Makefile.in: Use new names.

	* Makefile.in: Transmit $(CC) while making in lib.

	* Many *.[hc] files: GNU indent'ed, with further fine tuning of
	code disposition by hand.

1992-03-08  François Pinard  <pinard@iro.umontreal.ca>

	* m4.h: Delete definitions for abort() and exit().
	Reported by Richard Stallman.

	* config/hmake-unicos, config/s-unicos.h: New files.
	Reported by Hal Peterson.

	* eval.c (exp_term): Have N^0 return 1.
	Reported by Michael Fetterman.

	* eval.c, input.c, m4.h: Remove last comma in enums.
	Reported by Mike Lijewski.

	* Transfer of maintenance duties from René to François.

1991-10-24  René Seindal <seindal@diku.dk>

	* Release 1.0.  Many thanks to those, who provided me with bug
	reports and feedback.

	* Uses GNU configure, taken from the gdb distribution.

	* Uses GNU getopt(), with long option names.

	* The -Q/+quiet option is added, which suppresses warnings about
	missing or superflous arguments to built-in macros.

	* Added default options via the M4OPTS environment variable.

	* The built-in format can now be configured to use sprintf as
	the formatting engine, for systems without [efg]cvt(3).

	* GNU library code is moved to the ./lib subdirectory; other
	utility files are now in ./etc.

	* Several minor bugs have been fixed.

1991-07-26  René Seindal <seindal@diku.dk>

	* Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
	François Pinard and Roland H. Pesch for providing me with reports.

	* The builtins incr and decr are now implemented without use of
	eval.

	* The builtin indir is added, to allow for indirect macro calls
	(allows use of "illegal" macro names).

	* The debugging and tracing facilities has been enhanced
	considerably.  See the manual for details.

	* The -tMACRO option is added, marks MACRO for tracing as soon
	as it is defined.

	* Builtins are traced after renaming iff they were before.

	* Named files can now be undiverted.

	* The -Nnum option can be used to increase the number of
	divertions available.

	* Calling changecom without arguments now disables all comment
	handling.

	* The function m4_patsubst() is now consistently declared
	static.

	* A bug in dnl is fixed.

	* A bug in the multi-character quoting code is fixed.

	* Several typos in the manual has been corrected.  More probably
	persist.

	* The m4.info file is now installed along with the program.

1990-11-15  René Seindal <seindal@diku.dk>

	* Updated and enhanced version.  Release 0.75, manual 0.07.

	* Implemented search path for include files (-I option and
	M4PATH envronment variable).

	* Implemented builtin "format" for printf-like formatting.

	* Implemented builtin "regexp" for searching for regular
	expressions.

	* Implemented builtin "patsubst" for substitution with regular
	expressions.

	* Implemented builtin "esyscmd", which expands to a shell
	commands output.

	* Implemented "__file__" and "__line__" for use in error
	messages.

	* Implemented character ranges in "translit".

	* Implemented control over debugging output.

	* Implemented multi-character quotes.

	* Implemented multi-character comment delimiters.

	* Changed predefined macro "gnu" to "__gnu__".

	* Changed predefined macro "unix" to "__unix__", when the -G
	option is not used.  With -G, "unix" is still defined.

	* Changed "shift", "$@" and "$*" to not insert spaces afters
	commas.

	* Added program name to error messages.

	* Fixed two missing null bytes bugs.

1990-01-22  René Seindal <seindal@diku.dk>

	* Initial beta release.  Release 0.50, manual 0.05.


	-----

	Local Variables:
	coding: utf-8
	End:

	Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
	2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.

	Copying and distribution of this file, with or without
	modification, are permitted provided the copyright notice
	and this notice are preserved.