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
|
Sat Sep 20 11:57:58 BST 2003 Colin Watson <cjwatson@debian.org>
* po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po,
po/it.po, po/ja.po, po/pt_BR.po, po/sv.po: Update with msgmerge
(po/Makevars changed).
Sat Sep 20 01:07:24 BST 2003 Colin Watson <cjwatson@debian.org>
* Version: 2.4.2.
* configure.in, docs/NEWS, man-db.gnu, man-db.lsm: Update.
* man-db.gnu: Suggest libgdbm-dev rather than libdb3-dev.
* man-db.lsm: Suggest GDBM.
Sat Sep 20 00:11:14 BST 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (make_roff_command): Don't recode output if an explicit
encoding was specified with -E.
Sat Sep 20 00:09:03 BST 2003 Colin Watson <cjwatson@debian.org>
* po/.cvsignore: Add stamp-po.
Fri Sep 19 22:49:14 BST 2003 Colin Watson <cjwatson@debian.org>
* acinclude.m4 (MAN_CHECK_BDB): Temporarily add $lib to LIBS for
AC_TRY_LINK, not to DBLIBS; but add it to DBLIBS if the test
succeeds.
* configure.in: Simply set DBLIBS rather than appending to it.
Fri Sep 19 22:20:07 BST 2003 Colin Watson <cjwatson@debian.org>
* autogen.sh: Run aclocal after autopoint, in accordance with the
autopoint info documentation.
Fri Sep 19 22:17:18 BST 2003 Colin Watson <cjwatson@debian.org>
* configure.in (AM_GNU_GETTEXT_VERSION): Upgrade to gettext 0.12.1.
* po/Makevars (MSGID_BUGS_ADDRESS): Set to me.
* po/.cvsignore: Add Makevars.template.
Fri Sep 19 00:48:07 BST 2003 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l (MAN_FILE): Accept blank lines immediately following
".SH NAME".
Fri Sep 19 00:06:02 BST 2003 Colin Watson <cjwatson@debian.org>
* man/man8/mandb.man8 (OPTIONS): Improve --filename wording a bit.
Wed Sep 17 07:17:22 BST 2003 Colin Watson <cjwatson@debian.org>
Fix case where a page explicitly encoded in UTF-8 has to be recoded
down to a non-ISO-8859-1 legacy encoding for processing by groff and
then back up to UTF-8 for display.
* src/encodings.c (get_page_encoding): New function, renamed from
get_source_encoding.
(get_source_encoding): Return only the canonical source encoding,
not any explicit encoding in the directory name. This allows us to
take account of differing explicit encoding and canonical encoding
of pages for the purposes of working out which device to use.
(get_roff_encoding): New source_encoding argument, now returned
instead of NULL.
(get_default_device): Pass source_encoding to get_roff_encoding().
(compatible_encodings): The roff encoding can no longer be NULL.
* src/encodings.h (get_page_encoding): Add prototype.
(get_roff_encoding): Update prototype.
* src/man.c (make_roff_command): Call get_page_encoding(), and
recode from that to roff_encoding, not from source_encoding to
roff_encoding. Pass source_encoding to get_roff_encoding().
roff_encoding can no longer be NULL.
Tue Sep 16 22:53:36 BST 2003 Colin Watson <cjwatson@debian.org>
Purge database entries corresponding to removed stray cat pages.
* src/check_mandirs.c (purge_normal, purge_whatis): Add TODO notes
for systems where the cat extension differs from the man
extension.
(purge_whatis): Rename manpath to path. New cat argument, passed
through to look_for_file().
(purge_missing): New catpath argument, passed to look_for_file()
and purge_whatis() in the STRAY_CAT and WHATIS_CAT cases, which
are now handled.
* src/check_mandirs.h (purge_missing): Update prototype.
* src/mandb.c (main): Pass catpath to purge_missing().
* docs/NEWS: Document this.
Tue Sep 16 22:37:33 BST 2003 Colin Watson <cjwatson@debian.org>
Work around the fact that GDBM's firstkey/nextkey interface doesn't
return ordered results.
* libdb/db_gdbm.c (man_gdbm_open_wrapper): New function. Wraps the
return value from gdbm_open() in a structure that remembers the
file name.
(parent_sortkey_hash_free, sortkey_hash_free): New functions to
free hashtables used here.
(sortkey_compare): New comparison function for qsort().
(man_gdbm_firstkey): New function. Retrieve all keys using
gdbm_firstkey() and gdbm_nextkey() in advance, sort them into an
ordered hashtable, remember that hashtable for later, and return
the first key.
(man_gdbm_nextkey): New function. Find the previously remembered
ordered hashtable and return the next element from it.
(man_gdbm_close): New function. Clean up remembered data.
* libdb/db_lookup.c (copy_datum): Define even if using GDBM.
(gripe_lock): Explain why this isn't used for GDBM.
* libdb/mydbm.h (man_gdbm_wrapper): New type.
(man_gdbm_open_wrapper, man_gdbm_firstkey, man_gdbm_nextkey,
man_gdbm_close): Add prototypes.
(MYDBM_FILE): Change to man_gdbm_wrapper for GDBM. Adjust all
other MYDBM_* macros to cope with this and use man_gdbm_*
functions where necessary.
(copy_datum): Declare for all database types. Remove __inline__.
* docs/NEWS: Document this.
Tue Sep 16 01:44:59 BST 2003 Colin Watson <cjwatson@debian.org>
* src/accessdb.c (main): Free each key after listing it rather than
just leaking it.
Mon Sep 15 23:45:33 BST 2003 Byrial Ole Jensen <byrial@image.dk>
* po/da.po: Update from Translation Project.
Mon Sep 15 23:29:33 BST 2003 Colin Watson <cjwatson@debian.org>
* configure.in: Add --enable-mb-groff option, which defines
MULTIBYTE_GROFF for src/encodings.c.
* docs/NEWS: Document this.
Mon Sep 15 01:23:00 BST 2003 Colin Watson <cjwatson@debian.org>
* po/it.po: msgfmt doesn't like "charset=iso8859-1". Use
"charset=iso-8859-1" instead.
Sun Sep 14 17:48:38 BST 2003 Colin Watson <cjwatson@debian.org>
* src/encodings.c (get_source_encoding): If the language directory
is unknown (e.g. 'man -l'), guess based on the locale before
falling back to a default.
(get_standard_output_encoding): Likewise.
Sun Sep 14 16:58:34 BST 2003 Colin Watson <cjwatson@debian.org>
* src/encodings.c (get_source_encoding): Assume ISO-8859-1 source
encoding if it's unknown (e.g. 'man -l').
(get_default_device): source_encoding can no longer be NULL.
* src/man.c (make_roff_command): Likewise.
Sun Sep 14 16:45:43 BST 2003 Colin Watson <cjwatson@debian.org>
* man/man1/man.man1 (EXAMPLES, ENVIRONMENT, HISTORY): Change a few
stray hyphens to dashes.
Sun Sep 14 16:37:56 BST 2003 Colin Watson <cjwatson@debian.org>
* src/encodings.c (get_source_encoding,
get_standard_output_encoding, get_default_device,
get_roff_encoding, get_output_encoding, get_less_charset):
Simplify using new table element struct types.
Sun Sep 14 16:24:00 BST 2003 Colin Watson <cjwatson@debian.org>
Make locales like ru_RU.UTF-8 that need the ascii8 device but UTF-8
output work. This involves a good deal of restructuring.
* src/encodings.c (directory_table): Remove a completed TODO
comment.
(directory_table, charset_table, device_table): Name array element
struct types in order to abbreviate code later.
(device_table): Split less_charset members out into a new table,
less_charset_table. They really depend on the locale charset, but
aren't quite appropriate for charset_table. Use "iso8859" rather
than "latin1", and add KOI8-R.
(device_table): Add output_encoding member, which is almost the
inverse of charset_table but slightly different for ascii8.
(compatible_encodings): New function to figure out if a source
encoding and a roff encoding are compatible.
(get_default_device): Take new source_encoding argument so that we
can make ru_RU.UTF-8 use the ascii8 device and an iconv pipe
rather than utf8 directly. Drop through to the fallback default
device if none of the predefined entries in charset_table are
compatible when considering the source encoding.
(get_roff_encoding): Split LESSCHARSET handling out into a new
function ...
(get_less_charset): ... here. The caller is expected to set
environment variables rather than having it done by the library.
(get_output_encoding): New function, returning the output encoding
produced by a device.
* src/encodings.h (get_default_device): Update prototype.
(get_output_encoding, get_less_charset): Add prototypes.
* src/man.c (make_roff_command): Update calls to encoding library
for these changes.
Sun Sep 7 23:10:01 BST 2003 Colin Watson <cjwatson@debian.org>
Fix decision about whether a given encoding is safe to save as a cat
page.
* src/encodings.c (directory_table): Add standard_output_encoding
member, used to set the default encoding for cat pages.
(fallback_locale_charset): Remove.
(get_standard_output_encoding): New function.
(get_locale_charset): New function, split out in modified form
from get_default_device().
(get_default_device): Take a character set as input rather than a
locale.
* src/encodings.h (get_standard_output_encoding,
get_locale_charset): Add prototypes.
(get_default_device): Update prototype.
* src/man.c (make_roff_command): Instead of comparing devices, test
that the default character set for this manual hierarchy is being
used, and don't save cat pages if it isn't.
Sun Sep 7 11:33:09 +0200 2003 Giuseppe Sacco <eppesuig@debian.org>
* po/it.po: changed the header of the po file correcting the
charset and the transfer encoding.
Sat Sep 6 11:53:06 BST 2003 Colin Watson <cjwatson@debian.org>
* src/encodings.c (get_source_encoding): Implement encodings in
manual hierarchy directory names. Include a mini-rant about the
bizarre specification for these in FHS 2.1, which I've declined to
implement for now.
Sat Sep 6 11:28:46 BST 2003 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (purge_missing): Call MYDBM_REORG() after
deleting entries. Currently only useful for gdbm.
Sat Sep 6 00:23:03 BST 2003 Colin Watson <cjwatson@debian.org>
* acinclude.m4 (MAN_CHECK_BDB): Append to DBLIBS rather than LIBS.
* configure.in: Likewise for gdbm and ndbm tests. Make DBLIBS an
output variable.
* src/Makefile.in: Link only the necessary programs with the
database library.
Sat Sep 6 00:15:37 BST 2003 Colin Watson <cjwatson@debian.org>
* libdb/db_lookup.c (make_content): Cast cont.dsize to size_t when
comparing it with the return value of strlen(). Avoids warning
when building with gdbm.
Thu Sep 4 20:22:21 BST 2003 Christian Rose <menthos@menthos.com>
* po/sv.po: Update from Translation Project.
Fri Aug 29 17:46:40 BST 2003 Michael Piefel <piefel@informatik.hu-berlin.de>
* po/de.po: Update from Translation Project.
Fri Aug 29 17:42:15 BST 2003 Giuseppe Sacco <eppesuig@debian.org>
* po/it.po: Updated after the revision in tp@linux.it.
Thu Aug 28 11:19:21 BST 2003 Christian Rose <menthos@menthos.com>
* po/sv.po: Update from Translation Project.
Thu Aug 28 00:45:50 BST 2003 Jordi Mallach <jordi@sindominio.net>
* po/ca.po: Update from Translation Project.
Thu Aug 28 00:43:33 BST 2003 Christian Rose <menthos@menthos.com>
* po/sv.po: Update from Translation Project.
Thu Aug 28 00:40:09 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (pipeline_start): Change "couldn't exec %s" to
"can't execute %s" in line with src/man.c, to make translators'
lives easier.
(pipeline_wait): Separate "%s: %s%s" into two translatable
strings: the "(core dumped)" portion should definitely be
translated.
* src/accessdb.c (usage): Clarify "man_database" to "(The) man
database".
Thu Aug 28 00:18:46 BST 2003 Colin Watson <cjwatson@debian.org>
* src/globbing.c (usage): Expand "sec" to "section".
Wed Aug 27 00:50:07 BST 2003 Giuseppe Sacco <eppesuig@debian.org>
* po/it.po: Remove all fuzzy translations and insert missed ones.
Now this translation will be reviewed by the Italian translation
project for proofreading.
Tue Aug 26 20:16:23 BST 2003 Colin Watson <cjwatson@debian.org>
* Version: 2.4.2-pre1 (for translators).
* docs/NEWS: Mention pipeline library.
Sat Aug 16 14:07:46 BST 2003 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l (find_name): Report a sensible error if file is a
directory.
Fri Aug 15 18:11:06 BST 2003 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (test_manfile): file is const.
* src/check_mandirs.h (test_manfile): Update prototype.
* src/mandb.c (update_one_file): filename is const.
Fri Aug 15 18:05:37 BST 2003 Colin Watson <cjwatson@debian.org>
* include/manconfig.h.in: Remove incorrect prototype of basename()
which was hiding several bugs.
* configure.in: Check for <libgen.h>.
* lib/pipeline.c, src/accessdb.c, src/catman.c, src/check_mandirs.c,
src/filenames.c, src/lexgrog.l, src/man.c, src/mandb.c,
src/manpath.c, src/straycats.c, src/whatis.c, zsoelim/zsoelim.l:
Include <libgen.h> instead of relying on basename() prototype in
manconfig.h.
* src/check_mandirs.c (test_manfile), src/man.c (local_man_loop),
src/straycats.c (check_for_stray): Copy strings before calling
basename() on them.
Fri Aug 15 00:16:13 BST 2003 Colin Watson <cjwatson@debian.org>
* src/ult_src.c (ult_hardlink): Return a newly allocated string
rather than messily copying over an existing one (and possibly
corrupting the malloc arena). link and dir are now allocated
rather than being declared as arrays.
(ult_src): Update call to ult_hardlink(). Return 'const char *' to
make sure callers aren't messing about with our memory.
* src/ult_src.h (ult_src): Update prototype.
* src/check_mandirs.c (test_mandirs): ult is const.
* src/lexgrog.l (main): file is const.
* src/man.c (try_section): ult is const.
(display_filesystem, display_database): man_file is const.
Sat Aug 9 21:30:16 BST 2003 Colin Watson <cjwatson@debian.org>
* po/POTFILES.in: Add lib/pipeline.c, src/descriptions.c,
src/filenames.c, and src/globbing.c.
* po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po,
po/it.po, po/ja.po, po/pt_BR.po, po/sv.po: Update with msgmerge.
Sat Aug 9 18:28:01 BST 2003 Colin Watson <cjwatson@debian.org>
Replace the old "wait() for one child at a time" approach with a
SIGCHLD-handling edifice that collects children's exit statuses as
they die.
* lib/pipeline.c (pipeline_new): Initialize statuses.
(pipeline_join): Set statuses to NULL in joined pipeline.
(pipeline_join, pipeline_get_infile, pipeline_get_outfile,
pipeline_start, pipeline_wait): Assert that statuses field is NULL
or non-NULL as appropriate.
(pipeline_free): Free statuses if necessary.
(pipeline_start): Add p to a new active_pipelines array, to be
used while reaping children. Initialize statuses elements to -1.
Block SIGCHLD while forking children.
(reap_children): New function. Delivers collected exit statuses
into statuses fields of entries in active_pipelines.
(pipeline_wait): Rather than wait()ing manually here, check
whether any statuses have been picked up by the SIGCHLD handler,
and if not call reap_children(). Remove now-obsolete TODO comment.
(pipeline_sigchld): New function, the SIGCHLD handler.
(pipeline_install_sigchld): New function, to be called once per
program.
(pipeline_start, pipeline_wait): Add minimal debugging
information.
* lib/pipeline.h: Prototype new functions.
(struct pipeline): New statuses member.
Sat Aug 9 17:00:12 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (command_dup): Copy cmd->nice.
(pipeline_command): Correct condition for growing commands array.
Mon Aug 4 20:44:16 BST 2003 Colin Watson <cjwatson@debian.org>
* man/man1/man.man1 (HISTORY): Rearrange text to avoid having
"Wilf." at the end of a line, since groff thinks that's the end of
a sentence and adjusts spacing accordingly. (Alternatively, I
could have used \&.)
Mon Aug 4 19:35:26 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (command_dup): Terminate argv with a NULL.
(command_dup, command_arg): Assert that argc < argv_max after
changing either.
Mon Aug 4 19:30:22 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (pipeline_dump): New function to dump a printable
representation of a pipeline to a stream.
(pipeline_tostring): Likewise, but to a newly allocated string.
* lib/pipeline.h: Prototype these.
Mon Aug 4 12:03:38 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (argstr_get_word): Plug some memory leaks.
Mon Aug 4 01:05:12 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (pipeline_wait): The return value was a bit
groff-specific. Now just return the status of the last command in
the pipeline, as reported by wait().
Mon Aug 4 00:31:44 BST 2003 Colin Watson <cjwatson@debian.org>
Add support for getting stdio streams for input and output. Needs
library support because pipeline_wait() needs to know to close the
stream rather than the underlying file descriptor.
* lib/pipeline.h (struct pipeline): New infile and outfile members.
(pipeline_get_infile, pipeline_get_outfile): Add prototypes.
* lib/pipeline.c (pipeline_new): Initialize infile and outfile.
(pipeline_join): Likewise.
(pipeline_get_infile, pipeline_get_outfile): New functions.
(pipeline_wait): Check for infile and outfile and fclose() them in
preference to close()ing infd and outfd. Check for errors on
close().
Sun Aug 3 23:59:18 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (pipeline_start): Use dup2() instead of close()
then dup().
Sun Aug 3 23:52:14 BST 2003 Colin Watson <cjwatson@debian.org>
infd and outfd should now only be set by pipeline_start(). Positive
values in want_in and want_out now indicate caller-supplied file
descriptors, while negative values indicate a request for
pipeline_start() to create a pipe.
* lib/pipeline.h (struct pipeline): Document this.
* lib/pipeline.c (pipeline_start): Implement it. Caller-supplied
input and output file descriptors previously didn't work properly.
(pipeline_wait): Update TODO comment.
Sun Aug 3 21:07:46 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.h (struct command): New 'nice' member.
* lib/pipeline.c (command_new): Initialize nice.
(pipeline_start): Change child process priority if nice is set.
Sun Aug 3 20:50:35 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (pipeline_start): Pop all cleanups in child.
Sun Aug 3 20:47:24 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (argstr_get_word, command_new_argstr,
command_argstr, pipeline_command_argstr): New functions to handle
constructing commands from shell-quoted strings, such as those
found in man-db configuration files. They deliberately handle only
a safe subset of shell syntax.
* lib/pipeline.h: Prototype command_new_argstr(), command_argstr(),
and pipeline_command_argstr().
Sun Aug 3 19:09:59 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c (command_dup): New function to duplicate a command.
(pipeline_join): New function to join two pipelines together.
* lib/pipeline.h: Prototype these.
Sun Aug 3 18:00:59 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.h (struct pipeline): The writeto, readfrom, writefd,
and readfd names turn out to be confusing in calling code. Rename
to want_in, want_out, infd, and outfd respectively.
* lib/pipeline.c (pipeline_new, pipeline_start, pipeline_wait): Use
new names.
Sun Aug 3 16:35:24 BST 2003 Colin Watson <cjwatson@debian.org>
Add support in pipeline library for writing input to or reading
output from the whole pipeline.
* lib/pipeline.c (pipeline_new): Initialize writeto, readfrom,
writefd, and readfd.
(pipeline_start): Create extra pipes as necessary.
(pipeline_wait): Expand TODO comment. Close file descriptors from
extra pipes if necessary.
* lib/pipeline.h (struct pipeline): Add writeto, readfrom, writefd,
and readfd.
Sun Aug 3 11:15:17 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/pipeline.c: New pipeline library, adapted from that in groff.
The interface isn't complete yet; in particular, it can't be a
replacement for popen() at the moment.
* lib/pipeline.h: New file with pipeline library interface.
* lib/Makefile.in (ALLSRCS, ALL): Build pipeline.
Sun Aug 3 11:09:07 BST 2003 Colin Watson <cjwatson@debian.org>
* acinclude.m4 (MAN_FUNC_STRSIGNAL): New macro to check for the GNU
extension strsignal().
* configure.in: Use it.
* lib/xstrsignal.c: New file, wrapping strsignal() or sys_siglist
depending on what's available (and with a saner return type than
strsignal()).
* lib/Makefile.in (ALLSRCS, XOBJS): Build xstrsignal.
* include/manconfig.h.in (xstrsignal): Add prototype.
Sun Aug 3 10:57:55 BST 2003 Colin Watson <cjwatson@debian.org>
* include/comp_src.h.in: Protect against multiple inclusions.
Sat Aug 2 19:32:04 BST 2003 Colin Watson <cjwatson@debian.org>
* docs/NEWS: Document the recent security fixes.
Sat Aug 2 12:31:24 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/error.c (error_print_progname): Use a proper prototype.
Sat Aug 2 01:23:08 BST 2003 Colin Watson <cjwatson@debian.org>
* tools/checkman: Tolerate spaces in NAME sections, since they occur
in practice and confused checkman before this. Prompted by a
question from James B. Hiller.
Fri Aug 1 22:06:33 BST 2003 Colin Watson <cjwatson@debian.org>
Fix vulnerability due to over-permissiveness of DEFINE directive.
* src/manp.c (DEFINE_USER): New list flag.
(get_def): Note that this must not return DEFINEs set in
~/.manpath.
(get_def_user): New function, which may return DEFINEs set in
~/.manpath.
(add_def): Use DEFINE or DEFINE_USER depending on context.
(add_to_dirlist): Update call to add_def().
* src/manp.h (get_def_user): Add prototype.
* src/man.c (main): pager and cat are safe for the user to define.
(make_display_command): cat, tr, and decompressor are safe.
* src/straycats.c (check_for_stray): col and decompressor are safe.
* src/whatis.c (use_grep): whatis_grep_flags,
apropos_regex_grep_flags, apropos_grep_flags, and grep are safe.
Fri Aug 1 01:32:37 BST 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (main): Minor whitespace cleanups.
Fri Aug 1 01:05:42 BST 2003 Colin Watson <cjwatson@debian.org>
* src/manp.c (mkcatdirs): Allocate manname and catname dynamically.
Wed Jul 30 22:28:13 BST 2003 Colin Watson <cjwatson@debian.org>
Fix vulnerability 4 posted by Vade 79 <v9@fakehalo.deadpig.org> on
BugTraq, Message-ID:
<20030729210308.15518.qmail@www.securityfocus.com>. This fix is just
a stopgap measure for now; proper list handling will be added later.
* src/manp.c (gripe_overlong_list): New function.
(add_dir_to_list): Die gracefully if too many list entries are
added.
(add_dir_to_path_list): Likewise. Take an extra argument for the
head of the list so that we can spot this efficiently.
(create_pathlist): Update calls to add_dir_to_path_list().
Wed Jul 30 22:15:16 BST 2003 Colin Watson <cjwatson@debian.org>
* src/manp.c (gripe_reading_mp_config): This is a fatal error, so
shouldn't be conditional on quiet.
Wed Jul 30 20:48:57 BST 2003 Colin Watson <cjwatson@debian.org>
Fix vulnerability 1 posted by Vade 79 <v9@fakehalo.deadpig.org> on
BugTraq, Message-ID:
<20030729210308.15518.qmail@www.securityfocus.com>.
* src/manp.c (add_to_dirlist): Limit all sscanf() calls to the
appropriate buffer size. Leave a TODO to say that a replacement
that allocates its own memory would be welcome.
Wed Jul 30 20:38:40 BST 2003 Colin Watson <cjwatson@debian.org>
Fix vulnerabilities 2 and 3 posted by Vade 79
<v9@fakehalo.deadpig.org> on BugTraq, Message-ID:
<20030729210308.15518.qmail@www.securityfocus.com>.
* src/ult_src.c (ult_softlink): Return a newly allocated string
rather than copying into fullpath.
(test_for_include): Return a newly allocated string rather than
copying into rel (which was a pointer into part of basename in
ult_src(), and wasn't reallocated in the event that the .so text
was too large).
(ult_src): Allocate basename dynamically rather than using a
static buffer. relative is no longer needed. Update for changes in
ult_softlink() and test_for_include().
Wed Jul 30 12:33:25 BST 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (close_cat_stream): The unlink(tmp_cat_file) cleanup is
only pushed if (!debug), so apply the same condition to popping
it.
Wed Jul 30 12:21:20 BST 2003 Colin Watson <cjwatson@debian.org>
* src/descriptions.c (parse_descriptions): Revert this part of
xstrdup(NULL) change from 28 April 2003; head->whatis is undefined
if the else branch was taken.
Wed Jul 30 10:40:06 BST 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (find_in_path): Avoid leaking filename for each PATH
element.
Wed Jul 30 10:36:22 BST 2003 Colin Watson <cjwatson@debian.org>
* src/compression.c (decompress): Don't free command until after
printing the error message that includes it.
Wed Jul 30 10:23:50 BST 2003 Colin Watson <cjwatson@debian.org>
* src/mandb.c (main): Return non-zero with an error message if no
databases were updated. Required so that man knows not to call
mandb over and over again.
Sat Jun 28 01:26:55 BST 2003 Colin Watson <cjwatson@debian.org>
* man/it_IT.88591/man1/apropos.man1: Use %date% rather than
%date_it% (which the build system no longer supports).
Sat Jun 28 00:23:02 BST 2003 Colin Watson <cjwatson@debian.org>
* man/man1/man.man1: Clarify section 3 as "program libraries" rather
than "system libraries".
Tue May 6 00:50:25 CEST 2003 Giuseppe Sacco <eppesuig@debian.org>
* Updated the apropos italian man page.
Mon May 5 19:47:07 BST 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (set_term, get_term, store_line_length): Use the
fileno() of stdin and stdout respectively instead of literal 0 and
1.
* src/ult_src.c (ult_src): Use STRNEQ() instead of strncmp().
Mon May 5 18:35:02 BST 2003 Colin Watson <cjwatson@debian.org>
* src/encodings.c (directory_table): Add Czech -> ISO-8859-2.
Thu May 1 19:12:54 BST 2003 Colin Watson <cjwatson@debian.org>
* configure.in (CFLAGS): Add -Wpointer-arith and -Wstrict-prototypes
for gcc.
* src/man.h: Move prototype from convert_name.c to ...
* src/convert_name.h: ... here (new file).
* src/convert_name.c: Include "convert_name.h". Add some TODO
comments.
* src/man.c: Include "convert_name.h".
* lib/error.c: Include "error.h". Prototype strerror() fully.
* lib/tempfile.c: Include "manconfig.h" instead of prototyping
strappend() and xstrdup(). Prototype path_search() fully.
* lib/xmalloc.c: Remove most K&R compatibility, since it's not
really supported elsewhere in man-db.
* src/globbing.c: Include "globbing.h".
(match_in_directory): Add static.
* src/man.c (set_term, get_term): Add static.
(int_handler): Move above main(), and add static.
(main): Remove int_handler() prototype.
(make_roff_command, format_display_and_save): Prototype
old_handler fully.
(open_cat_stream, display_catman): Cast to cleanup_fun rather than
to an incomplete prototype.
* src/manp.c (guess_manpath): Add static.
* src/security.c (gripe_set_euid): Prototype fully.
* src/ult_src.c (realpath): Move prototype to the non-STDC_HEADERS
case.
* src/lexgrog.l: Add '%option warn'.
Thu May 1 17:39:55 BST 2003 Colin Watson <cjwatson@debian.org>
* configure.in (CFLAGS): Add -W for gcc.
* lib/hashtable.c (hash): Change array index type to size_t.
* src/globbing.c (dirent_hash_free, match_in_directory): Likewise.
* src/check_mandirs.c (purge_pointers): Remove unused manpath
argument.
* src/check_mandirs.h (purge_pointers): Update prototype.
* src/mandb.c (update_one_file): Update call to purge_pointers().
* src/catman.c (catman): Remove unused arg_no argument.
(do_catman): Update call to catman().
* src/man.c (make_roff_command): dir is unused except #ifdef
ALT_EXT_FORMAT.
* src/mandb.c (cleanup): dummy is unused.
* src/ult_src.c (ult_hardlink): Change type of inode to ino_t.
(ult_softlink): mantree is unused.
(ult_src): Update call to ult_softlink().
* src/whatis.c (apropos): lowpage is unused except #ifdef APROPOS.
* src/wrapper.c (main): argc is unused.
Thu May 1 16:52:44 BST 2003 Colin Watson <cjwatson@debian.org>
Remove all assumptions that string literals have type 'char *'
rather than 'const char *'.
* configure.in (CFLAGS): Add -Wwrite-strings for gcc.
* lib/tempfile.c (xstrdup): First argument is const.
(path_search): Return 'const char *'.
(create_tempfile, create_tempdir): Copy return value of
path_search() right away rather than after checking for NULL.
* libdb/db_ver.c (dbver): Take a private copy of VER_KEY.
(dbver_wr): Take private copies of VER_KEY and VER_ID.
* src/accessdb.c (cat_root): Add const.
* src/catman.c (parse_for_sec): Remove __inline__; add const to both
arguments. Take private copies of "man" and the basic options.
(main): Copy "C" for locale. Make sections etc. 'const char **',
since STD_SECTIONS is an array of 'const char *'.
* src/check_mandirs.c (update_db_time, reset_db_time, update_db):
Take a private copy of KEY.
* src/filenames.c (make_filename): Make type const.
* src/filenames.h (make_filename): Update prototype.
* src/globbing.c (extension, mandir_layout): Add const.
* src/lexgrog.l (fname): Add const.
(find_name): Make filename const.
(main): Set program_name here from argv[0] rather than from a
string literal.
* include/manconfig.h.in (find_name): Update prototype.
* src/man.c (lang_dir): Add static. Copy string literals into ld.
Use xstrndup() rather than copying and then inserting '\0'.
(extension, alt_system_name, section_list, preprocessors, pager,
locale, std_sections, external, gxditview, html_pager): Add const.
(add_roff_line_length): First argument is const. Return a copy of
it if necessary.
(gripe_no_man): Copy external before passing it to basename().
(main): Copy "C" for internal_locale. Reorganize locale
reinitialization slightly so that locale can be const.
(man_getopt): Set 'const char *' and 'char *' variables to NULL
separately.
(is_section, compare_candidates, man): Use a 'const char **' to
iterate through section_list.
(make_roff_command): Remove __inline__. Take a copy of "" for dev
so that dev is always allocated memory. Handle filter in a more
const-safe way (although there's still a memory leak).
(get_section_list): Remove __inline__. Return 'const char **'.
* src/man.h (get_section_list): Update prototype.
* src/manp.c (get_from_list): Make return value and first argument
const.
(get_def): Make return value and both arguments const.
(get_sections): Return const.
(cat_manpath): Make path and catdir const.
* src/manp.h (get_def, get_sections): Update prototypes.
* src/manpath.c (main): Make alt_system const.
* src/whatis.c (use_grep): Make flags and anchor const.
(main): Make manp and alt_systems const. Copy "C" for locale.
* zsoelim/zsoelim.l (main): Copy argv[0] basename for program_name,
as basename()'s return value may not be long-lived. Copy "-" for
so_name[0].
* src/mandb.c (main): Don't bother remembering the return value of
setlocale().
* src/manpath.c (main): Likewise.
Mon Apr 28 15:11:28 BST 2003 Colin Watson <cjwatson@debian.org>
* src/catman.c (main): Don't guard xstrdup() from NULL input, as it
checks itself.
* src/check_mandirs.c (test_manfile): Likewise.
* src/descriptions.c (parse_descriptions): Likewise.
* src/mandb.c (main): Likewise.
* src/whatis.c (main): Likewise.
Mon Apr 28 09:06:28 BST 2003 Colin Watson <cjwatson@debian.org>
Introduce a readdir() cache, which substantially speeds up mandb's
purging functions (from 2 minutes to under 45 seconds on my laptop,
and from about 280000 to about 13500 system calls).
* src/globbing.c (dirent_hash_free, update_directory_cache): New
functions.
(match_in_directory): Use update_directory_cache() rather than
reading the directory on every call.
* docs/NEWS: Document this.
Mon Apr 28 00:51:11 BST 2003 Colin Watson <cjwatson@debian.org>
* lib/hashtable.c (hash_lookup): Return the definition rather than
the hash entry structure. This turns out to be a lot more useful.
* lib/hashtable.h (hash_lookup): Update prototype.
* src/man.c (try_db): Simplify; in_cache is no longer needed. Just
assign to the target variable directly.
* src/check_mandirs.c (test_manfile): Likewise. xstrdup() already
checks for NULL input, so don't bother checking here.
Tue Apr 22 19:56:13 BST 2003 Colin Watson <cjwatson@debian.org>
* docs/HACKING: New prototypical document for developers.
Tue Apr 22 19:48:46 BST 2003 Colin Watson <cjwatson@debian.org>
* src/globbing.c (parse_layout, look_for_file): Add a BSD layout in
which cat pages have the extension .0 (Jeremy C. Reed). More work
is needed elsewhere so that man can write such cat pages, though.
* configure.in (--enable-mandirs): Add BSD layout.
* manual/intro.me (Arguments to configure): Document
--enable-mandirs=BSD.
* README: Sync with manual/intro.me.
Tue Apr 22 19:38:03 BST 2003 Colin Watson <cjwatson@debian.org>
* libdb/COPYING.LIB: Remove (obsoleted in favour of
docs/COPYING.LIB).
* GNUmakefile.in (_docs, _libdb): Include COPYING.LIB from docs/
rather than libdb/.
Tue Apr 22 19:34:30 BST 2003 Colin Watson <cjwatson@debian.org>
* tools/mandb_[nt]fmt-script: Correct "# !" to "#! " on the shebang
line.
Tue Apr 15 18:16:30 BST 2003 Colin Watson <cjwatson@debian.org>
* src/Makefile.in (LFLAGS): Provide -8 and -B as separate arguments.
flex 2.5.31 is stricter about this.
* zsoelim/Makefile.in (LFLAGS): Likewise.
Sun Apr 13 14:36:29 BST 2003 Colin Watson <cjwatson@debian.org>
* src/encodings.c (directory_table): Add Hungarian -> ISO-8859-2.
Sun Apr 13 13:39:38 BST 2003 Colin Watson <cjwatson@debian.org>
* src/mandb.c (xcopy): Return 0 if the source file doesn't exist, so
that the caller can go on and silently create a non-existent
database rather than bailing out.
Sun Apr 13 12:49:33 BST 2003 Colin Watson <cjwatson@debian.org>
* src/mandb.c: Remove DO_CHOWN define and simply use SECURE_MAN_UID.
Thu Apr 10 23:51:43 BST 2003 Byrial Ole Jensen <byrial@image.dk>
* po/da.po: Update from Translation Project.
Mon Apr 7 09:12:27 BST 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (man): Call local_man_loop() straight away if name
contains a slash. Make the number of pages found an output
argument rather than the return value, so that we can include
local_man_loop()'s return behaviour.
(main): Update throughout for new man() signature. Don't call
local_man_loop() if man() returns an error, as man() now sorts
that out for itself.
* src/man.h (man): Update prototype.
Mon Apr 7 08:09:08 BST 2003 Colin Watson <cjwatson@debian.org>
* include/Defines.in: Generate dependencies in .depend rather than
the current directory. Suppress echoing of dependency generation
commands.
* libdb/Makefile.in: Remove .depend directory on distclean. Always
use dependencies (except on clean), not just when --enable-debug
was passed to configure.
* src/Makefile.in: Likewise. Set up $(DEFS_*) variables so that the
correct flags are used when generating dependencies.
* libdb/.cvsignore, src/.cvsignore: Ignore .depend.
* configure.in: Remove now-redundant --enable-debug option. Remove
search for libefence if --enable-debug is used; using it with
LD_PRELOAD is generally more convenient anyway.
* README, manual/intro.me (Arguments to configure): Remove
documentation for --enable-debug.
* docs/NEWS: Document the removal.
Mon Apr 7 01:02:27 BST 2003 Colin Watson <cjwatson@debian.org>
* man/ja_JP.eucJP/man1/man.man1: Replace "%date%" with the Japanese
"ima", meaning "now" or "the present time" (thanks, Liyang Hu).
Mon Apr 7 00:04:30 BST 2003 Colin Watson <cjwatson@debian.org>
* configure.in: Don't generate language-specific date variants for
man pages, as that requires all the relevant locales to be
installed on the build machine. Use the ISO 8601 date format
instead.
* include/Defines.in: Remove obsolete substitutions of date_it,
date_es, date_de, and date_fr.
* man/Makefile.in: Likewise.
* man/de_DE.88591/man1/*.man1, man/de_DE.88591/man5/*.man5,
man/de_DE.88591/man8/*.man8, man/es_ES.88591/man1/*.man1,
man/es_ES.88591/man5/*.man5, man/es_ES.88591/man8/*.man8,
man/it_IT.88591/man1/*.man1, man/it_IT.88591/man5/*.man5,
man/it_IT.88591/man8/*.man8 (.TH): Replace "%date_de%",
"%date_es%", and "%date_it%" substitutions by plain "%date%".
* man/man1/man.man1 (HISTORY): "%date%" -> "present day".
* man/it_IT.88591/man1/man.man1 (STORIA): Similarly, "%date_it%" ->
"presente" (present day).
Sun Apr 6 21:39:36 BST 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (main): Ignore LANGUAGE if a locale is explicitly
specified using the -L/--locale option.
Sun Apr 6 20:28:57 BST 2003 Colin Watson <cjwatson@debian.org>
Revamp locale encoding support. The old code made the incorrect
assumption that the source encoding of manual pages is dependent on
the locale.
If MULTIBYTE_GROFF is defined then man will assume that it is using
a version of groff with the multibyte patch applied, which supports
some additional locales.
* src/man.c (lang_table, determine_lang_table): Remove.
(lang_dir): Return "C" if there is no language directory element.
(make_roff_command): Find out the source encoding for the
requested man page and the default device for the current locale,
and use these to select a device more intelligently. Insert an
iconv pipe if the source encoding differs from the input *roff
encoding for the current device.
* src/encodings.c: New file. There are three tables replacing the
old lang_table: directory_table, charset_table, and device_table.
(get_source_encoding): New function, returning the assumed source
encoding for the current page from directory_table.
(get_default_device): New function, returning the default *roff
output device based on the current locale from charset_table.
(get_roff_encoding): New function, returning the input encoding
expected by *roff from device_table. This is always ISO-8859-1
unless MULTIBYTE_GROFF is defined (this is still a subject of some
debate, and will be UTF-8 for all devices in groff 2).
* src/encodings.h: Prototype new functions.
* src/Makefile.in (man): Add encodings.o.
* docs/NEWS: Document the above.
Sun Mar 30 23:14:47 BST 2003 Colin Watson <cjwatson@debian.org>
* man/man1/man.man1 (SYNOPSIS): Both -H and -T take optional
arguments. The fact that they're optional means that no space is
allowed between the option and its argument (thanks to Peter Muir
for that observation).
(OPTIONS): Likewise. Document the 'browser' argument to -H.
Correct a couple of hyphens to dashes.
Fri Mar 28 09:23:19 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (main): Protect ruid/euid debugging statement with
#ifdef SECURE_MAN_UID.
(commit_tmp_cat): Likewise for temporary cat ownership code.
* src/security.c (drop_effective_privs, regain_effective_privs):
priv_drop_count is only declared #ifdef SECURE_MAN_UID. Move the
corresponding directives so that these functions are no-ops if
that symbol isn't defined.
* docs/NEWS: Document this.
Wed Mar 26 15:04:00 GMT 2003 Colin Watson <cjwatson@debian.org>
* manual/format.me: Correct location of example external formatter
script.
Tue Mar 25 04:15:41 GMT 2003 Colin Watson <cjwatson@debian.org>
* configure.in: Use AC_MSG_NOTICE throughout rather than MAN_ECHO.
Move the definition of MAN_ECHO_VAR to just above its only uses.
Tue Mar 25 03:44:06 GMT 2003 Giuseppe Sacco <eppesuig@debian.org>
* po/it.po: Update.
Tue Mar 25 03:41:13 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/whatis.c (parse_name): Free lowdbname before returning.
Tue Mar 25 03:38:39 GMT 2003 Colin Watson <cjwatson@debian.org>
* lib/strappend.c, lib/xstrdup.c, lib/xstrndup.c: Remove unused
definitions of VOID.
Sun Mar 16 00:51:12 GMT 2003 Jeremy C. Reed <reed@reedmedia.net>
* configure.in (--enable-mandirs): Use 'mandirs' rather than
'mandir', as the latter clashes with an autoconf variable.
Wed Mar 12 13:17:45 GMT 2003 Colin Watson <cjwatson@debian.org>
* libdb/db_lookup.c (gripe_bad_multi_key): This function has been
unused since 24 June 2002 (noticed by Giuseppe Sacco). Remove.
* libdb/db_storage.h (gripe_bad_multi_key): Remove prototype.
Tue Mar 11 21:17:56 GMT 2003 Giuseppe Sacco <eppesuig@debian.org>
* po/it.po: Update.
Mon Mar 10 17:20:46 GMT 2003 Colin Watson <cjwatson@debian.org>
* libdb/db_btree.c, libdb/db_delete.c, libdb/db_gdbm.c,
libdb/db_lookup.c, libdb/db_ndbm.c, libdb/db_storage.h,
libdb/db_store.c, libdb/db_ver.c: Style cleanup (as with src/* on
28 May 2001). No functional changes.
Mon Mar 10 15:55:34 GMT 2003 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in (EVERYTHING, ALL): Move intl ahead of libdb. (Not
'make -j'-clean, though ...)
* libdb/Makefile.in: Use '$(top_srcdir)' rather than '..'
throughout. Add $(top_srcdir)/intl to the include path if USE_NLS
is set.
Mon Mar 10 15:24:04 GMT 2003 Colin Watson <cjwatson@debian.org>
* configure.in (AC_CONFIG_HEADER): Generate config.h rather than
include/config.h. intl/Makefile.in is insistent on config.h being
in the top-level directory.
* GNUmakefile.in, manual/comp.me: Replace 'include/config.h' with
'config.h' throughout.
* .cvsignore, include/.cvsignore: Update for new config.h and
config.h.in locations.
Mon Mar 10 15:00:32 GMT 2003 Colin Watson <cjwatson@debian.org>
* lib/mkdtemp.c: Define __GT_DIR if necessary.
* lib/tempfile.c: Prototype mkstemp() and mkdtemp().
Mon Mar 10 14:46:39 GMT 2003 Colin Watson <cjwatson@debian.org>
* lib/tempname.c: Include "config.h" rather than <config.h>.
Mon Mar 3 22:00:03 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/mandb.c (xcopy): Remove silly calls to fclose() on null
pointers.
Sun Mar 2 20:37:08 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/mandb.c (xcopy): Save errno before performing operations that
might change it. Close ifp as well if an error occurs while
opening ofp.
Fri Feb 28 01:50:21 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (find_in_path): path needs to be preserved in order to
be freed safely, or else we segfault. Use a temporary variable for
strsep() instead.
Mon Feb 24 17:05:25 GMT 2003 Colin Watson <cjwatson@debian.org>
* man/man1/man.man1 (OPTIONS): Only use the \[shc] character if it's
available, which is the case on groff's latin1 and utf8 devices
but not on others. Otherwise, use \(hy.
Mon Feb 24 00:17:39 GMT 2003 Colin Watson <cjwatson@debian.org>
* docs/manpage.example (OPTIONS): Move the note about '\-' versus
'-' from a comment into displayed text.
Sun Feb 23 00:34:12 GMT 2003 Alexandre Folle de Menezes <afmenez@terra.com.br>
* po/pt_BR.po: Update from Translation Project.
Sat Feb 22 18:32:58 GMT 2003 Colin Watson <cjwatson@debian.org>
* acinclude.m4 (MAN_CHECK_BDB): Remove some extra calls to
AC_MSG_RESULT, since AC_CACHE_CHECK already calls that.
Sat Feb 22 18:10:14 GMT 2003 Morten Brix Pedersen <morten@wtf.dk>
* po/da.po: Translate a few more strings.
Sat Feb 22 18:06:09 GMT 2003 Alexandre Folle de Menezes <afmenez@terra.com.br>
* po/pt_BR.po: Update from Translation Project.
Sat Feb 22 17:50:55 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/Makefile.in: Fix typo ("developement" -> "development").
* src/manp.c (add_to_dirlist): Fix typo ("mach" -> "match").
Sat Feb 22 17:41:07 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/manp.c (read_config_file): If user_config_file is non-NULL,
use it instead of ~/.manpath. Programs can now set the user
configuration file to be used.
* src/catman.c, src/mandb.c, src/manpath.c, src/whatis.c
(long_options): Add -C/--config-file option.
(usage): Document it.
(main): Handle it.
* src/man.c (long_options): Add -C/--config-file option.
(usage): Document it, along with adding -i and -I to the synopsis.
(man_getopt): Handle it.
* man/man1/apropos.man1, man/man1/man.man1, man/man1/manpath.man1,
man/man1/whatis.man1, man/man8/catman.man8, man/man8/mandb.man8
(SYNOPSIS): Add -C.
(OPTIONS): Describe -C/--config-file.
* docs/NEWS: Document this addition.
Fri Feb 21 18:32:21 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/Makefile.in (man): lexgrog.o is no longer needed. Removing it
takes 24K off the size of a stripped man binary on Linux/i386.
Fri Feb 21 18:12:45 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/mandb.c (xcopy): Improve error handling.
(mandb): Since xcopy() now returns int, handle its return value.
Fri Feb 21 16:40:26 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (find_in_path): New function to look for executables on
the $PATH.
(gripe_no_man): Only emit the "undocumented" message if a
corresponding executable is found on the $PATH.
* docs/NEWS: Document this.
Fri Feb 21 16:26:00 GMT 2003 Colin Watson <cjwatson@debian.org>
* docs/NEWS: Preliminary entries for 2.4.2.
Fri Feb 21 15:49:08 GMT 2003 Colin Watson <cjwatson@debian.org>
* zsoelim/zsoelim.l: Internationalize usage and error messages.
Fri Feb 21 15:46:04 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (gripe_bogus_manpage, make_filename,
filename_info): Move to ...
* src/filenames.c: ... here.
* src/check_mandirs.h: Move corresponding prototypes to ...
* src/filenames.h: ... here.
* src/check_mandirs.c (purge_pointers): New function to purge any
entries whose pointers refer to a given name.
* src/check_mandirs.h (purge_pointers): Add prototype.
* src/mandb.c (long_options): Add -f/--filename option.
(usage): Document it, along with -t/--test.
(update_one_file): New function to update a single file in an
existing database.
(update_db_wrapper): Call update_one_file() if using --filename.
(main): Handle --filename option. If using --filename, only call
mandb() if the manpath prefix matches.
* man/man8/mandb.man8 (SYNOPSIS): Improve *roff style and document
-p. Add separate call summary for when -f is used.
(OPTIONS): Document -f.
* lib/hashtable.c (hash_remove): New function to remove an entry
from a hash table.
* lib/hashtable.h (hash_remove): Add prototype.
* libdb/db_store.c (replace_if_necessary): Replace entries with ids
other than ULT_MAN too, so that their timestamps can be updated.
Add more debugging output.
* src/man.c (need_to_rerun): Remove.
(display_database): Remove code to check whether pages found in
databases are up to date. This is done elsewhere now.
(run_mandb): New function, used instead of updating databases
directly.
(main): Call run_mandb() instead of need_to_rerun().
(maybe_update_file): New function to check whether a page found in
a database is up to date. If not, use run_mandb() to recache it.
(try_db): Use run_mandb() rather than create_db(). Use #defines
for special return values rather than magic numbers. Check whether
pages are up to date as they're found.
(locate_page): If try_db() returns TRY_DATABASE_UPDATED (i.e.
mandb was called to update some pages), call it again.
(display_pages): Use a switch with named candidate types instead
of an if.
* src/Makefile.in (DEFS_man.o): Add definition for MANDB.
(man): Database code is no longer needed. Add filenames.o.
(mandb): Add filenames.o.
Mon Feb 17 23:28:55 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/manpath.c: Remove unused prototypes.
Tue Jan 21 01:42:16 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/mandb.c (xcopy, main): Minor whitespace cleanups.
* src/ult_src.c: Fix typo (loosing -> losing).
Mon Jan 6 03:25:16 GMT 2003 Colin Watson <cjwatson@debian.org>
* src/man.c (display_pages): Drop privileges if candp->path is a
user manpath. Inner code generally dropped privileges anyway,
certainly when running external commands, but the absence of this
drop meant that pages in non-world-readable user manpaths could
not be read.
Mon Jan 6 03:19:57 GMT 2003 Colin Watson <cjwatson@debian.org>
* lib/error.c (error): Print a backtrace if the BACKTRACE_ON_ERROR
symbol is defined. This undoubtedly isn't portable and is not
intended for production use; it's just a last-resort way to get a
backtrace when the usual methods fail, chiefly when running
setuid.
Tue Dec 31 04:39:03 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (man): If update is set, need_to_rerun() will always
have been called already by now. Remove this redundant code.
Tue Dec 31 04:26:50 GMT 2002 Colin Watson <cjwatson@debian.org>
* man/man1/apropos.man1, man/man1/lexgrog.man1,
man/man1/manpath.man1, man/man1/whatis.man1,
man/man1/zsoelim.man1: --version no longer displays author
information.
Sun Dec 29 19:57:55 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c, src/check_mandirs.h: Move page_description
interface functions to ...
* src/descriptions.c, src/descriptions.h: ... here (new files).
* src/Makefile.in (man, mandb): Link descriptions.o.
* libdb/db_storage.h: Include libdb/mydbm.h for the datum type.
Sun Dec 29 19:51:11 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: Add commas between short and long options in usage
output.
* src/accessdb.c (main): Support -h/--help and -v/--version options.
(usage): Document them. Move MAN_DB outside translatable string.
* man/man8/accessdb.man8 (SYNOPSIS, OPTIONS): Document new options.
(AUTHOR): Add myself.
* src/globbing.c (long_options, args, main): Support -h/--help and
-v/--version options.
(usage): New function.
* zsoelim/zsoelim.l: Support long option forms of -C (--compatible),
-h (--help), and -V (--verbose).
* man/man1/zsoelim.man1: Document long options.
* src/Makefile.in: Link $(TOOLS) as well as $(PROGS) with version.o.
Sun Dec 29 19:40:46 GMT 2002 Colin Watson <cjwatson@debian.org>
Patch partly by Werner Fink <werner@suse.de>.
* src/whatis.c (args, long_options): Add -v/--verbose option.
(usage): Document it.
(get_whatis): Print pointer loop warnings only if --verbose.
(main): Handle --verbose option.
* man/man1/apropos.man1 (OPTIONS): Document --verbose.
* man/man1/whatis.man1 (OPTIONS): Likewise.
Sun Dec 22 23:30:12 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (test_manfile): Initialize the mandata struct
on the stack to zero.
(count_glob_matches): Likewise.
* src/straycats.c (check_for_stray): Likewise.
* src/man.c (try_section): Use infoalloc() (which initializes the
mandata struct to zero) rather than malloc(). This had caused
several uses of uninitialized memory (Debian bug #168584).
* src/check_mandirs (purge_whatis): Compare info->pointer against
"-", not just its first character.
Sun Dec 22 19:29:38 GMT 2002 Colin Watson <cjwatson@debian.org>
* Version: 2.4.1.
* docs/NEWS, man-db.gnu, man-db.lsm: Update.
Sun Dec 22 18:19:09 GMT 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_btree.c (btree_findkey): Cast key.dsize to int when using
it as an fprintf() field width.
Sun Dec 22 18:15:51 GMT 2002 Colin Watson <cjwatson@debian.org>
Patch inspired by part of SuSE's diff, although not identical.
* GNUmakefile.in: Export DESTDIR.
* man/Makefile.in, src/Makefile.in, zsoelim/Makefile.in: Honour
DESTDIR when installing and uninstalling files.
Sun Dec 22 14:14:37 GMT 2002 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in (dist): Don't update .po files automatically, since
they're kept under revision control.
Sun Dec 22 13:59:23 GMT 2002 Colin Watson <cjwatson@debian.org>
* po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po,
po/it.po, po/ja.po, po/pt_BR.po, po/sv.po: Update with msgmerge.
Sun Dec 22 13:44:20 GMT 2002 Alexandre Folle de Menezes <afmenez@terra.com.br>
* po/pt_BR.po: Update from Translation Project.
Sat Dec 21 13:30:43 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (count_glob_matches): Exclude file names which
fail stat(), such as dangling symlinks.
Sat Dec 21 03:01:34 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (count_glob_matches): New function,
sanity-checking results from look_for_file(). This should probably
be done in look_for_file() itself eventually, but that requires
more widespread changes.
(purge_normal, purge_whatis): Use it.
* src/check_mandirs.c (gripe_bogus_manpage, gripe_rwopen_failed,
filename_info, purge_normal, purge_whatis): Constify arguments.
* src/check_mandirs.h (filename_info): Update prototype.
* docs/NEWS: Document --enable-mandirs guesswork.
* src/.cvsignore: Add the globbing test executable.
Fri Dec 20 15:38:48 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/globbing.c (main): Make the test program compile again, and
add full argument parsing.
* src/Makefile.in (globbing): Link with util.o.
Fri Dec 20 15:34:51 GMT 2002 Colin Watson <cjwatson@debian.org>
* configure.in: Guess the --enable-mandirs setting where possible if
it isn't specified explicitly.
Fri Dec 20 02:28:15 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (purge_missing): Match database entries
against real filenames using the name field where available, not
the lowercased field.
Fri Dec 20 02:15:21 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/mandb.c (mandb): If force_rescan is set, delete the database
and recreate it from scratch.
* src/check_mandirs.c (testmandirs): force_rescan is handled
elsewhere now.
(purge_normal, purge_whatis): Remove inline qualifier.
(check_multi_key): New function to check for broken multi keys
such as those generated by 2.4.0.
(purge_missing): Call check_multi_key() where necessary.
* src/lexgrog.l (find_name): Revert change of 27 November 2002, as
calling ult_src() inside find_name() breaks mandb (which already
calls ult_src() itself). Instead:
(main): Do the ult_src() resolution here for each element of argv.
* src/ult_src.c (ult_src): 'name' argument is const.
* src/lexgrog.l (find_name): 'file' argument is const.
* include/manconfig.h.in, src/ult_src.h: Update prototypes.
Mon Dec 16 05:28:34 GMT 2002 Colin Watson <cjwatson@debian.org>
From SuSE's diff:
* lib/error.c: Add 'extern' to prototypes.
* lib/strappend.c, lib/xstrdup.c, lib/xstrndup.c: #include
"manconfig.h" rather than using an explicit prototype.
* lib/xstrdup.c (xstrdup): 'string' should be const.
* po/cs.po: Fix a format string.
* src/lexgrog.l: Add Japanese translation of NAME.
* src/man.c: 'wd', 'cwd', and local_man_loop() are static.
Mon Dec 16 04:30:39 GMT 2002 Colin Watson <cjwatson@debian.org>
* configure.in: 'test "$foo"' => 'test -n "$foo"' throughout. Taken
from SuSE's diff.
Wed Dec 4 21:02:48 GMT 2002 Colin Watson <cjwatson@debian.org>
* man/man1/lexgrog.man1: Replace `, ', and - (for literal dash
rather than hyphen) with \(oq, \(cq, and \- respectively.
(NOTES): lexgrog attempts to handle .so requests now.
Tue Dec 3 01:39:54 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (main): Only set multiple_locale if it's going to be
used. Look at multiple_locale rather than internal_locale when
performing special $LANGUAGE handling.
Mon Dec 2 14:08:08 GMT 2002 Michael Piefel <piefel@informatik.hu-berlin.de>
* po/de.po: Fix a missing newline.
Mon Dec 2 13:58:55 GMT 2002 Michael Piefel <piefel@informatik.hu-berlin.de>
* po/de.po: Update from Translation Project.
Fri Nov 29 15:40:21 GMT 2002 Jordi Mallach <jordi@sindominio.net>
* po/ca.po: Update from Translation Project.
Wed Nov 27 20:27:59 GMT 2002 Christian Rose <menthos@menthos.com>
* po/sv.po: Update from Translation Project.
Wed Nov 27 02:43:03 GMT 2002 Colin Watson <cjwatson@debian.org>
* Version: 2.4.1-pre1 (for translators).
* docs/NEWS: Update.
Wed Nov 27 02:29:42 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l (find_name): Call ult_src() to resolve .so links.
* src/Makefile.in: Link ult_src.o into lexgrog.
Wed Nov 27 01:49:18 GMT 2002 Colin Watson <cjwatson@debian.org>
* release.sh: Don't pass --copy to autogen.sh, as it's a no-op now.
* po/.cvsignore, tools/.cvsignore: More ignored files.
Wed Nov 27 01:46:27 GMT 2002 Colin Watson <cjwatson@debian.org>
* tools/mkinstalldirs: Remove. It's more trouble than it's worth to
store something in CVS that autopoint thinks it controls.
Wed Nov 27 01:25:52 GMT 2002 Colin Watson <cjwatson@debian.org>
* po/da.po: Correct some minor typographical mistakes (mostly
missing spaces or newlines at the end of one piece of a string
concatenation).
* po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po,
po/it.po, po/ja.po, po/pt_BR.po, po/sv.po: Update with msgmerge.
Wed Nov 27 00:51:47 GMT 2002 Colin Watson <cjwatson@debian.org>
* man/man1/apropos.man1, man/man1/lexgrog.man1, man/man1/man.man1,
man/man1/manpath.man1, man/man1/whatis.man1,
man/man1/zsoelim.man1, man/man5/manpath.man5,
man/man8/accessdb.man8, man/man8/catman.man8, man/man8/mandb.man8:
Add a .pc request so that the % characters we use for
substitutions don't get translated into page numbers when
formatting the unsubstituted pages.
Wed Nov 27 00:37:29 GMT 2002 Colin Watson <cjwatson@debian.org>
* man/man1/lexgrog.man1 (WHATIS PARSING): Add an example of how NAME
sections should be written in mdoc.
Tue Nov 26 22:57:27 GMT 2002 Colin Watson <cjwatson@debian.org>
* .cvsignore: Ignore the m4 directory, created by autopoint.
* GNUmakefile.in (_subdirs, _m4): Add m4/*.m4 to the distribution.
(_root): There are no *.h files left in the top-level directory.
(nls_man): de_DE.ascii is gone.
(dist): Use 'cp -p' rather than 'ln', since ln notes that making a
hard link to a symbolic link is not portable.
Tue Nov 26 03:43:15 GMT 2002 Colin Watson <cjwatson@debian.org>
* po/pt_BR.po: New from Translation Project.
* po/LINGUAS: Add pt_BR.
Fri Nov 22 22:06:01 GMT 2002 Morten Brix Pedersen <morten@wtf.dk>
* po/da.po: Further updates.
Sat Nov 16 12:54:29 GMT 2002 Colin Watson <cjwatson@debian.org>
* docs/manpage.example: Clarify that dashes in options should be
written using '\-', not '-'.
Thu Nov 14 23:29:14 GMT 2002 Morten Brix Pedersen <morten@wtf.dk>
* po/da.po: Update.
Thu Nov 14 23:26:58 GMT 2002 Colin Watson <cjwatson@debian.org>
* configure.in: Implement --enable-undoc=COMMAND.
* src/man.c (gripe_no_man): If --enable-undoc=COMMAND was set, print
an additional message referring users to COMMAND. This is mostly
here to support Debian's undocumented(7) page in a nicer way, but
perhaps others will find it useful too.
Thu Nov 14 04:21:09 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/Makefile.in: Use @LIBINTL@ rather than @INTLLIBS@. The latter
is deprecated.
Thu Nov 14 04:17:49 GMT 2002 Colin Watson <cjwatson@debian.org>
* po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po,
po/it.po, po/ja.po, po/sv.po: Update with msgmerge.
Thu Nov 14 04:10:44 GMT 2002 Colin Watson <cjwatson@debian.org>
* acinclude.m4, configure.in: Include documentation in all calls to
AC_DEFINE and AC_DEFINE_UNQUOTED. Look for acinclude.m4 in
AC_CONFIG_SRCDIR rather than acconfig.h.
* acconfig.h: Remove; the above makes it unnecessary.
* GNUmakefile.in: Remove acconfig.h from stamp-h.in's dependencies.
* autogen.sh: Run autopoint, not gettextize. autogen.sh no longer
takes an optional --copy argument.
Thu Nov 14 04:06:41 GMT 2002 Colin Watson <cjwatson@debian.org>
* po/.cvsignore: Add messages.mo and remove-potcdate.sed.
* po/it.po: Add missing '=' in charset.
Thu Nov 14 03:53:22 GMT 2002 Colin Watson <cjwatson@debian.org>
* po/cs.po: Fix an incorrect C format string.
* po/da.po: Fix some out-of-sync C format strings and default PO
file headers. I've contacted the translator about these.
Thu Nov 14 01:57:42 GMT 2002 Colin Watson <cjwatson@debian.org>
* man-db.gnu, man-db.lsm: Document the switch from SourceForge to
Savannah.
Mon Nov 11 01:50:28 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (man): Update the count of found pages with the return
value of display_pages(). This should fix the situation where man
finds a matching entry in the database, discovers that it's
actually a dangling symlink, but fails to print an error message
to say that no page was found.
Mon Nov 11 00:47:38 GMT 2002 Colin Watson <cjwatson@debian.org>
* man/man1/man.man1 (OPTIONS): Change \[char173] to \[shc]. The
former doesn't appear to display as anything useful these days.
* man/es_ES.88591/man1/man.man1, man/it_IT.88591/man1/man.man1,
man/ja_JP.eucJP/man1/man.man1: Likewise.
Thu Nov 7 02:18:44 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (display): Don't do access() checks on an empty man_file
in the display_to_stdout branch, to avoid problems when running
'man -X -l -'. Similar code is already in the other branch. Patch
from Peter Muir <iyhi@yahoo.com>.
Thu Nov 7 01:42:52 GMT 2002 Colin Watson <cjwatson@debian.org>
* docs/NEWS: Further updates for 2.4.1.
* docs/ToDo: I think the new-style database is OK now.
Thu Nov 7 01:32:29 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/globbing.c (match_in_directory): Don't use FNM_NOESCAPE flag
to fnmatch().
(look_for_file): Escape paths and names before passing them to
match_in_directory().
* src/globbing.h: Update variable names in prototype.
Wed Oct 23 02:12:43 BST 2002 Colin Watson <cjwatson@debian.org>
* tools/README: Remove reference to install-manpage.
Wed Oct 23 02:10:15 BST 2002 Colin Watson <cjwatson@debian.org>
* tools/install-manpage: Remove. It doesn't work at all as far as I
can see, and at least as far as Debian is concerned dh_installman
does a better job.
* GNUmakefile.in: Remove reference to install-manpage.
Wed Oct 23 02:03:18 BST 2002 Colin Watson <cjwatson@debian.org>
Apply proper copyright and licence notices to all source files.
There are no functional changes here, either to the code or to the
applicable licences, merely clarifications.
* docs/COPYING.LIB: New file, containing version 2.1 of the GNU
LGPL.
Wed Oct 23 01:56:38 BST 2002 Colin Watson <cjwatson@debian.org>
* tools/install-sh: Update to the version in automake 1.4-p4, which
includes a full (MIT) licence notice.
Sat Oct 12 20:16:48 BST 2002 Colin Watson <cjwatson@debian.org>
A much-needed complete rewrite of splitline(). The previous version
was extremely difficult to debug (see http://bugs.debian.org/123130)
and got info->pointer and info->whatis wrong quite frequently. This
version is much simpler and I hope more correct.
* src/util.c (trim_spaces): New function.
* include/manconfig.h.in: Prototype trim_spaces().
* src/check_mandirs.c (gripe_bad_store): New function.
(splitline): Remove.
(parse_descriptions, store_descriptions, free_descriptions): New
functions, implementing the whatis parsing that used to be in
splitline() and test_manfile().
(test_manfile): Reduce the complicated loop over splitline() to
calls to the above three functions. Adjust the parsing failure
case to require less deeply nested indentation.
* src/check_mandirs.h: New page_description struct, used to
implement the above. Prototype new functions.
* src/straycats.c: Use the new page_description-based interface.
Wed Sep 25 00:39:16 BST 2002 Colin Watson <cjwatson@debian.org>
* man/man1/man.man1 (DESCRIPTION): Clarify the purpose of section 7
as "Miscellaneous".
Tue Sep 24 00:22:36 BST 2002 Colin Watson <cjwatson@debian.org>
* lib/strnlen.c: Don't try to define a weak alias. We aren't libc.
Mon Sep 16 21:14:26 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/mydbm.h: datum.dsize must be size_t, not int.
Mon Sep 16 01:07:16 BST 2002 Colin Watson <cjwatson@debian.org>
* src/compression.c (decompress): If the decompressor fails, print
an error message and return NULL rather than exit()ing
immediately. This allows callers to behave more intelligently.
* src/lexgrog.l (find_name): Cope with decompress() returning NULL.
* src/man.c (local_man_loop): Likewise.
* src/ult_src.c (ult_src): Likewise.
Mon Sep 16 00:25:17 BST 2002 Clint Adams <schizo@debian.org>
* configure.in: Detect bzip2.
* include/comp_src.h.in (comp_list): Include bunzip2 support if
available.
* include/manconfig.h.in: Add BUNZIP2 definition.
Sun Sep 15 23:53:28 BST 2002 Colin Watson <cjwatson@debian.org>
Upgrade to gettext 0.11.5.
* configure.in: Remove ALL_LINGUAS. Add AM_GNU_GETTEXT_VERSION.
* po/LINGUAS: New file. Adds sv to the value of the old ALL_LINGUAS.
* po/Makevars: New file.
* po/POTFILES.in: Add src/fakesecurity.c. Change src/lexgrog.c to
src/lexgrog.l.
* tools/mkinstalldirs: Upgrade to current version.
Fri Sep 6 23:58:10 BST 2002 Colin Watson <cjwatson@debian.org>
* src/mandb.c (xcopy): Don't print the error from fopen() if it's
just ENOENT.
Tue Sep 3 21:53:56 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_lookup.c (list_extensions): Prevent a theoretical buffer
overflow by allocating names and ext as necessary rather than
using a fixed-length array.
(dblookup): Update callers.
* libdb/db_delete.c (dbdelete): Likewise.
* libdb/db_storage.h: Update prototypes. ENTRIES definition is now
redundant.
Tue Sep 3 20:26:22 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_delete.c (dbdelete): Construct new multi_content
correctly (names as well as extensions) when deleting some of its
elements.
Fri Aug 30 03:11:42 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (make_roff_command): Restore the fix from 13 July 2001
that got lost while implementing -E. We need to look up the
correct character set each time a page is displayed, but still
honour any device explicitly set by -E, so test different_encoding
rather than roff_device.
Thu Aug 29 01:14:19 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (setenv_less): Export the value of $MAN_PN for the
benefit of other pagers (suggestion from Jeff Sheinberg).
Thu Aug 29 00:50:54 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c: dbfilters is no longer a global variable.
(get_preprocessors, make_roff_command, display): Take an extra
dbfilters argument.
(local_man_loop, make_roff_command, display, display_filesystem):
Adjust callers.
(display_database): Likewise. Pass in->filter as the dbfilters
argument to display() rather than setting it globally (and
forgetting to set it back to NULL later).
* src/man.h: Update prototypes.
Sat Aug 17 21:53:38 BST 2002 Colin Watson <cjwatson@debian.org>
* src/straycats.c (check_for_stray): Initialize info.name and
info.filter. Remove unhelpful __inline__.
Tue Aug 13 18:25:13 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (usage): Document new option -W, --where-cat,
--location-cat.
(man_getopt): Accept -W.
(display): -w now just prints man_file, while -W prints cat_file.
If both are given, the two filenames are printed separated by a
space, as -w used to do.
* man/man1/man.man1, docs/NEWS: Document this.
Sat Aug 10 13:19:34 BST 2002 Colin Watson <cjwatson@debian.org>
* docs/NEWS: Preliminary entries for 2.4.1.
Sat Aug 10 13:15:49 BST 2002 Colin Watson <cjwatson@debian.org>
* lib/hashtable.c (plain_hash_free, hash_install, hash_free): Remove
the type argument and nlist element. All current users can just
use separate hashtables instead.
* lib/hashtable.h: Update prototypes and nlist declaration.
* libdb/db_btree.c: Don't pass dummy type argument to
hash_install().
* src/check_mandirs.c, src/man.c: Include "lib/hashtable.h" rather
than "hashtable.h".
* src/check_mandirs.c (test_manfile): Use hashtable functions on the
new static whatis_hash directly rather than the old functions
which implicitly operated on the global man_hash.
(testmandirs): Since we use full paths as hash keys, there's no
need to clear whatis_hash between hierarchies.
* src/man.c (db_hash_free): New function.
(main, try_db): Use hashtable functions on the new static db_hash
directly rather than the old functions which implicitly operated
on the global man_hash.
(try_db, man): Don't clear hashtables before creating a new
database. This used to segfault in some circumstances.
* src/hashtable.c, src/hashtable.h: Remove.
* src/Makefile.in: Remove mentions of hashtable.o.
Thu Aug 8 02:05:34 BST 2002 Colin Watson <cjwatson@debian.org>
* po/sv.po: New from Translation Project.
Mon Jul 22 01:20:28 BST 2002 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (splitline): Check for pointer underflow when
trimming leading spaces.
Mon Jul 22 01:18:18 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_ver.c: Include <string.h> for strcmp().
Wed Jul 17 20:30:30 BST 2002 Colin Watson <cjwatson@debian.org>
* src/wrapper.c: Include <locale.h> even under --disable-nls.
Mon Jul 15 14:18:56 BST 2002 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: Allow EOF to terminate MAN_NAME cleanly.
Thu Jul 11 20:45:36 BST 2002 Colin Watson <cjwatson@debian.org>
* manual/man_db.me: Version 0.7. Remove version number from \*M
string. Set a default page width of 78 ens for nroff output. Add
myself as an author.
* manual/intro.me (man-db): Mention lexgrog.
(The format of manual pages): Ted and Werner now maintain groff.
* manual/sec.me (Specifying a section): Extensions don't have to be
listed unless a special ordering is desired.
* manual/files.me (Other OS's manual pages): --systems, not
--system.
(NLS manual pages): Likewise. Update Daniel Quinlan's e-mail
address. Correct "/usr/man/man" to "/usr/man" in example manpath
output.
(Displaying latin1 characters on a Linux virtual terminal): Set
sample script in a constant-width font.
(Local cat page directory caches): Modification times are now
compared for equality rather than for the cat file being more
recent.
* manual/format.me (GROFF): tools/nroff-script is no longer
provided.
(Pre-format processors (pre-processors)): Mention the lexgrog scan
for preprocessor hints.
* manual/db.me (Contents of an index database): Clarify where the
true case of a name is stored.
(Accessdb): accessdb is compiled by default now.
* manual/misc.me (NLS message catalogues): Point to the Translation
Project.
* manual/*.me: Minor wording improvements. Apply better *roff style
(newline at each sentence break).
* man/THANKS: Update Jordi Mallach's e-mail address.
Sun Jul 7 22:19:41 BST 2002 Colin Watson <cjwatson@debian.org>
* tools/config.guess: Update to 2002-05-29.
* tools/config.sub: Update to 2002-06-21.
* tools/README: Describe config.guess and config.sub.
* tools/nroff-script: Remove. groff has had this since 1992, and its
version is considerably more up-to-date.
* GNUmakefile.in, tools/README: Remove references to nroff-script.
* zsoelim/zsoelim.l: -Wall cleanup. Set the nounput option, since we
don't need yyunput().
(open_file): Make sure the compiler knows that compfile and comp
are always initialized.
Sat Jul 6 21:30:07 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (get_roff_line_length): Widen to match groff 1.18's
defaults.
(add_roff_line_length, make_roff_command): Simplify by using en
units rather than inches.
* src/man.c (main): Slight improvement in the error message for a
missing page. If the name doesn't begin with a digit, never use
gripe_no_name(): having the 'n' section shouldn't mean that 'man
nonexistent' says "What manual page do you want from section
nonexistent?".
* src/man.c (try_section): Check for ult_src() returning NULL.
Wed Jul 3 23:46:31 BST 2002 Colin Watson <cjwatson@debian.org>
* src/manp.c (add_system_manpath): Make sure the loop that scans for
per-system manpaths always makes progress.
Wed Jul 3 23:14:42 BST 2002 David Martinez Moreno <ender@debian.org>
* man/THANKS: Update e-mail address.
* po/es.po: Update.
Sat Jun 29 14:58:08 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (main): If a section is given but the lookup fails,
check to see if the section is actually a page name. This allows
man page names that begin with a digit to work much more sanely.
(is_section): If a single-character entry in section_list is a
prefix of the requested section name, return successfully. This
means that e.g. '3tcl' is treated as a valid section even if only
'3' is in section_list.
* src/man.c (is_section), src/man.h (is_section): Constify argument
and return type.
* src/globbing.c (match_in_directory, look_for_file): Reduce
debugging chatter.
Wed Jun 26 20:07:56 BST 2002 Colin Watson <cjwatson@debian.org>
* src/whatis.c (get_whatis): "(unknown)" => "(unknown subject)",
mainly so that translators know the number and gender.
Wed Jun 26 19:49:49 BST 2002 Colin Watson <cjwatson@debian.org>
* src/catman.c (usage), src/man.c (usage), src/mandb.c (usage),
src/manpath.c (usage): Make --help output more consistent.
* src/whatis.c (usage): Likewise. "alternate systems" => "alternate
systems'".
Wed Jun 26 14:47:01 UTC 2002 Colin Watson <cjwatson@debian.org>
* Version: 2.4.0.
* README: Update or remove references to "man-db-2.3" and similar.
* man-db.gnu: Update and sync with GNU.
* man-db.lsm: Update.
* manual/man_db.me: Replace "2.3.x" with "2.4.x".
* po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po,
po/it.po, po/ja.po: Update with msgmerge.
Wed Jun 26 14:09:25 BST 2002 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l (name_sec): Allow whitespace before any closing
double quote. (rman(1) uses '.SH "NAME "'.)
Tue Jun 25 00:29:22 BST 2002 Colin Watson <cjwatson@debian.org>
* docs/NEWS: Translation credits are in man/THANKS.
* man/THANKS: Update.
* manual/.cvsignore: New file.
Mon Jun 24 02:53:00 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_store.c (dbstore): Use \t instead of . to separate
case-variant-names and extensions in multi keys.
* libdb/db_lookup.c (list_extensions): Take an extra 'names' array
argument, and split alternately into that and 'ext'.
(dblookup): Update and simplify accordingly; we don't need the
awkward '.' handling any more.
* libdb/db_delete.c (dbdelete): Likewise.
* libdb/db_storage.h (list_extensions): Update prototype.
* include/manconfig.h.in: Database format version 2.4.1.
* manual/db.me (Contents of an index database): Document
case-insensitive name storage format. Bring the documentation of
the database entry format up to date.
* manual/sec.me (Specifying a section): Mention the SECTION
configuration directive.
Fri Jun 21 10:50:40 UTC 2002 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (make_filename): in->comp may be NULL.
* po/fr.po: Update from Translation Project.
Mon Jun 17 09:56:15 UTC 2002 Colin Watson <cjwatson@debian.org>
* configure.in (ALL_LINGUAS): Add ca.
* src/man.c: Update some comments.
* src/lexgrog.l: Treat \~ as a space. Treat \# as a comment. Treat
.ig as ending the whatis.
Thu Jun 13 18:16:46 BST 2002 Colin Watson <cjwatson@debian.org>
* po/ca.po: Some updates after review.
Wed Jun 12 18:29:18 BST 2002 Colin Watson <cjwatson@debian.org>
* docs/ToDo: Updates.
* po/ca.po: New from Translation Project.
Wed Jun 5 14:23:13 BST 2002 Colin Watson <cjwatson@debian.org>
* po/de.po: Update from Translation Project.
Tue Jun 4 13:15:09 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (compare_candidates): Return 0 when asked to compare two
candidates we can't distinguish, not -1. The latter broke
multilingual support.
Tue Jun 4 01:33:31 BST 2002 Colin Watson <cjwatson@debian.org>
* Version: 2.3.90 (for translators).
* docs/NEWS: More updates.
* po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po,
po/ja.po: Update with msgmerge.
Tue May 28 00:36:55 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_lookup.c (dblookup): Check the MATCH_CASE flag in the
case of a single entry as well as multiple entries.
Mon May 27 23:57:26 BST 2002 Colin Watson <cjwatson@debian.org>
* lib/hashtable.c, lib/hashtable.h: New files, containing the
generic parts of src/hashtable.{c,h}.
* lib/Makefile.in: Add hashtable.c.
* src/hashtable.c (hash, lookup, install): Remove. These functions
have been renamed and moved to lib/hashtable.c.
(free_defn): Rename to man_hash_free and update for new hashtable
API.
(free_hashtab): Update for new hashtable API.
* src/hashtable.h: Update prototypes.
* libdb/db_btree.c (btree_findkey): Check for entries we've seen
before in the current run. These indicate a corrupt database
containing a loop.
Thu May 23 01:50:53 BST 2002 Colin Watson <cjwatson@debian.org>
* lib/cleanup.h: #endif must not be followed by a token on the same
line.
Thu May 23 00:29:24 BST 2002 Colin Watson <cjwatson@debian.org>
* src/fake_security.c (get_man_owner): New fake function to match
the real one in src/security.c.
* src/manp.c (mkcatdirs): Chown newly created cat directories to the
MAN_OWNER when running as root.
* .cvsignore, intl/.cvsignore, po/.cvsignore: Ignore a few more
files.
* src/man_db.conf.in: Correct the heading.
Wed May 22 00:06:18 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_store.c (compare_ids): New function, replacing the
FAVOUR() macro. Without this, the last-but-one commit won't
compile ...
(replace_if_necessary): Use it.
* libdb/db_storage.h: Prototype it.
Mon May 20 03:07:24 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (setenv_less): New function to set up $LESS. This
honours the new environment variable $MANLESS, which overrides the
usual processing and is copied directly into $LESS.
(make_display_command): Use it.
* man/man1/man.man1 (OPTIONS): Mention $MANLESS alongside the
--prompt option.
(ENVIRONMENT): Document $MANLESS.
Mon May 20 02:16:43 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (compare_candidates): Compare id fields as a last
resort, so that, for example, real pages sort ahead of whatis-only
names.
(try_section): Set the id field based on the output of ult_src().
* src/man.c (man): When locating pages, don't stop when one is found
in a particular directory and -a wasn't given. That's now the job
of the display code.
Mon May 20 01:16:02 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_lookup.c (free_mandata_elements): New function, to be
used rather than freeing the addr field directly. This frees name
as well.
(free_mandata_struct): Use it.
* libdb/db_btree.c (dbstore, dblookup): Likewise.
* libdb/db_store.c (dbstore): Likewise.
* src/whatis.c (whatis): Likewise.
* libdb/db_storage.h: Prototype it.
* libdb/db_store.c (replace_if_necessary): Rename in and info to
newdata and olddata, which are more comprehensible. Don't check
that the name fields match here - the caller should do that.
(dbstore): Make sure in->name isn't set on entry, and instead set
it to the basename where necessary. Don't set the name field in
multi keys, which use the proper case.
* src/check_mandirs.c (filename_info): We don't need to examine the
case of base_name here.
Thu May 16 00:47:05 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_btree.c (btree_flopen): If O_CREAT isn't set, check
whether we're trying to open a zero-length database and, if so,
return immediately. This works around some pathological behaviour
in Berkeley DB.
Mon May 6 03:48:17 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_store.c (FAVOUR): Parenthesize macro arguments.
(dbstore): In situation (3), use the old lookup key for the name
of the corresponding multi key, not the basename (which may be in
the wrong case).
Sun May 5 17:49:21 BST 2002 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: Accept DOS line-ending conventions.
Sun May 5 15:38:34 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_delete.c (dbdelete): Don't scribble over the list
returned by list_extensions(). We need it shortly afterwards to
construct the new multi key.
Fri May 3 19:43:52 BST 2002 Colin Watson <cjwatson@debian.org>
* include/manconfig.h.in (LESS_OPTS): Add the -R flag, which helps
with displaying the ANSI colour escapes generated by groff 1.18.
Fri May 3 19:27:40 BST 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (add_roff_line_length): New function, adding -rLL and
-rLT to the groff command line (supported in groff >= 1.18).
(make_roff_command): Call add_roff_line_length(). The old code to
set .ll and .lt remains for compatibility purposes.
Wed May 1 02:16:11 BST 2002 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (testmandirs): Include the subdirectory name
in the "Updating index cache" message.
Wed May 1 02:05:02 BST 2002 Colin Watson <cjwatson@debian.org>
* libdb/db_store.c: Make sure the check for whether a replace is
necessary in situation (3) behaves as it did before the multi key
format changes.
* libdb/db_lookup.c (copy_if_set, dash_if_unset): Constify
arguments.
* libdb/db_storage.h: Likewise for prototypes.
* src/convert_name.c (gripe_converting_name): name should be const.
* src/manp.c (get_catpath): suffix should be const.
Wed May 1 00:14:20 BST 2002 Colin Watson <cjwatson@debian.org>
* src/globbing.c (match_in_directory): Close the directory after
reading through it.
Wed May 1 00:02:53 BST 2002 Colin Watson <cjwatson@debian.org>
Case-(in)sensitivity in database lookups should work properly now.
* libdb/db_lookup.c (gripe_bad_multi_key): New function.
(make_multi_key): Don't lowercase page any more - that happens
elsewhere.
(list_extensions): We now return names/extensions, not just
extensions.
(dblookup): Multi keys are now formed as "RealCase.1" rather than
just "1". Add a new MATCH_CASE flag which, if set, makes sure the
RealCase part matches. Otherwise the database lookup is
case-insensitive.
(dblookup_exact, dblookup_all): Pass through a match_case flag for
the above.
* libdb/db_delete.c (dbdelete): Cope with new multi key format.
* libdb/db_store.c (dbstore): Construct the multi key from the
original case of the name rather than the lowercased version. Add
the basename to the multi keys created here, as above.
* src/man.c (display_database): Pass match_case flag through to the
database lookup.
(try_db): Likewise.
* src/check_mandirs.c (test_manfile): Make sure lookups are
case-sensitive.
* src/straycats.c (check_for_stray): Likewise.
* src/whatis.c (get_whatis): Likewise.
(whatis): Use a case-insensitive lookup.
* libdb/db_storage.h (struct mandata): name is no longer const; it
should always be freeable if non-NULL. We no longer use "-" to
indicate it being the same as the requested name, except in the
database itself.
* libdb/db_lookup.c (copy_if_set, dash_if_unset): New functions.
(infoalloc): Zero the newly allocated structure.
(free_mandata_struct): Free name if it's set.
(dbprintf, split_content, make_content, dblookup): Cope with the
new convention for info->name.
* libdb/db_store.c (replace_if_necessary): Likewise.
* src/check_mandirs.c (filename_info): Likewise.
* src/man.c (compare_candidates, add_candidate, display_database):
Likewise.
* src/whatis.c (display): Likewise.
* libdb/db_storage.h: Update prototypes.
Mon Apr 29 00:13:58 BST 2002 Colin Watson <cjwatson@debian.org>
* src/whatis.c (display): Display page names in the correct case
using the new info->name field.
Mon Apr 29 00:00:38 BST 2002 Colin Watson <cjwatson@debian.org>
* src/whatis.c (use_grep): Put a space in the grep command before
the flags!
Sun Apr 28 23:50:22 BST 2002 Colin Watson <cjwatson@debian.org>
Pass through much of the code adding 'const' where appropriate. This
should help me avoid various memory management bugs.
Noteworthy changes from this:
* include/manconfig.h.in (struct compression): prog and ext
generally shouldn't be modified directly.
* libdb/db_lookup.c (make_content): dash really has to stay
constant, or the various things that point to it statically will
break other things badly.
* libdb/db_storage.h (struct mandata): The only pointers here that
should generally be modified directly are next and addr.
* libdb/db_store.c (dbstore): Remove debugging code left from
previous checkin.
* src/check_mandirs.c (splitline): Note that we're deliberately
modifying info->whatis here.
(filename_info): Modify to be more const-friendly.
* src/compression.c (comp_file): Add TODO for comp->file.
* src/man.c (find_cat_file): Drop unused sec argument, and update
callers.
* include/manconfig.h.in, libdb/db_storage.h, src/hashtable.h,
src/man.h, src/manp.h: Update prototypes for all of the above.
Fri Apr 26 01:59:46 BST 2002 Colin Watson <cjwatson@debian.org>
Add case-insensitivity support to the database.
* libdb/db_storage.h (struct mandata): Add 'name' element.
* libdb/db_lookup.c (dbprintf): Print name.
(split_content): Read name from start of data.
(make_content): Prepend name to each data element.
(name_to_key): New function, converting a name to lowercase for
use in database keys.
(make_multi_key): Use name_to_key().
(dblookup): Use name_to_key(). If info->name is "-", set it to the
requested key instead.
* libdb/db_delete.c (dbdelete): Use name_to_key().
* libdb/db_store.c (dbstore): Likewise.
* src/check_mandirs.c (make_filename): Use in->name if name is NULL.
(filename_info): Fill in info->name with either a new req_name
argument or the supplied base_name.
(test_manfile): Update calls to make_filename() and
filename_info().
* src/check_mandirs.h: Update prototype.
* src/man.c (struct candidate): Rename 'name' to 'req_name'.
(display_filesystem, display_database_check): Update accordingly.
(compare_candidates): Sort exact-case matches to the front.
(add_candidate): Update calls to compare_candidate() and
filename_info(). When comparing duplicates, check the name field
in the mandata rather than the requested name.
(try_section): The hack to get the name from info_buffer is no
longer required now that filename_info() fills that in.
(display_filesystem): Update calls to make_filename(). Use the
mandata name for the displayed title rather than the requested
name. Sanity-check in->name != "-".
* include/manconfig.h.in: Bump the database version to 2.4.0.
* lib/xstrndup.c: Prototype strnlen().
Mon Apr 22 00:00:08 BST 2002 Colin Watson <cjwatson@debian.org>
* src/globbing.c (match_in_directory): New function, implementing a
limited glob() with optional case-insensitivity.
(look_for_file): Use match_in_directory() rather than glob().
Accept new match_case argument.
* src/globbing.h: Update prototype.
* src/check_mandirs.c (purge_whatis, purge_missing): Update calls to
look_for_file().
* src/man.c (usage, man_getopt): Add --ignore-case and --match-case
arguments.
(try_section): Update calls to look_for_file().
(try_section, display_filesystem, display_database,
display_database_check, display_pages, man): Make sure to use the
candidate name rather than the requested name, so that
case-insensitive lookups work.
* man/man1/man.man1 (OPTIONS): Document --ignore-case and
--match-case.
* po/.cvsignore: Ignore man-db.pot rather than man_db.pot.
Thu Apr 18 11:15:11 BST 2002 Matej Vela <vela@debian.org>
* docs/manpage.example: Use .BR for links to other man pages.
Wed Apr 3 19:54:03 BST 2002 Colin Watson <cjwatson@debian.org>
* Rename package from man_db to man-db.
* docs/NEWS: Start updating for 2.4.0.
Wed Apr 3 18:44:04 BST 2002 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in (distclean): Remove autom4te.cache.
Wed Apr 3 18:40:19 BST 2002 Colin Watson <cjwatson@debian.org>
* .cvsignore: Add autom4te.cache.
* configure.in: Use AC_LIBOBJ rather than setting LIBOBJS directly.
(--enable-setuid): Use quadrigraphs to get [ and ].
(--with-config-file): New option.
* include/Defines.in (config_file): Honour --with-config-file
setting.
Fri Mar 29 21:08:37 GMT 2002 dann frazier <dannf@dannf.org>
* docs/manpage.example.sgml: Update copyright year.
Thu Mar 21 16:22:58 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/man.c (main): Save the value of $LESS at startup to
$MAN_ORIG_LESS, and use that saved value in preference to $LESS.
This lets recursive invocations of man give less the correct page
titles.
Wed Mar 20 09:37:11 GMT 2002 Eirik Fuller <eirik@hackrat.com>
* src/check_mandirs.c (splitline): Don't create a copy of base_name
as pointer_name.
(test_manfile): Be more careful about pointer reuse across calls
to splitline().
Mon Feb 11 13:01:07 GMT 2002 Michael Piefel <piefel@debian.org>
* po/de.po: Corrections and updates; convert to UTF-8.
* man/THANKS: Add credit (the contributor of the previous de.po is
unidentified).
Sun Jan 27 03:31:11 GMT 2002 Colin Watson <cjwatson@debian.org>
* configure.in (ALL_LINGUAS): Add da. Reorder alphabetically.
Sat Jan 12 17:55:12 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: Match a line at a time rather than a character at a
time after the end of the NAME section.
* src/check_mandirs.c (testmandirs): More --debug information.
* include/manconfig.h.in (LESS_OPTS): Prune duplicate -Pm option.
Set -PM too so it works even when $LESS contains -M.
* src/man.c (make_display_command): Substitute prompt_string into
LESS_OPTS twice to accommodate the above.
Mon Jan 7 16:16:02 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: Another {blank_eol} fix, thanks to Peter Clay.
Sun Jan 6 19:05:46 GMT 2002 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: Use {blank_eol}, not [blank_eol]. The latter
matches in entirely inappropriate places.
Sun Dec 23 06:17:47 GMT 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (long_options, usage, man_getopt): Add a new
-E/--encoding option. It behaves a little like -T, except that it
uses nroff instead of troff and outputs to a pager.
(make_roff_command): Only call determine_lang_table() if
roff_device isn't already set.
(display, try_section, display_filesystem, display_database):
Check for different_encoding.
* man/man1/man.man1 (DEFAULTS, OPTIONS): Document -E.
Sun Dec 23 05:23:05 GMT 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (compare_candidates): Compare sections according to
section_list before comparing them lexicographically.
(add_candidate): Do a better job of inserting each entry at the
right place in the list.
Sun Dec 23 04:47:02 GMT 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (determine_lang_table): Format man pages in UTF-8 if
that's the current locale's character set.
Sun Dec 23 02:35:24 GMT 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (popen, pclose): Move to a separate library file ...
* lib/popen.c: ... here.
* acinclude.m4 (MAN_FUNC_PCLOSE): Use AC_LIBOBJ to conditionally
compile this.
* acconfig.h: Remove BROKEN_PCLOSE definition.
Major rewrite of man's searching code to make it maintainable and to
prepare for better sorting of displayed man pages.
* src/man.c (add_candidate): New function to add an item to a list
of candidate pages.
(compare_candidates): New helper function.
(compare_names, compare_mandata_ext): Remove.
(try_section): Use add_candidate() rather than displaying the page
immediately.
(try_db): Likewise.
(display_filesystem): New function to display pages found by
try_section().
(try_db_section): Rename to display_database(), and use the
candidate structures.
(exist_check): Rename to display_database_check(); use candidates.
(locate_page): Pass the candidate list through to try_section()
and try_db().
(display_pages): New function to iterate through a candidate list
and display each entry.
(man): Create a candidate list and pass it to locate_page().
Display pages only after building the full list.
Mon Dec 17 03:40:48 GMT 2001 Colin Watson <cjwatson@debian.org>
* man/man8/mandb.man8 (EXIT STATUS): Document mandb's exit codes.
Mon Dec 17 03:20:15 GMT 2001 Colin Watson <cjwatson@debian.org>
* src/whatis.c (long_options): Remove duplicate for --exact.
(word_fnmatch): New function.
(parse_whatis): Match using word_fnmatch() if --wildcard but not
--exact was given.
* man/man1/apropos.man1 (OPTIONS): Document this.
(DESCRIPTION): Fix typographical glitch.
Mon Dec 17 00:53:20 GMT 2001 Colin Watson <cjwatson@debian.org>
* man/man1/man.man1 (OPTIONS): Mention groff 1.17 and the ps and
utf8 devices.
* man/*/man1/man.man1: Likewise.
Sun Dec 9 03:31:54 GMT 2001 Morten Brix Pedersen <morten@wtf.dk>
* po/da.po: New file.
* man/THANKS: Add credit.
Sun Dec 9 03:19:57 GMT 2001 Jose Rodriguez <boriel@airtel.net>
* src/man.c (main): Initialize program_name before calling error().
Fri Dec 7 01:35:31 GMT 2001 Colin Watson <cjwatson@debian.org>
* configure.in: Detect libdb3, although man-db hasn't been well
tested with it yet.
Fri Dec 7 00:35:53 GMT 2001 Paul Slootman <paul@wurtel.net>
* src/man.c (main): Delete spurious backslashes in prompt_string.
Wed Nov 21 20:59:14 GMT 2001 Colin Watson <cjwatson@debian.org>
* po/fr.po: Update from Laurent Pelecq.
* po/.cvsignore: Ignore ChangeLog.
Wed Nov 21 00:48:50 GMT 2001 Colin Watson <cjwatson@debian.org>
Keeping generated files like the output of gettextize in CVS is bad.
* intl/*, po/ChangeLog, po/Makefile.in.in: Remove.
* autogen.sh: Run gettextize.
* release.sh: When releasing, pass --copy to gettextize.
Wed Nov 21 00:29:26 GMT 2001 Colin Watson <cjwatson@debian.org>
* src/compression.c (decompress): Free esc_file and esc_filename
once we're finished with them.
* src/man.c (local_man_loop): If argv is a directory, display a
useful error message rather than letting zsoelim get confused.
Mon Nov 19 00:53:03 GMT 2001 Colin Watson <cjwatson@debian.org>
* libdb/db_lookup.c (copy_datum): Explicitly null-terminate
dat.dptr, since C string-manipulation functions are used on it.
Fri Nov 16 04:28:31 GMT 2001 Colin Watson <cjwatson@debian.org>
* src/manp.c (add_nls_manpath): Concatenate strings more safely.
Changes adapted from a patch by OGAWA Hirofumi
<hirofumi@mail.parknet.co.jp>:
* acinclude.m4 (MAN_CHECK_BDB): $LIBS, not LIBS, and quote it while
we're here.
* src/manp.c (pathappend): Use strsep() rather than strtok().
(cat_manpath): Likewise.
(add_nls_manpath): Likewise.
Thu Nov 8 11:27:32 GMT 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (get_preprocessors_from_file): Drop privileges to access
temporary file.
Wed Nov 7 13:34:38 GMT 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (format_display): Drop privileges throughout. Don't free
command until after it could have been used for an error message.
Sun Oct 14 05:23:20 BST 2001 Colin Watson <cjwatson@debian.org>
* src/version.c: Include <stdlib.h> for exit().
* include/manconfig.h.in: Remove spurious orphaned #ifdef. Oops.
Spanish translation updates from David Martnez <ender@adi.uam.es>:
* po/es.po, man/es_ES.88591/man1/apropos.man1: Bring up to date.
* man/man1/lexgrog.man1: Fix thinko - s/problems/programs/.
Tue Sep 25 22:46:45 BST 2001 Colin Watson <cjwatson@debian.org>
* src/whatis.c (get_whatis): Suppress wrong report of a pointer loop
when the second or subsequent element in a pointer chain points to
itself and has a usable whatis.
Wed Sep 19 00:47:55 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (local_man_loop): Drop privileges throughout.
Documentation corrections thanks to Andreas Dilger
<adilger@turbolabs.com>:
* man/man1/man.man1 and translations (SEE ALSO): Refer to man(7).
* docs/manpage.example, docs/manpage.example.pod,
docs/manpage.example.sgml (SEE ALSO): Move to the end.
(SYNOPSIS, DESCRIPTION, OPTIONS): Add more advice.
* docs/manpage.example (FILES): Restore tabs that had been turned
into spaces.
Tue Sep 18 03:46:00 BST 2001 Colin Watson <cjwatson@debian.org>
* lib/xstrndup.c: New file.
* lib/Makefile.in: Build it.
* include/manconfig.h.in: Prototype xstrndup().
* src/man.c (compare_names, compare_mandata_ext): New functions.
(try_section): Build title more locally, displaying extensions
correctly. Sort the results of look_for_file().
(try_db_section): Build title even if NROFF_MISSING is defined.
(try_db): Sort data returned from the database.
(locate_page): Look in the filesystem first and then the database,
rather than the other way round.
* src/manp.c (checkpath): Remove; it used to resolve symlinks, but
it doesn't do that any more and I don't think it should.
* src/manp.c: Constify arguments to many functions by either being
more careful not to alter them or by duplicating them.
* src/util.c (is_directory): Likewise.
* src/catman.c, src/man.c, src/mandb.c, src/whatis.c (main):
Simplify calls.
* src/manp.h, include/manconfig.h.in: Update prototypes.
* src/manp.h: add_system_manpath() is static now.
* include/manconfig.h.in: Provide stupid getcwd() emulation with
getwd() if the former isn't available.
* src/man.c (main, format_display): Assume getcwd() is available.
* src/mandb.c (main): Likewise.
* src/manp.c (add_dir_to_path_list): Likewise.
* src/manp.c (add_dir_to_path_list): The checks that manpaths end in
/man or /MAN were overly anal and never compiled in; remove them.
* acinclude.m4 (MAN_PROG_GNU_NROFF): More portable shell for ash.
* src/man.c (lang_table): We use the latin1 alias rather than
iso8859 for all other languages, so do so for Korean too.
* src/lexgrog.l: Prevent the no-op request '.' from eating text on
the next line.
(find_name): Remove trailing spaces as well as leading ones.
Fri Sep 7 19:28:12 BST 2001 Colin Watson <cjwatson@debian.org>
* Version: 2.3.20.
* docs/NEWS: Update.
* po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po:
Update.
Fri Sep 7 00:55:53 BST 2001 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in (dist): Include other manpage.example formats.
* lib/tempfile.c (create_tempfile): Create with mode 0600.
* src/check_mandirs.c (test_manfile): Drop privileges for temporary
file operations.
* src/lexgrog.l (find_name): Likewise.
* src/man.c (make_roff_command): Likewise.
* src/straycats.c (check_for_stray): Likewise.
(straycats): Likewise.
* src/ult_src.c (ult_src): Likewise.
Thu Sep 6 21:54:05 BST 2001 Colin Watson <cjwatson@debian.org>
* include/Defines.in: Add lexgrog to list of transformed program
names. Adjust sysconfdir detection.
* src/Makefile.in (install): Really install lexgrog by default.
Create the directory config_file is in rather than sysconfdir.
Wed Sep 5 19:55:01 BST 2001 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in (dist): Generate a .tar.gz, not a .tgz.
* src/man.c: Korean: roff_device is ascii8, LESSCHARSET is iso8859.
* po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po:
Update.
Wed Sep 5 03:42:18 BST 2001 Colin Watson <cjwatson@debian.org>
* src/compression.c (decompress): Constify arguments.
* include/manconfig.h.in: Likewise.
* src/lexgrog.l (find_name): Deal with '-' and compressed files.
* man/man1/lexgrog.man1 (DESCRIPTION): Document this.
(BUGS): Remove (optimism ...).
(NOTES): New section. lexgrog can't parse .so requests.
* src/Makefile.in: Really build lexgrog by default, and add some
objects.
Wed Sep 5 02:02:20 BST 2001 Colin Watson <cjwatson@debian.org>
* docs/NEWS: Describe recent changes.
* man/man1/man.man1 (OPTIONS): Document --html.
(ENVIRONMENT): Document $BROWSER.
* man/man8/mandb.man8 (OPTIONS): Explain that --create implies
--no-purge.
Tue Sep 4 18:38:23 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (format_display): If $BROWSER contains several elements
separated by colons, try each in turn until one succeeds.
Tue Sep 4 02:09:07 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (format_display): Actually change to the temporary
directory for HTML output.
* src/mandb.c (main): --create implies --no-purge.
Sat Sep 1 17:40:06 BST 2001 Colin Watson <cjwatson@debian.org>
* lib/mkdtemp.c, lib/mkstemp.c, lib/tempname.c: New files, taken
from glibc 2.2.4.
* lib/Makefile.in, lib/README: Add them.
* configure.in: Check for mkdtemp() and mkstemp().
* lib/tempfile.c (path_search): New function, split from
create_tempfile(). Now checks $TMP as well as $TMPDIR, and ensures
that neither is checked when privileges are raised.
(create_tempfile): Use it. Fix the umask around the call to
mkstemp() rather than calling fchmod() after the fact.
(create_tempdir): New function.
* include/manconfig.h.in: Prototype create_tempdir().
* src/man.c: --html code needs to be guarded by TROFF_IS_GROFF.
(man_getopt): If -H is given, set troff to 1. Add -H to the
"incompatible options" error message.
(make_roff_command): Revert determine_lang_table() special case.
(format_display): Use a temporary directory for HTML output (groff
tends to output several files, including images). Take an extra
argument, used to set the name of the main output file.
(display): Pass man_file to format_display().
* src/util.c (remove_directory): New function.
* include/manconfig.h.in: Prototype it.
Fri Aug 31 22:20:08 BST 2001 Colin Watson <cjwatson@debian.org>
Initial support for ESR's $BROWSER variable. Not complete yet.
* src/man.c: Remove ENABLE_HTML guards around all the --html code.
Too many #ifdefs clutter the code, and it should at least be
usable to some extent now.
(main): Check $BROWSER before other ways of finding html_pager.
(man_getopt): If -H is given, set roff_device to "html". Reset
htmlout and html_pager with -D.
(make_roff_command): Don't call determine_lang_table() if htmlout
is set.
(make_browser): New function.
(make_display_command): Add case for htmlout being set.
(format_display_and_save): Rename roff_cmd to format_cmd.
(display_catman): Likewise.
(display): Likewise. Add some cases for htmlout being set (always
format, never save a cat page). Split some code out into
format_display().
(format_display): New function.
* src/man.c (main): Save the value of $LESS for later.
(make_display_command): Use setenv() to change $LESS in the
environment rather than nasty shell code.
* src/man.c (main): Don't loop if $LANGUAGE is set but empty.
(display_catman): Fix segfaults due to strappend() misuse.
* src/manp.c (read_config_file): Print dotmanpath, not home (which
might point to freed memory).
* src/man.c (main): Tidy up error message.
(store_line_length): Remove duplicate 'int width' declaration.
Wed Aug 29 20:44:27 BST 2001 Colin Watson <cjwatson@debian.org>
* man/man8/mandb.man8 (WHATIS PARSING): Move to ...
* man/man1/lexgrog.man1: ... here.
* po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Run
msgmerge.
Wed Aug 29 01:48:53 BST 2001 Colin Watson <cjwatson@debian.org>
* man/man1/apropos.man1 (ENVIRONMENT): Fix grammar error.
Wed Aug 29 01:34:33 BST 2001 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l (usage): New function.
(main): Rewrite. Add command-line options, and make the output
more easily parseable by other programs. By default, the lexgrog
program now only attempts to parse its input as a man page and
only displays the whatis line, although this can be changed on the
command line.
* src/Makefile.in: Include lexgrog in $(PROGS), so that it gets
built by default and linked against version.o.
* man/man1/lexgrog.man1: New man page. Still needs some work.
* man/Makefile.in: Install it. Tolerate it being missing in some
languages (ugly hack).
Tue Aug 21 01:57:44 BST 2001 Colin Watson <cjwatson@debian.org>
* src/Makefile.in: Link non-setuid programs against fake_security.o
rather than security.o.
* src/fake_security.c: Add a few stub variables to match recent
security.c changes.
Tue Aug 21 01:34:49 BST 2001 Colin Watson <cjwatson@debian.org>
* src/Makefile.in (install): Don't depend on all, so that the
package isn't recompiled when running 'make install' on a machine
with a skewed clock.
Don't install the wrapper. Install man and mandb in $(bindir)
rather than $(libdir)/man-db.
If lexgrog and globbing have been built, install them in
$(libdir)/man-db rather than $(sbindir).
Ensure $(sbindir) and $(libdir)/man-db exist.
Tue Aug 21 00:40:47 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (escape_special): Rename to escape_less(). Constify
argument.
(determine_lang_table): Constify argument. Unify some common code.
(make_display_common): Use escape_less() rather than
escape_special().
* docs/NEWS: Document shell escaping.
Sun Aug 19 23:56:36 BST 2001 Colin Watson <cjwatson@debian.org>
* configure.in: Compile with -Wall by default.
* src/compression.c: Include "security.h".
* src/manp.c: Likewise.
* src/check_mandirs.c (purge_whatis): Correct return value when
purging a WHATIS_MAN entry with a missing target.
* src/whatis.c (get_whatis): Remove unused variables 'pointer' and
'ext'.
* src/man.c: Include <time.h> for time().
(local_man_loop): Remove unused variable 'dir'.
(make_roff_command): Remove unused variable 'tmpfile'.
(exist_check): Print 'loc' in pointer format rather than string
format (it's a struct mandata *).
* src/wrapper.c: Include <grp.h> for initgroups().
Sun Aug 19 13:16:01 BST 2001 Colin Watson <cjwatson@debian.org>
* src/manp.c (iterate_over_list): New function (get_from_list() can
only get the first matching element).
(get_manpath): Use iterate_over_list() to get multiple matching
MANPATH_MAP entries.
Sun Aug 19 13:02:01 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (popen, pclose): Rely on the BROKEN_PCLOSE check in
configure rather than checking architectures here.
(man_getopt): Wrap the remaining code related to --html in '#ifdef
ENABLE_HTML'.
(make_roff_command): Remove HAS_TROFF and NROFF_MISSING asserts; I
think they're unnecessarily unwieldy here.
(tmp_cat_filename): Constify argument.
(commit_tmp_cat): Constify arguments.
(display_catman): New function, split from display().
(display): Use display_catman(). Don't shadow status from an outer
scope.
(try_section): Simplify cat page case.
* src/util.c (escape_shell): New function.
* include/manconfig.h.in: strappend() is no longer in util.c.
Prototype escape_shell().
* src/man.c (make_roff_command): Use escape_shell() liberally to
protect against strange characters.
(make_display_command): Likewise. Add special handling for $MAN_PN
in the less prompt string, since the environment variable is no
longer parsed by the shell.
(display_catman): Likewise.
(display): Likewise.
* src/whatis.c (use_grep): Likewise.
* src/catman.c (main): Print a warning if setlocale() fails.
* src/man.c (main): Likewise.
* src/mandb.c (main): Likewise.
* src/manpath.c (main): Likewise.
* src/whatis.c (main): Likewise.
* src/wrapper.c (main): Explain why this doesn't need to warn if
setlocale() fails.
Thu Aug 9 15:10:26 BST 2001 Colin Watson <cjwatson@debian.org>
* configure.in: Require autoconf 2.50a (for AS_VAR_*).
* src/wrapper.c: If DEBUG is defined, allow _man and _mandb as
argv[0] names as well as man and mandb, rather than instead of
them.
* docs/NEWS: Document lexgrog improvement. The mkstemp() work was
more an improvement than a fix, as I don't think it was
exploitable.
Mon Aug 6 02:22:38 BST 2001 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: groff requests aren't case-sensitive, so stop the
preprocessor detection thinking they are.
Mon Aug 6 01:26:26 BST 2001 Colin Watson <cjwatson@debian.org>
* lib/tempfile.c (create_tempfile): Use mode 0644 rather than mode
0600 so that it can be read with different privilege levels.
Thu Aug 2 00:12:41 BST 2001 Colin Watson <cjwatson@debian.org>
* lib/tempfile.c: New file. create_tempfile() does sane
mkstemp()-like temporary file creation, while searching through
$TMPDIR, P_tmpdir, and /tmp in the style of tempnam().
* include/manconfig.h.in: Prototype create_tempfile().
* lib/tempnam.c: Remove, as we no longer use it.
* lib/Makefile.in, lib/README: Remove mentions of tempnam.c, and use
tempfile.c instead.
* configure.in: Don't replace tempnam().
* src/compression.c (create_ztemp): Use create_tempfile() rather
than tempnam().
* src/man.c (create_stdintmp): Likewise.
* zsoelim/zsoelim.l (open_file): Likewise.
* src/straycats.c (straycats): Use create_tempfile() rather than
mkstemp().
* src/compression.c (decompress): Call remove_ztemp() rather than
duplicating code.
(remove_ztemp): Only close the fd if it looks valid.
* src/man.c (remove_stdintmp): Remember to free stdin_tmpfile.
* acinclude.m4: Correct AC_VAR_* to AS_VAR_*.
* src/util.c (is_changed): Fix comment.
* docs/NEWS: Preliminary entries for 2.3.20.
Tue Jul 24 02:17:53 BST 2001 Colin Watson <cjwatson@debian.org>
* docs/manpage.example: Some cleanups. Use more conventional
formatting for references to other man pages.
* docs/manpage.example.pod, docs/manpage.example.sgml: New files.
Mon Jul 16 16:42:46 BST 2001 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: Restore fr_name to the NAME regex.
Fri Jul 13 11:51:40 BST 2001 Colin Watson <cjwatson@debian.org>
* man/de_DE.ascii: Remove (Latin-1 variant still exists).
Fri Jul 13 02:35:39 BST 2001 Colin Watson <cjwatson@debian.org>
* */.cvsignore: New files.
* src/man.c (make_roff_command): Look up the correct character set
each time a page is displayed, not just the first time.
Thu Jul 12 01:11:41 BST 2001 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: Split out NAME-matching regex into one regex per
language. Add support for cs, fi, hu, nl, and pl, not forgetting
Latin (for Lingua::Romana::Perligata(3pm), of course).
(add_separator_to_whatis): New function, to allow trimming the
first space from the " - " separator.
(main): Rewrite; find_name()'s prototype changed long ago.
Tue Jul 10 14:37:51 BST 2001 Colin Watson <cjwatson@debian.org>
* src/util.c (is_newer): Rename to ...
(is_changed): ... this. We now check whether the cat page has a
different timestamp from the man page, rather than simply whether
it is newer.
Remove hack for archivers that preserve timestamps: it's no longer
needed.
* include/manconfig.h.in: Rename is_newer() prototype to
is_changed().
* src/man.c (commit_tmp_cat): Set the modification time of a created
cat page to be the same as the corresponding man page.
(display): stat() the man page so that commit_tmp_cat() can get
its modification time.
Use is_changed() rather than is_newer().
Sun Jul 8 16:06:43 BST 2001 Colin Watson <cjwatson@debian.org>
* src/whatis.c (get_whatis): Allow an entry to point to itself if it
contains a non-empty whatis field. This occasionally happens when
multiple names and descriptions are present, and it's easier to
tolerate this.
(display): If an entry points to itself, don't display the pointer
in square brackets.
* include/sections.list: Remove; it's no longer needed.
* GNUmakefile.in (dist): Don't install it.
* include/Defines.in: Don't reference it. Also remove definition of
message_catalogue (obsoleted by gettext).
* include/manconfig.h.in (LESS_OPTS): Don't include $LESS.
* src/man.c (make_display_command): Include $LESS here instead. Put
it after prompt_string rather than before, so that long options in
$LESS work.
Sat Jul 7 16:32:24 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (determine_lang_table): Fix silly bracketing typo that
caused none of the lang_table entries to match.
Thu Jul 5 15:48:42 BST 2001 Colin Watson <cjwatson@debian.org>
* Version: 2.3.19.
* docs/NEWS: Update.
* man-db.gnu: Update. Change formatting to something closer to that
currently in the Free Software Directory CVS repository.
* man-db.lsm: Update.
Thu Jul 5 14:27:17 BST 2001 Colin Watson <cjwatson@debian.org>
* man/man5/manpath.man5 (FORMAT): MANDB_MAP now only affects
setuidness when in the system configuration file.
* src/man_db.conf.in: Likewise.
* po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po:
Update.
Wed Jul 4 13:39:40 BST 2001 Colin Watson <cjwatson@debian.org>
The product of some hacking at the Debian Conference. Enjoy.
* docs/NEWS: Describe recent changes.
* include/manconfig.h.in: Add SYSTEM_CAT and USER_CAT defines.
Move includes from security.c to ...
* src/security.h: ... here (new file).
* src/man.c: Include security.h.
* src/mandb.c: Likewise.
* src/security.c: Likewise.
* src/manp.c (add_mandb_map): Take an additional parameter, user.
Use the new MANDB_MAP_USER flag instead of MANDB_MAP if it is set.
(cat_manpath): Look at user catpaths before system catpaths.
(add_to_dirlist): Take user parameter, passed through to
add_mandb_map().
(read_config_file): Call add_to_dirlist() with user set for
~/.manpath, and reset for /etc/manpath.config (security fix).
(get_mandb_manpath): Allow user manpaths.
(global_catpath): Rename to get_catpath(), and only allow it to
handle user catpaths (from ~/.manpath) as well if explicitly
requested.
(is_global_mandir): Note that this is trusted.
* src/manp.h: Reflect renaming of global_catpath() to get_catpath().
* src/man.c (need_to_rerun): Use get_catpath() instead of
global_catpath().
(make_roff_command): Likewise.
(display): Likewise.
(find_cat_file): Likewise.
(try_db_section): Likewise.
(try_db): Likewise.
* src/catman.c (main): Likewise (check only user mandirs).
* src/mandb.c (main): Likewise (check only user mandirs).
* src/straycats.c (straycats): Likewise (check only with user
mandirs).
* src/whatis.c (search): Likewise (check only with user mandirs).
* src/man.c (need_to_rerun): Use is_global_mandir() rather than
global_catpath() to decide whether to drop privileges.
* src/mandb.c (main): Likewise. Unify common code for system and
user catpaths.
* src/man.c (make_roff_command): Check catpath even if
global_manpath is false.
(locate_page): Simplify slightly.
* src/security.c (get_man_owner): New function: gets and caches the
password entry structure for MAN_OWNER.
* src/man.c (commit_tmp_cat): If running as root, chown created cat
pages to MAN_OWNER.
Sun Jul 1 01:58:33 BST 2001 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (splitline): Don't initialize the pointer
field here; instead, control it from ...
(test_manfile): ... here.
Change the logic for multiple name/description blocks again.
Remove misguided special-casing of the first name in a block. Set
the id field more carefully, depending on string equality instead
of ordering. Avoid scribbling over lg.whatis when a later
splitline() needs it. Don't call splitline() if whatis parsing
failed.
* src/check_mandirs.c (purge_normal): New function, factored out
from purge_missing().
(purge_whatis): New function to decide whether to purge a
WHATIS_MAN entry.
(purge_missing): Use both of these.
(testmandirs): purge_whatis() sometimes needs to ensure a
hierarchy is rescanned. Honour this.
Improve indentation levels.
* src/mandb.c (main): Reset force_rescan before each purge.
* src/lexgrog.l: Treat '..' as a no-op request.
Sun Jul 1 01:38:13 BST 2001 Colin Watson <cjwatson@debian.org>
* manual/misc.me (Modes of operation): Mention new requirement to
use --update to update databases.
mandb knows how to delete old entries now, so remove a sentence
saying it can't.
* src/man.c: More in the quest for sane indentation levels.
* man/man1/apropos.man1: Textual cleanups.
* man/man1/man.man1: Likewise.
* man/man1/manpath.man1: Likewise.
* man/man1/whatis.man1: Likewise.
* man/man1/zsoelim.man1: Likewise.
* man/man5/manpath.man5: Likewise.
* man/man8/accessdb.man8: Likewise.
* man/man8/catman.man8: Likewise.
* man-db.lsm: Reformatted as per the LSM.README.
Thu Jun 28 22:52:04 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (try_db_section): Downgrade whatis refs warning to a
debugging message, as it's rather noisy for a stable release.
Thu Jun 28 22:38:41 BST 2001 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (gripe_rwopen_failed): New function.
(testmandirs): Use it.
(purge_missing): New function to purge database entries whose
associated manual pages have been deleted.
* src/check_mandirs.h: Prototype purge_missing().
* src/mandb.c (main): New --no-purge option. Unless it is used,
purge_missing() is called on each database before calling mandb().
Don't call straycats() until after the temporary database has been
moved to its permanent location. Make sure all cleanup code is
called with dropped privileges.
Add statistics message for purged entries, and separate messages
for the benefit of translations.
When --test is given, only assume --quiet if --debug wasn't given.
(usage): Describe --no-purge.
* src/man.c: Move extension's storage to ...
* src/globbing.c: ... here.
(look_for_file): Constify string arguments.
* src/man.h: Move prototype of look_for_file() to ...
* src/globbing.h: ... here (new file).
* src/manp.c (pathappend): Only append the new element(s) if any
were left after removing duplicates.
(read_config_file): Make sure what we free was actually allocated.
* src/Makefile.in (mandb): Link with globbing.o.
* man/man8/mandb.man8 (OPTIONS): Document --no-purge.
General textual cleanup.
* src/accessdb.c (main): Move content into a tighter scope.
* src/security.c (drop_effective_privs): Style nit.
Thu Jun 28 13:28:13 BST 2001 Colin Watson <cjwatson@debian.org>
* man/man1/man.man1 (ENVIRONMENT): Document $MANWIDTH.
Thu Jun 28 13:15:04 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (store_line_length, get_roff_line_length): New
functions, adapted from Andries Brouwer's man.
(main): Outside catman mode, find out and store the line length.
(make_roff_command): Outside catman mode, retrieve the stored line
length and feed a .ll request into the pipeline if it's
non-standard. We let recent groff handle the page length.
(display): Don't even consider saving the cat page if save_cat is
already false.
(get_preprocessors): If the database says no preprocessors are to
be used, it's OK to save the cat page.
Thu Jun 28 01:44:02 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man_db.conf.in (SECTION): Remove guarantee that ties will be
broken in lexical order within sections. It's rather complicated
to be sure of that right now, and it should rarely matter.
* docs/ToDo: lexgrog learnt how to detect preprocessors ages ago.
Thu Jun 28 01:02:32 BST 2001 Colin Watson <cjwatson@debian.org>
* src/manp.c (gripe_stat_file): Downgrade the warning if a manpath
element doesn't exist to a debugging message (affects people
without a /usr/local/share/man, for example).
(read_config_file): Additional debugging message. Free home if it
gets allocated.
Thu Jun 28 00:35:09 BST 2001 Colin Watson <cjwatson@debian.org>
The caching cleanup I've been promising for weeks. Here be dragons.
* src/man.c (man): Only update database caches if --update is given.
(main): --all no longer implies a database update (you can always
use --all --update if you need that).
* man/man1/man.man1 (OVERVIEW): It's no longer necessarily man's job
to keep the caches up to date; use --update to get that.
(DEFAULTS): Likewise. Some rationale. Mention globbing fallback.
(OPTIONS/--local-file): Fix typo.
(OPTIONS/--update): New description. Only useful with setuid man.
* manual/misc.me (Modes of operation): man will only update database
entries if the --update flag is used.
Tue Jun 26 22:10:07 BST 2001 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: More cleanup. No substantive changes.
* include/manconfig.h.in: Likewise. Also bring xrealloc() prototype
into sync.
* src/mandb.c (main): Allow root as well as MAN_OWNER to work on
system manpaths.
Tue Jun 26 03:45:01 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man_db.conf.in (SECTION): Add a little more advice about where
to list sections with extensions.
* src/manp.c (add_to_dirlist): Add SECTIONS as an alias for SECTION,
since I keep getting it wrong and I came up with it in the first
place. Both make sense in different situations.
* src/check_mandirs.c (splitline): Trim trailing spaces off names
and descriptions. If the given base_name contains a comma, only
use the part of the name before it as the target for pointers.
* src/whatis.c (get_whatis): Unroll recursion into a finite loop to
avoid infinite recursion if the database contains a pointer loop.
Add the page name as an argument so that a warning can be printed.
(display): Pass the new argument to get_whatis().
(apropos): Recommend 'mandb --create' rather than plain 'mandb' if
the database gets corrupted.
* src/lexgrog.l: Ignore no-op groff requests (e.g. '.').
New variable, fill_mode. Reset it when .nf is encountered, set it
when .fi is encountered.
(newline_found): If fill_mode is set, add 0x11 instead of a space.
Mon Jun 25 02:55:36 BST 2001 Colin Watson <cjwatson@debian.org>
* docs/NEWS: Describe recent changes. Add dates of old releases.
* include/manconfig.h.in: Move check_mandirs.c prototypes to ...
* src/check_mandirs.h: ... here (new file).
* src/man.c: Include check_mandirs.h.
* src/mandb.c: Likewise.
* src/man.h (make_filename): Move prototype to check_mandirs.h.
* src/check_mandirs.c (test_manfile): Split parsing of file names
into mandata structures into a new function ...
(filename_info): ... this.
(test_manfile): Calculate length of file name minus compression
extension separately from the parsing, and do so whether COMP_SRC
is defined or not.
* src/man.c (try_section): Use filename_info() to find out if the
section of a glob-located file is different from the current
section and is mentioned elsewhere in the configuration file. If
so, ignore that file in the current section.
Mon Jun 25 01:30:24 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (man_getopt): Conditionalize gxditview initialization on
TROFF_IS_GROFF. As a bonus, this squashes a compiler warning.
(man): Remove some unreferenced cruft, while I'm in the process of
fixing up multi-character sections.
* src/Makefile.in: Build intermediate man.o and mandb.o objects, so
that changing other objects just requires a relink.
* src/globbing.c (look_for_file): Print the layout in debugging mode
only when it's first parsed.
Sun Jun 24 18:47:20 BST 2001 Colin Watson <cjwatson@debian.org>
* configure.in (--with-db): Improve help output formatting.
* manual/intro.me (Arguments to configure): Document
--enable-mandirs.
* README: Update.
* manual/Makefile ($(manual).html): Improve grohtml invocation.
(realclean): Remove generated .png files.
Sun Jun 24 17:22:53 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (try_section): Break if a page has been found and --all
wasn't given.
(try_db): Print extension in debug mode. Compare against requested
section if the extension is a section in its own right, to avoid
duplication.
* src/man_db.conf.in: It's SECTION, not SECTIONS.
* configure.in: --enable-mandirs=OS defines how the manual page
hierarchy is laid out (GNU, HPUX, Solaris, IRIX). If unset,
globbing behaves as before.
* acconfig.h: Add MANDIR_LAYOUT.
* src/globbing.c (parse_layout): New function.
(look_for_file): Associate each glob with a layout.
* configure.in: Don't check for off_t (only used by gettext).
Sat Jun 23 15:23:14 BST 2001 Colin Phipps <cph@cph.demon.co.uk>
* zsoelim/zsoelim.l (open_file): Supply a format string to error().
Sat Jun 23 15:15:41 BST 2001 Colin Watson <cjwatson@debian.org>
* ult_src.c (ult_src): Restore the original mantree to the start of
basename before calling test_for_include(), in case ult_softlink()
went outside the mantree.
(ult_softlink): Make debugging message print the absolute path.
Tue Jun 19 02:33:40 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (man): Allow sections to be more than one character, and
trim them for use in directory names.
* src/manp.c (read_config_file): Read ~/.manpath first, as entries
are added the other way around now.
Mon Jun 18 18:55:39 BST 2001 Colin Watson <cjwatson@debian.org>
* src/manp.c (add_sections, get_sections): New functions.
(add_to_dirlist): Recognize new SECTIONS directive.
* src/manp.h (iterate_catlist, start_iterator): Remove (not used).
(get_sections): New prototype.
* src/man.c (get_section_list): Use get_sections() instead of
std_sections if it returns a non-empty list.
* src/man_db.conf.in: Add documentation of SECTIONS, and a default
line. The documentation is still inaccurate (extensions don't work
well yet).
* include/manconfig.h.in (STD_SECTIONS): Reduce to only
single-character sections; the rest will be set in the
configuration file.
* src/manp.c (add_to_list): Add to the tail rather than the head
(needed for SECTIONS, probably makes other things more intuitive).
(read_config_file): Restore print_list() in debug mode.
* src/check_mandirs.c: Add copyright notice and change information.
* src/lexgrog.l: Likewise.
* src/man.c: Likewise.
* src/mandb.c: Likewise.
* src/compression.c (get_ztemp): Remove redundant test.
* src/man.c (get_preprocessors_from_file): Change an = to ==.
* src/wrapper.c (main): Cosmetic improvements.
Sat Jun 16 19:22:51 BST 2001 Colin Watson <cjwatson@debian.org>
* src/straycats.c (check_for_stray): Check that
canonicalize_file_name() succeeded, not that it failed. (I'm
pretty sure that this is the last instance of this now.)
Sat Jun 16 18:30:09 BST 2001 Colin Watson <cjwatson@debian.org>
* libdb/db_store.c: Move id-favouring logic to a macro. If
FAVOUR_STRAYCATS is set, make sure a WHATIS_MAN entry won't
inadvertently replace a STRAY_CAT.
* configure.in: Don't strip binaries in LDFLAGS (GNU standards).
* src/check_mandirs.c (testmandirs): Check that opendir() succeeded,
not that it failed!
(testmandirs): Instead of initializing info.pointer here,
initialize it ...
(splitline): ... here.
(testmandirs): Shuffle whatis logic some more, to make sure pages
that really are in the filesystem don't end up as WHATIS_MAN. This
reverts part of the change of 26 May 2001.
* man/man8/mandb.man8: Document the expected format of NAME sections
for whatis parsing, and some common reasons why parsing fails.
Tue Jun 12 22:20:17 BST 2001 Colin Watson <cjwatson@debian.org>
* docs/NEWS: More 2.3.19 stuff.
Sun Jun 10 14:05:10 BST 2001 Gordon Sadler <gbsadler1@lcisp.com>
* man/man1/manpath.man1 (ENVIRONMENT): Replace 'semicolon' with
'colon' throughout.
Sun Jun 10 13:59:04 BST 2001 Colin Watson <cjwatson@debian.org>
* src/manp.c (pathappend): Fix infinite loop when adding a manpath
entry which is a substring of an existing entry.
Sun Jun 10 13:49:02 BST 2001 Colin Watson <cjwatson@debian.org>
* src/check_mandirs.c (testmandirs): Treat EROFS like EACCES while
opening a database read-write (i.e. only print debug messages).
(create_db): Likewise.
src/man.c (open_cat_stream): Likewise.
(try_db_section): Likewise.
* src/straycats.c (check_for_stray): Carry on gracefully rather than
exiting if a straycat filter fails.
* src/manp.c (pathappend): Remove duplicate entries.
* src/lexgrog.l: Allow .LP, .PP, and .P as well as .br between
whatis definitions.
Sat Jun 2 14:34:59 BST 2001 Colin Watson <cjwatson@debian.org>
* configure.in: Give our English man pages the same date format as
the other locales.
* src/straycats.c: Use 'col -bx' rather than 'col-bx'.
Mon May 28 14:56:35 BST 2001 Colin Watson <cjwatson@debian.org>
* include/manconfig.h.in: Since it isn't sensible to define debug
(-d options at run-time do just as well), remove the commented
definition.
* include/manconfig.h.in, src/catman.c, src/check_mandirs.c,
src/compression.c, src/man.c, src/mandb.c, src/manpath.c,
src/whatis.c: Remove instances of '#ifndef debug'.
* src/util.c: debug is already declared extern in manconfig.h.
Mon May 28 14:30:38 BST 2001 Colin Watson <cjwatson@debian.org>
* tools/README: Describe chconfig and install-manpage.
* man/man5/manpath.man5, docs/ToDo: Document the DEFINE directive.
* libdb/db_delete.c, libdb/db_lookup.c, libdb/db_store.c,
src/whatis.c: Remove redundant strtok() declaration.
* src/check_mandirs.c: Declare strpbrk().
* src/*: Global style cleanup. Sorry about the large diff, but it
had to happen sometime: I can't stick with the prevailing coding
style when there are several to choose from! No meaningful code
change, although I disentangled a few assignments from if
conditions and rearranged a few other sections.
* po/*: Update accordingly.
Sun May 27 18:32:41 BST 2001 Colin Watson <cjwatson@debian.org>
* acinclude.m4 (MAN_CHECK_BDB): New macro to check for Berkeley DB.
* configure.in: Use it.
* src/check_mandirs.c (test_manfile): Be more accurate about finding
the " - " at the end of a series of whatis names, and make sure to
skip commas between them. Add more commentary.
* src/man.c (open_cat_stream): Return NULL if the cat page is
unwriteable, rather than wasting time compressing to /dev/null.
(format_display_and_save): Give up if both outing and saving
become false.
Sun May 27 18:00:00 BST 2001 Colin Watson <cjwatson@debian.org>
* docs/NEWS: Preliminary entries for 2.3.19. Add current version
number throughout as well as just "Major changes since ...".
* manual/misc.me (Modes of operation): mandb doesn't necessarily
have to be rerun any more, as the filesystem will be checked if
the database doesn't return anything. man and mandb can be built
for setuid operation but installed non-setuid now.
Sat May 26 15:33:37 BST 2001 Colin Watson <cjwatson@debian.org>
* manual/README: Note that HTML output is disabled by default. I
don't currently provide a pre-built PostScript manual anywhere.
* manual/misc.me (Credits): Add Fabrizio.
* manual/*: FHS updates. Various boring typo/syntax/whitespace
fixes.
Sat May 26 15:14:29 BST 2001 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in, autogen.sh: Put 'timestamp' in stamp-h and
stamp-h.in rather than the date.
* src/man.c (open_cat_stream): Open the cat file before forking in
order to deal with errors better. Open to /dev/null without
complaining if the cat file is unwriteable.
(close_cat_stream): Only commit the temporary cat if it was
created.
(locate_page): Fall back to the filesystem if nothing was found in
the database (since it might be out of date).
* src/man.c (try_db_section): If the database can't be opened
read-write due to EACCES, only print a message in debug mode.
* src/check_mandirs.c (testmandirs): Likewise.
(create_db): Likewise.
* src/check_mandirs.c (test_manfile): Make sure separate whatis keys
each get their own whatis entry.
Wed May 23 17:06:31 BST 2001 Colin Watson <cjwatson@debian.org>
* configure.in: Fix PACKAGE and VERSION substitutions.
Wed May 23 15:51:06 BST 2001 Colin Watson <cjwatson@debian.org>
* configure.in: Updates for autoconf 2.50.
(AC_PREREQ): Require version 2.1.2.
(AC_INIT): Avoid deprecated use with one argument.
(man_ac_version): Don't work out the autoconf version any more;
inline syntax is all that needed it, and any autoconf since 2.1.2
will do.
(AC_STDC_HEADERS): Now AC_HEADER_STDC.
(AC_LINK_FILES): No longer needed with newer gettext.
(AC_OUTPUT): Avoid deprecated use with arguments.
Fix instances of underquoting throughout, as the new autoconf is
less tolerant of this.
* include/manconfig.h.in: Remove compatibility code for pre-1995
autoconf versions.
Thu May 17 19:11:37 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man_db.conf.in: Improve documentation of MANDB_MAP.
Wed May 16 00:09:13 BST 2001 Colin Watson <cjwatson@debian.org>
* tools/config.sub: Update to today's CVS.
Wed May 16 00:07:04 BST 2001 Colin Watson <cjwatson@debian.org>
* A number of minor fixes from SuSE's diff:
* GNUmakefile.in: Don't prepend ../ to prefix before passing it to
subdirs.
* lib/cleanup.c: HUP and TERM signal handling was mistakenly acting
on INT instead.
* src/lexgrog.l: Replace a few instances of " \t\n" with
"blank_eol".
* src/man.c: Drop privileges before changing back to the original
directory just before exiting (only matters for profiling).
* src/util.c: Undefine MAX before redefining it.
* po/POTFILES.in: Read src/lexgrog.c rather than src/lexgrog.l
(gettext understands C better than lex).
* po/de.po, po/es.po, po/fr.po: Remove a few stray '\r's.
* I'll look at the zlib bits of the patch soon. From a preliminary
look I'll probably end up rewriting it - I'd prefer more of the
compression stuff actually to go in src/compression.c.
Tue May 15 22:01:59 BST 2001 Colin Watson <cjwatson@debian.org>
* src/man.c (get_section_list): Return std_sections if argument to
-S was an empty string or if that or $MANSECT contained only
colons. Previously, man would behave wrongly in the former case
and segfault in the latter. Also remove a redundant xstrdup().
Mon May 14 23:46:25 BST 2001 Colin Watson <cjwatson@debian.org>
* Version: 2.3.18.
* README: Add contact details.
* libdb/stamp-h: Removed.
* GNUmakefile.in, libdb/Makefile.in: Updated accordingly.
* src/man_db.conf.in: FHS 2.1 has /usr/local/share/man as the
location of locally installed man pages rather than
/usr/local/man. Accordingly, the MANDB_MAP for /usr/local/man is
now /var/cache/man/oldlocal, and /usr/local/share/man takes over
/var/cache/man/local.
* po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Update
with msgmerge.
Mon May 14 22:18:32 BST 2001 Colin Watson <cjwatson@debian.org>
* src/security.c: Count how many times drop_effective_privs() has
been called, and don't actually regain privileges until
regain_effective_privs() has been called an equal number of times.
This should flush out several subtle bugs.
* src/mandb.c: Call manpath() rather than read_config_file() (this
was changed while merging 2.3b12). Otherwise 'mandb --user-db'
segfaults as manp never gets set.
Sun May 13 18:34:33 BST 2001 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in (dist): Don't install po/Makefile.in.
* src/stamp-h: Removed.
* GNUmakefile.in, src/Makefile.in: Updated accordingly.
* GNUmakefile.in (distclean): Don't clean configure, src/lexgrog.c,
zsoelim/zsoelim.c.
(realclean): Clean configure here instead. realclean targets in
subdirs already remove the other two.
* zsoelim/Makefile.in (clean): Let realclean remove zsoelim.c.
Sun May 13 17:17:32 BST 2001 Colin Watson <cjwatson@debian.org>
* man/Makefile.in: Another try to get NLS installation working
properly. The last change was wrong when LINGUAS was unset.
* GNUmakefile.in (dist): Install docs/manpage.example.
Sun May 13 16:54:01 BST 2001 Colin Watson <cjwatson@debian.org>
* man/Makefile.in: Exclude NLS directories without man pages, as CVS
can't delete directories quite as fully as I'd like.
* configure.in: No subdirectory Makefiles need ALL_LINGUAS any more.
* manual/Makefile: Make the location of soelim variable so that
distributions can e.g. use the version in the build directory.
* manual/Makefile, manual/README: Add an HTML target. Disabled by
default as groff's HTML driver doesn't produce very good output
yet (as of 1.16).
* include/Defines.in: Only remove /usr from the default sysconfdir
if the prefix is exactly /usr, not something that happens to
contain /usr (like the default /usr/local).
Sun May 13 13:39:17 BST 2001 Colin Watson <cjwatson@debian.org>
* man-db.gnu, man-db.lsm: Mention move to SourceForge and the new
URLs for the Debian package pool.
* man-db.gnu: New architectures (successful Debian ports as of
today). New mailing list for announcements.
Sun May 13 13:18:56 BST 2001 Colin Watson <cjwatson@debian.org>
* README: Document FHS changes; correct pointer to
docs/INSTALL.autoconf.
* docs/INSTALL.autoconf: Update to instructions from automake 1.4.
* docs/COPYING: Minor fixes from GNU (FSF address, Y2K).
Sun May 13 13:00:17 BST 2001 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in (dist): Add include/sections.list.
* GNUmakefile.in, man/Makefile.in: Cause USE_NLS to be substituted
properly from configure.
* include/Defines.in: Remove some old gencat definitions.
* docs/NEWS: Update in preparation for 2.3.18 release. Correct a few
it's -> its typos in earlier entries.
Sun May 13 02:18:00 BST 2001 Colin Watson <cjwatson@debian.org>
* autogen.sh: Create stamp-h.in.
* po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Update
with msgmerge.
Sun May 13 02:03:05 BST 2001 Colin Watson <cjwatson@debian.org>
* docs/ToDo: Most of Wilf's beta code is in now; mention SuSE.
Sun May 13 01:22:29 BST 2001 Colin Watson <cjwatson@debian.org>
* docs/manpage.example: New file.
Sun May 13 01:19:47 BST 2001 Colin Watson <cjwatson@debian.org>
* include/manconfig.h.in: Bump database version from 2.3.1 to 2.3.2.
* libdb/db_ver.c (dbver_wr): Reformat.
(dbver_rd): Downgrade warnings about wrong version numbers to
debugging messages.
* libdb/db_lookup.c (split_data): Fix fencepost error that would
overlook a missing whatis field.
* src/man.c (try_db_section): Display warning if whatis refs are
relied upon to find a page.
* libdb/db_storage.h: Note that WHATIS_MAN and WHATIS_CAT are
deprecated.
* src/accessdb.c (main): Give FHS_CAT_ROOT priority over CAT_ROOT.
* man/man8/accessdb.man8 (DESCRIPTION): Document this.
* man/de_DE.85591/man8/accessdb.man8 (DESCRIPTION): Likewise.
* man/de_DE.ascii/man8/accessdb.man8 (DESCRIPTION): Likewise.
* man/es_ES.88591/man8/accessdb.man8 (DESCRIPTION): Likewise.
* man/it_IT.88591/man8/accessdb.man8 (DESCRIZIONE): Likewise.
* src/check_mandirs.c (testmandirs): Tidy up database opening code.
* src/mandb.c (mandb): Don't create a new database if opt_test is
set.
(main): If opt_test is set, just delete the temporary database
rather than moving it into place.
* man/man8/mandb.man8 (OPTIONS): Document --test.
(FILES): Document FHS compliant database locations.
(AUTHOR): Add myself.
* src/ult_src.c (ult_softlink): Remove overly-cautious check for
non-local symlinks in mantrees.
* src/whatis.c (apropos): Remove a now redundant test that cont.dptr
is non-NULL.
Sun May 13 01:00:47 BST 2001 Colin Watson <cjwatson@debian.org>
* src/whatis.c (apropos): Complain and exit if a data pointer is
NULL. For this, locally undefine BTREE to avoid using optimized
functions, as they don't appear to provide enough error checking
yet.
Fri May 4 03:59:08 BST 2001 Colin Watson <cjwatson@debian.org>
* configure.in: Change PACKAGE from man-db to man_db.
* po/*.po: Update with msgmerge.
* release.sh: New file (quick release script).
Fri May 4 03:44:49 BST 2001 Colin Watson <cjwatson@debian.org>
* acconfig.h: Remove Debian-specific entries.
* aclocal.m4: Remove, as it's another autogenerated file.
* autogen.sh: New file (very simple for now).
Fri May 4 03:34:54 BST 2001 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in (dist): Update set of installed files somewhat. No
need to build man_db-nls.h any more.
* man/Makefile.in: Declare ALL_LINGUAS and LINGUAS.
* src/man.sh: Remove (obsoleted by src/wrapper.c).
Fri May 4 02:56:30 BST 2001 Colin Watson <cjwatson@debian.org>
* README: Update for new NLS configuration methods. Reflect renaming
of configuration file from man_db.config to man_db.conf.
Fri May 4 00:18:23 BST 2001 Colin Watson <cjwatson@debian.org>
* stamp-h.in: Remove (generated by GNUmakefile).
Fri May 4 00:17:50 BST 2001 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in, configure.in, include/Defines.in,
libdb/Makefile.in, libdb/db_delete.c, libdb/db_lookup.c,
libdb/db_store.c, libdb/db_ver.c, man/Makefile.in,
src/Makefile.in, src/lexgrog.l-2.3.8, src/lexgrog.l-2.4a,
src/wrapper.c: Dispose of all the old catgets stuff. Replace with
gettext idioms where appropriate.
* libdb/man_db-nls.h, src/man_db-nls.h: Remove (obsolete with
gettext).
* include/config.h.in: Remove (generated by autoheader).
Thu May 3 01:17:08 BST 2001 Colin Watson <cjwatson@debian.org>
* GNUmakefile.in: Strip .po from language names; fix it's -> its
typo.
* configure.in: Stop trying to guess the package name and version
number from the current directory name.
Wed May 2 18:38:49 BST 2001 Colin Watson <cjwatson@debian.org>
* src/manp.c: Remove #include of security.h (now merged elsewhere).
(pathappend): Constify second argument.
(mkcatdirs): Eliminate DIRLIST; now takes mandir and catdir as
arguments.
(add_2_dirlist): Rename to add_to_dirlist(); return void, and
otherwise eliminate use of DIRLIST. As mentioned below, we now use
a linked list instead.
(read_config_file): Update accordingly.
* src/security.c: *uid no longer static for now, as other objects
use them.
* src/man.c: Declare ruid and euid extern here now that security.h
is gone.
* src/check_mandirs.c (update_db): Close dbf rather than database.
Wed May 2 17:27:22 BST 2001 Colin Watson <cjwatson@debian.org>
* acinclude.m4: New file. Restore definitions inadvertently removed
from aclocal.m4 a few changes ago.
* aclocal.m4: Update accordingly with 'aclocal'.
* config.guess, config.sub: Move to tools directory.
* configure.in: Move gettext macros below AC_PROG_CC etc.
* configure.in: Remove Debian-specific code; build dependencies
handle this now.
Wed May 2 16:41:28 BST 2001 Colin Watson <cjwatson@debian.org>
* acconfig.h: Removed some definitions gettext used to need.
* Makefile.in (_root): Added ABOUT-NLS to the distribution.
Wed May 2 16:31:21 BST 2001 Colin Watson <cjwatson@debian.org>
* config.guess, config.sub: New files, synced from today's CVS.
Wed May 2 16:28:02 BST 2001 Colin Watson <cjwatson@debian.org>
* configure.in, include/Defines.in, man/Makefile.in: Remove use of
curdate.
* man/it_IT.88591/man1/man.man1, man/ja_JP.eucJP/man1/man.man1,
man/man1/man.man1: s/curdate/date/g.
Wed May 2 16:15:00 BST 2001 Colin Watson <cjwatson@debian.org>
* po/POTFILES.in: Added src/accessdb.c and src/wrapper.c.
Wed May 2 15:53:45 BST 2001 Colin Watson <cjwatson@debian.org>
* ABOUT-NLS, aclocal.m4, intl/*, po/ChangeLog, po/Makefile.in.in:
Update to gettext 0.10.37 (from 0.10.32). Various additions and
removals.
* GNUmakefile.in, libdb/Makefile.in, src/Makefile.in: Remove old
gencat/xcat targets.
Wed May 2 01:33:04 BST 2001 Colin Watson <cjwatson@debian.org>
* src/mandb.c (main): Initialize security properly, since we may be
setuid, and drop privileges when creating temporary databases in
user-supplied hierarchies. Thanks to Ethan Benson for reporting
this vulnerability.
* man-db.gnu, man-db.lsm: Add myself as a developer; change
maintainer.
* libdb/db_lookup.c, src/man.c: Cosmetic fixes.
* src/accessdb.c (usage): Remove spurious space in output.
Wed May 2 01:02:19 BST 2001 Colin Watson <cjwatson@debian.org>
* Merging in changes from Wilf's 2.3b12 beta release.
* docs/ChangeLog: Folded in changelog comments.
* GNUmakefile.in, configure.in: Build configuration file.
* */Makefile.in: Rearrange code for CPPFLAGS and similar.
* configure.in: Look for grep, seteuid(), setresuid().
* include/config.h.in: Add HAVE_SETEUID and HAVE_SETRESUID.
* include/manconfig.h.in: Add GREP and various grep flags.
* src/whatis.c: Use GREP rather than "grep".
* src/man_db.config: Renamed to src/man_db.conf.in.
* src/man_db.conf.in: Add commented out DEFINE directives.
* docs/ToDo: Need to document DEFINE directive. (Also, I (cjwatson)
checked in two other todo items by mistake earlier: inline
pipelines and merging work done by Wilf and Andries.)
* include/Defines.in: CPPFLAGS tweaks; rename config file; %.i rule.
* include/comp_src.h.in: paths.h -> ./manconfig.h.
* src/security.c, src/man.c: Rewrite seteuid() handling; remove
special "running as root" case.
* src/security.h: Remove; combine previous contents with security.c.
* src/man_db-nls.h: No longer need man_CHOWN.
* include/manconfig.h.in: Add init_security() prototype.
* src/manp.c: Major rewrite. Replace static storage with linked
list. Improve configuration file handling, replacing get_dirlist()
with read_config_file(). Move some of the more deeply nested bits
of read_config_file() into separate functions like
add_mandb_map(). (cjwatson: This won't compile yet. Fabrizio also
hacked on this heavily, including splitting part of get_dirlist()
out into add_2_dirlist() and adding mkcatdirs(). I've merged these
as best I can for now, but it's still unfinished.)
* src/manp.h: Remove get_dirlist() prototype, add prototypes for
read_config_file() and get_def().
* src/man.c, src/mandb.c, src/straycats.c, src/whatis.c: Use new
get_defs() functions to pull paths from config file rather than
hard-coding them.
Fri Apr 27 22:39:34 BST 2001 Colin Watson <cjwatson@debian.org>
* Merging in changes from Wilf's 2.3.11 release.
* docs/ChangeLog, docs/NEWS: Folded in changelog comments.
* GNUmakefile.in: Added deroff and manual targets.
* README: Added comment about manual; added notes on configure
flags.
* configure.in: Minor improvement for non-GNU makes.
* src/lexgrog.l, src/lexgrog.l-2.4a: Allow comments other than at
the beginning of a line.
* src/manp.c: Replace has_subdirs() with has_mandir(): for $PATH
components not in config, check for ../man as well as man subdirs.
* zsoelim/zsoelim.l: Use #defines for exit codes.
* GNUmakefile.in, README, docs/INSTALL.quick, src/man.c: Cosmetic
rearrangements (whitespace, typos, etc.).
Fri Apr 27 21:36:11 BST 2001 Colin Watson <cjwatson@debian.org>
* manual/*: Add the source code for the man_db manual from Wilf's
FTP site.
Fri Apr 27 18:33:17 BST 2001 Colin Watson <cjwatson@debian.org>
* src/accessdb.c (main): Close the database and set dbf to NULL if
dbver_rd() fails.
* src/check_mandirs.c (update_db): Likewise.
* src/man.c (try_db): Likewise.
* src/straycats.c (straycats): Likewise.
* src/whatis.c (search): Likewise.
Fri Apr 27 18:10:47 BST 2001 Colin Watson <cjwatson@debian.org>
* src/lexgrog.l: Detect grap (.G1) and vgrind (.vS).
* include/manconfig.h.in: Add GRAP_FILTER and VGRIND_FILTER to
filter enum.
Fri Apr 27 18:00:04 BST 2001 Colin Watson <cjwatson@debian.org>
* New maintainer.
* man/man1/man.man1 (HISTORY): Update some dates, add myself.
* man/it_IT.88591/man1/man.man1 (HISTORY): Likewise.
* man/ja_JP.eucJP/man1/man.man1 (HISTORY): Likewise.
* man/de_DE.88591/man1/man.man1 (HISTORY): Update some dates.
* man/de_DE.ascii/man1/man.man1 (HISTORY): Likewise.
* man/es_ES.88591/man1/man.man1 (HISTORY): Likewise.
* ja_JP.ujis/man1/apropos.man1: Remove (superseded by ja_JP.eucJP).
* ja_JP.ujis/man1/man.man1: Likewise.
* ja_JP.ujis/man1/manpath.man1: Likewise.
* ja_JP.ujis/man1/whatis.man1: Likewise.
* ja_JP.ujis/man1/zsoelim.man1: Likewise.
* ja_JP.ujis/man5/manpath.man5: Likewise.
* ja_JP.ujis/man8/accessdb.man8: Likewise.
* ja_JP.ujis/man8/catman.man8: Likewise.
* ja_JP.ujis/man8/mandb.man8: Likewise.
Tue Apr 17 15:23:30 BST 2001 Colin Watson <cjwatson@debian.org>
* End of the Great CVS Sync.
* Debian release 2.3.17.1-3.
* src/ult_src.c (ult_src): Return an error when ult_softlink()
fails.
* src/man.c: Use latin1 character set for C and POSIX locales.
* po/ja.po: Update Japanese translation.
* man/ja_JP.eucJP/man1/apropos.man1: New file, updating Japanese
translation in new character set.
* man/ja_JP.eucJP/man1/man.man1: Likewise.
* man/ja_JP.eucJP/man1/manpath.man1: Likewise.
* man/ja_JP.eucJP/man1/whatis.man1: Likewise.
* man/ja_JP.eucJP/man1/zsoelim.man1: Likewise.
* man/ja_JP.eucJP/man5/manpath.man5: Likewise.
* man/ja_JP.eucJP/man8/accessdb.man8: Likewise.
* man/ja_JP.eucJP/man8/catman.man8: Likewise.
* man/ja_JP.eucJP/man8/mandb.man8: Likewise.
* man/THANKS: Updated (new Japanese eucJP translation).
* src/man.c (main): Support LC_MESSAGES being set differently from
other locale categories (internal_locale).
* src/man.c (main): Multiple locale preferences can be set with
$LANGUAGE.
* src/version.c (ver): Remove previous maintainer address.
* configure.in: Find version number correctly.
Sun Apr 1 14:37:28 BST 2001 Colin Watson <cjwatson@debian.org>
* Debian release 2.3.17.1-2.
* src/whatis.c (main): Disable regex searches if -w (wildcard)
option is given.
* docs/ToDo: Using zlib rather than gzip would be good.
Sat Mar 31 18:07:46 BST 2001 Colin Watson <cjwatson@debian.org>
* Debian release 2.3.17.1-1.
* src/check_mandirs.c (test_manfile): Check if the result of symlink
and hard link resolution is in the cache before looking for .so
links. This provides a substantial speedup when many symlinks
exist in the mantree.
* src/catman.c (main): Initialize full locale by calling setlocale()
with LC_ALL rather than LC_MESSAGES (GOTO Masanori). Remove manual
getenv() calls accordingly.
* src/man.c (main): Likewise.
* src/mandb.c (main): Likewise.
* src/manpath.c (main): Likewise.
* src/whatis.c (main): Likewise.
* include/manconfig.h.in: Add 3perl to section names, following 3pm;
Debian is using this to allow other packages to shadow pages from
core Perl packages.
Wed Feb 28 21:02:41 GMT 2001 Colin Watson <cjwatson@debian.org>
* Debian release 2.3.17-3.2.
* configure.in: More fixes for Debian troff and /dev/null input
files. This restores detection of -mandoc macros.
* man/man1/man.man1 (OPTIONS): Typo: "It's" -> "Its".
* man/man1/zsoelim.man1 (OPTIONS): Likewise.
* man/man1/man.man1 (OPTIONS): Mention that argument to -M must be
the root of a mantree.
(SEE ALSO): Add reference to man-db manual to explain the above.
Wed Feb 21 00:54:47 GMT 2001 Colin Watson <cjwatson@debian.org>
* Debian release 2.3.17-3.1.
* src/man.c (local_man_loop): Fix format string vulnerability in
printing of error message.
* src/whatis.c (get_whatis): Fix segfault if whatis reference is
NULL.
* src/man.c (local_man_loop): chdir() to original working directory
so that 'man -l' works again on relative paths to compressed
pages.
* src/compression.c (decompress): free() file if the decompressor
failed so that atexit() doesn't try to remove it again.
* src/mandb.c (main): Reverse sense of -s option to agree with the
documented intent.
* configure.in: Work around change in the behaviour of Debian nroff,
which no longer accepts /dev/null as an input file.
* GNUmakefile.in: Restore full clean rules.
Fri Apr 7 10:50:45 EET 2000 fab (fpolacco@debian.org)
* Checked in by Colin Watson during SourceForge CVS sync.
* Upstream changes from Debian changelog (2.3.17-2):
- Commented away call to distclean_root in GNUmakefile: need to
leave the Makefile and configure in the tarball.
- Found and fixed subtle bug which made wrapper uselessly linked
with -ldb2. When invoked by root on a system which enables
group.db, then the call to initgroups() segfaults due to the
libc link to libdb!
* Other changes not mentioned in Debian changelog:
- man-db.gnu: Update date and prerequisites (libdb2 becomes weak
prerequisite).
- man-db.lsm: New file.
- src/lexgrog.l: Cosmetic changes.
- src/wrapper.c: Add debugging code.
Fri Apr 7 10:50:45 EET 2000 fab (fpolacco@debian.org)
* Checked in by Colin Watson during SourceForge CVS sync.
* Version: 2.3.17.
* Upstream changes from Debian changelog:
- Corrected apparent disappearing of option -e in apropos.
- Corrected wrong usage of undocumented option -X which produced
error when passed to filters. This is now parametrized as
optional argument, defaulting to use devX75. Documented in
usage : -X = -TX75, -X100 = -TX100, -X100-12 = -TX100-12.
- Applyed patch submitted by Tomohiro KUBOTA:
- roff_device and LESSCHARSET are determined by user environment
rather than language of manpage for English manpage.
- roff_device "ascii8" is used for non-English/non-ISO-8859-1
languages.
- Added new check for libdb in configure.in
- Added /usr/local/{share/}man to config file, due to bug in FHS,
thanx to Gregor Hoffleit.
- Added new message catalog po file for cs (czech) (4 new
messages), thanx to Vladimir Michl.
- tired of people continously complaining that man behaves
differently than in RedHat (which is "The Reference Linux", you
all know that), I'll add tbl as default filter for man. This
will fix those three or four manpages that do not take the
burden to declare their dependency on the tbl formatter (usually
because upstream uses RedHat and so ...). Now what would I do if
someone fill a bug against this because of wasting of CPU cicles
for un-necessary filtering on the hundreds of pages that do not
need tbl? I would certainly agree with them. Therefore I will
fix this introducing scanning of manpages a la grog in mandb,
and storing the result in the database. ...[noise of hacking
and debugging]... Well, I did it (use accessdb to see it!). It
took 4 weekend (stolen to the implementation of man 2.4) to
complete and debug. Now you can announce the world that man-db
2.3.17 knows in advance which filters to run when processing a
manpage which is in the database.
Wed Mar 22 16:00:16 EET 2000 fab (fpolacco@debian.org)
* Checked in by Colin Watson during SourceForge CVS sync.
* Version: 2.3.16.
* Upstream changes from Debian changelog:
- Applyed patch submitted by Javier Fernandez-Sanguino Pena to
permit search of trnlated manpages before giving the first
english one found.
Mon Feb 28 22:09:09 EET 2000 fab (fpolacco@debian.org)
* Checked in by Colin Watson during SourceForge CVS sync.
* Version: 2.3.13.
* Upstream changes from Debian changelog:
- Applied patch to avoid disappearing of index file during
regeneration. Thanx to Colin Phipps.
- Applied patch to generate secure temporary file in straycat.
Thanx to Colin Phipps.
Wed Feb 23 22:34:54 EET 2000 fab (fpolacco@debian.org)
* Version: 2.3.12
* New maintainer.
* find the huge list of changes (in three years) in file
debian/changelog.
Wed Sep 27 23:59:05 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3b12
* src/manp.c: replace static storage with linked list
* src/security.h: removed/combined with security.c
* src/security.c, src/man.c: re-write seteuid() handling:
remove special "running as root" case
* src/whatis.c: use GREP rather than "grep"
* include/manconfig.h: many #DEFINE additions
* configure.in: look for grep, seteuid(), setresuid()
* GNUmakefile.in, */Makefile.in: minor modifications
* include/Defines.in: modifications
* src/man_db.config: renamed as src/man_db.conf.in
* src/man_db.conf.in: add commented out DEFINE directives.
Thu Sep 21 19:33:58 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3.11
* manual/*: bundle the source code of the man_db manual
Wed Sep 20 16:17:19 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/manp.c: replace has_subdirs() with has_mandir(): for $PATH
components not in config, check for ../man as well as man subdirs.
* various: small bug-fixes from Markus,
Joey (joey@infodrom.north.de), Lionel (cons@dxcern.cern.ch)
* src/util.c: when checking man/cat timestamps, compare mod time of
cat with latest of mod or create time of man: If untar new man
page with old timestamp, still reformat.
Thu Jul 13 11:29:32 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3.10
* src/apropos.c: fix for #undef REGEX regarding int regex
* src/lexgrog.l: default to new version.
* src/README.lexgrog: new.
* configure.in: all echo's through MAN_ECHO() for --quiet.
* various: apply patch from Carl Edman (cedman@princeton.edu),
port to NeXTstep and misc small fixes.
Fri Jun 16 11:12:08 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3.9
Wed Jun 14 17:08:41 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/man.c (make_display_command): fix command when ascii==1
* src/man.c (display): don't return 1 on skip if local_man_file==1
* man/Makefile.in: force make to resolve the program name strings
(which are sed commands) once only.
* configure.in: don't exec pager (too many side effects)
Sun Jun 4 13:51:22 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3.8
* various: apply patch from CERN to allow globbed support for
HPUX, OSF and SOLARIS system manual page hierarchies.
* GNUmakefile.in: add hook for `make check'
Mon May 29 18:57:24 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/whatis.c (main): if $POSIXLY_CORRECT is in effect,
default to case-less extended regex searches for apropos
as specified by POSIX 1
* man/man1/apropos.man1: document above change.
* src/whatis.c (apropos, parse_name): ensure case-less
matching on manual page name aswell as it's whatis for apropos.
* all manual pages: replace instances of program with %program%
and arrange to do a sed replacement with the actual name of the
program, chosen by the installer.
* zsoelim/zsoelim.l: fix recursion detector.
* src/lexgrog.l (newline_found): new.
Mon May 22 20:07:17 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* nls/de_DE.88591/*.m: from Lars Fenneberg (li@gimli.comlink.de)
* src/Makefile, libdb/Makefile: fix -DNLS
* src/man.c (LESS_PROMPT): Make " Manual page" a translatable
message.
* man/de_DE.ISO_8859-1: rename as man/de_DE.88591
* nls/THANKS, man/THANKS: new.
* src/whatis.c: If $POSIXLY_CORRECT, force apropos to do extended
regex matching.
Sat May 20 12:27:47 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/man.c: if -f or -k, simply execv() the program, passing
the entire argv[] to it.
* man/man1/man.man1: document change.
* src/whatis.c: ignore -f, --whatis, -k and --apropos
Sat May 13 18:10:50 BST 1995 Markus Armbruster
* Version: 2.3.7
* lib/cleanup.c (pop_all_cleanups): new
* src/man.c, src/security.c: use pop_all_cleanups() in children.
* general: use fork() instead of vfork() in situations where
vfork() could cause problems.
Tue May 9 23:30:58 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* manual pages: aesthetic/grammer changes.
* flex files: process with flex-2.5.2
Mon May 8 11:15:07 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* include/manconfig.h.in: #define some exit codes.
* all sources: use the codes.
* English manual pages: add EXIT STATUS section where
appropriate
* src/man.c (make_display_command): back out execing the pager
as PAGER does not have to be a simple program name.
* configure.in: prepend "exec " to the default pager.
* src/mandb.c: fix stupid bug where global databases remain
owned by the creator in all circumstances. Clean up.
* src/straycats.c, src/check_mandirs.c: homogenized and
re-worded messages emitted by mandb.
Mon May 8 11:15:07 BST 1995 Markus Armbruster
* lib/cleanup.c, lib/cleanup.h: new functions. Install
sighandler, initialise and operate a stack of cleanup funcs
callable on exit().
* src/mandb.c, src/man.c: modify to use cleanup functions.
Tue Apr 25 20:21:51 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3.6
* src/whatis.c: new, replaced with edited version from 2.4 alpha
source tree. Apropos now does _real_ word matches.
* man/man1/apropos.man1: remove description of option -e.
Mon Apr 24 17:26:54 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/man.c (get_section_list): Ignore empty $MANSECT.
* src/man.c (main): if (!*pager) pager = CAT;
* libdb/db_storage.h, include/manconfig.h.in, src/check_mandirs.c,
src/straycats.c: small modifications to fix broken
FAVOUR_STRAYCATS behaviour and properly handle situation when
STRAYCAT and WHATIS_CAT share namespace. Move definition of
FAVOUR_STRAYCATS to include/manconfig.h.in. From Zoltan.
* zsoelim/zsoelim.c: exit 1 on command line file open failure.
* src/man.c (man_getopt): consolidate incompatible option parsing.
* src/man.c (usage): update wrt. option parsing.
* src/man.c (display): only prompt/attempt display if found==1.
* src/man.c (make_display_command): exec the pager.
Fri Apr 21 15:16:59 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3.5 (public release)
* src/whatis.c: fix a couple of problems caused by whatis/apropos
split.
* configure.in: remove determination of viable gencat program,
always use our own.
Wed Apr 19 09:53:27 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* GNUmakefile.in: renamed Makefile to differentiate between
GNU make and others.
* configure.in: create bogus ./makefile to catch non GNU make
programs.
Mon Apr 17 11:06:32 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3.4
* src/man.c (format_display_and_save): don't save cat if
formatting process fails and/or produces nothing.
Sat Apr 8 18:02:52 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/mandb.c: change #ifdef SECURE_MAN_UID to
#if defined(SECURE_MAN_UID) && defined(MAN_DB_UPDATES) as the
databases should be owned by their creators if man is not
responsible for updating them.
* src/man.c: minor changes regarding MAN_DB_UPDATES
* include/manconfig.h.in: update CATMODE and DBMODE w.r.t.
recent MAN_DB_UPDATES/MAN_CATS definitions.
* src/mandb.c: changes to operation. Work on a temporary copy of
the database, then rename() to actual database. Catch SIGINT,
SIGTERM and remove the temp copy if necessary.
* src/compression.c (decompress): kill(getpid(), SIGINT) instead of
exit(0) if child (decompressing man page) fails.
* src/straycats.c (check_for_stray): kill(getpid(), SIGINT) instead of
exit(0) if child (decompressing cat page) fails.
* libdb/db_lookup.c (make_content): ndbm limit is 4k not 1k.
Mon Apr 3 20:52:06 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* docs/NEWS: new
* README: more Linux-system information.
* configure.in, acconfig.h: #define NDEBUG if !--enable-debug
* include/Defines.in: comment out @LEXLIB@, not required in link
stage.
Sun Apr 2 17:42:02 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3.3
* README: add sections referring to default preprocessors and
system specific notes.
* xcat/xcat.l, zsoelim,zsoelim.l, src/lexgrog.l: process with
flex-2.5.1
Fri Mar 31 17:12:44 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/whatis.c (display): add free(string)
* src/whatis.c, src/Makefile.in: produce separate object files for
apropos and whatis so that the programs know which one they are
regardless of actual program-filename.
* All Makefile.in, include/Defines.in: append CPPFLAGS supplied to
./configure or make to the standard $(CPPFLAGS) variable.
Allows configuring with unusual #include directories, eg.
CPPFLAGS=-I/usr/src/gdbm LDFLAGS=-L/usr/src/gdbm ./configure
* configure.in (--with-db=LIBRARY): override the default database
interface library on systems having a choice. Options={db,gdbm,ndbm}
* configure.in: Re: sec 5.6 of the autoconf manual, replace
(if test a=b -o a=c) with
(if test a=b || test a=c)
Tue Mar 28 16:44:46 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.3b2
* lib/flock.c, lib/flock.h: New. flock() wrapper to fcntl() for
systems that lack flock().
* xcat/xcat.l: #include "manconfig.h". For systems not supporting
__inline__
* include/Defines.in (%.d : %.c): modify rule to account for C
compilers other than gcc
* All Makefiles.in (cd $dir && $(MAKE)): change to $(MAKE) -C $dir
* nls/Makefile.sub.in: merge into nls/Makefile.in
Mon Mar 27 22:42:53 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/globbing.c (look_for_file): don't rely on GLOB_NOMATCH as
AIX doesn't have it.
* configure.in, include/manconfig.h.in (man_ac_version): new,
replaces ac_version and is more robust
* configure.in, aclocal.m4: rename non-autoconf macros so that
future versions of autoconf won't clash
* gencat/gencat.c, gencat/genlib.c: tidy up header includes and
remove unused variable definitions
* configure.in: check for gencat
Mon Mar 27 12:51:47 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version 2.3b1
* src/man.c: small HAS_TROFF/NROFF_MISSING changes from Markus.
Thu Mar 23 18:09:46 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/man.c: man will only _create_ user db's if
MAN_DB_CREATES is #defined (It is not defined by default)
* add ability to install programs/man pages with transformed names.
ie --program-prefix=PREFIX,
--program-suffix=SUFFIX and
--program-transform-name=EXP
arguments to configure are now observed.
* src/man.c (try_db): store an info->addr==NULL entry in the
hashtable if we fail to access this db. Only try to open the
db once. If the db access succeeds, but the lookup fails to find
anything, store info==NULL in the hashtable.
* libdb/db_ver.c (dbver_rd): don't die if wrong version. Issue a
message, return 1 and let the caller decide what to do.
Mon Mar 20 16:13:23 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/whatis.c (get_whatis): new. Use the pointer member of mandata
structure to access the whatis string.
(display): modify to use get_whatis().
* src/checkmandirs.c (splitline): don't store whatis referenced
`whatis' lines in the db.
* libdb/db_lookup.c (make_content): store a NULL whatis as "" rather
than "-".
Sun Mar 19 16:37:58 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/lexgrog.l: wipe out roff comment lines (again).
* src/whatis.c: use BSD style regex if POSIX unavailable. Ignore
--regex if neither available. Fix failed-regex-compilation error
message.
* lib/regex.c, lib/regex.h: remove
* configure.in: account for regex changes.
* libdb/db_delete.c (dbdelete): don't barf on delete request of a
multi-key that is not listed in the main key, return NO_ENTRY.
* src/man.c (try_section): don't try to delete db entry for missing
straycat. Return 0 and leave that to the caller.
Sat Mar 18 12:31:48 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Replaced strncasecmp() calls with strncmp(). Removed partial
support for man dirs named .../MAN.
* lib/{alloca.c,putenv.c,memcmp.c}: new
lib/{getopt.c,getopt1.c,getopt.h,error.c,xstrdup.c,xmalloc.c}:
newer replacements
* All Makefile.in, include/Defines.in, include/manconfig.h.in:
use standard (GNU coding) installation variables:
bindir, sysconfdir, man?ext, man?dir, localedir, manroot.
These variables, along with prefix and exec_prefix may be specified
on the `make' command line.
* configure.in: move definition of BINDIR and config_prefix to
include/Defines.in to allow dynamic evaluation. Rename config_prefix
to sysconfdir.
* libdb/db_lookup.c (list_extensions): fix return count.
* libdb/db_delete.c (dbdelete): take account of situation
where there were multiple name entries and they are subsequently
deleted. When deleting the last one (which still has a multi-key
entry), delete the standard key too, rather than recomputing it's
content (which would be nothing and cause a "corrupt db" message).
Fri Mar 17 23:36:44 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/man.c (glob_for_file, make_names): remove
src/globbing.c: new file
lib/glob.c, lib/glob.h, lib/fnmatch.c, lib/fnmatch.h: replacements
from GNU glob.tar.gz
configure.in: glob changes.
Use POSIX glob replacement.
Allow --extension to be used in globbing environment. Don't search
for cats in alternate cat directory if no index.
* All Makefile.in: add standard (GNU coding) targets: all, clean,
mostlyclean, distclean, realclean, install, uninstall, TAGS, dist
Other configuration/goal modifications
* Makefile.in: force config.status to do selective re-creation
* src/zsoelim.l: cater for ".SH \f?NAME\f?"
* acconfig.m4 (AC_FUNC_PCLOSE), src/man.c (display): small changes
from Markus
* Makefile.in, README: change `make all' to equal `make nls=off'
rather than `make nls=all'
* include/Defines.in: move -DDEFAULT_MANROFFSEQ to
include/manconfig.h
* include/manconfig.h: change inline parsing. Use autoconf-2.2
Thu Mar 16 12:38:15 GMT 1995 Markus Armbruster (armbru@pond.sub.org)
* Version: 2.2a20
* zsoelim/zsoelim.l: general fixes
* configure.in: don't add -lc as library containing db routines.
* lib/glob.c: ultrix fixes
* lib/rename.c: replacement
* lib/strappend.c: small fix and copyright notice
Wed Mar 15 11:17:58 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/lexgrog.l: modifications to whatis parser, mainly for
stray cats.
* src/man.c (main): add drop_effective_privs() and
regain_effective_privs() around manpath configuration so that
users' `hidden' manpaths are found and used.
* substantial configuration changes regarding all Makefiles to
allow `alternate build directory' support. man_db may be built
in *any* directory. Aids multi-architecture builds and testing
of various configuration options.
* rationalised source files to #include "local_header" and
#include <system_header>. CPPFLAGS uses -I- to limit -I paths
to "" resolving only. Other alternate build directory mods.
* src/comp_src.h.in: moved to ./comp_src.h.in
src/manconfig.h, src/path.h.in: combined into ./manconfig.h.in
* *ensure* that lib/{regex,fnmatch,getopt}.h are only #included
if the replacement c source is used. Otherwise use system routines
and system headers.
* ./configure.in, acconfig.h, aclocal.m4 (AC_FUNC_PCLOSE,
BROKEN_PCLOSE): new autoconf macro
* gencat is not installed by default. (cd gencat && make install)
* tools/mkcatdirs: re-written
tools/checkman: new utility to check for duplicate manual pages
across manual page hierarchies.
* docs/INSTALL, README: new
* src/man.c (display): attempt to open tmp_cat_filename(), if
unable, don't try to save cat.
Sun Mar 12 18:12:13 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version 2.2a19
* all source (main): replace mkprogname(%s) with
xstrdup(basename(%s))
* src/util.c (strappend): remove
* lib/strappend.c: new
Mon Mar 6 20:05:27 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/man.c (--local): re-enable support for compressed local
files. eg `man -l foo.1.gz'
* src/man.c (make_roff_command): Check in alternate catdir then
mandir for external format script if ALT_EXT_FORMAT #defined.
* zsoelim/zsoelim.l: partial rewrite to mimick GNU soelim
`bad roff request' error behaviour.
Mon Mar 6 13:51:32 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/man.c: fix SEGV if arg --local used
* src/man.c (gripe_system): exit with errorcode of failed command
Sun Mar 5 20:54:13 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version 2.2a18
* src/catman.c (main): check individual cat directories for
existence and perms.
* src/man.c (commit_tmp_cat): fix SEGV
* src/man.c: NO_MAN_UPDATES & NO_MAN_CATS #defined code
regions for experimental CERN use, untested and incomplete.
* configure.in, src/Makefile, src/paths.h.in: undo bogus dependance
on NLS for output device=latin1.
* configure.in (--with-device=<device>): new option to select
default nroff output device. Test that nroff can handle selected
output device (if any).
Thu Mar 2 19:30:45 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/lexgrog.l (too_big), (add_str_to_whatis),
(add_char_to_whatis): new functions
(find_name): add extra argument.
add string bounds checking, add new condition to terminate NAME
section: <man_name>\n{W}*\n+.+
* src/check_mandirs.c, src/straycats.c, src/manconfig.h: change
callers of find_name().
* src/man.c (try_db_section): warn of re-cache failure, but don't
exit.
lots of changes/simplifications w.r.t. global/user hierarchies.
global_manpath == 1 for global hierarchy, global_manpath == 0 for
user. global_manpath is set once we know which hierarchy we are
displaying from.
Tue Feb 28 13:34:15 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/man.c (display): fix SEGV.
* src/util.c (strappend): allow realloc of NULL string.
* src/man.c: replace strappend(xstrdup("string"), ...) with
strappend(NULL, string, ...)
* src/straycats.c (check_for_stray): allow any supported
straycat compression extension if COMP_SRC is #defined.
Replace static buffers with dynamic.
* src/check_mandirs.c, src/whatis.c: replace static buffers
with dynamic.
* src/util.c: (mkdbname): new function.
src/*.c: replace static database[PATH_MAX] with mkdbname() calls.
Sun Feb 26 20:58:59 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version 2.2a17
* src/whatis.c: warn if no index or whatis db's available.
* src/man.c: Fixes to setuid/privs code regarding user manual
trees and ruid==0 from Markus.
* configure.in: add checks for AIX, USG, stdlib.h, MINIX, ISC_POSIX
* lib/glob.c: ensure that _POSIX_VERSION can be defined
Sun Feb 19 12:38:10 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version 2.2a16
* Various portability fixes provided by Philippe Defert
(defert@cern.ch)
* FSSTND changes regarding /usr, /var/catman searching
* Some header file re-arrangement to aid user configuration.
Sun Feb 12 15:00:44 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version 2.2a15
Sat Feb 4 10:54:21 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* man(1), manpath(5): revisions.
Thu Feb 2 23:36:20 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/catman.c (do_access): new
* src/man.c (do_chown): new
catman changes, don't do_prompt() if print_where==1
* src/manp.c: changed an !is_directory() to is_directory() != 1
Sat Jan 28 09:39:07 1995 Markus Armbruster (armbru@pond.sub.org)
* man.c: **changes** ??
Sun Jan 22 16:15:04 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version 2.2a14+
* configure.in, libdb/mydbm.h libdb/db_gdbm.c: if using gdbm,
explicitly test for gdbm_exists() rather than use header #defines.
* man/man1/mandb.man1, man/man1/catman.man1: moved to man/man8 and
renamed.
* apropos(1), whatis(1), manpath(1), zsoelim(1), catman(8),
mandb(8) manual pages: significant revisions.
Sat Jan 21 14:33:28 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* incorporate Markus' changes with my post 2.2a13 changes.
* src/version.c (ver): fix, use fprintf() instead of error().
Thu 22 Dec 1994 15:12:38 +0100 1994 Markus Armbruster (armbru@pond.sub.org)
* src/man.c (make_roff_command, make_display_command,
open_cat_stream, close_cat_stream, display,
find_cat_file, checked_system,
get_preprocessors): new functions
* src/man.c (format_and_display, format_and_display_file,
display_cat_file, parse_roff_directive,
add_directive): removed functions
* src/man.c (glob_for_file, make_name): made consistent.
* src/util.c (strappend): new function.
(do_system_command): changed/renamed to do_system().
* src/manp.c (global_catpath): replaced/fixed
* src/security, src/fake_security (do_system_command_drop_privs):
renamed to do_system_dropped_privs().
* lib/rename.c: new file
Mon Jan 9 20:42:38 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
* nls/Makefile, man/Makefile: allow for bogus or non existent
native languages passed in $nls.
* src/man.c (do_prompt): replaced with less friendly but more
portable version.
* inline directives replaced with __inline__ to be more ansi.
Mon Dec 19 12:59:28 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.2a14
* aclocal.m4, configure.in: don't define variable nroff_device
* src/Makefile, src/paths.h.in: define GNU_NROFF_DEVICE.
If nls != off, GNU_NROFF_DEVICE=" -Tlatin1"
else, GNU_NROFF_DEVICE=" -Tascii"
* src/man.c, src/catman.c, src/security.c: #include <vfork.h> if
available. _exit() from child rather than exit().
Sun Dec 18 17:54:22 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/util.c (basename): removed
lib/basename.c: extracted from src/util.c
configure.in: check for/replace basename function if necessary.
* src/catman.c (add_arg): replace strdup() with xstrdup().
* soelim/soelim.*: renamed zsoelim/zsoelim.*
* manual pages: reflect soelim - zsoelim name change.
Fri Dec 16 12:17:48 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* configure.in: correctly determine db header and required library
* src/man.c (main, do_extern): pass manpath to whatis / apropos in
case man was called with -M or -m.
* src/catman.c (main): interrogate $MANSECT for manual sections.
* man/man1/catman.man1, man/man1/man.man1 ($MANSEC): replace with
the correct variable - $MANSECT.
* src/man.c: new option (-7 or --ascii) passes page through minimal
latin1 to ascii translator. Only useful for nroff written in ascii
and formatted with -Tlatin1.
* man/man1/man.man1: document it.
* src/man.c (make_command): new routine to piece together man's
system() call.
Thu Dec 15 13:52:42 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.2a13
* src/catman.c (parse_for_sec): only supply man with -L locale
arguments if locale!=0x0
* src/Makefile: fix libmandb.a rule
Wed Dec 14 22:49:59 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version 2.2a12
* major package restructure with creation of new subdirectories
for xcat and the db routines. Allowed split up of single db source
file into some constituent function parts.
* some Makefile restructuring to allow arbitrary ordering of
subdirectory builds.
* ./dblib/*, ./xcat/*: new or moved from src/.
* src/db_storage.c: moved and split up into ./dblib/*.c
src/mydbm.h, db_storage.h: moved into ./dblib
src/nls.h: moved to ./nls.h
src/xcat.c, src/xcat.l, src/Register: moved into ./xcat
Wed Dec 14 00:17:11 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/manconfig.h: #include <stddef.h> for size_t declaration.
* src/checkmandirs.c (reset_db_time): remove use of strerror() in
debug line for systems without it.
* src/manp.c: ensure no warnings given if quiet==1
Tue Dec 12 22:10:07 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/xcat.l: allow duplicate message id's to exist in single C
source file, do not duplicate in the relative message file or
src/man_db-nls.h. Warn of such duplications as they may be in error.
Tue Dec 12 19:05:21 GMT 1994 Markus Armbruster (armbru@pond.sub.org)
* configure.in: fix definition of BINDIR when --prefix not used
* src/man.c: replace "export foo=bar" with "foo=bar; export foo" in
system() command
* soelim/Makefile: do not backup old soelim before install
* lib/error.h: new
* convert all error message to the form
error(int exitcode, int errno, char *message)
where exitcode!=0 causes exit(exitcode) after message and errno!=0
causes the error text to be appended to the message. All messages
have "<program_name>: " prepended.
* all C source: #include "../lib/error.h" and replace prognam with
program_name.
* src/db_storage.c (ndbm_flopen, btree_flopen): generalised
(ndbm_trun_open, btree_trunc_open): removed
(ndbm_flclose): new
* src/gripes.c: functions copied to relevant caller.
src/gripes.c, src/gripes.h: removed
Sun Dec 11 15:16:42 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.2a11 (not released)
* src/man.c (main): putenv("LESSCHARSET=latin1"), remove from
less_options[]
* src/lexgrog.l: translate \\[ ] (escaped space) to space,
accept '\" as *roff comment,
add a space at *roff end-of-line if necessary.
Sat Dec 10 21:37:41 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* man/man1/catman.man1: new
* soelim/soelim.man1: new
* src/man.c (display_cat_file): if (COMP_SRC), support straycats
with any supported compression extension or none at all.
src/man.c (make_cat_file): replace execle() with execve().
* src/catman.c: added ARG_MAX support and use execve() instead of
system(). This should now behave on systems with small execve()
argument capacity by batching more, but smaller, man jobs.
* Makefile: `make all' now equates to `make nls=all'
Thu Dec 8 00:03:12 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.2a10
* src/catman.c: new utility.
src/man.c (main): minor changes wrt --catman flag.
* src/paths.h.in (MAN_BIN): add definition for catman.
* dvi/: provide dvi files of the packages' manual pages.
Tue Dec 6 20:58:19 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* man/man.man1: addition of EXAMPLES section.
* src/man.c (do_prompt): change message.
src/man.c (need_to_rerun): make -u really force an update.
src/checkmandirs.c (reset_db_time): new function.
* src/mydbm.h, src/db_storage.c (ndbm_flopen, ndbm_trunc_flopen):
provide file locking mechanism for ndbm.
src/db_storage.c (btree_trunc_flopen): renamed (btree_trunc_open),
add mode argument to open() call.
* src/db_storage.c (make_content): add `static' to declaration of
(dash).
* src/man.c (try_db_section): ensure db found file entry is
consistent with the physical file, if not, update the db entry
before proceeding. Cache consistency should be getting much better
in a wide variety of circumstances now. This check is not performed
for straycats.
Tue Dec 6 12:05:57 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* man/man.man1, man/mandb.man1: large changes.
* aclocal.m4, configure.in (AC_PROG_GNU_ROFF): test for GNU nroff
src/man.c: Do not use col with GNU nroff -Tlatin1 as (a) it is not
needed: see grotty(1) and (b) it is not 8 bit clean. continuation
dashes should now reappear.
Wed Nov 23 16:49:48 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/check_mandirs.c (test_manfile): Provide better checking for
the existence of both foo.1 and foo.1.gz type problems. This should
catch any problems earlier and relieve the db interface code of the
job of identifying such problems.
* src/man.c (manopt_to_env): cater for $MANOPT option arguments
that contain spaces (for -r).
src/man.c (man_getopt): revise, change duplicate option behaviour,
modify -[tTZ] handling and add option -D.
src/man/man1/man.man1: document.
* src/man.c: create LESS_OPTS and LESS_PROMPT and move their
definitions to src/paths.h[.in].
* configure.in: append -s by default to whatever pager is found.
favour db.h and -ldb above gdbm.h and -lgdbm.
N.B.
db creates index.bt
gdbm creates index.db
ndbm creates index.dir and index.pag
Wed Nov 23 16:46:59 GMT 1994 Zoltan Hidvegi (hzoli@cs.elte.hu)
* src/man.c: changes relating to (less_options) and (prompt). Add
command line support for less' prompt: option -r.
* man/man1/man.man1: document it.
Sat Nov 19 20:19:39 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.2a9
* src/mydbm.h, src/db_storage.c: incorporate completely new
database type: a binary tree method using the Berkeley db-1.85.1
library. Currently experimental and is not used by default, it has
the potential of enhanced speed and easy maintenance as it allows
storage of identical keys, thus reducing the amount of work necessary
to store and lookup multi sectional manual pages such as manpath.1
and manpath.5. During initial tests, the `walk through' algorithm,
used in apropos searches was 65% faster and the general database
open function is 100% faster when compared with gdbm-1.7.3.
* src/whatis.c (apropos): #define-optimised for btree database type.
* src/convert_name.c (convert_name): reorder actions to stop certain
catfiles ending up with a double compression extension, for
instance: foo.1.gz.gz.
* src/Makefile, src/man.c: enable -DNO_DEFAULT_TBL_OR_COL as an
experiment.
Fri Nov 18 21:00:47 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.2a8 (not released)
* configure.in (config_file, config_prefix): Fix behaviour.
* src/*.[cl], soelim/soelim.l:
s,malloc,xmalloc,g
s,realloc,xrealloc,g
s,strdup,xstrdup,g
src/manconfig.h: remove redefinitions of malloc, realloc and strdup.
Thu Nov 17 22:01:11 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/lexgrog.l: changed catfile whatis extraction rules to be a
little more forgiving. Increased char array size from 1024 to 2048.
* mkcatdirs: shell script to create relative cat dirs.
* src/$PROGS: replaced all occurances of `optional_argument' with
`required_argument' in (long_options).
* src/man.c, src/compression.c, src/straycats.c: ensure that a
failed child process is recognised and dealt with (normally exit(0)).
* src/man.c (make_cat_file): removed need to filter-then-copy if not
setuid. [untested]
* src/man.c, src/mandb.c (main): optional profiling support if
__profile__ defined.
* configure.in (config_file, config_prefix): don't work unless
--prefix=<something> is a command line option, temporarily setting
them to /etc/man_db.config and /etc respectively.
Wed Nov 16 20:34:54 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.2a7
* src/man.c (format_and_display_file): Fix bug which caused
`man -l -' to fail. Produce sensible error message when -l file
is inaccessable. Allow compressed manual pages to be specified when
using -l (must have correct extension)
* soelim/soelim.l (main): ensure (progname) is the basename of
argv[0] .
* src/manpath.c (main): remove local declaration of (quiet).
add `--global' option.
Wed Nov 16 20:29:20 GMT 1994 Markus Armbruster (armbru@pond.sub.org)
* configure.in: if $prefix=/usr, put config file in /etc else
put it in $prefix/etc
src/manconfig.h (CONFIG_FILE): move to paths.h.in
* src/nls.h (LC_MESSAGES): define as (LC_ALL) in all cases where
(LC_MESSAGES) is not defined in <locale.h>
* src/lexgrog.l: #include "manconfig.h" to redefine strdup() to
xstrdup()
Tue Nov 15 21:38:19 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/manp.c (is_global_mandir): new
src/man.c (locate_page): use it instead of (global_catpath)
* src/*.h: add suitable predicates to function prototype
declarations
moved all function declarations to header files
src/compression.h.in: renamed to comp_src.h.in
Mon Nov 14 18:17:48 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.2a6
* src/hashtable.c, src/hashtable.h (struct nlist): replaced
(union) member with (void *) and simplified. Modified users.
* src/man.c (make_cat_file): fixed NULL ptr reference in call to
(execle)
src/man.c: determined and fixed memory leaks using Checker.
Mon Nov 14 03:33:37 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/db_storage.c (replace_if_necessary, split_data,
list_extensions): new
src/db_storage.c (free_content): replaced with (free_mandata_struct)
all callers changed
src/db_storage.c (split_content_keep, split_content_temp): replaced
with (split_content)
Sun Nov 13 13:50:46 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/nls.h: change of macros, add (NLS_INIT, EXIT_FUNC)
src/*.c: removed (NLS_CLOSE) macros, adjustments due to above
src/version.c (close_catalogue): new
configure.in (AC_HAVE_FUNCS): (atexit, on_exit)
* getmandbver.c: removed
Sat Nov 12 14:18:02 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/security.h: new, contains security macros from src/manconfig.h
src/manconfig.h: removed security macros
src/security.c, src/security.h: replaced (SYSV_SAVED_IDS) with
(BROKEN_LINUX_SAVED_IDS)
* src/paths.h.in, src/compression.h.in, configure.in: changed
compression defines
src/paths.h.in: defined (STD_SECTIONS), got rid of (MANPATH_MAIN)
src/*.c: removed all (MANPATH_MAIN) defines
configure.in: added (COMP_CAT) and (COMP_SRC) definitions
src/manconfig.h: removed (COMP_SRC) definition
* All manual pages: Fixed to be compatible with native *roff
implementations having a request argument limit of 6
* src/db_storage.c (gripe_extract_data, gripe_corrupt_data):
new routines
* All Makefiles: add (exec_prefix, mandir, bindir) where necessary
Sat Nov 12 13:38:59 GMT 1994 Markus Armbruster (armbru@pond.sub.org)
* soelim/Makefile (install): made more portable
* src/manconfig.h: changes to (POSIX_SAVED_IDS) definition
* src/man.c (main): removed unnecessary #ifdef conditions regading
(SECURE_MANUID)
Sat Nov 12 13:24:17 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/ult_src.c (ult_src): no longer follow an absolute .so include
src/ult_src.c (test_for_include): new
Fri Nov 11 10:16:32 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/man.c (manopt_to_env): generalised
* src/man.c (do_extern): removed (gripe_alloc) call,
modified callers
src/manp.c: removed (gripe_alloc) calls, general tidy
src/gripes.c (gripe_alloc): removed
* src/ult_src.c (ult_src): fixed loop when (buf) != NULL
changed absolute .so include actions
configure.in (AC_HAVE_FUNCS): removed (memmove)
* src/mydbm.h (copy_datum): added references
src/db_storage.c (copy_datum): added function
Fixes for `native ndbm' data corruption by Markus Armbruster
* src/Makefile: removed dbver.o as dependency of manpath
* aclocal.m4 (AC_FUNC_SPRINTF_COUNT): new file and macro
configure.in: use it
acconfig.h: add (SPRINTF_CHARCOUNT)
src/check_mandirs (add_dir_entries): use it
src/whatis.c (display): use it
* src/check_mandirs.c (test_mandirs): added a (free(exists))
* src/straycats.c (check_for_stray): Fixes regarding straycats
with no compression extension
Fri Nov 11 00:29:15 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* lib/xmalloc.c, lib/xstrdup.c, lib/error.c: replaced
lib/strdup.c: removed
lib/strstr.c: replaced
lib/strsep.c, lib/strspn.c, lib/strcspn.c, lib/ansidecl.h: new
configure.in (AC_REPLACE_FUNCS): with respect to above
* src/check_mandirs.c (testmandirs): (free_hashtab) only if
necessary
Thu Nov 10 11:07:52 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* Version: 2.2a5
* src/man.c (usage, man_getopt, parse_roff_directive, ditroff):
add `-Z' option
man/man1/man.man1: document it
Wed Nov 9 20:16:35 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* configure.in (prefix, nroff, neqn, groff, soelim, CFLAGS,
LDFLAGS): portability changes.
Suggestions from Markus Armbruster <armbru@pond.sub.org>
gencat/Makefile (CFLAGS, LDFLAGS): definitions removed
* soelim/Makefile (install): procedural changes
* src/ult_src.c (ult_softlink): changes regarding S_ISLNK
* src/manconfig.h: #define __inline
* src/man.c, src/whatis.c, src/nls.c (LC_MESSAGES): define
as LC_ALL if necessary
Tue Nov 8 23:17:22 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
* src/version.c (ver): aesthetic changes
* src/man.c, src/whatis.c, src/manpath.c, src/mandb.c (usage, ver):
calling changes
* src/version.h, src/update_db: removed
* src/convert_name.c (conver_name): argument changes
src/man.c (format_and_display): caller of above changed
(need_to_rerun, locate_page): new functions to split (man)
(format_and_display_nosave): renamed to format_and_display_file
* soelim/soelim.l (usage, ver): new functions
removal of NLS dependence
* Version: 2.2a4
|