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
|
2011-03-01 Eric Blake <eblake@redhat.com>
Release Version 1.4.16.
* gnulib: Update to latest.
* NEWS: Mention the release.
* src/builtin.c (m4_defn): Silence spurious -Wstrict-overflow
warnings from gcc 4.5.1 at -O2.
2011-02-28 Eric Blake <eblake@redhat.com>
index: fix typo in previous commit
* doc/m4.texinfo (Index macro): Actually expose the bug.
2011-02-26 Eric Blake <eblake@redhat.com>
index: fix another regression from faulty strstr
* gnulib: Update to latest, for strstr fix.
* doc/m4.texinfo (Index macro): Test for the bug.
* NEWS: Document the fix.
* THANKS: Update.
Reported by Mike Stump, with additional analysis from Ralf
Wildenhues and Jim Meyering.
2011-02-07 Eric Blake <eblake@redhat.com>
maint: speed up configure, using latest gnulib
* gnulib: Update to latest.
* m4/gnulib-cache.m4: Import fclose and rename modules.
* configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Speed up normal
configure runs (and document how to rerun GNULIB_POSIXCHECK).
* HACKING: Document GNULIB_POSIXCHECK.
maint: update http git cloning instructions
* HACKING: Git http doesn't like the redirect at git.sv.gnu.org.
* THANKS: Update.
Reported by Mike Dupont.
2011-02-01 Eric Blake <eblake@redhat.com>
maint: update to latest gnulib
* gnulib: Update to latest.
* m4/gnulib-cache.m4: Regenerate.
* src/builtin.c (m4_ifelse): Use STREQ.
2011-01-25 Eric Blake <eblake@redhat.com>
maint: reflect recent copyright assignments
* AUTHORS: Update.
2011-01-03 Eric Blake <eblake@redhat.com>
maint: update copyright year
* gnulib: Update to latest.
* m4/gnulib-cache.m4: Regenerate.
* all other files: Run 'make update-copyright'.
maint: document use of copyright ranges
* README: Copy coreutils wording for allowing copyright year
ranges. Also mention libsigsegv 2.9.
* cfg.mk (UPDATE_COPYRIGHT_USE_INTERVALS): Now that GNU Coding
Standards permit it, prefer shorthand copyright.
* HACKING: Update libsigsegv preference.
* NEWS: 1.4.16 will be in 2011.
* doc/m4.texinfo (History): Likewise.
2010-12-31 Eric Blake <eblake@redhat.com>
main: avoid leaking string on Haiku
* src/m4.c (main): Avoid leak when SIGBUS == SIGSEGV.
* THANKS: Update.
Reported by Scott McCreary.
2010-12-24 Eric Blake <eblake@redhat.com>
build: pull in various gnulib fixes
* gnulib: Update to latest.
* m4/gnulib-cache.m4: Reflect spawn-pipe module name change.
* src/builtin.c (includes): Likewise.
(define_user_macro): Alter comment to appease syntax-check.
* src/input.c (pop_wrapup): Likewise.
* src/output.c (undivert_all): Likewise.
* cfg.mk (local-checks-to-skip): Skip new rule.
maint: reflect recent copyright assignment
* AUTHORS: Add Raphael Poss.
2010-10-21 Eric Blake <eblake@redhat.com>
build: work around glibc and libsigsegv bugs
* gnulib: Update to latest.
* m4/gnulib-cache.m4: Regenerate.
* docs/m4.texinfo (Index macro): Expose strstr bug.
* NEWS: Mention fixes.
docs: mention more history
* doc/m4.texinfo (History): Add upcoming 1.4.16 release.
2010-08-31 Eric Blake <eblake@redhat.com>
Release Version 1.4.15.
* gnulib: Update to latest.
* NEWS: Mention the release.
2010-08-30 Eric Blake <eblake@redhat.com>
Clean up compiler warnings.
* src/builtin.c (m4_patsubst): Drop dead store.
* src/eval.c (unary_term): Likewise.
* src/input.c (match_input): Likewise. Also drop useless casts to
void.
* src/symtab.c (symtab_debug): Drop useless casts.
Test previous commit.
* doc/m4.texinfo (Format): Add a test.
* NEWS: Document the fix.
* THANKS: Update.
2010-08-30 Carlo Teubner <carlo.teubner@gmail.com> (tiny change)
Avoid a crash with bad format string.
* src/format.c (expand_format): Fix off-by-one error.
2010-08-30 Eric Blake <eblake@redhat.com>
Document recent bug fixes.
* NEWS: Add some entries.
* gnulib: Update to latest, for more AIX fixes.
2010-07-30 Eric Blake <eblake@redhat.com>
Update to newer gnulib.
* gnulib: Update to latest, for strtod fix.
* src/Makefile.am (m4_LDADD): Update link libraries accordingly.
* cfg.mk (local-checks-to-skip): Skip broken check.
* doc/m4.texinfo: Drop all use of @acronym{}.
* THANKS: Update.
Reported by Rainer Tammer.
2010-06-04 Eric Blake <eblake@redhat.com>
Reflect recent copyright assignment.
* AUTHORS: Add David Warme.
Update to newer gnulib.
* gnulib: Update to latest, and include C++ tests.
* configure.ac (gl_CXX_CHOICE_DEFAULT_NO): Make default for C++
tests be disabled...
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): ...but run them when
building package.
* m4/gnulib-cache.m4: Regenerate.
* build-aux/.cvsignore: Likewise.
* build-aux/.gitignore: Likewise.
Fix build on newer glibc.
* src/m4.h (includes): Add <sys/stat.h>.
* THANKS: Update.
Reported by Todd Rinaldo.
2010-03-02 Giuseppe Scrivano <gscrivano@gnu.org> (tiny change)
Support bootstrap --gnulib-srcdir=DIR.
* bootstrap: Add --gnulib-srcdir option, which overrides
GNULIB_SRCDIR, for consistency with gnulib bootstrap.
2010-02-24 Eric Blake <eblake@redhat.com>
Release Version 1.4.14.
* gnulib: Update to latest.
* README: Increase libsigsegv recommendation.
* HACKING: Likewise. Tweak release instructions.
* NEWS: Mention the release.
Improve parsing example.
* doc/m4.texinfo (Input processing): Double-quote argument to
translit, for robustness.
* THANKS: Update.
Reported by Chris Penev.
2010-01-29 Eric Blake <ebb9@byu.net>
Document upcoming release.
* gnulib: Update to latest.
* doc/m4.texinfo (History): Mention 1.4.14.
2010-01-06 Eric Blake <ebb9@byu.net>
Use correct license on auxiliary documentation.
* gnulib: Update to latest.
* AUTHORS: Use GFDL 1.3, not 1.2.
* BACKLOG: Likewise.
* README: Likewise.
* THANKS: Likewise.
* TODO: Likewise.
* NEWS: Place under GFDL.
* cfg.mk (old_NEWS_hash): Update.
2010-01-05 Eric Blake <ebb9@byu.net>
Remove more TAB characters.
* THANKS: Use space for alignment.
* bootstrap: Likewise.
* checks/stackovf.test: Likewise.
* configure.ac: Likewise.
* src/builtin.c: Likewise. Also update some stale comments.
* src/debug.c: Likewise.
* src/eval.c: Likewise.
* src/format.c: Likewise.
* src/freeze.c: Likewise.
* src/input.c: Likewise.
* src/m4.c: Likewise.
* src/m4.h: Likewise.
* src/macro.c: Likewise.
* src/output.c: Likewise.
* src/path.c: Likewise.
* src/symtab.c: Likewise.
Clarify minimum bootstrap requirements.
* bootstrap: Avoid out-of-date duplicated data.
Security fix by requiring newer automake features.
* configure.ac (AM_INIT_AUTOMAKE): Add dist-xz, color-tests,
parallel-tests, and silent-rules.
(AC_PREREQ): Bump autoconf requirement to 2.62, per automake.
* HACKING: Update minimum requirements.
* NEWS: Document the fix.
Drop hard-coding of GPG id.
* gnulib: Update to latest.
* m4/gnulib-cache.m4: Regenerate.
* cfg.mk (gpg_key_ID): Delete, now that maint.mk provides a
sensible default.
(update-copyright-env): Don't let environment interfere with wrap
column.
2010-01-01 Eric Blake <ebb9@byu.net>
Update copyright year.
All files impacted, via 'make update-copyright'. Additionally:
* .gitignore: Ignore backup files.
2009-12-29 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): New macro.
(EXTRA_DIST): Distribute exception files, and .prev-version.
Switch to indentation by space, not tab.
* .gitmodules: Convert leading tabs to spaces.
* TODO: Likewise.
* bootstrap: Likewise.
* c-boxes.el: Likewise.
* checks/check-them: Likewise.
* checks/get-them: Likewise.
* checks/stackovf.test: Likewise.
* configure.ac: Likewise.
* src/builtin.c: Likewise.
* src/debug.c: Likewise.
* src/eval.c: Likewise.
* src/format.c: Likewise.
* src/freeze.c: Likewise.
* src/input.c: Likewise.
* src/m4.c: Likewise.
* src/m4.h: Likewise.
* src/macro.c: Likewise.
* src/output.c: Likewise.
* src/path.c: Likewise.
* src/symtab.c: Likewise.
Update to latest gnulib.
* gnulib: Update.
* m4/gnulib-cache.m4: Import xoset.
* src/output.c (includes): Ensure that gnulib oset usage will
call xalloc_die on memory failure.
* build-aux/.cvsignore: Regenerate.
* build-aux/.gitignore: Likewise.
2009-11-28 Eric Blake <ebb9@byu.net>
Work around BSD getopt bug.
* gnulib: Update.
* doc/m4.texinfo (Command line files): Add test.
Use fastmap for better regex performance.
* src/input.c (word_start): Delete.
(pop_wrapup): Free memory on exit.
(set_word_regexp): Compile a fastmap instead.
(peek_token, next_token): Use the fastmap.
2009-11-26 Eric Blake <ebb9@byu.net>
Ignore write failures before stack overflow exit.
* m4/gnulib-cache.m4: Import ignore-value module.
* src/m4.c (fault_handler): Use it to avoid compiler warning.
2009-11-25 Eric Blake <ebb9@byu.net>
Allow use of compiler warnings.
* m4/gnulib-cache.m4: Import manywarnings module.
* configure.ac (WERROR_CFLAGS, WARN_CFLAGS): New variables.
* src/Makefile.am (AM_CFLAGS): Use them.
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Turn on warnings during
distcheck.
* src/m4.h (M4_GNUC_NORETURN): New macro.
(trace_post): Delete unused parameter.
* src/m4.c (usage): Mark as noreturn.
(main): Remove unused parameter.
* src/debug.c (trace_post): Likewise.
(trace_pre): Cover all enum values.
* src/symtab.c (lookup_symbol): Likewise.
* src/builtin.c (define_macro, m4_dumpdef): Likewise.
(m4_define, m4_undefine, m4_pushdef, m4_popdef, m4_sysval)
(m4_divert, m4_undivert, m4_dnl, m4_changequote, m4_changecom)
(m4_changeword, m4_syscmd, m4_include, m4_sinclude, m4_m4exit)
(m4_debugmode, m4_debugfile, m4_placeholder): Mark unused
parameters.
(mkstemp_helper): Use parameter.
(substitute): Avoid signed vs. unsigned comparison.
* src/format.c (arg_int, arg_long, arg_double): Likewise.
* src/input.c (next_token): Likewise.
* src/output.c (freeze_diversions): Likewise.
(m4_tmpname): Allow C++ compilation.
* src/freeze.c (produce_frozen_state, GET_NUMBER): Use correct
type.
* src/macro.c (call_macro): Cover all enum values.
(expand_macro): Update caller.
* src/path.c (m4_fopen): Remove unused parameter.
(m4_path_search): Update caller.
Silence syntax-check warnings.
* src/m4.h (STREQ): New macro.
* src/builtin.c (find_builtin_by_name): Use it.
* src/input.c (set_word_regexp): Likewise.
* src/m4.c (process_file): Likewise.
(main): Consistently spell warning, and mark output strings.
Avoid unsafe parsing functions.
(process_file): Mark output strings.
* src/output.c (make_diversion): Likewise.
* src/format.c (arg_int, arg_long, arg_double): New helpers.
(ARG_INT, ARG_LONG, ARG_DOUBLE): Use them to detect parse errors.
* BACKLOG: Avoid whitespace problems.
* TODO: Likewise.
* HACKING: Likewise.
* examples/esyscmd.m4: Likewise.
* examples/file.m4: Likewise.
* examples/fstab.m4: Likewise.
* examples/patsubst.m4: Likewise.
Use gnulib maintainer-makefile module.
* 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.
(gnulib_dir, gnu_rel_host, url_dir_list): Delete; provided by
maint.mk.
(config_h_header, old_NEWS_hash): New macros.
* .prev-version: New file.
* maint.mk: Remove from version control; use gnulib instead.
* .gitignore: Update.
* HACKING: Update.
Update from gnulib.
* gnulib: Update.
* m4/gnulib-cache.m4: Use --makefile-name.
* lib/Makefile.am: Wrap the gnulib-generated file.
* tests/Makefile.am: Likewise.
* .gitignore: Track our wrappers.
* doc/m4.texinfo (Improved capitalize): Fix typo.
2009-10-05 Eric Blake <ebb9@byu.net>
Update from gnulib.
* gnulib: Update.
* m4/gnulib-cache.m4: Import gnu-web-doc-update module.
* build-aux/.gitignore: Ignore new file.
* build-aux/.cvsignore: Likewise.
2009-08-20 Eric Blake <ebb9@byu.net>
Update from gnulib.
* gnulib: Update.
* AUTHORS: Mention recent copyright assignment.
2009-08-17 Eric Blake <ebb9@byu.net>
Enhance test with closed descriptors.
* doc/m4.texinfo (Command line files): Enhance test from
2009-07-20 to actually test the bug being fixed.
Update copyright year.
* AUTHORS: Run UPDATE_COPYRIGHT_FORCE=1 make update-copyright.
* BACKLOG: Likewise.
* Makefile.am: Likewise.
* TODO: Likewise.
* acinclude.m4: Likewise.
* c-boxes.el: Likewise.
* cfg.mk: Likewise.
* checks/Makefile.in: Likewise.
* checks/check-them: Likewise.
* checks/stackovf.test: Likewise.
* doc/Makefile.am: Likewise.
* examples/Makefile.am: Likewise.
* src/Makefile.am: Likewise.
* src/debug.c: Likewise.
* src/eval.c: Likewise.
* src/freeze.c: Likewise.
* src/m4.h: Likewise.
* src/macro.c: Likewise.
* src/path.c: Likewise.
* src/symtab.c: Likewise.
Prepare to bulk update copyright year.
* gnulib: Update.
* m4/gnulib-cache.m4: Import update-copyright and vc-list-files
modules.
* maint.mk: Fix copyright.
(build_aux, VC_LIST, VC_LIST_EXCEPT, update-copyright): New macros
and rules borrowed from gnulib.
* cfg.mk (update-copyright-env): Enforce longhand behavior.
* .cvsignore: Reflect these changes.
* .gitignore: Likewise.
* .x-update-copyright: New file.
2009-08-14 Eric Blake <ebb9@byu.net>
Explicitly request GNU getopt extensions.
* gnulib: Update.
* m4/gnulib-cache.m4: Use getopt-gnu, not obsolete getopt module.
2009-07-22 Eric Blake <ebb9@byu.net>
Fix testsuite on Solaris.
* doc/m4.texinfo (Command line files): Tolerate different spelling
of EBADF.
* src/builtin.c (m4_esyscmd): Clear errno before reaping.
2009-07-21 Eric Blake <ebb9@byu.net>
Fix testsuite on mingw.
* gnulib: Update.
2009-07-20 Eric Blake <ebb9@byu.net>
Pick up gnulib fixes for sub-process execution.
* gnulib: Update.
* doc/m4.texinfo (Command line files): Add test; regression
introduced 2009-03-05.
* NEWS: Document the change.
Avoid cygwin 1.7 crash with closed stdout.
* gnulib: Update.
* doc/m4.texinfo (Command line files): Add test; regression
introduced 2008-07-17.
* NEWS: Document the change.
A status of 127 does not always imply esyscmd failure.
* src/builtin.c (m4_esyscmd): Silence gnulib message; regression
introduced 2009-03-05.
* doc/m4.texinfo (Sysval): Test this.
* NEWS: Document the change.
2009-06-25 Eric Blake <ebb9@byu.net>
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>
Update to latest gnulib.
* gnulib: Import fixes for Interix compilation.
* THANKS: Update.
Reported by Jay Krell.
2009-05-22 Eric Blake <ebb9@byu.net>
Update to latest gnulib.
* gnulib: Import fixes for AIX compilation.
* THANKS: Update.
Reported by Jens Rehsack.
2009-04-13 Eric Blake <ebb9@byu.net>
Fix GFDL usage.
* doc/m4.texinfo (copying): Complete transition to GFDL 1.3,
started 2008-12-12.
Reported by Santiago Vila.
2009-04-01 Eric Blake <ebb9@byu.net>
Release Version 1.4.13.
* NEWS: Mention the release.
2009-03-31 Eric Blake <ebb9@byu.net>
Tweak submodule instructions.
* HACKING: Improve directions.
* gnulib: Update to latest version.
2009-03-23 Eric Blake <ebb9@byu.net>
Don't force file overwrites during bootstrap.
* bootstrap: Ensure that rerunning bootstrap doesn't alter tree.
Drop dist-lzma, now that xz replaces lzma.
* configure.ac (AM_INIT_AUTOMAKE): Drop dist-lzma. Until a stable
automake release includes dist-xz, the release process will just
manually create a .xz tarball.
* gnulib: Update to latest gnulib.
2009-03-19 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.
2009-03-18 Eric Blake <ebb9@byu.net>
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.
Use latest compile script, even with stable automake.
* bootstrap: Also sync build-aux/compile.
2009-03-12 Eric Blake <ebb9@byu.net>
Fix awk script portability.
* checks/get-them: In gsub, properly escape {. Close all files
before exiting.
Reported by Gary V. Vaughan.
2009-03-05 Eric Blake <ebb9@byu.net>
Allow configuration choice in syscmd shell.
* configure.ac (SYSCMD_SHELL): New test.
* src/builtin.c (m4_syscmd, m4_esyscmd): Use it to avoid
hard-coding the shell location.
* doc/m4.texinfo (Syscmd, Esyscmd): Document this.
* README: Document new configure option.
* NEWS: Likewise.
Remove cruft now that gnulib modules do the work.
* configure.ac (M4_cv_func_system_consistent): Delete.
* src/builtin.c (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS):
Delete.
Use gnulib pipe module instead of popen(3).
* m4/gnulib-cache.m4: Import pipe and wait-process modules.
* src/builtin.c (m4_esyscmd): Rewrite with pipe module.
Resolves a failure on AIX, reported by Gary V. Vaughan.
Use gnulib execute module instead of system(3).
* m4/gnulib-cache.m4: Import execute module.
* src/builtin.c (m4_sysval): Move computation...
(m4_esyscmd): ...into caller.
(m4_syscmd): Rewrite with execute module.
Resolves a failure on AIX, reported by Gary V. Vaughan.
2009-03-03 Eric Blake <ebb9@byu.net>
Try to tolerate spaces in directory names in testsuite.
* doc/m4.texinfo (Diversions, Using frozen files): Provide shell
quoting, in case __program__ contains spaces.
Improve web-manual maintainer rule.
* maint.mk (web-manual): Work with VPATH builds. Factor
package-specific detail...
* cfg.mk (manual_title): ...to new variable.
2009-02-26 Eric Blake <ebb9@byu.net>
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-02-19 Eric Blake <ebb9@byu.net>
Fix regression in translit.
* src/builtin.c (m4_translit): Use correct comparison.
* doc/m4.texinfo (Translit): Enhance test.
Speed up input engine, by searching for quotes by buffer.
* src/input.c (struct input_block): Add end pointer to string.
(push_string_finish, push_wrapup): Populate it.
(next_token): For quotes, attempt a buffer search.
* NEWS: Document this.
2009-02-18 Eric Blake <ebb9@byu.net>
Speed up translit when from argument is short.
* m4/gnulib-cache.m4: Import memchr2 module.
* src/builtin.c (m4_translit): Use memchr2 when possible.
* doc/m4.texinfo (Translit): Add tests.
* NEWS: Document this.
Update copyright year.
* THANKS: Mention 2009 in copyright year.
Prefer buffer over byte operations.
* src/format.c (expand_format): Use strchr for speed.
* src/builtin.c (substitute, expand_user_macro): Likewise.
Speed up esyscmd with buffer reads.
* src/builtin.c (m4_esyscmd): Read blocks directly into obstack,
rather than repeatedly reading bytes. Detect read errors.
Avoid risk of stack overflow.
* src/output.c (insert_file): Avoid stack allocation of large
buffer.
(freeze_diversions): Avoid spurious semicolon.
2009-02-16 Eric Blake <ebb9@byu.net>
Avoid test failure due to different errno.
* doc/m4.texinfo (Using frozen files): Ignore stdout, since
hardened systems can prevent attempts to read /.
* THANKS: Update.
Reported by Ronny Peine, in Gentoo bug 259184.
Avoid tests that make no sense, because m4 is single-threaded.
* m4/gnulib-cache.m4: Avoid lock-tests and tls-tests.
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 and add test,
based on recent autoconf bug fix.
2009-01-24 Eric Blake <ebb9@byu.net>
Add URLs to --help output.
* src/m4.c (usage): Use enhanced version-etc features.
2009-01-02 Eric Blake <ebb9@byu.net>
Use nicer email address in web manual.
* maint.mk (web-manual): Use new option in gendocs.sh.
Nuke xdelta diffs at release time; no one reported using them.
* maint.mk (got-xdelta, delta-xdelta): Delete.
* HACKING: Likewise.
2009-01-01 Eric Blake <ebb9@byu.net>
Update copyright year.
* NEWS: M4 1.4.13 will occur in 2009.
* doc/m4.texinfo (History): Likewise.
2008-12-24 Eric Blake <ebb9@byu.net>
Prepare for eventual release.
* doc/m4.texinfo (History): Mention 1.4.13.
2008-12-22 Eric Blake <ebb9@byu.net>
Make --debugfile argument optional.
* src/builtin.c (m4_debugfile): Make error message consistent.
* src/m4.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.
Use @var correctly.
* doc/m4.texinfo (Operation modes, Preprocessor features)
(Limits control, Frozen state, Debugging options): Use lower case
names in @var.
(Improved copy): Use @code, not @var, as appropriate.
2008-12-18 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.
* examples/Makefile.am (EXTRA_DIST): Distribute it.
Deal with M4 1.4.x limitation on builtin tokens.
* doc/m4.texinfo (Composition): Mention limitation on curry.
(Improved copy): New node.
* examples/stack_sep.m4: New file.
* examples/Makefile.am (EXTRA_DIST): 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.
* examples/Makefile.am (EXTRA_DIST): Distribute them.
2008-12-17 Eric Blake <ebb9@byu.net>
Don't override signal handlers installed by c-stack.
* src/m4.c (main): Reorder installation of signal handlers, so we
don't trash a SIGBUS handler installed by c-stack. Also provide a
SIGSEGV fallback, for platforms where c-stack combined with
libsigsegv uses something lower level than SIGSEGV.
2008-12-12 Eric Blake <ebb9@byu.net>
Double size of temp file cache.
* src/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)
(output_exit): Adjust callers.
Use fewer seeks on cached files.
* src/output.c (m4_tmpfile): Use write, not append mode.
(m4_tmpopen): Add parameter to decide when to skip seeks.
(m4_tmprename, make_diversion, insert_diversion_helper)
(freeze_diversions): Adjust callers.
Cache most recently spilled diversion.
* src/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.
(output_exit): Close cache before exiting.
(make_room_for, make_diversion, insert_diversion_helper): Adjust
callers.
* configure.ac (RENAME_OPEN_FILE_WORKS): New configure test.
Correctly track size of in-memory diversions.
* src/output.c (insert_diversion_helper): Correctly track total
in-memory diversion size after undivert.
Avoid quadratic behavior for some cases of divert/undivert.
* src/output.c (struct m4_diversion): Improve comments.
(m4_tmpname, make_diversion): Strengthen preconditions.
(m4_tmprename): New function.
(output_init, 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.
* src/m4.h (includes): Add assert.h.
* doc/m4.texinfo (Diversions): Add test.
(Undivert): Enhance test.
* NEWS: Document the speedup.
2008-12-12 Eric Blake <ebb9@byu.net>
Upgrade to FDL 1.3, 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.
* m4/gnulib-cache.m4: Replace fdl module with fdl-1.3.
* doc/m4.texinfo (GNU Free Documentation License): Upgrade
license.
* doc/Makefile.am (m4_TEXINFOS): Likewise.
* NEWS: Mention the documentation license change.
2008-10-10 Eric Blake <ebb9@byu.net>
Release Version 1.4.12.
* NEWS: Mention the release.
2008-10-06 Eric Blake <ebb9@byu.net>
Work around Solaris' sed inability to process NUL.
* checks/check-them (SED): Allow user to override.
2008-09-25 Eric Blake <ebb9@byu.net>
Tweak error message on command line failure.
* src/m4.c (process_file): Match wording of include builtin.
* src/freeze.c (produce_frozen_state): Likewise.
* m4/gnulib-cache.m4: Regenerate.
* doc/m4.texinfo (Command line files, Using frozen files): Update
tests accordingly.
2008-09-24 Eric Blake <ebb9@byu.net>
Unify error handling for reading directories.
* src/path.c (m4_path_search): Factor open attempts...
(m4_fopen): ...into new function, to reject directories.
* doc/m4.texinfo (Include): Document that directories cannot be
input files.
Avoid bugs on platforms that mishandle trailing /.
* m4/gnulib-cache.m4: Import fopen module.
* doc/m4.texinfo (Command line files, Include): Add tests.
(Using frozen files): This test now works on mingw.
* checks/check-them (examples): Expand xerr to allow ignoring
error output because of differences in platform errno values.
2008-09-22 Eric Blake <ebb9@byu.net>
Support alternate path separator.
* m4/gnulib-cache.m4: Import dirname and filenamecat modules.
* src/m4.h (includes): Add headers.
* src/path.c (m4_path_search): Avoid literal use of '/' as path
separator and when detecting absolute paths.
2008-09-16 Eric Blake <ebb9@byu.net>
Fix bootstrap for Solaris /bin/sh.
* bootstrap: Avoid shell quoting pitfall.
2008-09-01 Eric Blake <ebb9@byu.net>
Fix building with -DDEBUG=1.
* src/input.c (lex_debug) [DEBUG_INPUT]: Fix compilation failure.
* src/symtab.c (symtab_debug) [DEBUG_SYM]: Likewise.
* src/m4.c (includes) [DEBUG_STKOVF]: Likewise.
Reported by Tom G. Christensen.
2008-09-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Typos in source code comments.
* src/builtin.c: Fix typos in comments.
* src/input.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>
Fix typo.
* doc/m4.texinfo (Invoking m4): 'm4 -d+f' is not supported in this
branch.
2008-08-25 Eric Blake <ebb9@byu.net>
Update recommendation now that libsigsegv 2.6 is released.
* NEWS: Recommend libsigsegv 2.6+.
* README: Likewise.
2008-08-21 Eric Blake <ebb9@byu.net>
Fix crash with traced defn(undef), regression from 2007-08-09.
* src/builtin.c (m4_defn): Handle traced but undefined macros.
* doc/m4.texinfo (Trace): Test it.
* NEWS: Document it.
2008-08-18 Eric Blake <ebb9@byu.net>
Fix crash with 'm4 -N9', regression from 2006-09-14.
* src/m4.c (main): Add missing break.
* NEWS: Document it.
2008-08-15 Eric Blake <ebb9@byu.net>
Documentation updates.
* doc/m4.texinfo (History): Mention 1.4.12.
(Builtin): Enhance regression tests.
(Debug Levels): Mention effect of -l. Enhance regression tests.
(Incompatibilities): Fix typo, and mention trace output.
(Improved capitalize): Simplify example.
Avoid compiler warning.
* src/builtin.c (m4_ifelse): Avoid unused variable.
* THANKS: Update.
Reported by Tom G. Christensen.
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-11 Eric Blake <ebb9@byu.net>
Avoid triggering OS/2 bug in testsuite.
* doc/m4.texinfo (Mkstemp): Don't assume test(1) status is 1.
Reported by Elbert Pol.
2008-08-03 Eric Blake <ebb9@byu.net>
Increase ulimit stack value to be larger than SIGSTKSZ.
* checks/stackovf.test (tmpfile): Use 300K rather than 50K, since
at least OpenBSD's sh died early from an undersized stack limit.
2008-07-17 Eric Blake <ebb9@byu.net>
Remove redundant examples/stackovf.sh.
* examples/stackovf.sh: Delete, now that checks has better
version.
* examples/Makefile.am (EXTRA_DIST): Don't distribute it.
2008-07-17 Eric Blake <ebb9@byu.net>
Adjust to c-stack changes in gnulib.
* src/Makefile.am (m4_LDADD): Use libsigsegv when available and
necessary, via LIBCSTACK.
* src/m4.c (main) [DEBUG_STACKOVF]: Make it easier to test fault
handlers.
* checks/stackovf.test: New file.
* checks/Makefile.in (CHECKS): Add stackovf.test, and factor...
(DOC_CHECKS): ...generated documentation tests into new macro.
(DISTFILES): Distribute stackovf.test.
* checks/check-them: Special-case stackovf.test.
* NEWS: Enhance the NEWS item for -L improvements.
* README: Mention the optional dependency.
* HACKING: Mention maintenance burden added by libsigsegv.
2008-06-21 Eric Blake <ebb9@byu.net>
Use new sigaction module.
* m4/gnulib-cache.m4: Import sigaction module.
* src/m4.c (main): Drop signal() calls.
2008-06-18 Eric Blake <ebb9@byu.net>
Also trap SIGILL, SIGFPE, SIGBUS.
* m4/gnulib-cache.m4: Import strsignal module.
* src/m4.c (main): Register more handlers, and prefer sigaction
when available.
(SIGBUS, NSIG): Provide fallback when lacking.
(signal_message): New variable, to keep async-safety.
(fault_handler): Display faulting signal description.
* configure.ac (gl_DISABLE_THREADS): Request gnulib modules to
optimize for single-threaded operation.
2008-06-06 Eric Blake <ebb9@byu.net>
Inform users what to do in case of programmer error.
* src/m4.h (EXIT_INTERNAL_ERROR): New macro.
* configure.ac (AC_TYPE_SIGNAL): Delete, now that we assume C89.
* src/m4.c (fault_handler): New method.
(program_error_message): New variable, for async-safety.
(main): Print bug reporting address rather than dump core on any
failed assertions or detected non-stack-overflow faults.
2008-06-06 Eric Blake <ebb9@byu.net>
Replace stackovf with gnulib c-stack.
* m4/gnulib.cache.m4: Import c-stack module.
* configure.ac (AC_CHECK_HEADERS_ONCE): Remove check for
siginfo.h, sys/wait.h.
(AC_CHECK_TYPES): Likewise for siginfo_t.
(AC_CHECK_MEMBERS): Likewise for sa_sigaction, ss_sp.
(AC_CHECK_FUNCS_ONCE): Likewise for sigaction, sigaltstack,
sigstack, sigvec, strerror.
(M4_cv_use_stackovf): Likewise for stack overflow detection.
* src/Makefile.am (m4_SOURCES): Don't build stackovf.c.
* src/stackovf.c: Delete.
* src/m4.h (setup_stackovf_trap): Delete.
* src/m4.c (stackovf_handler): Delete.
(main): Use c_stack_action instead of setup_stackovf_trap. If
stack overflow is detectable, don't limit -L artificially.
(usage): Document unlimited default on supported systems.
* doc/m4.texinfo (Limits control): Document new default nesting
limit.
* NEWS: Document this change.
2008-07-30 Eric Blake <ebb9@byu.net>
Avoid regressions in trace and comment output.
* doc/m4.texinfo (Trace): Add test.
(Comments): Likewise.
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.
* examples/Makefile.am (EXTRA_DIST): Distribute it.
* doc/m4.texinfo (Improved foreach): Document linear foreach with
m4 1.4.5 and greater.
2008-07-17 Eric Blake <ebb9@byu.net>
Fix missing copyright notices.
* acinclude.m4: Add copyright license details.
* c-boxes.el: Likewise.
* checks/get-them: Likewise.
* checks/check-them: Likewise.
2008-07-13 Eric Blake <ebb9@byu.net>
Add -g/--gnu command line argument.
* src/m4.c (usage): Mention the new option.
(long_options, OPTSTRING): Add new option.
(main): Use it.
* NEWS: Document this addition.
* doc/m4.texinfo (Limits control): Likewise.
(Incompatibilities): Mention future use of POSIXLY_CORRECT.
* THANKS: Update.
Reported by Joel E. Denny.
2008-07-11 Eric Blake <ebb9@byu.net>
Avoid bogus whitespace in @ovar, @dvar.
* doc/m4.texinfo (ovar, dvar): Add @c.
Based on patch by Ralf Wildenhues to Autoconf manual.
2008-06-16 Eric Blake <ebb9@byu.net>
Add missing const qualifications.
* src/builtin.c (builtin_tab): Declare array elements as const.
2008-06-03 Eric Blake <ebb9@byu.net>
Use progname module rather than rolling our own program_name.
* m4/gnulib-cache.m4: Import progname module.
* src/m4.c (program_name): Replace...
(main): ...with a call to set_program_name.
2008-06-02 Eric Blake <ebb9@byu.net>
Allow autobuild usage.
* m4/gnulib.cache: Import autobuild module.
2008-05-23 Eric Blake <ebb9@byu.net>
Make closing files be consistent.
* src/freeze.c (reload_frozen_state): Use close_stream.
Reported by Jean-Charles Longuet.
2008-05-22 Eric Blake <ebb9@byu.net>
Don't allow failure to freeze give exit status of 0.
* src/freeze.c (produce_frozen_state): Guarantee non-zero exit on
fopen failure.
* doc/m4.texinfo (Using frozen files): Test the fix.
* THANKS: Update.
Reported by Jean-Charles Longuet.
2008-05-09 Eric Blake <ebb9@byu.net>
Improve error message when frozen file is invalid.
* src/freeze.c (reload_frozen_state): Track current line.
[GET_STRING]: New helper macro.
2008-05-09 Eric Blake <ebb9@byu.net>
Detect integer overflow when loading frozen file.
* src/m4.h (includes): Add limits.h.
(_): Define as a no-op placeholder for now.
* src/freeze.c (reload_frozen_state) [GET_NUMBER]: Rewrite to fail
immediately on overflow.
Reported by Jim Meyering.
2008-05-07 Eric Blake <ebb9@byu.net>
Fix traceon regression introduced 2006-06-06.
* src/builtin.m4 (traceon): Only perform insertion if lookup
fails.
* doc/m4.texinfo (Trace): Test for the bug.
* NEWS: Document it.
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-04-24 Eric Blake <ebb9@byu.net>
Add debugmode test.
* doc/m4.texinfo (Debug Levels): Test -di behavior.
(Changeword, Location): Correct examples.
* checks/check-them (examples): Update to account for recommended
location for running tests.
* doc/m4.texinfo (Debug Levels): Test this behavior.
2008-04-21 Eric Blake <ebb9@byu.net>
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 buildbot failure.
* doc/m4.texinfo (Diversions): Consume all of m4's output, in case
SIGPIPE is ignored.
* THANKS: Update.
Detected by Bob Proulx's buildbot.
2008-04-17 Eric Blake <ebb9@byu.net>
Avoid gcc shadowing warnings.
* src/builtin.c (m4_format): s/format/expand_format, so local
variables can be named format.
* src/format.c (format): Rename...
(expand_format): ...to this, and avoid the name index.
* src/input.c (push_file): Avoid the name close.
* src/m4.h (expand_format): Adjust prototype.
* src/output.c (threshold_diversion_CB): Avoid the name div.
2008-04-15 Eric Blake <ebb9@byu.net>
Another 'make installcheck' fix.
* doc/m4.texinfo (Diversions): s/m4/__program__/ in case
--program-prefix was active.
2008-04-11 Eric Blake <ebb9@byu.net>
Ensure --program-prefix doesn't regress.
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enforce change from
2008-03-10 by testing it at 'make distcheck' time.
2008-04-11 Eric Blake <ebb9@byu.net>
Improve OS/2+emx build.
* src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible
system(3), no matter what other macros it pre-defined.
* doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure
on OS/2.
* src/builtin.c (predefined_tab): Ensure all possible system
identifiers are defined, not just the first; the testsuite will
catch if multiple identifiers mistakenly made it through.
* THANKS: Update.
Reported by Elbert Pol.
2008-04-09 Eric Blake <ebb9@byu.net>
Remove redundant configure macros.
* configure.ac (AC_CANONICAL_BUILD, AC_CANONICAL_HOST)
(AC_SYS_LARGEFILE, AC_TYPE_SIZE_T): Delete, since gnulib does
this.
(AC_CHECK_HEADERS_ONCE): Remove limits.h.
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-04-02 Eric Blake <ebb9@byu.net>
Release Version 1.4.11.
* NEWS: Mention the release.
Prepare for release.
* maint.mk (alpha): Check for PREV_VERSION setting sooner, and
remove tag operation.
(version-check): Enhance this check.
(prev-tarball): Depend on version-check.
(this-vc-tag): Delete, and mention need to run tag...
* HACKING: ...here, prior to make maintainer-distcheck.
Update the instructions to match this particular release process.
* Makefile.am (.version, announcement): Allow for VPATH build.
* cfg.mk (gnulib_dir): Likewise.
* doc/Makefile.am ($(srcdir)/m4.1): Include release number in man
page.
2008-04-01 Eric Blake <ebb9@byu.net>
Speed up index builtin.
* m4/gnulib-cache: Import strstr module.
* NEWS: Mention the speedup.
2008-03-29 Eric Blake <ebb9@byu.net>
Fix testsuite on mingw, OpenBSD.
* src/format.c (ARG_DOUBLE): Use strtod, not atof.
* src/Makefile.am (m4_LDADD): Use POW_LIB when needed.
* doc/m4.texinfo (Format): Add hex-float support.
* NEWS: Document this.
2008-03-27 Eric Blake <ebb9@byu.net>
Pull other useful doc fixes from branch-1.6.
* doc/m4.texinfo (Arguments): Enable test of
--warn-macro-sequence.
(Defn): Test length of builtin token.
(Builtin, Ifelse, Changequote): Add more regression tests.
2008-03-27 Eric Blake <ebb9@byu.net>
Add test for divert bug on 2007-05-28, patched 2007-07-21.
* doc/m4.texinfo (Diversions): Add test.
2008-03-24 Eric Blake <ebb9@byu.net>
Pull GNUmakefile from gnulib.
* m4/gnulib-cache.m4: Import gnumakefile module.
* GNUmakefile: Remove from version control; supplied by gnulib
instead.
* configure.ac (AC_INIT): Track intra-release version with
git-version-gen.
(AC_CONFIG_LINKS): Let gnulib do this now.
* Makefile.am (distclean-local): Likewise.
(EXTRA_DIST): Likewise. Also handle renamed files.
* (.version, dist-hook): Improve version handling.
* Makefile.cfg: Rename...
* cfg.mk: ...to this.
* Makefile.maint: Rename...
* maint.mk: ...to this.
(ME, makefile-check, m4-check): Use new macro instead of
hard-coded name.
* HACKING: Mention that maintainer rules should now work in VPATH
builds.
2008-03-15 Eric Blake <ebb9@byu.net>
Document join, in order to fix bug in m4wrap example.
* 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-10 Eric Blake <ebb9@byu.net>
Allow 'make installcheck' with './configure --program-prefix'.
* checks/Makefile.in (program_transform_name): New macro.
(installcheck): Use it to transform name of m4 before testing.
* checks/check-them (m4): Add -m option, to allow testing m4 by a
different name.
* checks/get-them: Allow xout and xerr notation.
2008-02-25 Eric Blake <ebb9@byu.net>
Improve release process.
* configure.ac (AM_INIT_AUTOMAKE): Increase requirement, and add
dist-lzma.
* HACKING: Update for git release procedures.
* Makefile.cfg: New file.
* GNUmakefile: Use it.
* Makefile.maint (gzip_rsyncable, GZIP_ENV, GIT, VC, VC-tag)
(VERSION_REGEXP, this-vc-tag, my_distdir, null_AM_MAKEFLAGS)
(TMPDIR, gnulib-version): New macros, borrowed from coreutils.
(makefile-check, news-date-check, changelog-check, m4-check)
(vc-diff-check, maintainer-distcheck, vc-dist, my-distcheck)
(announcement, alpha, beta, major): New rules, borrowed from
coreutils.
(TEXI2HTML, cvs-release, update-timestamps, cvs-news, cvs-commit)
(cvs-dist): Delete.
* Makefile.am (EXTRA_DIST): Distribute new file.
2008-02-19 Eric Blake <ebb9@byu.net>
Clean up foreach example.
* doc/m4.texinfo (Foreach, Improved foreach): Document another
shortcoming in foreach.m4.
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.
2008-02-13 Eric Blake <ebb9@byu.net>
Fix texinfo grammar.
* doc/m4.texinfo (Incompatibilities): Use @. after capital.
(History): Use @: after abbreviations.
(M4exit): Use correct Latin abbreviation.
2008-02-11 Eric Blake <ebb9@byu.net>
Document behavior of __gnu__().
* doc/m4.texinfo (Platform macros): Enhance test.
(Macro expansion): New test.
2008-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* checks/Makefile.in: Use @SET_MAKE@, and use @SHELL@ rather
than hard-coding /bin/sh.
* THANKS: Update.
Reported by Lawson Chan.
2007-12-13 Paolo Bonzini <bonzini@gnu.org> (tiny change)
* doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
example.
* THANKS: Update.
Reported by Giovanni Toffetti.
2007-12-07 Eric Blake <ebb9@byu.net>
Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
2007-12-04 Eric Blake <ebb9@byu.net>
Fix builds with OpenBSD make.
* doc/Makefile.am (HELP2MAN): New macro.
(man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
* README: Update copyright.
* HACKING: Mention help2man and makeinfo dependencies.
2007-11-22 Eric Blake <ebb9@byu.net>
Security fix: avoid arbitrary code execution with 'm4 -F'.
* src/freeze.c (produce_frozen_state): Never pass raw file name as
printf format.
* NEWS: Document this fix.
2007-11-07 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
2007-11-05 Eric Blake <ebb9@byu.net>
Use build-aux directory.
* configure.ac (PACKAGE, VERSION): Delete, since Automake does
this now.
(AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
instead of the top level.
(AC_INIT_AUTOMAKE): Increase requirement, and add dist-lzma.
* Makefile.am (EXTRA_DIST): Gnulib now manages gendocs.sh.
* bootstrap: Adjust accordingly.
* m4/gnulib-cache.m4: Add --aux-dir option.
* doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
2007-10-31 Eric Blake <ebb9@byu.net>
Test more corner cases.
* doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
(Improved foreach): Document alternate foreachq style.
2007-10-28 Eric Blake <ebb9@byu.net>
More test coverage for autoconf usage patterns.
* doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
(Builtin): Add new undocumented tests.
(Shift): Document cond macro, and add new test.
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-22 Eric Blake <ebb9@byu.net>
Never let printf failures go undetected.
* m4/gnulib-cache.m4: Import announce-gen, git-version-gen,
intprops, strtod, and xprintf modules. Remove deprecated free
module. Replace vasprintf-posix and xvasprintf with
xvasprintf-posix.
* src/m4.h: Include xprintf.h.
* src/builtin.c (ntoa): Export.
(m4_errprint): Adjust all *printf callers.
* src/debug.c (debug_message_prefix, trace_format): Likewise.
* src/freeze.c (produce_frozen_state): Likewise.
* src/input.c [DEBUG_INPUT]: Likewise.
* src/m4.c (usage): Likewise.
* src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
(DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
* src/output.c (shipout_text, freeze_diversione): Likewise.
* src/path.c [DEBUG_INCL]: Likewise.
* src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
* src/symtab.c [DEBUG_SYM]: Likewise.
2007-10-17 Eric Blake <ebb9@byu.net>
Fix 'm4 -F file -t undefined'.
* src/freeze.c (produce_frozen_state): Avoid core dump.
* doc/m4.texinfo (Using frozen files): Test for the bug.
* NEWS: Mention the fix.
2007-10-09 Eric Blake <ebb9@byu.net>
Avoid regexp regression.
* doc/m4.texinfo (Regexp, Patsubst): Test \ expansion.
2007-10-02 Eric Blake <ebb9@byu.net>
Add more examples and tests.
* doc/m4.texinfo (Patsubst): Use the examples directory. Also
document shortfall.
(Improved capitalize): New node.
(Index macro, Regexp): Test more code paths.
* examples/capitalize.m4: Update to match manual.
* examples/capitalize2.m4: New file.
* examples/foreachq3.m4: Likewise.
* examples/join.m4: Likewise.
* examples/loop.m4: Likewise.
* examples/wraplifo.m4: Likewise.
* examples/wraplifo2.m4: Likewise.
* examples/Makefile.am (EXTRA_DIST): Distribute new files.
2007-09-24 Eric Blake <ebb9@byu.net>
Create .gitignore alongside .cvsignore.
* bootstrap (LC_ALL): Set up front.
(version control) Borrow idea from head, to avoid churn in
m4/.*ignore files modified by gnulib-tool.
2007-09-13 Eric Blake <ebb9@byu.net>
* AUTHORS: Fix typo.
2007-09-07 Eric Blake <ebb9@byu.net>
* AUTHORS: Simplify, to match libtool and autoconf layout.
* THANKS: Sync with head.
2007-08-10 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Compatibility): Sync with head.
2007-08-10 Konrad Schwarz <konrad.schwarz@siemens.com> (tiny change)
and Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Defn): Update wording.
2007-08-09 Eric Blake <ebb9@byu.net>
POSIX requires defn(`a',`b') to concatenate definitions.
* src/builtin.c (m4_defn): Allow multiple arguments, but warn if
trying to mix a builtin with anything else.
* doc/m4.texinfo (Defn): Document a use for this POSIX
requirement.
(Incompatibilities): Update to match current status.
* NEWS: Document this change.
* THANKS: Update.
Reported by Konrad Schwarz.
2007-08-04 Eric Blake <ebb9@byu.net>
Normalize all GPL license notices.
* GNUmakefile: Update license wording.
* Makefile.am: Likewise.
* Makefile.maint: Likewise.
* bootstrap: Likewise.
* commit: Likewise.
* configure.ac: Likewise.
* checks/Makefile.in: Likewise.
* doc/Makefile.am: Likewise.
* examples/Makefile.am: Likewise.
* src/Makefile.am: Likewise.
* src/builtin.c: Likewise.
* src/debug.c: Likewise.
* src/eval.c: Likewise.
* src/format.c: Likewise.
* src/freeze.c: Likewise.
* src/input.c: Likewise.
* src/m4.c: Likewise.
* src/m4.h: Likewise.
* src/macro.c: Likewise.
* src/output.c: Likewise.
* src/path.c: Likewise.
* src/stackovf.c: Likewise.
* src/symtab.c: Likewise.
2007-07-21 Eric Blake <ebb9@byu.net>
Fix regression on NetBSD from 2007-05-28.
* src/output.c (m4_tmpopen): Explicitly reset append-mode stream
position to byte 0.
* NEWS: Document this fix.
* THANKS: Update.
Reported by Thomas Klausner.
2007-07-20 Eric Blake <ebb9@byu.net>
Fix 'make distcheck' issues.
* Makefile.am (EXTRA_DIST): No need to distribute
gpl-3.0.texi.diff anymore.
* m4/gnulib-cache.m4: Update to latest gnulib.
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>
Start 1.4.10a.
* configure.ac (AC_INIT): Bump version number.
* NEWS: Start changes since 1.4.10.
* doc/m4.texinfo (History): Mention 1.4.11.
(Copying This Package, Copying This Manual): Add index entries.
* local/lib/version-etc.c.diff: Delete, now that gnulib has been
updated.
* Makefile.am (EXTRA_DIST): Remove dead file.
2007-07-09 Eric Blake <ebb9@byu.net>
Release Version 1.4.10.
* doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
* Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.9.
* src/format.c: Missed a GPLv3 conversion.
Avoid undefined behavior of %.*c in printf.
* src/format.c (format): Special case %c.
* TODO: Document that more remains to be done.
* NEWS: Document the fix.
2007-07-05 Eric Blake <ebb9@byu.net>
Fix up gnulib-tool usage.
* m4/gnulib-cache.m4: Change local-dir to local, not `.'.
* version-etc.c.diff: Move to...
* local/lib/version-etc.c.diff: ...here.
* gpl-3.0.texi.diff: Move to...
* local/doc/gpl-3.0.texi.diff: ...here.
2007-07-04 Eric Blake <ebb9@byu.net>
Upgrade to GPL version 3 or later.
* bootstrap: Pick up GPLv3.
* m4/gnulib-cache.m4: Augment with 'gnulib-tool
--local-dir=. --import gpl-3.0'.
* doc/m4.texinfo (Copying This Package): New appendix.
* NEWS: Mention this change.
* README: Mention why some files still claim to be version 2.
* version-etc.c.diff: New file, to make sure --version claims
correct GPL version. Temporary until gnulib makes move.
* gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
appendix, rather than section, of the manual.
* GNUmakefile: Update to new license.
* Makefile.am: Likewise.
* Makefile.maint: Likewise.
* commit: Likewise.
* configure.ac: Likewise.
* checks/Makefile.in: Likewise.
* doc/Makefile.am: Likewise.
* examples/Makefile.am: Likewise.
* src/Makefile.am: Likewise.
* src/builtin.c: Likewise.
* src/debug.c: Likewise.
* src/eval.c: Likewise.
* src/freeze.c: Likewise.
* src/input.c: Likewise.
* src/m4.c: Likewise.
* src/m4.h: Likewise.
* src/macro.c: Likewise.
* src/output.c: Likewise.
* src/path.c: Likewise.
* src/stackovf.c: Likewise.
* src/symtab.c: Likewise.
2007-06-26 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
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>
* src/output.c (output_text): Fix regression from 2007-05-28.
* doc/m4.texinfo (History): Mention 1.4.10.
(Format): Make testsuite output easier to debug.
2007-05-29 Eric Blake <ebb9@byu.net>
Start 1.4.9c.
* configure.ac (AC_INIT): Bump version number.
* NEWS: Start changes since 1.4.9b, and fix typo.
Beta Release Version 1.4.9b.
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.9.
Improve format support.
* m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
vasprintf-posix'.
* src/format.c (format): Parse %'hhd, %a, %A. Avoid calling
printf with too few arguments, as in format(%*.*d,-1,-1,1).
* doc/m4.texinfo (Format): Expand tests, and improve
documentation.
* NEWS: Document this change.
2007-05-28 Eric Blake <ebb9@byu.net>
Fix large diversion corner cases, including 1.4.8 regression.
* src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
(make_room_for): Use NULL, not 0, for pointers.
(insert_diversion_helper): Avoid using rewind.
(freeze_diversions): Allow freezing large diversions.
* NEWS: Document this fix.
Also run gnulib unit tests during make check.
* m4/gnulib-cache.m4: Augment with 'gnulib-tool
--tests-base=tests --with-tests'.
* configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
* Makefile.am (SUBDIRS): Run gnulib tests before ours.
2007-05-25 Eric Blake <ebb9@byu.net>
Backport prompts in examples from head.
* src/macro.c (expand_macro): Shorten message.
* doc/m4.texinfo (Manual, Command line files, Comments)
(Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
(Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
(Debug Output, Include, Format, Syscmd, Mkstemp, Location)
(Using frozen files, Improved forloop, Improved foreach): Add
prompts to examples.
* checks/get-them: Ignore prompts in examples.
Fix sync line interaction with multiline comments.
* doc/m4.texinfo (Other Incompatibilities): Add example, and
document bug in --syncline/divert interaction.
(Preprocessor features): Augment test.
* src/m4.h (output_text): Export.
(shipout_text, next_token): Add parameter.
* src/freeze.c (reload_frozen_state): Don't interfere with
synclines when reloading state.
* src/output.c (output_text): Export.
(shipout_text): Take new parameter for start line of token.
Output at most one syncline per token.
* src/input.c (next_token): Report line where multiline tokens
start.
* src/macro.c (expand_input, expand_token, expand_argument):
Adjust callers so that line is passed from input to output.
* NEWS: Document this fix.
Reported by Sergey Poznyakoff.
Test -s in testsuite.
* doc/m4.texinfo (Preprocessor features): Add a test.
* checks/get-them: Support extra options in testsuite.
* checks/check-them (examples): Use extra options.
* THANKS: Update.
Reported by Sergey Poznyakoff.
2007-05-24 Eric Blake <ebb9@byu.net>
Support POSIX flush semantics on all platforms.
* m4/gnulib-cache.m4: Remove closeout, and augment with
'gnulib-tool --import closein fflush'.
* src/m4.h (includes): Use closein, not closeout.
* src/m4.c (main): Ensure stdin is flushed when not all input is
consumed.
(process_file): No return needed.
* src/debug.c (debug_flush_files): Rely on gnulib module, rather
than excluding mingw.
* NEWS: Document this change.
Work around cygwin and mingw fseeko bugs.
* m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
* src/debug.c (debug_flush_files): Prefer fseeko over fseek.
2007-04-25 Eric Blake <ebb9@byu.net>
Fix negative division within eval, regression of 2007-01-06.
* doc/m4.texinfo (Eval): Catch this bug.
* src/eval.c (mult_term): Fix it.
* NEWS: Document this.
* THANKS: Update.
Reported by Cesar Strauss.
2007-04-23 Eric Blake <ebb9@byu.net>
Start 1.4.9a.
* configure.ac (AC_INIT): Bump version number.
* NEWS: Start changes since 1.4.9.
2007-03-23 Eric Blake <ebb9@byu.net>
Release 1.4.9:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.8b.
2007-03-16 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Mkstemp): Tweak wording.
* src/output.c (output_init): Adjust to latest gnulib.
2007-03-15 Eric Blake <ebb9@byu.net>
Avoid Tandem/NSK's broken long long (without a symmetric unsigned
long long, it confuses gnulib).
* configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
if unsigned long long doesn't work.
* THANKS: Update.
Reported by Matthew Woehlke.
2007-03-07 Eric Blake <ebb9@byu.net>
* AUTHORS: Update.
* doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
2007-03-01 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Pick up more index entries from head. Follow
more texinfo recommendations.
(Sysval): Improve tests.
Avoid overfull \vbox warning from texinfo, due to indices that
weren't quite big enough to split across page boundaries.
* doc/m4.texinfo: Add lots of concept index entries.
(Concept Index): Move to be last, as recommended by texinfo
manual.
(Define, Arguments, Pseudo Arguments): Add more function entries.
2007-02-28 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
137.
(Pseudo Arguments): Add useful example.
* doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
reflect POSIX XCU ERN 118.
* src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
* src/m4.c (usage): ...here,...
* src/builtin.c (set_macro_sequence): ...and here.
(define_user_macro): Fix typo.
* doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
inaccuracies.
(Shift): Document composite macro argn for portably getting at
positional parameters beyond 9.
* configure.ac (AC_INIT): Bump version number.
* NEWS: Start changes of 1.4.8c.
2007-02-24 Eric Blake <ebb9@byu.net>
Beta Release 1.4.8b:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.8.
Reserve all uses of raw ${} in macro definitions, not just
${<digit>}.
* src/builtin.c (set_macro_sequence): Change default macro
sequence.
* doc/m4.texinfo (Operation modes): Update to match.
* src/m4.c (usage): Likewise.
* NEWS: Likewise.
2007-02-23 Eric Blake <ebb9@byu.net>
* src/m4.h (includes): Update to latest gnulib.
2007-02-08 Eric Blake <ebb9@byu.net>
Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
more flexible, and so that autoconf can use it.
* src/m4.h (set_macro_sequence, free_macro_sequence): New
prototypes.
* src/builtin.c (macro_sequence_buf, macro_sequence_regs)
(macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
New variables and functions.
(define_user_macro): Allow flexibility in regular expression used
to trigger warning.
* src/m4.c (warn_syntax): Delete.
(usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
spelling of option, along with optional argument.
* doc/m4.texinfo (Operation modes, Arguments): Document this
change.
* NEWS: Document this change.
2007-02-05 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Module strstr no longer exists.
Avoid bool bitfields, as they don't work on AIX.
* src/m4.h (bool_bitfield): New typedef.
(struct symbol, struct builtin): Use it.
* src/input.c (struct input_block): Likewise.
Reported by Albert Chin.
* doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
Reported by Albert Chin.
* THANKS: Update.
2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
* doc/m4.texinfo (Input processing): Further clarifications.
2007-02-03 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
the examples.
Reported by Bruno Haible.
2007-02-01 Eric Blake <ebb9@byu.net>
* src/m4.c (fatal_warnings): New variable.
(usage): Document new -E behavior.
(main): Make -E an additive option.
(m4_error, m4_error_at_line): Change exit status when required.
* NEWS: Document this change.
* doc/m4.texinfo (Operation modes): Likewise.
Reported by Ralf Wildenhues.
2007-01-27 Eric Blake <ebb9@byu.net>
* src/m4.h (warn_syntax): Declare.
(init_pattern_buffer): Export.
* src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
(long_options, main): Implement new option.
* src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
(define_user_macro): Warn on $11 and ${1} if requested.
* src/input.c (init_pattern_buffer): Delete duplicate method.
* doc/m4.texinfo (Operation modes): Document it.
(Arguments): Document future direction of ${11} vs. $11.
(Incompatibilities): Fix wording on POSIX limitations.
* checks/get-them: Parse @{ and @} correctly.
* NEWS: Document this change.
2007-01-26 Eric Blake <ebb9@byu.net>
* src/builtin.c (includes): Adjust to gnulib changes.
2007-01-15 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Pull in various improvements from head.
* src/builtin.c (include): Alter exit status on failure.
* NEWS: Document this fix.
2007-01-13 Eric Blake <ebb9@byu.net>
* configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
assume the fallback of ss_base for BSDI 4.0.1.
* src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
! HAVE_STACK_T_SS_SP]: Use this check.
Reported by Chris McGuire.
* THANKS: Update.
* NEWS: Document the improvement.
2007-01-09 Eric Blake <ebb9@byu.net>
* src/eval.c (ASSIGN): New enumerator.
(eval_lex): Recognize '='.
(equality_term): Treat '=' like '==', but warn that it is
deprecated.
* doc/m4.texinfo (Eval): Document and test this.
(Incompatibilities): Document the POSIX incompatibility.
* NEWS: Document this change.
2007-01-06 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
* checks/check-them: Record expected exit status.
* checks/get-them: Check exit status.
* src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
instead.
* src/builtin.c: All users changed.
* src/eval.c: Likewise. Also document where we are triggering
undefined or implementation-defined behavior.
(BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
(logical_or_term, logical_and_term, logical_not_term, not_term)
(equality_term, unary_term): Port from head to follow POSIX
semantics.
(exp_term): Reject 0**0 as undefined.
* doc/m4.texinfo (History): Mention 1.4.9.
(Format, Incompatibilities): Update to document POSIX compliance.
* NEWS: Document this change.
2007-01-04 Eric Blake <ebb9@byu.net>
* NEWS: Document previous fix.
* THANKS: Update.
2007-01-04 Sami Liedes <sliedes@cc.hut.fi> (tiny change)
Fix Debian bug 405594, introduced 2006-11-01 from a bad
copy-n-paste from head.
* src/m4.c (main): Use correct file name after --.
2007-01-04 Eric Blake <ebb9@byu.net>
Fix regression from 1.4.7 in large file handling on some
platforms, introduced on 2006-10-13.
* configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
will be handled.
* NEWS: Document this fix.
2007-01-03 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
version-etc-fsf'.
* src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
it bumps the copyright year).
2006-12-27 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Patsubst): Fix typo.
2006-12-16 Eric Blake <ebb9@byu.net>
* src/m4.c (main): Check for errors when closing stdin.
2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/m4.texinfo: Fix some typos.
2006-12-09 Eric Blake <ebb9@byu.net>
* configure.ac (AC_INIT): Bump version number.
* NEWS: Start changes of 1.4.8a.
2006-11-20 Eric Blake <ebb9@byu.net>
Release 1.4.8:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.7.
2006-11-16 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Include, Search Path, Diversions, Divert):
Minor tweaks noticed while porting to head.
2006-11-14 Eric Blake <ebb9@byu.net>
* src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
spent iterators.
(m4_tmpname): Avoid memory leak.
2006-11-13 Eric Blake <ebb9@byu.net>
* src/output.c (cleanup_tmpfile): Avoid double error message when
umask is prohibitive.
(m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
functions.
(m4_tmpfile): Add parameter, move cloexec action here.
(make_room_for): Adjust caller. Don't keep too many files open.
(insert_diversion_helper): Unlink emptied temp files.
(make_diversion): Don't keep too many files open.
* doc/m4.texinfo (Diversions): Tweak wording, now that open file
descriptors are no longer a limiting factor.
* NEWS: Document this change.
Backport sparse diversion handling from head.
* m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
avltree-oset'.
* src/output.c (struct m4_diversion): Rename from struct
diversion, and update members. All users changed.
(diversion_table): Change to an ordered set, instead of an array.
(div0): New storage for diversion 0.
(diversions): No longer needed.
(free_list): New list to allow recycling diversion storage.
(diversion_storage): New storage to reduce malloc overhead.
(cmp_diversion_CB, threshold_diversion_CB): New callbacks.
(output_init, output_exit, cleanup_tmpfile, make_room_for)
(make_diversion): Handle new diversion storage scheme.
(insert_diversion_helper): New function.
(insert_diversion, undivert_all, freeze_diversions): Use it.
* doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
exhaustion to visible test of large diversion numbers.
* NEWS: Document this fix.
2006-11-11 Eric Blake <ebb9@byu.net>
* src/builtin.c (m4_translit): Slight optimization.
* src/m4.h (to_uchar): Depend on HAVE_INLINE.
* src/builtin.c: Remove unnecessary casts.
(expand_ranges): Make 8-bit clean.
* doc/m4.texinfo (Translit): Add tests and wording.
* NEWS: Document this fix.
2006-11-07 Eric Blake <ebb9@byu.net>
* src/m4.h (output_exit): New prototype.
* src/m4.c (main): Use it.
* src/output.c (cleanup_tmpfile): Close files before removing
directory.
(insert_diversion): Check for failure.
(output_exit): Avoid memory leak.
* doc/m4.texinfo (Diversions): Test this bug.
* doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
2006-11-01 Eric Blake <ebb9@byu.net>
Allow C++ compilation on Linux, as a safety measure in type
checking.
* m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
stdbool'.
* src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
(boolean): Kill this, and use stdbool.h instead.
* src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
* src/output.c, src/symtab.c: All users changed.
* src/symtab.c (hack_all_symbols): Update prototype.
* src/builtin.c (dump_symbol, set_trace): Update signature.
(m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
(mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
C++ compilation.
* src/debug.c (trace_flush): Likewise.
* src/freeze.c (reload_frozen_state): Likewise.
* src/input.c (push_file, push_string_finish, push_wrapup):
(token_bottom, next_token): Likewise.
* src/m4.c (main): Likewise.
* doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
draft wording.
* src/m4.h (m4_path_search): Tweak signature.
* src/path.c (m4_path_search): Likewise.
* src/builtin.c (include): Update caller.
* src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
with file names. Don't write to **argv.
(process_file): New helper method.
* NEWS: Document this fix.
2006-10-31 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
* doc/m4.texinfo (Translit): Improve the documentation.
* src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
algorithm.
(m4_index): Simplify, and speed up slightly.
* NEWS: Document this fix.
2006-10-28 Eric Blake <ebb9@byu.net>
* src/input.c (set_quotes): Don't allow empty end-quote with
non-empty start-quote.
(set_comment): Likewise for end-comment.
* src/builtin.c (m4_changecom): Adjust caller.
* doc/m4.texinfo (Changequote, Changecom): Update documentation to
match behavior.
(Incompatibilities): Document another POSIX bug.
* NEWS: Mention this change.
2006-10-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* examples/Makefile.am (EXTRA_DIST): Distribute recently-added
files.
2006-10-26 Eric Blake <ebb9@byu.net>
Silence -Wwrite-strings -Wpointer-arith warnings.
* src/builtin.c (define_user_macro): Allow NULL argument.
(m4_builtin, m4_indir): Cast away const of "".
* src/format.c (format): Likewise.
* src/macro.c (collect_arguments): Likewise.
(expand_macro): Avoid math on void*.
* src/m4.c (main): Adjust caller.
* src/output.c (freeze_diversions): Detect off_t overflow.
* src/input.c (pop_input): Remove unnecessary code.
2006-10-25 Eric Blake <ebb9@byu.net>
* src/symtab.c (symtab_init): Avoid size_t overflow.
* src/output.c (make_diversion): Avoid size_t overflow.
* doc/m4.texinfo (Diversions): Test this fix.
* src/input.c (input_block): Remove unused member. Reduce size
of struct.
(push_file, pop_input): Avoid useless assignment.
* NEWS: Document the bug fix.
Redo location tracking. Instead of having just files track the
line to return to when popping input, now all input blocks track
their current line.
* src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
needed.
(input_block): Have line and file storage for all input types, and
rename some members.
(input_change): New global flag.
(push_file, push_macro, push_string_init, push_wrapup): Store
location.
(push_string_finish, pop_input, pop_wrapup): Notice changes in
input blocks.
(peek_input): Adjust to new member names.
(next_char, next_char1): Adjust location if needed.
(skip_line): Simplify restoring location.
* doc/m4.texinfo (Location): Augment the test to catch line
location of expansion of multi-line arguments.
Reported by Stepan Kasal.
2006-10-23 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Macro Arguments): Document that leading space
in argument collection stops at macro expansion.
(Incompatibilities): Document POSIX whitespace wording issue.
2006-10-20 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
TeX, so recognize '@w{ }' instead. Likewise, @code{_name} at the
end of a TeX line splits incorrectly.
(Foreach, Improved foreach): Write these sections, borrowing ideas
from CVS head and from m4sugar.
* checks/get-them: Accomodate new way to show trailing space in
examples.
* examples/foreach.m4: Make usable in documentation.
* examples/foreachq.m4: New file.
* examples/foreachq2.m4: New file.
* examples/foreach2.m4: New file.
* NEWS: Document the documentation updates.
2006-10-19 Eric Blake <ebb9@byu.net>
* src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
(m4_maketemp): Provide traditional behavior.
* doc/m4.texinfo (Mkstemp): Rename from Maketemp. Document the
new `mkstemp' macro and the flaws of the old `maketemp'.
(Incompatibilities): Move maketemp discussion to...
(Extensions): ...here, since -G now supresses the GNU extension.
* NEWS: Document this.
* examples/forloop.m4: Simplify.
* examples/forloop2.m4: New file.
* examples/quote.m4: New file.
* doc/m4.texinfo (Loops): Rename to...
(Shift): ...this node.
(Forloop, Foreach, Improved forloop, Improved foreach): New
nodes.
2006-10-17 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Update with 'gnulib-tool --import
config-h'.
* configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
gnulib headers, rather than in top directory.
* src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
output clutter.
2006-10-16 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Backport some minor cleanups from head.
(Cleardivert): Rename from cleardiv.
* doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
a section of Preliminaries.
(Operation modes, Preprocessor features, Limits control)
(Frozen state, Debugging options, Command line files): Subdivide
into new sections.
(Input processing, Quoting Arguments, Define, Arguments)
(Cleardiv, Format, M4exit): Fix grammar of references.
(Inhibiting Invocation, Macro Arguments, Builtin, Trace)
(Debug Levels, Debug Output, Include, Search Path, Divert)
(Platform macros, Syscmd, Location, Extensions): Point to new
sections.
(Top, Loops, Include, Undivert, Location, Incompatibilities):
Improve file references.
2006-10-14 Eric Blake <ebb9@byu.net>
* m4/input.c (file_clean): Don't close stdin twice, POSIX says it
is not portable.
Reported by Ralf Wildenhues.
* src/builtin.c (m4_undivert): Check for read error.
2006-10-13 Eric Blake <ebb9@byu.net>
* src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
header files are included, since <unistd.h> can affect the tests.
* THANKS: Updated.
Reported by Martin Koeppe.
Backport head's usage of clean-temp module, as it is cleaner than
using tmpfile-safer.
* m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
clean-temp closeout', and remove tmpfile-safer.
* src/m4.h (includes): Adjust.
(m4_path_search): Rename from path_search, to avoid collision
with gnulib.
* src/m4.c (main): Install closeout handler. Adjust caller.
(usage): Now done by closeout module.
* src/builtin.c (m4_m4exit): Likewise.
(m4_undivert, include): Adjust callers.
* src/freeze.c (reload_frozen_state): Likewise.
* src/path.c (m4_path_search): Rename from path_search.
* src/output.c (output_temp_dir): New variable.
(cleanup_tmpfile, m4_tmpfile): New functions, from head.
(insert_diversion, make_room_for): Use them.
* doc/m4.texinfo (Diversions): Document this, and add a test.
(Improved fatal_error): Fix typo.
(Maketemp): Port test to mingw, and no longer hide from
documentation.
* NEWS: Document the change in TMPDIR behavior.
* configure.ac (m4_pattern_forbid): Narrow the range of forbidden
macros, to work with recent gnulib-tool update.
* src/builtin.c (m4_builtin, m4_indir): Allow transparent
handling of defn results.
* doc/m4.texinfo (Builtin, Indir): Add test cases.
* NEWS: Document this.
2006-10-12 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Location): Fix typo in previous commit.
(Changeword): Catch one more case.
* src/input.c (skip_line): Fix case when outer file used macro to
supply the \n.
2006-10-11 Eric Blake <ebb9@byu.net>
* src/input.c (enum input_type): Add additional types, to shave
time off the common case.
(push_wrapup): Wrapped strings remember location.
(push_string_finish): Normal strings carry no location.
(push_file): Start new files uninitialized.
(peek_input, next_char_1): Optimize common cases by updating
location only on new input types.
(pop_input): Update to honor new input types.
(skip_line, push_string_finish): Fix regression in previous patch
when dnl is not followed by newline in included file.
(push_string_init): Initialize all fields of INPUT_STRING sooner.
(peek_token): Simplify.
(peek_input): Don't pop input files on peek, so that __file__ and
__line__ as last token of include file work correctly.
* doc/m4.texinfo (History): Mention 1.4.8.
(Answers): Split into sections, one per answer.
(Improved exch, Improved cleardivert, Improved fatal_error): New
nodes.
(Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
new m4wrap location semantics.
(Changeword): Add test that caught the regression.
* NEWS: Document this.
* src/macro.c (expand_macro): In macro expansion errors, report
line number at open parenthesis.
* src/input.c (next_token): Fix off-by-one bug in reporting end
of file in unterminated comment and string.
(file_names): New obstack, necessary since expand_macro now hangs
on to file names longer than the files remain open.
(input_init): Initialize new obstack.
(push_file): Use new obstack. Delay updates to current_file
until after expand_macro has restored state.
(peek_input, next_char_1): Update current_file if necessary.
(pop_wrapup): Release memory.
* doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
the off-by-one bug.
(Dnl): Update to the new location reporting rules.
* NEWS: Document these changes.
2006-10-10 Eric Blake <ebb9@byu.net>
* src/macro.c (argc_stack, argv_stack): New variables for sharing
obstacks across multiple macro calls.
(expand_input): Initialize and tear down stack once per input
file, instead of once per macro.
(expand_macro): Reuse existing stacks when possible.
(collect_arguments): Simplify slightly.
* src/path.c (include_env_init): Fix botched patch application.
Reported by Ralf Wildenhues.
2006-10-09 Eric Blake <ebb9@byu.net>
* src/m4.c (usage, main): Detect write failures to stderr.
* src/builtin.c (m4_m4exit): Likewise.
* NEWS: Document this.
* src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
the limit.
* NEWS: Document this.
* doc/m4.texinfo (Invoking m4): Likewise.
2006-10-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* src/path.c (include_env_init): Copy the string returned
by getenv before overwriting it; POSIX disallows this.
2006-10-09 Eric Blake <ebb9@byu.net>
* src/m4.c (main): Defer debugfile until after --help.
* configure.ac (AC_INIT): Bump version number.
* NEWS: Start changes of 1.4.7a.
2006-09-25 Eric Blake <ebb9@byu.net>
Release 1.4.7:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.6.
2006-09-21 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Invoking m4): Add clarification on option
processing behavior.
* 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/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
deprecation warning on -e.
* doc/m4.texinfo (Invoking m4, Extensions): Document this.
* NEWS: Document this.
2006-09-19 Eric Blake <ebb9@byu.net>
* src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
-o/--error-output to --debugfile, and deprecate the former. This
will allow a future release to be more consistent with other GNU
tools, with -o/--output affecting stdout, not debug.
* doc/m4.texinfo (Invoking m4, Debug Output): Document this.
* NEWS: Document this.
2006-09-14 Eric Blake <ebb9@byu.net>
* src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
--diversions. `m4 --help --version' now displays help, not
version.
(interactive, frozen_file_to_read, frozen_file_to_write): Move to
smaller scope.
(show_help, show_version): No longer needed.
(long_options, DIVERSIONS_OPTION): Backport patch from head to
distinguish between -N and --diversions in warning.
* doc/m4.texinfo (Invoking m4): Document this.
* NEWS: Likewise.
2006-09-11 Eric Blake <ebb9@byu.net>
* src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
* src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
seekable.
(debug_set_file): Use STDOUT_FILENO.
* src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
with POSIX in regards to unread input.
* NEWS: Document this fix.
* doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
2006-09-07 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Update to newer gnulib-tool.
* src/m4.h (push_file): Change prototype.
* src/input.c (push_file, peek_input, next_char_1): Only call getc
once at EOF, to avoid double ^D on terminal stdin; regression from
2006-09-04.
(push_file, pop_file): Allow reading stdin twice.
* src/m4.c (main): Likewise.
* src/builtin.c (include): Update caller.
* NEWS: Document this change.
* doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
(Syscmd): Add a test that failed before this patch.
2006-09-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* checks/check-them: Quote $pwd.
2006-09-05 Eric Blake <ebb9@byu.net>
* src/builtin.c (define_macro): Warn on invalid macro name.
* NEWS: Document this change.
* doc/m4.texinfo: Fix typos.
(Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
(Ifelse): Backport some improvements from head.
2006-09-04 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Changeword): Skip test on mingw, where the
native echo is braindead.
* checks/check-them (strip_needed): Ignore \r in output. Now the
testsuite will pass when cross-compiling from cygwin to mingw.
* src/input.c (peek_input): Fix regression in handling macro
without arguments as last token in file; debian bug 385720.
(next_token): Always consume an input character.
Reported by Andreas Schultz.
* configure.ac (AC_INIT): Bump version number.
* NEWS: Document this fix.
* doc/m4.texinfo (History): Mention next version.
(Changeword): Add example that exposes this bug.
* THANKS: Update.
2006-08-25 Eric Blake <ebb9@byu.net>
Release 1.4.6:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.5.
* Makefile.maint (web-manual): Give up on VPATH build during
distribution. But distributions are made so infrequently that
this is not too much of a hardship.
* Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
exists.
2006-08-24 Eric Blake <ebb9@byu.net>
* src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
Solaris, produce output on just one argument.
(m4_regexp, m4_patsubst): For consistency, do likewise.
(m4_patsubst): Allow zero-length match at end of string.
* doc/m4.texinfo (Sysval): Fix overfull hbox.
(Bugs, Macro Arguments): Minor fixes.
(Other tokens): Rearrange node order.
(Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
* NEWS: Document these fixes.
2006-08-22 Eric Blake <ebb9@byu.net>
* src/input.c (pop_input): Avoid empty filename with -di option.
* src/debug.c (debug_message_prefix): Put space before message.
* m4/gnulib-cache.m4: We don't explicitly use alloca module.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
* Makefile.maint (fetch): Simplify, now that we can use gnupload.
* checks/check-them: State why a test is skipped.
* doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
* ChangeLog: Add copyright.
* AUTHORS: Likewise.
* BACKLOG: Likewise.
* README: Likewise.
* THANKS: Likewise.
* TODO: Likewise.
* examples/COPYING: New file, add copyright for all the examples.
* checks/get-them: Put copyright on testsuite files.
2006-08-18 Eric Blake <ebb9@byu.net>
Don't let unrelated child processes see too many files.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
* src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
spelling in error message.
* src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
(debug_set_output): Close debug file on exec.
* src/m4.h (includes): Add cloexec.h.
* src/output.c (make_room_for): Close diversions on exec.
* src/path.c (path_search): Close include files on exec.
* NEWS: Document this.
Regular expressions were leaking memory.
* src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
helper methods.
(m4_regexp, m4_patsubst): Avoid memory leak.
* src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
static.
(set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak. Change
from O(n^2) to O(n) for calculating word_start.
(next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
O(1) bitmap, not O(n) search string.
* NEWS: Document this fix.
2006-08-17 Eric Blake <ebb9@byu.net>
* NEWS: Document previous checkin.
* src/builtin.c (substitute): Avoid core dump when accessing
beyond bound of regular expression.
Reported by Karl Nelson.
* doc/m4.texinfo (Regexp): Add example that causes core dump on
some architectures prior to this patch.
* THANKS: Updated.
2006-08-16 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
clear that dumpdef does not always go to stderr.
* src/builtin.c (m4_errprint): Flush buffers before printing to
stderr.
* THANKS: Updated.
2006-08-15 Eric Blake <ebb9@byu.net>
* src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
per debian bug 96075.
* doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
(Changeword): Don't use shift as an example of a swallowed word.
(Divert): Discuss fact that divert is an English word.
Reported by Richard A Nelson.
2006-08-14 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Invoking m4): Minor fixes.
2006-08-12 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Arguments): Hint at better exch macro.
(Answers): Provide a better definition.
2006-08-09 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Incompatibilities): Document that m4 does not
yet understand locales.
* NEWS: Fix wording of a few items.
2006-08-08 Eric Blake <ebb9@byu.net>
Avoid printing `NONE:0:' in error messages.
* src/m4.h (m4_error_at_line): New function.
* src/m4.c (m4_error_at_line): Implement.
* src/input.c (skip_line, input_init, next_token): Use "", not
"NONE", for no file, since NONE can be a real file name.
* src/macro.c (expand_argument): Likewise.
* src/debug.c (debug_message_prefix, trace_header): Check for
current file.
* doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
(Location): Document that synclines and internal message format
are not impacted by redefining these macros.
(M4exit): Hint at bug in fatal_error.
(Answers): Provide workaround to match m4 output.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
* src/m4.h (m4_error): New function.
(M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
error module deficiencies.
(reference_error, suppress_line): No longer needed.
* src/m4.c (m4_error): Implement.
(main): No longer need to install error callback.
2006-08-04 Eric Blake <ebb9@byu.net>
* src/m4.h (program_name): Declare.
(suppress_line): New variable.
(M4ERROR_AT_LINE): New macro.
* src/m4.c (reference_error, main): Follow GNU Coding Standards
for error message format.
* src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
* src/macro.c (expand_argument): Likewise.
* checks/check-them (examples): Adjust to new message format.
* src/builtin.c (m4___program__): New builtin.
* doc/m4.texinfo (Location): Split from Errprint into new node,
and document __program__.
(Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
(Include, Regexp, Patsubst, Incr, Eval): Adjust error message
format.
(Extensions): Document __program__.
* NEWS: Document this change.
2006-08-03 Eric Blake <ebb9@byu.net>
Don't confuse leading `(' in comment or quote with start of
argument collection.
* src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
TOKEN_CLOSE.
(peek_input): Make private to input.c.
(peek_token): New prototype.
* src/input.c (default_word_regexp): Reduce ifdefs.
(peek_input): Make static.
(next_token): Return new token types.
(match_input, MATCH): Add argument consume, which controls
whether match should be pushed back.
(peek_token): New function.
(token_type_string) [DEBUG_INPUT]: New function.
* src/macro.c (expand_token, expand_argument, collect_arguments):
Handle new token types.
* doc/m4.texinfo (Changequote, Changecom): Document this.
* NEWS: Document this.
* src/stackovf.c (setup_stackovf_trap): Free memory on failure.
* src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
overflow detection when sigstack exists but is not implemented.
Fixes debian bug 154053.
* THANKS: Updated.
Reported by David Perlin.
2006-08-02 Eric Blake <ebb9@byu.net>
* src/input.c (MATCH): Fix EOF detection on multi-byte comment
close.
2006-08-01 Eric Blake <ebb9@byu.net>
* src/input.c (skip_line, next_token): Remember current file in
case input file ends abruptly. Addresses debian bug 175365.
(pop_input): Defer freeing storage that holds previous file
name...
(pop_wrapup): to here, after error message is issued.
* src/macro.c (expand_argument): Remember current file in case
input file ends abruptly.
* doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
(M4wrap): Adjust testsuite accordingly.
(Errprint): Document line number limitation of m4wrap.
* NEWS: Document this fix.
* THANKS: Update.
2006-07-31 Eric Blake <ebb9@byu.net>
* src/input.c (peek_input, next_char, match_input): Be eight-bit
clean; fixes debian bug 311378.
* doc/m4.texinfo (Syntax): Describe eight-bit handling.
(Changequote, Changecom): Add examples to test this.
* NEWS: Document this fix.
* THANKS: Update.
Reported by Steven Augart.
* doc/m4.texinfo: Whitespace fix.
* checks/get-them: Avoid exceeding 14-char file name limit.
* THANKS: Update.
2006-07-30 Eric Blake <ebb9@byu.net>
* src/path.c (path_search): Detect allocation failure.
Use native free when it is good enough.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
* src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
Adjust calls.
* src/symtab.c (free_symbol): Likewise.
* src/m4.c (xfree, main): Likewise.
* src/m4.h (obstack_chunk_free): Likewise.
* src/path.c (path_search): Likewise.
* src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
* doc/m4.texinfo (Errprint): Add example for last patch.
* checks/check-them: Account for VPATH in latest example.
2006-07-29 Eric Blake <ebb9@byu.net>
* src/path.c (path_search): Add result parameter, so that
-I can be accounted for. Debian bug 53685.
* src/m4.h (path_search): Update prototype.
* src/m4.c (main): Adjust callers.
* src/freeze.c (reload_frozen_state): Likewise.
* src/builtin.c (include, m4_undivert): Likewise.
* NEWS: Document this change.
Reported by Nicolas Lichtmaier.
2006-07-28 Eric Blake <ebb9@byu.net>
* Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
several non-GNU makes.
* src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
* src/m4.h: Likewise.
* src/input.c (push_wrapup): Avoid compiler warning with Solaris
/usr/ccs/bin/ucbcc.
2006-07-27 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Use @acronym{GNU} throughout.
(History): Update for 1.4.6.
* src/m4.h (_): Remove K&R cruft.
* src/builtin.c: Likewise.
* src/debug.c: Likewise.
* src/eval.c: Likewise.
* src/macro.c: Likewise.
* src/stackovf.c: Likewise.
* doc/Makefile.am (m4.1): Improve man page.
* src/m4.c (usage): Improve --help output, including adding the
bug reporting address.
(main): Follow GNU Coding Standards for --version output.
2006-07-26 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
end-comment consistently, to match POSIX.
* doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
(Dnl, M4wrap, Include): Document EOF issues, and add examples.
(Incompatibilities): Document incompatibility of changecom
vs. macro names, and of EOF in include.
* src/input.c (next_token): Reject unterminated comments at EOF.
(skip_line): Warn on unterminated dnl at EOF.
* NEWS: Document these changes.
2006-07-25 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Update to reflect gnulib's split of
stdio-safer into fopen-safer and tmpfile-safer.
* src/m4.c: Remove redundant include.
2006-07-24 Eric Blake <ebb9@byu.net>
Fix bugs related to stream handling.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import
unlocked-io stdio-safer stdlib-safer close-stream.
* configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
provided by gnulib if needed.
* src/output.c [! HAVE_TMPFILE]: Likewise.
* src/m4.h (includes): Replace unistd, stdio, and stdlib with
their safer counterparts.
(retcode): New global variable.
* src/input.c (pop_input): Check for read failure.
* src/freeze.c (reload_frozen_state): Likewise.
(produce_frozen_state): Check for write failure.
* src/debug.c (debug_set_file): Likewise.
* src/m4.c (usage, main): Likewise.
(retcode): Make global.
* src/builtin.c (m4_m4exit): Likewise. Ensure that the exit
status is non-zero except when everything succeeds.
* doc/m4.texinfo (M4exit): Document these changes.
(Incompatibilities): Remove documentation of bug now fixed.
* NEWS: Document these fixes.
2006-07-22 Eric Blake <ebb9@byu.net>
* src/format.c (format): Avoid compiler warning that str may be
used uninitialized.
2006-07-21 Eric Blake <ebb9@byu.net>
* src/m4.h [UNIX]: Add more platforms that are close enough to
categorize as UNIX, but which don't predefine __unix__.
Reported by Nelson H. F. Beebe.
2006-07-20 Eric Blake <ebb9@byu.net>
* 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>
* doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
and exits normally with 129.
Reported by Nelson H. F. Beebe.
* THANKS: Update.
* src/m4.h (EXIT_MISMATCH): Define.
* src/freeze.c (reload_frozen_state): Detect version mismatch, by
exiting with status 63.
* src/m4.c (usage): Document this.
* doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
* NEWS: Likewise.
* doc/m4.texinfo (copying): Relax restriction on front-cover and
back-cover texts.
2006-07-17 Eric Blake <ebb9@byu.net>
* src/format.c (format): Support F, g, and G specifiers.
* doc/m4.texinfo (Format): Document this.
* NEWS: Document this addition.
* doc/m4.texinfo (Builtin): Delete redundant text.
* configure.ac (AC_INIT): Bump version number.
* src/builtin.c (substitute): Bah. Fix buffer overrun.
* NEWS: Document this fix.
2006-07-15 Eric Blake <ebb9@byu.net>
Release 1.4.5:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.4.
* src/m4.c (usage): Document exit status.
* doc/m4.texinfo: Use `exit status', not `exit code'.
(Invoking m4): Document exit status.
* bootstrap: Backport --help, --version from head.
(func_update): New function, for easily grabbing up-to-date files
from gnulib.
* Makefile.maint (web-manual): Fix for VPATH builds.
2006-07-14 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
looks bad in info. Use @deffn rather than @example for
describing prototypes. Fix awkward wording and grammar.
* src/builtin.c (substitute): Warn on bad escape sequences.
Ignore trailing backslash.
* doc/m4.texinfo (Regexp): Add documentation for this.
* NEWS: Document this change.
* src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
* doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
more examples.
(Dnl): Update example to show side effects.
* checks/get-them: Generate three digit test names.
* checks/Makefile.in (CHECKS): Accomodate 100+ tests.
2006-07-13 Eric Blake <ebb9@byu.net>
* src/input.c (input_init): Simplify.
(set_word_regexp): Treat empty string as default, since empty
regexp would disable word parsing.
* src/m4.c (user_word_regexp): Default to empty string.
* src/builtin.c (builtin_tab): Make changeword blind.
* doc/m4.texinfo (Changeword): Document this.
* NEWS: Document this.
* TODO: Knock off completed items.
* src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
just the first.
* doc/m4.texinfo (Undefine, Pushdef): Test this.
* NEWS: Document this change.
* src/builtin.c (numeric_arg): Treat empty string as 0, with a
warning. Detect quoted leading space and overflow as warnings.
(m4_eval): Treat empty radix as 10, and allow output in radix 1.
Treat width as minimum number of digits, as required by POSIX.
(m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
arguments.
(m4_substr): Likewise. Silently treat empty start as 0.
(m4_undivert): Treat ` 1a' as file, not diversion 1.
* src/eval.c (eval_lex): Parse radix 1 numbers.
* doc/m4.texinfo (Invoking m4): Fix wording; there is more than
one type of warning.
(Manual): Document behavior of numeric parsing of empty string.
(Divert, Incr): Document error handling.
(Eval): Document radices better.
(Incompatibilities): Document translit incompatibility.
* NEWS: Document these changes.
* Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
(web-manual): Simplify.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
* Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
(MAINTAINERCLEANFILES): Clean it as well.
* doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
(MAINTAINERCLEANFILES): Clean it as well.
2006-07-12 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Extensions): Document how to overcome
implementation difference in > 9 positional parameters.
* src/m4.c (usage): Sort within sections.
(nesting_limit): Raise default from 250 to 1024.
* doc/m4.texinfo: Use file name, not filename, per GNU coding
standard. Use @option where appropriate.
(Invoking m4): Sort to match --help output.
(Debug Levels): Sort.
(Frozen files): Sort and break into two nodes.
* src/m4.c (nesting_limit): Raise default from 250 to 1024.
* NEWS: Document raised -L limit.
2006-07-11 Eric Blake <ebb9@byu.net>
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
stress-test changeword before a release.
* doc/m4.texinfo: More doc cleanups.
(Copying This Manual): New node; actually include the FDL in the
documentation.
* doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
* NEWS: Mention documentation improvements.
* src/m4.h (OS2): New platform macro.
* src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
platform macro.
* doc/m4.texinfo (Platform macros): Document it.
(Sysval): Remove non-portable test of system("").
* NEWS: Document this change.
Reported by Andreas Buening.
2006-07-09 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Undivert): Fix typo in last commit.
* src/m4.c (usage): Document M4PATH.
* src/path.c (path_search): Reject empty string.
* src/output.c (insert_diversion): Ignore diversion 0.
* src/builtin.c (m4_undivert): Ignore empty string.
* NEWS: Document this fix.
2006-07-08 Eric Blake <ebb9@byu.net>
* checks/get-them: Make filtering easier.
* checks/check-them: Filter non-input lines, so line counts are
more realistic in the documentation, and so changeword tests work
even when dnl is disabled.
* doc/m4.texinfo: Adjust example line numbers. Clean up
front-matter, following autoconf's example.
(Changeword): Enable tests, skipping if changeword not supported.
(Define, Defn, Ifelse): Backport more examples from head.
(Input processing, Answers): New nodes, backported from head.
(Include): Expand test to cover empty filename.
(Undivert): Add test of undivert(0).
2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/m4.texinfo: Fix spelling errors.
2006-07-07 Eric Blake <ebb9@byu.net>
* THANKS: Update.
* doc/Makefile.am (m4.1): No need to go through a temporary file;
this also ensures timestamps are updated.
* src/m4.h (includes): Require config.h. Assume string.h,
stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
than prototyping ourselves.
(builtin_func): Add parameter type-checking.
(voidstar): Delete, now that we assume C89.
* src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
voidstar changed.
* src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
xfree.
2006-07-06 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Augment with gnulib-tool --import
binary-io.
* src/m4.h (includes): Add binary-io.h for O_BINARY.
* src/freeze.c (produce_frozen_state): Use O_BINARY to remove
#ifdef. Fixes patch from 2005-02-03 for cygwin.
* NEWS: Mention this fix.
* configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
* src/builtin.c (m4_syscmd): Work around OS/2 bug.
* Makefile.am (SUBDIRS): Build . before src, so that autoheader
runs first when needed.
* doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
once in srcdir rather than multiple times in VPATH builds.
2006-07-03 Eric Blake <ebb9@byu.net>
* checks/check-them: Use portable = in test.
* src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
directory, as required by Solaris cc. Include built headers, as
required by Solaris make in VPATH build.
* checks/Makefile.in: Use $(srcdir) where needed.
(CHECKS): Factor $(srcdir) into macro.
(DISTFILES): Likewise. Automake takes care of distributing
Makefile.in.
(dist): Simplify.
(Makefile): Use modern syntax of config.status.
* doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
Avoid overfull and underfull hboxes in dvi.
Fix 'make check' in VPATH build. All files included by testsuite
now live in a single directory. Use forloop.m4 in testsuite.
* checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
here...
* examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
here.
* checks/Makefile.in (DISTFILES): Don't distribute moved files.
* examples/Makefile.am (EXTRA_DIST): Distribute new files.
* checks/check-them: Avoid s/// when filename is in pattern.
* examples/forloop.m4: Fix to match documentation.
* doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
new locations.
(Loops, Format): Actually use forloop.m4 in tests.
2006-07-02 Eric Blake <ebb9@byu.net>
* checks/Makefile.in (exec_prefix, prefix): New macros, so that
$(bindir) works in installcheck.
(check, installcheck): No longer change directory, so that
distcheck works with a read-only builddir.
* checks/check-them: Work when pwd is no longer builddir.
2006-07-01 Eric Blake <ebb9@byu.net>
* GNUmakefile: New file, borrowed from coreutils.
* Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
* Makefile.maint (Makefile): Delete this rule, now that
GNUmakefile includes Makefile.
2006-06-30 Eric Blake <ebb9@byu.net>
For compatibility with other m4 implementations, sysval returns
signal<<8 rather than 0 if syscmd is terminated by a signal.
* configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
* src/builtin.c (include): Include sys/wait.h when stdlib.h does
not provide wait macros.
(WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
(M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
(m4_esyscmd): Set sysval to -1 on failure.
(m4_sysval): Print 127 on failure, and accomodate signals if they
are detectable.
* NEWS: Document this change.
* doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
last commit.
* checks/check-them: Likewise.
* src/debug.c (debug_set_file): Work around mingw fstat bug.
* src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
* src/freeze.c (produce_frozen_state): Use new spelling of
platform macro.
* src/builtin.c (predefined_tab): Add __windows__ on non-unix
platforms.
(m4_syscmd, m4_esyscmd): The empty command is successful.
* doc/m4.texinfo (Shell commands): Rename from UNIX commands.
Document platform-dependence of system().
(Syscmd): Add example.
(Esyscmd): Make example more robust, and actually demonstrate
rescanning.
(Sysval): Expand test to cover esyscmd code path, and to check
that empty command is successful. Add conditional check for
signal behavior.
(Other Incompatibilities): Move platform macros from here...
(Platform macros): ...to this new node. Add windows macro.
Check that exactly one platform macro is provided.
* checks/check-them: Improve trap cleanup. Tolerate dirname and
.exe in error messages. Allow for skipping checks.
* configure.ac (HAVE_EFGCVT): Kill dead configure check.
* NEWS: Document platform macros.
2006-06-29 Eric Blake <ebb9@byu.net>
Fix buffer overrun bug.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import
xvasprintf.
* src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
variant instead, since [efg]cvt are obsolete and our use of them
was buggy (savannah sr #104303).
(format): Fix buffer overflow by using xasprintf.
* doc/m4.texinfo (Format): Expand format test to catch both bugs.
* NEWS: Document this fix.
* configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
cross-compilation.
(AC_CACHE_CHECK): Cache search for ecvt.
2006-06-27 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Eval): Document 32-bit signed limitations
required by POSIX, and add example that exposed core dump on x86
architectures.
(Incompatibilities): Document incompatibility in eval precedence.
* src/eval.c (shift_term): Explicitly mask, to avoid undefined
behavior.
(mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
* NEWS: Document this change.
* doc/m4.texinfo: Use @noindent consistently.
(Quoting Arguments): Document that unquoted parentheses group
arguments.
(Pseudo Arguments): Expand tests to show this.
(Incompatibilities): Contrast traditional behavior of
changequote.
2006-06-24 Eric Blake <ebb9@byu.net>
* configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
(AC_CHECK_HEADERS_ONCE): Use this new feature.
(AC_CHECK_FUNCS_ONCE): Likewise.
2006-06-23 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Quoting cleanup throughout - follow
autoconf-recommended style of one level of quote per parenthesis
in the normal case. Adjust error messages to match GNU coding
standards (and to allow 'make check' to pass again).
(Quoted strings, Inhibiting Invocation): Turn more examples into
tests.
(Comments): Resolve FIXME by adding example.
(Define): Add example about underquoting.
(Defn): Add example about use of $0.
(Indir, Format): Resolve FIXME done in last commit.
(Ifelse): Add example about creating blind macro.
(Debugging): Fix grammar.
(Dnl): Add example about dnl with arguments.
(M4wrap): Be explicit that LIFO order is non compliant, and will
change in m4 2.0.
(Undivert): Resolve FIXME by adding example.
(Frozen files): Document that m4wrap and sysval will not work
consistently until m4 2.0.
(Incompatibilities): Document another POSIX compliance bug, this
time with changequote. Document a traditional incompatibility
with partial input spanning file boundaries.
Make error messages more consistent with GNU coding standards -
start with lower case, and don't end sentence with punctuation.
* src/debug.c (trace_pre): Update message wording.
* src/eval.c (evaluate, cmp_term, shift_term, mult_term):
Likewise.
* src/freeze.c (produce_frozen_state, issue_expect_message),
(reload_frozen_state): Likewise.
* src/input.c (push_string_init, pop_init, init_macro_token),
(peek_input, next_char_1, set_word_regexp, next_token): Likewise.
* src/m4.c (stackovf_handler, main): Likewise.
* src/macro.c (expand_token, expand_argument, call_macro),
(expand_macro): Likewise.
* src/output.c (make_room_for, output_text, insert_file),
(freeze_diversions): Likewise.
* src/symtab.c (symtab_init, lookup_symbol): Likewise.
* src/builtin.c (builtin_tab): Make format and indir blind.
(substitute): Prefer "Warning:" vs. "ERROR:" in messages.
* NEWS: Mention the change to builtins.
2006-06-22 Eric Blake <ebb9@byu.net>
Robustify frozen file format.
* src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
macro. Require V first, and only accept it once. For F, use
placeholder if builtin is not found, rather than warning.
* src/m4.h (m4_placeholder): New prototype.
* src/builtin.c: Unify error message style.
(m4_placeholder): New function, warn if invoked.
(builtin_tab): Add m4_placeholder.
(m4_defn): Warn if placeholder is encountered.
(find_builtin_by_addr): Handle placeholder.
(find_builtin_by_name): Return placeholder on failure.
(m4_builtin): Treat placeholder as undefined.
* doc/m4.texinfo (Frozen files): Document changes in V and F.
* NEWS: Document this change.
Reported by Bruno Haible.
* doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
(tabchar): New macro, so that 'make check' still works.
(Invoking m4): Document that ignored compatibility options -B, -S,
and -T each consume an argument.
* checks/get-them: Honor @tabchar{}.
Avoid compiler warnings during -DDEBUG.
* src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
[DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
* src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
(lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
(next_token) [DEBUG_INPUT]: Print before returning.
* src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
* src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
Avoid mkstemp bugs on various platforms.
* m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
* src/output.c [! HAVE_MKSTEMP]: Delete.
* configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
* src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
* NEWS: Document this.
* Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
Reported by Bruno Haible.
2006-06-21 Eric Blake <ebb9@byu.net>
Avoid obsolete sigstack when POSIX sigaltstack is available.
* src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
do likewise.
* configure.ac (AC_CHECK_HEADERS): Likewise.
(AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
obsolete and most hosts now have it in signal.h.
(AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
(AC_CACHE_CHECK): Cache decision to use stackovf.
(AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
* src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
(SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
simplify later code.
(PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
in case of dereferencing a member of a NULL pointer.
(sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
POSIX handler.
(setup_stackovf_trap): Use NULL instead of 0 for pointers, use
EXIT_FAILURE in error, indent preprocessor directives.
[HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
siginfo.h.
[HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
Reported by Santiago Vila.
2006-06-19 Eric Blake <ebb9@byu.net>
* THANKS: Update.
2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
* checks/Makefile.in (PATH_SEPARATOR): New macro.
(check, installcheck): Use it, for OS/2.
2006-06-18 Eric Blake <ebb9@byu.net>
Consistently use "GNU M4" as package name, "m4" as executable
name.
* NEWS: Document previous fix.
* THANKS: Update.
* README: Fix grammar. Document that --enable-changeword is on
its last leg.
* doc/m4.texinfo (Top, Changeword): Likewise.
(Sysval): Enhance this test.
(History): Backport this section from CVS head, and update.
2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
Eric Blake <ebb9@byu.net>
* src/builtin.c (WEXITSTATUS): Provide fallback definition.
(m4_esyscmd): Set sysval to 0xffff, to accomodate both
big-endian and little-endian wait status definitions.
(m4_sysval): Use WEXITSTATUS.
Reported by Andreas Buening.
2006-06-18 Eric Blake <ebb9@byu.net>
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes in 1.4.4c.
2006-06-17 Eric Blake <ebb9@byu.net>
Beta Release 1.4.4b:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.4.
* Makefile.maint (cvs-news): Accomodate copyright line wrapping.
* Makefile.am (MAINTAINERCLEANFILES): Clean files added by
bootstrap.
* checks/Makefile.in (maintainer-clean): Add missing target.
* COPYING: Remove generated file from CVS.
2006-06-16 Eric Blake <ebb9@byu.net>
* checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
2006-06-15 Eric Blake <ebb9@byu.net>
* checks/wrapfifo.m4: New file. Use it...
* doc/m4.texinfo (Incompatibilities): here, in a new test case to
demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
* src/m4.h (to_uchar): New function.
* src/eval.c (eval_lex): Use it to avoid passing signed char to
isdigit, isalpha, isupper, islower, isspace, isalnum.
* src/builtin.c (expand_user_macro): Likewise.
* src/format.c (format): Likewise.
* src/macro.c (expand_argument): Likewise.
* NEWS: Document this security fix.
Message cleanup.
* src/symtab.c (lookup_symbol): Use invalid, not illegal.
* src/freeze.c (reload_frozen_state): Fix typo in message.
(produce_frozen_state): Standardize on builtin, not built-in.
* src/builtin.c (numeric_arg, bad_argc): Likewise.
* configure.ac (M4_EARLY, M4_INIT): Use gnulib.
(AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
(AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
gnulib.
* Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
* m4/gnulib-cache.m4: New file, from gnulib.
* bootstrap: Invoke gnulib-tool --update.
* src/m4.c (main): Cast away const.
* NEWS: Document that regex is updated.
* THANKS: Update.
2006-06-08 Eric Blake <ebb9@byu.net>
* configure.ac (changeword): Work even when changeword is not a
macro.
(AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
Delete; now done by automake.
(AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
2006-06-07 Eric Blake <ebb9@byu.net>
* lib/regex.c (bcmp_translate): Canonicalize type name.
* doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
* configure.ac (changeword): Disable changeword for the creation
of configure, in case of bootstrapping with an m4 configured with
--enable-changeword.
Distribute a rudimentary man page.
* Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
can feed help2man.
* doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
(SUFFIXES, m4.1): New macros and rules to build m4.1.
2006-06-06 Eric Blake <ebb9@byu.net>
* lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
compiler warnings at -O2.
* lib/getopt.c (_getopt_internal): Likewise.
Cleanup of previous patches.
* src/input.c (struct input_block): Remove traced member.
(push_macro, init_macro_token): Don't pass trace status around.
* src/m4.h (struct token_data): Remove traced member.
(struct symbol, struct builtin): Reduce unused space.
(TOKEN_DATA_FUNC): Simplify.
(TOKEN_DATA_FUNC_TRACED): Remove unused macro.
(push_macro, define_builtin): Remove unused parameter.
* src/builtin.c (define_builtin, builtin_init, define_macro),
(m4_defn): Don't pass trace status around.
* src/macro.c (expand_argument): Likewise.
* src/freeze.c (reload_frozen_state): Likewise.
* src/symtab.c: Whitespace cleanup.
* NEWS: Clean up wording.
* doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
ensure tests actually expose bugs prior to today's patches.
Trace status of builtins is no longer inherited across
define(...,defn(...)). Fixes bug that autom4te had been working
around.
* src/builtin.c (define_builtin): Don't override trace status.
* doc/m4.texinfo (Trace): Add test for this.
* NEWS: Document this.
When changing macro definitions inside the arguments to the macro,
consistently preserve the old definition that was in effect before
argument collection, similar to the C pre-processor.
Reported by John Brzustowski.
* NEWS: Document this change.
* doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
this policy, and add tests that expose core dumps prior to this
patch.
* src/m4.h (struct symbol): New members to track when a symbol is
still in use after removal from the symbol table.
(SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
(free_symbol): Prototype.
* src/macro.c (expand_macro): Track pending expansions of a
symbol. On completion, if a symbol is deleted and no longer
pending, free its memory.
* src/symtab.c (free_symbol): Export. Don't free memory if symbol
is still in use.
(lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
is still in use.
(lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
in use as deleted and remove from the table without freeing
memory.
(symtab_print_list) [DEBUG_SYM]: More debug output.
* src/symtab.c (hack_all_symbols): Allow certain modifications of
the symbol table during traversal.
* src/builtin.c (set_trace): Replace SYMBOL_DELETE with
SYMBOL_POPDEF, since only the latter is safe with
hack_all_symbols.
Solve crash when passing "indir(`foo')" to "m4 -tfoo".
* src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
Preserve placeholder when macro is being traced.
* src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
symbol is not defined.
(set_trace): Remove placeholder when no longer traced.
(m4_traceon): On named traces, always reserve a slot in the
symbol table.
(m4_traceoff): Don't warn about untracing a nonexistent symbol.
* NEWS: Document new trace behavior.
* doc/m4.texinfo (Trace): Tracing by name now consistently works
no matter whether that macro is currently defined.
(Incompatibilities): Document differences between traditional and
GNU trace.
2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
Eric Blake <ebb9@byu.net>
* src/m4.h (hash_table_size): Now size_t instead of int.
* src/m4.c (hash_table_size): Likewise.
(main): Adjust to this; use atol rather than atoi.
* src/symtab.c: Include <limits.h>, for CHAR_BIT.
(symtab_init, lookup_symbol, hack_all_symbols):
Use size_t for sizes and indexes, not int.
(symtab_print_list) [DEBUG_SYM]: Likewise.
(hash): Likewise. 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.
* NEWS: Document this change.
2006-06-04 Eric Blake <ebb9@byu.net>
* src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
to allow compilation, for use in debugger.
(profiles, current_mode) [DEBUG_SYM]: New variables.
(show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
determining hash table performance.
2006-05-31 Eric Blake <ebb9@byu.net>
John Brzustowski <jbrzusto@fastmail.fm>
* src/input.c (input_stack): Delete; use current_input instead.
(wrapup_stack): Dynamically allocate, so that recursion is handled
properly.
(push_wrapup): Use current wrapup stack.
(pop_wrapup): Rotate wrapup stack to current, and create new
wrapup stack.
(input_init): Dynamically allocate stacks.
* NEWS: Update, now that recursive m4wrap can no longer cause
core dump.
2006-05-31 Eric Blake <ebb9@byu.net>
* lib/getopt.c: Fix copyright year.
* lib/obstack.c: Ditto.
* src/builtin.c: Ditto.
2006-05-30 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
Reported by John Brzustowski.
(Incompatibilities): Document known POSIX incompatibilities.
* THANKS: Update.
2006-05-29 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Maketemp): Work even when running 'make check'
in read-only dir.
Use automake.
* Makefile.am: New file.
* doc/Makefile.am: Ditto.
* examples/Makefile.am: Ditto.
* lib/Makefile.am: Ditto.
* src/Makefile.am: Ditto.
* acinclude.m4: New file, renamed from aclocal.m4.
* configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
(AC_ARG_PROGRAM): Now redundant.
(STACKOVF): Turn into automake conditional.
(AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
* checks/Makefile.in: Converting this dir to automake was not
trivial; for now, just add missing targets demanded by top-level.
* INSTALL: Remove files that are now generated from CVS.
* Makefile.in: Ditto.
* aclocal.m4: Ditto.
* install-sh: Ditto.
* mkinstalldirs: Ditto.
* doc/Makefile.in: Ditto.
* doc/texinfo.tex: Ditto.
* examples/Makefile.in: Ditto.
* lib/Makefile.in: Ditto.
* src/Makefile.in: Ditto.
* AUTHORS: Backport from CVS head, and update.
* doc/m4.texinfo (Changeword): Fix examples to match behavior.
2006-05-27 Eric Blake <ebb9@byu.net>
* lib/regex.c (regex_compile): Kill compiler warnings.
* lib/getopt.c: Likewise.
* lib/obstack.c: Likewise.
* src/builtin.c (builtin_init): Likewise.
* src/path.c (path_search): Likewise.
* doc/m4.texinfo: Fix usage of a vs. an.
(Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
overfull hbox warnings.
(Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
* configure.ac: Update to autoconf 2.59. Forbid ^M4_. Fix
quoting.
* aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
(fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
assume C89.
(M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
* src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
* src/Makefile.in: Delete remains of ansi2knr.
* src/ansi2knr.1: Delete.
* src/ansi2knr.c: Delete.
2006-05-25 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Fix spelling errors. Use `invalid' instead of
`illegal'.
* doc/m4.texinfo (Francois): No longer needed as a tex variable.
Reported by Karl Berry.
2006-05-24 Eric Blake <ebb9@byu.net>
* Makefile.in (html): New target.
* doc/Makefile.in (html, m4.html): Likewise.
(MAKEINFOHTML): New macro.
* doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
rendering.
(Regexp) [ifhtml]: Make cross-reference to emacs manual an
absolute URL.
Reported by Bob Badour.
* THANKS: Update. Move reporter's email addresses here, instead
of in ChangeLog.
2006-05-11 Eric Blake <ebb9@byu.net>
* THANKS: Update.
* doc/m4.texinfo (Changequote): Give testsuite exposure to bug
patched on 2005-12-04.
Reported by Ilya N. Golubev.
* bootstrap: New file, so that generated files need not be stored
in CVS.
* Makefile.in (DISTFILES): Add bootstrap.
Make testsuite less sensitive to doc changes.
* doc/m4.texinfo: Use m4.input instead of filename.
* checks/check-them (xerr): Turn m4.input into filename.
* checks/Makefile.in (dist): Depend on stamp-checks.
Portability updates for OS/2.
* src/Makefile.in (EXEEXT, OBJEXT): Define.
(LINK): Use CFLAGS.
(.c.obj): Define.
* lib/Makefile.in (OBJEXT): Define.
(.c.obj): Define.
* doc/Makefile.in (install, uninstall): Install info files into
the dir listing.
Reported by Andreas Buening.
2006-05-09 Eric Blake <ebb9@byu.net>
* install-sh: Update to newer upstream version.
* mkinstalldirs: Likewise.
Reported by Andreas Buening.
* src/m4.c (main): Bump copyright year.
* Makefile.in (datarootdir): Define, for autoconf 2.59c.
* doc/Makefile.in (datarootdir): Likewise.
2006-05-08 Eric Blake <ebb9@byu.net>
* THANKS: Update.
* doc/m4.texinfo (Bugs): Backport bug email address from head.
Reported by Stepan Kasal.
2005-12-04 Ilya N. Golubev <gin@mo.msk.ru> (tiny change)
* input.c (match_input): Do not pass expression with side effect
to `obstack_grow'. Fix <INTERNAL ERROR: Recursive push_string!>.
* NEWS: Updated.
2005-12-04 Gary V. Vaughan <gary@gnu.org> (tiny change)
* doc/m4.texinfo (How to debug macros and input): s/woould/would/
Reported by Damian Menscher.
2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
* configure.ac (AC_INIT): Bump to 1.4.4a.
2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
Release 1.4.4:
* configure.ac (AC_INIT): Bump to 1.4.4.
* NEWS: Describe 1.4.4's changes.
* INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
* src/m4.c: fix return code when non-existent files are processed
2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
* README: update email address for bug reports.
2005-10-17 Gary V. Vaughan <gary@gnu.org>
* doc/m4.info: Generated files are not kept in the repository.
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'.
Also, some of the files here were never updated from the previous
'675 Mass Ave, Cambridge, MA 02139', so changed those to the
'51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
2005-03-31 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (bindir, infodir): Substitute from configure rather
than hardcode.
* doc/Makefile.in (infodir): Ditto.
* src/Makefile.in (bindir): Ditto.
* NEWS: Updated.
2005-03-31 Gary V. Vaughan <gary@gnu.org>
Changes needed to automate the release process for 1.4.3:
* Makefile.in (dist): Make .tar.bz2 tarball too.
* Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
(cvs-news): Look 1 line further down for NEWS release number.
(cvs-dist): We don't use automake, so make dist is fine.
Remove double . before suffixes.
(cvs-release): Don't mention manual.html.
(fetch): Get latest gendocs files.
(web-manual): Rewritten to use gendoc for multiformat manuals.
* doc/gendocs.sh: Don't save an old version in m4 CVS!
* doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
preserving, but case insensitive, so generating html docs per node
clashes between Index.html, the node file, and index.html, the
top-level of the document tree...
(Index macro): ...so renamed to this. Changed all references.
2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
* configure.ac (AC_INIT): Bump to 1.4.3a.
2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
Release 1.4.3:
* configure.in (AC_INIT): Bump to 1.4.3.
* NEWS: Describe 1.4.3's changes.
2005-03-31 Gary V. Vaughan <gary@gnu.org>
* Makefile.maint: New file with release rules, from CVS libtool.
* Makefile.in (DISTFILES): Add Makefile.maint.
* INSTALL, install-sh, doc/texinfo.tex: Updated to latest
canonical versions.
2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
* doc/m4.texinfo (Patsubst): Re-add trailing space required by
checks/47.patsubst, with a redundant @comment to prevent emacs
from removing it accidentally again.
* checks/get-them: Allow for trailing spaces tucked behind
@comment marks.
2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
* doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
* src/Makefile.in (install, uninstall): Likewise.
2005-02-07 Gary V. Vaughan <gary@gnu.org>
* lib/regex.c, lib/regex.h: Reverted gnulib update, which broke
on Cygwin.
Reported by Eric Blake.
2005-02-04 Gary V. Vaughan <gary@gnu.org>
* lib/regex.c, lib/regex.h: Updated from gnulib.
* src/input.c (set_word_regexp): Don't change the word_regexp
unless it compiles correctly.
* NEWS: Updated.
Reported by Frank Schwidom.
* Makefile.in (stamp-h): Regenerate config.h properly.
2005-02-03 Gary V. Vaughan <gary@gnu.org>
* configure.ac (AC_DEFINE): Fix overquoting of description
argument.
* 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.
* src/m4.c (main): Modernise the --version output.
2005-02-03 Gary V. Vaughan <gary@gnu.org>
Modernise the configury a little to prevent spurious errors from
Autoconf-2.59's autoreconf:
* config.h.in: Renamed to...
* config-h.in: ...this to better support DOS 8.3 file systems.
* acconfig.h: Removed.
* configure.in: Renamed to...
* configure.ac: ...this, and AC_DEFINE used to declare config.h
entry comments. Slight reorganisation and reformatting.
* aclocal.m4: Use third argument to AC_DEFINE to declare config.h
entry comments.
(AC_INIT): Use a modern 3 argument call.
* Makefile.in, checks/Makefile.in, doc/Makefile.in,
examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
s/PRODUCT/PACKAGE/g.
* Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
config.h.in. Added configure.ac, config-h.in.
(stamp-h.in): Removed acconfig.h from dependencies.
(configure): Depends on configure.ac, not configure.in.
* doc/Makefile.in (stamp-vti): Ditto.
* src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
difference between PRODUCT="m4" and PACKAGE="GNU M4".
* configure: Regenerated.
2005-02-03 Noah Misch <noah@cs.caltech.edu>
* src/output.c (mkstemp): Make non-static, and build regardless of
HAVE_TMPFILE; src/builtin.c also needs this replacement.
* NEWS: Update.
2004-09-09 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
* configure.in (AC_CHECK_HEADERS): Commit works best when you save
changes from your editor buffer first.
* configure.in (AC_CHECK_HEADERS): Add signal.h, sys/signal.h.
* src/m4.c: And include them as appropriate.
* NEWS: Updated.
2004-09-09 Andreas Schwab <schwab@suse.de>
Refactoring of the string read case in next_char provides about a
20% speedup of M4 as typically used by autoconf:
* src/input.c (next_char_1): Renamed from next_char.
(next_char): New macro.
* NEWS: Updated.
2004-08-21 Gary V. Vaughan <gary@gnu.org>
* configure.in (VERSION): Bump to 1.4.2a.
2004-08-19 Paul Eggert <eggert@twinsun.com>
Release 1.4.2.
* configure.in (VERSION): Bump to 1.4.2.
* News: Describe 1.4.2's changes.
* src/m4.c (reference_error): Preserve errno, since M4ERROR
relies on this.
* src/builtin.c (m4_esyscmd): Clear errno before calling popen.
(m4_maketemp): Clear errno before calling mkstemp.
* src/path.c (path_search): Don't let "free" trash errno when
returning NULL.
* src/output.c (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>.
2004-06-09 Gary V. Vaughan <gary@gnu.org>
* configure.in (VERSION): Bump to 1.4.1a.
* NEWS: Place holder for next stable release.
2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
Release 1.4.1.
* configure.in (VERSION): Bump to 1.4.1.
* NEWS: Describe 1.4.1's changes.
* aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
pacify Autoconf 2.59.
* doc/m4.texinfo: Insert commas after @xref's that lack them,
to pacify Texinfo 4.7.
* doc/Makefile.in (info): Remove info-1, info-2, info-3.
* src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
pacify Sun C compilers.
2003-09-28 Akim Demaille <akim@epita.fr>
* src/symtab.c (lookup_symbol): Fix an uninitialized-variable
botch.
2003-09-03 Santiago Vila <sanvila@debian.org>
* examples/stackovf.sh: Use tempfile if available.
2001-04-02 Robert Bihlmeyer <robbe@orcus.priv.at>
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
* src/output.c (m4_insert_file): Do not mix buffered and
unbuffered I/O, as this breaks on the Hurd. (trivial change)
2001-02-01 Santiago Vila <sanvila@debian.org>
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
* src/m4.c (main): Fix format vulnerabilities. (trivial change)
2001-02-01 Matt Kraai <kraai@debian.org>
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.
* src/builtin.c (m4_maketemp): Implement the above, by using
mkstemp rather than mktemp. (trivial change)
2000-01-09 Akim Demaille <demaille@inf.enst.fr>
* src/builtin.c (expand_ranges): Added break after trailing dash.
This caused misbehaviors on some systems.
Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
Release 1.4.
* doc/Makefile.in (realclean): Also remove stamp-vti.
Reported by Eric Backus.
Wed Nov 2 00:47:53 1994 Francois Pinard (pinard@icule)
* 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.
Tue Nov 1 22:02:37 1994 Francois Pinard (pinard@icule)
* 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.
Mon Oct 31 02:11:19 1994 Francois Pinard (pinard@icule)
* 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.
Sun Oct 30 08:13:03 1994 Francois Pinard (pinard@icule)
* 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.
Sat Oct 29 05:10:03 1994 Francois Pinard (pinard@icule)
* 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.
Fri Oct 28 20:33:55 1994 Francois Pinard (pinard@icule)
* 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.
Thu Oct 27 22:32:58 1994 Francois Pinard (pinard@icule)
* Makefile.in (mostlyclean-local): Do not remove *~.
* */Makefile.in (mostlyclean): Idem.
Reported by Robert E. Brown and Richard Stallman.
Sun Oct 9 08:30:13 1994 Francois Pinard (pinard@icule)
* src/m4.h: Get rid of CONFIG_BROKETS.
Sun Oct 2 16:48:10 1994 Francois Pinard (pinard@icule)
* configure.in: Use AC_ARG_PROGRAM.
* aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
Reported by David MacKenzie.
Sat Oct 1 11:22:42 1994 Francois Pinard (pinard@icule)
* configure.in: Do not add -O to CFLAGS for GNU C, now that
configure does it automatically.
Reported by Jim Meyering.
Fri Sep 23 08:16:58 1994 Francois Pinard (pinard@icule)
* 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.
Sun Sep 18 11:42:50 1994 Francois Pinard (pinard@icule)
* src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
Reported by Karl Berry.
Wed Sep 14 10:00:22 1994 Francois Pinard (pinard@icule)
* 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.
Tue Sep 13 19:21:05 1994 Francois Pinard (pinard@icule)
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.
Sat Sep 10 12:34:04 1994 Francois Pinard (pinard@icule)
* configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
to old names, for following Autoconf.
Thu Sep 8 15:07:27 1994 Francois Pinard (pinard@icule)
* 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.
Tue Sep 6 12:07:33 1994 Francois Pinard (pinard@icule)
* 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.
Fri Sep 2 10:37:10 1994 Francois Pinard (pinard@icule)
* lib/Makefile.in (install): Depend on all.
Wed Aug 31 11:17:21 1994 Francois Pinard (pinard@icule)
* 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.
Tue Aug 30 01:44:29 1994 Francois Pinard (pinard@icule)
* 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.
Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
* 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.
Sun Aug 28 05:20:02 1994 Francois Pinard (pinard@icule)
* Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
dist works from another build directory.
Sat Aug 27 14:32:45 1994 Francois Pinard (pinard@icule)
* 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.
Wed Aug 24 16:14:19 1994 Francois Pinard (pinard@icule)
* 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.
Mon Aug 15 12:38:05 1994 Francois Pinard (pinard@icule)
* m4.c (long_options): Use "error-output", the dash was missing.
Reported by Akiko Matsushita.
Fri Aug 12 16:38:01 1994 Francois Pinard (pinard@icule)
* 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.
Fri Jul 29 10:15:52 1994 Francois Pinard (pinard@icule)
* 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.
Thu Jul 21 22:43:17 1994 Francois Pinard (pinard@icule)
* m4.c (usage): Replace printf par fputs.
Mon Jul 18 23:48:23 1994 Francois Pinard (pinard@icule)
* Release 1.2
Sun Jul 17 08:08:25 1994 Francois Pinard (pinard@icule)
* 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.
Sat Jul 16 20:36:19 1994 Francois Pinard (pinard@icule)
* ansi2knr.c: New version sent by its author, Peter Deutsch.
Fri Jul 15 14:36:21 1994 Francois Pinard (pinard@icule)
* Makefile.in: Modify so parallel make will not try making
lib/libm4.a twice simultaneously.
Reported by Jim Meyering.
Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
* 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.
Tue Jul 12 06:54:31 1994 Francois Pinard (pinard@icule)
* 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.
Thu Jul 7 22:38:10 1994 Francois Pinard (pinard@icule)
* 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.
Wed Jul 6 13:16:31 1994 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.
Tue Jul 5 19:13:54 1994 Francois Pinard (pinard@icule)
* 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.
Sat Jul 2 00:58:47 1994 Francois Pinard (pinard@icule)
* 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.
Wed Jun 29 22:41:53 1994 Francois Pinard (pinard@icule)
* 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.
Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
* 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.
Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
* 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.
Fri Jun 24 23:30:31 1994 Francois Pinard (pinard@icule)
* Makefile.in (DISTFILES): Distribute install.sh.
* install.sh: New file, copied from elsewhere.
Reported by Assar Westerlund and Kaveh R. Ghazi.
Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
* 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.
Wed Jun 22 21:58:54 1994 Francois Pinard (pinard@icule)
* 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.
Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
* m4.h (_): Change argument from `x' to `Args'.
Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
* Makefile.in: Remove all occurrences of $(MFLAGS), which were
bringing more evil than good on a few systems.
Reported by Greg A. Woods.
Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
* m4.h: Rename Args() to _().
* m4.h: Remove extern specifier from all function declarations.
Fri Apr 22 15:51:21 1994 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.
Wed Apr 13 14:10:30 1994 Francois Pinard (pinard@icule)
* checks/Makefile.in: Rename .all-stamp to stamp-checks.
* Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
Sun Jan 30 14:24:19 1994 (pinard at icule)
* 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.
Tue Jan 25 18:39:37 1994 Francois Pinard (pinard at icule)
* m4.h: Move the conditional definition of volatile after the
inclusion of system files, because they may define it first.
Tue Jan 4 19:46:50 1994 Francois Pinard (pinard@icule)
* 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.
Mon Jan 3 00:21:45 1994 Francois Pinard (pinard@icule)
* Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
Reported by Richard Stallman.
Sat Dec 25 08:06:05 1993 Francois Pinard (pinard@icule)
* configure.in: Correct test for strerror, AC_FUNC_CHECK was used
instead of AC_HAVE_FUNCS.
Reported by Noah Friedman.
Wed Dec 1 09:37:53 1993 Francois Pinard (pinard@icule)
* 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.
Sat Nov 27 10:43:24 1993 Francois Pinard (pinard@icule)
* 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.
Wed Nov 24 22:16:15 1993 Francois Pinard (pinard@icule)
* checks/get-them: Escape braces with backslashes in patterns,
because HPUX-9.01 awk needs this.
Reported by Jim Meyering.
Mon Nov 22 10:55:52 1993 Francois Pinard (pinard@icule)
* 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.
Sat Nov 20 08:26:15 1993 Francois Pinard (pinard@icule)
* 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.
Wed Nov 17 09:34:55 1993 Francois Pinard (pinard@icule)
* 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.
Fri Nov 12 10:02:26 1993 Francois Pinard (pinard@icule)
* 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.
Tue Nov 9 09:31:47 1993 Francois Pinard (pinard@icule)
* m4.h: Do not define volatile if already defined.
Reported by Rene' 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.
Mon Nov 8 21:11:44 1993 Francois Pinard (pinard@icule)
* 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.
Mon Nov 8 12:45:34 1993 Francois Pinard (pinard@icule)
* 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.
Fri Nov 5 09:49:30 1993 Francois Pinard (pinard@compy.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.
Thu Nov 4 13:50:52 1993 Francois Pinard (pinard@lagrande.IRO.UMontreal.CA)
* lib/Makefile.in (dist): Correct permissions on files.
* output.c: Declare tmpfile, some systems don't.
Wed Nov 3 09:09:16 1993 Francois Pinard (pinard@icule)
* 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.
Tue Nov 2 00:55:41 1993 Francois Pinard (pinard@icule)
* 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.
Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
* 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.
Sat Oct 30 12:51:47 1993 Francois Pinard (pinard@icule)
* Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
Reported by Noah Friedman.
Mon Oct 25 14:58:48 1993 Francois Pinard (pinard@icule)
* Makefile.in: Remove MDEFINES and cleanup.
Wed Jun 9 14:59:46 1993 Francois Pinard (pinard@icule)
* Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
Create a gzip file.
Sat Feb 6 14:59:22 1993 Francois Pinard (pinard@icule)
* 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.
Sun Jan 17 15:38:05 1993 Francois Pinard (pinard@icule)
* Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
so the installer can override automatically configured choices.
Reported by Karl Berry.
Fri Jan 15 16:07:00 1993 Francois Pinard (pinard@icule)
* 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.
Fri Jan 1 19:42:23 1993 Francois Pinard (pinard at icule)
* Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
Richard wants it there.
Sun Dec 27 07:01:54 1992 Francois Pinard (pinard at icule)
* 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.
Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
* 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.
Reported by Greg A. Woods.
Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
* 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.
Sat Dec 19 08:21:34 1992 Francois Pinard (pinard at icule)
* 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!
Fri Dec 18 11:08:03 1992 Francois Pinard (pinard at icule)
* 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.
Wed Nov 18 07:57:19 1992 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.
Tue Nov 17 01:58:40 1992 Francois Pinard (pinard at icule)
* *.[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.
Mon Nov 16 20:42:56 1992 Francois Pinard (pinard at icule)
* 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.
Mon Nov 16 07:48:52 1992 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'.
Sun Nov 15 09:42:09 1992 Francois Pinard (pinard at icule)
* *.[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.
Sat Nov 14 11:01:20 1992 Francois Pinard (pinard at icule)
* 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.
Fri Nov 13 00:12:50 1992 Francois Pinard (pinard at icule)
* 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.
Thu Nov 12 14:42:57 1992 Francois Pinard (pinard at icule)
* 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.
Wed Nov 11 17:40:35 1992 Francois Pinard (pinard at icule)
* 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().
Tue Nov 10 08:57:05 1992 Francois Pinard (pinard at icule)
* 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.
Fri Nov 6 02:05:21 1992 Francois Pinard (pinard at icule)
* 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.
Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
* 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/.
Tue Mar 10 00:29:46 1992 Francois Pinard (pinard at icule)
* 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.
Mon Mar 9 14:53:40 1992 Francois Pinard (pinard at icule)
* 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.
Sun Mar 8 11:01:55 1992 Francois Pinard (pinard at icule)
* 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 Rene' to Franc,ois.
Thu Oct 24 15:18:46 1991 Rene' Seindal (seindal at 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.
Fri Jul 26 15:28:42 1991 Rene' Seindal (seindal at diku.dk)
* Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
Francois 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.
Thu Nov 15 21:51:06 1990 Rene' Seindal (seindal at 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.
Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
* Initial beta release. Release 0.50, manual 0.05.
-----
Local Variables:
coding: utf-8
End:
Copyright (C) 1990-1994, 2000-2001, 2003, 2005-2011 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.
|