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
|
/*
* help.c: The help, version and license screens.
*
*
* Copyright (c) 1994, 95, 96, 1997, 2000, 2011 Thomas Esken
* Copyright (c) 2010, 2011 Free Software Foundation, Inc.
*
* This software doesn't claim completeness, correctness or usability.
* On principle I will not be liable for ANY damages or losses (implicit
* or explicit), which result from using or handling my software.
* If you use this software, you agree without any exception to this
* agreement, which binds you LEGALLY !!
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the `GNU General Public License' as published by
* the `Free Software Foundation'; either version 3, or (at your option)
* any later version.
*
* You should have received a copy of the `GNU General Public License'
* along with this program; if not, write to the:
*
*/
/*
* Include header files.
*/
#include "tailor.h"
#if HAVE_CTYPE_H
# include <ctype.h>
#endif
#include "common.h"
#if USE_RC
# include "rc-defs.h"
#endif /* USE_RC */
#include "globals.h"
#include "hd-defs.h"
#include "tty.h"
#include "utils.h"
#include "help.h"
/*
* static functions prototypes.
*/
__BEGIN_DECLARATIONS
/*
************************************************** Defined in `help.c'.
*/
static int gmt_timezone_value __P_ ((int hour));
static const char *get_longopt_description __P_ ((const int longopt_symbolic,
const Bool with_larglist));
static void my_bug_report_address __P_ ((FILE * fp));
static void my_copyright __P_ ((FILE * fp, const Bool with_short_licence));
static void my_help_head_text __P_ ((FILE * fp));
static void print_compiler_info __P_ ((FILE * fp));
__END_DECLARATIONS
/*
* static variables definitions.
*/
/* Compiler infotext. */
static const char *compiler_info[] =
{ N_("Compiled with %s%s for %s%s%s%s") };
/*
The table used to inform about the supported date formats is a vector of
`Di_struct' terminated by an element containing a `di_info' which is zero!
*/
static const Di_struct info_date_format[] = {
/*
{ char *di_info, char di_1format, char di_2format },
*/
{N_("# Day number (must be defined)"), DFORMAT_CHAR, DAYNR_CHAR},
{N_("# Year number (must be defined)"), DFORMAT_CHAR, YEARNR_CHAR},
{N_("# Weekday name (may be defined)"), DFORMAT_CHAR, WDNAME_CHAR},
{N_("Month group (exactly one member must be defined):"), '\0', '\0'},
{N_("# Month number"), DFORMAT_CHAR, MONTHNR_CHAR},
{N_("# Month name"), DFORMAT_CHAR, MONTHNAME_CHAR},
{N_("Highlighting group (all members must be defined):"), '\0', '\0'},
{N_("Start of highlighting sequence/marking character"), DFORMAT_CHAR,
HLS1S_CHAR},
{N_("End of highlighting sequence/marking character"), DFORMAT_CHAR,
HLS1E_CHAR},
{N_("Character replacement:"), '\0', '\0'},
{N_("Space/blank ('%c') character"), PSEUDO_BLANK, ' '},
{N_("Underscore ('%c') character"), QUOTE_CHAR, PSEUDO_BLANK},
{N_("Percent ('%c') character"), QUOTE_CHAR, DFORMAT_CHAR},
{N_("Backslash ('%c') character"), QUOTE_CHAR, QUOTE_CHAR},
{N_("All format elements marked by # may optionally"), '\0', '\0'},
{N_("contain a format instruction, which template is like:"), '\0', '\0'},
{N_("[ALIGNMENT [SIGN] [ZERO] WIDTH [STYLE] [SUFFIX] FORMAT]"), '\0', '\0'},
{N_("ALIGNMENT group (exactly one member must be defined):"), '\0', '\0'},
{N_("Field contents placed at the left margin using width WIDTH"),
FLEFT_CHAR, ' '},
{N_("Field contents placed in centered manner using width WIDTH"),
FCENTER_CHAR, ' '},
{N_("Field contents placed at the right margin using width WIDTH"),
FRIGHT_CHAR, ' '},
{N_("SIGN (may be defined):"), '\0', '\0'},
{N_("Numerical value is provided with leading sign"), FSIGN_CHAR, ' '},
{N_("ZERO (may be defined):"), '\0', '\0'},
{N_("Numerical value is filled with leading zero(es)"), FLZERO_CHAR, ' '},
{N_("WIDTH (must be defined):"), '\0', '\0'},
{N_("Field has the width N (%d...%d)"), 'N', '\0'},
{N_("STYLE group (exactly one member may be defined):"), '\0', '\0'},
{N_("Field contents is converted to upper-case letters"), FUPPER_CHAR, ' '},
{N_("Field contents is converted to lower-case letters"), FLOWER_CHAR, ' '},
{N_("Field contents is converted to capitalized words"), FWORD_CHAR, ' '},
{N_("SUFFIX (may be defined):"), '\0', '\0'},
{N_("Numerical value is provided with an ordinal number suffix"),
FSUFFIX_CHAR, ' '},
{N_("FORMAT group (exactly one member must be defined):"), '\0', '\0'},
{N_("Field contents is not cut after position WIDTH"), FVAR_CHAR, ' '},
{N_("Field contents is cut after position WIDTH"), FFIX_CHAR, ' '},
{NULL, '\0', '\0'}
};
#if USE_RC
/*
The table used to inform about the characters used in the
%? inclusive/exclusive day special texts is a vector of
`Ed_struct' terminated by an element containing an `ed_info' which is zero!
*/
static const Ed_struct info_exclusive_day[] = {
/*
{ char ed_id, char *ed_info },
*/
{RC_EX_LHDY_CHAR, N_("legal holidays")},
{RC_EX_AHDY_CHAR, N_("holidays")},
{RC_EX_MON_CHAR, N_("Mondays")},
{RC_EX_TUE_CHAR, N_("Tuesdays")},
{RC_EX_WED_CHAR, N_("Wednesdays")},
{RC_EX_THU_CHAR, N_("Thursdays")},
{RC_EX_FRI_CHAR, N_("Fridays")},
{RC_EX_SAT_CHAR, N_("Saturdays")},
{RC_EX_SUN_CHAR, N_("Sundays")},
{RC_EX_MON_2_THU_CHAR, N_("Mondays...Thursdays")},
{RC_EX_MON_2_FRI_CHAR, N_("Mondays...Fridays")},
{'\0', NULL}
};
#endif
/*
* Function implementations.
*/
void
my_help_on_help (fp, longopt, lopt_ambig, cols)
FILE *fp;
const char *longopt;
const Bool lopt_ambig;
const int cols;
/*
Prints the "help on help" text to file `fp' using the central output
function `print_text()', and uses the global text buffer `s1' internally.
If delivered `lopt_ambig' is TRUE, only display the names of all
longoptions stored in `lopt' structure member `long_name', which
are equal to delivered `longopt'.
*/
{
auto const Lopt_struct *ptr_lopt = lopt;
register const int filler_blanks = 2;
register const int len_longopt = (int) strlen (longopt);
register int len_line;
register int len_string;
sprintf (s1, _("%s: Use `%s %s' with one of these arguments"),
prgr_name, prgr_name, get_longopt_description (SYM_LONG_HELP2,
TRUE));
print_text (fp, s1);
print_text (fp, s1);
for (len_line = 0; len_line < filler_blanks; len_line++)
s1[len_line] = ' ';
s1[len_line] = '\0';
if (lopt_ambig)
{
while (tolower (*ptr_lopt->long_name) < tolower (*longopt))
ptr_lopt++;
while (strncasecmp
(longopt + 1, ptr_lopt->long_name + 1, len_longopt - 1))
ptr_lopt++;
}
while (ptr_lopt->long_name != NULL)
{
len_string = (int) strlen (ptr_lopt->long_name) + 1;
if ((ptr_lopt + 1)->long_name != NULL)
len_string++;
if (len_line + len_string >= cols)
{
print_text (fp, s1);
for (len_line = 0; len_line < filler_blanks; len_line++)
s1[len_line] = ' ';
s1[len_line] = '\0';
}
strcat (s1, " ");
strcat (s1, ptr_lopt->long_name);
if ((ptr_lopt + 1)->long_name != NULL)
{
if (lopt_ambig
&& strncasecmp (longopt, (ptr_lopt + 1)->long_name,
len_longopt))
break;
strcat (s1, ",");
len_line += len_string;
}
ptr_lopt++;
}
print_text (fp, s1);
}
void
my_extended_help (fp, longopt_symbolic)
FILE *fp;
const int longopt_symbolic;
/*
Prints the "extended help" text to file `fp' using the central
output function `print_text()', and uses the global text buffers
`s1' and `s2' internally.
If `longopt_symbolic' is set to SYM_NIL, the complete text
is shown, otherwise the text corresponding to SYM_??? only!
*/
{
#if USE_RC
auto const Ed_struct *ptr_info_exclusive_day = info_exclusive_day;
#endif
auto const Cc_struct *ptr_cc_holidays = cc_holidays;
auto Df_struct *ptr_date_format = supported_date_format;
auto const Di_struct *ptr_info_date_format = info_date_format;
auto Greg_struct *ptr_greg = greg_reform_date;
auto char *ptr_env;
if (longopt_symbolic == SYM_NIL)
{
my_help_head_text (fp);
print_text (fp, s1);
strcpy (s1, _("OPTION"));
print_text (fp, s1);
}
switch (longopt_symbolic)
{
case SYM_NIL:
case SYM_HELP:
sprintf (s1, "%s? %s", SWITCH,
get_longopt_description (SYM_HELP, TRUE));
print_text (fp, s1);
sprintf (s1, "%sh %s", SWITCH,
get_longopt_description (SYM_HELP, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Display help text and quit program"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_LONG_HELP1:
case SYM_LONG_HELP2:
sprintf (s1, "%s?? %s", SWITCH,
get_longopt_description (SYM_LONG_HELP1, TRUE));
print_text (fp, s1);
sprintf (s1, "%shh %s", SWITCH,
get_longopt_description (SYM_LONG_HELP1, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_LONG_HELP2, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Display extended help text and quit program"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_LICENSE1:
case SYM_LICENSE2:
case SYM_LICENSE3:
sprintf (s1, "%sL %s", SWITCH,
get_longopt_description (SYM_LICENSE1, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_LICENSE2, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_LICENSE3, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Display software license and quit program"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_VERSION:
sprintf (s1, "%sV %s", SWITCH,
get_longopt_description (SYM_VERSION, TRUE));
print_text (fp, s1);
strcpy (s1,
_(" Display version information and quit program"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_EXIT_STAT_HELP_NON_ZERO:
sprintf (s1, " %s",
get_longopt_description (SYM_EXIT_STAT_HELP_NON_ZERO, TRUE));
print_text (fp, s1);
sprintf (s1,
_(" Set EXIT status of program to %d on `%s' etc."),
ERR_EXIT_INFO_TEXTS_NON_ZERO,
get_longopt_description (SYM_HELP, FALSE));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_RESPONSE_FILE:
sprintf (s1, "%sR %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_RESPONSE_FILE, TRUE));
print_text (fp, s1);
sprintf (s1,
_(" Create response file for the `%cFILE' option"),
RSP_CHAR);
print_text (fp, s1);
sprintf (s1,
_(" %-3s = Store arguments of command line in file %s"),
larg_lit, larg_lit);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#ifdef GCAL_SHELL
case SYM_SCRIPT_FILE:
sprintf (s1, "%sS %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_SCRIPT_FILE, TRUE));
print_text (fp, s1);
sprintf (s1,
_
(" Create shell script which contains the arguments of command line"));
print_text (fp, s1);
sprintf (s1, _(" %-3s = File name of the shell script"), larg_lit);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#endif
#if USE_RC
case SYM_DATE_VARIABLE:
sprintf (s1, "%sv %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_DATE_VARIABLE, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Define global date variable(s) \"DVAR->a...d|f...s|u...|z\""));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = \"DVAR%s%s%s\" definitions separated by `%s' characters"),
larg_lit, RC_VAR_ASSIGN, mm_lit, dd_lit, SEP);
print_text (fp, s1);
sprintf (s1,
_
(" E.g. %sv a%s1127%sb%s054 Set `a' to Nov 27 and `b' to May 4"),
SWITCH, RC_VAR_ASSIGN, SEP, RC_VAR_ASSIGN);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_extern_static_DVARS:
sprintf (s1, " %s",
get_longopt_description (SYM_extern_static_DVARS, TRUE));
print_text (fp, s1);
strcpy (s1,
_(" Export local date variables from file to file"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_TEXT_VARIABLE:
sprintf (s1, "%sr %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_TEXT_VARIABLE, TRUE));
print_text (fp, s1);
sprintf (s1,
_
(" Define global text variable(s) \"TVAR->%ca...%cz\""),
RC_TVAR_CHAR, RC_TVAR_CHAR);
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = \"TVAR%sTEXT\" definitions separated by `%s' characters"),
larg_lit, RC_VAR_ASSIGN, SEP);
print_text (fp, s1);
sprintf (s1,
_
(" E.g. %sr %ca%sfoo%s%cb%sbar Set `%ca' to `foo' and `%cb' to `bar'"),
SWITCH, RC_TVAR_CHAR, RC_VAR_ASSIGN, SEP, RC_TVAR_CHAR,
RC_VAR_ASSIGN, RC_TVAR_CHAR, RC_TVAR_CHAR);
print_text (fp, s1);
sprintf (s1,
_
(" = \"TVAR[%s|%c%s]COMMAND\" definitions separated by `%s' characters"),
RC_TVAR_ICMD_ASSIGN, QUOTE_CHAR, RC_TVAR_UCMD_ASSIGN, SEP);
print_text (fp, s1);
sprintf (s1,
_
(" E.g. %sr %ca%sfoo Assign output of command `foo' to `%ca'"),
SWITCH, RC_TVAR_CHAR, RC_TVAR_ICMD_ASSIGN, RC_TVAR_CHAR);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_extern_static_TVARS:
sprintf (s1, " %s",
get_longopt_description (SYM_extern_static_TVARS, TRUE));
print_text (fp, s1);
strcpy (s1,
_(" Export local text variables from file to file"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_FILTER_DAY:
sprintf (s1, "%sD %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_FILTER_DAY, TRUE));
print_text (fp, s1);
sprintf (s1,
_
(" Display only those fixed dates, whose date is not excluded by %s"),
larg_lit);
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = One or more of the following characters. If character"),
larg_lit);
print_text (fp, s1);
strcpy (s1,
_
(" is a LOWER-CASE-LETTER, it means a non-exclusion!"));
print_text (fp, s1);
do
{
sprintf (s1, _(" %c = Exclusion of all %s"),
ptr_info_exclusive_day->ed_id,
_(ptr_info_exclusive_day->ed_info));
print_text (fp, s1);
}
while ((++ptr_info_exclusive_day)->ed_info != (char *) NULL);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_FILTER_PERIOD:
sprintf (s1, "%sP %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_FILTER_PERIOD, TRUE));
print_text (fp, s1);
sprintf (s1,
_
(" Display only those fixed dates, whose date is not excluded by %s"),
larg_lit);
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = List of `%c[DATE][%c[DATE]]' and/or `%c[DATE][%c[DATE]]'"),
larg_lit, RC_IDATE_CHAR, RC_DRANGE_CHAR, RC_EDATE_CHAR,
RC_DRANGE_CHAR);
print_text (fp, s1);
sprintf (s1, _(" expressions separated by `%s' characters"),
SPLIT_SEP);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_FILTER_TEXT:
sprintf (s1, "%sI %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_FILTER_TEXT, TRUE));
print_text (fp, s1);
sprintf (s1,
_
(" Display only those fixed dates, whose text is matched by %s"),
larg_lit);
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = Any text respectively \"regular expression\" you like"),
larg_lit);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_IGNORE_CASE:
sprintf (s1, " %s",
get_longopt_description (SYM_IGNORE_CASE, TRUE));
print_text (fp, s1);
sprintf (s1,
_
(" Ignore case distinctions if `%s' option is given"),
get_longopt_description (SYM_FILTER_TEXT, FALSE));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_REVERT_MATCH:
sprintf (s1, " %s",
get_longopt_description (SYM_REVERT_MATCH, TRUE));
print_text (fp, s1);
sprintf (s1,
_(" Revert the sense of matching of the `%s' option"),
get_longopt_description (SYM_FILTER_TEXT, FALSE));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#endif /* USE_RC */
case SYM_DEBUG:
sprintf (s1, " %s", get_longopt_description (SYM_DEBUG, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Display some debug information"));
print_text (fp, s1);
/*
*** Translators, please don't translate the word `internal',
*** because it is used textually AS IS as an option argument.
*/
sprintf (s1,
_
(" [%-3s] = internal Information if program internal maximums are reached"),
larg_lit);
print_text (fp, s1);
/*
*** Translators, please don't translate the words `handled' and `internal',
*** because they are used textually AS IS as an option argument.
*/
strcpy (s1,
_
(" = handled Like `internal' and file names which are handled"));
print_text (fp, s1);
/*
*** Translators, please don't translate the words `unhandled' and `internal',
*** because they are used textually AS IS as an option argument.
*/
strcpy (s1,
_
(" = unhandled Like `internal' and file names which are unhandled"));
print_text (fp, s1);
/*
*** Translators, please don't translate the words `all', `handled' and `unhandled',
*** because they are used textually AS IS as an option argument.
*/
strcpy (s1,
_
(" = all Like `handled' and `unhandled' together"));
print_text (fp, s1);
/*
*** Translators, please don't translate the words `abort' and `all',
*** because they are used textually AS IS as an option argument.
*/
strcpy (s1,
_
(" = abort Like `all' and abort if file name can't be handled"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_TYPE_OF_CALENDAR:
sprintf (s1, "%si[MOD] %s", SWITCH,
get_longopt_description (SYM_TYPE_OF_CALENDAR, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Use special format for calendar sheet"));
print_text (fp, s1);
strcat (s1,
_(" [MOD] = - Use standard format for calendar sheet"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ORTHODOX_CALENDAR:
sprintf (s1, "%sO %s", SWITCH,
get_longopt_description (SYM_ORTHODOX_CALENDAR, TRUE));
print_text (fp, s1);
strcpy (s1,
_(" Use leap year rule of Eastern Orthodox churches"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CALENDAR_WITH_WEEK_NUMBER:
sprintf (s1, "%sK %s", SWITCH,
get_longopt_description (SYM_CALENDAR_WITH_WEEK_NUMBER, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Provide calendar sheet with week numbers"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ISO_WEEK_NUMBER:
sprintf (s1, " %s",
get_longopt_description (SYM_ISO_WEEK_NUMBER, TRUE));
print_text (fp, s1);
sprintf (s1,
_(" Determine type of week numbers (actual: %s)"),
(iso_week_number) ? "ISO-8601:1988" : _("Standard"));
print_text (fp, s1);
/*
*** Translators, please don't translate the word `yes',
*** because it is used textually AS IS as an option argument.
*/
sprintf (s1, _(" %-3s = yes ISO-8601:1988 week numbers"),
larg_lit);
print_text (fp, s1);
/*
*** Translators, please don't translate the word `no',
*** because it is used textually AS IS as an option argument.
*/
strcpy (s1, _(" = no Standard week numbers"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_SUPPRESS_CALENDAR:
sprintf (s1, "%su %s", SWITCH,
get_longopt_description (SYM_SUPPRESS_CALENDAR, TRUE));
print_text (fp, s1);
strcpy (s1,
_(" Suppress output of calendar sheet explicitly"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#if USE_PAGER
case SYM_PAGER:
sprintf (s1, "%sp %s", SWITCH,
get_longopt_description (SYM_PAGER, TRUE));
print_text (fp, s1);
# ifdef GCAL_EPAGER
if (ext_pager != (char *) NULL)
sprintf (s1, _(" Direct output through external `%s' pager"),
(*ext_pager == *DIR_SEP) ? strrchr (ext_pager,
*DIR_SEP) +
1 : ext_pager);
else
strcpy (s1,
_(" Direct output through simple internal pager"));
# else /* !GCAL_EPAGER */
strcpy (s1, _(" Direct output through simple internal pager"));
# endif /* !GCAL_EPAGER */
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#endif /* USE_PAGER */
case SYM_DISABLE_HIGHLIGHTING:
sprintf (s1, "%sH no %s", SWITCH,
get_longopt_description (SYM_DISABLE_HIGHLIGHTING, TRUE));
print_text (fp, s1);
sprintf (s1, " %s=no",
get_longopt_description (SYM_HIGHLIGHTING, FALSE));
print_text (fp, s1);
strcpy (s1,
_
(" Disable highlighting of text, holiday resp., actual day"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_FORCE_HIGHLIGHTING:
sprintf (s1, "%sH yes %s", SWITCH,
get_longopt_description (SYM_FORCE_HIGHLIGHTING, TRUE));
print_text (fp, s1);
sprintf (s1, " %s=yes",
get_longopt_description (SYM_HIGHLIGHTING, FALSE));
print_text (fp, s1);
strcpy (s1,
_
(" Forces highlighting sequences if output is redirected/piped"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_HIGHLIGHTING:
sprintf (s1, "%sH %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_HIGHLIGHTING, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Set highlighting sequence pairs 1 (=actual day) and 2 (=holiday)"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = Highlighting sequence pairs separated by `%s' characters"),
larg_lit, SEP);
print_text (fp, s1);
sprintf (s1,
_
(" E.g. %sH \\x2%s\\xAE Use hex values 2 and AE for sequence 1"),
SWITCH, SEP);
print_text (fp, s1);
sprintf (s1,
_
(" E.g. %sH %s%s*%s* Use characters `*' and `*' for sequence 2"),
SWITCH, SEP, SEP, SEP);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_BLOCKS:
sprintf (s1, "%sb %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_BLOCKS, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Modify format of year calendar"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = 1|2|3|4|6|12 Number of blocks (actual: %d)"),
larg_lit, out_rows);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CALENDAR_DATES:
sprintf (s1, "%sj[MOD] %s", SWITCH,
get_longopt_description (SYM_CALENDAR_DATES, TRUE));
print_text (fp, s1);
strcpy (s1,
_(" Use consecutive day of year in calendar sheet"));
print_text (fp, s1);
strcpy (s1,
_
(" [MOD] = b Use both date notations (day of month+year)"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_HOLIDAY_DATES:
sprintf (s1, "%sjn[MOD] %s", SWITCH,
get_longopt_description (SYM_HOLIDAY_DATES, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Use consecutive day of year in eternal holiday list"));
print_text (fp, s1);
strcpy (s1,
_
(" [MOD] = b Use both date notations (day of month+year)"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#if USE_RC
case SYM_FIXED_DATES:
sprintf (s1, "%sjc[MOD] %s", SWITCH,
get_longopt_description (SYM_FIXED_DATES, TRUE));
print_text (fp, s1);
strcpy (s1,
_(" Use consecutive day of year in fixed date list"));
print_text (fp, s1);
strcpy (s1,
_
(" [MOD] = b Use both date notations (day of month+year)"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#endif
case SYM_STARTING_DAY:
sprintf (s1, "%ss %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_STARTING_DAY, TRUE));
print_text (fp, s1);
sprintf (s1, _(" Set starting day of week (actual: %s)"),
(use_short3_day_name) ? short3_day_name (start_day) :
short_day_name (start_day));
print_text (fp, s1);
if (use_short3_day_name)
sprintf (s1, " %-3s = 0|today | %d|%s | %d|%s | ... | %d|%s",
larg_lit, DAY_MIN, short3_day_name (DAY_MIN),
DAY_MIN + 1, short3_day_name (DAY_MIN + 1),
DAY_MAX, short3_day_name (DAY_MAX));
else
sprintf (s1, " %-3s = 0|today | %d|%s | %d|%s | ... | %d|%s",
larg_lit, DAY_MIN, short_day_name (DAY_MIN),
DAY_MIN + 1, short_day_name (DAY_MIN + 1),
DAY_MAX, short_day_name (DAY_MAX));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#ifdef GCAL_EMAIL
case SYM_MAIL:
sprintf (s1, " %s", get_longopt_description (SYM_MAIL, TRUE));
print_text (fp, s1);
# if !defined(AMIGA) || defined(__GNUC__)
ptr_env = getenv (ENV_VAR_MAILPROG);
if (ptr_env != (char *) NULL)
{
if (!*ptr_env)
ptr_env = MAIL_PRGR;
}
else
# endif /* AMIGA && !__GNUC__ */
ptr_env = MAIL_PRGR;
sprintf (s1, _(" Send output via `%s' program to user"),
ptr_env);
print_text (fp, s1);
if (email_adr != (char *) NULL)
ptr_env = email_adr;
# if !defined(AMIGA) || defined(__GNUC__)
else
ptr_env = getenv (ENV_VAR_MAILTO);
if (ptr_env != (char *) NULL)
{
if (!*ptr_env)
ptr_env = getenv (ENV_VAR_USER);
}
else
ptr_env = getenv (ENV_VAR_USER);
if (ptr_env != (char *) NULL)
{
if (!*ptr_env)
ptr_env = getenv (ENV_VAR_LOGNAME);
}
else
ptr_env = getenv (ENV_VAR_LOGNAME);
if (ptr_env != (char *) NULL)
{
if (!*ptr_env)
ptr_env = (char *) NULL;
}
# endif /* AMIGA && !__GNUC__ */
if (ptr_env == (char *) NULL)
ptr_env = _("UNKNOWN");
sprintf (s1,
_
(" [%-3s] = Email address, otherwise eMail is send to user `%s'"),
larg_lit, ptr_env);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#endif /* GCAL_EMAIL */
case SYM_HOLIDAY_LIST:
case SYM_DESC_HOLIDAY_LIST:
sprintf (s1, "%sn|N[MOD] %s", SWITCH,
get_longopt_description (SYM_HOLIDAY_LIST, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_DESC_HOLIDAY_LIST, TRUE));
print_text (fp, s1);
sprintf (s1,
_
(" Display eternal holiday list (Year in range: %d...%d)"),
EASTER_MIN, EASTER_MAX);
print_text (fp, s1);
strcpy (s1, _(" n = Legal days and memorial days"));
print_text (fp, s1);
strcpy (s1, _(" N = Legal days only"));
print_text (fp, s1);
sprintf (s1, _(" [MOD] = %s Descending sort order"), DES_LIT);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_SUPPRESS_HDLIST_SEP:
sprintf (s1, "%sG %s", SWITCH,
get_longopt_description (SYM_SUPPRESS_HDLIST_SEP, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Suppress leading blank line of eternal holiday list"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_EXCLUDE_HD_TITLE:
sprintf (s1, "%sX %s", SWITCH,
get_longopt_description (SYM_EXCLUDE_HD_TITLE, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Exclude title of eternal holiday list"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ASTRONOMICAL_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_ASTRONOMICAL_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with astronomical data"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_BAHAI_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_BAHAI_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Bah'i calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_BAHAI_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_BAHAI_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Bah'i calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CELTIC_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_CELTIC_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Celtic calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CHINESE_FLEXIBLE_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_CHINESE_FLEXIBLE_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Chinese flexible calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CHINESE_FLEXIBLE_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_CHINESE_FLEXIBLE_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Chinese flexible calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CHINESE_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_CHINESE_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Chinese calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CHINESE_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_CHINESE_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Chinese calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CHRISTIAN_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_CHRISTIAN_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Christian Western calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_COPTIC_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_COPTIC_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Coptic calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ETHIOPIC_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_ETHIOPIC_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Ethiopic calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_FRENCH_REVOLUTIONARY_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_FRENCH_REVOLUTIONARY_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with French Revolutionary calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_HEBREW_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_HEBREW_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Hebrew calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_HEBREW_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_HEBREW_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Hebrew calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_INDIAN_CIVIL_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_INDIAN_CIVIL_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Indian civil-calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ISLAMIC_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_ISLAMIC_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Islamic civil-calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ISLAMIC_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_ISLAMIC_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Islamic civil-calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_JAPANESE_FLEXIBLE_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_JAPANESE_FLEXIBLE_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Japanese flexible calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_JAPANESE_FLEXIBLE_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_JAPANESE_FLEXIBLE_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Japanese flexible calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_JAPANESE_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_JAPANESE_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Japanese calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_JAPANESE_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_JAPANESE_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Japanese calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_MULTICULTURAL_NEW_YEAR_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_MULTICULTURAL_NEW_YEAR_HDY,
TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with multicultural New Year holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_OLD_ARMENIC_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_OLD_ARMENIC_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Old-Armenic calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_OLD_EGYPTIC_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_OLD_EGYPTIC_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Old-Egyptic calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ORTHODOX_NEW_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_ORTHODOX_NEW_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Orthodox new-calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ORTHODOX_OLD_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_ORTHODOX_OLD_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Orthodox old-calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_PERSIAN_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_PERSIAN_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Persian Jalaali-calendar holidays"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_PERSIAN_MTH:
sprintf (s1, " %s",
get_longopt_description (SYM_PERSIAN_MTH, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with Persian Jalaali-calendar months"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ZODIACAL_MARKER_HDY:
sprintf (s1, " %s",
get_longopt_description (SYM_ZODIACAL_MARKER_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with zodiacal marker data"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CC_HDY:
sprintf (s1, "%sq %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_CC_HDY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Provide eternal holiday list with country specific holidays"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = Single country resp., territory code or a list of these,"),
larg_lit);
print_text (fp, s1);
sprintf (s1,
_
(" which are connected by `%s' characters. Countries/territories,"),
CONNECT_SEP);
print_text (fp, s1);
strcpy (s1,
_
(" marked by # have an incomplete recording of holidays"));
print_text (fp, s1);
do
{
sprintf (s1, _(" %-*s = Holidays in %s"),
#if HD_TOP20CC
2,
#else /* !HD_TOP20CC */
5,
#endif /* !HD_TOP20CC */
ptr_cc_holidays->cc_id, _(ptr_cc_holidays->cc_info));
print_text (fp, s1);
}
while ((++ptr_cc_holidays)->cc_info != (char *) NULL);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#if USE_RC
case SYM_ADJUST_VALUE:
sprintf (s1, " %s",
get_longopt_description (SYM_ADJUST_VALUE, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Set reference value for rise/set time respectively shadow length"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = Angular value respectively factor in range: %+.1f...%+.1f"),
larg_lit, -DEGS_PER_06_HOURS, DEGS_PER_06_HOURS);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ATMOSPHERE:
sprintf (s1, " %s",
get_longopt_description (SYM_ATMOSPHERE, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Set base data of Earth's atmosphere"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = Air pressure and temperature separated by `%s' character"),
larg_lit, SPLIT_SEP);
print_text (fp, s1);
sprintf (s1, _(" Air pressure in Millibar (actual: %.3f)"),
atm_pressure / 100.0);
print_text (fp, s1);
sprintf (s1,
_
(" Air temperature in degrees Celsius (actual: %+.3f)"),
atm_temperature);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_LIMIT:
sprintf (s1, " %s", get_longopt_description (SYM_LIMIT, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Limit rise/set times of Sun to the day"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_PRECISE:
sprintf (s1, " %s",
get_longopt_description (SYM_PRECISE, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Represent astronomical times and data with utmost precision"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_EXECUTE_COMMAND:
sprintf (s1, " %s",
get_longopt_description (SYM_EXECUTE_COMMAND, TRUE));
print_text (fp, s1);
sprintf (s1, _(" Execute `%c%c[%s]' shell commands"),
RC_SPECIAL_TEXT_CHAR, RC_SHELL_ESC_CHAR, larg_lit);
print_text (fp, s1);
sprintf (s1, _(" and \"TVAR[%s|%c%s]COMMAND\" assignments"),
RC_TVAR_ICMD_ASSIGN, QUOTE_CHAR, RC_TVAR_UCMD_ASSIGN);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#endif
case SYM_TIME_OFFSET:
sprintf (s1, " %s",
get_longopt_description (SYM_TIME_OFFSET, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Change base time of astronomical functions"));
print_text (fp, s1);
#if USE_RC
strcpy (s1, _(" respectively, change cycle-starting time"));
print_text (fp, s1);
#endif
if (time_hour_offset)
sprintf (s2, "%+d", gmt_timezone_value (time_hour_offset));
else
*s2 = '\0';
#if USE_RC
sprintf (s1,
_
(" %-3s = %c|%c|[%c|%c][%s|%s]MMMM|HH%s[MM] Time offset value (actual: %s%02d%s%02d == GMT%s)"),
larg_lit, RC_TIME_CHAR, RC_GMTIME_CHAR, RC_TIME_CHAR,
RC_GMTIME_CHAR, ASC_LIT, DES_LIT, time_sep,
(time_hour_offset + time_min_offset < 0) ? DES_LIT : ASC_LIT,
abs (time_hour_offset), time_sep, abs (time_min_offset), s2);
#else /* !USE_RC */
sprintf (s1,
_
(" %-3s = %c|[%c][%s|%s]MMMM|HH%s[MM] Time offset value (actual: %s%02d%s%02d == GMT%s)"),
larg_lit, staticTIME_CHAR, staticTIME_CHAR, ASC_LIT, DES_LIT,
time_sep,
(time_hour_offset + time_min_offset < 0) ? DES_LIT : ASC_LIT,
abs (time_hour_offset), time_sep, abs (time_min_offset), s2);
#endif /* !USE_RC */
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#if USE_RC
case SYM_CYCLE_END:
sprintf (s1, " %s",
get_longopt_description (SYM_CYCLE_END, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Change cycle-ending time"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = %c|%c|[%c|%c][%s|%s]MMMM|HH%s[MM] Ending time value (actual: %02d%s%02d)"),
larg_lit, RC_TIME_CHAR, RC_GMTIME_CHAR, RC_TIME_CHAR,
RC_GMTIME_CHAR, ASC_LIT, DES_LIT, time_sep,
(int) MM2HH (loop_end), time_sep,
(loop_end > SPECIAL_VALUE) ? loop_end % MINS_PER_HOUR : 0);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_CYCLE_STEP:
sprintf (s1, " %s",
get_longopt_description (SYM_CYCLE_STEP, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Change cycle-timestep"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = MMMM|HH%s[MM] Timestep value (actual: %02d%s%02d)"),
larg_lit, time_sep, (int) MM2HH (loop_step), time_sep,
loop_step % MINS_PER_HOUR);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
#endif
case SYM_TRANSFORM_YEAR:
sprintf (s1, " %s",
get_longopt_description (SYM_TRANSFORM_YEAR, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Change base year of calendar"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = [%s|%s]YYYY Year offset value (actual: %d)"),
larg_lit, ASC_LIT, DES_LIT,
(transform_year) ? transform_year : YEAR_MIN);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_GREG_REFORM:
sprintf (s1, " %s",
get_longopt_description (SYM_GREG_REFORM, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Set period of Gregorian Reformation"));
print_text (fp, s1);
sprintf (s1, _(" Actual respected period: %02d-%02d %s %0*d"),
greg->first_day, greg->last_day,
short_month_name (greg->month), len_year_max, greg->year);
print_text (fp, s1);
do
{
sprintf (s1, _(" %-*d%*s = Set period to: %02d-%02d %s %0*d"),
len_year_max, ptr_greg->year, 6 - len_year_max, "",
ptr_greg->first_day, ptr_greg->last_day,
short_month_name (ptr_greg->month), len_year_max,
ptr_greg->year);
print_text (fp, s1);
}
while ((++ptr_greg)->year);
sprintf (s1, _(" %-3s = %s%c%s%s%s%s%s%s Set period explicitly"),
larg_lit, yyyy_lit, *yyyy_lit, SPLIT_SEP, mm_lit, SPLIT_SEP,
dd_lit, SPLIT_SEP, dd_lit);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_DATE_FORMAT:
sprintf (s1, " %s",
get_longopt_description (SYM_DATE_FORMAT, TRUE));
print_text (fp, s1);
sprintf (s1,
_
(" Set order of date elements using the %s format text"),
larg_lit);
print_text (fp, s1);
sprintf (s1, _(" Actual: (%s) `%s' (%s)"),
(date_format->df_id ==
(char *) NULL) ? _("self-defined") : date_format->df_id,
date_format->df_format, _(date_format->df_info));
print_text (fp, s1);
do
{
sprintf (s1, _(" %-6s = Format is: `%s' (%s)"),
ptr_date_format->df_id, ptr_date_format->df_format,
_(ptr_date_format->df_info));
print_text (fp, s1);
}
while ((++ptr_date_format)->df_info != (char *) NULL);
sprintf (s1,
_
(" %-3s = Define individual format. Respected format elements are:"),
larg_lit);
print_text (fp, s1);
do
{
if (!ptr_info_date_format->di_1format)
sprintf (s1, " %s",
_(ptr_info_date_format->di_info));
else
{
if (ptr_info_date_format->di_1format != DFORMAT_CHAR)
{
if (ptr_info_date_format->di_2format)
sprintf (s2, _(ptr_info_date_format->di_info),
ptr_info_date_format->di_2format);
else
sprintf (s2, _(ptr_info_date_format->di_info), FWIDTH_MIN,
FWIDTH_MAX);
sprintf (s1, " %c%c = %s",
ptr_info_date_format->di_1format,
(ptr_info_date_format->
di_2format) ? ptr_info_date_format->
di_2format : ' ', s2);
}
else
sprintf (s1, " %c%c = %s",
ptr_info_date_format->di_1format,
ptr_info_date_format->di_2format,
_(ptr_info_date_format->di_info));
}
print_text (fp, s1);
}
while ((++ptr_info_date_format)->di_info != (char *) NULL);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_TRANSLATE_STRING:
sprintf (s1, " %s",
get_longopt_description (SYM_TRANSLATE_STRING, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Define translatable country specific special character pairs"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = UPPER-CASE-LETTER\"\"LOWER-CASE-LETTER... definitions"),
larg_lit);
print_text (fp, s1);
sprintf (s1,
_
(" E.g. a `%s%s%s%s%s%s%s%s' %-3s causes the correct conversion of"),
AAE, AE, OOE, OE, UUE, UE, SZ, SZ, larg_lit);
print_text (fp, s1);
strcpy (s1,
_
(" the preceding special characters in an individual date format,"));
print_text (fp, s1);
strcpy (s1,
_
(" which has a STYLE format instruction component, and that, how"));
print_text (fp, s1);
strcpy (s1,
_
(" they are used by the character set used in Germany"));
print_text (fp, s1);
default:
; /* Void */
}
#if USE_RC
if (longopt_symbolic == SYM_NIL)
{
print_text (fp, s1);
sprintf (s1, _("+++ FIXED DATES +++"));
print_text (fp, s1);
print_text (fp, s1);
}
switch (longopt_symbolic)
{
case SYM_NIL:
case SYM_TODAY:
case SYM_FIXED_DATES_LIST:
case SYM_DESC_FIXED_DATES_LIST:
sprintf (s1, "%sc|C[MOD] %s", SWITCH,
get_longopt_description (SYM_FIXED_DATES_LIST, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_DESC_FIXED_DATES_LIST, TRUE));
print_text (fp, s1);
sprintf (s1, " %s", get_longopt_description (SYM_TODAY, TRUE));
print_text (fp, s1);
# ifdef GCAL_SHELL
sprintf (s1,
_
(" Use standard resource file `.%s%s' for fixed date list"),
PACKAGE_NAME, RC_SUFFIX);
# else /* !GCAL_SHELL */
sprintf (s1,
_
(" Use standard resource file `%s%s' for fixed date list"),
PACKAGE_NAME, RC_SUFFIX);
# endif /* !GCAL_SHELL */
print_text (fp, s1);
strcpy (s1, _(" Implies period: Today"));
print_text (fp, s1);
strcpy (s1,
_
(" c = Display only those dates, for which fixed dates exists"));
print_text (fp, s1);
strcpy (s1,
_
(" C = Display those dates, for which fixed dates doesn't exist, too"));
print_text (fp, s1);
sprintf (s1, _(" [MOD] = %s Descending sort order"), DES_LIT);
print_text (fp, s1);
default:
; /* Void */
}
if (longopt_symbolic == SYM_NIL)
{
print_text (fp, s1);
strcpy (s1,
_
(" [MOD] = One or more of the following modifiers which are marked by #"));
print_text (fp, s1);
print_text (fp, s1);
}
switch (longopt_symbolic)
{
case SYM_NIL:
case SYM_HEADING_TEXT:
sprintf (s1, " %s",
get_longopt_description (SYM_HEADING_TEXT, TRUE));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = Heading/Title text used for fixed date list"),
larg_lit);
print_text (fp, s1);
sprintf (s1, _(" Actual: `%s'"),
rc_heading_text + 2);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_GROUPING_TEXT:
sprintf (s1, " %s",
get_longopt_description (SYM_GROUPING_TEXT, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # g[MOD] = Group fixed dates by day using text MOD"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
default:
; /* Void */
}
if (longopt_symbolic == SYM_NIL)
{
print_text (fp, s1);
strcpy (s1, _(" 1. Representation of text"));
print_text (fp, s1);
}
switch (longopt_symbolic)
{
case SYM_NIL:
case SYM_BIORHYTHM_AXIS_LEN:
sprintf (s1, " %s",
get_longopt_description (SYM_BIORHYTHM_AXIS_LEN, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" = Set width of the biorhythm text graphics"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = %d...%d Length of a single axis"),
larg_lit, BIO_AXIS_MIN, BIO_AXIS_MAX);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_MOONIMAGE_LINES:
sprintf (s1, " %s",
get_longopt_description (SYM_MOONIMAGE_LINES, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" = Set height of the Moon phase text graphics"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = %d...%d Total number of lines"),
larg_lit, MOONIMAGE_MIN, MOONIMAGE_MAX);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_INCLUDE_FILENAME:
sprintf (s1, " %s",
get_longopt_description (SYM_INCLUDE_FILENAME, TRUE));
print_text (fp, s1);
strcpy (s1,
_(" # a = Display origin of fixed date"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ALTERNATIVE_FORMAT:
sprintf (s1, " %s",
get_longopt_description (SYM_ALTERNATIVE_FORMAT, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # A = Display using alternative list format"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_INCLUDE_HOLIDAY:
sprintf (s1, " %s",
get_longopt_description (SYM_INCLUDE_HOLIDAY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # e = Include legal days and memorial days"));
print_text (fp, s1);
strcpy (s1, _(" # E = Include legal days only"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_INCLUDE_WEEK_NUMBER:
sprintf (s1, " %s",
get_longopt_description (SYM_INCLUDE_WEEK_NUMBER, TRUE));
print_text (fp, s1);
strcpy (s1, _(" # k = Display week number"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_OMIT_DATE_PART:
sprintf (s1, " %s",
get_longopt_description (SYM_OMIT_DATE_PART, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # o = Omit repeating date part of fixed dates"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_SUPPRESS_FDLIST_SEP:
sprintf (s1, " %s",
get_longopt_description (SYM_SUPPRESS_FDLIST_SEP, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # Q = Suppress leading blank line of fixed dates list"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_SUPPRESS_DATE_PART:
sprintf (s1, " %s",
get_longopt_description (SYM_SUPPRESS_DATE_PART, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # U = Suppress date part of fixed dates"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_SUPPRESS_TEXT_PART:
sprintf (s1, " %s",
get_longopt_description (SYM_SUPPRESS_TEXT_PART, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # J = Suppress text part of fixed dates"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_EXCLUDE_RC_TITLE:
sprintf (s1, " %s",
get_longopt_description (SYM_EXCLUDE_RC_TITLE, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # x = Exclude title of fixed date list"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_INCLUDE_CONS_NUMBER:
sprintf (s1, " %s",
get_longopt_description (SYM_INCLUDE_CONS_NUMBER, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # z = Display consecutive number of fixed date"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_ZERO_DATES:
sprintf (s1, " %s",
get_longopt_description (SYM_ZERO_DATES, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # Z = Display dates, for which fixed dates doesn't exist"));
print_text (fp, s1);
default:
; /* Void */
}
if (longopt_symbolic == SYM_NIL)
{
print_text (fp, s1);
strcpy (s1, _(" 2. Respected period"));
print_text (fp, s1);
}
switch (longopt_symbolic)
{
case SYM_NIL:
case SYM_LEAP_DAY:
sprintf (s1, " %s",
get_longopt_description (SYM_LEAP_DAY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" = Manage `29-FEBRUARY' in non-leap years"));
print_text (fp, s1);
/*
*** Translators, please don't translate the word `february',
*** because it is used textually AS IS as an option argument.
*/
sprintf (s1,
_
(" %-3s = february Respect at `28-FEBRUARY'"),
larg_lit);
print_text (fp, s1);
/*
*** Translators, please don't translate the word `march',
*** because it is used textually AS IS as an option argument.
*/
sprintf (s1,
_
(" %-3s = march Respect at `01-MARCH'"),
larg_lit);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_INCLUDE_TODAY:
sprintf (s1, " %s",
get_longopt_description (SYM_INCLUDE_TODAY, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # d = Include actual date if list of periods is generated"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_LIST_MODE:
sprintf (s1, " %s",
get_longopt_description (SYM_LIST_MODE, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" # l = Generate list of periods instead of a single period"));
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
default:
; /* Void */
}
switch (longopt_symbolic)
{
case SYM_NIL:
case SYM_PERIOD:
sprintf (s1, " %s",
get_longopt_description (SYM_PERIOD, TRUE));
print_text (fp, s1);
strcpy (s1, _(" # Nd = Single absolute day N"));
print_text (fp, s1);
sprintf (s1, _(" # %cdN = Single absolute day N"),
RC_NWD_CHAR);
print_text (fp, s1);
print_text (fp, s1);
strcpy (s1,
_(" # NMOD = Single day N relative to today"));
print_text (fp, s1);
sprintf (s1, _(" MOD = %s Forwards"), ASC_LIT);
print_text (fp, s1);
sprintf (s1, _(" = %s Backwards"), DES_LIT);
print_text (fp, s1);
print_text (fp, s1);
strcpy (s1, _(" # Nw = Complete week N"));
print_text (fp, s1);
strcpy (s1,
_
(" N = 0 1st week / last week of previous year"));
print_text (fp, s1);
strcpy (s1,
_
(" N = 1...52 1st...52nd week (always)"));
print_text (fp, s1);
strcpy (s1,
_
(" N = 53 53rd week (sometimes)"));
print_text (fp, s1);
strcpy (s1, _(" N = 99 Last week"));
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1, _(" # %s%s = Single day %s of month %s"),
mm_lit, dd_lit, dd_lit, mm_lit);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1,
_
(" # %s%sN = Single N'th weekday %s of month %s"),
mm_lit, www_lit, www_lit, mm_lit);
print_text (fp, s1);
sprintf (s1,
_
(" N = 1...4 1st...4th weekday %s (always)"),
www_lit);
print_text (fp, s1);
sprintf (s1,
_
(" N = 5 5th weekday %s (sometimes)"),
www_lit);
print_text (fp, s1);
sprintf (s1,
_(" N = 9 Last weekday %s"),
www_lit);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1, _(" # %cdN%s = Single N'th weekday %s"),
RC_NWD_CHAR, www_lit, www_lit);
print_text (fp, s1);
sprintf (s1,
_
(" N = 1...51 1st...51st weekday %s (always)"),
www_lit);
print_text (fp, s1);
sprintf (s1,
_
(" N = 52|53 52|53rd weekday %s (sometimes)"),
www_lit);
print_text (fp, s1);
sprintf (s1,
_(" N = 99 Last weekday %s"),
www_lit);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1,
_(" # %cwN%s = Single weekday %s of N'th week"),
RC_NWD_CHAR, www_lit, www_lit);
print_text (fp, s1);
sprintf (s1,
_
(" N = 0 %s which isn't located in 1st week"),
www_lit);
print_text (fp, s1);
sprintf (s1,
_
(" N = 1...51 %s of 1st...51st week (always)"),
www_lit);
print_text (fp, s1);
sprintf (s1,
_
(" N = 52|53 %s of 52|53rd week (sometimes)"),
www_lit);
print_text (fp, s1);
sprintf (s1,
_(" N = 99 %s of last week"),
www_lit);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1,
_
(" # %c%c[[%s|%s]N] = Single day N relative to Easter Sunday"),
RC_HDY_CHAR, RC_EASTER_CHAR, ASC_LIT, DES_LIT);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1,
_
(" # %c%c[%s|%s]N%s = Single N'th weekday relative to Easter Sunday"),
RC_HDY_CHAR, RC_EASTER_CHAR, ASC_LIT, DES_LIT, www_lit);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1,
_
(" # %c%c[[%s|%s]N] = Single day N relative to today's date"),
RC_HDY_CHAR, RC_TODAY_CHAR, ASC_LIT, DES_LIT);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1,
_
(" # %c%c[%s|%s]N%s = Single N'th weekday relative to today's date"),
RC_HDY_CHAR, RC_TODAY_CHAR, ASC_LIT, DES_LIT, www_lit);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1,
_
(" # %c?[[%s|%s]N] = Single day N relative to date variable"),
RC_HDY_CHAR, ASC_LIT, DES_LIT);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1,
_
(" # %c?[%s|%s]N%s = Single N'th weekday relative to date variable"),
RC_HDY_CHAR, ASC_LIT, DES_LIT, www_lit);
print_text (fp, s1);
print_text (fp, s1);
case SYM_TOMORROW:
sprintf (s1, " %s",
get_longopt_description (SYM_TOMORROW, TRUE));
print_text (fp, s1);
strcpy (s1, _(" # t|T = List tomorrow"));
print_text (fp, s1);
if (longopt_symbolic == SYM_TOMORROW)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_WEEK:
case SYM_END_OF_WEEK:
case SYM_START_OF_WEEK:
sprintf (s1, " %s", get_longopt_description (SYM_WEEK, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_END_OF_WEEK, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_START_OF_WEEK, TRUE));
print_text (fp, s1);
strcpy (s1, _(" # w|W[MOD] = List complete week"));
print_text (fp, s1);
sprintf (s1,
_
(" [MOD] = %s List tomorrow until ending day of week"),
ASC_LIT);
print_text (fp, s1);
sprintf (s1,
_
(" = %s List yesterday until starting day of week"),
DES_LIT);
print_text (fp, s1);
if (longopt_symbolic == SYM_WEEK
|| longopt_symbolic == SYM_END_OF_WEEK
|| longopt_symbolic == SYM_START_OF_WEEK)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_MONTH:
case SYM_END_OF_MONTH:
case SYM_START_OF_MONTH:
sprintf (s1, " %s", get_longopt_description (SYM_MONTH, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_END_OF_MONTH, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_START_OF_MONTH, TRUE));
print_text (fp, s1);
strcpy (s1, _(" # m|M[MOD] = List complete month"));
print_text (fp, s1);
sprintf (s1,
_
(" [MOD] = %s List tomorrow until ending day of month"),
ASC_LIT);
print_text (fp, s1);
sprintf (s1,
_
(" = %s List yesterday until starting day of month"),
DES_LIT);
print_text (fp, s1);
if (longopt_symbolic == SYM_MONTH
|| longopt_symbolic == SYM_END_OF_MONTH
|| longopt_symbolic == SYM_START_OF_MONTH)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_YEAR:
case SYM_END_OF_YEAR:
case SYM_START_OF_YEAR:
sprintf (s1, " %s", get_longopt_description (SYM_YEAR, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_END_OF_YEAR, TRUE));
print_text (fp, s1);
sprintf (s1, " %s",
get_longopt_description (SYM_START_OF_YEAR, TRUE));
print_text (fp, s1);
strcpy (s1, _(" # y|Y[MOD] = List complete year"));
print_text (fp, s1);
sprintf (s1,
_
(" [MOD] = %s List tomorrow until ending day of year"),
ASC_LIT);
print_text (fp, s1);
sprintf (s1,
_
(" = %s List yesterday until starting day of year"),
DES_LIT);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_RESOURCE_FILE:
sprintf (s1, "%sf|F %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_RESOURCE_FILE, TRUE));
print_text (fp, s1);
strcpy (s1,
_
(" Use alternative file(s) instead of standard resource file"));
print_text (fp, s1);
strcpy (s1, _(" Implies period: Today"));
print_text (fp, s1);
strcpy (s1,
_
(" f = Display only those dates, for which fixed dates exists"));
print_text (fp, s1);
strcpy (s1,
_
(" F = Display those dates, for which fixed dates doesn't exist, too"));
print_text (fp, s1);
sprintf (s1,
_
(" %-3s = Single file or list of files connected by `%s' characters"),
larg_lit, CONNECT_SEP);
print_text (fp, s1);
if (longopt_symbolic != SYM_NIL)
break;
/* Fallthrough. */
print_text (fp, s1);
case SYM_HERE_FILE:
sprintf (s1, "%s# %-3s %s", SWITCH, larg_lit,
get_longopt_description (SYM_HERE_FILE, TRUE));
print_text (fp, s1);
strcpy (s1, _(" Define additional resource file line"));
print_text (fp, s1);
sprintf (s1, _(" %-3s = Any possible resource file line"),
larg_lit);
print_text (fp, s1);
default:
; /* Void */
}
if (longopt_symbolic == SYM_NIL)
{
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1, _("%cDATE"), RC_ADATE_CHAR);
print_text (fp, s1);
strcpy (s1, _("Use given `DATE' instead of today's date"));
print_text (fp, s1);
sprintf (s1,
_
("Date format: %s[%s[%s|%s[N]]], %s%c%c|%c|DVAR[[%s|%s]N[%s]], %s%cdN[%s]"),
yyyy_lit, mm_lit, dd_lit, www_lit, yyyy_lit, RC_HDY_CHAR,
RC_EASTER_CHAR, RC_TODAY_CHAR, ASC_LIT, DES_LIT, www_lit,
yyyy_lit, RC_NWD_CHAR, www_lit);
print_text (fp, s1);
sprintf (s1,
_
(" %s%cwN[%s], month name[%s], weekday name[N] or %s"),
yyyy_lit, RC_NWD_CHAR, www_lit, dd_lit, dd_lit);
print_text (fp, s1);
}
#endif /* USE_RC */
if (longopt_symbolic == SYM_NIL)
{
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1, _("%cFILE"), RSP_CHAR);
print_text (fp, s1);
strcpy (s1, _("Preload options and commands from `FILE'"));
print_text (fp, s1);
print_text (fp, s1);
print_text (fp, s1);
strcpy (s1, _("COMMAND"));
print_text (fp, s1);
sprintf (s1, _("%s = Month in range: %d...%d"), mm_lit,
MONTH_MIN, MONTH_MAX);
print_text (fp, s1);
sprintf (s1,
_
(" or: month name | %s | %s%s | %s%s | %s%s"),
MONTH3_LIT, MONTH3_LIT, MONTH3_LIT, MONTH3_LIT, ASC_LIT,
MONTH3_LIT, DES_LIT);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1, _(" List: %s[%s%s]%s...%s%s[%s%s]"),
mm_lit, YEAR_SEP, yyyy_lit, MLIST_SEP, MLIST_SEP, mm_lit,
YEAR_SEP, yyyy_lit);
print_text (fp, s1);
sprintf (s1,
_
(" Range: %s[%s%s]%s%s[%s%s] | %s%s%s%s%s | %s %s%s%s"),
mm_lit, YEAR_SEP, yyyy_lit, MRANGE_SEP, mm_lit, YEAR_SEP,
yyyy_lit, mm_lit, YEAR_SEP, yyyy_lit, MRANGE_SEP, yyyy_lit,
mm_lit, yyyy_lit, MRANGE_SEP, yyyy_lit);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1, _("%s%*s = Year in range: %d...%d"),
yyyy_lit, 6 - len_year_max, "", YEAR_MIN, YEAR_MAX);
print_text (fp, s1);
print_text (fp, s1);
sprintf (s1, _(" List: [%s%s]%s%s...%s[%s%s]%s"),
mm_lit, FYEAR_SEP, yyyy_lit, YLIST_SEP, YLIST_SEP, mm_lit,
FYEAR_SEP, yyyy_lit);
print_text (fp, s1);
sprintf (s1,
_(" Range: [%s%s]%s%s[%s%s]%s | %s%s%s %s%s%s"),
mm_lit, FYEAR_SEP, yyyy_lit, YRANGE_SEP, mm_lit, FYEAR_SEP,
yyyy_lit, mm_lit, MRANGE_SEP, mm_lit, yyyy_lit, YRANGE_SEP,
yyyy_lit);
}
if (longopt_symbolic == SYM_NIL)
{
print_text (fp, s1);
print_text (fp, s1);
my_bug_report_address (fp);
}
}
void
my_basic_help (fp)
FILE *fp;
/*
Prints the "basic help" text to file `fp' using the central
output function `print_text()' and uses global text buffer
`s1' internally.
*/
{
my_help_head_text (fp);
sprintf (s1,
_(" %sh, %s Display this help text and quit program"),
SWITCH, get_longopt_description (SYM_HELP, TRUE));
print_text (fp, s1);
sprintf (s1, _(" %shh, %s Display extended help text and quit program"),
SWITCH, get_longopt_description (SYM_LONG_HELP2, TRUE));
print_text (fp, s1);
sprintf (s1,
_(" %sL, %s Display software license and quit program"),
SWITCH, get_longopt_description (SYM_LICENSE1, TRUE));
print_text (fp, s1);
sprintf (s1,
_(" %sV, %s Display version information and quit program"),
SWITCH, get_longopt_description (SYM_VERSION, TRUE));
print_text (fp, s1);
#if USE_PAGER
# ifdef GCAL_EPAGER
if (ext_pager != (char *) NULL)
sprintf (s1,
_
(" %sp, %s Direct output through external `%s' pager"),
SWITCH, get_longopt_description (SYM_PAGER, TRUE),
(*ext_pager == *DIR_SEP) ? strrchr (ext_pager,
*DIR_SEP) + 1 : ext_pager);
else
sprintf (s1,
_
(" %sp, %s Direct output through simple internal pager"),
SWITCH, get_longopt_description (SYM_PAGER, TRUE));
# else /* !GCAL_EPAGER */
sprintf (s1,
_
(" %sp, %s Direct output through simple internal pager"),
SWITCH, get_longopt_description (SYM_PAGER, TRUE));
# endif /* !GCAL_EPAGER */
#endif /* USE_PAGER */
print_text (fp, s1);
strcpy (s1, lopt_msg ());
print_text (fp, s1);
my_bug_report_address (fp);
}
void
my_license (fp)
FILE *fp;
/*
Prints the program-id and the license text to file `fp' using
the central output function `print_text()', and uses the global
text buffer `s1' internally.
*/
{
my_copyright (fp, FALSE);
strcpy (s1,
_
("This software doesn't claim completeness, correctness or usability."));
print_text (fp, s1);
strcpy (s1,
_
("On principle I will not be liable for ANY damages or losses (implicit"));
print_text (fp, s1);
strcpy (s1,
_
("or explicit), which result from using or handling my software."));
print_text (fp, s1);
strcpy (s1,
_
("If you use this software, you agree without any exception to this"));
print_text (fp, s1);
strcpy (s1, _("agreement, which binds you LEGALLY !!"));
print_text (fp, s1);
print_text (fp, s1);
strcpy (s1,
_
("This program is free software; you can redistribute it and/or modify"));
print_text (fp, s1);
strcpy (s1,
_
("it under the terms of the `GNU General Public License' as published by"));
print_text (fp, s1);
strcpy (s1,
_
("the `Free Software Foundation'; either version 3, or (at your option)"));
print_text (fp, s1);
strcpy (s1, _("any later version."));
print_text (fp, s1);
print_text (fp, s1);
strcpy (s1,
_
("You should have received a copy of the `GNU General Public License'"));
print_text (fp, s1);
strcpy (s1, _("along with this program; if not, write to the:"));
print_text (fp, s1);
print_text (fp, s1);
strcpy (s1, " Free Software Foundation, Inc.");
print_text (fp, s1);
}
void
my_version (fp)
FILE *fp;
/*
Prints the program-id and all compilation flags to file `fp'
using the central output function `print_text()', and
uses the global text buffers `s1' and `s2' internally.
*/
{
auto const Cc_struct *ptr_cc_holidays = cc_holidays;
register int i = 0;
#if USE_RC
auto char *ptr_env;
# if !defined(AMIGA) || defined(__GNUC__)
auto char *ptr_home;
# endif
#endif
my_copyright (fp, TRUE);
}
char *
usage_msg ()
/*
Creates the usage text `usg_text' and includes the actual program name.
*/
{
static char *usg_text;
static Bool is_initialized = FALSE;
if (!is_initialized)
{
usg_text = (char *) my_malloc (LEN_SINGLE_LINE, ERR_NO_MEMORY_AVAILABLE,
__FILE__, ((long) __LINE__) - 1L,
"usg_text", 0);
sprintf (usg_text,
_
("Usage: %s [%s|%s{[?|h|??|hh|L|V]|{%sHKNOR%sXb%sijn%sq%ssu%s}}] [[%s] [%s]]"),
prgr_name, SWITCH, SWITCH2, USAGE_RC1, USAGE_SHELL, USAGE_RC2,
USAGE_PAGER, USAGE_RC3, USAGE_RC4, mm_lit, yyyy_lit);
is_initialized = TRUE;
}
return (usg_text);
}
char *
lopt_msg ()
/*
Returns the `lopt_text' description text of the long-style options
including the actual program name, and uses the global text
buffer `s3' internally.
*/
{
static char *lopt_text;
static Bool is_initialized = FALSE;
if (!is_initialized)
{
lopt_text =
(char *) my_malloc (LEN_SINGLE_LINE, ERR_NO_MEMORY_AVAILABLE,
__FILE__, ((long) __LINE__) - 1L, "lopt_text", 0);
sprintf (lopt_text, _("Use `%s %s|[%s?]"),
prgr_name, get_longopt_description (SYM_LONG_HELP2, TRUE),
LARG_SEP);
#if USE_PAGER
sprintf (s3, " %s' ", get_longopt_description (SYM_PAGER, TRUE));
strcat (lopt_text, s3);
#else /* !USE_PAGER */
strcat (lopt_text, "' ");
#endif /* !USE_PAGER */
strcat (lopt_text, _("for more information."));
is_initialized = TRUE;
}
return (lopt_text);
}
static int
gmt_timezone_value (hour)
int hour;
/*
Returns the given HOUR offset value as an offset value N
within the range -12...-1...[0]...+1...+12, which is
based on the Greenwich Mean Time timezone `GMT[[+|-]N]'.
*/
{
register int sign = -SGN (hour);
hour = abs (hour);
while (hour > HOURS_PER_DAY)
hour -= HOURS_PER_DAY;
if (hour > HOURS_PER_HALF_DAY)
hour -= (HOURS_PER_DAY + 1);
return (hour * sign);
}
static const char *
get_longopt_description (longopt_symbolic, with_larglist)
const int longopt_symbolic;
const Bool with_larglist;
/*
Returns a description text of given `longopt_symbolic' long-style option
in global text buffer `s2'. If `with_larglist' is TRUE, the returned
description text contains the argument list text (if any) too, otherwise
the returned description text contains the complete name of the
long option only!
*/
{
auto const Lopt_struct *ptr_lopt = lopt;
register int i;
while (ptr_lopt->long_name != NULL)
{
if (ptr_lopt->symbolic_name == longopt_symbolic)
break;
ptr_lopt++;
}
if (ptr_lopt->long_name != NULL)
{
i = 0;
sprintf (s2, "%s%s%s", SWITCH, SWITCH, ptr_lopt->long_name);
if (with_larglist && (ptr_lopt->larg_mode != LARG_NO))
{
if (ptr_lopt->larg_mode == LARG_NO_OR_ONE)
{
strcat (s2, "[");
strcat (s2, LARG_SEP);
}
else
strcat (s2, LARG_SEP);
if ((ptr_lopt->larg_mode == LARG_ONE)
&& (ptr_lopt->largs[0] == NULL))
strcat (s2, larg_lit);
else
{
if (ptr_lopt->largs[0] == NULL)
strcat (s2, larg_lit);
else
while (ptr_lopt->largs[i] != NULL)
{
strcat (s2, ptr_lopt->largs[i]);
if (ptr_lopt->largs[i + 1] != NULL)
strcat (s2, "|");
i++;
}
}
if (ptr_lopt->larg_mode == LARG_NO_OR_ONE)
strcat (s2, "]");
}
}
else
*s2 = '\0';
return (s2);
}
static void
my_bug_report_address (fp)
FILE *fp;
/*
Prints the bug report address to file `fp' using the central output
function `print_text()', and uses the global text buffer `s1' internally.
*/
{
print_text (fp, s1);
sprintf (s1, _("Email bug reports to <%s>"), BUG_REPORT_ADR1);
print_text (fp, s1);
sprintf (s1, _("GNU gcal home page: <%s>"), HOMEPAGE);
print_text (fp, s1);
sprintf (s1, _("General help using GNU software: <%s>"), HOMEPAGE_GNU_SOFTWARE);
print_text (fp, s1);
}
static void
my_copyright (fp, with_short_license)
FILE *fp;
const Bool with_short_license;
/*
Prints the program-id and copyright text to file `fp' using
the central output function `print_text()', and uses the global
text buffer `s1' internally.
*/
{
sprintf (s1, "%s (GNU cal) %s", prgr_name, PACKAGE_VERSION);
print_text (fp, s1);
if (!with_short_license)
print_text (fp, s1);
strcpy (s1, COPYRIGHT_TXT);
print_text (fp, s1);
if (with_short_license)
{
strcpy (s1,
_
("This is free software; see the source for copying conditions."));
print_text (fp, s1);
strcpy (s1,
_
("There is NO warranty, without even the implied warranty of"));
print_text (fp, s1);
strcpy (s1, _("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."));
print_text (fp, s1);
}
}
static void
my_help_head_text (fp)
FILE *fp;
/*
Prints the help heading text to file `fp' using the central
output function `print_text()', and uses the global text buffer
`s1' internally.
*/
{
sprintf (s1, _("%s: The Gregorian calendar program (GNU cal) %s"),
prgr_name, PACKAGE_VERSION);
print_text (fp, s1);
print_text (fp, s1);
strcat (s1, COPYRIGHT_TXT);
print_text (fp, s1);
print_text (fp, s1);
#if USE_RC
sprintf (s1, _("Usage: %s [[OPTION...] [%cDATE] [%cFILE...]] [COMMAND]"),
prgr_name, RC_ADATE_CHAR, RSP_CHAR);
#else /* !USE_RC */
sprintf (s1, _("Usage: %s [[OPTION...] [%cFILE...]] [COMMAND]"), prgr_name,
RSP_CHAR);
#endif /* !USE_RC */
print_text (fp, s1);
print_text (fp, s1);
strcpy (s1, usage_msg ());
print_text (fp, s1);
print_text (fp, s1);
}
/*
Writes an informational text to "fp" using the central output function
showing the date, compiler and operating system used. Uses the global
text buffer `s1' internally. The code is taken from `zip21' source
package and adjusted to Gcal's needs.
Special thanks to the Info-ZIP group (`http://quest.jpl.nasa.gov/Info-ZIP/'),
which merely granted the permission to use their `version_local()' function
of `zip-2.1' in a modified way for Gcal (the `print_compiler_info()' function
is based on copyrighted code by the Info-ZIP group).
*/
#if defined(MSDOS)
static void
print_compiler_info (fp)
FILE *fp;
{
# if defined(__DJGPP__) || defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER != 800))
char buf[80];
# endif
sprintf (s1, _(*compiler_info),
# ifdef __GNUC__
# ifdef __DJGPP__
(sprintf (buf, "djgpp v%d / gcc ", __DJGPP__), buf),
# else
# ifdef __GO32__ /* __GO32__ is defined as "1" only (sigh) */
"djgpp v1.x / gcc ",
# else
# ifdef __EMX__ /* ...so is __EMX__ (double sigh) */
"emx+gcc ",
# else
"gcc ",
# endif
# endif
# endif
__VERSION__,
# else
# ifdef __WATCOMC__
# if (__WATCOMC__ % 10 > 0)
/* We do this silly test because __WATCOMC__ gives two digits for the */
/* minor version, but Watcom packaging prefers to show only one digit. */
(sprintf (buf, "Watcom C/C++ %d.%02d", __WATCOMC__ / 100,
__WATCOMC__ % 100), buf), "",
# else
(sprintf (buf, "Watcom C/C++ %d.%d", __WATCOMC__ / 100,
(__WATCOMC__ % 100) / 10), buf), "",
# endif
# else
# ifdef __TURBOC__
# ifdef __BORLANDC__
"Borland C++",
# if (__BORLANDC__ < 0x0200)
" 1.0",
# else
# if (__BORLANDC__ == 0x0200) /* James: __TURBOC__ = 0x0297 */
" 2.0",
# else
# if (__BORLANDC__ == 0x0400)
" 3.0",
# else
# if (__BORLANDC__ == 0x0410) /* __BCPLUSPLUS__ = 0x0310 */
" 3.1",
# else
# if (__BORLANDC__ == 0x0452) /* __BCPLUSPLUS__ = 0x0320 */
_(" 4.0 or 4.02"),
# else
# if (__BORLANDC__ == 0x0460) /* __BCPLUSPLUS__ = 0x0340 */
" 4.5",
# else
# if (__BORLANDC__ == 0x0500) /* __TURBOC__ = 0x0500 */
" 5.0",
# else
_(" later than 5.0"),
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# else
"Turbo C",
# if (__TURBOC__ >= 0x0400) /* Kevin: 3.0 -> 0x0401 */
_("++ 3.0 or later"),
# else
# if (__TURBOC__ == 0x0295) /* [661] vfy'd by Kevin */
"++ 1.0",
# else
# if ((__TURBOC__ >= 0x018d) && (__TURBOC__ <= 0x0200)) /* James: 0x0200 */
" 2.0",
# else
# if (__TURBOC__ > 0x0100)
" 1.5", /* James: 0x0105? */
# else
" 1.0", /* James: 0x0100 */
# endif
# endif
# endif
# endif
# endif
# else
# ifdef MSC
"Microsoft C ",
# ifdef _MSC_VER
# if (_MSC_VER == 800)
"8.0/8.0c (Visual C++ 1.0/1.5)",
# else
(sprintf (buf, "%d.%02d", _MSC_VER / 100, _MSC_VER % 100), buf),
# endif
# else
_("5.1 or earlier"),
# endif
# else
_("unknown compiler"), "",
# endif /* MSC */
# endif /* __TURBOC__ */
# endif /* __WATCOMC__ */
# endif /* __GNUC__ */
"MS-DOS",
# if (defined(__GNUC__) || (defined(__WATCOMC__) && defined(__386__)))
" (32-bit)",
# else
# if defined(M_I86HM) || defined(__HUGE__)
" (16-bit, huge)",
# else
# if defined(M_I86LM) || defined(__LARGE__)
" (16-bit, large)",
# else
# if defined(M_I86MM) || defined(__MEDIUM__)
" (16-bit, medium)",
# else
# if defined(M_I86CM) || defined(__COMPACT__)
" (16-bit, compact)",
# else
# if defined(M_I86SM) || defined(__SMALL__)
" (16-bit, small)",
# else
# if defined(M_I86TM) || defined(__TINY__)
" (16-bit, tiny)",
# else
" (16-bit)",
# endif
# endif
# endif
# endif
# endif
# endif
# endif
_(" on "), __DATE__
);
print_text (fp, s1);
}
#else /* !MSDOS */
# if defined(WIN32)
static void
print_compiler_info (fp)
FILE *fp;
{
# if (defined(_MSC_VER) || defined(__WATCOMC__))
char buf[80];
# endif
sprintf (s1, _(*compiler_info),
# ifdef _MSC_VER /* MSC == MSVC++, including the SDK compiler */
(sprintf
(buf, "Microsoft C %d.%02d ", _MSC_VER / 100, _MSC_VER % 100),
buf),
# if (_MSC_VER == 800)
"(Visual C++ v1.1)",
# else
# if (_MSC_VER == 850)
"(Windows NT v3.5 SDK)",
# else
# if (_MSC_VER == 900)
"(Visual C++ v2.0/v2.1)",
# else
# if (_MSC_VER == 1000)
"(Visual C++ v4.0)",
# else
# if (_MSC_VER == 1010)
"(Visual C++ v4.1)",
# else
# if (_MSC_VER > 800)
"(Visual C++)",
# else
_("(bad version)"),
# endif
# endif
# endif
# endif
# endif
# endif
# endif /* _MSC_VER */
# ifdef __WATCOMC__
# if (__WATCOMC__ % 10 > 0)
/* We do this silly test because __WATCOMC__ gives two digits for the */
/* minor version, but Watcom packaging prefers to show only one digit. */
(sprintf (buf, "Watcom C/C++ %d.%02d", __WATCOMC__ / 100,
__WATCOMC__ % 100), buf), "",
# else
(sprintf (buf, "Watcom C/C++ %d.%d", __WATCOMC__ / 100,
(__WATCOMC__ % 100) / 10), buf), "",
# endif /* __WATCOMC__ % 10 > 0 */
# endif /* __WATCOMC__ */
# ifdef __TURBOC__
# ifdef __BORLANDC__
"Borland C++",
# if (__BORLANDC__ == 0x0452) /* __BCPLUSPLUS__ = 0x0320 */
_(" 4.0 or 4.02"),
# else
# if (__BORLANDC__ == 0x0460) /* __BCPLUSPLUS__ = 0x0340 */
" 4.5",
# else
# if (__BORLANDC__ == 0x0500) /* __TURBOC__ = 0x0500 */
" 5.0",
# else
_(" later than 5.0"),
# endif
# endif
# endif
# else /* !__BORLANDC__ */
"Turbo C",
# if (__TURBOC__ >= 0x0400) /* Kevin: 3.0 -> 0x0401 */
_("++ 3.0 or later"),
# else
# if (__TURBOC__ == 0x0295) /* [661] vfy'd by Kevin */
"++ 1.0",
# endif
# endif
# endif /* __BORLANDC__ */
# endif /* __TURBOC__ */
# if !defined(__TURBOC__) && !defined(__WATCOMC__) && !defined(_MSC_VER)
_("unknown compiler (SDK?)"), "",
# endif
"\n\tWindows 95 / Windows NT", " (32-bit)",
_(" on "), __DATE__
);
print_text (fp, s1);
}
# else /* !WIN32 */
# if defined(OS2)
static void
print_compiler_info (fp)
FILE *fp;
{
# if defined(__IBMC__) || defined(__WATCOMC__) || defined(_MSC_VER)
char buf[80];
# endif
sprintf (s1, _(*compiler_info),
# ifdef __GNUC__
# ifdef __EMX__ /* __EMX__ is defined as "1" only (sigh) */
"emx+gcc ", __VERSION__,
# else
"gcc/2 ", __VERSION__,
# endif
# else
# ifdef __IBMC__
"IBM ",
# if (__IBMC__ < 200)
(sprintf (buf, "C Set/2 %d.%02d", __IBMC__ / 100, __IBMC__ % 100),
buf),
# else
# if (__IBMC__ < 300)
(sprintf (buf, "C Set++ %d.%02d", __IBMC__ / 100, __IBMC__ % 100),
buf),
# else
(sprintf
(buf, "Visual Age C++ %d.%02d", __IBMC__ / 100, __IBMC__ % 100),
buf),
# endif
# endif
# else
# ifdef __WATCOMC__
"Watcom C", (sprintf (buf, " (__WATCOMC__ = %d)", __WATCOMC__),
buf),
# else
# ifdef __TURBOC__
# ifdef __BORLANDC__
"Borland C++",
# if (__BORLANDC__ < 0x0200)
" 1.0",
# else
# if (__BORLANDC__ == 0x0200)
" 2.0",
# else
# if (__BORLANDC__ == 0x0400)
" 3.0",
# else
# if (__BORLANDC__ == 0x0410)
" 3.1",
# else
# if (__BORLANDC__ == 0x0452)
" 4.0",
# else /* these two are guesses based on DOS version */
# if (__BORLANDC__ == 0x0460)
" 4.5",
# else
_(" later than 4.5"),
# endif
# endif
# endif
# endif
# endif
# endif
# else
"Turbo C",
# if (__TURBOC__ >= 661)
_("++ 1.0 or later"),
# else
# if (__TURBOC__ == 661)
" 3.0?",
# else
# if (__TURBOC__ == 397)
" 2.0",
# else
_(" 1.0 or 1.5?"),
# endif
# endif
# endif
# endif
# else
# ifdef MSC
"Microsoft C ",
# ifdef _MSC_VER
(sprintf (buf, "%d.%02d", _MSC_VER / 100, _MSC_VER % 100), buf),
# else
_("5.1 or earlier"),
# endif
# else
_("unknown compiler"), "",
# endif /* MSC */
# endif /* __TURBOC__ */
# endif /* __WATCOMC__ */
# endif /* __IBMC__ */
# endif /* __GNUC__ */
"OS/2",
/* GRR: does IBM C/2 identify itself as IBM rather than Microsoft? */
# if (defined(MSC) || (defined(__WATCOMC__) && !defined(__386__)))
# if defined(M_I86HM) || defined(__HUGE__)
" (16-bit, huge)",
# else
# if defined(M_I86LM) || defined(__LARGE__)
" (16-bit, large)",
# else
# if defined(M_I86MM) || defined(__MEDIUM__)
" (16-bit, medium)",
# else
# if defined(M_I86CM) || defined(__COMPACT__)
" (16-bit, compact)",
# else
# if defined(M_I86SM) || defined(__SMALL__)
" (16-bit, small)",
# else
# if defined(M_I86TM) || defined(__TINY__)
" (16-bit, tiny)",
# else
" (16-bit)",
# endif
# endif
# endif
# endif
# endif
# endif
# else
" 2.x (32-bit)",
# endif
_(" on "), __DATE__
);
print_text (fp, s1);
}
# else /* !OS2 */
# if defined(ACORN)
static void
print_compiler_info (fp)
FILE *fp;
{
sprintf (s1, _(*compiler_info),
# ifdef __GNUC__
"gcc ", __VERSION__,
# else
# ifdef __CC_NORCROFT
"Norcroft ", "cc",
# else
"cc", "",
# endif
# endif
"RISC OS", " (Acorn Computers Ltd)",
_(" on "), __DATE__
);
print_text (fp, s1);
}
# else /* !ACORN */
# if defined(AMIGA)
/* NOTE: the following include depends upon the environment
* variable $Workbench to be set correctly. (Set by
* default, by kickstart during startup)
*/
int WBversion = (int)
/*
#include "ENV:Workbench"
*/
10;
static void
print_compiler_info (fp)
FILE *fp;
{
/* Define buffers. */
char buf1[40]; /* compiler name */
char buf2[40]; /* revstamp */
char buf3[40]; /* OS version */
/* format "with" name strings */
# ifdef __SASC
strcpy (buf1, "SAS/C ");
# else
# ifdef LATTICE
strcpy (buf1, "Lattice C ");
# else
# ifdef AZTEC_C
strcpy (buf1, "Manx Aztec C ");
# else
# ifdef __GNUC__
strcpy (buf1, "gcc ");
# else
strcpy (buf1, _("unknown "));
# endif
# endif
# endif
# endif
/* Define revision, date, and time strings.
* NOTE: Do not calculate run time, be sure to use time compiled.
* Pass these strings via your makefile if undefined.
*/
# if defined(__VERSION__) && defined(__REVISION__)
sprintf (buf2, _("version %d.%d"), __VERSION__, __REVISION__);
# else
# ifdef __VERSION__
sprintf (buf2, _("version %d"), __VERSION__);
# else
sprintf (buf2, _("unknown version"));
# endif
# endif
/* "under" */
/*
strcpy(buf3, "AmigaDOS ");
*/
sprintf (buf3, "v%d", WBversion);
sprintf (s1, _(*compiler_info), buf1, buf2, "AmigaDOS", buf3, _(" on "),
__DATE__);
print_text (fp, s1);
}
# else /* !AMIGA */
# if defined(ATARI)
static void
print_compiler_info (fp)
FILE *fp;
{
# ifdef __TURBOC__
char buf[40];
# endif
sprintf (s1, _(*compiler_info),
# ifdef __GNUC__
"gcc ", __VERSION__,
# else
# ifdef __any_other_unix_like_compiler__ /* !!! FIXME */
"cc ", (sprintf (buf, _("version %d"), _RELEASE), buf),
# else
# ifdef __TURBOC__
"Turbo C",
(sprintf (buf, " (0x%04x = %d)", __TURBOC__, __TURBOC__), buf),
# else
_("unknown compiler"), "",
# endif
# endif
# endif
# ifdef __MINT__
"Atari TOS/MiNT",
# else
"Atari TOS",
# endif
" (Atari ST/TT/Falcon030)",
_(" on "), __DATE__
);
print_text (fp, s1);
}
# else /* !ATARI */
# if defined(__50SERIES) /* Prime/PRIMOS */
static void
print_compiler_info (fp)
FILE *fp;
{
sprintf (s1, _(*compiler_info),
# ifdef __GNUC__
"gcc ", __VERSION__,
# else
"cc", "",
# endif
"PRIMOS", " (Prime Computer Inc)",
_(" on "), __DATE__
);
print_text (fp, s1);
}
# else /* !__50SERIES */
# if defined(VAXC) || defined(VMS) /* DEC Vax */
static void
print_compiler_info (fp)
FILE *fp;
{
# ifdef VMS_VERSION
char buf[40];
# endif
# ifdef __DECC_VER
char buf2[40];
int vtyp;
# endif
/* DEC C in ANSI mode does not like "#ifdef MACRO" inside another
macro when MACRO is equated to a value (by "#define MACRO 1"). */
sprintf (s1, _(*compiler_info),
# ifdef __GNUC__
"gcc ", __VERSION__,
# else
# if defined(DECC) || defined(__DECC) || defined (__DECC__)
"DEC C",
# ifdef __DECC_VER
(sprintf (buf2, " %c%d.%d-%03d",
((vtyp = (__DECC_VER / 10000) % 10) == 6 ? 'T' :
(vtyp == 8 ? 'S' : 'V')),
__DECC_VER / 10000000,
(__DECC_VER % 10000000) / 100000, __DECC_VER % 1000),
buf2),
# else
"",
# endif
# else
# ifdef VAXC
"VAX C", "",
# else
_("unknown compiler"), "",
# endif
# endif
# endif
# ifdef VMS_VERSION
# if defined(__alpha)
"OpenVMS", /* version has trailing spaces ("V6.1 "), so truncate: */
(sprintf (buf, _(" (%.4s for Alpha)"), VMS_VERSION), buf),
# else /* VAX */
(VMS_VERSION[1] >= '6') ? "OpenVMS" : "VMS",
(sprintf (buf, _(" (%.4s for VAX)"), VMS_VERSION), buf),
# endif
# else
"VMS", "",
# endif /* ?VMS_VERSION */
_(" on "), __DATE__
);
print_text (fp, s1);
}
# else /* default: UNIX */
# if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__386BSD__) || defined(__bsdi__)
# include <sys/param.h> /* for the BSD4_4 define */
# endif
static void
print_compiler_info (fp)
FILE *fp;
{
# if defined(CRAY) || defined(NX_CURRENT_COMPILER_RELEASE) || defined(NetBSD)
char buf1[40];
# if defined(CRAY) || defined(NX_CURRENT_COMPILER_RELEASE)
char buf2[40];
# endif
# endif
/* Pyramid, NeXT have problems with huge macro expansion, too: no Info() */
sprintf (s1, _(*compiler_info),
# ifdef __GNUC__
# ifdef NX_CURRENT_COMPILER_RELEASE
(sprintf
(buf1, "NeXT DevKit %d.%02d ", NX_CURRENT_COMPILER_RELEASE / 100,
NX_CURRENT_COMPILER_RELEASE % 100), buf1),
(strlen (__VERSION__) >
8) ? "(gcc)" : (sprintf (buf2, "(gcc %s)", __VERSION__), buf2),
# else
"gcc ", __VERSION__,
# endif
# else
# if defined(CRAY) && defined(_RELEASE)
"cc ", (sprintf (buf1, _("version %d"), _RELEASE), buf1),
# else
# ifdef __VERSION__
"cc ", __VERSION__,
# else
"cc", "",
# endif
# endif
# endif
"Unix",
# if defined(sgi) || defined(__sgi)
" (Silicon Graphics IRIX)",
# else
# ifdef sun
# ifdef sparc
# ifdef __SVR4
" (Sun Sparc/Solaris)",
# else /* may or may not be SunOS */
" (Sun Sparc)",
# endif
# else
# if defined(sun386) || defined(i386)
" (Sun 386i)",
# else
# if defined(mc68020) || defined(__mc68020__)
" (Sun 3)",
# else /* mc68010 or mc68000: Sun 2 or earlier */
" (Sun 2)",
# endif
# endif
# endif
# else
# ifdef __hpux
" (HP/UX)",
# else
# ifdef __osf__
" (DEC OSF/1)",
# else
# ifdef _AIX
" (IBM AIX)",
# else
# ifdef aiws
" (IBM RT/AIX)",
# else
# if defined(CRAY) || defined(cray)
# ifdef _UNICOS
(sprintf (buf2, " (Cray UNICOS release %d)", _UNICOS), buf2),
# else
" (Cray UNICOS)",
# endif
# else
# if defined(uts) || defined(UTS)
" (Amdahl UTS)",
# else
# ifdef NeXT
# ifdef mc68000
" (NeXTStep/black)",
# else
" (NeXTStep for Intel)",
# endif
# else /* the next dozen or so are somewhat order-dependent */
# if defined(linux) || defined(__linux__)
# ifdef __ELF__
" (Linux ELF)",
# else
" (Linux a.out)",
# endif
# else
# ifdef MINIX
" (Minix)",
# else
# ifdef M_UNIX
" (SCO Unix)",
# else
# ifdef M_XENIX
" (SCO Xenix)",
# else
# ifdef __NetBSD__
# ifdef NetBSD0_8
# if NetBSD0_8 == 1
" (NetBSD 0.8)",
# else
(sprintf (buf1, " (NetBSD 0.8%c)", (char) (NetBSD0_8 + '@')),
buf1),
# endif
# else
# ifdef NetBSD0_9
# if NetBSD0_9 == 1
" (NetBSD 0.9)",
# else
(sprintf (buf1, " (NetBSD 0.9%c)", (char) (NetBSD0_9 + 'A' - 2)),
buf1),
# endif
# else
# ifdef NetBSD1_0
# if NetBSD1_0 == 1
" (NetBSD 1.0)",
# else
(sprintf (buf1, " (NetBSD 1.0%c)", (char) (NetBSD1_0 + 'A' - 2)),
buf1),
# endif
# else
# ifdef NetBSD1_1
# if NetBSD1_1 == 1
" (NetBSD 1.1)",
# else
(sprintf (buf1, " (NetBSD 1.1%c)", (char) (NetBSD1_1 + 'A' - 2)),
buf1),
# endif
# else
(BSD4_4 ==
0.5) ? _(" (NetBSD before 0.9)") : _(" (NetBSD 1.2 or later)"),
# endif
# endif
# endif
# endif
# else
# ifdef __FreeBSD__
(BSD4_4 == 0.5) ? " (FreeBSD 1.x)" : _(" (FreeBSD 2.0 or later)"),
# else
# ifdef __bsdi__
(BSD4_4 == 0.5) ? " (BSD/386 1.0)" : _(" (BSD/386 1.1 or later)"),
# else
# ifdef __386BSD__
(BSD4_4 == 1) ? " (386BSD, post-4.4 release)" : " (386BSD)",
# else
# if defined(i486) || defined(__i486) || defined(__i486__)
" (Intel 486)",
# else
# if defined(i386) || defined(__i386) || defined(__i386__)
" (Intel 386)",
# else
# ifdef pyr
" (Pyramid)",
# else
# if defined(ultrix) || defined(__ultrix)
# if defined(mips) || defined(__mips)
" (DEC/MIPS)",
# else
# if defined(vax) || defined(__vax)
" (DEC/VAX)",
# else /* __alpha? */
" (DEC/Alpha)",
# endif
# endif
# else
# ifdef gould
" (Gould)",
# else
# ifdef MTS
" (MTS)",
# else
# ifdef __convexc__
" (Convex)",
# else
"",
# endif /* Convex */
# endif /* MTS */
# endif /* Gould */
# endif /* DEC */
# endif /* Pyramid */
# endif /* 386 */
# endif /* 486 */
# endif /* 386BSD */
# endif /* BSDI BSD/386 */
# endif /* NetBSD */
# endif /* FreeBSD */
# endif /* SCO Xenix */
# endif /* SCO Unix */
# endif /* Minix */
# endif /* Linux */
# endif /* NeXT */
# endif /* Amdahl */
# endif /* Cray */
# endif /* RT/AIX */
# endif /* AIX */
# endif /* OSF/1 */
# endif /* HP/UX */
# endif /* Sun */
# endif /* SGI */
_(" on "), __DATE__
);
print_text (fp, s1);
}
# endif /* default: UNIX */
# endif /* !__50SERIES */
# endif /* !ATARI */
# endif /* !AMIGA */
# endif /* !ACORN */
# endif /* !OS2 */
# endif /* !WIN32 */
#endif /* !MSDOS */
|