1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
|
Description: Git master branch of Debian's w3m
Origin: https://salsa.debian.org/debian/w3m/commits/master
diff --git a/Bonus/goodict.cgi b/Bonus/goodict.cgi
index 8f443c1..5fb6581 100755
--- a/Bonus/goodict.cgi
+++ b/Bonus/goodict.cgi
@@ -1,14 +1,20 @@
#!/usr/bin/perl
# ~/.w3m/urimethodmap
-# e: file:/cgi-bin/goodict.cgi?%s
-# w: file:/cgi-bin/goodict.cgi?%s
-# j: file:/cgi-bin/goodict.cgi?%s
+# e: file:/cgi-bin/goodict.cgi?%s Englich-Japanese
+# w: file:/cgi-bin/goodict.cgi?%s Japanese-English
+# j: file:/cgi-bin/goodict.cgi?%s Japanese
+# a: file:/cgi-bin/goodict.cgi?%s All
+#
+# e:0:word start with word
+# e:1:word perfect match
+# e:2:word end with word
+# e:3:word search body text
+# e:6:word search title
+# e:word perfect match
-use NKF;
-#$mode = 0; # substring
-$mode = 1; # perfect match
-#$mode = 3; # search body text
+use Encode;
+use Encode::Guess qw/euc-jp utf8/;
$url = "http://dictionary.goo.ne.jp";
$_ = $ENV{"QUERY_STRING"};
if (/^e:/) {
@@ -17,14 +23,22 @@ if (/^e:/) {
$kind = 'je';
} elsif (/^j:/) {
$kind = 'jn';
+} elsif (/^a:/) {
+ $kind = 'all'
+}
+s@^[ewja]:@@ && s@^//@@ && s@/$@@;
+if (/^([01236]):/) {
+ $mode=$1;
+ s/^[01236]://;
+}else{
+ $mode="1";
}
-s@^[ewjs]:@@ && s@^//@@ && s@/$@@;
if ($_) {
s/\+/ /g;
s/%([\da-f][\da-f])/pack('C', hex($1))/egi;
- $_ = nkf("-e", $_);
+ $_ = encode("utf8", decode("Guess", $_));
s/[\000-\040\+:#?&%<>"\177-\377]/sprintf('%%%02X', unpack('C', $&))/eg;
- $url .= "/search.php?MT=$_&kind=$kind&mode=$mode";
+ $url .= "/srch/$kind/$_/m$mode"."u/";
} else {
$input = "w3m-control: GOTO_LINK";
}
diff --git a/ChangeLog b/ChangeLog
index 88358ef..7367d67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,1693 @@
+2019-01-05 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
+
+ * config.guess, config.sub:
+ Update config.* with autotools-dev 20180224.1.
+
+2019-01-05 Akinori Hattori <hattya@gentoo.org>
+
+ * w3mimg/fb/fb_imlib2.c: Fix dependency for Imlib2.
+ Bug-Gentoo: https://bugs.gentoo.org/605930
+ Origin: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97d6e3e6839898829e8cce211b97a7fa77f5d06e
+
+2018-12-22 Tatsuya Kinoshita <tats@debian.org>
+
+ * scripts/w3mman/w3mman.1.in, scripts/w3mman/w3mman.in:
+ Fix square brackets.
+
+2018-12-21 Nemo Inis <nemoinis@hotmail.com>
+
+ * scripts/w3mman/w3mman.1.in, scripts/w3mman/w3mman.in:
+ * scripts/w3mman/w3mman2html.cgi.in:
+ w3mman support for section number during keyword search.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916968#5
+
+2018-10-26 Ben Wong <bugs.debian.org@wongs.net>
+
+ * buffer.c, display.c:
+ Fix that the MarkAllPages option works as originally intended.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911929
+
+2018-10-26 Tatsuya Kinoshita <tats@debian.org>
+
+ * istream.c, url.c: Indentation fix.
+
+2018-10-24 Mark Wright <gienah@gentoo.org>
+
+ * istream.c, url.c: Do not use deprecated features with openssl-1.1.
+ Bug-Gentoo: https://bugs.gentoo.org/592510
+ Bug-Debian: https://github.com/tats/w3m/pull/103
+
+2018-05-20 Andrew Santosa <santosa_1999@yahoo.com>
+
+ * po/Makefile.in.in: Added check for : command not producing .gmo file.
+ Bug-Debian: https://github.com/tats/w3m/pull/99
+
+2018-03-24 Tatsuya Kinoshita <tats@debian.org>
+
+ * table.c: Respect simple_preserve_space for table cells.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893902
+
+2018-03-23 Mike <barbeque@users.noreply.github.com>
+
+ Update grammar & spelling in some English READMEs.
+ Origin: https://github.com/tats/w3m/pull/97
+
+ * doc/README.img: Update README.img.
+ * doc/README.dict: Update README.dict.
+ * doc/README.pre_form: Update README.pre_form.
+ * doc/README.cookie: Update README.cookie.
+ * doc/README.cookie: Update README.cookie.
+
+2018-03-04 Jia Zhouyang <jiazhouyang@nudt.edu.cn>
+
+ Fix crashes when some external APIs fail.
+ Origin: https://github.com/tats/w3m/pull/96
+
+ * url.c: Add error handling code for fopen.
+ Check the return code of fopen, and return when it fails.
+ * file.c: Add error handling code for fopen.
+ Check the return value of fopen, and add proper error handling code.
+ * local.c: Add error handling for chdir.
+ When chdir fails, print error message and exit.
+
+2018-01-25 Tatsuya Kinoshita <tats@debian.org>
+
+ * ChangeLog, NEWS: Add CVE IDs.
+ cf. https://security-tracker.debian.org/tracker/source-package/w3m
+
+2018-01-21 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
+
+ * scripts/Makefile.in: Do not remove w3mdict.cgi when "make distclean".
+
+ * config.h.dist, config.h.in, configure, configure.ac, main.c, rc.c:
+ Make temporary directory safely when ~/.w3m is unwritable.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888097
+ [CVE-2018-6198]
+
+ * rc.c: Suppress error messages when ~/.w3m is unwritable.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871425
+
+2018-01-20 Tatsuya Kinoshita <tats@debian.org>
+
+ * config.guess, config.sub:
+ Update config.* with autotools-dev 20171216.1.
+
+ * table.c: Prevent negative indent value in feed_table_block_tag().
+ Bug-Debian: https://github.com/tats/w3m/issues/88 [CVE-2018-6196]
+
+2018-01-06 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-jp/README.SSL: Doc fix for ssl_forbid_method.
+
+ * po/de.po, po/ja.po, po/w3m.pot, po/zh_CN.po, po/zh_TW.po, rc.c:
+ * url.c: Fix multi-character character constant for ssl_forbid_method.
+
+2018-01-06 se <se@example.com>
+
+ * po/de.po, po/ja.po, po/w3m.pot, po/zh_CN.po, po/zh_TW.po, rc.c:
+ * url.c: Extend ssl_forbid_method to disable TLSv1.1.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874218#5
+
+2018-01-06 Tatsuya Kinoshita <tats@debian.org>
+
+ * w3mimg/fb/fb_w3mimg.c: Accept TERM=fbterm.
+ cf. https://bushowhige.blogspot.jp/2015/01/fbterm-w3m-img.html
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590668
+
+2017-12-27 Tatsuya Kinoshita <tats@debian.org>
+
+ * form.c: Prevent invalid columnPos() call in formUpdateBuffer().
+ Bug-Debian: https://github.com/tats/w3m/issues/89 [CVE-2018-6197]
+
+ * main.c: Typo fix in fusage().
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=878106
+
+ * doc-jp/README.tab, doc/README.tab, main.c: English fix.
+ cf. [emacs-w3m:12706], http://emacs-w3m.namazu.org/ml/msg12598.html
+
+2017-12-24 HIGUCHI Daisuke (VDR dai) <dai@debian.org>
+
+ * scripts/w3mman/w3mman.1.in, terms.c: Fix spelling error.
+
+2017-08-27 Kyle J. McKay <mackyle@gmail.com>
+
+ Correct <base ...> parsing and do not turn a form's GET into POST.
+ Bug-Debian: https://github.com/tats/w3m/pull/93
+
+ * form.c:
+ form.c: do not gratuitously turn GET into POST.
+ When encountering a <form ...> tag that contains these values:
+ method="get" enctype="multipart/form-data"
+ Do not transform the method into POST to accomodate enctype.
+ Instead behave in the compatible way that all other browsers
+ behave in this instance and ignore the enctype parameter
+ (treating it as the default application/x-www-form-urlencoded)
+ and perform a "GET" just as the method parameter requests.
+ This behavior produces far more compatible results than
+ gratuitously changing the "get" into a "post" which can
+ result in unexpected "405 Method Not Allowed" errors.
+ Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
+
+ * file.c:
+ file.c: compute correct base URL when not absolute.
+ When a server makes use of the PATH_INFO feature in a CGI,
+ the returned pages may often have a <base href="..." /> tag
+ specifying the URL of the CGI itself as the base.
+ However, to avoid hard-coding the scheme and host into such
+ a base href, the href value will often omit the scheme, host
+ and port.
+ Make sure that when parsing any such base href value that
+ any omitted components are taken from the current URL rather
+ than taken as being from a bare, absolute file:/// URL.
+ Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
+
+2017-01-02 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
+
+2016-12-24 Tatsuya Kinoshita <tats@debian.org>
+
+ * libwc/wtf.c:
+ Prevent overflow beyond the end of string in wtf_parse1().
+ Bug-Debian: https://github.com/tats/w3m/issues/68
+
+ * libwc/wtf.c:
+ Revert "Prevent overflow beyond the end of string in wtf_parse1()".
+ This reverts commit 998b6f91d4b02e8bf90b7744dfabc8cccdf9d4f9.
+ Bug-Debian: https://github.com/tats/w3m/issues/86
+ cf. http://emacs-w3m.namazu.org/ml/msg12505.html
+
+ * form.c:
+ Preserve one byte for end of string character in form_update_line().
+ Bug-Debian: https://github.com/tats/w3m/issues/68#issuecomment-266214643
+
+ * form.c:
+ Prevent invalid form_update_line() call in formUpdateBuffer().
+ Bug-Debian: https://github.com/tats/w3m/issues/82
+
+2016-12-20 Tatsuya Kinoshita <tats@debian.org>
+
+ * form.c:
+ Revert "Preserve one byte for end of string character in form_update_line()".
+ This reverts commit a4152aaaea5cb51c9018880a1295e498c38889bf.
+
+2016-12-18 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Prevent heap-use-after-free read in HTMLlineproc0().
+ Bug-Debian: https://github.com/tats/w3m/issues/81
+
+ * file.c: Prevent infinite loop in feed_textarea().
+ Bug-Debian: https://github.com/tats/w3m/issues/85
+
+ * form.c:
+ Revert "Prevent overflow beyond the end of string in form_update_line()".
+ This reverts commit 9ccaa1dd0dac6f9b35a649ae9901c225421500f6.
+
+ * form.c:
+ Revert "Prevent overflow beyond the end of string in form_update_line()".
+ This reverts commit e0efc127ff20cbeb931847af1c9b353056340fbd.
+
+2016-12-15 Tatsuya Kinoshita <tats@debian.org>
+
+ * libwc/wtf.c:
+ Prevent overflow beyond the end of string for wtf to wcs macros.
+ Bug-Debian: https://github.com/tats/w3m/issues/77
+
+ * libwc/wtf.c:
+ Revert "Prevent overflow beyond the end of string for wtf to wcs macros".
+ This reverts commit b4d27ba5ccffaa38e968c2bf3a8eeb9cd43928ff.
+
+ * file.c, libwc/wtf.c, libwc/wtf.h:
+ Prevent overflow beyond the end of string in caller of get_mclen().
+ Bug-Debian: https://github.com/tats/w3m/issues/59
+ Bug-Debian: https://github.com/tats/w3m/issues/73
+ Bug-Debian: https://github.com/tats/w3m/issues/74
+ Bug-Debian: https://github.com/tats/w3m/issues/75
+ Bug-Debian: https://github.com/tats/w3m/issues/76
+ Bug-Debian: https://github.com/tats/w3m/issues/78
+ Bug-Debian: https://github.com/tats/w3m/issues/79
+ Bug-Debian: https://github.com/tats/w3m/issues/80
+ Bug-Debian: https://github.com/tats/w3m/issues/83
+ Bug-Debian: https://github.com/tats/w3m/issues/84
+
+ * file.c:
+ Revert "Prevent overflow beyond the end of string in proc_mchar()".
+ This reverts commit 512ed467d12615f5ef40d0d28272e5662d8438ea.
+
+ * table.c:
+ Revert "Prevent overflow beyond the end of string in visible_length()".
+ This reverts commit a932f78a6d8c105036ffeedf01215c1f6a0e0b71.
+
+ * table.c:
+ Revert "Prevent overflow beyond the end of string in skip_space()".
+ This reverts commit e757b43bcf8c439c167f62b6d3317ee9518cabbf.
+
+ * table.c:
+ Revert "Prevent overflow beyond the end of string in visible_length_plain()".
+ This reverts commit f763b8ebf5441cb44d2c0234565fadd5eb1c87a5.
+
+ * form.c:
+ Revert "Prevent overflow beyond the end of string in textfieldrep()".
+ This reverts commit 77d8d8d6576d8afc0f6b2e09bb88c7ca9dba58bb.
+
+ * file.c:
+ Revert "Prevent overflow beyond the end of string in proc_mchar()".
+ This reverts commit e79d0ec2a00369a6af24007a1f2bb5e876e2c847.
+
+2016-12-13 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Prevent overflow beyond the end of string in proc_mchar().
+ Bug-Debian: https://github.com/tats/w3m/issues/80
+ cf. https://github.com/tats/w3m/issues/59
+
+ * form.c: Prevent overflow beyond the end of string in textfieldrep().
+ Bug-Debian: https://github.com/tats/w3m/issues/79
+
+ * form.c:
+ Preserve one byte for end of string character in form_update_line().
+ Bug-Debian: https://github.com/tats/w3m/issues/82
+ cf. https://github.com/tats/w3m/issues/68#issuecomment-266214643
+
+2016-12-10 Tatsuya Kinoshita <tats@debian.org>
+
+ * libwc/wtf.c: Prevent overflow beyond the end of string in wtf_len().
+ cf. https://github.com/tats/w3m/issues/57
+
+ * etc.c: Prevent negative array index for realColumn in calcPosition().
+ Bug-Debian: https://github.com/tats/w3m/issues/69
+
+ * libwc/wtf.c:
+ Prevent overflow beyond the end of string in wtf_parse1().
+ Bug-Debian: https://github.com/tats/w3m/issues/68
+
+ * Str.c: Prevent heap-buffer-overflow in Strnew_size().
+ Bug-Debian: https://github.com/tats/w3m/issues/72
+
+ * table.c:
+ Prevent overflow beyond the end of string in visible_length_plain().
+ Bug-Debian: https://github.com/tats/w3m/issues/76
+
+ * libwc/wtf.c:
+ Prevent overflow beyond the end of string for wtf to wcs macros.
+ Bug-Debian: https://github.com/tats/w3m/issues/77
+
+ * form.c:
+ Prevent overflow beyond the end of string in form_update_line().
+ Bug-Debian: https://github.com/tats/w3m/issues/78
+
+2016-12-08 Tatsuya Kinoshita <tats@debian.org>
+
+ * form.c:
+ Prevent overflow beyond the end of string in form_update_line().
+ Bug-Debian: https://github.com/tats/w3m/issues/75
+
+ * table.c: Prevent overflow beyond the end of string in skip_space().
+ Bug-Debian: https://github.com/tats/w3m/issues/74
+
+ * table.c:
+ Prevent overflow beyond the end of string in visible_length().
+ Bug-Debian: https://github.com/tats/w3m/issues/73
+
+ * libwc/wtf.c:
+ Prevent overflow beyond the end of string in wtf_strwidth().
+ Bug-Debian: https://github.com/tats/w3m/issues/57
+
+ * libwc/wtf.c:
+ Revert "Prevent overflow beyond the end of string in wtf_strwidth()".
+ This reverts commit d345c0950dfdef065b7377ecad0e4bc1d2601bf8.
+
+2016-12-07 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Prevent heap-use-after-free in HTMLlineproc0().
+ Bug-Debian: https://github.com/tats/w3m/issues/65
+
+ * file.c: Prevent negative values for offset and pos in push_link().
+ Bug-Debian: https://github.com/tats/w3m/issues/64
+
+ * file.c: Prevent overflow beyond the end of string in proc_mchar().
+ Bug-Debian: https://github.com/tats/w3m/issues/59
+
+ * libwc/wtf.c:
+ Prevent overflow beyond the end of string in wtf_strwidth().
+ Bug-Debian: https://github.com/tats/w3m/issues/57
+
+2016-12-05 Yixun Lan <dlan@gentoo.org>
+
+ * html.h: Explictily include <time.h> to avoid build err.
+ While disable ssl, we will got a undefine time_t err.
+ Bug-Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=601498
+ Origin: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ee43ba4e036db70fff258f3edb2f0335385e93f
+
+2016-12-05 Tatsuya Kinoshita <tats@debian.org>
+
+ * table.c:
+ Prevent array index out of bounds for tridvalue in feed_table_tag().
+ Bug-Debian: https://github.com/tats/w3m/issues/71
+
+ * table.c: Prevent negative array index in set_integered_width().
+ Bug-Debian: https://github.com/tats/w3m/issues/70
+
+ * table.c:
+ Prevent array index out of bounds for tabattr in feed_table_tag().
+ Bug-Debian: https://github.com/tats/w3m/issues/60
+
+ * file.c: Prevent negative array index in process_textarea().
+ Bug-Debian: https://github.com/tats/w3m/issues/58
+
+ * file.c:
+ Prevent negative array index for marks in HTMLlineproc2body().
+ Bug-Debian: https://github.com/tats/w3m/issues/61
+
+ * file.c:
+ Prevent negative value of row for pushTable() in HTMLlineproc0().
+ Bug-Debian: https://github.com/tats/w3m/issues/67
+
+ * file.c: Prevent negative array index in getMetaRefreshParam().
+ Bug-Debian: https://github.com/tats/w3m/issues/63
+
+ * anchor.c:
+ Prevent negative array index for marks in shiftAnchorPosition().
+ Bug-Debian: https://github.com/tats/w3m/issues/62
+
+2016-11-27 Kuang-che Wu <kcwu@google.com>
+
+ * file.c: Fix uninitialized variable in process_img(). fix #44.
+ Bug-Debian: https://github.com/tats/w3m/issues/44
+ Origin: https://github.com/tats/w3m/pull/50/commits/41a607b06e4475101de59e5c623b9e5f76594a21
+
+ * menu.c: Fix menu buffer-overflow.
+ Origin: https://github.com/tats/w3m/pull/49/commits/7e1c05dd90cf42a308e854881ea3813aed000d2e
+
+2016-11-27 Tatsuya Kinoshita <tats@debian.org>
+
+ * ChangeLog, NEWS: Add CVE IDs.
+ cf. https://security-tracker.debian.org/tracker/source-package/w3m
+ http://www.openwall.com/lists/oss-security/2016/11/24/1
+
+2016-11-20 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
+
+2016-11-19 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
+
+2016-11-18 Tatsuya Kinoshita <tats@debian.org>
+
+ * ChangeLog, NEWS: Add CVE IDs.
+ cf. https://security-tracker.debian.org/tracker/source-package/w3m
+ http://www.openwall.com/lists/oss-security/2016/11/18/3
+
+ * libwc/ucs.map: Fix type mismatch for pcsw_ucs_map_size.
+ cf. https://github.com/tats/w3m/issues/43
+
+ * libwc/ucs.c, libwc/ucs.map:
+ Prevent global-buffer-overflow in wc_any_to_ucs().
+ Bug-Debian: https://github.com/tats/w3m/issues/43 [CVE-2016-9632]
+
+2016-11-17 Tatsuya Kinoshita <tats@debian.org>
+
+ * url.c: Prevent global-buffer-overflow in parseURL().
+ Bug-Debian: https://github.com/tats/w3m/issues/41 [CVE-2016-9630]
+
+ * file.c: Prevent deref null pointer in HTMLlineproc0().
+ Bug-Debian: https://github.com/tats/w3m/issues/42 [CVE-2016-9631]
+
+2016-11-15 Tatsuya Kinoshita <tats@debian.org>
+
+ * table.c: Prevent deref null pointer in renderCoTable().
+ Bug-Debian: https://github.com/tats/w3m/issues/20#issuecomment-260649537
+
+ * file.c, proto.h, table.c:
+ Prevent infinite recursion with nested table and textarea.
+ Bug-Debian: https://github.com/tats/w3m/issues/20#issuecomment-260590257
+ [CVE-2016-9439]
+
+ * table.c:
+ Revert "Prevent infinite recursion with nested table and textarea".
+ This reverts commit f393faf55975a94217df479e1bd06ee4403c6958.
+
+ * anchor.c: Prevent deref null pointer in shiftAnchorPosition().
+ Bug-Debian: https://github.com/tats/w3m/issues/40 [CVE-2016-9629]
+
+2016-11-14 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Prevent null pointer deref due to bad form id.
+ Bug-Debian: https://github.com/tats/w3m/issues/39 [CVE-2016-9628]
+
+ * display.c, file.c, fm.h, symbol.c:
+ Prevent array index out of bounds for symbol.
+ Bug-Debian: https://github.com/tats/w3m/issues/38 [CVE-2016-9627]
+
+2016-11-13 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c:
+ Prevent null pointer dereference in HTMLlineproc2body for textarea_int.
+ Bug-Debian: https://github.com/tats/w3m/issues/32#issuecomment-260170163
+
+2016-11-12 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
+
+ * table.c: Prevent infinite recursion with nested table and textarea.
+ Bug-Debian: https://github.com/tats/w3m/issues/20
+
+2016-11-09 Tatsuya Kinoshita <tats@debian.org>
+
+ * table.c: Check indent_level to prevent infinite recursion.
+ Bug-Debian: https://github.com/tats/w3m/issues/37 [CVE-2016-9626]
+
+2016-11-07 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Prevent infinite recursion in HTMLlineproc0.
+ Bug-Debian: https://github.com/tats/w3m/issues/36 [CVE-2016-9625]
+
+ * NEWS, w3m-doc/install.html.in:
+ Update documents for included w3mdict.cgi.
+
+2016-11-07 ITOH Yasufumi <itohy@NetBSD.org>
+
+ * main.c: Fix suspend (^Z) behavior.
+ Suspend the job w3m belongs to, not w3m only.
+ Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+ Bug-Debian: https://github.com/tats/w3m/pull/34
+ Origin: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/w3m/patches/patch-ab?rev=1.4&content-type=text/x-cvsweb-markup
+
+2016-11-07 Tatsuya Kinoshita <tats@debian.org>
+
+ * form.c: Prevent dereference near-null pointer in formUpdateBuffer.
+ Bug-Debian: https://github.com/tats/w3m/issues/35 [CVE-2016-9624]
+
+ * file.c: Prevent crash after allocate string of negative size.
+ Bug-Debian: https://github.com/tats/w3m/issues/33 [CVE-2016-9623]
+
+ * file.c: Prevent memory exhausted due to repeat appending "</table>".
+ Bug-Debian: https://github.com/tats/w3m/issues/23 [CVE-2016-9633]
+
+ * file.c: Prevent null pointer dereference in HTMLlineproc2body.
+ Bug-Debian: https://github.com/tats/w3m/issues/32 [CVE-2016-9622]
+
+2016-10-31 Tatsuya Kinoshita <tats@debian.org>
+
+ * table.c, table.h, textlist.h:
+ Revert "Treat table height as int instead of short".
+ This reverts commit 0c9aebb26a16ad3acc69b2e87ffd216d43879cb6.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842623
+
+2016-10-30 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
+
+ * fm.h: Set use_dictcommand to 1 by default.
+
+ * scripts/Makefile.in: Add w3mdict.cgi to LIB_TARGETS.
+
+ * config.h.dist: Typo fix for USE_DICT.
+
+2016-10-30 Boruch Baum <boruch-baum@gmx.com>
+
+ * scripts/w3mdict.cgi: Add w3mdict.cgi to use a dictd dictionary query.
+ Bug-Debian: https://github.com/tats/w3m/issues/30
+
+2016-10-09 Tatsuya Kinoshita <tats@debian.org>
+
+ * form.c:
+ Fix incorrect dereference in formUpdateBuffer when MENU_SELECT.
+ cf. https://github.com/tats/w3m/commit/ec9eb22e008a69ea9dc21fdca4b9b836679965ee
+ https://github.com/tats/w3m/issues/28
+
+2016-10-08 Tatsuya Kinoshita <tats@debian.org>
+
+ * table.c, table.h, textlist.h:
+ Treat table height as int instead of short.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838952
+
+ * form.c: Prevent global-buffer-overflow write in formUpdateBuffer.
+ Bug-Debian: https://github.com/tats/w3m/issues/29 [CVE-2016-9429] [CVE-2016-9621]
+
+ * form.c: Fix null pointer dereference in formUpdateBuffer.
+ Bug-Debian: https://github.com/tats/w3m/issues/28 [CVE-2016-9443]
+
+2016-08-30 Kuang-che Wu <kcwu@google.com>
+
+ * Str.c: Fix potential heap buffer corruption due to Strgrow.
+ Origin: https://github.com/tats/w3m/pull/27 [CVE-2016-9442]
+
+2016-08-29 Tatsuya Kinoshita <tats@debian.org>
+
+ * anchor.c:
+ Prevent segfault due to buffer overflows in addMultirowsForm.
+ Bug-Debian: https://github.com/tats/w3m/issues/21 [CVE-2016-9425]
+ Bug-Debian: https://github.com/tats/w3m/issues/26 [CVE-2016-9428]
+
+ * form.c: Prevent segfault for formUpdateBuffer.
+ Bug-Debian: https://github.com/tats/w3m/issues/13#issuecomment-242981906
+
+2016-08-24 Tatsuya Kinoshita <tats@debian.org>
+
+ * table.c: Prevent segfault with malformed table_alt.
+ Bug-Debian: https://github.com/tats/w3m/issues/24 [CVE-2016-9441]
+
+ * form.c: Prevent segfault for formUpdateBuffer.
+ Bug-Debian: https://github.com/tats/w3m/issues/22 [CVE-2016-9440]
+
+ * table.c: Truncate max_width for renderTable.
+ Bug-Debian: https://github.com/tats/w3m/issues/25 [CVE-2016-9426]
+
+2016-08-20 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c, parsetagx.c: Fix uninitialised values for <i> and <dd>.
+ Bug-Debian: https://github.com/tats/w3m/issues/16
+ [CVE-2016-9435] [CVE-2016-9436]
+
+ * file.c, parsetagx.c:
+ Revert "Fix uninitialised values for <i> and <dd>".
+ This reverts commit 0fba2f1a6eb6861206ad120a02af2643938082cd.
+ cf. https://github.com/tats/w3m/commit/0fba2f1a6eb6861206ad120a02af2643938082cd#commitcomment-18703355
+
+2016-08-19 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c, parsetagx.c: Fix uninitialised values for <i> and <dd>.
+ Bug-Debian: https://github.com/tats/w3m/issues/16
+
+2016-08-18 Kuang-che Wu <kcwu@google.com>
+
+ * table.c: Fix table rowspan and colspan.
+ Origin: https://github.com/tats/w3m/pull/19
+ Bug-Debian: https://github.com/tats/w3m/issues/8 [CVE-2016-9422]
+
+2016-08-18 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Prevent segfault with malformed input_alt.
+ Bug-Debian: https://github.com/tats/w3m/issues/18 [CVE-2016-9438]
+
+ * file.c: Prevent segfault with incorrect button type.
+ Bug-Debian: https://github.com/tats/w3m/issues/17 [CVE-2016-9437]
+
+2016-08-17 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Prevent segfault with incorrect form_int fid.
+ Bug-Debian: https://github.com/tats/w3m/issues/15 [CVE-2016-9434]
+
+ * libwc/iso2022.c: Prevent segfault when iso2022 parsing.
+ Bug-Debian: https://github.com/tats/w3m/issues/14 [CVE-2016-9433]
+
+ * form.c: Prevent segfault for formUpdateBuffer.
+ Bug-Debian: https://github.com/tats/w3m/issues/13 [CVE-2016-9432]
+
+ * file.c, form.c:
+ Prevent negative array index for selectnumber and textareanumber.
+ Bug-Debian: https://github.com/tats/w3m/issues/12 [CVE-2016-9424]
+
+2016-08-16 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Truncate large values of table attributes.
+ Bug-Debian: https://github.com/tats/w3m/issues/11
+
+2016-08-15 Tatsuya Kinoshita <tats@debian.org>
+
+ * form.c: Prevent segfault for formUpdateBuffer.
+ Bug-Debian: https://github.com/tats/w3m/issues/9 [CVE-2016-9423]
+ Bug-Debian: https://github.com/tats/w3m/issues/10 [CVE-2016-9431]
+
+2016-08-09 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Prevent segfault with malformed input type.
+ Bug-Debian: https://github.com/tats/w3m/issues/7 [CVE-2016-9430]
+
+2016-08-08 Tatsuya Kinoshita <tats@debian.org>
+
+ * Makefile.in, configure, configure.ac, scripts/w3mman/Makefile.in:
+ Install German manpages.
+
+2016-08-08 Markus Hiereth <post@hiereth.de>
+
+ * doc-de/MANUAL.html, doc/MANUAL.html:
+ Update MANUAL.html in English and German.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772341#90
+
+ * doc-de/FAQ.html, doc/FAQ.html: Update FAQ.html in English and German.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772341#85
+
+ * scripts/w3mman/w3mman.1.in, scripts/w3mman/w3mman.de.1.in:
+ Update manpage for w3mman in English and German.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772341#80
+
+ * doc-de/w3m.1, doc/w3m.1:
+ Update manpage for w3m in English and German.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772341#75
+
+2016-07-18 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
+
+ * fm.h: Set default_url to 1 by default.
+
+2016-06-20 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-de/README.func, scripts/w3mhelp-funcdesc.de.pl.in:
+ Trim trailing spaces.
+
+2016-06-20 Markus Hiereth <post@hiereth.de>
+
+ * doc-de/README.func, scripts/w3mhelp-funcdesc.de.pl.in:
+ Update German help messages.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765682#47
+
+2016-06-19 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-de/README.func, scripts/w3mhelp-funcdesc.de.pl.in:
+ Convert German help messages to UTF-8.
+
+ * main.c: Update description of SOURCE and VIEW.
+
+2016-06-19 Markus Hiereth <post@hiereth.de>
+
+ * doc-de/README.func, doc/README.func:
+ Update description of SOURCE and VIEW.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765682#37
+
+2016-06-19 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
+
+ * doc-de/README.func: Update German messages.
+
+ * doc/README.func, main.c, menu.c: Update English messages.
+
+ * doc-jp/README.func, scripts/w3mhelp-funcdesc.ja.pl.in:
+ Update Japanese help messages.
+
+2016-06-19 Markus Hiereth <post@hiereth.de>
+
+ * doc-de/README.func, scripts/w3mhelp-funcdesc.de.pl.in:
+ Update German help messages.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765682
+
+ * doc/README.func, scripts/w3mhelp-funcdesc.en.pl.in:
+ * scripts/w3mhelp.cgi.in: Update English help messages.
+
+2016-05-11 Tatsuya Kinoshita <tats@debian.org>
+
+ * config.guess, config.sub:
+ Update config.* with autotools-dev 20160430.1.
+
+2016-04-14 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-de/README.func, doc-jp/README.func, doc/README.func:
+ * w3m-doc/sample/keymap.cgi: Cleanup obsolete INIT_MAILCAP.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820902
+
+ * NEWS: Update NEWS.
+
+2016-04-08 Tatsuya Kinoshita <tats@debian.org>
+
+ * libwc/johab.c: Fix segfault on bogus text for wc_N_to_johab1.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820373
+
+2016-04-07 Tatsuya Kinoshita <tats@debian.org>
+
+ * libwc/map/big5_ucs.map, libwc/map/cns11643_ucs.map:
+ * libwc/map/gb12345_ucs.map, libwc/map/gb2312_ucs.map:
+ * libwc/map/gbk_ucs.map, libwc/map/hkscs_ucs.map:
+ * libwc/map/jisx0208x0212x0213_ucs.map, libwc/map/ksx1001_ucs.map:
+ * libwc/map/sjis_ext_ucs.map, libwc/map/uhc_ucs.map, libwc/ucs.c:
+ * libwc/ucs.map: Fix segfault on bogus text for wc_any_to_ucs.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820162
+
+2016-04-03 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc/FAQ.html, doc/MANUAL.html: Update English documents.
+
+2016-04-03 Markus Hiereth <markus.hiereth@freenet.de>
+
+ * doc/FAQ.html, doc/MANUAL.html: Update English documents.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772341#25
+
+2016-04-02 Tatsuya Kinoshita <tats@debian.org>
+
+ * configure, configure.ac, doc-de/README.func, scripts/Makefile.in:
+ * scripts/w3mhelp-funcdesc.de.pl.in, scripts/w3mhelp.cgi.in:
+ Support German translated help messages (translation is in progress).
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765682
+
+ * doc-jp/w3m.1, doc/w3m.1: Update manpage footers to w3m 0.5.3.
+
+ * doc-jp/MANUAL.html, doc-jp/w3m.1, w3m-doc/outline.html.in:
+ * w3mhelp-lynx_ja.html.in, w3mhelp-w3m_ja.html.in:
+ Update Japanese documents for extbrowser4..9.
+
+2016-04-02 Justin B Rye <justin.byam.rye@gmail.com>
+
+ * doc/FAQ.html, doc/MANUAL.html, doc/README.func, doc/menu.submenu:
+ * main.c, menu.c, scripts/w3mhelp-funcdesc.ja.pl.in:
+ * scripts/w3mhelp.cgi.in, w3mhelp-lynx_en.html.in:
+ * w3mhelp-w3m_en.html.in: English fixes.
+ cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772341#15
+ Origin: https://lists.debian.org/debian-l10n-english/2014/12/msg00002.html
+ Origin: https://lists.debian.org/debian-l10n-english/2014/12/msg00030.html
+ Origin: https://lists.debian.org/debian-l10n-english/2015/02/msg00011.html
+
+2016-03-30 Leo Famulari <leo@famulari.name>
+
+ * url.c: Disable RC4.
+ Origin: http://git.savannah.gnu.org/cgit/guix.git/commit/?id=62339e2d493bf87a3aabe12e45458581e9705d83
+
+2016-03-29 Tatsuya Kinoshita <tats@debian.org>
+
+ * url.c: Fix variable is reassigned a value before the old one has
+ been used.
+
+ * regex.c: Fix printf format specifier mismatch when REGEX_DEBUG.
+
+ * w3mimg/fb/fb.c: Fix invalid braces when not Linux or FreeBSD.
+
+ * local.c: Fix uninitialized variable when not HAVE_PUTENV.
+
+ * w3mimgdisplay.c: Fix realloc mistake for DrawImage.
+
+ * file.c: Fix mistake of unescape spaces for _doFileCopy.
+ cf. [w3m-dev-en 00751], [w3m-dev-en 00752] on 2002-06-09
+
+ * url.c: Fix style of array index is used before limits check.
+ Bug: https://sourceforge.net/p/w3m/feature-requests/25/
+
+2016-03-22 Tatsuya Kinoshita <tats@debian.org>
+
+ * menu.c, proto.h: Fix build failure when not USE_MOUSE for sgrmouse.
+ cf. https://twitter.com/naota344/status/711541592167854081
+
+2016-03-20 Tatsuya Kinoshita <tats@debian.org>
+
+ * rc.c: Fix reverse ordered config parameters.
+
+2016-03-19 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc/FAQ.html: Update FAQ for extbrowser.
+
+2016-03-14 Tatsuya Kinoshita <tats@debian.org>
+
+ * po/de.po, po/ja.po, po/w3m.pot, po/zh_CN.po, po/zh_TW.po, rc.c:
+ Update PO strings for extbrowser2..9.
+
+2016-03-13 Tatsuya Kinoshita <tats@debian.org>
+
+ * acinclude.m4, configure:
+ Set firefox instead of mozilla to default browser.
+
+ * po/Makefile.in.in, po/de.po, po/ja.po, po/w3m.pot, po/zh_CN.po:
+ * po/zh_TW.po: Update PO strings for extbrowser4..9.
+
+ * doc-jp/MANUAL.html, doc/MANUAL.html, fm.h, main.c, rc.c:
+ Add extbrowser4, extbrowser5, ..., and extbrowser9.
+ e.g.
+ - extbrowser8 url=%s && printf %s "$url" | xsel && printf %s "$url" | xsel -b &
+ - extbrowser9 mpv %s &
+ cf. https://github.com/spcmd/w3m
+
+2016-02-28 Tatsuya Kinoshita <tats@debian.org>
+
+ * menu.c: Fix SIGFPE for ACCESSKEY.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779092
+
+ * doc/README.func, main.c: Typo fix for ACCESSKEY.
+ cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779092#5
+
+2015-12-20 Franz Thoma <franz.thoma@tngtech.com>
+
+ * w3mimg/x11/x11_w3mimg.c: Fix semi-transparent artifacts in w3m-img
+ when used with 32-bit color (e.g. urxvt).
+ imlib_render_image_on_drawable_at_size() tended to leave nasty
+ semi-transparent artifacts in 32-bit mode. Apparently, resizing an
+ image in 32-bit mode affects the alpha channel even if there is no
+ transparency in the image. With this patch, resizing is done in
+ 24-bit mode (or whatever depth the original image has) before
+ converting the image to 32-bit and rendering it on the display.
+ Origin: https://gist.github.com/fmthoma/f76a1b44e00d5ca972bb
+ cf. https://github.com/hut/ranger/issues/86#issuecomment-166027119
+
+2015-12-17 Tatsuya Kinoshita <tats@debian.org>
+
+ * w3mimg/x11/x11_w3mimg.c:
+ Wrap render_pixbuf_to_pixmap_32() in USE_GTK2.
+
+2015-12-17 Araki Ken <arakiken@users.sf.net>
+
+ * w3mimg/x11/x11_w3mimg.c:
+ w3mimgdisplay supports 32 bit depth screen. (e.g. gnome-terminal)
+ Origin: https://bitbucket.org/arakiken/w3m/commits/f9c22db8cfd1aaba9bb7301ef9ba51ed88d8bb40
+
+2015-12-17 Tatsuya Kinoshita <tats@debian.org>
+
+ * w3mimg/x11/x11_w3mimg.c:
+ Revert "Fix handling visuals and colormaps incorrectly".
+ This reverts commit e24b4064daf3e022e370788a8c7267db40c37dda.
+
+2015-11-19 Tatsuya Kinoshita <tats@debian.org>
+
+ * fm.h: Accept cookies by default.
+
+ * fm.h: Set argv_is_url to 1 by default.
+ Bug-Arch: https://bugs.archlinux.org/task/47102
+
+2015-11-18 Tatsuya Kinoshita <tats@debian.org>
+
+ * config.guess, config.sub:
+ Update config.* with autotools-dev 20150820.1.
+
+2015-11-11 Mingye Wang (Arthur2e5) <arthur200126@gmail.com>
+
+ * po/LINGUAS, po/zh_CN.po, po/zh_TW.po:
+ Add zh_CN and zh_TW translations.
+ Please note that the zh_TW translation is machine-converted using
+ OpenCC from zh_CN, and needs to be further polished by actual zh_TW
+ speakers.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804732#10
+
+2015-10-24 BwackNinja <BwackNinja@gmail.com>
+
+ * w3mimg/x11/x11_w3mimg.c:
+ Fix handling visuals and colormaps incorrectly.
+ cf. https://github.com/hut/ranger/issues/86
+ Origin: https://gist.github.com/BwackNinja/60a344730170f9ce2163
+ Bug-Arch: https://bugs.archlinux.org/task/46836
+ Bug: https://sourceforge.net/p/w3m/patches/72/
+
+2015-10-10 Tatsuya Kinoshita <tats@debian.org>
+
+ * cookie.c: Remove incomplete special_domain tests.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=385702
+
+2015-10-04 Gaetan Bisson <bisson@archlinux.org>
+
+ * scripts/w3mhelp.cgi.in: Do not use defined(%hash).
+ Origin: https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/w3m&id=d9e0a4f0b461c9e2177cd9e64a10581386650503
+ Bug-Arch: https://bugs.archlinux.org/task/45608
+
+2015-09-06 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Do not use C99-style comments.
+
+2015-09-06 David Crosby <dave@dafyddcrosby.com>
+
+ * file.c: Mitigate issue #16 found by @kcwu.
+ * table.c: Fix stack overflow found by @kcwu.
+ Origin: https://github.com/dafyddcrosby/sw3m
+ Bug-sw3m: https://github.com/dafyddcrosby/sw3m/issues/16
+
+2015-08-21 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-jp/keymap.lynx, doc/keymap.lynx: Fix unknown key.
+ Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/265144
+ Bug: https://sourceforge.net/p/w3m/bugs/48/
+
+2015-08-11 David Crosby <dave@dafyddcrosby.com>
+
+ Fix resource leaks, dead assignments, divide-by-zero, and so on.
+ Origin: https://github.com/dafyddcrosby/sw3m
+
+ * buffer.c: Check for presence of prevl before using.
+
+ * html.h: Adjust UFclose to remove false positive of CWE-481.
+
+ * ftp.c: Move sockent for splint.
+
+ * cookie.c: Use unsigned int for max_count.
+
+ * libwc/iso2022.c: Add missing comparision that made if always true.
+
+ * Str.c: Use fgetc in while loops, use int instead of char.
+
+ * mailcap.c: Adjust len to size_t.
+
+ * history.c: Check return value of rename.
+
+ * main.c: Adjust while loop.
+
+ * news.c: Check dup call for errors.
+
+ * file.c: Remove unused value.
+
+ * ftp.c: dup can give a negative value.
+
+ * main.c: Use int for c.
+
+ * table.c: Initialize new_tabwidth at declaration.
+
+ * local.c: Remove overflow on readlink.
+
+ * anchor.c, file.c, istream.c, main.c, menu.c, rc.c, table.c, terms.c:
+ * url.c: Remove dead assignments flagged by Clang static analysis.
+
+ * w3mbookmark.c:
+ Move fclose to fix dereference after null check (Coverity).
+
+ * file.c: Fix resource leak in AuthDigestCred.
+
+ * buffer.c: Fix resource leak in readBufferCache.
+
+ * cookie.c: Fix resource leak in load_cookies.
+
+ * frame.c: Fix resource leak.
+
+ * w3mhelperpanel.c: Fix resource leak.
+
+ * w3mbookmark.c: Fix resource leak and a null return value dereference.
+
+ * linein.c: Fix a divide-by-zero.
+
+ * cookie.c: Change total_dot_number to unsigned int.
+
+ * cookie.c: Free tmp.
+
+ * local.c: Remove unreachable return.
+
+2015-08-10 Alan Grow <alangrow@gmail.com>
+
+ * url.c (HTTPrequest):
+ - Use Content-Type instead of Content-type.
+ - Use Content-Length instead of Content-length.
+ Origin: https://github.com/acg/w3m/commit/5946c2784d4eae46ec06e52390e43a874b3395fc
+
+2015-08-09 Egmont Koblinger <egmont@users.sourceforge.net>
+
+ * terms.c: Support sgrmouse for skip_escseq.
+ * menu.c: Adjust comments for keymaps.
+ Origin: https://sourceforge.net/p/w3m/patches/65/#e2aa
+
+2015-08-09 Tatsuya Kinoshita <tats@debian.org>
+
+ * keybind_lynx.c: Support sgrmouse for Lynx-like key binding.
+ cf. https://sourceforge.net/p/w3m/patches/65/
+
+2015-08-09 IWAMOTO Kouichi <sue@iwmt.org>
+
+ * menu.c: Support SGR style mouse handler for menu.
+ cf. https://github.com/tats/w3m/issues/5
+ Origin: https://gist.github.com/ttdoda/83fbcf676a21da28432b
+ Bug: https://sourceforge.net/p/w3m/patches/65/
+
+2015-08-06 Richard Quirk <richard@quirk.es>
+
+ Fix problems reported by cppcheck, clang --analyze and gcc warnings.
+ Origin: https://github.com/tats/w3m/pull/6
+
+ * Str.c, Str.h: Strnew_charp and co do not modify the char* input.
+
+ * local.c: Close temp file if pipe open fails.
+
+ * rc.c: Avoid passing null to strlen.
+
+ * file.c: Initialise hidden_input to NULL.
+ This prevents a possible use of garbage value on line 3017.
+
+ * file.c: Use pclose for pipe.
+
+2015-08-05 IWAMOTO Kouichi <sue@iwmt.org>
+
+ * main.c: Fix that SGR style mouse handler has off-by-one problem.
+ cf. https://github.com/tats/w3m/issues/5
+ Origin: https://gist.github.com/ttdoda/30c189a63d483beeb207
+ Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/1390768
+ Bug: https://sourceforge.net/p/w3m/patches/65/
+
+2015-07-31 yshl <yshl@takechiyo.net>
+
+ * Bonus/goodict.cgi:
+ - Use Encode.pm instead of NKF.
+ - Update to the current URL.
+ - Enable to select search mode.
+ Origin: https://github.com/tats/w3m/pull/4
+
+2015-07-20 Tatsuya Kinoshita <tats@debian.org>
+
+ * README: Add short description.
+
+ * doc-jp/FAQ.html, doc/FAQ.html: Mention GOPHER_PROXY and FTP_PROXY.
+
+2015-07-05 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-jp/FAQ.html, doc/FAQ.html: Mention HTTPS_PROXY.
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=791425
+
+2015-06-27 yshl <yshl@takechiyo.net>
+
+ * doc-jp/README.SSL: Modify certdata2pem.rb to assume the encoding
+ of the certdata.txt to be UTF-8.
+ Origin: https://github.com/tats/w3m/pull/3
+
+2015-06-23 Daniel Schepler <dschepler@gmail.com>
+
+ * terms.c: Wrap the functions used by image.c in USE_IMAGE.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789539
+
+2015-05-09 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-jp/README.siteconf, doc/README.siteconf:
+ Update examples of siteconf for twitter.com.
+
+2015-05-03 Tatsuya Kinoshita <tats@debian.org>
+
+ * main.c: Correct GC version confirmation.
+
+2015-05-02 yshl <yshl@takechiyo.net>
+
+ * main.c: Correct GC version confirmation.
+ Origin: https://github.com/tats/w3m/pull/2
+
+2015-04-29 Markus Hiereth <post@hiereth.de>
+
+ * po/de.po: Update German translation.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783383
+
+2015-04-29 Tatsuya Kinoshita <tats@debian.org>
+
+ * po/Makevars, po/de.po, po/ja.po, po/w3m.pot, rc.c:
+ Update PO strings for display_borders.
+
+2015-04-26 yshl <yshl@takechiyo.net>
+
+ * main.c: Use GC_oom_fn instead of GC_set_oom_fn for gc-7.1.
+ Origin: https://github.com/tats/w3m/pull/1
+
+2015-02-03 Tatsuya Kinoshita <tats@debian.org>
+
+ * po/de.po, po/ja.po, po/w3m.pot: Update PO.
+
+2015-02-02 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c, fm.h, rc.c:
+ New option "display_borders" to display 0 pixel table borders.
+ cf. http://d.hatena.ne.jp/rubikitch/20101120
+
+2015-01-24 Tatsuya Kinoshita <tats@debian.org>
+
+ * acinclude.m4, configure, version.c.in:
+ Update to 0.5.3+gitYYYYMMDD (generate from ChangeLog).
+
+2015-01-15 Tatsuya Kinoshita <tats@debian.org>
+
+ * alloc.h, main.c: Drop C99 features.
+
+2015-01-15 Scarlett <scarlett@xavin.net>
+
+ Add overflow detection.
+ Origin: http://marc.info/?l=openbsd-ports&m=142090828929750&w=2
+ * main.c: Call exit(1) when out of memory to avoid dereferencing null
+ pointers when gc's malloc fails.
+ * alloc.h: Replacements for w3m's allocation macros which add
+ overflow detection and concentrate the macros in one file.
+ * indep.h, libwc/charset.c, libwc/status.c, matrix.c: Use the
+ overflow-detecting allocation macros from alloc.h.
+
+2015-01-15 Tatsuya Kinoshita <tats@debian.org>
+
+ * Str.c, cookie.c, map.c:
+ Do not use C99 printf format specifiers and asprintf.
+
+2015-01-15 Scarlett <scarlett@xavin.net>
+
+ Correct printf arguments and use asprintf.
+ Origin: http://marc.info/?l=openbsd-ports&m=142090828929750&w=2
+ * Str.c: Use asprintf() instead of rolling our own printf string
+ length detection.
+ * cookie.c: Pass the char pointer in the string struct to printf %s
+ instead of the string struct itself.
+ Print time_t using %lld instead of %ld to allow for 64-bit time_t.
+ * main.c: Print a long int using the correct format specifier.
+ * map.c: Print size_t using the correct format specifier.
+
+2014-12-06 Araki Ken <arakiken@users.sf.net>
+
+ Support OSC 5379 remote imaging and sixel graphics.
+ Origin: https://bitbucket.org/arakiken/w3m/branch/remoteimg (2014-11-16)
+
+ * doc/README.sixel, terms.c: Add README.sixel. W3M_IMG2SIXEL
+ environmental variable enables to specify options of img2sixel.
+
+ * image.c, terms.c:
+ Add n_terminal_image argument to put_image_{sixel|osc5379}().
+ Use struct winsize to calculate ppc and ppl.
+
+ * terms.c: If SCREEN_VARIANT=sixel on GNU screen, exec img2sixel
+ without -P option.
+
+ * terms.c: ttymode_set() -> ttymode_reset().
+
+ * terms.c: Fix.
+
+ * terms.c: Support GNU screen.
+
+ * terms.c: Show GIF (except animation GIF) correctly.
+
+ * main.c, terms.c: img2sixel exits by Ctrl+C. Enable GIF Animation if
+ 'I' is pressed to show it.
+
+ * image.c: Add declaration of get_pixel_per_cell().
+
+ * terms.c: Show the first frame of animation gif files.
+
+ * terms.c: system() -> fork()&execvp()
+
+ * display.c: Draw underline on anchor which contains cboth text and
+ images.
+
+ * etc.c: Remove close_tty() from setup_child() because close_tty()
+ sometimes interrupts loadGeneralFile() in loadImage() and corrupt
+ image data can be cached in ~/.w3m.
+
+ * image.c: Minor fix.
+
+ * image.c: Cache image files if at all possible and convert them to
+ sixel when -sixel option is specified.
+
+ * image.c: Init pixel_per_{char|line}_i if get_pixel_per_cell() fails.
+
+ * display.c, file.c, fm.h, image.c, main.c, terms.c:
+ Add -sixel option which supports image processing by img2sixel.
+
+ * image.c: Don't download image files whose size is specified in
+ <img> tag.
+
+ * image.c: Minor fixes of parseImageHeader().
+
+ * image.c: Determine the format of an image file by its header data
+ not by its file name suffix.
+
+ * image.c: Read width and height from jpeg, png and gif files directly
+ instead of executing w3mimgdisplay -size.
+
+ * display.c: display.c: Draw underline on anchor text which is not
+ overlapped with any image.
+
+ * terms.c: Clear fd_set by FD_ZERO() before select().
+
+ * file.c: nw and ni are rounded up instead of rounded off to show
+ every corner of images.
+
+ * terms.c: Change time to wait for the response of "\x1b[14t\x1b[18t"
+ from 0.1 sec to 0.5 sec.
+
+ * image.c:
+ - clearImage() works.
+ - Use cached image files created by w3m in getImage().
+
+ * file.c: Hack for alignment.
+
+ * fm.h, image.c, terms.c:
+ - Adjust the image size to the terminal cell size.
+ - If the image size is specified in html source, skip to load the image.
+
+ * display.c, fm.h, image.c, main.c, terms.c, w3mimg/x11/x11_w3mimg.c:
+ Support remote image by OSC 5379 show_picture sequence.
+
+2014-12-06 Olaf Hering <olh@suse.de>
+
+ * parsetagx.c: Fix crash in parse_tag() during every start.
+ Origin: https://build.opensuse.org/package/view_file/openSUSE:Factory/w3m/w3m-parsetagx-crash.patch?expand=1
+
+ * fm.h: Change the default to alt_entity=0.
+ Change the default for the option "Use ASCII equivalents to
+ display entities" from YES to NO.
+ Origin: https://build.opensuse.org/package/view_file/openSUSE:Factory/w3m/w3m-0.5.1-no-ASCII-equivalents-by-default.patch?expand=1
+ Bug-Novell: https://bugzilla.novell.com/show_bug.cgi?id=247397
+
+ * anchor.c, libwc/gb18030.c, libwc/ucs.c, regex.c:
+ Fix a few harmless uninitialized variables.
+ Origin: https://build.opensuse.org/package/view_file/openSUSE:Factory/w3m/w3m-uninitialized.patch?expand=1
+
+2014-12-06 Peter Poeml <poeml@suse.de>
+
+ * terms.c: Prevent segfault when editing a textarea field with vi.
+ Add fix for segfault that can occur when editing a textarea field
+ with vi, and returning to w3m (it seems to happen if the terminal
+ is not writable, as when using w3m after 'su - some_user')
+ Origin: https://build.opensuse.org/package/view_file/openSUSE:Factory/w3m/w3m-0.4.1-textarea-segfault.dif?expand=1
+
+2014-12-04 Tatsuya Kinoshita <tats@debian.org>
+
+ * acinclude.m4: Follow updated configure.
+
+2014-12-03 Yusuke Baba <babayaga1@y8.dion.ne.jp>
+
+ * configure, w3mimg/fb/fb.c, w3mimg/fb/fb.h, w3mimg/fb/fb_w3mimg.c:
+ Support FreeBSD framebuffer.
+ Origin: http://www.ac.auone-net.jp/~baba/w3m-img/index.html
+ Bug-FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=122673
+
+2014-12-02 Naohiro Aota <naota@gentoo.org>
+
+ * acinclude.m4, configure, w3mimg/fb/fb_gdkpixbuf.c:
+ * w3mimg/x11/x11_w3mimg.c:
+ Depend on gdk-pixbuf instead of gtk when gtk2.
+ Origin: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/w3m/files/w3m-0.5.3-gdk-pixbuf.patch?revision=1.1
+
+2014-12-02 Jeroen Roovers <jer@gentoo.org>
+
+ * acinclude.m4, configure: Add tinfo to with_termlib.
+ Fix building against sys-libs/ncurses[tinfo].
+ Origin: https://504588.bugs.gentoo.org/attachment.cgi?id=372650
+ Bug-Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=504588
+
+2014-12-01 OBATA Akio <obache@netbsd.org>
+
+ * acinclude.m4, configure:
+ Assume defined PKG_CONFIG points right location when gtk2.
+ Origin: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/w3m/patches/patch-aa?rev=1.13&content-type=text/x-cvsweb-markup
+ Origin: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/w3m/patches/patch-ak?rev=1.1&content-type=text/x-cvsweb-markup
+
+2014-12-01 Vsevolod Stakhov <vsevolod@FreeBSD.org>
+
+ * config.h.in: Disable USE_EGD for LibreSSL.
+ Disable use of RAND_egd as it is absent in FreeBSD.
+ This also fixes build error with LibreSSL.
+ Origin: https://bz-attachments.freebsd.org/attachment.cgi?id=144635
+ Bug-FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191852
+ Bug-FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191956
+
+2014-12-01 zimous <zimous@matfyz.cz>
+
+ * po/ja.po: Set Language tag properly for Japanese translation.
+ Origin: https://512722.bugs.gentoo.org/attachment.cgi?id=378452
+ Bug-Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=512722
+
+2014-11-30 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc/w3m.1: Typo fix.
+
+2014-11-30 Markus Hiereth <post@hiereth.de>
+
+ * doc/w3m.1: Miscellaneous changes to improve English manpage.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766550#30
+
+2014-11-29 Markus Hiereth <post@hiereth.de>
+
+ * doc/w3m.1: Improve FILES.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766550#30
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403634
+
+ * doc/w3m.1: Improve EXAMPLES.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766550#30
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380560
+
+ * doc/w3m.1: Improve explanation about option -N.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766550#30
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345084
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530468
+
+ * doc/w3m.1: Note that -cols only affects when HTML is rendered.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766550#30
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=285251
+
+ * doc/w3m.1: Add more info on configuration.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766550#30
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=268211
+
+2014-11-29 Justin B Rye <justin.byam.rye@gmail.com>
+
+ * scripts/w3mman/w3mman.1.in: Tweak for W3MMAN_W3M.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771003#5
+
+ * scripts/w3mman/w3mman.1.in: English fixes.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766550#25
+
+2014-11-29 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-19+.
+
+2014-11-29 Justin B Rye <justin.byam.rye@gmail.com>
+
+ * scripts/w3mman/w3mman2html.cgi.in: Fix Perl warnings.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771004
+
+2014-10-21 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-19
+
+ * po/LINGUAS: Correct LINGUAS to a whitespace separated list
+
+2014-10-21 Markus Hiereth <markus.hiereth@freenet.de>
+
+ * po/LINGUAS, po/de.po: Add German translation
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763964
+
+2014-10-15 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-18
+
+ * doc-jp/README.SSL: Update README.SSL to follow default values
+
+ * config.sub: Update config.sub with autotools-dev 20140911.1
+
+ * fm.h: Disable SSLv3 by default [CVE-2014-3566]
+ cf. https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/
+
+2014-10-15 Ludwig Nussel <ludwig.nussel@suse.de>
+
+ * fm.h: Force ssl_verify_server on and disable SSLv2 support
+ Origin: http://www.openwall.com/lists/oss-security/2010/06/14/4
+
+2014-10-13 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-17+
+
+2014-10-04 Tatsuya Kinoshita <tats@debian.org>
+
+ * libwc/ambwidth_map.awk, libwc/map/ucs_ambwidth.map:
+ Fix incorrect generation of ucs_ambwidth_map
+
+2014-08-22 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-17
+
+ * config.guess:
+ Update config.guess to 2014-03-23 with autotools-dev 20140510.1
+
+ * config.sub:
+ Update config.sub to 2014-05-01 with autotools-dev 20140510.1
+
+2014-08-22 Micah Cowan <micah@addictivecode.org>
+
+ * main.c: Support Boehm GC 7.2.
+ Replace Gentoo's patch to prevent segfaults due to infinite recursion.
+ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=080_gc72.patch;att=1;bug=758831
+ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758831
+ Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=555467
+ Bug: http://sourceforge.net/p/w3m/patches/63/
+ Bug: http://sourceforge.net/p/w3m/patches/59/
+
+2014-08-22 Tatsuya Kinoshita <tats@debian.org>
+
+ * main.c:
+ Revert "Support Boehm GC 7.2" (w3m-0.5.2-gc72.patch from Gentoo)
+ This reverts commit 4331db3e3e673ac4dbfe8e9f2b42a8e0478dc98a.
+
+2014-06-23 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-16
+
+ * url.c: Disable ciphers that use keys smaller than 128 bits
+ Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/1325674
+
+2014-01-04 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-15
+
+2014-01-03 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-14
+
+ * acinclude.m4, configure: Use pkg-config to build with imlib2 1.4.6
+
+ * doc/HISTORY, doc/README.cookie, doc/README.m17n:
+ Prefer US-ASCII rathar than Japanese encodings in English documents
+
+2013-12-27 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-jp/MANUAL.html, doc/MANUAL.html:
+ Cleanup unusable links in MANUAL.html
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517315
+
+ * version.c.in: Update to 0.5.3+debian-13+
+
+2013-12-17 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-13
+
+2013-12-14 Tatsuya Kinoshita <tats@debian.org>
+
+ * config.guess:
+ Update config.guess to 2013-06-10 with autotools-dev 20130810.1
+
+ * config.sub:
+ Update config.sub to 2013-08-10 with autotools-dev 20130810.1
+
+2013-12-07 Reinhard Max <max@suse.de>
+
+ * local.c: Fix a directory descriptor leak in loadLocalDir.
+ Patch from openSUSE on 2009-09-07.
+ Origin: https://build.opensuse.org/package/view_file/openSUSE:Factory/w3m/w3m-closedir.patch
+ Bug-Novell: https://bugzilla.novell.com/show_bug.cgi?id=531675
+
+2013-12-07 AIDA Shinra <shinra@j10n.org>
+
+ * main.c: Fix crash after SEARCH_NEXT.
+ Patch from <http://www.j10n.org/files/w3m-cvs-1.1055-search-next.patch>,
+ [w3m-dev:04473] on 2013-12-07.
+
+2013-11-11 Paul Boekholt <p.boekholt@gmail.com>
+
+ * file.c: Add support for single quoted meta refresh URL
+ Bug: https://sourceforge.net/p/w3m/patches/53/
+ Bug-NetBSD: http://gnats.netbsd.org/42400
+
+2013-11-07 Cristian Rodriguez <crrodriguez@opensuse.org>
+
+ * url.c: Use SSL_OP_NO_COMPRESSION if available.
+ Due to the "CRIME attack" (CVE-2012-4929) HTTPS clients that
+ negotiate TLS-level compression can be abused for MITM attacks.
+ * url.c: Use SSL_MODE_RELEASE_BUFFERS if available.
+ Patch from openSUSE on 2012-11-12:
+ https://build.opensuse.org/request/show/141054
+
+2013-10-15 Tatsuya Kinoshita <tats@debian.org>
+
+ * Makefile.in:
+ Depend on funcname.tab to fix parallel make issue of scripts
+ Bug: https://sourceforge.net/p/w3m/patches/64/
+ Bug-Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=362249
+
+ * w3mimg/Makefile.in:
+ Avoid prerequisite $(IMGOBJS) to fix parallel make issue of w3mimg
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726188
+
+ * acinclude.m4, configure:
+ Explicitly add -lX11 to IMGX11LDFLAGS only when gtk2
+ Bug: https://sourceforge.net/p/w3m/patches/57/
+
+ * w3mimg/Makefile.in: Revert "Fix parallel make issue"
+ This reverts commit aa6f871c6dcc108118142bcc786e4a6ac3d46867.
+
+ * Makefile.in:
+ Revert "Explicitly link w3mimgdisplay with -lX11 to build with gcc 4.5"
+ This reverts commit 7410954066d68ac2ad6aea638801714447321fec.
+
+2013-10-14 AIDA Shinra <shinra@j10n.org>
+
+ * url.c: Define schemeNumToName() to fix scheme bug.
+ Patch from <http://www.j10n.org/files/w3m-cvs-1.1055-schemebug.patch>,
+ [w3m-dev:04470] on 2013-10-14.
+ Bug: https://sourceforge.net/p/w3m/patches/60/
+
+ * config.h.in, file.c, fm.h, html.h, image.c, indep.c, indep.h:
+ * istream.c, istream.h, local.c, main.c, mimehead.c, proto.h:
+ Workaround of GC crash on Cygwin64.
+ Patch from <http://www.j10n.org/files/w3m-cvs-1.1055-win64gc.patch>,
+ [w3m-dev:04469] on 2013-10-14.
+
+2013-10-14 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-12+
+
+2013-10-14 Jarek Czekalski <jarekczek@poczta.onet.pl>
+
+ * terms.c: Fix paren in check_cygwin_console()
+ Bug: https://sourceforge.net/p/w3m/patches/66/
+
+2013-10-13 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-12
+
+ * doc-jp/MANUAL.html, doc-jp/w3m.1, doc/MANUAL.html, doc/w3m.1:
+ Update document for the -s option change
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=75527
+
+ * terms.c: Do not fail when LANG is not set.
+ Check whether the value of LC_ALL, LC_CTYPE or LANG is not NULL in
+ check_cygwin_console().
+ Bug: https://sourceforge.net/p/w3m/patches/66/
+
+2013-10-12 Tatsuya Kinoshita <tats@debian.org>
+
+ * table.h: Bump MAXCOL to 256
+ Bug: https://sourceforge.net/p/w3m/feature-requests/24/
+
+2013-10-12 Laurence Richert <laurencerichert@yahoo.de>
+
+ * main.c, proto.h: vim/-perator like handling
+ - half page scrolling
+ - jumping to elements numbered by getLinkNumberStr() from Karsten
+ Schoelzel
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724028
+
+2013-10-12 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-jp/README, doc/README:
+ Mention project page rather than unavailable mailing lists
+
+2013-10-09 Rafael Laboissiere <rafael@laboissiere.net>
+
+ * doc/README.img: Fix typo
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725892
+
+2013-08-12 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-11+
+
+ * ChangeLog: Update ChangeLog to use contributor's name
+
+2013-08-08 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-11
+
+2013-08-04 Tatsuya Kinoshita <tats@debian.org>
+
+ * Str.c: Check length for Strchop()
+
+ * main.c: Fix potentially segfault of execdict()
+
+ * version.c.in: Update to 0.5.3+debian-10+
+
+ * file.c: Fix segfault of loadGeneralFile()
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718612
+
+2013-08-02 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-10
+
+2013-08-02 Piotr P. Karwasz <piotr.p@karwasz.org>
+
+ * scripts/w3mman/w3mman2html.cgi.in:
+ Correct underline processing and more UTF-8 support for w3mman2html.cgi.
+ Patch from <https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/680202>
+ on 2010-11-23.
+
+2013-08-01 Hilko Bengen <bengen@debian.org>
+
+ * entity.c: Ignore SOFT HYPHEN to prevent drawing hyphens everywhere.
+ Patch from <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=441934>
+ on 2011-03-01.
+
+2013-08-01 Tatsuya Kinoshita <tats@debian.org>
+
+ * doc-jp/README, doc/README: Update contact list in README
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696209
+
+2013-07-30 Tatsuya Kinoshita <tats@debian.org>
+
+ * config.guess, config.sub:
+ Update config.guess and config.sub to supprot aarch64.
+ Updated with Debian autotools-dev version 20130515.1.
+
+2013-07-30 Conrad J.C. Hughes <debbugs@xrad.org>
+
+ * main.c: Sort anchors by sequence number in -dump.
+ Patch from <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657666>
+ on 2012-01-27.
+
+2013-07-30 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update to 0.5.3+debian-9+
+
+2013-07-29 Tatsuya Kinoshita <tats@debian.org>
+
+ * version.c.in: Update version to w3m/0.5.3+debian-9
+
+ * version.c.in: Set CURRENT_VERSION to debian version
+
+2013-07-28 Tatsuya Kinoshita <tats@debian.org>
+
+ * file.c: Fix segfault of process_button()
+
+2013-04-08 AIDA Shinra <shinra@j10n.org>
+
+ * file.c: One more patch for siteconf from [w3m-dev 04464]
+
+ * anchor.c, config.h.in, display.c, doc-jp/README.siteconf:
+ * doc/README.siteconf, file.c, fm.h, form.c, frame.c, func.c:
+ * history.c, indep.c, indep.h, linein.c, main.c, map.c, menu.c:
+ * po/ja.po, proto.h, rc.c, url.c: Support the siteconf feature.
+ Patch to support the siteconf feature, from [w3m-dev 04463]
+ on 2012-06-27.
+
+2013-04-08 Hayaki Saito <user@zuse.jp>
+
+ * keybind.c, main.c, proto.h, terms.c:
+ Support SGR 1006 mouse reporting.
+ cf. [w3m-dev 04466] on 2012-07-15
+ Origin: https://gist.github.com/3114255
+ Bug: https://sourceforge.net/p/w3m/patches/65/
+
+2012-05-19 Hilko Bengen <bengen@debian.org>
+
+ * form.c: Assume "text" if an input type is unknown.
+ Patch from <http://bugs.debian.org/615843> on 2011-03-01.
+
+2012-05-19 Simon Ruderich <simon@ruderich.org>
+
+ * Makefile.in: Use $(CPPFLAGS) with $(CPP).
+ Patch from <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665491>
+ on 2012-03-24.
+
+2012-05-03 Miroslav Šulc <fordfrog@gentoo.org>
+
+ * w3mimg/Makefile.in: Fix parallel make issue.
+ Patch from Gentoo
+ <http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/w3m/files/w3m-0.5.3-parallel-make.patch?revision=1.1&view=markup>
+ <https://bugs.gentoo.org/show_bug.cgi?id=353390> on 2011-02-01.
+
+2012-05-03 MATSUU Takuto <matsuu@gentoo.org>
+
+ * main.c: Support Boehm GC 7.2.
+ Patch from Gentoo
+ <http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/w3m/files/w3m-0.5.2-gc72.patch?revision=1.1&view=markup>
+ on 2009-12-13.
+
+2012-05-02 Reinhard Tartler <siretart@tauware.de>
+
+ * istream.c, istream.h:
+ Fix that struct file_handle conflicts with glibc 2.14.
+ Patch from <https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/935540>
+ on 2012-02-19.
+
+2011-10-30 Colin Watson <cjwatson@ubuntu.com>
+
+ * acinclude.m4, configure, w3mbookmark.c:
+ Appease gcc -Werror=format-security.
+ Patch from 0.5.3-3ubuntu1 on 2011-10-23.
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646321
+
+2011-06-19 Martin Pitt <martin.pitt@ubuntu.com>
+
+ * Makefile.in:
+ Explicitly link w3mimgdisplay with -lX11 to build with gcc 4.5.
+ Patch from 0.5.2-10ubuntu1 on 2010-12-03.
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605761
+
+2011-06-19 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * main.c: Change the -s option to "squeeze multiple blank lines".
+ Change the -s option from "display charset Shift_JIS" to "squeeze
+ multiple blank lines" to work as /usr/bin/pager. In addition, the
+ options -j and -e are disabled. To specify the display charset,
+ use -O{s|j|e} instead.
+ Patch from [w3m-dev 01275] on 2000-10-26.
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=75527
+
+2011-06-19 Hiroyuki Ito <ZXB01226@nifty.com>
+
+ * file.c, fm.h, html.c, html.h, proto.h, table.c, tagtable.tab:
+ Support the button element as defined in HTML 4.01.
+ Patch from upstream, [w3m-dev 04411] on 2010-09-17, to support the
+ button element. It is discussed upstream and incomplete, but enough
+ to login Launchpad.
+ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=136810
+ Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/628755
+
2012-05-22 Tatsuya Kinoshita <tats@vega.ocn.ne.jp>
* [w3m-dev 04451] w3m/entity.h should be removed when `make clean'
diff --git a/Makefile.in b/Makefile.in
index 7d692f9..453072d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -111,6 +111,7 @@ IMGDISPLAY=w3mimgdisplay$(EXT)
MAN1_TARGET=$(PACKAGE).1
MAN1=$(top_srcdir)/doc/w3m.1
MAN1_JA=$(top_srcdir)/doc-jp/w3m.1
+MAN1_DE=$(top_srcdir)/doc-de/w3m.1
LIB_TARGETS=$(BOOKMARKER) $(HELPER)
AUXBIN_TARGETS=@AUXBIN_TARGETS@
@@ -150,7 +151,7 @@ parsetagx.o: html.c
funcname.tab: $(DEFUNS)
(echo '#define DEFUN(x,y,z) x y';\
- sed -ne '/^DEFUN/{p;n;/^[ ]/p;}' $(DEFUNS)) | $(CPP) - | \
+ sed -ne '/^DEFUN/{p;n;/^[ ]/p;}' $(DEFUNS)) | $(CPP) $(CPPFLAGS) - | \
awk '$$1 ~ /^[_A-Za-z]/ { \
for (i=2;i<=NF;i++) { print $$i, $$1} \
}' > $@.tmp
@@ -220,10 +221,12 @@ install-core: $(TARGETS)
-$(MKDIR) $(DESTDIR)$(HELP_DIR)
-$(MKDIR) $(DESTDIR)$(mandir)/man1
-$(MKDIR) $(DESTDIR)$(mandir)/ja/man1
+ -$(MKDIR) $(DESTDIR)$(mandir)/de/man1
$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)/$(TARGET)
$(INSTALL_DATA) $(HELP_FILE) $(DESTDIR)$(HELP_DIR)/$(HELP_TARGET)
$(INSTALL_DATA) $(MAN1) $(DESTDIR)$(mandir)/man1/$(MAN1_TARGET)
$(INSTALL_DATA) $(MAN1_JA) $(DESTDIR)$(mandir)/ja/man1/$(MAN1_TARGET)
+ $(INSTALL_DATA) $(MAN1_DE) $(DESTDIR)$(mandir)/de/man1/$(MAN1_TARGET)
targets="$(AUXBIN_TARGETS)"; for file in $$targets; \
do \
case $$file in \
@@ -250,7 +253,7 @@ install-po:
(cd $$subdir && $(MAKE) install); \
done
-all-scripts:
+all-scripts: funcname.tab
for dir in $(SCRIPTSUBDIRS); \
do \
(cd $$dir && $(MAKE) $(MAKE_ARGS)); \
@@ -280,6 +283,7 @@ uninstall:
-$(RM) -f $(HELP_DIR)/$(HELP_TARGET)
-$(RM) -f $(mandir)/man1/$(MAN1_TARGET)
-$(RM) -f $(mandir)/ja/man1/$(MAN1_TARGET)
+ -$(RM) -f $(mandir)/de/man1/$(MAN1_TARGET)
-for dir in $(SCRIPTSUBDIRS); \
do \
(cd $$dir && $(MAKE) $(MAKE_ARGS) uninstall); \
diff --git a/NEWS b/NEWS
index 66e309d..dac1f5c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,89 @@
+Debian's w3m 0.5.3+git20190105
+
+* bug fixes
+ - do not use deprecated features with OpenSSL 1.1
+ - fix dependency for Imlib2
+ - fix that the mark_all_pages option works
+ - respect the simple_preserve_space option for table cells
+ - fix error handling for ~/.w3m/request.log and localcgi_post()
+* new feature
+ - w3mman supports specifying a section number during a keyword search
+
+Debian's w3m 0.5.3+git20180125
+
+* bug fixes
+ - fix stack overflow with malformed text [CVE-2018-6196]
+ - fix null deref with malformed text [CVE-2018-6197]
+ - fix /tmp file races only when ~/.w3m is unwritable [CVE-2018-6198]
+ - do not remove w3mdict.cgi when "make distclean"
+ - do not turn a form's GET into POST
+ - correct <base ...> parsing
+ - accept TERM=fbterm
+* new feature
+ - extend ssl_forbid_method to disable TLSv1.1
+
+Debian's w3m 0.5.3+git20170102
+
+* bug fixes
+ - fix multiple flaws with malformed text
+ (buffer overflow, use after free, infinite loop)
+ - fix uninitialized variable when not USE_IMAGE
+
+Debian's w3m 0.5.3+git20161120
+
+* bug fixes
+ - fix multiple flaws with malformed text
+ (stack overflow, buffer overflow, null deref, out of memory)
+ [CVE-2016-9622], [CVE-2016-9623], [CVE-2016-9624], [CVE-2016-9625],
+ [CVE-2016-9626], [CVE-2016-9627], [CVE-2016-9628], [CVE-2016-9629],
+ [CVE-2016-9630], [CVE-2016-9631], [CVE-2016-9632], [CVE-2016-9633]
+ - fix stack overflow with nested table and textarea [CVE-2016-9439]
+ - fix suspend (^Z) behavior
+
+Debian's w3m 0.5.3+git20161031
+
+* new features
+ - support OSC 5379 remote imaging and sixel graphics
+ - support SGR style mouse handler
+ - support 32-bit color images
+ - support FreeBSD framebuffer
+ - support button element
+ - support meta charset
+ - include w3mdict.cgi to use a dictd dictionary query
+ - add extbrowser4..9
+ - add display_borders to display 0 pixel table borders
+ - add siteconf feature
+ - add German translation for options setting panel
+ - add translations for de, zh_CN and zh_TW
+* bug fixes
+ - fix multiple flaws with malformed text
+ [CVE-2016-9422], [CVE-2016-9423], [CVE-2016-9424], [CVE-2016-9425],
+ [CVE-2016-9426], [CVE-2016-9428], [CVE-2016-9429], [CVE-2016-9430],
+ [CVE-2016-9431], [CVE-2016-9432], [CVE-2016-9433], [CVE-2016-9434],
+ [CVE-2016-9435], [CVE-2016-9436], [CVE-2016-9437], [CVE-2016-9438],
+ [CVE-2016-9440], [CVE-2016-9441], [CVE-2016-9443], [CVE-2016-9621]
+ - fix potential heap buffer corruption due to Strgrow [CVE-2016-9442]
+ - disable SSLv2 and SSLv3 by default [CVE-2014-3566]
+ - set ssl_verify_server to 1 by default
+ - disable RC4, export ciphers, and keys < 128 bits
+ - use SSL_OP_NO_COMPRESSION due to "CRIME attack" [CVE-2012-4929]
+ - use SSL_MODE_RELEASE_BUFFERS
+ - disable USE_EGD for LibreSSL
+ - appease gcc -Werror=format-security
+ - option -s is now "squeeze multiple blank lines" to work as pager, and
+ -j and -e are obsolete, so use -O{s|j|e} to specify display charset
+ - accept single quoted meta refresh URL
+ - assume "text" if a form input type is unknown
+ - accept cookies by default
+ - set use_dictcommand to 1 by default
+ - set default_url to 1 by default
+ - set argv_is_url to 1 by default
+ - set alt_entity to 0 by default
+ - fix build problems with Boehm GC 7.2, imlib2 1.4.6 and glibc 2.14
+ - fix parallel make failure
+ - fix incorrect ucs_ambwidth_map
+ - and many fixes
+
w3m 0.5.3 - 2011-01-15
* security fix
diff --git a/README b/README
index 8778d80..765c996 100644
--- a/README
+++ b/README
@@ -1,3 +1,9 @@
+w3m: WWW wo Miru Tool
+=====================
+
+w3m is a pager with WWW capability. It IS a pager, but it can be used
+as a text-mode WWW browser.
+
If you can read English, see doc/*.
If you can read Japanese, see doc-jp/*.
If you can read both, read both and correct English. :-)
diff --git a/Str.c b/Str.c
index e5a0982..61fe3ca 100644
--- a/Str.c
+++ b/Str.c
@@ -48,6 +48,8 @@ Str
Strnew_size(int n)
{
Str x = GC_MALLOC(sizeof(struct _Str));
+ if (n < 0)
+ n = 0;
x->ptr = GC_MALLOC_ATOMIC(n + 1);
x->ptr[0] = '\0';
x->area_size = n + 1;
@@ -56,7 +58,7 @@ Strnew_size(int n)
}
Str
-Strnew_charp(char *p)
+Strnew_charp(const char *p)
{
Str x;
int n;
@@ -73,7 +75,7 @@ Strnew_charp(char *p)
}
Str
-Strnew_m_charp(char *p, ...)
+Strnew_m_charp(const char *p, ...)
{
va_list ap;
Str r = Strnew();
@@ -87,7 +89,7 @@ Strnew_m_charp(char *p, ...)
}
Str
-Strnew_charp_n(char *p, int n)
+Strnew_charp_n(const char *p, int n)
{
Str x;
@@ -140,7 +142,7 @@ Strcopy(Str x, Str y)
}
void
-Strcopy_charp(Str x, char *y)
+Strcopy_charp(Str x, const char *y)
{
int len;
@@ -160,7 +162,7 @@ Strcopy_charp(Str x, char *y)
}
void
-Strcopy_charp_n(Str x, char *y, int n)
+Strcopy_charp_n(Str x, const char *y, int n)
{
int len = n;
@@ -180,7 +182,7 @@ Strcopy_charp_n(Str x, char *y, int n)
}
void
-Strcat_charp_n(Str x, char *y, int n)
+Strcat_charp_n(Str x, const char *y, int n)
{
int newlen;
@@ -209,7 +211,7 @@ Strcat(Str x, Str y)
}
void
-Strcat_charp(Str x, char *y)
+Strcat_charp(Str x, const char *y)
{
if (y == NULL)
return;
@@ -232,8 +234,8 @@ Strgrow(Str x)
{
char *old = x->ptr;
int newlen;
- newlen = x->length * 6 / 5;
- if (newlen == x->length)
+ newlen = x->area_size * 6 / 5;
+ if (newlen == x->area_size)
newlen += 2;
x->ptr = GC_MALLOC_ATOMIC(newlen);
x->area_size = newlen;
@@ -278,8 +280,8 @@ void
Strchop(Str s)
{
STR_LENGTH_CHECK(s);
- while ((s->ptr[s->length - 1] == '\n' || s->ptr[s->length - 1] == '\r') &&
- s->length > 0) {
+ while (s->length > 0 &&
+ (s->ptr[s->length - 1] == '\n' || s->ptr[s->length - 1] == '\r')) {
s->length--;
}
s->ptr[s->length] = '\0';
@@ -301,7 +303,7 @@ Strinsert_char(Str s, int pos, char c)
}
void
-Strinsert_charp(Str s, int pos, char *p)
+Strinsert_charp(Str s, int pos, const char *p)
{
STR_LENGTH_CHECK(s);
while (*p)
@@ -530,11 +532,8 @@ Str
Strfgets(FILE * f)
{
Str s = Strnew();
- char c;
- while (1) {
- c = fgetc(f);
- if (feof(f) || ferror(f))
- break;
+ int c;
+ while ((c = fgetc(f)) != EOF) {
Strcat_char(s, c);
if (c == '\n')
break;
@@ -546,11 +545,8 @@ Str
Strfgetall(FILE * f)
{
Str s = Strnew();
- char c;
- while (1) {
- c = fgetc(f);
- if (feof(f) || ferror(f))
- break;
+ int c;
+ while ((c = fgetc(f)) != EOF) {
Strcat_char(s, c);
}
return s;
diff --git a/Str.h b/Str.h
index f345c74..248815d 100644
--- a/Str.h
+++ b/Str.h
@@ -30,22 +30,22 @@ typedef struct _Str {
Str Strnew(void);
Str Strnew_size(int);
-Str Strnew_charp(char *);
-Str Strnew_charp_n(char *, int);
-Str Strnew_m_charp(char *, ...);
+Str Strnew_charp(const char *);
+Str Strnew_charp_n(const char *, int);
+Str Strnew_m_charp(const char *, ...);
Str Strdup(Str);
void Strclear(Str);
void Strfree(Str);
void Strcopy(Str, Str);
-void Strcopy_charp(Str, char *);
-void Strcopy_charp_n(Str, char *, int);
-void Strcat_charp_n(Str, char *, int);
+void Strcopy_charp(Str, const char *);
+void Strcopy_charp_n(Str, const char *, int);
+void Strcat_charp_n(Str, const char *, int);
void Strcat(Str, Str);
-void Strcat_charp(Str, char *);
+void Strcat_charp(Str, const char *);
void Strcat_m_charp(Str, ...);
Str Strsubstr(Str, int, int);
void Strinsert_char(Str, int, char);
-void Strinsert_charp(Str, int, char *);
+void Strinsert_charp(Str, int, const char *);
void Strdelete(Str, int, int);
void Strtruncate(Str, int);
void Strlower(Str);
diff --git a/acinclude.m4 b/acinclude.m4
index e4ccc3d..ed1035d 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -6,7 +6,8 @@ dnl w3m autoconf macros
AC_DEFUN([AC_W3M_VERSION],
[AC_SUBST(CURRENT_VERSION)
cvsver=`$AWK '\$[1] ~ /Id:/ { print \$[3]}' $srcdir/ChangeLog`
- sed -e 's/define CURRENT_VERSION "\(.*\)+cvs/define CURRENT_VERSION "\1+cvs-'$cvsver'/' $srcdir/version.c.in > version.c
+ ymdver=`sed -e 's/ .*//;s/-//g;q' $srcdir/ChangeLog`
+ sed -e 's/define CURRENT_VERSION "\(.*\)YYYYMMDD/define CURRENT_VERSION "\1'$ymdver'/;s/define CURRENT_VERSION "\(.*\)+cvs/define CURRENT_VERSION "\1+cvs-'$cvsver'/' $srcdir/version.c.in > version.c
CURRENT_VERSION=`sed -n 's/.*define CURRENT_VERSION *"w3m\/\(.*\)".*$/\1/p' version.c`])
#
# ----------------------------------------------------------------
@@ -330,10 +331,10 @@ AC_DEFINE_UNQUOTED(DEF_MAILER, "$w3m_mailer")])
# ----------------------------------------------------------------
AC_DEFUN([AC_W3M_EXT_BROWSER],
[AC_SUBST(DEF_EXT_BROWSER)
-w3m_browser="/usr/bin/mozilla"
+w3m_browser="/usr/bin/firefox"
AC_MSG_CHECKING(which external browser is used by default)
AC_ARG_WITH(browser,
- [ --with-browser=BROWSER default browser (/usr/bin/mozilla)],
+ [ --with-browser=BROWSER default browser (/usr/bin/firefox)],
[w3m_browser="$with_browser"])
AC_MSG_RESULT($w3m_browser)
AC_DEFINE_UNQUOTED(DEF_EXT_BROWSER, "$w3m_browser")])
@@ -400,10 +401,10 @@ AC_DEFUN([AC_W3M_TERMLIB],
AC_ARG_WITH(termlib,
[ --with-termlib[=LIBS] terminal library
LIBS is space separated list of:
- terminfo mytinfo termcap ncurses curses],,
+ terminfo mytinfo termcap tinfo ncurses curses],,
[with_termlib="yes"])
AC_MSG_RESULT($with_termlib)
- test x"$with_termlib" = xyes && with_termlib="terminfo mytinfo termlib termcap ncurses curses"
+ test x"$with_termlib" = xyes && with_termlib="terminfo mytinfo termlib termcap tinfo ncurses curses"
for lib in $with_termlib; do
AC_CHECK_LIB($lib, tgetent, [W3M_LIBS="$W3M_LIBS -l$lib"; break])
done
@@ -600,7 +601,7 @@ AC_DEFUN([AC_W3M_IMAGE],
if test x"$enable_image" = xyes; then
enable_image=x11
case "`uname -s`" in
- Linux|linux|LINUX)
+ Linux|linux|LINUX|FreeBSD|freebsd|FREEBSD)
if test -c /dev/fb0; then
enable_image=x11,fb
fi;;
@@ -649,6 +650,9 @@ AC_DEFUN([AC_W3M_IMAGE],
fi;;
imlib2)
with_imlib2="yes"
+ if test x"$PKG_CONFIG" = x; then
+ PKG_CONFIG=pkg-config
+ fi
if test x"$IMLIB2_CONFIG" = x; then
IMLIB2_CONFIG=imlib2-config
fi;;
@@ -661,8 +665,6 @@ AC_DEFUN([AC_W3M_IMAGE],
with_gtk2="yes"
if test x"$PKG_CONFIG" = x; then
PKG_CONFIG=pkg-config
- else
- PKG_CONFIG=:
fi;;
esac
done
@@ -705,8 +707,8 @@ AC_DEFUN([AC_W3M_IMAGE],
IMGTARGETS="x11"
AC_DEFINE(USE_GDKPIXBUF)
AC_DEFINE(USE_GTK2)
- IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
- IMGX11LDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
+ IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0`"
+ IMGX11LDFLAGS="-lX11 `${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0`"
elif test x"$have_gdkpixbuf" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
@@ -728,7 +730,7 @@ AC_DEFUN([AC_W3M_IMAGE],
IMGTARGETS="x11"
AC_DEFINE(USE_IMLIB2)
IMGX11CFLAGS="`${IMLIB2_CONFIG} --cflags`"
- IMGX11LDFLAGS="`${IMLIB2_CONFIG} --libs`"
+ IMGX11LDFLAGS="-lX11 `${PKG_CONFIG} --libs imlib2`"
else
AC_MSG_WARN([unable to build w3mimgdisplay with X11 support])
fi
@@ -740,8 +742,8 @@ AC_DEFUN([AC_W3M_IMAGE],
IMGTARGETS="${IMGTARGETS} fb"
AC_DEFINE(USE_GDKPIXBUF)
AC_DEFINE(USE_GTK2)
- IMGFBCFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gtk+-2.0`"
- IMGFBLDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gtk+-2.0`"
+ IMGFBCFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0`"
+ IMGFBLDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0`"
elif test x"$have_gdkpixbuf" = xyes; then
AC_DEFINE(USE_W3MIMG_FB)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
@@ -756,7 +758,7 @@ AC_DEFUN([AC_W3M_IMAGE],
AC_DEFINE(USE_IMLIB2)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGFBCFLAGS="`${IMLIB2_CONFIG} --cflags`"
- IMGFBLDFLAGS="`${IMLIB2_CONFIG} --libs`"
+ IMGFBLDFLAGS="`${PKG_CONFIG} --libs imlib2`"
else
AC_MSG_WARN([unable to build w3mimgdisplay with FB support])
fi
@@ -866,7 +868,7 @@ AC_MSG_CHECKING(for sys_errlist)
AC_TRY_COMPILE(
changequote(<<,>>)dnl
<<extern char *sys_errlist[];>>,
-<<printf(sys_errlist[0]);>>,
+<<printf("%s", sys_errlist[0]);>>,
changequote([,])dnl
[have_sys_errlist="yes"; AC_DEFINE(HAVE_SYS_ERRLIST)],
[have_sys_errlist="no"])
diff --git a/alloc.h b/alloc.h
new file mode 100644
index 0000000..fa0d391
--- /dev/null
+++ b/alloc.h
@@ -0,0 +1,39 @@
+/*
+ * by Scarlett. public domain.
+ * replacements for w3m's allocation macros which add overflow
+ * detection and concentrate the macros in one file
+ */
+#ifndef W3_ALLOC_H
+#define W3_ALLOC_H
+#include <gc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <limits.h>
+
+static inline size_t
+z_mult_no_oflow_(size_t n, size_t size)
+{
+ if (size != 0 && n > ULONG_MAX / size) {
+ fprintf(stderr,
+ "w3m: overflow in malloc, %lu*%lu\n", (unsigned long)n, (unsigned long)size);
+ exit(1);
+ }
+ return n * size;
+}
+
+#define New(type) \
+ (GC_MALLOC(sizeof(type)))
+
+#define NewAtom(type) \
+ (GC_MALLOC_ATOMIC(sizeof(type)))
+
+#define New_N(type, n) \
+ (GC_MALLOC(z_mult_no_oflow_((n), sizeof(type))))
+
+#define NewAtom_N(type, n) \
+ (GC_MALLOC_ATOMIC(z_mult_no_oflow_((n), sizeof(type))))
+
+#define New_Reuse(type, ptr, n) \
+ (GC_REALLOC((ptr), z_mult_no_oflow_((n), sizeof(type))))
+
+#endif /* W3_ALLOC_H */
diff --git a/anchor.c b/anchor.c
index 27bbd56..b6d121c 100644
--- a/anchor.c
+++ b/anchor.c
@@ -11,7 +11,7 @@ putAnchor(AnchorList *al, char *url, char *target, Anchor **anchor_return,
{
int n, i, j;
Anchor *a;
- BufferPoint bp;
+ BufferPoint bp = { 0 };
if (al == NULL) {
al = New(AnchorList);
al->anchors = NULL;
@@ -200,10 +200,11 @@ _put_anchor_news(Buffer *buf, char *p1, char *p2, int line, int pos)
if (*(p2 - 1) == '>')
p2--;
}
- tmp = wc_Str_conv_strict(Strnew_charp_n(p1, p2 - p1), InnerCharset,
- buf->document_charset);
- tmp = Sprintf("news:%s", file_quote(tmp->ptr));
- return registerHref(buf, tmp->ptr, NULL, NO_REFERER, NULL, '\0', line,
+ tmp = Strnew_charp("news:");
+ Strcat_charp_n(tmp, p1, p2 - p1);
+ return registerHref(buf, url_encode(tmp->ptr, baseURL(buf),
+ buf->document_charset),
+ NULL, NO_REFERER, NULL, '\0', line,
pos);
}
#endif /* USE_NNTP */
@@ -213,9 +214,10 @@ _put_anchor_all(Buffer *buf, char *p1, char *p2, int line, int pos)
{
Str tmp;
- tmp = wc_Str_conv_strict(Strnew_charp_n(p1, p2 - p1), InnerCharset,
- buf->document_charset);
- return registerHref(buf, url_quote(tmp->ptr), NULL, NO_REFERER, NULL,
+ tmp = Strnew_charp_n(p1, p2 - p1);
+ return registerHref(buf, url_encode(tmp->ptr, baseURL(buf),
+ buf->document_charset),
+ NULL, NO_REFERER, NULL,
'\0', line, pos);
}
@@ -549,7 +551,8 @@ shiftAnchorPosition(AnchorList *al, HmarkerList *hl, int line, int pos,
break;
if (a->start.pos > pos) {
a->start.pos += shift;
- if (hl->marks[a->hseq].line == line)
+ if (hl && hl->marks &&
+ a->hseq >= 0 && hl->marks[a->hseq].line == line)
hl->marks[a->hseq].pos = a->start.pos;
}
if (a->end.pos >= pos)
@@ -641,7 +644,6 @@ addMultirowsForm(Buffer *buf, AnchorList *al)
{
int i, j, k, col, ecol, pos;
Anchor a_form, *a;
- FormItemList *fi;
Line *l, *ls;
if (al == NULL || al->nanchor == 0)
@@ -668,7 +670,6 @@ addMultirowsForm(Buffer *buf, AnchorList *al)
if (!ls)
continue;
}
- fi = (FormItemList *)a_form.url;
col = COLPOS(ls, a_form.start.pos);
ecol = COLPOS(ls, a_form.end.pos);
for (j = 0; l && j < a_form.rows; l = l->next, j++) {
@@ -685,6 +686,8 @@ addMultirowsForm(Buffer *buf, AnchorList *al)
a->hseq = a_form.hseq;
a->y = a_form.y;
a->end.pos = pos + ecol - col;
+ if (pos < 1 || a->end.pos >= l->size)
+ continue;
l->lineBuf[pos - 1] = '[';
l->lineBuf[a->end.pos] = ']';
for (k = pos; k < a->end.pos; k++)
@@ -756,7 +759,7 @@ link_list_panel(Buffer *buf)
p = parsedURL2Str(&pu)->ptr;
u = html_quote(p);
if (DecodeURL)
- p = html_quote(url_unquote_conv(p, buf->document_charset));
+ p = html_quote(url_decode2(p, buf));
else
p = u;
}
@@ -787,7 +790,7 @@ link_list_panel(Buffer *buf)
p = parsedURL2Str(&pu)->ptr;
u = html_quote(p);
if (DecodeURL)
- p = html_quote(url_unquote_conv(p, buf->document_charset));
+ p = html_quote(url_decode2(p, buf));
else
p = u;
t = getAnchorText(buf, al, a);
@@ -809,16 +812,13 @@ link_list_panel(Buffer *buf)
p = parsedURL2Str(&pu)->ptr;
u = html_quote(p);
if (DecodeURL)
- p = html_quote(url_unquote_conv(p, buf->document_charset));
+ p = html_quote(url_decode2(p, buf));
else
p = u;
if (a->title && *a->title)
t = html_quote(a->title);
- else if (DecodeURL)
- t = html_quote(url_unquote_conv
- (a->url, buf->document_charset));
else
- t = html_quote(a->url);
+ t = html_quote(url_decode2(a->url, buf));
Strcat_m_charp(tmp, "<li><a href=\"", u, "\">", t, "</a><br>", p,
"\n", NULL);
a = retrieveAnchor(buf->formitem, a->start.line, a->start.pos);
@@ -842,19 +842,13 @@ link_list_panel(Buffer *buf)
p = parsedURL2Str(&pu)->ptr;
u = html_quote(p);
if (DecodeURL)
- p = html_quote(url_unquote_conv(p,
- buf->
- document_charset));
+ p = html_quote(url_decode2(p, buf));
else
p = u;
if (m->alt && *m->alt)
t = html_quote(m->alt);
- else if (DecodeURL)
- t = html_quote(url_unquote_conv(m->url,
- buf->
- document_charset));
else
- t = html_quote(m->url);
+ t = html_quote(url_decode2(m->url, buf));
Strcat_m_charp(tmp, "<li><a href=\"", u, "\">", t,
"</a><br>", p, "\n", NULL);
}
diff --git a/buffer.c b/buffer.c
index 5afc26a..e70cffe 100644
--- a/buffer.c
+++ b/buffer.c
@@ -47,6 +47,8 @@ newBuffer(int width)
#ifdef USE_M17N
n->auto_detect = WcOption.auto_detect;
#endif
+ n->check_url = MarkAllPages; /* use default from -o mark_all_pages */
+ n->need_reshape = 1; /* always reshape new buffers to mark URLs */
return n;
}
@@ -705,6 +707,7 @@ readBufferCache(Buffer *buf)
cache = fopen(buf->savecache, "r");
if (cache == NULL || fread1(clnum, cache) || fread1(tlnum, cache)) {
+ fclose(cache);
buf->savecache = NULL;
return -1;
}
@@ -760,8 +763,10 @@ readBufferCache(Buffer *buf)
}
#endif
}
- buf->lastLine = prevl;
- buf->lastLine->next = NULL;
+ if (prevl) {
+ buf->lastLine = prevl;
+ buf->lastLine->next = NULL;
+ }
fclose(cache);
unlink(buf->savecache);
buf->savecache = NULL;
diff --git a/config.guess b/config.guess
index 51fab47..f50dcdb 100755
--- a/config.guess
+++ b/config.guess
@@ -1,13 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2004-03-12'
+timestamp='2018-02-24'
# This file 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 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -16,24 +15,22 @@ timestamp='2004-03-12'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# Please send patches to <config-patches@gnu.org>.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -42,7 +39,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -53,8 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -66,11 +62,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -104,16 +100,16 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
+ ,,) echo "int x;" > "$dummy.c" ;
for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
@@ -123,7 +119,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -136,12 +132,40 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "$UNAME_SYSTEM" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval "$set_cc_for_build"
+ cat <<-EOF > "$dummy.c"
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -151,22 +175,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
+ echo unknown)`
+ case "$UNAME_MACHINE_ARCH" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
+ ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
+ # to ELF recently (or will in the future) and ABI.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ os=netbsdelf
+ ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
+ | grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -176,7 +211,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
- os=netbsd
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
;;
esac
# The OS release
@@ -184,83 +226,62 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
+ case "$UNAME_VERSION" in
Debian*)
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit 0 ;;
- amd64:OpenBSD:*:*)
- echo x86_64-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- cats:OpenBSD:*:*)
- echo arm-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pegasos:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ echo "$machine-${os}${release}${abi}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
+ exit ;;
*:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
+ exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
+ exit ;;
*:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
+ exit ;;
+ *:SolidBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
+ exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
- exit 0 ;;
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
*:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:Sortix:*:*)
+ echo "$UNAME_MACHINE"-unknown-sortix
+ exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
+ exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,76 +291,73 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
+ UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
+ UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
+ UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
+ UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
+ UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
+ UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
+ UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
+ UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
+ UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
- Alpha*:OpenVMS:*:*)
- echo alpha-hp-vms
- exit 0 ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit 0 ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit 0 ;;
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
- exit 0;;
+ exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-amigaos
+ exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-morphos
+ exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
- exit 0 ;;
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
*:OS400:*:*)
- echo powerpc-ibm-os400
- exit 0 ;;
+ echo powerpc-ibm-os400
+ exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit 0;;
+ echo arm-acorn-riscix"$UNAME_RELEASE"
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
- exit 0;;
+ exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -347,32 +365,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
else
echo pyramid-pyramid-bsd
fi
- exit 0 ;;
+ exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
- exit 0 ;;
+ exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
- exit 0 ;;
- DRS?6000:UNIX_SV:4.2*:7*)
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7 && exit 0 ;;
+ sparc) echo sparc-icl-nx7; exit ;;
esac ;;
+ s390x:SunOS:*:*)
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ exit ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- i86pc:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux"$UNAME_RELEASE"
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval "$set_cc_for_build"
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
@@ -380,26 +417,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit 0 ;;
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
+ exit ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-sun-sunos"$UNAME_RELEASE"
+ exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
;;
sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
+ echo sparc-sun-sunos"$UNAME_RELEASE"
;;
esac
- exit 0 ;;
+ exit ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
+ exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -409,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-milan-mint"$UNAME_RELEASE"
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-hades-mint"$UNAME_RELEASE"
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-unknown-mint"$UNAME_RELEASE"
+ exit ;;
m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-apple-machten"$UNAME_RELEASE"
+ exit ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ echo powerpc-apple-machten"$UNAME_RELEASE"
+ exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
- exit 0 ;;
+ exit ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ echo mips-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ echo vax-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit 0 ;;
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
+ exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -455,94 +492,95 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c \
- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && exit 0
- echo mips-mips-riscos${UNAME_RELEASE}
- exit 0 ;;
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos"$UNAME_RELEASE"
+ exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
- exit 0 ;;
+ exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
- exit 0 ;;
+ exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
- exit 0 ;;
+ exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
- exit 0 ;;
+ exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
then
- echo m88k-dg-dgux${UNAME_RELEASE}
+ echo m88k-dg-dgux"$UNAME_RELEASE"
else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ echo i586-dg-dgux"$UNAME_RELEASE"
fi
- exit 0 ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
- exit 0 ;;
+ exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
- exit 0 ;;
+ exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
- exit 0 ;;
+ exit ;;
*:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit 0 ;;
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
+ exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
- exit 0 ;;
+ exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
+ exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
main()
@@ -553,128 +591,143 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
- echo rs6000-ibm-aix3.2.5
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
- exit 0 ;;
- *:AIX:*:[45])
+ exit ;;
+ *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
+ exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
- exit 0 ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
- exit 0 ;;
+ exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
- exit 0 ;;
+ exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
- exit 0 ;;
+ exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
- exit 0 ;;
+ exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
- exit 0 ;;
+ exit ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "$sc_cpu_version" in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "$sc_kernel_bits" in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ if [ "$HP_ARCH" = "" ]; then
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
+ if [ "$HP_ARCH" = hppa2.0w ]
then
- # avoid double evaluation of $set_cc_for_build
- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ eval "$set_cc_for_build"
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
then
- HP_ARCH="hppa2.0w"
+ HP_ARCH=hppa2.0w
else
- HP_ARCH="hppa64"
+ HP_ARCH=hppa64
fi
fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
+ exit ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit 0 ;;
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
+ exit ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
main ()
@@ -699,360 +752,364 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
- exit 0 ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
- exit 0 ;;
+ exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
- exit 0 ;;
+ exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
- exit 0 ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
- exit 0 ;;
+ exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
- exit 0 ;;
+ exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
+ echo "$UNAME_MACHINE"-unknown-osf1mk
else
- echo ${UNAME_MACHINE}-unknown-osf1
+ echo "$UNAME_MACHINE"-unknown-osf1
fi
- exit 0 ;;
+ exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
- exit 0 ;;
+ exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
*:UNICOS/mp:*:*)
- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
+ exit ;;
sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
*:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
*:FreeBSD:*:*)
- # Determine whether the default compiler uses glibc.
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #if __GLIBC__ >= 2
- LIBC=gnu
- #else
- LIBC=
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
- # FreeBSD's kernel, but not the complete OS.
- case ${LIBC} in gnu) kernel_only='k' ;; esac
- echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
- exit 0 ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case "$UNAME_PROCESSOR" in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+ exit ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit 0 ;;
- i*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit 0 ;;
+ echo "$UNAME_MACHINE"-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo "$UNAME_MACHINE"-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo "$UNAME_MACHINE"-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo "$UNAME_MACHINE"-pc-msys
+ exit ;;
i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit 0 ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit 0 ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit 0 ;;
+ echo "$UNAME_MACHINE"-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case "$UNAME_MACHINE" in
+ x86)
+ echo i586-pc-interix"$UNAME_RELEASE"
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ esac ;;
i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit 0 ;;
+ echo "$UNAME_MACHINE"-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
+ exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit 0 ;;
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
+ exit ;;
i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
+ echo "$UNAME_MACHINE"-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ eval "$set_cc_for_build"
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+ else
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit 0 ;;
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ crisv32:Linux:*:*)
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ e2k:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ frv:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ hexagon:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ i*86:Linux:*:*)
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ k1om:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
- #undef mips
- #undef mipsel
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
+ CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
+ CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+ test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
- ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit 0 ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit 0 ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
+ mips64el:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-"$LIBC"
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-"$LIBC"
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-"$LIBC"
+ exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
esac
- exit 0 ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-"$LIBC"
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-"$LIBC"
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-"$LIBC"
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-"$LIBC"
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
+ exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ tile*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ vax:Linux:*:*)
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
+ exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit 0 ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit 0 ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #ifdef __INTEL_COMPILER
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
- ;;
+ if objdump -f /bin/sh | grep -q elf32-x86-64; then
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
+ else
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ fi
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
- exit 0 ;;
+ exit ;;
i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit 0 ;;
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
+ exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
+ echo "$UNAME_MACHINE"-pc-os2-emx
+ exit ;;
i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-stop
+ exit ;;
i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo "$UNAME_MACHINE"-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
fi
- exit 0 ;;
- i*86:*:5:[78]*)
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit 0 ;;
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
+ exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1062,369 +1119,333 @@ EOF
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv32
+ echo "$UNAME_MACHINE"-pc-sysv32
fi
- exit 0 ;;
+ exit ;;
pc:*:*:*)
# Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
- exit 0 ;;
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
- exit 0 ;;
+ exit ;;
paragon:*:*:*)
echo i860-intel-osf1
- exit 0 ;;
+ exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
fi
- exit 0 ;;
+ exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
- exit 0 ;;
+ exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
- exit 0 ;;
+ exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
- exit 0 ;;
- M68*:*:R3V[567]*:*)
- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
- exit 0 ;;
+ exit ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
+ echo mips-dde-sysv"$UNAME_RELEASE"
+ exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
+ echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
fi
- exit 0 ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit 0 ;;
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
- exit 0 ;;
+ exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
- exit 0 ;;
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo "$UNAME_MACHINE"-stratus-vos
+ exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
- exit 0 ;;
+ exit ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-apple-aux"$UNAME_RELEASE"
+ exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
- exit 0 ;;
+ exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv"$UNAME_RELEASE"
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv"$UNAME_RELEASE"
fi
- exit 0 ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
- exit 0 ;;
+ exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
- exit 0 ;;
+ exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
- exit 0 ;;
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ echo sx4-nec-superux"$UNAME_RELEASE"
+ exit ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ echo sx5-nec-superux"$UNAME_RELEASE"
+ exit ;;
SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ echo sx6-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux"$UNAME_RELEASE"
+ exit ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
*:Darwin:*:*)
- case `uname -p` in
- *86) UNAME_PROCESSOR=i686 ;;
- powerpc) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval "$set_cc_for_build"
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
+ exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit 0 ;;
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
+ exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
- exit 0 ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
- exit 0 ;;
+ exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
- exit 0 ;;
+ exit ;;
DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
+ exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-plan9
+ exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
- exit 0 ;;
+ exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
- exit 0 ;;
+ exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
- exit 0 ;;
+ exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
- exit 0 ;;
+ exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
- exit 0 ;;
+ exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
- exit 0 ;;
+ exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit 0 ;;
+ echo mips-sei-seiux"$UNAME_RELEASE"
+ exit ;;
*:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit 0 ;;
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "$UNAME_MACHINE" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
+ exit ;;
+ i*86:rdos:*:*)
+ echo "$UNAME_MACHINE"-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo "$UNAME_MACHINE"-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo "$UNAME_MACHINE"-unknown-esx
+ exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+echo "$0: unable to guess system type" >&2
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit 0 ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit 0 ;;
- c34*)
- echo c34-convex-bsd
- exit 0 ;;
- c38*)
- echo c38-convex-bsd
- exit 0 ;;
- c4*)
- echo c4-convex-bsd
- exit 0 ;;
- esac
-fi
+ ;;
+esac
cat >&2 <<EOF
-$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
- ftp://ftp.gnu.org/pub/gnu/config/
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+and
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
@@ -1443,16 +1464,16 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
EOF
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/config.h.dist b/config.h.dist
index 844a555..4d9c119 100644
--- a/config.h.dist
+++ b/config.h.dist
@@ -9,10 +9,10 @@
/* User Configuration */
/*
- If you define DICT, you can use dictionary look-up function
+ If you define USE_DICT, you can use dictionary look-up function
in w3m. See README.dict for detail.
*/
-#define DICT
+#define USE_DICT
/*
If you want to load and save URL history.
@@ -210,6 +210,7 @@ typedef long clen_t;
#define HAVE_SRANDOM
#undef HAVE_GETPASSPHRASE
#define HAVE_CHDIR
+#define HAVE_MKDTEMP
#define SETJMP(env) sigsetjmp(env,1)
diff --git a/config.h.in b/config.h.in
index 2f41eed..6ab3008 100644
--- a/config.h.in
+++ b/config.h.in
@@ -25,6 +25,7 @@
#define PASSWD_FILE RC_DIR "/passwd"
#define PRE_FORM_FILE RC_DIR "/pre_form"
+#define SITECONF_FILE RC_DIR "/siteconf"
#define USER_MAILCAP RC_DIR "/mailcap"
#define SYS_MAILCAP CONF_DIR "/mailcap"
#define USER_MIMETYPES "~/.mime.types"
@@ -84,7 +85,7 @@
#undef INET6
#undef HAVE_SOCKLEN_T
#undef HAVE_OLD_SS_FAMILY
-#define USE_EGD
+#undef USE_EGD
#define ENABLE_REMOVE_TRAILINGSPACES
#undef MENU_THIN_FRAME
#undef USE_RAW_SCROLL
@@ -142,6 +143,7 @@ typedef long clen_t;
#undef HAVE_SRANDOM
#undef HAVE_GETPASSPHRASE
#undef HAVE_CHDIR
+#undef HAVE_MKDTEMP
#undef HAVE_SETPGRP
#undef HAVE_SETLOCALE
#undef HAVE_LANGINFO_CODESET
@@ -209,6 +211,10 @@ typedef RETSIGTYPE MySignalHandler;
#define SUPPORT_WIN9X_CONSOLE_MBCS 1
#endif
+#if defined(__CYGWIN__) && defined(__x86_64__)
+#define DONT_CALL_GC_AFTER_FORK
+#endif
+
#if defined(__DJGPP__)
#define DEFAULT_TERM "dosansi"
#else
diff --git a/config.sub b/config.sub
index ba33103..1d8e98b 100755
--- a/config.sub
+++ b/config.sub
@@ -1,42 +1,40 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2004-03-12'
+timestamp='2018-02-22'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file 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 2 of the License, or
+# This file 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 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@@ -55,12 +53,11 @@ timestamp='2004-03-12'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -70,8 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -83,11 +79,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -98,8 +94,8 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
- echo $1
- exit 0;;
+ echo "$1"
+ exit ;;
* )
break ;;
@@ -116,17 +112,24 @@ esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
+ basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
+ if [ "$basic_machine" != "$1" ]
+ then os=`echo "$1" | sed 's/.*-/-/'`
else os=; fi
;;
esac
@@ -145,10 +148,13 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
+ -bluegene*)
+ os=-cnk
+ ;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -163,54 +169,65 @@ case $os in
os=-chorusos
basic_machine=$1
;;
- -chorusrdb)
- os=-chorusrdb
+ -chorusrdb)
+ os=-chorusrdb
basic_machine=$1
- ;;
+ ;;
-hiux*)
os=-hiuxwe2
;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco5)
os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
-ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
;;
-psos*)
os=-psos
@@ -227,56 +244,114 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | c4x | clipper \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | ba \
+ | be32 | be64 \
+ | bfin \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | mcore \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
- | mips64vr | mips64vrel \
+ | mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | moxie \
+ | mt \
| msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | openrisc | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | open8 | or1k | or1knd | or32 \
+ | pdp10 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
| pyramid \
- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | riscv32 | riscv64 \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xscale | xstormy16 | xtensa \
- | z8k)
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
+ | wasm32 \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
@@ -287,70 +362,102 @@ case $basic_machine in
;;
# Object if more than one company name word.
*-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
- | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | cydra-* \
+ | avr-* | avr32-* \
+ | ba-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | e2k-* | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | k1om-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | mcore-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
+ | mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
| msp430-* \
- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
| pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | riscv32-* | riscv64-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+ | tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
| tron-* \
- | v850-* | v850e-* | vax-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | visium-* \
+ | wasm32-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
- | xtensa-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
| ymp-* \
- | z8k-*)
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
- basic_machine=i386-unknown
+ basic_machine=i386-pc
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
@@ -363,7 +470,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
- abacus)
+ abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@@ -384,7 +491,7 @@ case $basic_machine in
basic_machine=x86_64-pc
;;
amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
@@ -409,6 +516,13 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -417,10 +531,35 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -445,13 +584,20 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
- cr16c)
- basic_machine=cr16c-unknown
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
@@ -481,14 +627,30 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
- dpx2* | dpx2*-bull)
+ dpx2*)
basic_machine=m68k-bull
os=-sysv3
;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@@ -578,9 +740,6 @@ case $basic_machine in
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
- hppa-next)
- os=-nextstep3
- ;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
@@ -592,28 +751,27 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
- i386-vsta | vsta)
+ vsta)
basic_machine=i386-unknown
os=-vsta
;;
@@ -631,8 +789,16 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
- m88k-omron*)
- basic_machine=m88k-omron
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=-linux
;;
magnum | m3230)
basic_machine=mips-mips
@@ -642,10 +808,21 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -654,14 +831,10 @@ case $basic_machine in
os=-mint
;;
mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
;;
mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- mmix*)
- basic_machine=mmix-knuth
- os=-mmixware
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
@@ -671,14 +844,29 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@@ -707,7 +895,7 @@ case $basic_machine in
basic_machine=v70-nec
os=-sysv
;;
- next | m*-next )
+ next | m*-next)
basic_machine=m68k-next
case $os in
-nextstep* )
@@ -743,20 +931,27 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
- nv1)
- basic_machine=nv1-cray
- os=-unicosmp
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
+ nsv-tandem)
+ basic_machine=nsv-tandem
+ ;;
+ nsx-tandem)
+ basic_machine=nsx-tandem
+ ;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
- or32 | or32-*)
+ openrisc | openrisc-*)
basic_machine=or32-unknown
- os=-coff
;;
os400)
basic_machine=powerpc-ibm
@@ -778,6 +973,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
pbd)
basic_machine=sparc-tti
;;
@@ -787,6 +990,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -800,41 +1009,42 @@ case $basic_machine in
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
- ppc) basic_machine=powerpc-unknown
+ ppc | ppcbe) basic_machine=powerpc-unknown
;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
@@ -843,6 +1053,14 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -869,6 +1087,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -876,14 +1098,10 @@ case $basic_machine in
sequent)
basic_machine=i386-sequent
;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh64)
- basic_machine=sh64-unknown
+ sh5el)
+ basic_machine=sh5le-unknown
;;
- sparclite-wrs | simso-wrs)
+ simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -901,6 +1119,9 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ ;;
sun2)
basic_machine=m68000-sun
;;
@@ -957,17 +1178,9 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
@@ -1029,17 +1242,23 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
+ x64)
+ basic_machine=x86_64-pc
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
+ ;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
none)
basic_machine=none-none
os=-none
@@ -1059,31 +1278,24 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
- basic_machine=sparc-sun
- ;;
cydra)
basic_machine=cydra-cydrome
;;
@@ -1103,7 +1315,7 @@ case $basic_machine in
# Make sure to match an already-canonicalized machine name.
;;
*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
esac
@@ -1111,10 +1323,10 @@ esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
;;
*-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
;;
*)
;;
@@ -1125,49 +1337,60 @@ esac
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # First match some system type aliases that might get confused
+ # with valid system types.
# -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
- -svr4*)
- os=-sysv4
- ;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
- # First accept the basic system types.
+ # es1800 is here to avoid being matched by es* (a different OS)
+ -es1800*)
+ os=-ose
+ ;;
+ # Now accept the basic system types.
# The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
+ # Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+ | -morphos* | -superux* | -rtmk* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
+ | -midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1184,12 +1407,12 @@ case $os in
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ -sim | -xray | -os68k* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
+ os=`echo "$os" | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
@@ -1198,26 +1421,20 @@ case $os in
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
- -os400*)
+ -os400*)
os=-os400
;;
-wince*)
os=-wince
;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
-utek*)
os=-bsd
;;
@@ -1242,7 +1459,7 @@ case $os in
-nova*)
os=-rtmk-nova
;;
- -ns2 )
+ -ns2)
os=-nextstep2
;;
-nsk*)
@@ -1255,7 +1472,7 @@ case $os in
-sinix*)
os=-sysv4
;;
- -tpf*)
+ -tpf*)
os=-tpf
;;
-triton*)
@@ -1264,7 +1481,7 @@ case $os in
-oss*)
os=-sysv3
;;
- -svr4)
+ -svr4*)
os=-sysv4
;;
-svr3)
@@ -1279,27 +1496,38 @@ case $os in
-ose*)
os=-ose
;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
- -aros*)
- os=-aros
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
;;
- -kaos*)
- os=-kaos
+ -pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $basic_machine in
+ arm*)
+ os=-eabi
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
+ -nacl*)
+ ;;
+ -ios)
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
esac
@@ -1316,6 +1544,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1325,9 +1559,24 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1346,13 +1595,13 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
@@ -1368,12 +1617,18 @@ case $basic_machine in
sparc-* | *-sun)
os=-sunos4.1.1
;;
+ pru-*)
+ os=-elf
+ ;;
*-be)
os=-beos
;;
*-ibm)
os=-aix
;;
+ *-knuth)
+ os=-mmixware
+ ;;
*-wec)
os=-proelf
;;
@@ -1407,7 +1662,7 @@ case $basic_machine in
m88k-omron*)
os=-luna
;;
- *-next )
+ *-next)
os=-nextstep
;;
*-sequent)
@@ -1422,9 +1677,6 @@ case $basic_machine in
i370-*)
os=-mvs
;;
- *-next)
- os=-nextstep3
- ;;
*-gould)
os=-sysv
;;
@@ -1476,7 +1728,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
- -aix*)
+ -cnk*|-aix*)
vendor=ibm
;;
-beos*)
@@ -1534,15 +1786,15 @@ case $basic_machine in
vendor=stratus
;;
esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
;;
esac
-echo $basic_machine$os
-exit 0
+echo "$basic_machine$os"
+exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/configure b/configure
index 4c1bc06..8699b43 100755
--- a/configure
+++ b/configure
@@ -1486,11 +1486,11 @@ Optional Packages:
--with-migemo=MIGEMO_COMMAND migemo command
--with-editor=EDITOR default editor (/usr/bin/vi)
--with-mailer=MAILER default mailer (/usr/bin/mail)
- --with-browser=BROWSER default browser (/usr/bin/mozilla)
+ --with-browser=BROWSER default browser (/usr/bin/firefox)
--with-ssl=PREFIX support https protocol
--with-termlib=LIBS terminal library
LIBS is space separated list of:
- terminfo mytinfo termcap ncurses curses
+ terminfo mytinfo termcap tinfo ncurses curses
--with-gc=PREFIX libgc PREFIX
Some influential environment variables:
@@ -6755,7 +6755,7 @@ $as_echo "$enable_image" >&6; }
if test x"$enable_image" = xyes; then
enable_image=x11
case "`uname -s`" in
- Linux|linux|LINUX)
+ Linux|linux|LINUX|FreeBSD|freebsd|FREEBSD)
if test -c /dev/fb0; then
enable_image=x11,fb
fi;;
@@ -6811,6 +6811,9 @@ $as_echo "$with_imagelib" >&6; }
fi;;
imlib2)
with_imlib2="yes"
+ if test x"$PKG_CONFIG" = x; then
+ PKG_CONFIG=pkg-config
+ fi
if test x"$IMLIB2_CONFIG" = x; then
IMLIB2_CONFIG=imlib2-config
fi;;
@@ -6823,8 +6826,6 @@ $as_echo "$with_imagelib" >&6; }
with_gtk2="yes"
if test x"$PKG_CONFIG" = x; then
PKG_CONFIG=pkg-config
- else
- PKG_CONFIG=:
fi;;
esac
done
@@ -6926,8 +6927,8 @@ $as_echo "$as_me: WARNING: Imlib2 is not installed. Install Imlib2 (version >=
$as_echo "#define USE_GTK2 1" >>confdefs.h
- IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
- IMGX11LDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
+ IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0`"
+ IMGX11LDFLAGS="-lX11 `${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0`"
elif test x"$have_gdkpixbuf" = xyes; then
$as_echo "#define USE_W3MIMG_X11 1" >>confdefs.h
@@ -6955,7 +6956,7 @@ $as_echo "$as_me: WARNING: Imlib2 is not installed. Install Imlib2 (version >=
$as_echo "#define USE_IMLIB2 1" >>confdefs.h
IMGX11CFLAGS="`${IMLIB2_CONFIG} --cflags`"
- IMGX11LDFLAGS="`${IMLIB2_CONFIG} --libs`"
+ IMGX11LDFLAGS="-lX11 `${PKG_CONFIG} --libs imlib2`"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to build w3mimgdisplay with X11 support" >&5
$as_echo "$as_me: WARNING: unable to build w3mimgdisplay with X11 support" >&2;}
@@ -6971,8 +6972,8 @@ $as_echo "$as_me: WARNING: unable to build w3mimgdisplay with X11 support" >&2;}
$as_echo "#define USE_GTK2 1" >>confdefs.h
- IMGFBCFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gtk+-2.0`"
- IMGFBLDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gtk+-2.0`"
+ IMGFBCFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0`"
+ IMGFBLDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0`"
elif test x"$have_gdkpixbuf" = xyes; then
$as_echo "#define USE_W3MIMG_FB 1" >>confdefs.h
@@ -6991,7 +6992,7 @@ $as_echo "$as_me: WARNING: unable to build w3mimgdisplay with X11 support" >&2;}
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGFBCFLAGS="`${IMLIB2_CONFIG} --cflags`"
- IMGFBLDFLAGS="`${IMLIB2_CONFIG} --libs`"
+ IMGFBLDFLAGS="`${PKG_CONFIG} --libs imlib2`"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to build w3mimgdisplay with FB support" >&5
$as_echo "$as_me: WARNING: unable to build w3mimgdisplay with FB support" >&2;}
@@ -7344,7 +7345,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-w3m_browser="/usr/bin/mozilla"
+w3m_browser="/usr/bin/firefox"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which external browser is used by default" >&5
$as_echo_n "checking which external browser is used by default... " >&6; }
@@ -7977,7 +7978,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_termlib" >&5
$as_echo "$with_termlib" >&6; }
- test x"$with_termlib" = xyes && with_termlib="terminfo mytinfo termlib termcap ncurses curses"
+ test x"$with_termlib" = xyes && with_termlib="terminfo mytinfo termlib termcap tinfo ncurses curses"
for lib in $with_termlib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_tgetent" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l$lib" >&5
@@ -8766,7 +8767,7 @@ _ACEOF
-for ac_func in strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale
+for ac_func in strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir mkdtemp getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -8986,7 +8987,7 @@ extern char *sys_errlist[];
int
main ()
{
-printf(sys_errlist[0]);
+printf("%s", sys_errlist[0]);
;
return 0;
}
@@ -9076,7 +9077,7 @@ RC_DIR="~/.$PACKAGE"
$as_echo "#define RC_DIR \"\$RC_DIR\"" >>confdefs.h
-DOCDIRS="doc:en_English doc-jp:ja_Japanese"
+DOCDIRS="doc:en_English doc-jp:ja_Japanese doc-de:de_German"
cat >>confdefs.h <<_ACEOF
#define DOCDIRS "$DOCDIRS"
_ACEOF
@@ -9084,9 +9085,10 @@ _ACEOF
cvsver=`$AWK '\$1 ~ /Id:/ { print \$3}' $srcdir/ChangeLog`
- sed -e 's/define CURRENT_VERSION "\(.*\)+cvs/define CURRENT_VERSION "\1+cvs-'$cvsver'/' $srcdir/version.c.in > version.c
+ ymdver=`sed -e 's/ .*//;s/-//g;q' $srcdir/ChangeLog`
+ sed -e 's/define CURRENT_VERSION "\(.*\)YYYYMMDD/define CURRENT_VERSION "\1'$ymdver'/;s/define CURRENT_VERSION "\(.*\)+cvs/define CURRENT_VERSION "\1+cvs-'$cvsver'/' $srcdir/version.c.in > version.c
CURRENT_VERSION=`sed -n 's/.*define CURRENT_VERSION *"w3m\/\(.*\)".*$/\1/p' version.c`
-ac_config_files="$ac_config_files Makefile posubst po/Makefile.in scripts/Makefile scripts/dirlist.cgi scripts/w3mhelp.cgi scripts/w3mmail.cgi scripts/xface2xpm scripts/multipart/Makefile scripts/multipart/multipart.cgi scripts/w3mman/Makefile scripts/w3mman/w3mman scripts/w3mman/w3mman.1 scripts/w3mman/w3mman2html.cgi libwc/Makefile w3mimg/Makefile w3mimg/fb/Makefile w3mimg/x11/Makefile w3mimg/win/Makefile w3mhelp-w3m_en.html w3mhelp-w3m_ja.html w3mhelp-lynx_en.html w3mhelp-lynx_ja.html"
+ac_config_files="$ac_config_files Makefile posubst po/Makefile.in scripts/Makefile scripts/dirlist.cgi scripts/w3mhelp.cgi scripts/w3mmail.cgi scripts/xface2xpm scripts/multipart/Makefile scripts/multipart/multipart.cgi scripts/w3mman/Makefile scripts/w3mman/w3mman scripts/w3mman/w3mman.1 scripts/w3mman/w3mman.de.1 scripts/w3mman/w3mman2html.cgi libwc/Makefile w3mimg/Makefile w3mimg/fb/Makefile w3mimg/x11/Makefile w3mimg/win/Makefile w3mhelp-w3m_en.html w3mhelp-w3m_ja.html w3mhelp-lynx_en.html w3mhelp-lynx_ja.html"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -9810,6 +9812,7 @@ do
"scripts/w3mman/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/w3mman/Makefile" ;;
"scripts/w3mman/w3mman") CONFIG_FILES="$CONFIG_FILES scripts/w3mman/w3mman" ;;
"scripts/w3mman/w3mman.1") CONFIG_FILES="$CONFIG_FILES scripts/w3mman/w3mman.1" ;;
+ "scripts/w3mman/w3mman.de.1") CONFIG_FILES="$CONFIG_FILES scripts/w3mman/w3mman.de.1" ;;
"scripts/w3mman/w3mman2html.cgi") CONFIG_FILES="$CONFIG_FILES scripts/w3mman/w3mman2html.cgi" ;;
"libwc/Makefile") CONFIG_FILES="$CONFIG_FILES libwc/Makefile" ;;
"w3mimg/Makefile") CONFIG_FILES="$CONFIG_FILES w3mimg/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 7308fc6..ebb3282 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,7 +150,7 @@ dnl AC_FUNC_MEMCMP
dnl AC_FUNC_MMAP
dnl AC_FUNC_SETVBUF_REVERSED
dnl AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale)
+AC_CHECK_FUNCS(strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir mkdtemp getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale)
AC_FUNC_STRFTIME
AC_FUNC_WAIT3
AC_FUNC_SETPGRP
@@ -172,7 +172,7 @@ AC_SUBST(RC_DIR)
RC_DIR="~/.$PACKAGE"
AC_DEFINE(RC_DIR, "$RC_DIR")
AC_SUBST(DOCDIRS)
-DOCDIRS="doc:en_English doc-jp:ja_Japanese"
+DOCDIRS="doc:en_English doc-jp:ja_Japanese doc-de:de_German"
AC_DEFINE_UNQUOTED(DOCDIRS, "$DOCDIRS")
AC_W3M_VERSION
@@ -181,7 +181,8 @@ scripts/Makefile scripts/dirlist.cgi \
scripts/w3mhelp.cgi \
scripts/w3mmail.cgi scripts/xface2xpm \
scripts/multipart/Makefile scripts/multipart/multipart.cgi \
-scripts/w3mman/Makefile scripts/w3mman/w3mman scripts/w3mman/w3mman.1 \
+scripts/w3mman/Makefile scripts/w3mman/w3mman \
+scripts/w3mman/w3mman.1 scripts/w3mman/w3mman.de.1 \
scripts/w3mman/w3mman2html.cgi \
libwc/Makefile \
w3mimg/Makefile w3mimg/fb/Makefile w3mimg/x11/Makefile w3mimg/win/Makefile \
diff --git a/cookie.c b/cookie.c
index 8020f6d..705e277 100644
--- a/cookie.c
+++ b/cookie.c
@@ -22,10 +22,10 @@ static int is_saved = 1;
#define contain_no_dots(p, ep) (total_dot_number((p),(ep),1)==0)
-static int
-total_dot_number(char *p, char *ep, int max_count)
+static unsigned int
+total_dot_number(char *p, char *ep, unsigned int max_count)
{
- int count = 0;
+ unsigned int count = 0;
if (!ep)
ep = p + strlen(p);
@@ -105,6 +105,7 @@ make_portlist(Str port)
pl->next = first;
first = pl;
}
+ Strfree(tmp);
return first;
}
@@ -247,16 +248,12 @@ find_cookie(ParsedURL *pu)
Strcat(tmp, Sprintf("; $Domain=\"%s\"", p1->domain->ptr));
if (p1->portl)
Strcat(tmp,
- Sprintf("; $Port=\"%s\"", portlist2str(p1->portl)));
+ Sprintf("; $Port=\"%s\"", portlist2str(p1->portl)->ptr));
}
}
return tmp;
}
-char *special_domain[] = {
- ".com", ".edu", ".gov", ".mil", ".net", ".org", ".int", NULL
-};
-
int
check_avoid_wrong_number_of_dots_domain( Str domain )
{
@@ -324,7 +321,7 @@ add_cookie(ParsedURL *pu, Str name, Str value,
if (version == 0) {
/* [NETSCAPE] rule */
- int n = total_dot_number(domain->ptr,
+ unsigned int n = total_dot_number(domain->ptr,
domain->ptr + domain->length,
3);
if (n < 2) {
@@ -332,19 +329,6 @@ add_cookie(ParsedURL *pu, Str name, Str value,
COOKIE_ERROR(COO_ESPECIAL);
}
}
- else if (n == 2) {
- char **sdomain;
- int ok = 0;
- for (sdomain = special_domain; !ok && *sdomain; sdomain++) {
- int offset = domain->length - strlen(*sdomain);
- if (offset >= 0 &&
- strcasecmp(*sdomain, &domain->ptr[offset]) == 0)
- ok = 1;
- }
- if (!ok && ! check_avoid_wrong_number_of_dots_domain(domain)) {
- COOKIE_ERROR(COO_ESPECIAL);
- }
- }
}
else {
/* [DRAFT 12] s. 4.3.2 case 2 */
@@ -463,7 +447,7 @@ save_cookies(void)
continue;
fprintf(fp, "%s\t%s\t%s\t%ld\t%s\t%s\t%d\t%d\t%s\t%s\t%s\n",
parsedURL2Str(&p->url)->ptr,
- p->name->ptr, p->value->ptr, p->expires,
+ p->name->ptr, p->value->ptr, (long)p->expires,
p->domain->ptr, p->path->ptr, p->flag,
p->version, str2charp(p->comment),
(p->portl) ? portlist2str(p->portl)->ptr : "",
@@ -517,36 +501,36 @@ load_cookies(void)
cookie->commentURL = NULL;
parseURL(readcol(&str)->ptr, &cookie->url, NULL);
if (!*str)
- return;
+ break;
cookie->name = readcol(&str);
if (!*str)
- return;
+ break;
cookie->value = readcol(&str);
if (!*str)
- return;
+ break;
cookie->expires = (time_t) atol(readcol(&str)->ptr);
if (!*str)
- return;
+ break;
cookie->domain = readcol(&str);
if (!*str)
- return;
+ break;
cookie->path = readcol(&str);
if (!*str)
- return;
+ break;
cookie->flag = atoi(readcol(&str)->ptr);
if (!*str)
- return;
+ break;
cookie->version = atoi(readcol(&str)->ptr);
if (!*str)
- return;
+ break;
cookie->comment = readcol(&str);
if (cookie->comment->length == 0)
cookie->comment = NULL;
if (!*str)
- return;
+ break;
cookie->portl = make_portlist(readcol(&str));
if (!*str)
- return;
+ break;
cookie->commentURL = readcol(&str);
if (cookie->commentURL->length == 0)
cookie->commentURL = NULL;
diff --git a/display.c b/display.c
index e00eb0c..e62d07f 100644
--- a/display.c
+++ b/display.c
@@ -257,7 +257,7 @@ make_lastline_link(Buffer *buf, char *title, char *url)
parseURL2(url, &pu, baseURL(buf));
u = parsedURL2Str(&pu);
if (DecodeURL)
- u = Strnew_charp(url_unquote_conv(u->ptr, buf->document_charset));
+ u = Strnew_charp(url_decode2(u->ptr, buf));
#ifdef USE_M17N
u = checkType(u, &pr, NULL);
#endif
@@ -487,7 +487,7 @@ displayBuffer(Buffer *buf, int mode)
term_title(conv_to_system(buf->buffername));
refresh();
#ifdef USE_IMAGE
- if (activeImage && displayImage && buf->img) {
+ if (activeImage && displayImage && buf->img && buf->image_loaded) {
drawImage();
}
#endif
@@ -497,6 +497,10 @@ displayBuffer(Buffer *buf, int mode)
save_current_buf = buf;
}
#endif
+ if (mode == B_FORCE_REDRAW && (buf->check_url & CHK_URL) ) {
+ chkURLBuffer(buf);
+ displayBuffer(buf, B_NORMAL);
+ }
}
static void
@@ -521,7 +525,15 @@ drawAnchorCursor0(Buffer *buf, AnchorList *al, int hseq, int prevhseq,
break;
}
if (hseq >= 0 && an->hseq == hseq) {
+ int start_pos = an->start.pos;
+ int end_pos = an->end.pos;
for (i = an->start.pos; i < an->end.pos; i++) {
+ if (enable_inline_image && (l->propBuf[i] & PE_IMAGE)) {
+ if (start_pos == i)
+ start_pos = i + 1;
+ else if (end_pos == an->end.pos)
+ end_pos = i - 1;
+ }
if (l->propBuf[i] & (PE_IMAGE | PE_ANCHOR | PE_FORM)) {
if (active)
l->propBuf[i] |= PE_ACTIVE;
@@ -529,9 +541,9 @@ drawAnchorCursor0(Buffer *buf, AnchorList *al, int hseq, int prevhseq,
l->propBuf[i] &= ~PE_ACTIVE;
}
}
- if (active)
+ if (active && start_pos < end_pos)
redrawLineRegion(buf, l, l->linenumber - tline + buf->rootY,
- an->start.pos, an->end.pos);
+ start_pos, end_pos);
}
else if (prevhseq >= 0 && an->hseq == prevhseq) {
if (active)
@@ -855,14 +867,16 @@ redrawLineImage(Buffer *buf, Line *l, int i)
y = (int)(i * pixel_per_line);
sx = (int)((rcol - COLPOS(l, a->start.pos)) * pixel_per_char);
sy = (int)((l->linenumber - image->y) * pixel_per_line);
- if (sx == 0 && x + image->xoffset >= 0)
- x += image->xoffset;
- else
- sx -= image->xoffset;
- if (sy == 0 && y + image->yoffset >= 0)
- y += image->yoffset;
- else
- sy -= image->yoffset;
+ if (! enable_inline_image) {
+ if (sx == 0 && x + image->xoffset >= 0)
+ x += image->xoffset;
+ else
+ sx -= image->xoffset;
+ if (sy == 0 && y + image->yoffset >= 0)
+ y += image->yoffset;
+ else
+ sy -= image->yoffset;
+ }
if (image->width > 0)
w = image->width - sx;
else
@@ -1119,18 +1133,18 @@ addChar(char c, Lineprop mode)
}
#ifdef USE_M17N
if (w == 2 && WcOption.use_wide)
- addstr(graph2_symbol[(int)c]);
+ addstr(graph2_symbol[(unsigned char)c % N_GRAPH_SYMBOL]);
else
#endif
- addch(*graph_symbol[(int)c]);
+ addch(*graph_symbol[(unsigned char)c % N_GRAPH_SYMBOL]);
}
else {
#ifdef USE_M17N
symbol = get_symbol(DisplayCharset, &w);
- addstr(symbol[(int)c]);
+ addstr(symbol[(unsigned char)c % N_SYMBOL]);
#else
symbol = get_symbol();
- addch(*symbol[(int)c]);
+ addch(*symbol[(unsigned char)c % N_SYMBOL]);
#endif
}
}
diff --git a/doc-de/FAQ.html b/doc-de/FAQ.html
new file mode 100644
index 0000000..d88ba64
--- /dev/null
+++ b/doc-de/FAQ.html
@@ -0,0 +1,691 @@
+
+<html>
+ <head>
+ <style>
+ span.mono {
+ font-family:mono;
+ }
+ </style>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8">
+ <title>W3M FAQ</title>
+ </head>
+ <body>
+ <h1 align="center">
+ Häufig gestellte Fragen zu w3m
+ </h1>
+ <p align="right">
+ Akinori Ito <aito@fw.ipsj.or.jp> <br>korrigiert von Tom Berger <tom.be@gmx.net>
+ </p>
+ <h2 id="index">
+ <u>
+ Übersicht
+ </u>
+ </h2>
+ <ul>
+ <li>
+ <a href="#general">
+ <b>
+ Allgemeine Fragen; wie bekomme ich das Programm, welche Arbeitsumgebung wird benötigt?
+ </b>
+ </a>
+ </li>
+ <ul>
+ <li>
+ <b>
+ Wie wird <q>w3m</q> ausgesprochen?
+ </b>
+ </li>
+ <li>
+ <b>
+ Warum hat man es <q>w3m</q> genannt?
+ </b>
+ </li>
+ <li>
+ <b>
+ Auf welchen Plattformen läuft es?
+ </b>
+ </li>
+ <li>
+ <b>
+ Wo bekomme ich mehr Informationen über w3m?
+ </b>
+ </li>
+ <li>
+ <b>
+ Gibt es eine Mailingliste für w3m?
+ </b>
+ </li>
+ <li>
+ <b>
+ Gibt es das Programm fertig kompiliert?
+ </b>
+ </li>
+ </ul>
+ <li>
+ <a href="#install">
+ <b>
+ Kompilierung und Installation
+ </b>
+ </a>
+ </li>
+ <li>
+ <a href="#command">
+ <b>
+ Optionen, Befehle und Verwendung
+ </b>
+ </a>
+ </li>
+ <ul>
+ <li>
+ <b>
+ w3m beendet sich von selbst, wenn es ohne Argumente aufgerufen wurde. Was läuft hier falsch?
+ </b>
+ </li>
+ <li>
+ <b>
+ w3m startet mit schwarzen Zeichen vor schwarzem Hintergrund. Wie kann ich das ändern?
+ </b>
+ </li>
+ <li>
+ <b>
+ Kann w3m Dinge in Farbe darstellen?
+ </b>
+ </li>
+ <li>
+ <b>
+ Kann w3m mit monochromen Bildschirmen benutzt werden?
+ </b>
+ </li>
+ <li>
+ <b>
+ Wie kann ich den angezeigten Bereich verschieben?
+ </b>
+ </li>
+ <li>
+ <b>
+ Wie komme ich von einem zum anderen Hyperlink?
+ </b>
+ </li>
+ <li>
+ <b>
+ Grafische Browser stellen ein Wort rot dar, w3m hingegen nicht. Warum?
+ </b>
+ </li>
+ <li>
+ <b>
+ Wie ändere ich die für Hyperlinks, Bilder und Formularfelder benutzten Farben?
+ </b>
+ </li>
+ <li>
+ <b>
+ w3m scheint die Umgebungsvariable EDITOR zu ignorieren. Weshalb?
+ </b>
+ </li>
+ <li>
+ <b>
+ Wie breche ich eine Suche oder die Eingabe einer URL ab?
+ </b>
+ </li>
+ </ul>
+ <li>
+ <a href="#www">
+ <b>
+ Fragen zur Benutzung als Internetbrowser
+ </b>
+ </a>
+ </li>
+ <ul>
+ <li>
+ <b>
+ Wie fülle ich mit w3m Formulare aus?
+ </b>
+ </li>
+ <li>
+ <b>
+ w3m scheint langsamer als einige andere Browser zu sein. Warum?
+ </b>
+ </li>
+ <li>
+ <b>
+ Die Zeit zum Laden einer Seite wird nicht geringer, wenn diese Seite schon einmal angezeigt wurde.
+ </b>
+ </li>
+ <li>
+ <b>
+ Wie lade ich eine Datei herunter, auf die verlinkt wird?
+ </b>
+ </li>
+ <li>
+ <b>
+ Wie gebe ich einen Proxy-Server vor?
+ </b>
+ </li>
+<!-- deleted, see mail dated Mon, 04 Apr 2016 20:50:27 +0900 (JST)
+from Tatsuya Kinoshita <tats@debian.org>
+ <li>
+ <b>
+ w3m freezes when I invoke an external browser.
+ </b>
+ </li>
+-->
+ <li>
+ <b>
+ Wie wähle ich den standardmäßig verwendeten Bildbetrachter aus?
+ </b>
+ </li>
+ <li>
+ <b>
+ Wie wird eine URL eingegeben?
+ </b>
+ </li>
+ <li>
+ <b>
+ w3m hängt eine URL an die vorherige an, obwohl die Zeile mit <span class="mono">STRG-u</span> gelöscht worden war. Was ist zu tun?
+ </b>
+ </li>
+ </ul>
+ <li>
+ <a href="#other">
+ <b>
+ Verschiedenes
+ </b>
+ </a>
+ </li>
+ <ul>
+ <li>
+ <b>
+ Ich suche die Konfigurationsdatei von w3m.
+ </b>
+ </li>
+ <li>
+ <b>
+ Wofür sind die w3mxxxx Dateien in meinem ~/.w3m Verzeichnis gut?
+ </b>
+ </li>
+ </ul>
+ </ul>
+ <h2 id="general">
+ <u>
+ Allgemeine Fragen; wie bekomme ich das Programm, welche Arbeitsumgebung wird benötigt?
+ </u>
+ </h2>
+ <dl>
+ <dt>
+ <b>
+ Wie wird <q>w3m</q> ausgesprochen?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Der Name wird englisch ausgesprochen <q>W-three-M</q> und reimt sich nicht auf <q>pteranodon</q>.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Warum hat man es <q>w3m</q> genannt?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Darin steckt der japanische Satz <q>WWW-wo-Miru</q>, was <q>Sichte das weltweite Netz</q> bedeutet. Dieser Browser könnte also auf deutsch <q>Sdw2N</q> heißen.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Auf welchen Plattformen läuft es?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Das Programm läuft auf verschiedenen Unices, seit der Version 990226 auf OS/2 und seit Version 990303 auch auf Microsoft-Windows mit Cygwin32.
+ </p>
+ <p>
+ Es wurde bestätigt, dass neuere Versionen laufen auf:
+ </p>
+ <ul>
+ <li>
+ SunOS 4.1.x
+ </li>
+ <li>
+ HP-UX 9.x, 10.x
+ </li>
+ <li>
+ Solaris 2.5.x, 2.6, 8
+ </li>
+ <li>
+ Linux 2.0.1 bis 3.17
+ </li>
+ <li>
+ FreeBSD 2.2.8, 3.1, 3.2, 4.6
+ </li>
+ <li>
+ NetBSD/macppc, m68k
+ </li>
+ <li>
+ EWS4800 Rel.12.2 Rev.A
+ </li>
+ <li>
+ Digital UNIX: v3.2D, v4.0D
+ </li>
+ <li>
+ IRIX 5.3, IRIX 6.5
+ </li>
+ <li>
+ OS/2 mit emx
+ </li>
+ <li>
+ Windows 9x/NT mit Cygwin32 b20.1
+ </li>
+ <li>
+ MS-DOS mit DJGPP und WATT32 Pakettreiber
+ </li>
+ <li>
+ MacOS X Server
+ </li>
+ <li>
+ MacOS X 10.1, 10.2
+ </li>
+ </ul>
+ </dd>
+ <dt>
+ <b>
+ Wo bekomme ich mehr Informationen über w3m?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Auf der englischen <a href="http://w3m.sourceforge.net/index.en.html">Homepage</a> des w3m-Projekts.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Gibt es eine Mailingliste für w3m?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Es gibt eine Mailingliste für Entwickler (w3m-dev-en). Einzelheiten dazu finden Sie auf der <a href="http://w3m.sourceforge.net/index.en.html">Homepage</a> des w3m-Projekts. Sie können Ihre Anmerkungen auch dem <a href="mailto:aito@fw.ipsj.or.jp">Autor</a> schicken.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Gibt es das Programm fertig kompiliert?
+ </b>
+ </dt>
+ <dd>
+ <!--
+ You can get them from
+ <a href="http://prdownloads.sourceforge.net/w3m/">here</a>.
+!--><p>
+ Bis jetzt wurde das Programm nur für Windows /Cygnus32 kompiliert. Sollten Sie dies für andere Plattformen durchgeführt haben und möchten Ihre Binärversion der Allgemeinheit zur Verfügung stellen, kontaktieren Sie den <a href="mailto:aito@fw.ipsj.or.jp">Autor</a>.
+ </p>
+ </dd>
+ </dl>
+ <p align="right">
+ <i>
+ Zurück zur <a href="#index">Übersicht</a>
+ </i>
+ </p>
+ <h2 id="install">
+ <u>
+ Kompilierung und Installation
+ </u>
+ </h2>
+ <p>
+ Kein Problem :-)
+ </p>
+ <h2 id="command">
+ <u>
+ Optionen, Befehle und Verwendung
+ </u>
+ </h2>
+ <dl>
+ <dt>
+ <b>
+ w3m beendet sich von selbst, wenn es ohne Argumente aufgerufen wurde. Was läuft hier falsch?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ w3m ist ein <b>Textbetrachter</b>. Deshalb schließt sich das Programm von selbst, wenn es ohne ein Argument aufgerufen wird. Es läuft weiter
+ </p>
+ <ul>
+ <li>
+ mit einem Dateinamen oder einer Adresse als Argument
+ </li>
+ <li>
+ mit aus der Standardeingabe eingehenden Daten
+ </li>
+ <li>
+ nach Aufruf mit der Option -B, woraufhin die Lesezeichendatei gezeigt wird
+ </li>
+ <li>
+ nach Aufruf mit der Option -v, woraufhin eine Begrüßungsseite angezeigt wird
+ </li>
+ <li>
+ wenn die Variablen HTTP_HOME oder WWW_HOME spezifiziert wurden
+ </li>
+ </ul>
+ </dd>
+ <dt>
+ <b>
+ w3m startet mit schwarzen Zeichen vor schwarzem Hintergrund. Wie kann ich das ändern?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Wenn w3m für den Farbmodus kompiliert wurde, geht das Programm von weißem Hintergrund aus und zeigt die Buchstaben in schwarz.
+ </p>
+ <p>
+ Sie können entweder die Hintergrundfarbe Ihres Terminals ändern (bei xterm z.B. mit der Option -bg) oder so vorgehen
+ </p>
+ <ol>
+ <li>
+ Mit <span class="mono">w3m -M</span> den Monochrom-Modus von w3m starten
+ </li>
+ <li>
+ <q>o</q> eintippen, was Sie in den Einstellungs-Dialog bringt
+ </li>
+ <li>
+ <q>YES</q> neben <q>in Farbe anzeigen</q> markieren und irgendeine Farbe auswählen.
+ </li>
+ <li>
+ auf [OK] klicken
+ </li>
+ </ol>
+ </dd>
+ <dt>
+ <b>
+ Kann w3m Dinge in Farbe darstellen?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Ja. Wenn Sie <q>./configure</q> durchführen, werden Ihnen folgende Möglichkeiten angeboten:
+ </p>
+<pre>
+ Let's do some configurations. Choose config option among the list. <br> 1 - Baby model (no color, no menu, no mouse, no cookie, no SSL) <br> 2 - Little model (color, menu, no mouse, no cookie, no SSL) <br> 3 - Mouse model (color, menu, mouse, no cookie, no SSL) <br> 4 - Cookie model (color, menu, mouse, cookie, no SSL)<br> 5 - Monster model (with everything; you need openSSL library) <br> 6 - Customize Which?
+</pre>
+ <p>
+ Sie entscheiden sich für 2, 3, 4, oder 5.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Kann w3m mit monochromen Bildschirmen benutzt werden?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Ja, Sie können entweder
+ </p>
+ <ul>
+ <li>
+ obige Frage bei <q>./configure</q> mit 1 beantworten, oder
+ </li>
+ <li>
+ w3m mit der Option -M starten, oder
+ </li>
+ <li>
+ innerhalb von w3m die Taste <q>o</q> betätigen, was den Einstellungs-Dialog öffnet, in dem Sie <q>in Farbe anzeigen</q> abschalten können.
+ </li>
+ </ul>
+ </dd>
+ <dt>
+ <b>
+ Wie kann ich den angezeigten Bereich verschieben?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Indem Sie den Cursor an den Rand des Bildschirmes bewegen. Außerdem können Sie die folgenden Kommmandos nutzen
+ </p>
+ <ul>
+ <li>SHIFT_LEFT und SHIFT_RIGHT, denen die Tasten <span class="mono">></span> und <span class="mono"><</span> zugeordnet sind</li>
+ <li>SHIFT_LEFT1 und SHIFT_RIGHT1, denen die Tasten <span class="mono">.</span> und <span class="mono">,</span> zugeordnet sind</li>
+ </ul>
+ <p>
+ Ein weiterer Weg wäre, mit der Option -geometry des Terminalprogramms den zur Anzeige verfügbaren Platz anzupassen, beispielsweise mit einer Eingabe der Art
+ </p>
+ <pre> xterm -geometry 110x45 -bg white -name w3m -e w3m -B</pre>
+ </dd>
+ <dt>
+ <b>
+ Wie komme ich von einem zum anderen Hyperlink?
+ </b>
+ </dt>
+ <dd>
+ <p>
+
+ Sie erreichen den nächsten Hyperlink mit der TAB-Taste. Zum vorhergehenden springt der Cursor, wenn die ESC-Taste vor der TAB-Taste gedrückt wurde. (Mehr zu <a href="MANUAL.html#Functions" target="_blank"> Funktionen und Tastaturbelegung</a> im Handbuch von w3m)
+
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Grafische Browser stellen ein Wort rot dar, w3m hingegen nicht. Warum?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ w3m ignoriert das Attribut COLOR="..." in HTML. Dessen Berücksichtigung zu implementieren, wäre möglich, aber ich denke, die Dokumente wären am Ende schwerer lesbar.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Wie ändere ich die für Hyperlinks, Bilder und Formularfelder benutzten Farben?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Tippen Sie in w3m <q>o</q> ein und gelangen damit in den Einstellungs-Dialog. Dort können Sie die Farben ändern.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ w3m scheint die Umgebungsvariable EDITOR zu ignorieren. Weshalb?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Tippen Sie in w3m <q>o</q> ein und gelangen damit in den Einstellungs-Dialog. Jeglicher Eintrag im Feld <q>Editor</q> hat Vorrang gegenüber der Umgebungsvariablen.
+ </p>
+ <p>
+ Wenn Sie also das durch EDITOR angegebene Textbearbeitungsprogramm verwenden möchten, löschen Sie den Eintrag und drücken [OK].
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Wie breche ich eine Suche oder die Eingabe einer URL ab?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Löschen Sie den eingegebenen Text mit <span class="mono">STRG-u</span> und drücken Sie die Eingabetaste.
+ </p>
+ </dd>
+ </dl>
+ <p align="right">
+ <i>
+ Zurück zur <a href="#index">Übersicht</a>
+ </i>
+ </p>
+ <h2 id="www">
+ <u>
+ Fragen zur Benutzung als Internetbrowser
+ </u>
+ </h2>
+ <dl>
+ <dt>
+ <b>
+ Wie fülle ich mit w3m Formulare aus?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Formular-Eingabefelder werden in rot (oder invertiert) angezeigt. Bewegen Sie den Cursor dorthin. Wenn es
+ </p>
+ <ul>
+ <li>
+ ein Texteingabefeld ist, drücken Sie die Eingabetaste, schreiben den Text unten in die Eingabezeile und drücken die Eingabetaste nochmals,
+ </li>
+ <li>
+ sich um einen Radiobutton oder eine Checkbox handelt, wird bei Drücken der Eingabetaste die Auswahl verändert oder neu getroffen
+ </li>
+ <li>
+ sich um einen Texteingabebereich handelt, wird durch Drücken der Eingabetaste ein Editor gestartet
+ </li>
+ <li>
+ sich um eine Schaltflächen für <q>Übermitteln</q> oder <q>Zurücksetzen</q> handelt, wird die entsprechende Aktion ausgeführt.
+ </li>
+ </ul>
+ </dd>
+ <dt>
+ <b>
+ w3m scheint langsamer als einige andere Browser zu sein. Warum?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ HTML-Dokumente werden in zwei Schritten verarbeitet. Erst nachdem ein Dokument vollständig vorliegt, baut w3m die Anzeige auf.
+ </p>
+ <p>
+ Da die meisten anderen Browser die Seite aufbauen, ehe sie komplett ist, scheinen sie schneller.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Die Zeit zum Laden einer Seite wird nicht geringer, wenn diese Seite schon einmal angezeigt wurde.
+ </b>
+ </dt>
+ <dd>
+ <p>
+ w3m nutzt keinen eigenen Zwischenspeicher. Es liest daher Dokumente jedesmal neu vom Server ein. Wenn möglich, verwenden Sie einen Server für die Zwischenspeicherung.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Wie lade ich eine Datei herunter, auf die verlinkt wird?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Verwenden Sie <q>a</q> (oder <q>d</q> bei lynx-artiger Tastaturbelegung) oder <span class="mono">ESC RET</span>. Wenn Sie ein eingebundenes Bild herunterladen möchten, drücken Sie <span class="mono">ESC I</span>. (Mehr zu <a href="MANUAL.html#Functions" target="_blank"> Funktionen und Tastaturbelegung</a> im Handbuch von w3m)
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Wie gebe ich einen Proxy-Server vor?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Setzen Sie die Umgebungsvariablen HTTP_PROXY, HTTPS_PROXY, GOPHER_PROXY und FTP_PROXY oder öffnen mit <q>o</q> den Einstellungs-Dialog. Um beispielsweise den Port 8000 von proxy.example.org zu benutzen, geben Sie ein
+ </p>
+ <pre> http://proxy.example.org:8000/</pre>
+ </dd>
+<!-- deleted, see mail dated Mon, 04 Apr 2016 20:50:27 +0900 (JST)
+from Tatsuya Kinoshita <tats@debian.org>
+ <dt>
+ <b>
+ w3m freezes when I invoke an external browser.
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Enter w3m's option screen using the <q>o</q> key and specify
+ </p>
+ <pre> firefox %s &</pre>
+ <p>
+ (if you are using Firefox). Note that %s is replaced with the URL
+ when invoking.
+ </p>
+ </dd>
+ -->
+ <dt>
+ <b>
+ Wie wähle ich den standardmäßig verwendeten Bildbetrachter aus?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Standardmäßig benutzt w3m den Bildbetrachter xv. Wenn Sie beispielsweise <q>display</q> vorziehen, ergänzen Sie ~/.w3m/mailcap oder /etc/mailcap um die Zeile:
+ </p>
+<pre>
+ image/*; display %s
+</pre>
+ <p>
+ Ebenso können Sie für andere Dateitypen externe Anzeigeprogramme festlegen:
+ </p>
+<pre>
+ image/*; display %s <br>application/postscript; ghostview %s <br>application/x-dvi; xdvi %s
+</pre>
+ </dd>
+ <dt>
+ <b>
+ Wie wird eine URL eingegeben?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Drücken Sie <span class="mono">U</span>
+ </p>
+ </dd>
+ <dt>
+ <b>
+ w3m hängt eine URL an die vorherige an, obwohl die Zeile mit <span class="mono">STRG-u</span> gelöscht worden war. Was ist zu tun?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Geben Sie die <i>komplette</i> Adresse ein, z.B. http://www.slashdot.org.
+ </p>
+ </dd>
+ </dl>
+ <p align="right">
+ <i>
+ Zurück zur <a href="#index">Übersicht</a>
+ </i>
+ </p>
+ <h2 id="other">
+ <u>
+ Verschiedenes
+ </u>
+ </h2>
+ <dl>
+ <dt>
+ <b>
+ Ich suche die Konfigurationsdatei von w3m.
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Es ist ~/.w3m/config.
+ </p>
+
+ <p>
+ In dieser Datei kann jeder Benutzer das Verhalten von w3m anpassen. Sie finden dort zeilenweise die Variablen zu den im Einstellungs-Dialog beschriebenen Optionen. Den Namen und die Belegung einer Variable trennt ein Leerzeichen.
+ </p>
+
+ <p>Ohne eine benutzerspezifische Konfigurationsdatei richtet sich w3m nach der systemweiten Konfigurationsdatei /etc/w3m/config.
+ </p>
+
+ </dd>
+ <dt>
+ <b>
+ Wofür sind die w3mxxxx Dateien in meinem ~/.w3m Verzeichnis gut?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Es handelt sich um temporäre Dateien, die w3m beim Lesen anlegt. Sie dienen nicht zur Zwischenspeicherung und werden beim Verlassen des Programms normalerweise gelöscht. Wenn welche zurückbleiben, löschen Sie sie einfach selbst.
+ </p>
+ </dd>
+ </dl>
+ <p align="right">
+ <i>
+ Zurück zur <a href="#index">Übersicht</a>
+ </i>
+ </p>
+ </body>
+</html>
diff --git a/doc-de/MANUAL.html b/doc-de/MANUAL.html
new file mode 100644
index 0000000..f922314
--- /dev/null
+++ b/doc-de/MANUAL.html
@@ -0,0 +1,2340 @@
+
+<html>
+ <head>
+ <title>w3m Handbuch</title>
+ <style>
+ span.mono {
+ font-family:mono;
+ }
+ </style>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8">
+ </head>
+ <body>
+ <!--
+insertions tagged with "mh 2016-03-29" and "mh 2016-06-11" come from the latest version of manual page w3m (1)
+ -->
+
+ <h1>w3m HANDBUCH</h1>
+ <div align="right">
+ Akinori Ito<br> aito@fw.ipsj.or.jp
+ </div>
+ <h2>Übersicht</h2>
+ <ul>
+ <li>
+ <a href="#Einführung">
+ Einführung
+ </a>
+ </li>
+ <li>
+ <a href="#Einstellungen">
+ Einstellungen
+ </a>
+ </li>
+ <li>
+ <a href="#Color">
+ Farbzuordnung im Dokument
+ </a>
+ </li>
+ <li>
+ <a href="#Functions">
+ Funktionen und Tastaturbelegung
+ </a>
+ </li>
+<!-- mh 2016-06-13 obsolete
+ <li>
+ <a href="#Key:lynx">
+ Lynx-like key bindings
+ </a>
+ </li>
+-->
+ <li>
+ <a href="#Mouse">
+ Bedienung per Maus
+ </a>
+ </li>
+<!-- mh 2016-06-13 obsolete
+ <li>
+ <a href="#Key:custom">
+ Key customization
+ </a>
+ </li>
+ -->
+ <li>
+ <a href="#LocalCGI">
+ Lokale CGI-Skripte
+ </a>
+ </li>
+ </ul>
+ <hr>
+ <h2 id="Einführung">
+ Einführung
+ </h2>
+ <p>
+ w3m ist ein textorientierter Browser und Textbetrachter (Pager). In einem Terminalemulator können Sie damit lokale und andere Dokumente anzeigen lassen und Verknüpfungen (Hyperlinks) weiterverfolgen.
+ </p>
+ <hr>
+ <h2 id="Einstellungen">
+ Einstellungen
+ </h2>
+ <p>
+ Der Aufruf per Befehlszeile lautet
+ </p>
+<!-- mh 2016-08-06 invocation adapted to w3m(1). w3m accepts several options and several targets -->
+<pre>
+ w3m [Option]… [Datei|Adresse]…
+</pre>
+ <p>
+ Wenn Sie Dateinamen oder Adressen in der Befehlszeile angeben, werden diese Dokumente angezeigt. Fehlen entsprechende Argumente, wird w3m ein Dokument aus der Standardeingabe erwarten und anzeigen. Erhält das Programm auch hier keine Daten, beendet es sich normalerweise selbstständig.
+ </p>
+ <p>
+ Optionen sind unter anderem:
+ </p>
+ <dl>
+<h3>Allgemeine Optionen</h3>
+ <dt>
+ -B
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ starte mit einer Ansicht aller Lesezeichen (wenn kein anderes Zielobjekt angegeben ist)
+ </p>
+ </dd>
+ <dt>
+ -M
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ monochrome Anzeige
+ </p>
+ </dd>
+ <dt>
+ -no-mouse
+ </dt>
+ <dd>
+ <p>
+ Mausfunktion aus
+ </p>
+ </dd>
+ <dt>
+ -num
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ zeige Zeilennummern an
+
+ </p>
+ </dd>
+<!-- mh 2016-08-06 commented out. As implementation is not verified.
+ <dt>
+ -ppc <i>num</i>
+ </dt>
+ <dd>
+ <p>
+ width of <i>num</i> pixels per character. Range of 4.0 to 32.0,
+ default 8.0. Larger values will make tables
+ narrower. (Implementation not verified)
+ </p>
+ </dd>
+-->
+ <dt>
+ -v
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ begrüße den Benutzer mit einer eingebauten Seite (wenn kein anderes Zielobjekt angegeben ist)
+ </p>
+ </dd>
+ <dt>
+ -W
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ wechsle zwischen umlaufendem und nicht umlaufendem Suchen
+ </p>
+ </dd>
+ <dt>
+ -X
+ </dt>
+ <dd>
+ <p>
+ nach Beenden des Programms das Terminal nicht neu initialisieren.
+ </p>
+ </dd>
+ <dt>
+ +<i>Zahl</i>
+ </dt>
+ <dd>
+ <!--mh 2016-06-11 --><p>
+ gehe zu Zeile <i>Zahl</i>. Wirkt nur, wenn <i>Zahl</i> größer ist als die im Terminal verfügbare Zeilenzahl
+ </p>
+ </dd>
+<h3>Browser-Optionen</h3>
+ <dt>
+ -cols <i>Zahl</i>
+ </dt>
+ <dd>
+ <!-- mh 2016-06-11 --><p>
+
+ bei für die Standardausgabe bestimmten Inhalten, nimm bei zur Umsetzung von HTML eine Länge von <i>num</i> Zeichen pro Zeile
+ </p>
+ </dd>
+ <dt>
+ -cookie
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ verwende gespeicherte Cookies und akzeptiere neue
+ </p>
+ </dd>
+ <dt>
+ -no-cookie
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ verwende weder gespeicherte Cookies noch akzeptiere neue
+
+ </p>
+ </dd>
+ <dt>
+ -F
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ verarbeite Frames
+ </p>
+ </dd>
+ <dt>
+ -no-graph
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ verwende bei der Umsetzung von Tabellen und Frames keine grafischen Zeichen
+ </p>
+ </dd>
+ <dt>
+ -header <i>Zeichenkette</i>
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ füge der HTTP(S)-Anfrage <i>Zeichenkette</i> an. Diese muss der Kopfdaten-Syntax <span class="mono">"Variable: Wert"</span> entsprechen
+ </p>
+ </dd>
+ <dt>
+ -m
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29
+Render the body of Usenet messages according to the header <q>Content-type</q>
+--><p>
+ arbeite im <q>Internetnachrichten-Modus</q>. Mit dieser Option entnimmt w3m den Typ eines Dokumentes dessen Kopfdaten. Dies ist nützlich beim Lesen von Mails und Usenet-Nachrichten.
+
+ </p>
+ </dd>
+ <dt>
+ -no-proxy
+ </dt>
+ <dd>
+ <!-- mh 2016-06-11--><p>
+
+ verwende keinen Proxy
+ </p>
+ </dd>
+ <dt>
+ -post <i>Datei</i>
+ </dt>
+ <dd>
+ <!--funktionierend 2016-06-28T08:22>--><p>
+ verwende die Methode POST, um in <i>Datei</i> hinterlegte Daten hochzuladen. Hierbei wird die Syntax <span class="mono">"var1=wert1[&var2=wert2]…"</span> erwartet
+ </p>
+ </dd>
+<h3>Textbetrachter-Optionen</h3>
+ <dt>
+ -l <i>Zahl</i>
+ </dt>
+ <dd>
+ <!-- mh2016-06-11--><p>
+
+ Anzahl der Zeilen, die zwischengespeichert werden, wenn Text per Standardeingabe übergeben wurde. (Voreinstellung ist 10000)
+ </p>
+ </dd>
+ <dt>
+ -r
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29 --><p>
+
+ verarbeite spezielle Escape-Zeichen (beispielsweise ANSI-Escape-Zeichen oder nroff-Rückwärtsschritte für fette und unterstrichene Zeichen) nicht, sondern zeige sie stattdessen mittels Caret-Notation.
+ </p>
+ </dd>
+ <dt>
+ -s
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ mehrere leere Zeilen werden bis auf eine gelöscht
+ </p>
+ </dd>
+
+ <!--mh 2016-03-29 --><dt>
+ -t <i>Zahl</i>
+ </dt>
+ <dd>
+ <!--mh 2016-03-29--><p>
+ Tab-Zeichen so verwerten, dass Spalten mit einer Weite von <i>Zahl</i> Zeichen entstehen. Wirkt nicht auf Standardausgabe
+ </p>
+ </dd>
+<h3>Datenart- und Datenkodierungs-Optionen</h3>
+ <dt>
+ -I <i>Zeichenkodierung</i>
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ zu benutzende Zeichenkodierung für erhaltene Daten
+ </p>
+ </dd>
+ <dt>
+ -O <i>Zeichenkodierung</i>
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29 --><p>
+
+ zu benutzende Zeichenkodierung für auszugebende Daten
+ </p>
+ </dd>
+ <dt>
+ -T <i>Typ</i>
+ </dt>
+ <dd>
+ <!-- mh 2016-06-11--><p>
+
+ legt den MIME-Typ erhaltener Daten fest. Ohne diese Option bestimmt ihn das Programm anhand der Dateinamen-Erweiterung. Wenn dies fehlschlägt, wird text/plain als Typ angenommen. Zum Beispiel:
+ </p>
+ <p>
+ Übernimm HTML-Dokument von der Standardeingabe und zeige es an
+ </p>
+<pre>
+ cat beispiel.html | w3m -T text/html
+</pre>
+ <p>
+ Zeige HTML-Quelltext an
+ </p>
+<pre>
+ w3m -T text/plain beispiel.html
+</pre>
+ </dd>
+<h3>Optionen zur Datenausgabe, mit sofortigem Verlassen des Programms</h3>
+ <dt>
+ -dump
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29 --><p>
+ lies das per URL angegebene Dokument und leite es verarbeitet der Standardausgabe zu. Wenn mit der Option -cols nichts anderes eingestellt ist, erhält es eine Breite von 80 Zeichen
+ </p>
+ </dd>
+ <dt>
+ -dump_source
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ leite den Seitenquelltext der Standardausgabe zu
+ </p>
+ </dd>
+ <dt>
+ -dump_head
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ leite die Antwort einer HEAD-Anfrage für eine URL der Standardausgabe zu
+ </p>
+ </dd>
+ <dt>
+ -dump_both
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ leite Antwort auf HEAD-Anfrage und Seitenquelltext der Standardausgabe zu
+
+ </p>
+ </dd>
+ <dt>
+ -dump_extra
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ leite Antwort auf HEAD-Anfrage, Seitenquelltext und Extrainformation der Standardausgabe zu
+ </p>
+ </dd>
+
+<h3>Optionen, die Standards für Einstellungen und Datenquellen außer Kraft setzen</h3>
+
+ <dt>
+ -bookmark <i>Datei</i>
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ benutze anstelle der Standarddatei bookmark.html für Lesezeichen die Datei <i>Datei</i>
+ </p>
+ </dd>
+ <dt>
+ -config <i>Datei</i>
+ </dt>
+ <dd>
+ <!--mh 2016-06-11--><p>
+
+ benutze <i>Datei</i> anstelle der Standard-Konfigurationsdatei
+ </p>
+ </dd>
+ <dt>
+ -o <i>Option</i>=<i>Wert</i>
+ </dt>
+ <dd>
+ <!-- mh 2016-03-29--><p>
+
+ arbeite mit einer Konfiguration, bei der die Einstellung <i>Option</i> mit <i>Wert</i> belegt ist. Ohne <i>Option=Wert</i> gleichwertig mit <i>-show-option</i>
+ </p>
+ </dd>
+ </dl>
+ <hr>
+ <h2 id="Color">
+ Farbzuordnung im Dokument
+ </h2>
+ <p>
+ Links und Bildelemente werden wie folgt angezeigt:
+ </p>
+ <div align="center"> <table border="1"> <tr>
+ <th>
+ </th>
+ <th>
+ Farbmodus
+ </th>
+ <th>
+ Monochrom-Modus
+ </th>
+ </tr>
+ <tr>
+ <td>
+ Hyperlinks
+ </td>
+ <td>
+ blau
+ </td>
+ <td>
+ unterstrichen
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Bilder
+ </td>
+ <td>
+ grün
+ </td>
+ <td>
+ invertiert
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Formular-Eingabefelder
+ </td>
+ <td>
+ rot
+ </td>
+ <td>
+ invertiert
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ Diese Farben können nach Eingabe von <q>o</q> im Einstellungs-Dialog anders zugeordnet werden.
+ </p>
+ <hr>
+ <h2 id="Functions">
+ Funktionen und Tastaturbelegung
+ </h2>
+
+ <!-- mh 2016-06-13 obsolete
+ If you prefer using Lynx-like
+ key bindings, make w3m start with the respective keymap file keymap.lynx. (see w3m (1)).--><p>
+ Wenn w3m läuft, bedienen Sie das Programm, indem Sie Funktionen anhand ihres Namens oder der ihr zugeordneten Tastenkombination aufrufen. Es gibt voreingestellte Tastaturbelegungen.
+
+ </p>
+<!--
+ <h2 id="Key:custom">
+ Key customization
+ </h2>
+-->
+ <p>
+ Sie können die Tastaturbelegungen (abgesehen von jenen des Menü- und des Texteingabe-Modus) in einer Datei ~/.w3m/keymap anpassen. Beispielsweise bindet
+ </p>
+
+<pre>
+ keymap C-o NEXT_PAGE
+</pre>
+
+ <p>
+ die Funktion <span class="mono">NEXT_PAGE</span> (die normalerweise mit SPC und C-v verknüpft ist) mit C-o. Siehe die Liste verfügbarer Funktionen in <a href="README.func">README.func</a>. Original- und Lynx-artige Tastaturbelegungen enthalten die Beispieldateien <a href="keymap.default">keymap.default</a> und <a href="keymap.lynx">keymap.lynx</a>.
+ </p>
+
+ <p>
+ Im Folgenden stehen <i>C-</i> und <i>M-</i> für die Eingabe-Modifikationen mit der <i>Steuerungs-</i> und der <i>Meta-Taste</i>. Die letztere ersetzt die <i>ALT-Taste</i>, wohingegen Drücken der <i>ESC</i>-Taste zwischen <i>Meta</i>-modifiziertem und einfachen Tastendruck wechselt. Das Minus-Zeichen bedeutet das gleichzeitige Drücken von Tasten; der Leerraum dagegen steht dafür, dass eine Taste nach der anderen gedrückt wird. Mit <i>2 M</i> ist also gemeint, die <i>2</i> und dann <i>M</i> zu drücken.
+ </p>
+
+
+ <table border="1" width="100%">
+ <colgroup>
+ <col width="20%">
+ <col width="20%">
+ <col width="20%">
+ <col width="40%">
+ </colgroup>
+ <tr>
+ <th rowspan="2">
+ Funktion
+ </th>
+ <th colspan="2">Tastenkombination
+ </th>
+ <th rowspan="2">
+ Beschreibung
+ </th>
+ </tr>
+ <tr>
+ <th>
+ Standard
+ </th>
+ <th>
+ Lynx-ähnlich
+ </th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <h3>Navigation innerhalb von Seiten</h3>
+</td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_PAGE
+ </td>
+ <td>
+ SPC, C-v, +, PGDN
+ </td>
+ <td>
+ SPC, C-v, +
+ </td>
+ <td>
+ Scrolle eine Seite abwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREVIOUS_PAGE
+ </td>
+ <td>
+ b, M-v, -, PGUP
+ </td>
+ <td>
+ b, M-v, -
+ </td>
+ <td>
+ Scrolle eine Seite aufwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MOVE_RIGHT
+ </td>
+ <td>
+ l, C-f, RIGHT
+ </td>
+ <td>
+ l
+ </td>
+ <td>
+ Bewege Cursor nach rechts (mit Verschiebung um halbe Bildschirmbreite an dessen Rand)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ C-b, LEFT
+ </td>
+ <td>
+ h, C-b, LEFT
+ </td>
+ <td>
+ h
+ </td>
+ <td>
+ Bewege Cursor nach links (mit Verschiebung um halbe Bildschirmbreite an dessen Rand)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MOVE_DOWN
+ </td>
+ <td>
+ j, C-n, DOWN
+ </td>
+ <td>
+ j
+ </td>
+ <td>
+ Bewege Cursor abwärts (scrolle eine Zeile am Bildschirmrand)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MOVE_UP
+ </td>
+ <td>
+ k, C-p, UP
+ </td>
+ <td>
+ k
+ </td>
+ <td>
+ Bewege Cursor aufwärts (scrolle eine Zeile am Bildschirmrand)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ UP
+ </td>
+ <td>
+ J
+ </td>
+ <td>
+ J
+ </td>
+ <td>
+ Scrolle den Anzeigebereich eine Zeile aufwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+ DOWN
+ </td>
+ <td>
+ K
+ </td>
+ <td>
+ K
+ </td>
+ <td>
+ Scrolle den Anzeigebereich eine Zeile abwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LINE_BEGIN
+ </td>
+ <td>
+ ^, C-a
+ </td>
+ <td>
+ ^
+ </td>
+ <td>
+ Gehe zum Zeilenanfang
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LINE_END
+ </td>
+ <td>
+ $, C-e
+ </td>
+ <td>
+ $
+ </td>
+ <td>
+ Gehe zum Zeilenende
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_WORD
+ </td>
+ <td>
+ w
+ </td>
+ <td>
+ w
+ </td>
+ <td>
+ Gehe zum nächsten Wort
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREVIOUS_WORD
+ </td>
+ <td>
+ W
+ </td>
+ <td>
+ W
+ </td>
+ <td>
+ Gehe zum vorherigen Wort
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SHIFT_RIGHT
+ </td>
+ <td>
+ >
+ </td>
+ <td>
+ >
+ </td>
+ <td>
+ Anzeigebereich nach rechts versetzen
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SHIFT_LEFT
+ </td>
+ <td>
+ <
+ </td>
+ <td>
+ <
+ </td>
+ <td>
+ Anzeigebereich nach links versetzen
+ </td>
+ </tr>
+ <tr>
+ <td>
+ RIGHT
+ </td>
+ <td>
+ .
+ </td>
+ <td>
+ .
+ </td>
+ <td>
+ Anzeigebereich um eine Spalte nach rechts verschieben
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LEFT
+ </td>
+ <td>
+ ,
+ </td>
+ <td>
+ ,
+ </td>
+ <td>
+ Anzeigebereich um eine Spalte nach links verschieben
+ </td>
+ </tr>
+ <tr>
+ <td>
+ BEGIN
+ </td>
+ <td>
+ g, M-<, HOME
+ </td>
+ <td>
+ C-a, M-<
+ </td>
+ <td>
+ Gehe zur ersten Zeile
+ </td>
+ </tr>
+ <tr>
+ <td>
+ END
+ </td>
+ <td>
+ G, M->, END
+ </td>
+ <td>
+ C-e, M->
+ </td>
+ <td>
+ Gehe zur letzten Zeile
+ </td>
+ </tr>
+ <tr>
+ <td>
+ GOTO_LINE
+ </td>
+ <td>
+ M-g
+ </td>
+ <td>
+ G
+ </td>
+ <td>
+ Gehe zur angegebenen Zeile
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LINE_INFO
+ </td>
+ <td>
+ C-g
+ </td>
+ <td>
+ C-g
+ </td>
+ <td>
+ Zeige aktuelle Position im Dokument an
+ </td>
+ </tr>
+ <tr>
+ <td>
+ CENTER_H
+ </td>
+ <td>
+ Z
+ </td>
+<!--Correction by mh 2014-04-06
+Description for keybinding of z and Z had been mingled
+-->
+ <td>
+ Z
+ </td>
+ <td>
+ Bildschirm rechts und links des Cursors zentrieren
+ </td>
+ </tr>
+ <tr>
+ <td>
+ CENTER_V
+ </td>
+ <td>
+ z
+ </td>
+ <td>
+ z
+ </td>
+ <td>
+ Bildschirm ober- und unterhalb des Cursors zentrieren
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_LINK
+ </td>
+ <td>
+ TAB
+ </td>
+ <td>
+ TAB, C-n, DOWN
+ </td>
+ <td>
+ Gehe zum nächsten Hyperlink
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREVIOUS_LINK
+ </td>
+ <td>
+ M-TAB, C-u
+ </td>
+ <td>
+ M-TAB, C-u, C-p, UP
+ </td>
+ <td>
+ Gehe zum vorangegangen Hyperlink
+ </td>
+<!-- Annotion mh 2016-04-06
+Keybinding description for C-g had been moved as it did not fit to "Hyperlink operation" and position in the default and lynx-like series differed
+ -->
+ </tr>
+ <tr>
+ <td>
+ LINK_BEGIN
+ </td>
+ <td>
+ [
+ </td>
+ <td>
+ [
+ </td>
+ <td>
+ Gehe zum ersten Hyperlink
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LINK_END
+ </td>
+ <td>
+ ]
+ </td>
+ <td>
+ ]
+ </td>
+ <td>
+ Gehe zum letzten Hyperlink
+ </td>
+ </tr>
+<tr>
+<td>MOVE_LIST_MENU</td>
+<td>M-m</td>
+<td>M-m</td>
+<td>Öffne Menü mit vorhandenen Hyperlinks</td>
+</tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Umgang mit Hyperlinks</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ GOTO_LINK
+ </td>
+ <td>
+ C-j, C-m, RET
+ </td>
+ <td width="100">
+ C-f, C-j, C-m, RET, RIGHT
+ </td>
+ <td>
+ Folge dem aktuellen Hyperlink in neuem Puffer
+ </td>
+ </tr>
+<tr>
+<td>LIST_MENU</td>
+<td>M-l</td>
+<td>M-l</td>
+<td>Öffne Menü mit Hyperlinks und folge dem ausgewählten</td>
+</tr>
+ <tr>
+ <td>
+ SAVE_LINK
+ </td>
+ <td>
+ a, M-RET
+ </td>
+ <td>
+ d, M-RET
+ </td>
+ <td>
+ Speichere Ziel des Hyperlinks
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PEEK_LINK
+ </td>
+ <td>
+ u
+ </td>
+ <td>
+ u
+ </td>
+ <td>
+ Zeige Zieladresse
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PEEK_IMG
+ </td>
+ <td>
+ i
+ </td>
+ <td>
+ i
+ </td>
+ <td>
+ Zeige Adresse des Bildes
+ </td>
+ </tr>
+ <tr>
+ <td>
+ VIEW_IMAGE
+ </td>
+ <td>
+ I
+ </td>
+ <td>
+ I
+ </td>
+ <td>
+ Zeige Bild in Betrachter
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SAVE_IMAGE
+ </td>
+ <td>
+ M-I
+ </td>
+ <td>
+ M-I
+ </td>
+ <td>
+ Speichere Bild
+ </td>
+ </tr>
+<tr>
+<td>MARK_WORD</td>
+<td>;</td>
+<td>;</td>
+<td>Wandle aktuelles Wort in Hyperlink um</td>
+</tr>
+ <tr>
+ <td>
+ MARK_URL
+ </td>
+ <td>
+ :
+ </td>
+ <td>
+ :
+ </td>
+ <td>
+ Wandle URL-artige Zeichenketten um in Hyperlinks
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MARK_MID
+ </td>
+ <td>
+ M-:
+ </td>
+ <td>
+ M-:
+ </td>
+ <!-- changed due to mail dated Mon, 04 Apr 2016 00:47:09 +0900 (JST)
+from Tatsuya Kinoshita --><td>
+
+ Wandle Nachrichten-ID-artige Zeichenketten um in Hyperlinks
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PEEK
+ </td>
+ <td>
+ c
+ </td>
+ <td>
+ c
+ </td>
+ <td>
+ Zeige aktuelle Adresse an
+ </td>
+ </tr>
+ <tr>
+ <td>
+ INFO
+ </td>
+ <td>
+ =
+ </td>
+ <td>
+ =
+ </td>
+ <td>
+ Zeige Informationen über dieses Dokument
+ </td>
+ </tr>
+ <tr>
+ <td>
+ HISTORY
+ </td>
+ <td>
+ C-h
+ </td>
+ <td>
+ C-h
+ </td>
+ <td>
+ Chronik aufgesuchter Dokumente
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EXTERN
+ </td>
+ <td>
+ M
+ </td>
+ <td>
+ M
+ </td>
+ <td>
+ Zeige das aktuelle Dokument mit einem externen Browser (wird eine Taste von 2 bis 9 gedrückt, also beispielsweise 3 M, eingegeben, kommt ein anderer, in der Konfiguration hinterlegter Browser zum Einsatz)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EXTERN_LINK
+ </td>
+ <td>
+ M-M
+ </td>
+ <td>
+ M-M
+ </td>
+ <td>
+ Bringe das Linkziel mit einem externen Browser zur Anzeige (vorangestellte Zahlen wirken sich wie oben beschrieben aus)
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Verwalten von Lesezeichen</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ BOOKMARK
+ </td>
+ <td>
+ M-b
+ </td>
+ <td>
+ v, M-b
+ </td>
+ <td>
+ Lesezeichen ansehen
+ </td>
+ </tr>
+ <tr>
+ <td>
+ ADD_BOOKMARK
+ </td>
+ <td>
+ M-a
+ </td>
+ <td>
+ a, M-a
+ </td>
+ <td>
+ Lege für aktuelle Seite Lesezeichen an
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Umgang mit Dateien und Datenströmen</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ GOTO
+ </td>
+ <td>
+ U
+ </td>
+ <td>
+ g, U
+ </td>
+ <td>
+ Öffne angegebenes Dokument in neuem Puffer
+ </td>
+ </tr>
+<tr>
+<td>GOTO_RELATIVE</td>
+<td>M-u</td>
+<td>M-u</td>
+<td>Öffne relative Adresse in neuem Puffer</td>
+</tr>
+ <tr>
+ <td>
+ LOAD
+ </td>
+ <td>
+ V
+ </td>
+ <td>
+ V
+ </td>
+ <td>
+ Öffne lokale Datei in einem neuen Puffer
+ </td>
+ </tr>
+ <tr>
+ <td>
+ READ_SHELL
+ </td>
+ <td>
+ @
+ </td>
+ <td>
+ @
+ </td>
+ <!--Execute shell command and view output--><!--mh 2016-06-13 No difference to PIPE_SHELL could be discerned--><td>
+
+
+ Führe einen Shell-Befehl aus und zeige Ausgabe in einem neuen Puffer
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PIPE_SHELL
+ </td>
+ <td>
+ #
+ </td>
+ <td>
+ #
+ </td>
+ <!--Execute shell command and browse output--><!--mh 2016-06-13 No difference to READ_SHELL could be discerned--><td>
+
+
+ Führe einen Shell-Befehl aus und zeige Ausgabe in einem neuen Puffer
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Arbeit an Seiteninhalten</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <!-- is an alias to SOURCE --><td>
+ VIEW
+ </td>
+ <td>
+ v
+ </td>
+ <td>
+ \
+ </td>
+ <td>
+ Wechsle zwischen HTML-Quellcode und verarbeitetem Dokument
+ </td>
+ </tr>
+<tr>
+<td>LIST</td>
+<td>L</td>
+<td>L</td>
+<td>Liste Link-Elemente, Hyperlinks und Bilder auf</td>
+</tr>
+ <tr>
+ <td>
+ FRAME
+ </td>
+ <td>
+ F
+ </td>
+ <td>
+ F
+ </td>
+ <td>
+ Wechsle zwischen Kennung und Umsetzung von HTML-Frames
+ </td>
+ </tr>
+ <tr>
+ <td>
+ REDRAW
+ </td>
+ <td>
+ C-l
+ </td>
+ <td>
+ C-l, C-w
+ </td>
+ <td>
+ Bildschirmanzeige neu aufbauen
+ </td>
+ </tr>
+ <tr>
+ <td>
+ RELOAD
+ </td>
+ <td>
+ R
+ </td>
+ <td>
+ R, C-r
+ </td>
+ <td>
+ Aktuelles Dokument erneut laden
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EDIT
+ </td>
+ <td>
+ E
+ </td>
+ <td>
+ E
+ </td>
+ <td>
+ Bearbeite lokales Quelldokument
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EDIT_SCREEN
+ </td>
+ <td>
+ M-e
+ </td>
+ <td>
+ M-e
+ </td>
+ <td>
+ Bearbeite eine Kopie des verarbeiteten Dokuments
+ </td>
+ </tr>
+<tr>
+<td>PIPE_BUF</td>
+<td>|</td>
+<td>|</td>
+<td>Leite aktuellen Pufferinhalt einem Shell-Befehl zu und zeige Ausgabe an</td>
+</tr>
+ <tr>
+ <!-- is an alias to SAVE --><td>
+ DOWNLOAD
+ </td>
+ <td>
+ M-s
+ </td>
+ <td>
+ M-s
+ </td>
+ <td>
+ Dokument-Quellcode speichern
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SAVE_SCREEN
+ </td>
+ <td>
+ S
+ </td>
+ <td>
+ S, p
+ </td>
+ <td>
+ Speichere verarbeitetes Dokument
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Navigation zwischen Puffern und Reitern</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ BACK
+ </td>
+ <td>
+ B
+ </td>
+ <td>
+ B, C-b, LEFT
+ </td>
+ <td>
+ Schließe aktuellen Puffer und kehre zu dem im Stapel darunterliegenden zurück
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SELECT_MENU
+ </td>
+ <td>
+ s
+ </td>
+ <td>
+ s, C-h
+ </td>
+ <td>
+ Öffne Pufferstapel-Menü
+ </td>
+ </tr>
+ <tr>
+ <td>
+ TAB_MENU
+ </td>
+ <td>
+ M-t
+ </td>
+ <td>
+ M-t
+ </td>
+ <td>
+ Öffne das Reiter-Auswahl-Menü
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEW_TAB
+ </td>
+ <td>
+ T
+ </td>
+ <td>
+ T
+ </td>
+ <td>
+ Öffne neuen Reiter (mit aktuellem Dokument)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ TAB_LINK
+ </td>
+ <td>
+ C-t
+ </td>
+ <td>
+ C-t
+ </td>
+ <td>
+ Folge dem aktuellen Hyperlink in einem neuen Reiter
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_TAB
+ </td>
+ <td>
+ }
+ </td>
+ <td>
+ }
+ </td>
+ <td>
+ Schalte zum nächsten Reiter
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREV_TAB
+ </td>
+ <td>
+ {
+ </td>
+ <td>
+ {
+ </td>
+ <td>
+ Schalte zum vorherigen Reiter
+ </td>
+ </tr>
+ <tr>
+ <td>
+ CLOSE_TAB
+ </td>
+ <td>
+ C-q
+ </td>
+ <td>
+ C-q
+ </td>
+ <td>
+ Schließe aktuellen Reiter
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Suchfunktionen</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ SEARCH
+ </td>
+ <td>
+ /
+ </td>
+ <td>
+ /, C-s
+ </td>
+ <td>
+ Suche vorwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SEARCH_BACK
+ </td>
+ <td>
+ ?
+ </td>
+ <td>
+ </td>
+ <td>
+ Suche rückwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+ ISEARCH
+ </td>
+ <td>
+ C-s
+ </td>
+ <td>
+ </td>
+ <td>
+ Inkrementelle Suche vorwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+ ISEARCH_BACK
+ </td>
+ <td>
+ C-r
+ </td>
+ <td>
+ </td>
+ <td>
+ Inkrementelle Suche rückwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SEARCH_NEXT
+ </td>
+ <td>
+ n
+ </td>
+ <td>
+ n
+ </td>
+ <td>
+ Setze Suche vorwärts fort
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SEARCH_PREV
+ </td>
+ <td>
+ N
+ </td>
+ <td>
+ </td>
+ <td>
+ Setze Suche rückwärts fort
+ </td>
+ </tr>
+ <tr>
+ <td>
+ WRAP_TOGGLE
+ </td>
+ <td>
+ C-w
+ </td>
+ <td>
+ w
+ </td>
+ <td>
+ Wechsle zwischen umlaufendem und nicht-umlaufendem Suchen
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Arbeit mit Textmarken</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ MARK
+ </td>
+ <td>
+ C-SPC
+ </td>
+ <td>
+ C-SPC
+ </td>
+ <td>
+ Setze/Lösche Markierung
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREV_MARK
+ </td>
+ <td>
+ M-p
+ </td>
+ <td>
+ P
+ </td>
+ <td>
+ Gehe zur vorherigen Markierung
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_MARK
+ </td>
+ <td>
+ M-n
+ </td>
+ <td>
+ N
+ </td>
+ <td>
+ Gehe zur nächsten Markierung
+ </td>
+ </tr>
+ <tr>
+ <td>
+ REG_MARK
+ </td>
+ <td>
+ "
+ </td>
+ <td>
+ "
+ </td>
+ <td>
+ Markiere alle Vorkommen eines Zeichenmusters
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Verschiedenes</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ COMMAND
+ </td>
+ <td>
+ M-c
+ </td>
+ <td>
+ M-c
+ </td>
+ <td>
+ Rufe eine oder mehrere durch Strichpunkt getrennte w3m-Funktionen auf
+ </td>
+ </tr>
+<!--
+TODO: Where does this key binding M-Fn come from. I do not find a Fn-key on my keyboard. I do not know how to type in the keystroke combinations listed in keymap.default which are
+keymap M-[E MENU
+keymap M-[L MENU
+keymap M-[2~ MENU
+keymap M-[28~ MENU
+<tr>
+<td>MENU</td>
+<Td>M-Fn</Td>
+<td></td>
+<td>Pop up menu</td>
+</tr>
+-->
+ <tr>
+ <td>
+ HELP
+ </td>
+ <td>
+ H
+ </td>
+ <td>
+ H, ?
+ </td>
+ <td>
+ Zeige Hilfe-Übersicht
+ </td>
+ </tr>
+ <tr>
+ <td>
+ OPTIONEN
+ </td>
+ <td>
+ o
+ </td>
+ <td>
+ o
+ </td>
+ <td>
+ Einstellungs-Dialog öffnen
+ </td>
+ </tr>
+<tr>
+<td>SET_OPTION</td>
+<td>M-o</td>
+<td>M-o</td>
+<td>Setze Option</td>
+</tr>
+<tr>
+<td>DEFINE_KEY</td>
+<td>M-k</td>
+<td>M-k</td>
+<td>Definiere eine Verbindung zwischen einer Tastenkombination und einem Kommando</td>
+</tr>
+<tr>
+<td>MOUSE_TOGGLE</td>
+<td>m</td>
+<td>m</td>
+<td>Schalte Mausbedienung an oder ab</td>
+</tr>
+<tr>
+<td>DOWNLOAD_LIST</td>
+<td>D</td>
+<td>D</td>
+<td>Übersicht heruntergeladener Dateien anzeigen</td>
+</tr>
+ <tr>
+ <td>
+ COOKIE
+ </td>
+ <td>
+ C-k
+ </td>
+ <td>
+ C-k
+ </td>
+ <td>
+ Zeige die gespeicherten Cookies
+ </td>
+ </tr>
+<!--
+mh 2016-06-12 Interrupt is an alias to SUSPEND, no need to mention it here
+ <tr>
+ <td>
+ INTERRUPT
+ </td>
+ <td>
+ C-c
+ </td>
+ <td>
+ C-c
+ </td>
+ <td>
+ Interrupt
+ </td>
+ </tr>
+-->
+<tr>
+<td>UNDO</td>
+<td>(</td>
+<td>(</td>
+<td>Nimm die letzte Cursorbewegung zurück</td>
+</tr>
+<tr>
+<td>REDO</td>
+<td>)</td>
+<td>)</td>
+<td>Den letzten Rücknahmebefehl zurücknehmen</td>
+</tr>
+ <tr>
+ <!-- is an alias of SHELL --><td>
+ EXEC_SHELL
+ </td>
+ <td>
+ !
+ </td>
+ <td>
+ !
+ </td>
+ <td>
+ Shell-Befehl ausführen
+ </td>
+ </tr>
+<tr>
+<td>DICT_WORD</td>
+<td>M-w</td>
+<td>M-w</td>
+<td>Führe eine Wörterbuch-Funktion aus (siehe <a href="../doc/README.dict">README.dict</a>)</td>
+</tr>
+<tr>
+<td>DICT_WORD_AT</td>
+<td>M-W</td>
+<td>M-W</td>
+<td>Benutze Wörterbuch für Wort unter Cursor</td>
+</tr>
+<tr>
+<td>VERSION</td>
+<td>r</td>
+<td>r</td>
+<td>Zeige die Version von w3m an</td>
+</tr>
+ <tr>
+ <td>
+ SUSPEND
+ </td>
+ <td>
+ C-z
+ </td>
+ <td>
+ C-z
+ </td>
+ <td>
+ w3m zum Hintergrundprozess machen. (Wird mit dem Shell-Befehl <span class="mono">fg</span> zurückgenommen.)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ QUIT
+ </td>
+ <td>
+ q
+ </td>
+ <td>
+ q
+ </td>
+ <td>
+ Mit Bestätigungsfrage beenden
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EXIT
+ </td>
+ <td>
+ Q
+ </td>
+ <td>
+ Q
+ </td>
+ <td>
+ Sofort beenden
+ </td>
+ </tr>
+ </table>
+
+ <p>
+ Darüber hinaus gibt es die folgenden Bedien-Modi mit fester Tastaturbelegung für die entsprechenden Funktionen. Diese sind nicht durch die Funktion DEFINE_KEY oder Einträge der keymap-Datei veränderbar.
+ </p>
+
+ <table border="1" width="100%">
+ <colgroup>
+ <col width="20%">
+ <col width="40%">
+ <col width="40%">
+ </colgroup>
+ <tr>
+ <th>
+ Funktion<br>(interner Name)
+ </th>
+ <th>Tastenkombination
+ </th>
+ <th>
+ Beschreibung
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <h3>Menü-Auswahl-Modus</h3>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ BUF:NEXT</td>
+ <td>
+ j, C-n, DOWN
+ </td>
+ <td>
+ Nächster Eintrag
+ </td>
+ </tr>
+ <tr>
+ <td>BUF:PREV
+ </td>
+ <td>
+ k, C-p, UP
+ </td>
+ <td>
+ Vorheriger Eintrag
+ </td>
+ </tr>
+ <tr>
+ <td>
+ BUF:DELETE</td>
+ <td>
+ D
+ </td>
+ <td>
+ Lösche Eintrag
+ </td>
+ </tr>
+ <tr>
+ <td>
+ BUF:GO
+ </td>
+ <td>
+ SPC, RET, RIGHT
+ </td>
+ <td>
+ Wähle Eintrag aus
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="3">
+ <h3>Popup-Menü-Modus</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+MENU:SELECT
+ </td>
+ <td>
+ SPC, RET, RIGHT</td>
+ <td>
+ Wähle Punkt aus
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:CLOSE
+ </td>
+ <td>C-c
+ </td>
+ <td>
+ Schließe Menü
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:CANCEL
+ </td>
+ <td>
+ LEFT, BKSPC, C-h</td>
+ <td>
+ Einen Auswahlschritt zurück
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:DOWN
+ </td>
+ <td>j, C-n, DOWN
+ </td>
+ <td>
+ Gehe zum nächsten Punkt
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:UP
+ </td>
+ <td>
+ k, C-p, UP</td>
+ <td>
+ Gehe zum vorherigen Punkt
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:LINE_UP
+ </td>
+ <td>K
+ </td>
+ <td>
+ Scrolle einen Punkt aufwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:LINE_DOWN
+ </td>
+ <td>J
+ </td>
+ <td>
+ Scrolle einen Punkt abwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:TOP
+ </td>
+ <td>C-a
+ </td>
+ <td>
+ Gehe zum ersten Punkt
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:LAST
+ </td>
+ <td>C-e
+ </td>
+ <td>
+ Gehe zum letzten Punkt
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:NEXT
+ </td>
+ <td>C-v, C-f
+ </td>
+ <td>Gehe zur nächsten Seite
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:PREV
+ </td>
+ <td>ESC v, C-b
+ </td>
+ <td>
+ Gehe zur vorherigen Seite
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:SEARCH_FORE
+ </td>
+ <td>C-s, /
+ </td>
+ <td>
+ Suche vorwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:SEARCH_BACK
+ </td>
+ <td>
+ C-r, ?</td>
+ <td>
+ Suche rückwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:SEARCH_NEXT
+ </td>
+ <td>
+ n</td>
+ <td>
+ Suche weitere Übereinstimmung</td>
+ </tr>
+ <tr>
+ <td>
+MENU:SEARCH_PREV
+ </td>
+ <td>
+ N</td>
+ <td>
+ Suche frühere Übereinstimmung</td>
+ </tr>
+<!--mh 2016-06-12 Pressing C-z in menu mode (with menu active) has the same effect as in normal operation of w3m: Browser gets in the background
+ <tr>
+ <td>
+MENU:SUSPEND
+ </td>
+ <td>
+ C-z</td>
+ <td>
+ Suspend</td>
+ </tr>
+-->
+<!-- </table>-->
+ <tr>
+ <td colspan="3">
+ <h3>Eingabezeile-Bearbeitungs-Modus</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ LINEEDIT:FORWARD
+ </td>
+ <td width="100">
+ C-f, RIGHT
+ </td>
+ <td>
+ Bewege Cursor vorwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:BACK
+ </td>
+ <td>
+ C-b, LEFT
+ </td>
+ <td>
+ Bewege Cursor rückwärts
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:BS
+ </td>
+ <td>
+ C-h, BKSPC
+ </td>
+ <td>
+ Vorheriges Zeichen löschen
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:DEL
+ </td>
+ <td>
+ C-d
+ </td>
+ <td>
+ Aktuelles Zeichen löschen
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:KILL_AFTER
+ </td>
+ <td>
+ C-k
+ </td>
+ <td>
+ Lösche alles nach dem Cursor
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:KILL_BEFORE
+ </td>
+ <td>
+ C-u
+ </td>
+ <td>
+ Lösche alles vor dem Cursor
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:TOP
+ </td>
+ <td>
+ C-a
+ </td>
+ <td>
+ Gehe zum Zeilenanfang
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:BOTTOM
+ </td>
+ <td>
+ C-e
+ </td>
+ <td>
+ Gehe zum Zeilenende
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:PREV
+ </td>
+ <td>
+ C-p, UP
+ </td>
+ <td>
+ Hole den vorherigen Chronik-Eintrag
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:NEXT
+ </td>
+ <td>
+ C-n, DOWN
+ </td>
+ <td>
+ Hole den nächsten Chronik-Eintrag
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:COMPLETE
+ </td>
+ <td>
+ TAB, SPC
+ </td>
+ <td>
+ Versuche, den Dateinamen zu komplettieren
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:EDITOR
+ </td>
+ <td>
+ C-o
+ </td>
+ <td>
+ Bearbeite mit externem Editor
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:ACCEPT
+ </td>
+ <td>
+ RET
+ </td>
+ <td>
+ Eingabezeile übernehmen
+ </td>
+ </tr>
+ </table>
+<!-- mh 2016-06-12 As it suffices to use the provided keymap file for Lynx-like keybindings and this file is listed in section FILES of man w3m (1), the following hint for getting w3m with Lynx-like key bindings has been deleted.
+ <p>
+ If w3m was compiled with <q>Lynx-like key bindings</q>, you can use
+ the following key bindings.
+ </p>
+-->
+<!-- mh 2016-06-12 Remark is obsolete as the two sets key binding are presented along within tables
+ <hr>
+ <h2 id="Key:lynx">
+ <p>
+ The Lynx-like configuration leaves keymappings unchanged in the
+ menu-selection and line-editing modes.
+ </p>
+ </h2>
+-->
+ <hr>
+ <h2 id="Mouse">
+ Bedienung per Maus
+ </h2>
+ <p>
+ Wenn w3m mit Mausfunktionen kompiliert wurde und Sie das Programm entweder in einer Konsole mit GPM oder in einem X-Terminal-Emulator starten, ist ein Navigieren mit der Maus möglich. (Im Falle von rxvt müssen Sie die Umgebungsvariable TERM mit <q>xterm</q> oder <q>kxterm</q> belegen.)
+ </p>
+ <p>Die Datei <a href="README.mouse">README.mouse</a> erklärt, wie die Bedienung per Maus an eigene Vorlieben angepasst werden kann.
+ </p>
+ <table border="1">
+ <colgroup>
+ <col width="20%">
+ <col width="80%">
+ </colgroup>
+ <tr>
+ <th>Handlung
+ </th>
+ <th>Beschreibung
+ </th>
+ </tr>
+ <tr>
+ <td>
+ Linksklick
+ </td>
+ <td>
+<b>Zuerst:</b><br> Der Cursor wird an die Mauszeigerposition versetzt.<br> <b>Dann:</b><br> Dem Hyperlink, auf dem der Cursor momentan steht und auf den sich der Mauszeiger richtet, wird gefolgt.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Mittelklick
+ </td>
+ <td>
+ Zurück zum vorherigen Puffer.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Rechtsklick
+ </td>
+ <td>
+ Öffne Menü. Sie können Menüpunkte durch Anklicken auswählen.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Linksziehen
+ </td>
+ <td>
+ Dokument scrollen. Standardmäßig wird das Dokument im Fenster verschoben. Ein Verschieben des Fensters über dem stehenden Dokument erreichen Sie über den Einstellungs-Dialog.
+ </td>
+ </tr>
+ </table>
+ <hr>
+ <h2 id="LocalCGI">
+ Lokale CGI-Skripte
+ </h2>
+ <p>
+ w3m ist in der Lage, CGI-Skripte direkt laufen zu lassen. Dies bedeutet, dass sich das Programm wie ein HTTP-Server verhält und das CGI-Skript ausführt und dessen Ausgabe anzeigt. Beispielsweise wurden die Lesezeichen-Registrierung und der Verzeichnis-Browser als lokale CGI-Skripte programmiert. Darüber hinaus kann w3m durch solche Skripte als Schnittstelle zum Einholen von Daten aller Art fungieren.
+ </p>
+ <p>
+ Aus Sicherheitsgründen kommen für von w3m benutzte CGI-Skripte nur folgende Verzeichnisse in Frage:
+ </p>
+ <ul>
+ <li>
+ Das Verzeichnis, in dem w3m-bezogene Dateien abgelegt sind (typischerweise /usr/local/lib/w3m). Auf dieses Verzeichnis kann mit der Variblen $LIB referenziert werden.
+ </li>
+ <li>
+ Das Verzeichnis /cgi-bin/. Sie können /cgi-bin/ im Feld <q>Verzeichnis für ausführbare Skripte</q> des Einstellungs-Dialogs jedem gewünschten Verzeichnis zuordnen. Mehrere Pfade lassen sich durch Doppelpunkt getrennt angeben, also in der Form <span class="mono">/usr/local/cgi-bin:/home/aito/cgi-bin</span>. Es wird davon abgeraten, das aktuelle Verzeichnis hier mitaufzunehmen. Zum Zugriff auf Skripte im Verzeichnis /cgi-bin/ erwartet w3m eine URL folgender Art:
+ </li>
+<pre>
+ w3m -o cgi_bin=/path/to/cgi-bin file:/cgi-bin/script.cgi
+</pre>
+ </ul>
+ <p>
+ Das CGI-Skript kann zur Steuerung von w3m die spezielle Kopfzeile <span class="mono">w3m-control:</span> enthalten. Darin können alle Funkionen (siehe <a href="README.func">README.func</a>) eingetragen sein. Die angegebene Funktion wird aufgerufen, nachdem das Dokument angezeigt wird. Beispielsweise, wird eine Skriptausgabe
+ </p>
+<pre>
+Content-Type: text/plain<br>W3m-control: BACK
+</pre>
+ <p>
+ eine leere Seite anzeigen und den Puffer sofort löschen. Dies ist nützlich, wenn es nicht gewünscht ist, die Seite nach Aufrufen des Skriptes anzuzeigen. Das nächste Beispiel
+ </p>
+<pre>
+Content-Type: text/plain<br>W3m-control: DELETE_PREVBUF contents.....
+</pre>
+ <p>
+ führt zum Übergehen des aktuellen Puffers.
+ </p>
+ <p>
+ Jede <span class="mono">w3m-control</span>-Kopfzeile kann nur eine Funktion aufrufen. Jedoch können Sie im Kopfteil einer HTTP-Kommunikation mehr als eine <span class="mono">w3m-control</span>-Anweisung hinterlegen. Überdies ist es möglich, die GOTO-Funktion mit einem Argument aufzurufen:
+ </p>
+<pre>
+Content-Type: text/plain<br>W3m-control: GOTO http://www.example.org/
+</pre>
+ <p>
+ Sie bewirken damit das gleiche wie mit der Anweisung <q>Location:</q> im Kopfteil:
+ </p>
+<pre>
+Content-Type: text/plain<br>Location: http://www.example.org/
+</pre>
+ <p>
+ Beachten Sie, dass diese Anweisung wirkungslos ist, wenn das CGI-Skript durch einen HTTP-Server angesprochen wird.
+ </p>
+ </body>
+</html>
diff --git a/doc-de/README.func b/doc-de/README.func
new file mode 100644
index 0000000..72d7d45
--- /dev/null
+++ b/doc-de/README.func
@@ -0,0 +1,146 @@
+ABORT Sofort beenden
+ACCESSKEY Öffne Zugangstasten-Menü
+ADD_BOOKMARK Lege für aktuelle Seite Lesezeichen an
+ALARM Alarm einrichten
+BACK Schließe aktuellen Puffer und kehre zu dem im Stapel darunterliegenden zurück
+BEGIN Gehe zur ersten Zeile
+BOOKMARK Lesezeichen ansehen
+CENTER_H Um Cursor herum horizontal zentrieren
+CENTER_V Um Cursor herum vertikal zentrieren
+CHARSET Ändere die Zeichenkodierung für das aktuelle Dokument
+CLOSE_TAB Schließe Reiter
+CLOSE_TAB_MOUSE Schließe Reiter bei Mauszeiger
+COMMAND Rufe w3m Funktion(en) auf
+COOKIE Cookie-Liste ansehen
+DEFAULT_CHARSET Ändere die Voreinstellung für die Zeichenkodierung
+DEFINE_KEY Definiere eine Verbindung zwischen einer Tastenkombination und einem Kommando
+DELETE_PREVBUF Lösche vorherigen Puffer (hauptsächlich für lokale CGI-Skripte)
+DICT_WORD Führe eine Wörterbuch-Funktion aus (siehe README.dict)
+DICT_WORD_AT Benutze Wörterbuch für Wort unter Cursor
+DISPLAY_IMAGE Starte das Laden und die Erstellung von Bildern erneut
+DOWN Scrolle den Anzeigebereich eine Zeile abwärts
+DOWNLOAD Dokument-Quellcode speichern
+DOWNLOAD_LIST Die Übersicht heruntergeladener Dateien zeigen
+EDIT Bearbeite lokales Quelldokument
+EDIT_SCREEN Bearbeite eine Kopie des verarbeiteten Dokuments
+END Gehe zur letzten Zeile
+EXEC_SHELL Führe Shell-Befehl aus und zeige Ausgabe an
+EXIT Sofort beenden
+EXTERN Verwende externen Browser zur Anzeige
+EXTERN_LINK Verwende externen Browser zur Anzeige des Linkziels
+FRAME Wechsle zwischen Kennung und Umsetzung von HTML-Frames
+GOTO Öffne angegebenes Dokument in neuem Puffer
+GOTO_LINE Gehe zur angebenen Zeile
+GOTO_LINK Folge dem aktuellen Hyperlink in neuem Puffer
+GOTO_RELATIVE Gehe zu relativer Adresse
+HELP Zeige Hilfe-Übersicht
+HISTORY Chronik aufgesuchter Dokumente
+INFO Zeige Informationen über dieses Dokument
+INTERRUPT w3m zum Hintergrundprozess machen
+ISEARCH Inkrementelle Suche vorwärts
+ISEARCH_BACK Inkrementelle Suche rückwärts
+LEFT Anzeigebereich um eine Spalte nach links verschieben
+LINE_BEGIN Gehe zum Zeilenanfang
+LINE_END Gehe zum Zeilenende
+LINE_INFO Zeige aktuelle Position im Dokument an
+LINK_BEGIN Gehe zum ersten Hyperlink
+LINK_END Gehe zum letzten Hyperlink
+LINK_MENU Öffne Menü mit den Link-Elementen
+LIST Zeige alle referenzierten URLs
+LIST_MENU Öffne Menü mit aufsuchbaren Hyperlinks
+LOAD Öffne lokale Datei in einem neuen Puffer
+MAIN_MENU Öffne Menü
+MARK Setze/Lösche Markierung
+MARK_MID Wandle Nachrichten-ID-artige Zeichenketten um in Hyperlinks
+MARK_URL Wandle URL-artige Zeichenketten um in Hyperlinks
+MARK_WORD Wandle aktuelles Wort in Hyperlink um
+MENU Öffne Menü
+MENU_MOUSE Öffne Menü beim Mauszeiger
+MOUSE_TOGGLE Schalte Mausbedienung an oder ab
+MOVE_DOWN Cursor abwärts
+MOVE_DOWN1 Cursor abwärts; am Rand gleitend bewegen
+MOVE_LEFT Cursor nach links
+MOVE_LEFT1 Cursor nach links; am Rand gleitend bewegen
+MOVE_LIST_MENU Öffne Menü mit vorhandenen Hyperlinks
+MOVE_MOUSE Cursor auf Mauszeigerposition setzen
+MOVE_RIGHT Cursor nach rechts
+MOVE_RIGHT1 Cursor nach rechts; am Rand gleitend bewegen
+MOVE_UP Cursor aufwärts
+MOVE_UP1 Cursor aufwärts; am Rand gleitend bewegen
+MSGS Zeige Fehlermeldungen an
+NEW_TAB Öffne neuen Reiter (mit aktuellem Dokument)
+NEXT Schalte zum nächsten Puffer
+NEXT_DOWN Gehe abwärts zum nächsten Hyperlink
+NEXT_HALF_PAGE Scrolle eine halbe Seite abwärts
+NEXT_LEFT Gehe zum nächsten Hyperlink links
+NEXT_LEFT_UP Gehe zum nächsten Hyperlink links oder oberhalb
+NEXT_LINK Gehe zum nächsten Hyperlink
+NEXT_MARK Gehe zur nächsten Markierung
+NEXT_PAGE Eine Seite abwärts
+NEXT_RIGHT Gehe zum nächsten Hyperlink rechts
+NEXT_RIGHT_DOWN Gehe zum nächsten Hyperlink rechts oder unterhalb
+NEXT_TAB Schalte zum nächsten Reiter
+NEXT_UP Gehe zum nächsten Hyperlink oberhalb
+NEXT_VISITED Gehe zum nächsten besuchten Hyperlink
+NEXT_WORD Gehe zum nächsten Wort
+NOTHING Tue nichts
+NULL Tue nichts
+OPTIONS Zeige Einstellungen für Änderungen
+PEEK Zeige aktuelle Adresse an
+PEEK_IMG Zeige Adresse des Bildes
+PEEK_LINK Zeige Zieladresse
+PIPE_BUF Leite aktuellen Pufferinhalt einem Shell-Befehl zu und zeige Ausgabe an
+PIPE_SHELL Führe Shell-Befehl aus und zeige Ausgabe an
+PREV Schalte zum vorherigen Puffer
+PREV_HALF_PAGE Scrolle eine halbe Seite aufwärts
+PREV_LINK Gehe zum vorangegangen Hyperlink
+PREV_MARK Gehe zur vorherigen Markierung
+PREV_PAGE Eine Seite aufwärts
+PREV_TAB Schalte zum vorherigen Reiter
+PREV_VISITED Gehe zum vorherigen besuchten Hyperlink
+PREV_WORD Gehe zum vorherigen Wort
+PRINT Speichere verarbeitetes Dokument
+QUIT Mit Bestätigungsfrage beenden
+READ_SHELL Führe Shell-Befehl aus und zeige Ausgabe an
+REDO Den letzten Rücknahmebefehl zurücknehmen
+REDRAW Bildschirmanzeige neu aufbauen
+REG_MARK Zu einem Muster passenden Zeichenfolgen überall markieren
+REINIT Konfigurationsdatei erneut laden
+RELOAD Aktuelles Dokument erneut laden
+RESHAPE Dokument nochmals verarbeiten
+RIGHT Anzeigebereich um eine Spalte nach rechts verschieben
+SAVE Dokument-Quellcode speichern
+SAVE_IMAGE Speichere Bild
+SAVE_LINK Speichere Ziel des Hyperlinks
+SAVE_SCREEN Speichere verarbeitetes Dokument
+SEARCH Suche vorwärts
+SEARCH_BACK Suche rückwärts
+SEARCH_FORE Suche vorwärts
+SEARCH_NEXT Setze Suche vorwärts fort
+SEARCH_PREV Setze Suche rückwärts fort
+SELECT Zeige Puffferstapel-Übersicht
+SELECT_MENU Öffne Puffferstapel-Menü
+SETENV Setze Umgebungsvariable
+SET_OPTION Setze Option
+SHELL Führe Shell-Befehl aus und zeige Ausgabe an
+SHIFT_LEFT Anzeigebereich nach links versetzen
+SHIFT_RIGHT Anzeigebereich nach rechts versetzen
+SOURCE Wechsle zwischen HTML-Wiedergabe und -Verarbeitung
+STOP_IMAGE Bilder nicht mehr laden und anzeigen
+SUBMIT Formular übermitteln
+SUSPEND w3m zum Hintergrundprozess machen
+TAB_GOTO Öffne das angegebene Dokument in einem neuen Reiter
+TAB_GOTO_RELATIVE Öffne relative Adresse in einem neuen Reiter
+TAB_LEFT Einen Reiter weiter nach links gehen
+TAB_LINK Folge dem aktuellen Hyperlink in einem neuen Reiter
+TAB_MENU Öffne das Reiter-Auswahl-Menü
+TAB_MOUSE Wähle per Maus Reiter aus
+TAB_RIGHT Einen Reiter weiter nach rechts gehen
+UNDO Nimm die letzte Cursorbewegung zurück
+UP Scrolle den Anzeigebereich eine Zeile aufwärts
+VERSION Zeige die Version von w3m an
+VIEW Wechsle zwischen HTML-Wiedergabe und -Verarbeitung
+VIEW_BOOKMARK Lesezeichen ansehen
+VIEW_IMAGE Zeige Bild in Betrachter
+WHEREIS Suche vorwärts
+WRAP_TOGGLE Wechsle zwischen umlaufendem und nicht-umlaufendem Suchen
diff --git a/doc-de/w3m.1 b/doc-de/w3m.1
new file mode 100644
index 0000000..7deb203
--- /dev/null
+++ b/doc-de/w3m.1
@@ -0,0 +1,334 @@
+.nr N -1
+.nr D 5
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH W3M 1 2016\-08\-06 "w3m 0.5.3"
+.SH NAME
+w3m \- Ein auf Texte ausgerichtetes Programme zur Anzeige von Dateien und
+Datenströmen sowie zum Browsen im Internet
+.SH SYNOPSIS
+w3m [OPTION]... [ \fIDatei\fP | \fIURL\fP ]...
+.SH BESCHREIBUNG
+.\" This defines appropriate quote strings for nroff and troff
+.ds lq "
+.ds rq "
+.if t .ds lq ``
+.if t .ds rq ''
+.if \nN==0 .nr N 10
+.\" Just in case these number registers aren't set yet...
+.if \nD==0 .nr D 5
+
+\fIw3m\fP ist ein textorientierter Browser, der lokale oder im Internet
+liegende Seiten sowie andere Dokumente anzeigen kann. Er verarbeitet
+HTML\-Tabellen und Frames, nicht jedoch JavaScript und Cascading Style
+Sheets. \fIw3m\fP kann auch als Textbetrachter (Pager) dienen. Entsprechende
+Dateien werden beim Aufruf als Argument angegeben oder an der
+Standardeingabe als Datenstrom übernommen. Mit \fIw3m\fP kann sich der Benutzer
+überdies durch Verzeichnisbäume bewegen.
+
+\fIw3m\fP arbeitet mit Reitern (Registerkarten, Tabs) und Puffern, was einen
+einfachen Wechsel zwischen geladenen Inhalten erlaubt. Wenn die Erweiterung
+w3m\-img installiert ist, zeigt \fIw3m\fP auch in die Seiten eingebundene
+Grafiken an. Wann immer die Umsetzung von HTML\-Inhalten durch \fIw3m\fP Ihren
+Ansprüchen nicht genügt, reicht ein einzelnes Kommando, um die Ziel\-URL
+einem grafischen Browser zu übergeben.
+
+Um nach Start des Programms Hilfe zu den Optionen zu erhalten, drücken Sie
+\(lqH\(rq.
+
+.SH ARGUMENTE
+
+Wenn das Programm mit einem oder mehreren Argumenten aufgerufen wird,
+behandelt \fIw3m\fP diese Ziele je nach Typ des Inhalts. Bei Daten aus dem
+Internet verwertet \fIw3m\fP die Angabe in den HTTP\-Kopfzeilen. Bei relativen
+oder absoluten Pfaden in Dateisystemen richtet sich \fIw3m\fP nach dem
+Dateinamen.
+
+Ohne Argument aufgerufen, erwartet \fIw3m\fP unformatierte Daten aus der
+Standardeingabe, es sei denn, der Benutzer hat einen anderen MIME\-Typ
+angegeben.
+
+Sollte \fIw3m\fP weder ein Zielobjekt vorliegen noch ein Ausweichen vorgesehen
+sein (beispielsweise durch die Option \fB\-v\fP, siehe unten), gibt das Programm
+nur Benutzungshinweise aus.
+.SH OPTIONEN
+Vor Befehlszeilen\-Optionen steht das \(lq\-\(rq Zeichen einzeln, ihnen kann
+ein Argument folgen.
+.SS "Allgemeine Optionen"
+.TP
+\fB\-B\fP
+starte mit einer Ansicht aller Lesezeichen (wenn kein anderes Zielobjekt
+angegeben ist)
+.TP
+\fB\-M\fP
+monochrome Anzeige
+.TP
+\fB\-no\-mouse\fP
+Mausfunktion aus
+.TP
+\fB\-num\fP
+zeige Zeilennummern an
+.TP
+\fB\-N\fP
+verteile die übergebenen Argumente unter Reitern. Standardmäßig würde ein
+Stapel von Puffern benutzt
+.TP
+\fB\-ppc \fP\fInum\fP
+Weite von \fInum\fP Bildpunkten pro Zeichen, einstellbar von 4.0 bis 32.0,
+standardmäßig 8.0. Größere Werte machen Tabellen enger. (Implementierung
+unklar)
+.TP
+\fB\-ppl \fP\fInum\fP
+Höhe von \fInum\fP Bildpunkten pro Linie, einstellbar von 4.0 bis
+64.0. (Implementierung unklar)
+.TP
+\fB\-title\fP, \fB\-title=TERM\fP
+verwende den Puffernamen auch als Titel des Terminalfensters. Soweit TERM
+eingegeben wurde, konfiguriert dieser Wert den Stil des Titels
+.TP
+\fB\-v\fP
+begrüße den Benutzer mit einer eingebauten Seite (wenn kein anderes
+Zielobjekt angegeben ist)
+.TP
+\fB\-W\fP
+wechsle zwischen umlaufendem und nicht umlaufendem Suchen
+.TP
+\fB\-X\fP
+initialisiere nach Verlassen des Programms das Terminal nicht neu
+.TP
+\fB+\fP\fIZahl\fP
+gehe zu Zeile \fIZahl\fP; wirkt nur, wenn \fIZahl\fP größer ist als die im
+Terminal verfügbare Zeilenzahl
+.SS Browser\-Optionen
+.TP
+\fB\-cols \fP\fInum\fP
+bei für die Standardausgabe bestimmten Inhalten, nimm bei der Umsetzung von
+HTML eine Länge von \fInum\fP Zeichen pro Zeile
+.TP
+\fB\-cookie\fP, \fB\-no\-cookie\fP
+verwende gespeicherte Cookies und akzeptiere neue. Oder tue weder das eine
+noch das andere
+.TP
+\fB\-F\fP
+verarbeite Frames
+.TP
+\fB\-graph\fP, \fB\-no\-graph\fP
+bei der Umsetzung von Tabellen und Frames grafische Zeichen verwenden oder
+nicht verwenden
+.TP
+\fB\-header \fP\fIZeichenkette\fP
+füge \fIZeichenkette\fP der HTTP(S)\-Anfrage an. Diese muss der Kopfdaten\-Syntax
+\f(CWVariable: Wert\fP entsprechen
+.TP
+\fB\-m\fP
+stelle eine Usenet\-Nachricht entsprechend \(lqContent\-type\(rq in den
+Kopfdaten dar
+.TP
+\fB\-no\-proxy\fP
+verwende keinen Proxy
+.TP
+\fB\-post \fP\fIDatei\fP
+verwende die Methode POST, um in \fIDatei\fP hinterlegte Daten
+hochzuladen. Hierbei wird die Syntax \f(CWvar1=wert1[&var2=wert2]…\fP erwartet
+.TP
+\fB\-4\fP
+nur IPv4. Entspricht dns_order=4 in der Konfigurationsdatei
+.TP
+\fB\-6\fP
+nur IPv6. Entspricht dns_order=6 in der Konfigurationsdatei
+.SS Textbetrachter\-Optionen
+.TP
+\fB\-l \fP\fInum\fP
+Anzahl der Zeilen, die zwischengespeichert werden, wenn Text per
+Standardeingabe übergeben wurde. (Voreinstellung ist 10000)
+.TP
+\fB\-r\fP
+verarbeite spezielle Escape\-Zeichen (beispielsweise ANSI\-Escape\-Zeichen oder
+nroff\-Rückwärtsschritte für fette und unterstrichene Zeichen) nicht, sondern
+zeige sie stattdessen mittels Caret\-Notation.
+.TP
+\fB\-s\fP
+mehrere leere Zeilen werden bis auf eine gelöscht
+.TP
+\fB\-t\fP \fInum\fP
+berücksichtige Tab\-Zeichen so, dass Spalten mit einer Weite von \fInum\fP
+Zeichen entstehen
+.SS "Datenart\- und Datenkodierungs\-Optionen"
+.TP
+\fB\-I \fP\fIcharset\fP
+zu benutzende Zeichenkodierung für erhaltene Daten
+.TP
+\fB\-O \fP\fIcharset\fP
+zu benutzende Zeichenkodierung für auszugebende Daten
+.TP
+\fB\-T \fP\fITyp\fP
+zu benutzender MIME\-Typ für erhaltenen Daten
+.SS "Optionen zur Datenausgabe, mit sofortigem Verlassen des Programms"
+.TP
+\fB\-dump\fP
+leite die verarbeitete Seite der Standardausgabe zu. Die Option gilt als
+gesetzt, wenn der Aufruf beinhaltet, dass die Ausgabe in eine Datei
+umgeleitet oder einem weiteren Programm übergeben wird.
+.TP
+\fB\-dump_source\fP
+leite den Seitenquelltext der Standardausgabe zu
+.TP
+\fB\-dump_head\fP
+leite die Antwort einer HEAD\-Anfrage für eine URL der Standardausgabe zu
+.TP
+\fB\-dump_both\fP
+leite Antwort auf HEAD\-Anfrage und Seitenquelltext der Standardausgabe zu
+.TP
+\fB\-dump_extra\fP
+leite Antwort auf HEAD\-Anfrage, Seitenquelltext und Extrainformation der
+Standardausgabe zu
+.TP
+\fB\-help\fP
+zeige eine Zusammenfassung verfügbarer Funktionen und Befehlszeilen\-Optionen
+.TP
+\fB\-show\-option\fP
+zeige alle zur Konfiguration verfügbaren Optionen
+.TP
+\fB\-version\fP
+gibt die Version von \fIw3m\fP aus
+.SS "Optionen, die Standards für Einstellungen und Datenquellen außer Kraft setzen"
+.TP
+\fB\-bookmark \fP\fIDatei\fP
+benutze anstelle der Standarddatei bookmark.html für Lesezeichen die Datei
+\fIDatei\fP
+.TP
+\fB\-config \fP\fIDatei\fP
+benutze \fIDatei\fP anstelle der Standardkonfigurationsdatei
+.TP
+\fB\-debug\fP
+BITTE NICHT BENUTZEN
+.TP
+\fB\-o \fP\fIOption=Wert\fP
+arbeite mit einer Konfiguration, bei der die Einstellung \fIOption\fP mit
+\fIWert\fP belegt ist. Ohne \fIOption=Wert\fP gleichwertig mit \fB\-show\-option\fP
+.TP
+\fB\-reqlog\fP
+Protokolliere Header der HTTP\-Kommunikation in Datei \f(CW~/.w3m/request.log\fP
+.SH BEISPIELE
+.SS "Verwendung als Textbetrachter"
+.TP
+zwei HTML\-Fragmente zusammengefügt anzeigen
+.EX
+$ cat header.html footer.html | w3m \-T text/html
+.EE
+.TP
+zwei Dateien unter Reitern einander gegenüberstellen
+.EX
+$ w3m \-N config.old config
+.EE
+.SS "browser\-artige Verwendung"
+.TP
+zeige Internet\-Inhalt in monochromem Terminal
+.EX
+$ w3m \-M http://w3m.sourceforge.net
+.EE
+.TP
+zeige eingebettete Grafiken an
+.EX
+$ w3m \-o auto_image=TRUE http://w3m.sourceforge.net
+.EE
+.TP
+zeige Inhalt aus dem Usenet
+.EX
+$ w3m \-m nntp://news.aioe.org/comp.os.linux.networking
+.EE
+.TP
+mit der POST\-Methode Daten für eine URL hochladen
+.EX
+$ w3m \-post \- http://example.com/form.php <<<'a=0&b=1'
+.EE
+.SS "filterartige Verwendung"
+.TP
+konvertiere eine HTML\-Datei in reinen Text von bestimmter Zeilenlänge
+.EX
+$ w3m \-cols 40 foo.html > foo.txt
+.EE
+.TP
+übergib den Bestand an Lesezeichen mit zugehörigen Links als reinen Text einer Datei.
+.EX
+$ w3m \-B \-o display_link_number=1 > out.txt
+.EE
+.TP
+Konvertierung in ein anderes Dateiformat und eine andere Zeichenkodierung
+.EX
+$ w3m \-T text/html \-I EUC\-JP \-O UTF\-8 < foo.html > foo.txt
+.EE
+.SS "starte ohne Eingabedaten"
+.TP
+begrüße den Benutzer mit einer eingebauten Seite
+.EX
+$ w3m \-v
+.EE
+.\".SH Errors
+.SH UMGEBUNGSVARIABLEN
+\fIw3m\fP weicht auf den Wert der Umgebungsvariablen WWW_HOME aus, wenn das
+Programm ohne Zielobjekt aufgerufen wurde.
+.SH DATEIEN
+.TP
+\f(CW~/.w3m/bookmark.html\fP
+voreingestellte Datei für Lesezeichen
+.TP
+\f(CW~/.w3m/config\fP
+benutzerdefinierte Konfigurationsdatei; gegenüber \f(CW/etc/w3m/config\fP
+vorrangig
+.TP
+\f(CW~/.w3m/cookie\fP
+Ablageort für Cookies; wird beim Verlassen des Programms geschrieben und
+beim Aufruf gelesen
+.TP
+\f(CW~/.w3m/history\fP
+Chronik besuchter Seiten und URLs
+.TP
+\f(CW~/.w3m/keymap\fP
+benutzerdefinierte Tastaturbelegung, setzt standardmäßige Belegung außer
+Kraft
+.TP
+\f(CW~/.w3m/mailcap\fP
+Konfigurationsdatei für Programme zur externen Anzeige
+.TP
+\f(CW~/.w3m/menu\fP
+benutzerdefiniertes Menü; vorrangig gegenüber Standardmenü
+.TP
+\f(CW~/.w3m/mime.types\fP
+Datei mit MIME\-Typen
+.TP
+\f(CW~/.w3m/mouse\fP
+benutzerdefinierte Mauseinstellungen
+.TP
+\f(CW~/.w3m/passwd\fP
+Datei mit Nutzerkonto\-Passwort\-Liste
+.TP
+\f(CW~/.w3m/pre_form\fP
+.\" .TP
+.\" .I $~/.w3m/urimethodmap
+.\" ???
+enthält vordefinierte Werte für wiederkehrende HTML\-Formulare
+.SH "SIEHE AUCH"
+README und Beispieldateien finden Sie im Dokumentationsverzeichnis Ihrer
+\fIw3m\fP\-Installation. Aktuelle Informationen zu \fIw3m\fP finden Sie auf der
+Projektseite
+.UR http://w3m.sourceforge.net
+unter
+.UE
+.SH DANKSAGUNGEN
+In \fIw3m\fP ist Programmcode verschiedener Quellen eingeflossen. Benutzer
+haben mit Korrekturen (Patch\-Dateien) und Vorschlägen zur Verbesserung des
+Programms beigetragen.
+.SH AUTOR
+.UR aito@fw.ipsj.or.jp
+Akinori ITO
+.UE
+Die deutsche Übersetzung wurde 2016 von
+.UR markus.hiereth@freenet.de
+Markus Hiereth
+.UE
+erstellt.
+
diff --git a/doc-jp/FAQ.html b/doc-jp/FAQ.html
index e16a986..86ef05a 100644
--- a/doc-jp/FAQ.html
+++ b/doc-jp/FAQ.html
@@ -176,7 +176,7 @@ w3m
��¸���ޤ�����������¸������� ESC I �Ǥ���
<p>
<dt>�ץ�����������Ϥɤ�����Ρ�
-<dd>�Ķ��ѿ� HTTP_proxy �����ꤹ�뤫��"o" ���ޥ�ɤΥ��ץ��������ѥͥ�
+<dd>�Ķ��ѿ� HTTP_PROXY, HTTPS_PROXY, GOPHER_PROXY, FTP_PROXY �����ꤹ�뤫��"o" ���ޥ�ɤΥ��ץ��������ѥͥ�
�����ꤷ�ޤ����㤨�� proxy.hogege.com �Ȥ����ۥ��Ȥ� 8000�֥ݡ��Ȥ�
���Ѥ����硤
<p>
diff --git a/doc-jp/MANUAL.html b/doc-jp/MANUAL.html
index 41d70f1..66fdc6e 100644
--- a/doc-jp/MANUAL.html
+++ b/doc-jp/MANUAL.html
@@ -51,15 +51,9 @@ w3m
<dt>-l �Կ�
<dd>ɸ�����Ϥ����Ƥ�ɽ������Ȥ�����¸��������Կ�����ꤹ
�롥�ǥե���Ȥ� 10000��
-<dt>-s
-<dd>Shift_JIS �����ɤ�ɽ�����롥
-<dt>-e
-<dd>EUC �����ɤ�ɽ�����롥
-<dt>-j
-<dd>JIS(ISO-2022-JP) �����ɤ�ɽ�����롥
-<dt>-O e|s|j|N|m|n
+<dt>-O ʸ��������
<dd>ɽ�����Ѥ���ʸ�������ɤ���ꤹ�롥
-<dt>-I e|s
+<dt>-I ʸ��������
<dd>����ʸ���ʸ�������ɤ���ꤹ�롥
<dt>-T ������
<dd>ɽ������ʸ��Υ����פ���ꤹ�롥���λ��꤬�ʤ���硤�ե�����
@@ -89,7 +83,7 @@ HTML
<dd>���顼ɽ���ʤ���
<dt>-F
<dd>�ե졼���ưɽ�����롥
-<dt>-S
+<dt>-s
<dd>Ϣ³������Ԥ�1�ԤˤޤȤ��ɽ�����롥
<dt>-X
<dd>w3m��λ���ˡ������β��̤����ʤ���
@@ -211,9 +205,9 @@ HTMLʸ
<TR><TD>F<TD><FRAMESET>��ޤ�ʸ���ɽ�����Ƥ���Ȥ��ˡ�<FRAME>
�����λؤ�ʣ����ʸ���1�Ĥ�ʸ����Ѵ�����ɽ�����ޤ���
<TR><TD>M<TD>���߸��Ƥ���ڡ��������֥饦����Ȥä�ɽ�����ޤ���
-2M, 3M ��2���ܤ�3���ܤΥ֥饦����Ȥ��ޤ���
+2M, 3M, ..., 9M ��2���ܡ�3���ܡ�9���ܤΥ֥饦����Ȥ��ޤ���
<TR><TD>ESC M<TD>���ߤΥ��������֥饦����Ȥä�ɽ�����ޤ���
-2ESC M, 3ESC M ��2���ܤ�3���ܤΥ֥饦����Ȥ��ޤ���
+2ESC M, 3ESC M, ..., 9ESC M ��2���ܡ�3���ܡ�9���ܤΥ֥饦����Ȥ��ޤ���
</table>
<H3>�ե������URL�ط������</H3>
@@ -349,9 +343,9 @@ Lynx
<TR><TD>F<TD><FRAMESET>��ޤ�ʸ���ɽ�����Ƥ���Ȥ��ˡ�<FRAME>
�����λؤ�ʣ����ʸ���1�Ĥ�ʸ����Ѵ�����ɽ�����ޤ���
<TR><TD>M<TD>���߸��Ƥ���ڡ��������֥饦����Ȥä�ɽ�����ޤ���
-2M, 3M ��2���ܤ�3���ܤΥ֥饦����Ȥ��ޤ���
+2M, 3M, ..., 9M ��2���ܡ�3���ܡ�9���ܤΥ֥饦����Ȥ��ޤ���
<TR><TD>ESC M<TD>���ߤΥ��������֥饦����Ȥä�ɽ�����ޤ���
-2ESC M, 3ESC M ��2���ܤ�3���ܤΥ֥饦����Ȥ��ޤ���
+2ESC M, 3ESC M, ..., 9ESC M ��2���ܡ�3���ܡ�9���ܤΥ֥饦����Ȥ��ޤ���
</table>
<H3>�ե������URL�ط������</H3>
@@ -489,8 +483,7 @@ w3m
w3m��Ȥ��С�HTTP�����Фʤ���CGI������ץȤ�ư���뤳�Ȥ��Ǥ��ޤ���
���ΤȤ���w3m�������ФΤդ�ƥ�����ץȤ�ư�������ν��Ϥ�
�ɤߤ����ɽ������櫓�Ǥ���
-<a href="file:///$LIB/w3mbookmark?mode=panel&bmark=~/.w3m/bookmark.html&url=MANUAL.html&title=w3m+manual">�֥å��ޡ�������Ͽ</a>��
-<a href="file:///$LIB/w3mhelperpanel?mode=panel">�����ӥ塼�����Խ�</a>
+�֥å��ޡ�������Ͽ�ȳ����ӥ塼�����Խ�
�ϡ�local CGI�Υ�����ץȤȤ��Ƽ¸�����Ƥ��ޤ���
local CGI��Ȥ��С�w3m�����ѤΥե��������ϥ��ե������Ȥ���
�Ȥ����Ȥ��Ǥ��ޤ���
diff --git a/doc-jp/README b/doc-jp/README
index 074766f..e5e59b1 100644
--- a/doc-jp/README
+++ b/doc-jp/README
@@ -122,7 +122,6 @@ w3m
��������±�
satodai@w3m.jp
-���ո��������ۤ�ML�ޤǤ�����������
- w3m-dev@sic.med.tohoku.ac.jp (���ܸ�)
- w3m-dev-en@sic.med.tohoku.ac.jp (�Ѹ�)
+���ո��������ۤ���������
http://w3m.sourceforge.net/
+ https://sourceforge.net/projects/w3m/
diff --git a/doc-jp/README.SSL b/doc-jp/README.SSL
index 4aedfde..ac3f4a3 100644
--- a/doc-jp/README.SSL
+++ b/doc-jp/README.SSL
@@ -24,10 +24,10 @@ SSL
�� SSL �˴ؤ��ưʲ������꤬��ǽ�ˤʤäƤޤ�:
ssl_forbid_method
- �Ȥ�ʤ�SSL��åɤΥꥹ��(2: SSLv2, 3: SSLv3, t: TLSv1)
- (�ǥե���Ȥ�<NULL>).
+ �Ȥ�ʤ�SSL��åɤΥꥹ��(2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)
+ (�ǥե���Ȥ�2, 3).
ssl_verify_server ON/OFF
- SSL�Υ�����ǧ�ڤ�Ԥ�(�ǥե���Ȥ�OFF).
+ SSL�Υ�����ǧ�ڤ�Ԥ�(�ǥե���Ȥ�ON).
ssl_cert_file �ե�����̾
SSL�Υ��饤�������PEM����������ե�����(�ǥե���Ȥ�<NULL>).
ssl_key_file �ե�����̾
@@ -85,6 +85,9 @@ SSL
#
# certdata2pem.rb
+if RUBY_VERSION>="1.9"
+ Encoding.default_external="UTF-8"
+end
while line = $stdin.gets
next if line =~ /^#/
next if line =~ /^\s*$/
diff --git a/doc-jp/README.func b/doc-jp/README.func
index 542aaa9..8a5f821 100644
--- a/doc-jp/README.func
+++ b/doc-jp/README.func
@@ -1,7 +1,7 @@
ABORT ��ǧ������w3m��λ���ޤ�
ACCESSKEY Accesskey ��˥塼��Ω���夲�ޤ�
-ALARM ���顼������ꤷ�ޤ�
ADD_BOOKMARK ���߸��Ƥ���ڡ�����֥å��ޡ������ɲä��ޤ�
+ALARM ���顼������ꤷ�ޤ�
BACK ������ΥХåե���ɽ�����ޤ�
BEGIN ʸ��Τ����Ф��ιԤ˰�ư���ޤ�
BOOKMARK �֥å��ޡ������ɤ߹��ߤޤ�
@@ -36,7 +36,6 @@ GOTO_RELATIVE
HELP �إ�ץե������ɽ�����ޤ�
HISTORY URL�����ɽ�����ޤ�
INFO ���ߤ�ʸ��˴ؤ�������ɽ�����ޤ�
-INIT_MAILCAP mailcap ����ɤ߹��ߤ��ޤ�(��� local-CGI ��)
INTERRUPT ʸ����ɤ߹��ߤ����Ǥ��ޤ�
ISEARCH �ե�����������ˤफ�äƥ����륵�������ޤ�
ISEARCH_BACK �ե��������Ƭ�ˤफ�äƥ����륵�������ޤ�
@@ -72,6 +71,7 @@ MSGS
NEW_TAB ���������֤��ޤ�
NEXT ���ΥХåե���ɽ�����ޤ�
NEXT_DOWN ��������β�¦�ˤ����˰�ư���ޤ�
+NEXT_HALF_PAGE Ⱦ�ڡ������˥��������뤷�ޤ�
NEXT_LEFT ��������κ�¦�ˤ����˰�ư���ޤ�
NEXT_LEFT_UP ��������κ�¦(̵��������ι���)�ˤ����˰�ư���ޤ�
NEXT_LINK ���Υ�˰�ư���ޤ�
@@ -92,6 +92,7 @@ PEEK_LINK
PIPE_BUF �Хåե������Ƥ�ѥ��פ��Ϥ��ޤ�
PIPE_SHELL ���ޥ�ɤ�¹Ԥ�����̤��ɤߤ��ߤʤ���ɽ�����ޤ�
PREV ���ΥХåե���ɽ�����ޤ�
+PREV_HALF_PAGE Ⱦ�ڡ�����˥��������뤷�ޤ�
PREV_LINK ���Υ�˰�ư���ޤ�
PREV_MARK ������Υޡ����˰�ư���ޤ�
PREV_PAGE ���Υڡ�����ɽ�����ޤ�
diff --git a/doc-jp/README.siteconf b/doc-jp/README.siteconf
new file mode 100644
index 0000000..90066f7
--- /dev/null
+++ b/doc-jp/README.siteconf
@@ -0,0 +1,60 @@
+siteconf: �������̥������ޥ���
+
+siteconf �ϡ� URL �Υѥ�����ȡ������ɳ�դ���줿���꤫������ޤ���
+siteconf ��Ȥ��ȡ����������ʸ�������ɤ���ꤷ�� "decode_url"
+�ν��Ϥ���������ꡢ Google �Υ�����쥯������ǽ��
+�ץ饤�Х�������夵�����ꤹ�뤳�Ȥ��Ǥ��ޤ���
+
+�ǥե���ȤǤ� siteconf �� ~/.w3m/siteconf �����ɤ߹��ޤ�ޤ���
+
+===== ��ʸ =====
+
+url <url>|/<re-url>/|m@<re-url>@i [exact]
+substitute_url "<destination-url>"
+url_charset <charset>
+no_referer_from on|off
+no_referer_to on|off
+
+��������˽줿��Τ�ͥ�褵��ޤ���
+
+===== �� =====
+
+url "https://twitter.com/"
+substitute_url "https://mobile.twitter.com/"
+
+twitter.com ���Х��륵���Ȥ�ž�����ޤ���
+
+url "http://your.bookmark.net/"
+no_referer_from on
+
+your.bookmark.net ����ĥ�ä����é��ݤˡ� HTTP referer ��
+����ʤ��褦�ˤ��ޤ���
+
+url "http://www.google.com/url?" exact
+substitute_url "file:///cgi-bin/your-redirector.cgi?"
+
+Google �Υ�����쥯���� local CGI ��ž�����ޤ���
+
+url /^http:\/\/[a-z]*\.wikipedia\.org\//
+url_charset utf-8
+
+Ʊ���� "decode_url" ���ץ�����ˤ���ȡ� Wikipedia �ؤ�
+��� UTF-8 �Ȥ��ƥǥ����ɤ���ɽ�����ޤ���
+
+===== ����ɽ���ˤĤ��� =====
+
+��������ɽ���Ϥ������Ʊ����̣��ɽ���ޤ���
+
+/http:\/\/www\.example\.com\//
+m/http:\/\/www\.example\.com\//
+m@http://www\.example\.com/@
+m!http://www\.example\.com/!
+
+�Ǹ�� 'i' �����Ҥ��դ���ȡ���ʸ����ʸ������̤����˾ȹ��Ԥ��ޤ���
+�㤨�С� m@^http://www\.example\.com/abc/@i �ϰʲ��Τ�����Ȥ���פ��ޤ���
+
+http://www.example.com/abc/
+http://www.example.com/Abc/
+http://www.example.com/ABC/
+
+���������ۥ���̾����ʬ�Ͼ�˾�ʸ�����Ѵ����Ƥ�����Ӥ��ޤ���
diff --git a/doc-jp/README.tab b/doc-jp/README.tab
index 61f7c58..99a1220 100644
--- a/doc-jp/README.tab
+++ b/doc-jp/README.tab
@@ -38,6 +38,6 @@ w3m $B$r%?%V%V%i%&%62=(B
open_tab_blank $B!D(B target $B$,(B _blank $B$+(B _new $B$N>l9g$O?7$7$$%?%V$G3+$/(B
$B%G%U%)%k%H$O(B OFF
close_tab_back $B!D(B $BLa$k;~$K%P%C%U%!$,:G8e$J$i%?%V$rJD$8$k(B
- $B%G%U%)%k%H$O(B OFF (= Can't back...)
+ $B%G%U%)%k%H$O(B OFF (= Can't go back...)
$B$rDI2C$7$F$$$^$9!#(B
diff --git a/doc-jp/keymap.lynx b/doc-jp/keymap.lynx
index 869c716..e4085c8 100644
--- a/doc-jp/keymap.lynx
+++ b/doc-jp/keymap.lynx
@@ -46,7 +46,7 @@ keymap - PREV_PAGE
keymap . RIGHT
keymap / SEARCH
keymap : MARK_URL
-keymap ; MARK_WORD
+keymap ";" MARK_WORD
keymap < SHIFT_LEFT
keymap = INFO
keymap > SHIFT_RIGHT
diff --git a/doc-jp/w3m.1 b/doc-jp/w3m.1
index 89aacb6..a54e078 100644
--- a/doc-jp/w3m.1
+++ b/doc-jp/w3m.1
@@ -1,5 +1,5 @@
.\"
-.TH W3M 1 "Jun 6 2000" "UNIX"
+.TH W3M 1 "2016-04-02" "w3m 0.5.3"
.SH NAME
.B w3m
\- text base pager/WWW browser
@@ -39,19 +39,10 @@ text/plain
ɸ�����Ϥ����Ƥ�ɽ������Ȥ�����¸��������Կ�����ꤹ�롥
�ǥե���Ȥ�10000��
.TP
-.B \-s
-Shift_JIS�����ɤ�ɽ�����롥
-.TP
-.B \-e
-EUC�����ɤ�ɽ�����롥
-.TP
-.B \-j
-JIS (ISO-2022-JP)�����ɤ�ɽ�����롥
-.TP
-.BI \-O\ e|s|j|N|m
+.BI \-O\ ʸ��������
ɽ���˻Ȥ�ʸ�������ɤ���ꤹ��.
.TP
-.BI \-I\ e|s
+.BI \-I\ ʸ��������
����ʸ���ʸ�������ɤ���ꤹ�롥
.TP
.BI \-T\ ������
@@ -90,7 +81,7 @@ Bookmark
.B \-F
�ե졼���ưɽ�����롥
.TP
-.B \-S
+.B \-s
Ϣ³������Ԥ�1�ԤˤޤȤ��ɽ�����롥
.TP
.B \-X
@@ -327,13 +318,13 @@ URL
.TP
.B M
���߸��Ƥ���ڡ��������֥饦����Ȥä�ɽ�����ޤ���
-.B 2M, 3M
-��2���ܤ�3���ܤΥ֥饦����Ȥ��ޤ���
+.B 2M, 3M, ..., 9M
+��2���ܡ�3���ܡ�9���ܤΥ֥饦����Ȥ��ޤ���
.TP
.B "ESC M"
���ߤΥ��������֥饦����Ȥä�ɽ�����ޤ���
-.B "2ESC M", "3ESC M"
-��2���ܤ�3���ܤΥ֥饦����Ȥ��ޤ���
+.B "2ESC M", "3ESC M", ..., "9ESC M"
+��2���ܡ�3���ܡ�9���ܤΥ֥饦����Ȥ��ޤ���
.SS �ե������URL�ط������
.TP
.B U
diff --git a/doc/FAQ.html b/doc/FAQ.html
index ed2a704..ca82c67 100644
--- a/doc/FAQ.html
+++ b/doc/FAQ.html
@@ -1,291 +1,763 @@
-<HTML>
-<HEAD>
-<TITLE>W3M FAQ</TITLE>
-</HEAD>
-<BODY>
-<p>
-<center><h1>Frequently Asked Questions and Answers about w3m</h1></center>
-<div align=right>
-Akinori Ito<br>
-aito@fw.ipsj.or.jp<br>
-Corrected by Tom Berger <tom.be@gmx.net>
-</div>
-<p>
-<b><center><font size=+1><u><a name="index">Index</a></u></font></center></b>
-<p>
-<br>
-<ul>
-<li><h2><a href="#general">General Questions, How to Get It, Required Environment</a></h2></li>
-<ul>
-<li><h3>How do I pronounce "w3m"?</h3>
-<li><h3>Why is it called "w3m"?</h3>
-<li><h3>On which platforms does w3m work?</h3>
-<li><h3>Where can I get more information about w3m?</h3>
-<li><h3>Is there a mailing list for w3m?</h3>
-<li><h3>Are there any binary distributions?</h3>
-</ul>
-<br>
-<li><a href="#install"><h2>Compile and Install</h2></a>
-<br>
-<li><a href="#command"><h2>Options, Commands, Usage</h2></a>
-<ul>
-<li><h3>w3m quits if started without parameters. What's wrong?</h3>
-<li><h3>w3m starts with black characters on a black screen. How do I change this?</h3>
-<li><h3>Does w3m support colours?</h3>
-<li><h3>Does w3m support monochrome display?</h3>
-<li><h3>How do I shift the display?</h3>
-<li><h3>How do I move from anchor to anchor?</h3>
-<li><h3>Netscape displays a word red, but w3m doesn't. Why?</h3>
-<li><h3>How do I change the colour of anchor-/image-/form links?</h3>
-<li><h3>w3m doesn't seem to use the variable EDITOR. Why? </h3>
-<li><h3>How do I quit a search or URL text input?</h3>
-</ul>
-<br>
-<li><a href="#www"><h2>Questions about WWW usage</h2></a>
-<ul>
-<li><h3>How do I fill in forms with w3m?</h3>
-<li><h3>Seems like w3m is slower than Netscape or Lynx. Why?</h3>
-<li><h3>Loading time doesn't decrease when loading a previously seen page</h3>
-<li><h3>How do I download a linked file?</h3>
-<li><h3>How do I specify a proxy server?</h3>
-<li><h3>w3m freezes when I invoke an external browser.</h3>
-<li><h3>How do I change the default image viewer?</h3>
-<li><h3>How do I enter a URL?</h3>
-<li><h3>w3m appends a URL to the former one despite of having cleared the line with Ctrl-u. What to do?</h3>
-</ul>
-<br>
-<li><a href="#other"><h2>Misc</a></h2>
-<ul>
-<li><h3>What is w3m's configuration file?</h3>
-<li><h3>What are these w3mxxxx files in my ~/.w3m directory for?</h3>
-</ul>
-<br>
-<br>
-<u><h2><a name="general">General Questions, How to Get It, Required Environment</a></h2></u>
-<br>
-<dl>
-<dt><h3>How do I pronounce "w3m"?</h3>
-<dd>It's "W-three-M". It doesn't rhyme with "pteranodon".
-<p>
-<dt><h3>Why is it called "w3m"?</h3>
-<dd>It's an abbreviation of "WWW-wo-Miru", which is Japanese for
-"See the WWW". So in English the name of this browser would be
-something like "stw3".
-<p>
-<dt><h3>On which platforms does w3m work?</h3>
-<dd>It runs on various versions of Unix, since version 990226 on OS/2 and since
-version 990303 also on MS-Windows with Cygwin32.
-<br>
-Current versions have been confirmed to run on:
-<ul>
-<li>SunOS 4.1.x
-<li>HP-UX 9.x, 10.x
-<li>Solaris 2.5.x, 2.6, 8
-<li>Linux 2.0.30
-<li>FreeBSD 2.2.8, 3.1, 3.2, 4.6
-<li>NetBSD/macppc, m68k
-<li>EWS4800 Rel.12.2 Rev.A
-<li>Digital UNIX: v3.2D, v4.0D
-<li>IRIX 5.3, IRIX 6.5
-<li>OS/2 with emx
-<li>Windows 9x/NT with Cygwin32 b20.1
-<li>MS-DOS with DJGPP and WATT32 packet driver
-<li>MacOS X Server
-<li>MacOS X 10.1, 10.2
-</ul>
-<dt><h3>Where can I get more information about w3m?</h3>
-<dd>At the <a href="http://w3m.sourceforge.net/index.en.html">English w3m home page</a>.
-<dt><h3>Is there a mailing list for w3m?</h3>
-<dd>There is a mailing list for developpers (w3m-dev-en). Please see
-<a href="http://w3m.sourceforge.net/index.en.html">w3m page</a>
-for details. You may also mail your comments to <a href="mailto:aito@fw.ipsj.or.jp">the author</a>.
-<dt><h3>Are there any binary distributions?</h3>
-<dd>So far there are only binaries for the win/cygnus32 version. You can get
-them from <a href="http://prdownloads.sourceforge.net/w3m/">here</a>.
-Contact <a href="mailto:aito@fw.ipsj.or.jp">the author</a> if you want to contribute binaries for other platforms.
-</dd>
-</dl>
-<br>
-<div align=right>
-<i>Up to <a href="#index">index</a></i>
-</div>
-<br>
-<u><h2><a name="install">Compile and Install</a></h2></u>
-No problem :-)
-<u><h2><a name="command">Options, Commands, Usage</a></h2></u>
-<br>
-<dl>
-<dt><h3>w3m quits if started without parameters. What's wrong?</h3>
-<dd>w3m is a <b>pager</b>. Therefore it just quits when invoked without any
-arguments. Possible arguments are:
-<ol>
-<li>A filename or an URL
-<li>Pipe from standard input
-<li>The -B option (Show bookmark file)
-<li>The -v option (visual startup)
-<li>From a specified HTTP_HOME or WWW_HOME variable
-</ol>
-<p>
-<dt><h3>w3m starts with black characters on black background. How do I change
-this?</h3>
-<dd>
-When compiled with colour support, w3m assumes a white background and therefore
-displays black characters.
-<br>
-You may either change the background colour of your terminal (e.g. with the -bg
-option in a xterm) or take these steps:
-<ul>
-<li>invoke w3m with 'w3m -M' (for monochrome),
-<li>type 'o' for getting to the options screen
-<li><b>Mark 'Display with colour' as ON</b> and choose an arbitrary colour.
-Click on [OK].
-</ul>
-<p>
-<dt><h3>Does w3m support colours?</h3>
-<dd>Yes. When you run './configure', answer the question
-<p>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <style>
+ span.mono {
+ font-family:mono;
+ }
+ </style>
+ <meta http-equiv=content-type content="text/html;charset=US-ASCII">
+ <title>W3M FAQ</title>
+ </head>
+ <body>
+ <h1 align="center">
+ Frequently Asked Questions and Answers about w3m
+ </h1>
+ <p align="right">
+ Akinori Ito <aito@fw.ipsj.or.jp><br>
+ Corrected by Tom Berger <tom.be@gmx.net>
+ </p>
+ <h2 id="index">
+ <u>
+ Index
+ </u>
+ </h2>
+ <ul>
+ <li>
+ <a href="#general">
+ <b>
+ General Questions, How to Get It, Required Environment
+ </b>
+ </a>
+ </li>
+ <ul>
+ <li>
+ <b>
+ How do I pronounce <q>w3m</q>?
+ </b>
+ </li>
+ <li>
+ <b>
+ Why is it called <q>w3m</q>?
+ </b>
+ </li>
+ <li>
+ <b>
+ On which platforms does w3m work?
+ </b>
+ </li>
+ <li>
+ <b>
+ Where can I get more information about w3m?
+ </b>
+ </li>
+ <li>
+ <b>
+ Is there a mailing list for w3m?
+ </b>
+ </li>
+ <li>
+ <b>
+ Are there any binary distributions?
+ </b>
+ </li>
+ </ul>
+ <li>
+ <a href="#install">
+ <b>
+ Compile and Install
+ </b>
+ </a>
+ </li>
+ <li>
+ <a href="#command">
+ <b>
+ Options, Commands, Usage
+ </b>
+ </a>
+ </li>
+ <ul>
+ <li>
+ <b>
+ w3m quits if started without parameters. What's wrong?
+ </b>
+ </li>
+ <li>
+ <b>
+ w3m starts with black characters on a black background. How do
+ I change this?
+ </b>
+ </li>
+ <li>
+ <b>
+ Does w3m support colors?
+ </b>
+ </li>
+ <li>
+ <b>
+ Does w3m support monochrome displays?
+ </b>
+ </li>
+ <li>
+ <b>
+ How do I shift the display?
+ </b>
+ </li>
+ <li>
+ <b>
+ How do I move between hyperlinks?
+ </b>
+ </li>
+ <li>
+ <b>
+ Graphical browsers display a word red, but w3m doesn't. Why?
+ </b>
+ </li>
+ <li>
+ <b>
+ How do I change the colors for hyperlinks, images and form fields?
+ </b>
+ </li>
+ <li>
+ <b>
+ w3m doesn't seem to use the variable EDITOR. Why?
+ </b>
+ </li>
+ <li>
+ <b>
+ How do I quit a search or URL text input?
+ </b>
+ </li>
+ </ul>
+ <li>
+ <a href="#www">
+ <b>
+ Questions about WWW usage
+ </b>
+ </a>
+ </li>
+ <ul>
+ <li>
+ <b>
+ How do I fill in forms with w3m?
+ </b>
+ </li>
+ <li>
+ <b>
+ Seems like w3m is slower than some other browsers. Why?
+ </b>
+ </li>
+ <li>
+ <b>
+ Loading time doesn't decrease when loading a previously seen
+ page.
+ </b>
+ </li>
+ <li>
+ <b>
+ How do I download a linked file?
+ </b>
+ </li>
+ <li>
+ <b>
+ How do I specify a proxy server?
+ </b>
+ </li>
+<!-- deleted, see mail dated Mon, 04 Apr 2016 20:50:27 +0900 (JST)
+from Tatsuya Kinoshita <tats@debian.org>
+ <li>
+ <b>
+ w3m freezes when I invoke an external browser.
+ </b>
+ </li>
+-->
+ <li>
+ <b>
+ How do I change the default image viewer?
+ </b>
+ </li>
+ <li>
+ <b>
+ How do I enter a URL?
+ </b>
+ </li>
+ <li>
+ <b>
+ w3m appends a URL to the former one even when I clear the line
+ with <span class="mono">CTRL-u</span>. What should I do?
+ </b>
+ </li>
+ </ul>
+ <li>
+ <a href="#other">
+ <b>
+ Miscellaneous
+ </b>
+ </a>
+ </li>
+ <ul>
+ <li>
+ <b>
+ What is w3m's configuration file?
+ </b>
+ </li>
+ <li>
+ <b>
+ What are these w3mxxxx files in my ~/.w3m directory for?
+ </b>
+ </li>
+ </ul>
+ </ul>
+ <h2 id="general">
+ <u>
+ General Questions, How to Get It, Required Environment
+ </u>
+ </h2>
+ <dl>
+ <dt>
+ <b>
+ How do I pronounce <q>w3m</q>?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ It's <q>W-three-M</q>. It doesn't rhyme with <q>pteranodon</q>.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Why is it called <q>w3m</q>?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ It's an abbreviation of <q>WWW-wo-Miru</q>, which is Japanese
+ for <q>See the WWW</q>. So in English the name of this browser
+ would be something like <q>stw3</q>.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ On which platforms does w3m work?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ It runs on various versions of Unix, since version 990226 on OS/2
+ and since version 990303 also on MS-Windows with Cygwin32.
+ </p>
+ <p>
+ More recent versions have been confirmed to run on:
+ </p>
+ <ul>
+ <li>
+ SunOS 4.1.x
+ </li>
+ <li>
+ HP-UX 9.x, 10.x
+ </li>
+ <li>
+ Solaris 2.5.x, 2.6, 8
+ </li>
+ <li>
+ Linux 2.0.1 to 3.17
+ </li>
+ <li>
+ FreeBSD 2.2.8, 3.1, 3.2, 4.6
+ </li>
+ <li>
+ NetBSD/macppc, m68k
+ </li>
+ <li>
+ EWS4800 Rel.12.2 Rev.A
+ </li>
+ <li>
+ Digital UNIX: v3.2D, v4.0D
+ </li>
+ <li>
+ IRIX 5.3, IRIX 6.5
+ </li>
+ <li>
+ OS/2 with emx
+ </li>
+ <li>
+ Windows 9x/NT with Cygwin32 b20.1
+ </li>
+ <li>
+ MS-DOS with DJGPP and WATT32 packet driver
+ </li>
+ <li>
+ MacOS X Server
+ </li>
+ <li>
+ MacOS X 10.1, 10.2
+ </li>
+ </ul>
+ </dd>
+ <dt>
+ <b>
+ Where can I get more information about w3m?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ At the
+ <a href="http://w3m.sourceforge.net/index.en.html">English w3m
+ home page</a>.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Is there a mailing list for w3m?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ There is a mailing list for developers (w3m-dev-en). Please see
+ the <a href="http://w3m.sourceforge.net/index.en.html">w3m home
+ page</a> for details. You may also mail your comments to
+ <a href="mailto:aito@fw.ipsj.or.jp">the author</a>.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Are there any binary distributions?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ So far there are only binaries for the win/cygnus32 version.
+<!--
+ You can get them from
+ <a href="http://prdownloads.sourceforge.net/w3m/">here</a>.
+!-->
+ Contact <a href="mailto:aito@fw.ipsj.or.jp">the author</a> if you
+ want to contribute binaries for other platforms.
+ </p>
+ </dd>
+ </dl>
+ <p align="right">
+ <i>
+ Up to <a href="#index">index</a>
+ </i>
+ </p>
+ <h2 id="install">
+ <u>
+ Compile and Install
+ </u>
+ </h2>
+ <p>
+ No problem :-)
+ </p>
+ <h2 id="command">
+ <u>
+ Options, Commands, Usage
+ </u>
+ </h2>
+ <dl>
+ <dt>
+ <b>
+ w3m quits if started without parameters. What's wrong?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ w3m is a <b>pager</b>. Therefore it just quits when invoked
+ without any arguments. It keeps running
+ </p>
+ <ul>
+ <li>
+ with a filename or URL as argument
+ </li>
+ <li>
+ with data piped from standard input
+ </li>
+ <li>
+ when invoked with option -B to show the bookmark file
+ </li>
+ <li>
+ when invoked with option -v to welcome users with a built-in page
+ </li>
+ <li>
+ with specified HTTP_HOME or WWW_HOME variable
+ </li>
+ </ul>
+ </dd>
+ <dt>
+ <b>
+ w3m starts with black characters on a black background. How do I
+ change this?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ When compiled with color support, w3m assumes a white background
+ and therefore displays black characters.
+ </p>
+ <p>
+ You may either change the background color of your terminal
+ (e.g. with the -bg option in a xterm) or take these steps
+ </p>
+ <ol>
+ <li>
+ invoke monochrome mode of w3m with <span class="mono">w3m -M</span>
+ </li>
+ <li>
+ type <q>o</q> to get to the options setting panel
+ </li>
+ <li>
+ mark <q>Display with color</q> as <q>YES</q> and choose an
+ arbitrary color
+ </li>
+ <li>
+ click on [OK].
+ </li>
+ </ol>
+ </dd>
+ <dt>
+ <b>
+ Does w3m support colors?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Yes. When you run <q>./configure</q>, answer the question
+ </p>
<pre>
-Let's do some configurations. Choose config option among the list."
+ Let's do some configurations. Choose config option among the list.
-1 - Baby model (no color, no menu, no mouse, no cookie, no SSL)
-2 - Little model (color, menu, no mouse, no cookie, no SSL)
-3 - Mouse model (color, menu, mouse, no cookie, no SSL)
-4 - Cookie model (color, menu, mouse, cookie, no SSL)
-5 - Monster model (with everything; you need openSSL library)
-6 - Customize
-Which?
+ 1 - Baby model (no color, no menu, no mouse, no cookie, no SSL)
+ 2 - Little model (color, menu, no mouse, no cookie, no SSL)
+ 3 - Mouse model (color, menu, mouse, no cookie, no SSL)
+ 4 - Cookie model (color, menu, mouse, cookie, no SSL)
+ 5 - Monster model (with everything; you need openSSL library)
+ 6 - Customize
+ Which?
</pre>
-<p>
-with 2,3,4 or 5.
-<p>
-<dt><h3>Does w3m support monochrome display?</h3>
-<dd>Yes. You may either
-<ol>
-<li>Answer the above mentioned 'configure' question with 1, or
-<li>Invoke w3m with the -M option, or
-<li>Type 'o' within w3m to enter the options screen and turn off colour display
-mode.
-</ol>
-<dt><h3>How do I shift the display?</h3>
-<dd>You can shift the display by moving the cursor to the edge of the screen. You
-may also use the ">"/"<" or "."/"," keys.
-<br>
-Another idea would be adjusting the xterm with the -geometry option (e.g.
-something like 'xterm -geometry 110x45 -bg white -name w3m -e w3m -B').
-<dt><h3>How do I move from anchor to anchor?</h3>
-<dd>You can move to the next anchor using TAB. ESC TAB moves cursor to the previous anchor.
-<p>
-<dt><h3>Netscape displays a word red, but w3m doesn't. Why?</h3>
-<dd>w3m doesn't support <FONT COLOR=".."> tags. It won't be impossible to implement this, but I think it would make the document more difficult to read.
-<p>
-<dt><h3>How do I change the colour of anchor-/image-/form links?</h3>
-<dd>Type 'o' within w3m to get the 'options' screen. You can change these
-settings there.
-<dt>
-<dt><h3>w3m doesn't seem to use the variable EDITOR. Why? </h3>
-<dd><dd>Go to the 'options' screen using the "o" key. Any entry in the 'Editor' field will override the environment variable.
-<br>
-If you want to use the editor specified by EDITOR blank the field and push [OK].
-<p>
-<dt><h3>How do I quit a search or URL text input?</h3>
-<dd>Clear input text using Ctrl-u and hit RETURN.
-</dd>
-</dl>
-<br>
-<div align=right>
-<i>Up to <a href="#index">index</a></i>
-</div>
-<br>
-<u><h2><a name="www">Questions about WWW usage</a></h2></u>
-<br>
-<dl>
-<dt><h3>How do I fill in forms with w3m?</h3>
-<dd>Form input fields are displayed in red (or reverse). Move the cursor to
-them and hit RETURN. Then,
-<ul>
-<li>if it is a text input field, put in your text on the bottom line,
-<li>if it is a radiobutton or checkbox, that item is selected,
-<li>if it is a textarea, an editor is spawned,
-<li>if it is 'submit' or 'reset', well, just do it.
-</ul>
-<dt><h3>Seems like w3m is slower than Netscape or Lynx. Why?</h3>
-<dd>w3m renders a HTML document in two passes. Therefore it displays the documentnot before having read the entire document.
-<br>
-Netscape or Lynx display the document before having read the whole page,
-and therefore seem faster.
-<p>
-<dt><h3>Loading time doesn't decrease when loading a previously seen page</h3>
-<dd>w3m doesn't have its own cache. Therefore, it reads the document
-from the server each time it accesses it. If possible, use a cache server.
-<p>
-<dt><h3>How do I download a linked file?</h3>
-<dd>Use 'a' (or 'd' with Lynx-like keybindings) or ESC RET. If you want to download an inline image, use ESC 'I'.
-<p>
-<dt><h3>How do I specify a proxy server?</h3>
-<dd>Set the environment variable HTTP_PROXY or use the option setting panel
-("o" key). For example, if you want to use port 8000 of proxy.hogege.com, specify
-<p>
-<pre>
- http://proxy.hogege.com:8000/
-</pre>
-<p>
-<dt><h3>w3m freezes when I invoke an external browser.</h3>
-<dd>Enter w3m's option screen using the 'o' key and specify
-<p>
-<pre>
- netscape %s &
-</pre>
-<p>
-(if you are using netscape).
-<p>
-<dt><h3>How do I change the default image viewer?</h3>
-<dd>By default w3m uses xv to view images. If you want to change it into, let's say, 'display', add the following line to ~/.w3m/mailcap or /etc/mailcap.
-<p>
+ <p>
+ with 2, 3, 4, or 5.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Does w3m support monochrome displays?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Yes. You may either
+ </p>
+ <ul>
+ <li>
+ Answer the above-mentioned <q>configure</q> question with 1,
+ or
+ </li>
+ <li>
+ Invoke w3m with the -M option, or
+ </li>
+ <li>
+ Type <q>o</q> within w3m to enter the options setting panel and turn
+ off color display mode.
+ </li>
+ </ul>
+ </dd>
+ <dt>
+ <b>
+ How do I shift the display?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ You can shift the display by moving the cursor to the edge of
+ the screen. You may also use the following commands
+ </p>
+ <ul>
+ <li>SHIFT_LEFT and SHIFT_RIGHT, bound to the keys <span class="mono">></span> and <span class="mono"><</span></li>
+ <li>SHIFT_LEFT1 and SHIFT_RIGHT1, bound to the keys <span class="mono">.</span> and <span class="mono">,</span></li>
+ </ul>
+ <p>
+ Another idea would be adjusting the xterm with the -geometry
+ option e.g. something like
+ </p>
+ <pre> xterm -geometry 110x45 -bg white -name w3m -e w3m -B</pre>
+ </dd>
+ <dt>
+ <b>
+ How do I move between hyperlinks?
+ </b>
+ </dt>
+ <dd>
+ <p>
+
+ You can move to the next hyperlink
+ using <span class="mono">TAB</span>. <span class="mono">ESC
+ TAB</span> moves the cursor to the previous hyperlink. (see
+ Section <a href="MANUAL.html#Functions" target="_blank">
+ Functions and Key bindings</a> of w3m's manual)
+
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Graphical browsers display a word red, but w3m doesn't. Why?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ w3m doesn't support the attribute COLOR="..." of HTML. It wouldn't
+ be impossible to implement this, but I think it would make
+ documents more difficult to read.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ How do I change the colors for hyperlinks, images and form fields?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Type <q>o</q> within w3m to get the options panel. You
+ can change these settings there.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ w3m doesn't seem to use the variable EDITOR. Why?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Go to the options setting panel using the <q>o</q> key. Any
+ entry in the <q>Editor</q> field overrides the environment
+ variable.
+ </p>
+ <p>
+ If you want to use the editor specified by EDITOR, blank the
+ field and save the settings using the button [OK].
+ </p>
+ </dd>
+ <dt>
+ <b>
+ How do I quit a search or URL text input?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Clear input text using <span class="mono">CTRL-u</span> and hit <span class="mono">RETURN</span>.
+ </p>
+ </dd>
+ </dl>
+ <p align="right">
+ <i>
+ Up to <a href="#index">index</a>
+ </i>
+ </p>
+ <h2 id="www">
+ <u>
+ Questions about WWW usage
+ </u>
+ </h2>
+ <dl>
+ <dt>
+ <b>
+ How do I fill in forms with w3m?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Form input fields are displayed in red (or reverse). Move the
+ cursor to them. Then, if it is
+ </p>
+ <ul>
+ <li>
+ a text input field, hit <span class="mono">RETURN</span>
+ put in your text on the bottom line. Press
+ <span class="mono">RETURN</span> again
+ </li>
+ <li>
+ a radiobutton or checkbox, pressing
+ <span class="mono">RETURN</span> changes or toggles the selection
+ </li>
+ <li>
+ a textarea, pressing
+ <span class="mono">RETURN</span> spawns an editor
+ </li>
+ <li>
+ a <q>submit</q> or <q>reset</q> field,
+ the respective action is performed.
+ </li>
+ </ul>
+ </dd>
+ <dt>
+ <b>
+ Seems like w3m is slower than some other browsers. Why?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ w3m renders a HTML document in two passes. Therefore it doesn't
+ start to display the document until it has finished reading it.
+ </p>
+ <p>
+ Most other browsers display the document before having read the
+ whole page, and therefore seem faster.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ Loading time doesn't decrease when loading a previously seen
+ page.
+ </b>
+ </dt>
+ <dd>
+ <p>
+ w3m doesn't have its own cache. Therefore, it reads the document
+ from the server each time it accesses it. If possible, use a
+ cache server.
+ </p>
+ </dd>
+ <dt>
+ <b>
+ How do I download a linked file?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Use <q>a</q> (or <q>d</q> with Lynx-like keybindings) or
+ <span class="mono">ESC RET</span>.
+ If you want to download an inline image, use
+ <span class="mono">ESC I</span>. (see
+ Section <a href="MANUAL.html#Functions" target="_blank">
+ Functions and Key bindings</a> of w3m's manual)
+ </p>
+ </dd>
+ <dt>
+ <b>
+ How do I specify a proxy server?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Set the environment variables HTTP_PROXY, HTTPS_PROXY, GOPHER_PROXY
+ and FTP_PROXY, or use the options setting panel (<q>o</q> key). For
+ example, if you want to use port 8000 of proxy.example.org, specify
+ </p>
+ <pre> http://proxy.example.org:8000/</pre>
+ </dd>
+<!-- deleted, see mail dated Mon, 04 Apr 2016 20:50:27 +0900 (JST)
+from Tatsuya Kinoshita <tats@debian.org>
+ <dt>
+ <b>
+ w3m freezes when I invoke an external browser.
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Enter w3m's option screen using the <q>o</q> key and specify
+ </p>
+ <pre> firefox %s &</pre>
+ <p>
+ (if you are using Firefox). Note that %s is replaced with the URL
+ when invoking.
+ </p>
+ </dd>
+ -->
+ <dt>
+ <b>
+ How do I change the default image viewer?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ By default w3m uses xv to view images. If you want to change it
+ into, let's say, <q>display</q>, add the following line to
+ ~/.w3m/mailcap or /etc/mailcap:
+ </p>
<pre>
-image/*; display %s
+ image/*; display %s
</pre>
-<p>
-You can specify external viewers of other file types as well:
-<p>
+ <p>
+ You can specify external viewers of other file types as well:
+ </p>
<pre>
-image/*; display %s
-application/postscript; ghostview %s
-application/x-dvi; xdvi %s
+ image/*; display %s
+ application/postscript; ghostview %s
+ application/x-dvi; xdvi %s
</pre>
-<dt><h3>How do I enter a URL?</h3>
-<dd>Type SHIFT-U
-<p>
-<dt><h3>w3m appends a URL to the former one despite of having cleared the line
-with Ctrl-u. What to do?</h3>
-<dd>Enter the <i>complete</i> adress, e.g. http://www.slashdot.org.
-</dd>
-</dl>
-<br>
-<div align=right>
-<i>Up to <a href="#index">index</a></i>
-</div>
-<br>
-<u><h2><a name="other">Miscellaneous</a></h2></u>
-<br>
-<dl>
-<dt><h3>What is w3m's configuration file?</h3>
-<dd>It is ~/.w3m/config.
-With this file, you can adjust w3m's behavior by changing values of options
-that are described to be varied with the option setting panel.
-Each line contains setting for one option, which is a pair of an option name
-and its value with a space as a separator.
-<p>
-<dt><h3>What are these w3mxxxx files in my ~/.w3m directory for?</h3>
-<dd>These are temporary files used by w3m when reading documents from a
-WWW server. They are not cache files and are usually deleted when w3m is
-terminated. If there remain any temp files, please remove them by yourself.
-<p>
-</dd>
-</dl>
-<br>
-<div align=right>
-<i>Up to <a href="#index">index</a></i>
-</div>
-<br>
-</BODY>
-</HTML>
+ </dd>
+ <dt>
+ <b>
+ How do I enter a URL?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Type <span class="mono">U</span>
+ </p>
+ </dd>
+ <dt>
+ <b>
+ w3m appends a URL to the former one even when I clear the line
+ with <span class="mono">CTRL-u</span>. What should I do?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ Enter the <i>complete</i> address, e.g. http://www.slashdot.org.
+ </p>
+ </dd>
+ </dl>
+ <p align="right">
+ <i>
+ Up to <a href="#index">index</a>
+ </i>
+ </p>
+ <h2 id="other">
+ <u>
+ Miscellaneous
+ </u>
+ </h2>
+ <dl>
+ <dt>
+ <b>
+ What is w3m's configuration file?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ It is ~/.w3m/config.
+ </p>
+
+ <p>
+ With this file, each user can adjust w3m's behavior by changing
+ the values of options whose effects are described in the options
+ setting panel. Each line contains one option setting, consisting
+ of an option name and its value with a space as a separator.
+ </p>
+
+ <p>Without a user-specific configuration file, w3m honours
+ the system wide configuration file /etc/w3m/config.
+ </p>
+
+ </dd>
+ <dt>
+ <b>
+ What are these w3mxxxx files in my ~/.w3m directory for?
+ </b>
+ </dt>
+ <dd>
+ <p>
+ These are temporary files used by w3m when reading documents
+ from a WWW server. They are not cache files and are usually
+ deleted when w3m is terminated. If any temp files are left
+ behind, please remove them yourself.
+ </p>
+ </dd>
+ </dl>
+ <p align="right">
+ <i>
+ Up to <a href="#index">index</a>
+ </i>
+ </p>
+ </body>
+</html>
diff --git a/doc/HISTORY b/doc/HISTORY
index b8f5b94..7f7ae2b 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -588,7 +588,7 @@ From: Okabe Katsuya <okabek@guitar.ocn.ne.jp>
* space characters in a buffer are mapped into 0x80-0x9f.
* unprintable characters (0x80-0xa0) are displayed as \xxx.
-From: Tsutomu Okada ($B2,ED(B $BJY(B) <okada@furuno.co.jp>
+From: Tsutomu Okada <okada@furuno.co.jp>
Subject: [w3m-dev 01354] minimize when #undef USE_GOPHER or USE_NNTP
2000/11/16
@@ -1422,7 +1422,7 @@ HTML4.0 ID attribute support.
From: Okabe Katsuya <okabe@fphy.hep.okayama-u.ac.jp>
table get weird when it contains <input type=hidden>.
-$B=$@5!%(B
+Fixed.
2000.2.12
From: Rogue Metal - Jake Moorman <roguemtl@stampede.org>
@@ -1649,15 +1649,15 @@ From: patakuti
If an <input type=button> tag has no `name' attribute,
w3m adds it an inappropriate name attribute.
-From: $B$d$^(B
+From: Yama
Now w3m can handle a frameset that has both ROWS and COLS.
From: aito
Now bookmarking is done by a separate command w3mbookmark.
-C-s $B$G2hLLI=<($,;_$^$C$F$$$?%P%0$N=$@5!%(B
+Bug fix that C-s hangs.
-$BJ8;zF~NO;~$K(B C-g $B$GCf;_$G$-$k$h$&$K$7$?!%(B
+Enable C-g to quit for keyboard input.
From: hovav@cs.stanford.edu
When downloading a file, an attempt to save it to a non-exist
@@ -1699,7 +1699,7 @@ Menu behavior is changed.
* Clicking outside the menu causes cancellation of sub-menu.
* <, >, +, - abandoned
-From: $B$*$+$@(B <okada@furuno.co.jp>
+From: Okada <okada@furuno.co.jp>
Now C-a/C-e are bound to 'jump to the first/last item in menu.'
From: "OMAE, jun" <jun-o@osb.att.ne.jp>
diff --git a/doc/MANUAL.html b/doc/MANUAL.html
index aff0189..f0710a7 100644
--- a/doc/MANUAL.html
+++ b/doc/MANUAL.html
@@ -1,535 +1,2424 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<head><title>w3m manual</title>
-</head>
-<body>
-<h1>w3m MANUAL</h1>
-<div align=right>
-Akinori Ito<br>
-aito@fw.ipsj.or.jp
-</div>
-<h2>Index</h2>
-<menu>
-<li><a href="#Introduction">Introduction</a>
-<li><a href="#Options">Options</a>
-<li><a href="#Color">Document color</a>
-<li><a href="#Key:orig">Key binding</a>
-<li><a href="#Key:lynx">Lynx-like key binding</a>
-<li><a href="#Mouse">Mouse operation</a>
-<li><a href="#Key:custom">Key customization</a>
-<li><a href="#LocalCGI">Local CGI</a>
-</menu>
-
-<hr>
-<a name="Introduction"></a>
-<h2>Introduction</h2>
-w3m is a pager/text-based WWW browser. You can browse local documents and/or
-documents on the WWW using a terminal emulator.
-
-<hr>
-<a name="Options"></a>
-<h2>Options</h2>
-
-Command line usage is
-<p>
+ <head>
+ <title>w3m manual</title>
+ <style>
+ span.mono {
+ font-family:mono;
+ }
+ </style>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8">
+ </head>
+ <body>
+ <!--
+insertions tagged with "mh 2016-03-29" and "mh 2016-06-11" come from the latest version of manual page w3m (1)
+ -->
+
+ <h1>w3m MANUAL</h1>
+ <div align="right">
+ Akinori Ito<br>
+ aito@fw.ipsj.or.jp
+ </div>
+ <h2>Index</h2>
+ <ul>
+ <li>
+ <a href="#Introduction">
+ Introduction
+ </a>
+ </li>
+ <li>
+ <a href="#Options">
+ Options
+ </a>
+ </li>
+ <li>
+ <a href="#Color">
+ Document Colors
+ </a>
+ </li>
+ <li>
+ <a href="#Functions">
+ Functions and Key bindings
+ </a>
+ </li>
+<!-- mh 2016-06-13 obsolete
+ <li>
+ <a href="#Key:lynx">
+ Lynx-like key bindings
+ </a>
+ </li>
+-->
+ <li>
+ <a href="#Mouse">
+ Mouse Operation
+ </a>
+ </li>
+<!-- mh 2016-06-13 obsolete
+ <li>
+ <a href="#Key:custom">
+ Key customization
+ </a>
+ </li>
+ -->
+ <li>
+ <a href="#LocalCGI">
+ Local CGI scripts
+ </a>
+ </li>
+ </ul>
+ <hr>
+ <h2 id="Introduction">
+ Introduction
+ </h2>
+ <p>
+ w3m is a pager/text-based WWW browser. You can browse local
+ documents and/or documents on the WWW using a terminal emulator.
+ </p>
+ <hr>
+ <h2 id="Options">
+ Options
+ </h2>
+ <p>
+ Command line usage is
+ </p>
+<!-- mh 2016-08-06 invocation adapted to w3m(1). w3m accepts several options and several targets -->
<pre>
- w3m [options] [file|URL]
+ w3m [option]... [file|URL]...
</pre>
-<P>
-If you specify filenames/URLs on command line, these documents are displayed.
-If you specify nothing, w3m reads a document from standard input and display it.
-If no filename and/or URLs are specified and standard input is tty, w3m terminates
-without displaying anything.
+ <p>
+ If you specify filenames/URLs on the command line, these documents
+ are displayed. If you specify nothing, w3m will read a document
+ from standard input and display it. If it doesn't find a document
+ there either then normally w3m will terminate.
+ </p>
+ <p>
+ Options include:
+ </p>
+ <dl>
+<h3>General options</h3>
+ <dt>
+ -B
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ with no other target defined, use the bookmark page for startup
+ </p>
+ </dd>
+ <dt>
+ -M
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ monochrome display
+ </p>
+ </dd>
+ <dt>
+ -no-mouse
+ </dt>
+ <dd>
+ <p>
+ deactivate mouse support.
+ </p>
+ </dd>
+ <dt>
+ -num
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ display each line's number
-<p>
-Options are as follows:
-<dl>
-<dt>+<line number>
-<dd>Move to the specified line.
-<dt>-t width
-<dd>Specify tab width. Default is 8.
-<dt>-r
-<dd>When displaying text/plain document, prohibit emphasis using backspace.
-If you don't specify this option,
-``A^H_'' is interpreted as underlined character and ``A^HA'' as a bold character.
-<dt>-l number
-<dd>Specify line number preserved internally when reading text/plain document
-fron standard input. Default is 10000.
-<dt>-s
-<dd>Display documents with Shift_JIS code.
-<dt>-e
-<dd>Display documents with EUC_JP code.
-<dt>-j
-<dd>Display documents with ISO-2022-JP code.
-<dt>-T type
-<dd>Specify document type. Without this option, document type
-is determined from extension of a file. If the determination
-fails, the document is regarded as text/plain.
-<p>
-Example:<br>
-Read HTML document from standard input and display it
+ </p>
+ </dd>
+<!-- mh 2016-08-06 commented out. As implementation is not verified.
+ <dt>
+ -ppc <i>num</i>
+ </dt>
+ <dd>
+ <p>
+ width of <i>num</i> pixels per character. Range of 4.0 to 32.0,
+ default 8.0. Larger values will make tables
+ narrower. (Implementation not verified)
+ </p>
+ </dd>
+-->
+ <dt>
+ -v
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ with no other target defined, welcome users with a built-in page
+ </p>
+ </dd>
+ <dt>
+ -W
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ toggle wrapping mode in searches
+ </p>
+ </dd>
+ <dt>
+ -X
+ </dt>
+ <dd>
+ <p>
+ upon exit, do not reinitialize the terminal.
+ </p>
+ </dd>
+ <dt>
+ +<i>num</i>
+ </dt>
+ <dd>
+ <p><!--mh 2016-06-11 -->
+ go to line <i>num</i>; only effective for numbers larger
+ than the number of lines in the terminal
+ </p>
+ </dd>
+<h3>Browser options</h3>
+ <dt>
+ -cols <i>num</i>
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-06-11 -->
+ with stdout as destination; HTML is rendered to lines of <i>num</i>
+ characters
+ </p>
+ </dd>
+ <dt>
+ -cookie
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ use stored cookies and accept new ones
+ </p>
+ </dd>
+ <dt>
+ -no-cookie
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ neither use stored cookies nor accept new ones
+
+ </p>
+ </dd>
+ <dt>
+ -F
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ render frames
+ </p>
+ </dd>
+ <dt>
+ -no-graph
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ do not use graphic characters for drawing HTML table and frame
+ borders
+ </p>
+ </dd>
+ <dt>
+ -header <i>string</i>
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ append <i>string</i> to the HTTP(S) request. Expected to match
+ the header syntax <span class="mono">"Variable: Value"</span>
+ </p>
+ </dd>
+ <dt>
+ -m
+ </dt>
+ <dd>
+ <p>
+ display document using <q>Internet message mode</q>. With this
+ option, w3m determines document type from header information.
+ This is useful when reading e-mail or Usenet news posts.
+<!-- mh 2016-03-29
+Render the body of Usenet messages according to the header <q>Content-type</q>
+-->
+ </p>
+ </dd>
+ <dt>
+ -no-proxy
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-06-11-->
+ do not use proxy
+ </p>
+ </dd>
+ <dt>
+ -post <i>file</i>
+ </dt>
+ <dd>
+ <p><!--funktionierend 2016-06-28T08:22>-->
+ use POST method to upload data defined in <i>file</i>. The
+ syntax to be used is <span class="mono">"var1=value1[&var2=value2]…"</span>
+ </p>
+ </dd>
+<h3>Text pager options</h3>
+ <dt>
+ -l <i>num</i>
+ </dt>
+ <dd>
+ <p>
+ <!-- mh2016-06-11-->
+ number of lines preserved internally when receiving plain text
+ from stdin (default 10,000)
+ </p>
+ </dd>
+ <dt>
+ -r
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29 -->
+ use caret notation to display special escape characters (such as
+ ANSI escapes or nroff-style backspaces for bold and underlined
+ characters) instead of processing them
+ </p>
+ </dd>
+ <dt>
+ -s
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ squeeze multiple blank lines into one
+ </p>
+ </dd>
+
+ <dt>
+ <!--mh 2016-03-29 --> -t <i>num</i>
+ </dt>
+ <dd>
+ <p>
+ <!--mh 2016-03-29--> set tab width to <i>num</i> columns. No effect on stdout
+ </p>
+ </dd>
+<h3>Data type/encoding options</h3>
+ <dt>
+ -I <i>charset</i>
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ user defined character encoding of input data
+ </p>
+ </dd>
+ <dt>
+ -O <i>charset</i>
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29 -->
+ user defined character encoding of output data
+ </p>
+ </dd>
+ <dt>
+ -T <i>type</i>
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-06-11-->
+ explicit characterization of input data by MIME type. Without
+ this option, document type is determined from the extension of a
+ file. If the determination fails, the document is regarded as
+ text/plain. For example:
+ </p>
+ <p>
+ Read HTML document from standard input and display it
+ </p>
<pre>
- cat hoge.html | w3m -T text/html
+ cat example.html | w3m -T text/html
</pre>
-<p>
-Display HTML source
+ <p>
+ Display HTML source
+ </p>
<pre>
- w3m -T text/plain hoge.html
+ w3m -T text/plain example.html
</pre>
-<dt>-m
-<dd>Display document with Internet message mode.
-With this option, w3m determines document type from header information.
-It is useful when reading E-mail or NetNews messages.
-<dt>-v
-<dd>visual startup mode.
-<dt>-B
-<dd>Show the bookmark.
-<dt>-bookmark file
-<dd>Specify bookmark file.
-<dt>-M
-<dd>Monochrome display mode.
-<dt>-F
-<dd>Automatically render frame.
-<dt>-S
-<dd>Squeeze blank lines.
-<dt>-X
-<dd>Upon exit, do not display preserved screen.
-<dt>-W
-<dd>Toggle wrap search mode.
-<dt>-o option=value
-<dd>Specify option. The option names and values are
-same as that appears in ~/.w3m/config.
-<dt>-cookie
-<dd>Process cookies.
-<dt>-no-cookie
-<dd>Don't process cookies.
-<dt>-num
-<dd>Show linenumber.
-<dt>-dump
-<dd>Read document specified by URL and dump formatted text into standard
-output. The width of the document become 80. This width can be overridden
-with -cols option.
-<dt>-cols width
-<dd>Specify document width. Used with -dump option.
-<dt>-ppc count
-<dd> Specify the number of pixels per character (default 8.0). Larger
- values will make tables narrower.
-<dt>-dump_source
-<dd>Read document specified by URL and dump the source.
-<dt>-dump_head
-<dd>Read document specified by URL and dump headers.
-<dt>-dump_both
-<dd>Read document specified by URL and dump headers and the source.
-<dt>-dump_extra
-<dd>Read document specified by URL and dump extra informations, headers and the source.
-<dt>-post file
-<dd>use POST method with file content.
-<dt>-header string
-<dd>insert string as a header.
-<dt>-no-proxy
-<dd>Don't use proxy server.
-<dt>-no-graph
-<dd>Use ASCII character to draw frames.
-<dt>-no-mouse
-<dd>Don't activate mouse.
-<dt>-config file
-<dd>specify config file.
-</dl>
-
-<hr>
-<a name="Color"></a>
-<h2>Document color</h2>
-
-Links and images are displayed as follows.
-<div align="center">
-<table border="1">
-<tr><th> </th><th>Color mode</th><th>Monochrome mode</th></tr>
-<tr><td>links</td><td>blue</td><td>underline</td></tr>
-<tr><td>inline images</td><td>green</td><td>reverse</td></tr>
-<tr><td>form input</td><td>red</td><td>reverse</td></tr>
-</table>
-</div>
-These colors can be customized using option setting command "o".
-
-<hr>
-<a name="Key:orig"></a>
-<h2>Key binding</h2>
-
-After invocation, you can operate w3m by one-character commands from
-the keyboard.
-<P>
-Here's the original key-binding table. If you are using Lynx-like key
-bindings, see <a href="#Key:lynx">the Lynx-like key binding</a>.
-
-<H3>Page/Cursor motion</H3>
-<table>
-<TR><TD WIDTH=100>SPC,C-v<TD>Forward page
-<TR><TD>b,ESC v<TD>Backward page
-<TR><TD>l,C-f<TD>Cursor right
-<TR><TD>h,C-b<TD>Cursor left
-<TR><TD>j,C-n<TD>Cursor down
-<TR><TD>k,C-p<TD>Cursor up
-<TR><TD>J<TD>Roll up one line
-<TR><TD>K<TD>Roll down one line
-<TR><TD>^,C-a<TD>Go to the beginning of line
-<TR><TD>$,C-e<TD>Go to the end of line
-<TR><TD>w<TD>Go to next word
-<TR><TD>W<TD>Go to previous word
-<TR><TD>><TD>Shift screen right
-<TR><TD><<TD>Shift screen left
-<TR><TD>.<TD>Shift screen one column right
-<TR><TD>,<TD>Shift screen one column left
-<TR><TD>g,M-<<TD>Go to the first line
-<TR><TD>G,M-><TD>Go to the last line
-<TR><TD>ESC g<TD>Go to specified line
-<TR><TD>Z<TD>Move to the center line
-<TR><TD>z<TD>Move to the center column
-<TR><TD>TAB<TD>Move to next hyperlink
-<TR><TD>C-u,ESC TAB<TD>Move to previous hyperlink
-<TR><TD>[<TD>Move to the first hyperlink
-<TR><TD>]<TD>Move to the last hyperlink
-</table>
-
-<H3>Hyperlink operation</H3>
-<table>
-<TR><TD WIDTH=100>RET<TD>Follow hyperlink
-<TR><TD>a, ESC RET<TD>Save link to file
-<TR><TD>u<TD>Peek link URL
-<TR><TD>i<TD>Peek image URL
-<TR><TD>I<TD>View inline image
-<TR><TD>ESC I<TD>Save inline image to file
-<TR><TD>:<TD>Mark URL-like strings as anchors
-<TR><TD>ESC :<TD>Mark Message-ID-like strings as news anchors
-<TR><TD>c<TD>Peek current URL
-<TR><TD>=<TD>Display information about current document
-<TR><TD>C-g<TD>Show current line number
-<TR><TD>C-h<TD>View history of URL
-<TR><TD>F<TD>Render frame
-<TR><TD>M<TD>Browse current document using external browser
-(use 2M and 3M to invoke second and third browser)
-<TR><TD>ESC M<TD>Browse link using external browser
-(use 2ESC M and 3ESC M to invoke second and third browser)
-</table>
-
-<H3>File/Stream operation</H3>
-<table>
-<TR><TD WIDTH=100>U<TD>Open URL
-<TR><TD>V<TD>View new file
-<TR><TD>@<TD>Execute shell command and load
-<TR><TD>#<TD>Execute shell command and browse
-</table>
-
-<H3>Buffer operation</H3>
-<table>
-<TR><TD WIDTH=100>B<TD>Back to the previous buffer
-<TR><TD>v<TD>View HTML source
-<TR><TD>s<TD>Select buffer
-<TR><TD>E<TD>Edit buffer source
-<TR><TD>C-l<TD>Redraw screen
-<TR><TD>R<TD>Reload buffer
-<TR><TD>S<TD>Save buffer
-<TR><TD>ESC s<TD>Save source
-<TR><TD>ESC e<TD>Edit buffer image
-</table>
-
-<H3>Buffer selection mode</H3>
-<table>
-<TR><TD WIDTH=100>k, C-p<TD>Select previous buffer
-<TR><TD>j, C-n<TD>Select next buffer
-<TR><TD>D<TD>Delect current buffer
-<TR><TD>RET<TD>Go to the selected buffer
-</table>
-
-<H3>Bookmark operation</H3>
-<table>
-<TR><TD WIDTH=100>ESC b<TD>Load bookmark
-<TR><TD>ESC a<TD>Add current to bookmark
-</table>
-
-<H3>Search</H3>
-<table>
-<TR><TD WIDTH=100>/,C-s<TD>Search forward
-<TR><TD>?,C-r<TD>Search backward
-<TR><TD>n<TD>Search next
-<TR><TD>N<TD>Search previous
-<TR><TD>C-w<TD>Toggle wrap search mode
-</table>
-
-<H3>Mark operation</H3>
-<table>
-<TR><TD WIDTH=100>C-SPC<TD>Set/unset mark
-<TR><TD>ESC p<TD>Go to previous mark
-<TR><TD>ESC n<TD>Go to next mark
-<TR><TD>"<TD>Mark by regular expression
-</table>
-
-<H3>Miscellany</H3>
-<table>
-<TR><TD WIDTH=100>!<TD>Execute shell command
-<TR><TD>H<TD>Help (load this file)
-<TR><TD>o<TD>Set option
-<TR><TD>C-k<TD>Show cookie jar
-<TR><TD>C-c<TD>Stop
-<TR><TD>C-z<TD>Suspend
-<TR><TD>q<TD>Quit (with confirmation, if you like)
-<TR><TD>Q<TD>Quit without confirmation
-</table>
-
-<H3>Line-edit mode</H3>
-<table>
-<TR><TD WIDTH=100>C-f<TD>Move cursor forward
-<TR><TD>C-b<TD>Move cursor backward
-<TR><TD>C-h<TD>Delete previous character
-<TR><TD>C-d<TD>Delete current character
-<TR><TD>C-k<TD>Kill everything after cursor
-<TR><TD>C-u<TD>Kill everything before cursor
-<TR><TD>C-a<TD>Move to the top of line
-<TR><TD>C-e<TD>Move to the bottom of line
-<TR><TD>C-p<TD>Fetch the previous string from the history list
-<TR><TD>C-n<TD>Fetch the next string from the history list
-<TR><TD>TAB,SPC<TD>Complete filename
-<TR><TD>RETURN<TD>Accept
-</table>
-
-<hr>
-<a name="Key:lynx"></a>
-<h2>Lynx-like key binding</h2>
-
-If you have chosen `Lynx-like key binding' at the compile time,
-you can use the following key binding.
-
-<H3>Page/Cursor motion</H3>
-<table>
-<TR><TD WIDTH=100>SPC,C-v,+<TD>Forward page
-<TR><TD>b,ESC v,-<TD>Previous page
-<TR><TD>l<TD>Cursor right
-<TR><TD>h<TD>Cursor left
-<TR><TD>j<TD>Cursor down
-<TR><TD>k<TD>Cursor up
-<TR><TD>J<TD>Roll up one line
-<TR><TD>K<TD>Roll down one line
-<TR><TD>^<TD>Go to the beginning of line
-<TR><TD>$<TD>Go to the end of line
-<TR><TD>><TD>Shift screen right
-<TR><TD><<TD>Shift screen left
-<TR><TD>C-a<TD>Go to the first line
-<TR><TD>C-e<TD>Go to the last line
-<TR><TD>G<TD>Go to the specified line
-<TR><TD>Z<TD>Move to the center line
-<TR><TD>z<TD>Move to the center column
-<TR><TD>TAB,C-n,Down arrow<TD>Move to next hyperlink
-<TR><TD>ESC TAB,C-p,Up arrow<TD>Move to previous link
-<TR><TD>C-g<TD>Show current page position
-</table>
-
+ </dd>
+<h3>Options for data output, followed by immediate exit</h3>
+ <dt>
+ -dump
+ </dt>
+ <dd>
+ <p>
+ read document specified by URL and dump page rendered as text
+ into standard output.
+ <!-- mh 2016-03-29 -->
+ Is set implicitly when output is directed
+ to a file or pipe. A width of 80 columns is used unless option
+ -cols sets another value.
+ </p>
+ </dd>
+ <dt>
+ -dump_source
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ dump the page's source code into stdout
+ </p>
+ </dd>
+ <dt>
+ -dump_head
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ dump response of a HEAD request for a URL into stdout
+ </p>
+ </dd>
+ <dt>
+ -dump_both
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ dump HEAD, and source code for a URL into stdout
-<H2>Hyperlink operation</H2>
-<table>
-<TR><TD WIDTH=100>RET, C-f, Right arrow<TD>Follow hyperlink
-<TR><TD>d, ESC RET<TD>Save link to file
-<TR><TD>u<TD>Peek link URL
-<TR><TD>i<TD>Peek image URL
-<TR><TD>I<TD>View inline image
-<TR><TD>ESC I<TD>Save inline image to file
-<TR><TD>:<TD>Mark URL-like strings as anchors
-<TR><TD>ESC :<TD>Mark Message-ID-like strings as news anchors
-<TR><TD>c<TD>Peek current URL
-<TR><TD>=<TD>Display information about current document
-<TR><TD>C-h<TD>View history of URL
-<TR><TD>F<TD>Render frame
-<TR><TD>M<TD>Browse current document using external browser
-(use 2M and 3M to invoke second and third browser)
-<TR><TD>ESC M<TD>Browse link using external browser
-(use 2ESC M and 3ESC M to invoke second and third browser)
-</table>
+ </p>
+ </dd>
+ <dt>
+ -dump_extra
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ dump HEAD, source code, and extra information for a URL into
+ stdout
+ </p>
+ </dd>
-<H2>File/Stream operation</H2>
-<table>
-<TR><TD WIDTH=100>g,U<TD>Open URL
-<TR><TD>V<TD>View new file
-<TR><TD>@<TD>Execute shell command and load
-<TR><TD>#<TD>Execute shell command and browse
-</table>
+<h3>Options for overriding default settings and resources</h3>
+
+ <dt>
+ -bookmark <i>file</i>
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ use <i>file</i> instead of the default bookmark.html file
+ </p>
+ </dd>
+ <dt>
+ -config <i>file</i>
+ </dt>
+ <dd>
+ <p>
+ <!--mh 2016-06-11-->
+ use <i>file</i> instead of the default configuration file
+ </p>
+ </dd>
+ <dt>
+ -o <i>option</i>=<i>value</i>
+ </dt>
+ <dd>
+ <p>
+ <!-- mh 2016-03-29-->
+ modify one configuration item with an explicitly given value; without <i>option=value</i>, equivalent to <i>-show-option</i>
+ </p>
+ </dd>
+ </dl>
+ <hr>
+ <h2 id="Color">
+ Document Colors
+ </h2>
+ <p>
+ Hyperlinks and images are displayed as follows.
+ </p>
+ <div align="center">
+ <table border="1">
+ <tr>
+ <th>
+ </th>
+ <th>
+ Color mode
+ </th>
+ <th>
+ Monochrome mode
+ </th>
+ </tr>
+ <tr>
+ <td>
+ Hyperlinks
+ </td>
+ <td>
+ blue
+ </td>
+ <td>
+ underline
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Inline images
+ </td>
+ <td>
+ green
+ </td>
+ <td>
+ reverse
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Form input
+ </td>
+ <td>
+ red
+ </td>
+ <td>
+ reverse
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ These colors can be customized using the options setting command
+ <i>o</i>.
+ </p>
+ <hr>
+ <h2 id="Functions">
+ Functions and Key bindings
+ </h2>
+
+ <p>
+ After invocation, you can control w3m by typing in functions by name
+ or with keystroke combinations bound to a function. There are
+ default key bindings.
+<!-- mh 2016-06-13 obsolete
+ If you prefer using Lynx-like
+ key bindings, make w3m start with the respective keymap file keymap.lynx. (see w3m (1)).-->
+ </p>
+<!--
+ <h2 id="Key:custom">
+ Key customization
+ </h2>
+-->
+ <p>
+ You can customize the key bindings (except those for menu
+ operations and line-editing) in a ~/.w3m/keymap file. For example,
+ </p>
-<H2>Buffer operation</H2>
-<table>
-<TR><TD WIDTH=100>B, C-b, Left arrow<TD>Back to the previous buffer
-<TR><TD>\<TD>View HTML source
-<TR><TD>s, C-h<TD>Select buffer
-<TR><TD>E<TD>Edit buffer source
-<TR><TD>C-l, C-w<TD>Redraw screen
-<TR><TD>R, C-r<TD>Reload buffer
-<TR><TD>S, p<TD>Save buffer
-<TR><TD>ESC s<TD>Save source
-<TR><TD>ESC e<TD>Edit buffer image
-</table>
-
-<H2>Buffer selection mode</H2>
-<table>
-<TR><TD WIDTH=100>k, C-p<TD>Select previous buffer
-<TR><TD>j, C-n<TD>Select next buffer
-<TR><TD>D<TD>Delect current buffer
-<TR><TD>RET<TD>Go to the selected buffer
-</table>
-
-<H2>Bookmark operation</H2>
-<table>
-<TR><TD WIDTH=100>v, ESC b<TD>Load bookmark
-<TR><TD>a, ESC a<TD>Add current to bookmark
-</table>
-
-<H2>Search</H2>
-<table>
-<TR><TD WIDTH=100>/, C-s<TD>Search forward
-<TR><TD>n<TD>Search next
-<TR><TD>w<TD>Toggle wrap search mode
-</table>
-
-<H2>Mark operation</H2>
-<table>
-<TR><TD WIDTH=100>C-SPC<TD>Set/unset mark
-<TR><TD>P<TD>Go to previous mark
-<TR><TD>N<TD>Go to next mark
-<TR><TD>"<TD>Mark by regular expression
-</table>
-
-<H2>Miscellany</H2>
-<table>
-<TR><TD WIDTH=100>!<TD>Execute shell command
-<TR><TD>H, ?<TD>Help (load this file)
-<TR><TD>o<TD>Set option
-<TR><TD>C-k<TD>Show cookie jar
-<TR><TD>C-c<TD>Stop
-<TR><TD>C-z<TD>Suspend
-<TR><TD>q<TD>Quit (with confirmation, if you like)
-<TR><TD>Q<TD>Quit without confirmation
-</table>
-
-<H2>Line-edit mode</H2>
-<table>
-<TR><TD WIDTH=100>C-f<TD>Move cursor forward
-<TR><TD>C-b<TD>Move cursor backward
-<TR><TD>C-h<TD>Delete previous character
-<TR><TD>C-d<TD>Delete current character
-<TR><TD>C-k<TD>Kill everything after cursor
-<TR><TD>C-u<TD>Kill everything before cursor
-<TR><TD>C-a<TD>Move to the top of line
-<TR><TD>C-e<TD>Move to the bottom of line
-<TR><TD>C-p<TD>Fetch the previous string from the history list
-<TR><TD>C-n<TD>Fetch the next string from the history list
-<TR><TD>TAB,SPC<TD>Complete filename
-<TR><TD>RETURN<TD>Accept
-</table>
-
-<hr>
-<a name="Mouse"></a>
-<h2>Mouse operation</h2>
-If w3m is compiled with mouse option and you are using
-xterm/kterm/rxvt (in this case, you have to set the TERM
-environment variable to `xterm' or `kterm'.) or GPM
-environment, you can use mouse
-for the navigation.
-<p>
-<table border=0>
-<tr><td>left click
-<td>Move the cursor to the place pointed by the mouse cursor.
-If you click the cursor and it is on an anchor, follow the anchor.
-<tr><td>middle click
-<td>Back to the previous buffer.
-<tr><td>right click
-<td>Open pop-up menu. You can choose an item by clicking it.
-<tr><td>left drag
-<td>Scroll document. The default behavior is to grab the document
-and drag it. You can reverse the behavior (grab the window and drag it)
-with the option setting panel.
-</table>
-<p>
+<pre>
+ keymap C-o NEXT_PAGE
+</pre>
+ <p>
+ binds the command <span class="mono">NEXT_PAGE</span> (normally bound to SPC and C-v)
+ to control-o. See <a href="README.func">README.func</a> for a list
+ of available functions. Original and Lynx-like keymap definitions
+ are provided as examples: <a href="keymap.default">keymap.default</a>
+ and <a href="keymap.lynx">keymap.lynx</a>.
+ </p>
-<hr>
-<a name="Key:custom"></a>
-<h2>Key customization</h2>
-You can customize the key binding (except line-editing keymap)
-by describing ~/.w3m/keymap. For example,
-<pre>
+ <p>
+ Throughout, the <i>C-</i> and <i>M-</i> notations indicate the
+ modifiers <i>control</i> and <i>meta</i>. The <i>ALT</i>-key
+ replaces the latter whereas pressing the <i>ESC</i>-key toggles
+ between <i>meta</i>-modified and simple keystrokes. The minus
+ indicates pressing the keys simultaneously wheras a space
+ represents that one key is pressed after the other, i.e. <i>2 M</i>
+ simply means <i>2</i> followed by <i>M</i>.
+ </p>
- keymap C-o NEXT_PAGE
-</pre>
-binds `NEXT_PAGE' function (normally bound to SPC and C-v)
-to control-o. See <a href="README.func">README.func</a> for
-list of available functions. Original and Lynx-like keymap
-definitions are provided (<a href="keymap.default">keymap.default</a>
-and <a href="keymap.lynx">keymap.lynx</a>) as examples.
+ <table border="1" width="100%">
+ <colgroup>
+ <col width="20%">
+ <col width="20%">
+ <col width="20%">
+ <col width="40%">
+ </colgroup>
+ <tr>
+ <th rowspan="2">
+ Function
+ </th>
+ <th colspan="2">Key binding
+ </th>
+ <th rowspan="2">
+ Description
+ </th>
+ </tr>
+ <tr>
+ <th>
+ Default
+ </th>
+ <th>
+ Lynx-like
+ </th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <h3>In-page navigation</h3>
+</td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_PAGE
+ </td>
+ <td>
+ SPC, C-v, +, PGDN
+ </td>
+ <td>
+ SPC, C-v, +
+ </td>
+ <td>
+ Scroll one page downwards
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREVIOUS_PAGE
+ </td>
+ <td>
+ b, M-v, -, PGUP
+ </td>
+ <td>
+ b, M-v, -
+ </td>
+ <td>
+ Scroll one page upwards
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MOVE_RIGHT
+ </td>
+ <td>
+ l, C-f, RIGHT
+ </td>
+ <td>
+ l
+ </td>
+ <td>
+ Move cursor right (with a half-screen shift at the screen edge)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MOVE_LEFT
+ </td>
+ <td>
+ h, C-b, LEFT
+ </td>
+ <td>
+ h
+ </td>
+ <td>
+ Move cursor left (with a half-screen shift at the screen edge)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MOVE_DOWN
+ </td>
+ <td>
+ j, C-n, DOWN
+ </td>
+ <td>
+ j
+ </td>
+ <td>
+ Move cursor down (with a one-line scroll at the screen edge)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MOVE_UP
+ </td>
+ <td>
+ k, C-p, UP
+ </td>
+ <td>
+ k
+ </td>
+ <td>
+ Move cursor up (with a one-line scroll at the screen edge)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ UP
+ </td>
+ <td>
+ J
+ </td>
+ <td>
+ J
+ </td>
+ <td>
+ Scroll the screen up one line
+ </td>
+ </tr>
+ <tr>
+ <td>
+ DOWN
+ </td>
+ <td>
+ K
+ </td>
+ <td>
+ K
+ </td>
+ <td>
+ Scroll the screen down one line
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LINE_BEGIN
+ </td>
+ <td>
+ ^, C-a
+ </td>
+ <td>
+ ^
+ </td>
+ <td>
+ Go to the beginning of the line
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LINE_END
+ </td>
+ <td>
+ $, C-e
+ </td>
+ <td>
+ $
+ </td>
+ <td>
+ Go to the end of the line
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_WORD
+ </td>
+ <td>
+ w
+ </td>
+ <td>
+ w
+ </td>
+ <td>
+ Move to the next word
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREVIOUS_WORD
+ </td>
+ <td>
+ W
+ </td>
+ <td>
+ W
+ </td>
+ <td>
+ Move to the previous word
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SHIFT_RIGHT
+ </td>
+ <td>
+ >
+ </td>
+ <td>
+ >
+ </td>
+ <td>
+ Shift screen right
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SHIFT_LEFT
+ </td>
+ <td>
+ <
+ </td>
+ <td>
+ <
+ </td>
+ <td>
+ Shift screen left
+ </td>
+ </tr>
+ <tr>
+ <td>
+ RIGHT
+ </td>
+ <td>
+ .
+ </td>
+ <td>
+ .
+ </td>
+ <td>
+ Shift screen one column right
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LEFT
+ </td>
+ <td>
+ ,
+ </td>
+ <td>
+ ,
+ </td>
+ <td>
+ Shift screen one column left
+ </td>
+ </tr>
+ <tr>
+ <td>
+ BEGIN
+ </td>
+ <td>
+ g, M-<, HOME
+ </td>
+ <td>
+ C-a, M-<
+ </td>
+ <td>
+ Go to the first line
+ </td>
+ </tr>
+ <tr>
+ <td>
+ END
+ </td>
+ <td>
+ G, M->, END
+ </td>
+ <td>
+ C-e, M->
+ </td>
+ <td>
+ Go to the last line
+ </td>
+ </tr>
+ <tr>
+ <td>
+ GOTO_LINE
+ </td>
+ <td>
+ M-g
+ </td>
+ <td>
+ G
+ </td>
+ <td>
+ Go to the specified line
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LINE_INFO
+ </td>
+ <td>
+ C-g
+ </td>
+ <td>
+ C-g
+ </td>
+ <td>
+ Display current position in document
+ </td>
+ </tr>
+ <tr>
+ <td>
+ CENTER_H
+ </td>
+ <td>
+ Z
+ </td>
+<!--Correction by mh 2014-04-06
+Description for keybinding of z and Z had been mingled
+-->
+ <td>
+ Z
+ </td>
+ <td>
+ Center screen right and left of the cursor column
+ </td>
+ </tr>
+ <tr>
+ <td>
+ CENTER_V
+ </td>
+ <td>
+ z
+ </td>
+ <td>
+ z
+ </td>
+ <td>
+ Center screen above and below the cursor line
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_LINK
+ </td>
+ <td>
+ TAB
+ </td>
+ <td>
+ TAB, C-n, DOWN
+ </td>
+ <td>
+ Move to the next hyperlink
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREVIOUS_LINK
+ </td>
+ <td>
+ M-TAB, C-u
+ </td>
+ <td>
+ M-TAB, C-u, C-p, UP
+ </td>
+ <td>
+ Move to the previous hyperlink
+ </td>
+<!-- Annotion mh 2016-04-06
+Keybinding description for C-g had been moved as it did not fit to "Hyperlink operation" and position in the default and lynx-like series differed
+ -->
+ </tr>
+ <tr>
+ <td>
+ LINK_BEGIN
+ </td>
+ <td>
+ [
+ </td>
+ <td>
+ [
+ </td>
+ <td>
+ Move to the first hyperlink
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LINK_END
+ </td>
+ <td>
+ ]
+ </td>
+ <td>
+ ]
+ </td>
+ <td>
+ Move to the last hyperlink
+ </td>
+ </tr>
+<tr>
+<td>MOVE_LIST_MENU</td>
+<td>M-m</td>
+<td>M-m</td>
+<td>Pop up menu to navigate between hyperlinks</td>
+</tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Hyperlink Operations</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ GOTO_LINK
+ </td>
+ <td>
+ C-j, C-m, RET
+ </td>
+ <td width="100">
+ C-f, C-j, C-m, RET, RIGHT
+ </td>
+ <td>
+ Follow current hyperlink in a new buffer
+ </td>
+ </tr>
+<tr>
+<td>LIST_MENU</td>
+<td>M-l</td>
+<td>M-l</td>
+<td>Pop up hyperlink menu and select one to be followed</td>
+</tr>
+ <tr>
+ <td>
+ SAVE_LINK
+ </td>
+ <td>
+ a, M-RET
+ </td>
+ <td>
+ d, M-RET
+ </td>
+ <td>
+ Save the hyperlink target
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PEEK_LINK
+ </td>
+ <td>
+ u
+ </td>
+ <td>
+ u
+ </td>
+ <td>
+ Show target address
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PEEK_IMG
+ </td>
+ <td>
+ i
+ </td>
+ <td>
+ i
+ </td>
+ <td>
+ Show image address
+ </td>
+ </tr>
+ <tr>
+ <td>
+ VIEW_IMAGE
+ </td>
+ <td>
+ I
+ </td>
+ <td>
+ I
+ </td>
+ <td>
+ Display image in viewer
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SAVE_IMAGE
+ </td>
+ <td>
+ M-I
+ </td>
+ <td>
+ M-I
+ </td>
+ <td>
+ Save inline image
+ </td>
+ </tr>
+<tr>
+<td>MARK_WORD</td>
+<td>;</td>
+<td>;</td>
+<td>Turn current word into hyperlink</td>
+</tr>
+ <tr>
+ <td>
+ MARK_URL
+ </td>
+ <td>
+ :
+ </td>
+ <td>
+ :
+ </td>
+ <td>
+ Turn URL-like strings into hyperlinks
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MARK_MID
+ </td>
+ <td>
+ M-:
+ </td>
+ <td>
+ M-:
+ </td>
+ <td>
+<!-- changed due to mail dated Mon, 04 Apr 2016 00:47:09 +0900 (JST)
+from Tatsuya Kinoshita -->
+ Turn Message-ID-like strings into hyperlinks
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PEEK
+ </td>
+ <td>
+ c
+ </td>
+ <td>
+ c
+ </td>
+ <td>
+ Show current address
+ </td>
+ </tr>
+ <tr>
+ <td>
+ INFO
+ </td>
+ <td>
+ =
+ </td>
+ <td>
+ =
+ </td>
+ <td>
+ Display information about the current document
+ </td>
+ </tr>
+ <tr>
+ <td>
+ HISTORY
+ </td>
+ <td>
+ C-h
+ </td>
+ <td>
+ C-h
+ </td>
+ <td>
+ Show browsing history
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EXTERN
+ </td>
+ <td>
+ M
+ </td>
+ <td>
+ M
+ </td>
+ <td>
+ Browse current document using external browser (prefix 2, 3, ...,
+ or 9 to invoke alternate configured browsers, e.g. 3 M)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EXTERN_LINK
+ </td>
+ <td>
+ M-M
+ </td>
+ <td>
+ M-M
+ </td>
+ <td>
+ Browse link using external browser (prefixed as above, e.g.
+ 3 M-M)
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Bookmark management</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ BOOKMARK
+ </td>
+ <td>
+ M-b
+ </td>
+ <td>
+ v, M-b
+ </td>
+ <td>
+ View bookmarks
+ </td>
+ </tr>
+ <tr>
+ <td>
+ ADD_BOOKMARK
+ </td>
+ <td>
+ M-a
+ </td>
+ <td>
+ a, M-a
+ </td>
+ <td>
+ Add current page to bookmarks
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>File/Stream Operations</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ GOTO
+ </td>
+ <td>
+ U
+ </td>
+ <td>
+ g, U
+ </td>
+ <td>
+ Open specified document in a new buffer
+ </td>
+ </tr>
+<tr>
+<td>GOTO_RELATIVE</td>
+<td>M-u</td>
+<td>M-u</td>
+<td>Open relative address in a new buffer</td>
+</tr>
+ <tr>
+ <td>
+ LOAD
+ </td>
+ <td>
+ V
+ </td>
+ <td>
+ V
+ </td>
+ <td>
+ Open local file in a new buffer
+ </td>
+ </tr>
+ <tr>
+ <td>
+ READ_SHELL
+ </td>
+ <td>
+ @
+ </td>
+ <td>
+ @
+ </td>
+ <td>
+ <!--Execute shell command and view output-->
+ <!--mh 2016-06-13 No difference to PIPE_SHELL could be discerned-->
+ Execute shell command and display output in a new buffer
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PIPE_SHELL
+ </td>
+ <td>
+ #
+ </td>
+ <td>
+ #
+ </td>
+ <td>
+ <!--Execute shell command and browse output-->
+ <!--mh 2016-06-13 No difference to READ_SHELL could be discerned-->
+ Execute shell command and display output in a new buffer
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Content Operations</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ VIEW <!-- is an alias to SOURCE -->
+ </td>
+ <td>
+ v
+ </td>
+ <td>
+ \
+ </td>
+ <td>
+ Toggle between source code and rendered view of the document
+ </td>
+ </tr>
+<tr>
+<td>LIST</td>
+<td>L</td>
+<td>L</td>
+<td>List link elements, hyperlinks and images</td>
+</tr>
+ <tr>
+ <td>
+ FRAME
+ </td>
+ <td>
+ F
+ </td>
+ <td>
+ F
+ </td>
+ <td>
+ Toggle rendering HTML frames
+ </td>
+ </tr>
+ <tr>
+ <td>
+ REDRAW
+ </td>
+ <td>
+ C-l
+ </td>
+ <td>
+ C-l, C-w
+ </td>
+ <td>
+ Draw the screen anew
+ </td>
+ </tr>
+ <tr>
+ <td>
+ RELOAD
+ </td>
+ <td>
+ R
+ </td>
+ <td>
+ R, C-r
+ </td>
+ <td>
+ Load current document anew
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EDIT
+ </td>
+ <td>
+ E
+ </td>
+ <td>
+ E
+ </td>
+ <td>
+ Edit local source
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EDIT_SCREEN
+ </td>
+ <td>
+ M-e
+ </td>
+ <td>
+ M-e
+ </td>
+ <td>
+ Edit rendered copy of document
+ </td>
+ </tr>
+<tr>
+<td>PIPE_BUF</td>
+<td>|</td>
+<td>|</td>
+<td>Pipe current buffer through a shell command and display output</td>
+</tr>
+ <tr>
+ <td>
+ DOWNLOAD <!-- is an alias to SAVE -->
+ </td>
+ <td>
+ M-s
+ </td>
+ <td>
+ M-s
+ </td>
+ <td>
+ Save document source
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SAVE_SCREEN
+ </td>
+ <td>
+ S
+ </td>
+ <td>
+ S, p
+ </td>
+ <td>
+ Save rendered document
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Buffer/Tab Navigation</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ BACK
+ </td>
+ <td>
+ B
+ </td>
+ <td>
+ B, C-b, LEFT
+ </td>
+ <td>
+ Close current buffer and return to the one below in stack
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SELECT_MENU
+ </td>
+ <td>
+ s
+ </td>
+ <td>
+ s, C-h
+ </td>
+ <td>
+ Pop up buffer-stack menu
+ </td>
+ </tr>
+ <tr>
+ <td>
+ TAB_MENU
+ </td>
+ <td>
+ M-t
+ </td>
+ <td>
+ M-t
+ </td>
+ <td>
+ Pop up tab selection menu
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEW_TAB
+ </td>
+ <td>
+ T
+ </td>
+ <td>
+ T
+ </td>
+ <td>
+ Open a new tab (with current document)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ TAB_LINK
+ </td>
+ <td>
+ C-t
+ </td>
+ <td>
+ C-t
+ </td>
+ <td>
+ Follow current hyperlink in a new tab
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_TAB
+ </td>
+ <td>
+ }
+ </td>
+ <td>
+ }
+ </td>
+ <td>
+ Switch to the next tab
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREV_TAB
+ </td>
+ <td>
+ {
+ </td>
+ <td>
+ {
+ </td>
+ <td>
+ Switch to the previous tab
+ </td>
+ </tr>
+ <tr>
+ <td>
+ CLOSE_TAB
+ </td>
+ <td>
+ C-q
+ </td>
+ <td>
+ C-q
+ </td>
+ <td>
+ Close the current tab
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Searches</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ SEARCH
+ </td>
+ <td>
+ /
+ </td>
+ <td>
+ /, C-s
+ </td>
+ <td>
+ Search forward
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SEARCH_BACK
+ </td>
+ <td>
+ ?
+ </td>
+ <td>
+ </td>
+ <td>
+ Search backward
+ </td>
+ </tr>
+ <tr>
+ <td>
+ ISEARCH
+ </td>
+ <td>
+ C-s
+ </td>
+ <td>
+ </td>
+ <td>
+ Incremental search forward
+ </td>
+ </tr>
+ <tr>
+ <td>
+ ISEARCH_BACK
+ </td>
+ <td>
+ C-r
+ </td>
+ <td>
+ </td>
+ <td>
+ Incremental search backward
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SEARCH_NEXT
+ </td>
+ <td>
+ n
+ </td>
+ <td>
+ n
+ </td>
+ <td>
+ Continue search forward
+ </td>
+ </tr>
+ <tr>
+ <td>
+ SEARCH_PREV
+ </td>
+ <td>
+ N
+ </td>
+ <td>
+ </td>
+ <td>
+ Continue search backward
+ </td>
+ </tr>
+ <tr>
+ <td>
+ WRAP_TOGGLE
+ </td>
+ <td>
+ C-w
+ </td>
+ <td>
+ w
+ </td>
+ <td>
+ Toggle wrapping mode in searches
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Mark Management</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ MARK
+ </td>
+ <td>
+ C-SPC
+ </td>
+ <td>
+ C-SPC
+ </td>
+ <td>
+ Set/unset mark
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PREV_MARK
+ </td>
+ <td>
+ M-p
+ </td>
+ <td>
+ P
+ </td>
+ <td>
+ Go to the previous mark
+ </td>
+ </tr>
+ <tr>
+ <td>
+ NEXT_MARK
+ </td>
+ <td>
+ M-n
+ </td>
+ <td>
+ N
+ </td>
+ <td>
+ Go to the next mark
+ </td>
+ </tr>
+ <tr>
+ <td>
+ REG_MARK
+ </td>
+ <td>
+ "
+ </td>
+ <td>
+ "
+ </td>
+ <td>
+ Mark all occurrences of a pattern
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="4">
+ <h3>Miscellaneous</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ COMMAND
+ </td>
+ <td>
+ M-c
+ </td>
+ <td>
+ M-c
+ </td>
+ <td>
+ Invoke one or more semicolon-separated w3m functions
+ </td>
+ </tr>
+<!--
+TODO: Where does this key binding M-Fn come from. I do not find a Fn-key on my keyboard. I do not know how to type in the keystroke combinations listed in keymap.default which are
+keymap M-[E MENU
+keymap M-[L MENU
+keymap M-[2~ MENU
+keymap M-[28~ MENU
+<tr>
+<td>MENU</td>
+<Td>M-Fn</Td>
+<td></td>
+<td>Pop up menu</td>
+</tr>
+-->
+ <tr>
+ <td>
+ HELP
+ </td>
+ <td>
+ H
+ </td>
+ <td>
+ H, ?
+ </td>
+ <td>
+ Show help panel
+ </td>
+ </tr>
+ <tr>
+ <td>
+ OPTIONS
+ </td>
+ <td>
+ o
+ </td>
+ <td>
+ o
+ </td>
+ <td>
+ Display options setting panel
+ </td>
+ </tr>
+<tr>
+<td>SET_OPTION</td>
+<td>M-o</td>
+<td>M-o</td>
+<td>Set option</td>
+</tr>
+<tr>
+<td>DEFINE_KEY</td>
+<td>M-k</td>
+<td>M-k</td>
+<td>Define a binding between a key stroke combination and a command</td>
+</tr>
+<tr>
+<td>MOUSE_TOGGLE</td>
+<td>m</td>
+<td>m</td>
+<td>Toggle mouse support</td>
+</tr>
+<tr>
+<td>DOWNLOAD_LIST</td>
+<td>D</td>
+<td>D</td>
+<td>Display downloads panel</td>
+</tr>
+ <tr>
+ <td>
+ COOKIE
+ </td>
+ <td>
+ C-k
+ </td>
+ <td>
+ C-k
+ </td>
+ <td>
+ Show cookie jar
+ </td>
+ </tr>
+<!--
+mh 2016-06-12 Interrupt is an alias to SUSPEND, no need to mention it here
+ <tr>
+ <td>
+ INTERRUPT
+ </td>
+ <td>
+ C-c
+ </td>
+ <td>
+ C-c
+ </td>
+ <td>
+ Interrupt
+ </td>
+ </tr>
+-->
+<tr>
+<td>UNDO</td>
+<td>(</td>
+<td>(</td>
+<td>Cancel the last cursor movement</td>
+</tr>
+<tr>
+<td>REDO</td>
+<td>)</td>
+<td>)</td>
+<td>Cancel the last undo</td>
+</tr>
+ <tr>
+ <td>
+ EXEC_SHELL <!-- is an alias of SHELL -->
+ </td>
+ <td>
+ !
+ </td>
+ <td>
+ !
+ </td>
+ <td>
+ Execute shell command
+ </td>
+ </tr>
+<tr>
+<td>DICT_WORD</td>
+<td>M-w</td>
+<td>M-w</td>
+<td>Execute dictionary command (see <a href="README.dict">README.dict</a>)</td>
+</tr>
+<tr>
+<td>DICT_WORD_AT</td>
+<td>M-W</td>
+<td>M-W</td>
+<td>Execute dictionary command for word at cursor</td>
+</tr>
+<tr>
+<td>VERSION</td>
+<td>r</td>
+<td>r</td>
+<td>Display the version of w3m</td>
+</tr>
+ <tr>
+ <td>
+ SUSPEND
+ </td>
+ <td>
+ C-z
+ </td>
+ <td>
+ C-z
+ </td>
+ <td>
+ Suspend w3m to background. (To be withdrawn with shell
+ command <span class="mono">fg</span>.)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ QUIT
+ </td>
+ <td>
+ q
+ </td>
+ <td>
+ q
+ </td>
+ <td>
+ Quit with confirmation request
+ </td>
+ </tr>
+ <tr>
+ <td>
+ EXIT
+ </td>
+ <td>
+ Q
+ </td>
+ <td>
+ Q
+ </td>
+ <td>
+ Quit at once
+ </td>
+ </tr>
+ </table>
-<hr>
-<a name="LocalCGI"></a>
-<h2>Local CGI</h2>
-You can run CGI scripts using w3m, without any HTTP server.
-It means that w3m behaves like an HTTP server and activates CGI script,
-then w3m reads the output of the script and display it. The
-<a href="file:///$LIB/w3mbookmark?mode=panel&bmark=~/.w3m/bookmark.html&url=MANUAL.html&title=w3m+manual">bookmark registration</a>
-and <a href="file:///$LIB/w3mhelperpanel?mode=panel">helper-app editor</a>
-are realized as local CGI scripts.
-Using local CGI, w3m can be used as a general purpose form interface.
-<P>
-For security reason, CGI scripts invoked by w3m must be in one of
-these directories.
-<ul>
-<li>The directory where w3m-related files are stored
-(typically /usr/local/lib/w3m). This directory can be referred
-as $LIB.
-<li>/cgi-bin/ directory. You can map /cgi-bin/ to any directory you like
-with option setting panel (``Directory corresponds to /cgi-bin'' field).
-You can specify multiple paths separated by `:', like
-/usr/local/cgi-bin:/home/aito/cgi-bin. To use /cgi-bin/ directory,
-you must use file:/cgi-bin URL as follows:
+ <p>
+ There are the following operational modes with built-in key
+ bindings for relevant functions. These bindings are not subject to
+ the DEFINE_KEY function or entries in the file keymap.
+ </p>
+
+ <table border="1" width="100%">
+ <colgroup>
+ <col width="20%">
+ <col width="40%">
+ <col width="40%">
+ </colgroup>
+ <tr>
+ <th>
+ Function<br>(internal name)
+ </th>
+ <th>Key binding
+ </th>
+ <th>
+ Description
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <h3>Menu Selection Mode</h3>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ BUF:NEXT</td>
+ <td>
+ j, C-n, DOWN
+ </td>
+ <td>
+ Next item
+ </td>
+ </tr>
+ <tr>
+ <td>BUF:PREV
+ </td>
+ <td>
+ k, C-p, UP
+ </td>
+ <td>
+ Previous item
+ </td>
+ </tr>
+ <tr>
+ <td>
+ BUF:DELETE</td>
+ <td>
+ D
+ </td>
+ <td>
+ Delete item
+ </td>
+ </tr>
+ <tr>
+ <td>
+ BUF:GO
+ </td>
+ <td>
+ SPC, RET, RIGHT
+ </td>
+ <td>
+ Select item
+ </td>
+ </tr>
+<!-- </table>-->
+ <tr>
+ <td colspan="3">
+ <h3>Popup Menu Mode</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+MENU:SELECT
+ </td>
+ <td>
+ SPC, RET, RIGHT</td>
+ <td>
+ Select
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:CLOSE
+ </td>
+ <td>C-c
+ </td>
+ <td>
+ Close menu
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:CANCEL
+ </td>
+ <td>
+ LEFT, BKSPC, C-h</td>
+ <td>
+ One selection step backward
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:DOWN
+ </td>
+ <td>j, C-n, DOWN
+ </td>
+ <td>
+ Move to the next item
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:UP
+ </td>
+ <td>
+ k, C-p, UP</td>
+ <td>
+ Move to the previous item
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:LINE_UP
+ </td>
+ <td>K
+ </td>
+ <td>
+ Scroll up one item
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:LINE_DOWN
+ </td>
+ <td>J
+ </td>
+ <td>
+ Scroll down one item
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:TOP
+ </td>
+ <td>C-a
+ </td>
+ <td>
+ Move to the first item
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:LAST
+ </td>
+ <td>C-e
+ </td>
+ <td>
+ Move to the final item
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:NEXT
+ </td>
+ <td>C-v, C-f
+ </td>
+ <td>Go to the next page
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:PREV
+ </td>
+ <td>ESC v, C-b
+ </td>
+ <td>
+ Go to the previous page
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:SEARCH_FORE
+ </td>
+ <td>C-s, /
+ </td>
+ <td>
+ Search forward
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:SEARCH_BACK
+ </td>
+ <td>
+ C-r, ?</td>
+ <td>
+ Search backward
+ </td>
+ </tr>
+ <tr>
+ <td>
+MENU:SEARCH_NEXT
+ </td>
+ <td>
+ n</td>
+ <td>
+ Search for the next match</td>
+ </tr>
+ <tr>
+ <td>
+MENU:SEARCH_PREV
+ </td>
+ <td>
+ N</td>
+ <td>
+ Search for the previous match</td>
+ </tr>
+<!--mh 2016-06-12 Pressing C-z in menu mode (with menu active) has the same effect as in normal operation of w3m: Browser gets in the background
+ <tr>
+ <td>
+MENU:SUSPEND
+ </td>
+ <td>
+ C-z</td>
+ <td>
+ Suspend</td>
+ </tr>
+-->
+<!-- </table>-->
+ <tr>
+ <td colspan="3">
+ <h3>Line-editing Mode</h3>
+ </td>
+ </tr>
+<!-- <table>-->
+ <tr>
+ <td>
+ LINEEDIT:FORWARD
+ </td>
+ <td width="100">
+ C-f, RIGHT
+ </td>
+ <td>
+ Move cursor forward
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:BACK
+ </td>
+ <td>
+ C-b, LEFT
+ </td>
+ <td>
+ Move cursor backward
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:BS
+ </td>
+ <td>
+ C-h, BKSPC
+ </td>
+ <td>
+ Delete previous character
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:DEL
+ </td>
+ <td>
+ C-d
+ </td>
+ <td>
+ Delete current character
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:KILL_AFTER
+ </td>
+ <td>
+ C-k
+ </td>
+ <td>
+ Delete everything after cursor
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:KILL_BEFORE
+ </td>
+ <td>
+ C-u
+ </td>
+ <td>
+ Delete everything before cursor
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:TOP
+ </td>
+ <td>
+ C-a
+ </td>
+ <td>
+ Move to the beginning of the line
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:BOTTOM
+ </td>
+ <td>
+ C-e
+ </td>
+ <td>
+ Move to the end of the line
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:PREV
+ </td>
+ <td>
+ C-p, UP
+ </td>
+ <td>
+ Fetch the previous string from the history list
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:NEXT
+ </td>
+ <td>
+ C-n, DOWN
+ </td>
+ <td>
+ Fetch the next string from the history list
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:COMPLETE
+ </td>
+ <td>
+ TAB, SPC
+ </td>
+ <td>
+ Try to complete filename
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:EDITOR
+ </td>
+ <td>
+ C-o
+ </td>
+ <td>
+ Edit with external editor
+ </td>
+ </tr>
+ <tr>
+ <td>
+LINEEDIT:ACCEPT
+ </td>
+ <td>
+ RET
+ </td>
+ <td>
+ Accept input line
+ </td>
+ </tr>
+ </table>
+<!-- mh 2016-06-12 As it suffices to use the provided keymap file for Lynx-like keybindings and this file is listed in section FILES of man w3m (1), the following hint for getting w3m with Lynx-like key bindings has been deleted.
+ <p>
+ If w3m was compiled with <q>Lynx-like key bindings</q>, you can use
+ the following key bindings.
+ </p>
+-->
+<!-- mh 2016-06-12 Remark is obsolete as the two sets key binding are presented along within tables
+ <hr>
+ <h2 id="Key:lynx">
+ <p>
+ The Lynx-like configuration leaves keymappings unchanged in the
+ menu-selection and line-editing modes.
+ </p>
+ </h2>
+-->
+ <hr>
+ <h2 id="Mouse">
+ Mouse Operation
+ </h2>
+ <p>
+ If w3m is compiled with mouse support and you are invoking w3m
+ either from a console with GPM or from an X terminal emulator, you
+ can use the mouse for navigation (in the case of rxvt, you need to
+ set the TERM environment variable to <q>xterm</q> or <q>kterm</q>).
+ </p>
+ <p>An introduction to configure mouse actions is provided
+ with <a href="README.mouse">README.mouse</a>.
+ </p>
+ <table border="1">
+ <colgroup>
+ <col width="20%">
+ <col width="80%">
+ </colgroup>
+ <tr>
+ <th>Operation
+ </th>
+ <th>Description
+ </th>
+ </tr>
+ <tr>
+ <td>
+ left click
+ </td>
+ <td>
+<b>First:</b><br>
+Moves the cursor to the place indicated by the mouse pointer.<br>
+<b>Then:</b><br>
+Follows a hyperlink the cursor is currently located and the mouse points to.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ middle click
+ </td>
+ <td>
+ Back to the previous buffer.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ right click
+ </td>
+ <td>
+ Open pop-up menu. You can choose an item by clicking it.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ left drag
+ </td>
+ <td>
+ Scroll document. The default behavior is to grab the document
+ and drag it. You can reverse the behavior (grab the window and
+ drag it) with the options setting panel.
+ </td>
+ </tr>
+ </table>
+ <hr>
+ <h2 id="LocalCGI">
+ Local CGI scripts
+ </h2>
+ <p>
+ You can run CGI scripts using w3m, without any HTTP server.
+ This means that w3m behaves like an HTTP server and runs the CGI
+ script, then reads the output of the script and displays it. For
+ example, the bookmark registration system and default directory
+ browser are realized as local CGI scripts. Moreover, such scripts
+ allow w3m to be used as a form interface to acquire all kinds of
+ data.
+ </p>
+ <p>
+ For security reason, CGI scripts invoked by w3m must be in one of
+ the following directories:
+ </p>
+ <ul>
+ <li>
+ The directory where w3m-related files are stored (typically
+ /usr/local/lib/w3m). This directory can be referenced as $LIB.
+ </li>
+ <li>
+ The /cgi-bin/ directory. You can map /cgi-bin/ to any directory you
+ like in the options setting panel (the <q>Directory corresponds to
+ /cgi-bin</q> field). You can specify multiple paths separated by
+ <q>:</q>, like /usr/local/cgi-bin:/home/aito/cgi-bin. It is not
+ recommended to include the current directory to this path. To use
+ a /cgi-bin/ directory, you must use a file:/cgi-bin URL as follows:
+ </li>
<pre>
w3m -o cgi_bin=/path/to/cgi-bin file:/cgi-bin/script.cgi
</pre>
-It is not recommended to include current directory to this path.
-</ul>
-<p>
-The CGI script can use special header `w3m-control:' to control w3m.
-This field can take any function (see <a href="README.func">README.func</a>),
-and the specified function is invoked after the document is displayed.
-For example, The CGI output
+ </ul>
+ <p>
+ The CGI script can use the special header
+ <span class="mono">w3m-control:</span> to
+ control w3m. This field can take any function (see
+ <a href="README.func">README.func</a>), and the specified function
+ is invoked after the document is displayed. For example, the CGI
+ output
+ </p>
<pre>
-
Content-Type: text/plain
W3m-control: BACK
-
</pre>
-will display blank page and delete that buffer immediately.
-This is useful when you don't want to display any page after
-the script is invoked. The next example
+ <p>
+ will display a blank page and delete that buffer immediately.
+ This is useful when you don't want to display any page after
+ the script is invoked. The next example
+ </p>
<pre>
-
Content-Type: text/plain
W3m-control: DELETE_PREVBUF
-
contents.....
</pre>
-will override the current buffer.
-<p>
-One w3m-control: header have to contain only one function, but you can
-include more than one w3m-control: lines in the HTTP header.
-In addition, you can specify an argument to GOTO function:
+ <p>
+ will override the current buffer.
+ </p>
+ <p>
+ Each header <span class="mono">w3m-control:</span> can
+ contain only one function, but you can
+ include more than one <span class="mono">w3m-control:</span>
+ line in the HTTP header.
+ In addition, you can specify an argument to the GOTO function:
+ </p>
<pre>
-
Content-Type: text/plain
-W3m-control: GOTO http://www.yahoo.com/
-
+W3m-control: GOTO http://www.example.org/
</pre>
-This example works exactly the same way to the Location header:
+ <p>
+ This example works exactly the same way as the Location header:
+ </p>
<pre>
-
Content-Type: text/plain
-Location: http://www.yahoo.com/
-
+Location: http://www.example.org/
</pre>
-Note that this header has no effect when the CGI script is invoked
-through HTTP server.
-
-</body>
+ <p>
+ Note that this header has no effect when the CGI script is invoked
+ through an HTTP server.
+ </p>
+ </body>
</html>
diff --git a/doc/README b/doc/README
index 324ea3e..60d6d19 100644
--- a/doc/README
+++ b/doc/README
@@ -115,7 +115,6 @@ Current Maintainer
Tohoku University Hospital
satodai@w3m.jp
-Feel free to send your opinion to the w3m mailing-lists.
- w3m-dev@sic.med.tohoku.ac.jp (Japanese)
- w3m-dev-en@sic.med.tohoku.ac.jp (English)
+Feel free to send your opinion to:
http://w3m.sourceforge.net/
+ https://sourceforge.net/projects/w3m/
diff --git a/doc/README.cookie b/doc/README.cookie
index 56cca50..71523e0 100644
--- a/doc/README.cookie
+++ b/doc/README.cookie
@@ -9,21 +9,21 @@ cookie support of w3m
http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-state-man-mec-12.txt)
cookie.
- * If you wont to disable cookie support, run configure script with
+ * If you want to disable cookie support, run the configure script with
--disable-cookie option.
- * You can choose to use cookie or not on the Option Setting Panel or
+ * You can choose to use cookies or not on the Option Setting Panel or
-cookie and -no-cookie option.
- * You can disable cookie on the Option Setting Panel. In this case
- all cookies are rejected, however, cookies which accepted before
- disable cookie are used.
+ * You can disable cookies on the Option Setting Panel. In this case
+ all new cookies are rejected, however, cookies which were accepted before
+ cookies were disabled are used.
- * You can see list of accepted cookies with C-k. In this panel, you
+ * You can see the list of accepted cookies with C-k. In this panel, you
can choose to use each cookie or not.
- * You can specify domains accept or not accept cookies on the Option
- Setting Panel. Domains are specified with following format.
+ * You can specify domains from which to accept or not accept cookies
+ on the Option Setting Panel. Domains are specified in the following format:
domain-list = domains
| ""
@@ -37,7 +37,7 @@ cookie support of w3m
(HDN: host domain name)
- �� If the number of "." in domain name is lesser than 2, it is
+ * If the number of "." in domain name is fewer than 2, it is
assumed as invalid cookie (cf. RFC 2109 4.3.2), however, you can
use cookie_avoid_wrong_number_of_dots to avoid this
restriction. You can set this in "Domains to avoid [wrong number
diff --git a/doc/README.dict b/doc/README.dict
index bd82cdb..88f4b1a 100644
--- a/doc/README.dict
+++ b/doc/README.dict
@@ -2,14 +2,14 @@ Dictionary look-up hack for w3m
1. INTRODUCTION
-If you have dictionary look-up command (like 'webster'), you can
-look a word in a document using w3m. This dictionary-lookup code
+If you have a dictionary look-up command (such as 'webster'), you can
+look up words in a document using w3m. This dictionary-lookup code
was contributed by `Rubikitch' (rubikitch@ruby-lang.org), and
-further modifed by Tushar Samant (scribble at pobox.com).
+further modified by Tushar Samant (scribble at pobox.com).
2. INSTALLATION
-To make use of dictionary look-up, you currently must change a
+To make use of the dictionary look-up, you currently must change a
compile option by hand. After running configure, edit config.h
and change
@@ -19,7 +19,7 @@ to
#define USE_DICT
-and recompile w3me (i.e. type "make install").
+and recompile w3m (i.e. type "make install").
Note that w3m/0.3+cvs-1.373 or later, USE_DICT is defined by default.
Then find or install a CGI program which takes a word as a query
diff --git a/doc/README.func b/doc/README.func
index 0b2c034..a3ef3ac 100644
--- a/doc/README.func
+++ b/doc/README.func
@@ -1,145 +1,146 @@
-ABORT Quit w3m without confirmation
-ACCESSSKEY Popup acceskey menu
-ADD_BOOKMARK Add current page to bookmark
+ABORT Quit at once
+ACCESSKEY Pop up accesskey menu
+ADD_BOOKMARK Add current page to bookmarks
ALARM Set alarm
-BACK Back to previous buffer
+BACK Close current buffer and return to the one below in stack
BEGIN Go to the first line
-BOOKMARK Read bookmark
-CENTER_H Move to the center line
-CENTER_V Move to the center column
-CHARSET Change the current document charset
-CLOSE_TAB Close current tab
-CLOSE_TAB_MOUSE Close tab on mouse cursor (for mouse action)
-COMMAND Execute w3m command(s)
+BOOKMARK View bookmarks
+CENTER_H Center on cursor column
+CENTER_V Center on cursor line
+CHARSET Change the character encoding for the current document
+CLOSE_TAB Close tab
+CLOSE_TAB_MOUSE Close tab at mouse pointer
+COMMAND Invoke w3m function(s)
COOKIE View cookie list
-DEFAULT_CHARSET Change the default document charset
-DEFINE_KEY Define a binding between a key stroke and a user command
-DELETE_PREVBUF Delete previous buffer (mainly for local-CGI)
+DEFAULT_CHARSET Change the default character encoding
+DEFINE_KEY Define a binding between a key stroke combination and a command
+DELETE_PREVBUF Delete previous buffer (mainly for local CGI-scripts)
DICT_WORD Execute dictionary command (see README.dict)
-DICT_WORD_AT Execute dictionary command for word at cursor
+DICT_WORD_AT Execute dictionary command for word at cursor
DISPLAY_IMAGE Restart loading and drawing of images
-DOWN Scroll down one line
-DOWNLOAD Save document source to file
-DOWNLOAD_LIST Display download list panel
-EDIT Edit current document
-EDIT_SCREEN Edit currently rendered document
+DOWN Scroll the screen down one line
+DOWNLOAD Save document source
+DOWNLOAD_LIST Display downloads panel
+EDIT Edit local source
+EDIT_SCREEN Edit rendered copy of document
END Go to the last line
-EXEC_SHELL Execute shell command
-EXIT Quit w3m without confirmation
-EXTERN Execute external browser
-EXTERN_LINK View current link using external browser
-FRAME Render frame
-GOTO Go to URL
-GOTO_LINE Go to specified line
-GOTO_LINK Go to current link
-GOTO_RELATIVE Go to relative URL
-HELP View help
-HISTORY View history of URL
-INFO View info of current document
-INTERRUPT Stop loading document
-INIT_MAILCAP Reread mailcap (mainly for local-CGI)
-ISEARCH Incremental search forward
+EXEC_SHELL Execute shell command and display output
+EXIT Quit at once
+EXTERN Display using an external browser
+EXTERN_LINK Display target using an external browser
+FRAME Toggle rendering HTML frames
+GOTO Open specified document in a new buffer
+GOTO_LINE Go to the specified line
+GOTO_LINK Follow current hyperlink in a new buffer
+GOTO_RELATIVE Go to relative address
+HELP Show help panel
+HISTORY Show browsing history
+INFO Display information about the current document
+INTERRUPT Suspend w3m to background
+ISEARCH Incremental search forward
ISEARCH_BACK Incremental search backward
-LEFT Shift screen one column
-LINE_BEGIN Go to the beginning of line
-LINE_END Go to the end of line
-LINE_INFO Show current line number
-LINK_BEGIN Go to the first link
-LINK_END Go to the last link
-LINK_MENU Popup link element menu
-LIST Show all links and images
-LIST_MENU Popup link list menu and go to selected link
-LOAD Load local file
-MAIN_MENU Popup menu
+LEFT Shift screen one column left
+LINE_BEGIN Go to the beginning of the line
+LINE_END Go to the end of the line
+LINE_INFO Display current position in document
+LINK_BEGIN Move to the first hyperlink
+LINK_END Move to the last hyperlink
+LINK_MENU Pop up link element menu
+LIST Show all URLs referenced
+LIST_MENU Pop up menu for hyperlinks to browse to
+LOAD Open local file in a new buffer
+MAIN_MENU Pop up menu
MARK Set/unset mark
-MARK_MID Mark Message-ID-like strings as anchors
-MARK_URL Mark URL-like strings as anchors
-MARK_WORD Mark current word as anchor
-MENU Popup menu
-MENU_MOUSE Popup menu at mouse cursor (for mouse action)
-MOUSE_TOGGLE Toggle activity of mouse
-MOVE_DOWN Move cursor down (a half screen scroll at the end of screen)
-MOVE_DOWN1 Move cursor down (1 line scroll at the end of screen)
-MOVE_LEFT Move cursor left (a half screen shift at the left edge)
-MOVE_LEFT1 Move cursor left (1 columns shift at the left edge)
-MOVE_LIST_MENU Popup link list menu and move cursor to selected link
-MOVE_MOUSE Move cursor to mouse cursor (for mouse action)
-MOVE_RIGHT Move cursor right (a half screen shift at the right edge)
-MOVE_RIGHT1 Move cursor right (1 columns shift at the right edge)
-MOVE_UP Move cursor up (a half screen scroll at the top of screen)
-MOVE_UP1 Move cursor up (1 line scrol at the top of screen)
-MSGS Display error messages
-NEW_TAB Open new tab
-NEXT Move to next buffer
-NEXT_DOWN Move to next downward link
-NEXT_LEFT Move to next left link
-NEXT_LEFT_UP Move to next left (or upward) link
-NEXT_LINK Move to next link
-NEXT_MARK Move to next word
-NEXT_PAGE Move to next page
-NEXT_RIGHT Move to next right link
-NEXT_RIGHT_DOWN Move to next right (or downward) link
-NEXT_TAB Move to next tab
-NEXT_UP Move to next upward link
-NEXT_VISITED Move to next visited link
-NEXT_WORD Move to next word
-NOTHING Do nothing
+MARK_MID Turn Message-ID-like strings into hyperlinks
+MARK_URL Turn URL-like strings into hyperlinks
+MARK_WORD Turn current word into hyperlink
+MENU Pop up menu
+MENU_MOUSE Pop up menu at mouse pointer
+MOUSE_TOGGLE Toggle mouse support
+MOVE_DOWN Cursor down
+MOVE_DOWN1 Cursor down. With edge touched, slide
+MOVE_LEFT Cursor left
+MOVE_LEFT1 Cursor left. With edge touched, slide
+MOVE_LIST_MENU Pop up menu to navigate between hyperlinks
+MOVE_MOUSE Move cursor to mouse pointer
+MOVE_RIGHT Cursor right
+MOVE_RIGHT1 Cursor right. With edge touched, slide
+MOVE_UP Cursor up
+MOVE_UP1 Cursor up. With edge touched, slide
+MSGS Display error messages
+NEW_TAB Open a new tab (with current document)
+NEXT Switch to the next buffer
+NEXT_DOWN Move downward to the next hyperlink
+NEXT_HALF_PAGE Scroll down half a page
+NEXT_LEFT Move left to the next hyperlink
+NEXT_LEFT_UP Move left or upward to the next hyperlink
+NEXT_LINK Move to the next hyperlink
+NEXT_MARK Go to the next mark
+NEXT_PAGE Scroll down one page
+NEXT_RIGHT Move right to the next hyperlink
+NEXT_RIGHT_DOWN Move right or downward to the next hyperlink
+NEXT_TAB Switch to the next tab
+NEXT_UP Move upward to the next hyperlink
+NEXT_VISITED Move to the next visited hyperlink
+NEXT_WORD Move to the next word
+NOTHING Do nothing
NULL Do nothing
-OPTIONS Option setting panel
-PEEK Peek current URL
-PEEK_IMG Peek image URL
-PEEK_LINK Peek link URL
-PIPE_BUF Send rendered document to pipe
-PIPE_SHELL Execute shell command and browse
-PREV Move to previous buffer
-PREV_LINK Move to previous link
-PREV_MARK Move to previous mark
-PREV_PAGE Move to previous page
-PREV_TAB Move to previous tab
-PREV_VISITED Move to previous visited link
-PREV_WORD Move to previous word
-PRINT Save buffer to file
-QUIT Quit w3m
-READ_SHELL Execute shell command and load
+OPTIONS Display options setting panel
+PEEK Show current address
+PEEK_IMG Show image address
+PEEK_LINK Show target address
+PIPE_BUF Pipe current buffer through a shell command and display output
+PIPE_SHELL Execute shell command and display output
+PREV Switch to the previous buffer
+PREV_HALF_PAGE Scroll up half a page
+PREV_LINK Move to the previous hyperlink
+PREV_MARK Go to the previous mark
+PREV_PAGE Scroll up one page
+PREV_TAB Switch to the previous tab
+PREV_VISITED Move to the previous visited hyperlink
+PREV_WORD Move to the previous word
+PRINT Save rendered document
+QUIT Quit with confirmation request
+READ_SHELL Execute shell command and display output
REDO Cancel the last undo
-REDRAW Redraw screen
-REG_MARK Set mark using regexp
-REINIT Reload configuration files
-RELOAD Reload buffer
-RESHAPE Re-render buffer
+REDRAW Draw the screen anew
+REG_MARK Mark all occurences of a pattern
+REINIT Reload configuration file
+RELOAD Load current document anew
+RESHAPE Re-render document
RIGHT Shift screen one column right
-SAVE Save document source to file
-SAVE_IMAGE Save image to file
-SAVE_LINK Save link to file
-SAVE_SCREEN Save rendered document to file
+SAVE Save document source
+SAVE_IMAGE Save inline image
+SAVE_LINK Save hyperlink target
+SAVE_SCREEN Save rendered document
SEARCH Search forward
SEARCH_BACK Search backward
SEARCH_FORE Search forward
-SEARCH_NEXT Search next regexp
-SEARCH_PREV Search previous regexp
-SELECT Go to buffer selection panel
-SELECT_MENU Popup buffer selection menu
-SETENV Set environment variable
-SET_OPTION Set option
-SHELL Execute shell command
+SEARCH_NEXT Continue search forward
+SEARCH_PREV Continue search backward
+SELECT Display buffer-stack panel
+SELECT_MENU Pop up buffer-stack menu
+SETENV Set environment variable
+SET_OPTION Set option
+SHELL Execute shell command and display output
SHIFT_LEFT Shift screen left
SHIFT_RIGHT Shift screen right
-SOURCE View HTML source
+SOURCE Toggle between HTML shown or processed
STOP_IMAGE Stop loading and drawing of images
SUBMIT Submit form
-SUSPEND Stop loading document
-TAB_GOTO Open URL on new tab
-TAB_GOTO_RELATIVE Open relative URL on new tab
-TAB_LEFT Move current tab left
-TAB_LINK Open current link on new tab
-TAB_MENU Popup tab selection menu
-TAB_MOUSE Move to tab on mouse cursor (for mouse action)
-TAB_RIGHT Move current tab right
+SUSPEND Suspend w3m to background
+TAB_GOTO Open specified document in a new tab
+TAB_GOTO_RELATIVE Open relative address in a new tab
+TAB_LEFT Move left along the tab bar
+TAB_LINK Follow current hyperlink in a new tab
+TAB_MENU Pop up tab selection menu
+TAB_MOUSE Select tab by mouse action
+TAB_RIGHT Move right along the tab bar
UNDO Cancel the last cursor movement
-UP Scroll up one line
-VERSION Display version of w3m
-VIEW View HTML source
-VIEW_BOOKMARK View bookmark
-VIEW_IMAGE View image
-WHEREIS Search forward
-WRAP_TOGGLE Toggle wrap search mode
+UP Scroll the screen up one line
+VERSION Display the version of w3m
+VIEW Toggle between HTML shown or processed
+VIEW_BOOKMARK View bookmarks
+VIEW_IMAGE Display image in viewer
+WHEREIS Search forward
+WRAP_TOGGLE Toggle wrapping mode in searches
diff --git a/doc/README.img b/doc/README.img
index 0c10114..af6d9db 100644
--- a/doc/README.img
+++ b/doc/README.img
@@ -11,8 +11,8 @@ Introduction
Support
- * Display inline image (GIF,PNG,JPEG, etc.) on terminals
- (xterm,rxvt, etc.) of X11, Linux framebuffer device or
+ * Display inline images (GIF, PNG, JPEG, etc.) on terminals
+ (xterm, rxvt, etc.) of X11, Linux framebuffer device or
terminals of Windows.
* Support inline image of <img> tag.
Support of attributes "width", "height", and "align".
@@ -41,7 +41,7 @@ Key functions
Specify the following keymaps in ~/.w3m/keymap.
keymap X DISPLAY_IMAGE
keymap C-c STOP_IMAGE
- keyamp t SET_OPTION display_image=toggle
+ keymap t SET_OPTION display_image=toggle
Commandline options
@@ -66,7 +66,7 @@ Option panel
Automatic loading of inline image. The default is ON.
If it is OFF, loading starts with a command DISPLAY_IMAGE.
max_load_image
- Maximum process for downloading of inline image. The default is 4.
+ Maximum # of processes for downloading inline images. The default is 4.
1 to 8 can be set.
ext_image_viewer
Use external image viewer, when a command VIEW_IMAGE or
@@ -75,8 +75,8 @@ Option panel
image_scale
Scale of image (%). The default value is 100(%).
imgdisplay
- External command to display image". The default value is "w3mimgdisplay".
- See "Setting w3mimgdisplay".
+ External command to display image. The default value is "w3mimgdisplay".
+ See "Setting w3mimgdisplay."
Required programs
@@ -124,8 +124,8 @@ Setting w3mimgdisplay
The default value for Linux framebuffer device is #000000 (black).
When the color is specified as #RRGGBB, escape '#'.
-anim <n>
- Maximum number of frames for animation. It means without limit
- if the number is 0. Negative value count backward from the end
+ Maximum number of frames for animation. It will run everything
+ if the number is 0. Negative values count backward from the end
of the frames. The default value is 100.
-margin <n>
Margin of an area to clear an image. The default value is 0.
@@ -135,13 +135,13 @@ Setting w3mimgdisplay
Notice
If you want to see GIF animation, please hit a suitable key, such
- as 'h', 'l', etc., repeatedly, because a frame is rewritten
+ as 'h', 'l', etc., repeatedly, because a new frame is only requested
according to the re-drawing demand from w3m.
Some code in w3mimg/fb/fb.c was originally written by Mr. Yamasaki.
http://www.sainet.or.jp/~yamasaki/download/fb-sample.tar.gz
- On Windows, we check the behaver on standard console, Cygwin rxvt
+ On Windows, we check the behavior on standard console, Cygwin rxvt
and PuTTY.
diff --git a/doc/README.m17n b/doc/README.m17n
index c064d76..da5408b 100644
--- a/doc/README.m17n
+++ b/doc/README.m17n
@@ -49,7 +49,7 @@ Supported encoding schemes (character set)
* Thai
TIS-620 (ISO-8859-11), CP874
* Other
- US_ASCII, ISO-8859-1 �� 10, 13 �� 15,
+ US_ASCII, ISO-8859-1 - 10, 13 - 15,
KOI8-R, KOI8-U, NeXT, CP437, CP737, CP775, CP850, CP852, CP855, CP856,
CP857, CP860, CP861, CP862, CP863, CP864, CP865, CP866, CP869, CP1006,
CP1250, CP1251, CP1252, CP1253, CP1254, CP1255, CP1256, CP1257
diff --git a/doc/README.pre_form b/doc/README.pre_form
index 972ef90..dad62f8 100644
--- a/doc/README.pre_form
+++ b/doc/README.pre_form
@@ -1,12 +1,12 @@
-pre_form: Feature to configure form parameters when opening specific site.
+pre_form: Feature to pre-fill form parameters when opening a specific site.
-It would be convinient for sites where you often visit, but it may introduce
-some security issues. Be careful to use this feature, especially `submit'
+It is convenient for sites that you visit often, but it may introduce
+some security issues. Be careful when using this feature, especially `submit'
params described below.
Default configuration file for pre_form is ~/.w3m/pre_form.
-Syntax as follows:
+The syntax of entries in the configuration file is as follows:
url <url>|/<re-url>/
form [<name>] <action>
@@ -23,21 +23,21 @@ textarea <name>
:
/textarea
-If <action> is set, form which has matched <action> attributes
+If <action> is set, a form which has matched <action> attributes
will be configured by this pre_form.
-The line begining with text, file, passwd, select, textarea means that
+A line beginning with text, file, passwd, select, textarea means that
it will set value to <value> in input, select or textarea element which
name attribute matches with <name>.
-The line beginning with checkbox, radio means that it will check
+A line beginning with checkbox, radio means that it will check
input element which name and value attribute matches with <name> and <value>
-respectively. If <checked> is 0, no, or off, disable check of the checkbox.
+respectively. If <checked> is 0, no, or off, the checkbox will be unchecked.
-The line beginning with submit or image means that it will submit input
-element which name attribute matches with <name> (and value attribute
-matches with <value>), or submit last <input type=submit> element if no
-<name> specified.
+A line beginning with submit or image means that it will submit input
+element whose name attribute matches with <name> (and value attribute
+matches with <value>), or submit on the last <input type=submit> element if no
+<name> was specified.
You quote \, ' (single-quote) or " (double quote) as you do in shell.
diff --git a/doc/README.siteconf b/doc/README.siteconf
new file mode 100644
index 0000000..39b1028
--- /dev/null
+++ b/doc/README.siteconf
@@ -0,0 +1,60 @@
+The siteconf: Site-specific preferences
+
+The siteconf consists of URL patterns and preferences associated to them.
+You can improve "decode_url" feature by giving charsets of URLs site by site,
+or bypass Google's redirector for performance and your privacy.
+
+The siteconf is read from ~/.w3m/siteconf by default.
+
+===== The syntax =====
+
+url <url>|/<re-url>/|m@<re-url>@i [exact]
+substitute_url "<destination-url>"
+url_charset <charset>
+no_referer_from on|off
+no_referer_to on|off
+
+The last match wins.
+
+===== Examples =====
+
+url "https://twitter.com/"
+substitute_url "https://mobile.twitter.com/"
+
+This forwards the twitter.com to its mobile site.
+
+url "http://your.bookmark.net/"
+no_referer_from on
+
+This prevents HTTP referers from being sent when you follow links
+at the your.bookmark.net.
+
+url "http://www.google.com/url?" exact
+substitute_url "file:///cgi-bin/your-redirector.cgi?"
+
+This forwards the Google's redirector to your local CGI.
+
+url /^http:\/\/[a-z]*\.wikipedia\.org\//
+url_charset utf-8
+
+When combinated with "decode_url" option turned on, links to
+Wikipedia will be human-readable.
+
+===== Regular expressions notes =====
+
+Following expressions are all equivalent:
+
+/http:\/\/www\.example\.com\//
+m/http:\/\/www\.example\.com\//
+m@http://www\.example\.com/@
+m!http://www\.example\.com/!
+
+With a trailing 'i' modifier, you can specify a case-insensitive match.
+For example, m@^http://www\.example\.com/abc/@i matches to:
+
+http://www.example.com/abc/
+http://www.example.com/Abc/
+http://www.example.com/ABC/
+
+Hostnames, however, are always converted to lowercases before compared.
+
diff --git a/doc/README.sixel b/doc/README.sixel
new file mode 100644
index 0000000..588afc4
--- /dev/null
+++ b/doc/README.sixel
@@ -0,0 +1,27 @@
+Sixel support of w3m
+ 2014/11/05
+ K. Araki
+
+Introduction
+
+ This is the extension for w3m to show inline images by sixel graphics.
+
+Requirements
+
+ Install 'img2sixel' command provided by libsixel project.
+ (https://github.com/saitoha/libsixel)
+
+Build
+
+ $ ./configure --enable-image ...
+ $ make
+ $ make install
+
+Usage
+
+ $ w3m -sixel http://...
+
+ You can specify options of 'img2sixel' command by "W3M_IMG2SIXEL"
+ environmental variable.
+
+ $ W3M_IMG2SIXEL="img2sixel -d atkinson" w3m -sixel http://...
diff --git a/doc/README.tab b/doc/README.tab
index 8e98e1c..f237f70 100644
--- a/doc/README.tab
+++ b/doc/README.tab
@@ -39,7 +39,7 @@ Options:
open_tab_blank ... open new tab if target is _blank or _new
default: OFF
close_tab_back ... close the tab when you back from last buffer in the tab
- default: OFF (= Can't back...)
+ default: OFF (= Can't go back...)
diff --git a/doc/keymap.lynx b/doc/keymap.lynx
index 869c716..e4085c8 100644
--- a/doc/keymap.lynx
+++ b/doc/keymap.lynx
@@ -46,7 +46,7 @@ keymap - PREV_PAGE
keymap . RIGHT
keymap / SEARCH
keymap : MARK_URL
-keymap ; MARK_WORD
+keymap ";" MARK_WORD
keymap < SHIFT_LEFT
keymap = INFO
keymap > SHIFT_RIGHT
diff --git a/doc/menu.submenu b/doc/menu.submenu
index e55193d..e837f46 100644
--- a/doc/menu.submenu
+++ b/doc/menu.submenu
@@ -39,6 +39,6 @@ menu Link
end
menu Bookmark
- func "Read bookmark (b)" BOOKMARK "bB"
+ func "View bookmarks (b)" BOOKMARK "bB"
func "Add page to bookmark(a)" ADD_BOOKMARK "aA"
end
diff --git a/doc/w3m.1 b/doc/w3m.1
index 8f071c6..90488f3 100644
--- a/doc/w3m.1
+++ b/doc/w3m.1
@@ -1,13 +1,10 @@
.nr N -1
.nr D 5
-.TH W3M 1 Local
-.UC 4
+.TH W3M 1 "2016-08-06" "w3m 0.5.3"
.SH NAME
-w3m \- a text based Web browser and pager
+w3m \- a text based web browser and pager
.SH SYNOPSIS
-.B w3m
-[options] [URL or filename]
-.PP
+w3m [OPTION]... [ \fIfile\fP | \fIURL\fP ]...
.SH DESCRIPTION
.\" This defines appropriate quote strings for nroff and troff
.ds lq \&"
@@ -17,234 +14,283 @@ w3m \- a text based Web browser and pager
.\" Just in case these number registers aren't set yet...
.if \nN==0 .nr N 10
.if \nD==0 .nr D 5
-.I
-w3m
-is a World Wide Web (WWW) text based client. It has English and
-Japanese help files and an option menu and can be configured to
-use either language. It will display hypertext markup language
-(HTML) documents containing links to files residing on the local
-system, as well as files residing on remote systems. It can
-display HTML tables and frames.
-In addition, it can be used as a "pager" in much the same manner
-as "more" or "less".
-Current versions of
-.I
-w3m
-run on
-Unix (Solaris, SunOS, HP-UX, Linux, FreeBSD, and EWS4800)
-and on
-Microsoft Windows 9x/NT.
-.PP
+
+\fIw3m\fP is a text based browser which can display local or remote
+web pages as well as other documents. It is able to process HTML
+tables and frames but it ignores JavaScript and Cascading Style
+Sheets. \fIw3m\fP can also serve as a pager for text files named as
+arguments or passed on standard input, and as a general purpose
+directory browser.
+
+\fIw3m\fP organizes its content in buffers or tabs, allowing easy
+navigation between them. With the w3m-img extension installed, \fIw3m\fP can
+display inline graphics in web pages. And whenever \fIw3m\fP's HTML
+rendering capabilities do not meet your needs, the target URL can be
+handed over to a graphical browser with a single command.
+
+For help with runtime options, press \(lqH\(rq while running \fIw3m\fP.
+
+.SH ARGUMENTS
+
+When given one or more command line arguments, \fIw3m\fP will handle
+targets according to content type. For web, \fIw3m\fP gets this
+information from HTTP headers; for relative or absolute file system
+paths, it relies on filenames.
+
+With no argument, \fIw3m\fP expects data from standard input and
+assumes \(lqtext/plain\(rq unless another MIME type is given by the user.
+
+If provided with no target and no fallback target (see for instance
+option \fB\-v\fP below), \fIw3m\fP will exit with usage information.
.SH OPTIONS
-At start up, \fIw3m\fR will load any local
-file or remote URL specified at the command
-line. For help with runtime options, press \fB"H"\fR
-while running \fIw3m\fR.
-Command line options are:
-.PP
+Command line options are introduced with a single \(lq\-\(rq character and
+may take an argument.
+.SS General options
.TP
-.B -t tab
-set tab width
+\fB\-B\fP
+with no other target defined, use the bookmark page for startup
.TP
-.B -r
-ignore backspace effect
-.TP
-.B -l line
-# of preserved line (default 10000)
-.TP
-.B -I charset
-document charset
-.TP
-.B -O charset
-display/output charset
+\fB\-M\fP
+monochrome display
.TP
-.B -B
-load bookmark
+\fB\-no-mouse\fP
+deactivate mouse support
.TP
-.B -bookmark file
-specify bookmark file
+\fB\-num\fP
+display each line's number
.TP
-.B -T type
-specify content-type
+\fB\-N\fP
+distribute multiple command line arguments to tabs. By default, a
+stack of buffers is used
+.TP
+\fB\-ppc \fInum\fR
+width of \fInum\fR pixels per character. Range of 4.0 to 32.0, default 8.0.
+Larger values will make tables narrower. (Implementation not verified)
.TP
-.B -m
-internet message mode
+\fB\-ppl \fInum\fR
+height of \fInum\fR pixels per line. Range of 4.0 to 64.0. (Implementation not verified)
.TP
-.B -v
-visual startup mode
+\fB\-title\fP, \fB\-title=TERM\fP
+use the buffer name as terminal title string. With specified TERM,
+this sets the title configuration style accordingly
.TP
-.B -M
-monochrome display
+\fB\-v\fP
+with no other target defined, welcome users with a built-in page
.TP
-.B -N
-open URL of command line on each new tab
+\fB\-W\fP
+toggle wrapping mode in searches
.TP
-.B -F
-automatically render frame
+\fB\-X\fP
+do not initialize/deinitialize the terminal
.TP
-.B -dump
-dump formatted page into stdout
+\fB+\fInum\fR
+go to line \fInum\fR; only effective for \fInum\fR larger than the number of lines in the terminal
+.SS Browser options
.TP
-.B -cols width
-specify column width (used with -dump)
+\fB\-cols \fInum\fR
+with stdout as destination; HTML is rendered to lines of \fInum\fR characters
.TP
-.B -ppc count
-specify the number of pixels per character (4.0...32.0).
-Larger values will make tables narrower. [default 8.0]
+\fB\-cookie\fP, \fB\-no-cookie\fP
+use stored cookies and accept new ones, or do neither
.TP
-.B -ppl count
-specify the number of pixels per line (4.0...64.0)
+\fB\-F\fP
+render frames
.TP
-.B -dump_source
-dump page source into stdout
+\fB\-graph\fP, \fB\-no-graph\fP
+use or do not use graphic characters for drawing HTML table and frame borders
.TP
-.B -dump_head
-dump response of HEAD request into stdout
+\fB\-header \fIstring\fR
+append \fIstring\fR to the HTTP(S) request. Expected to match the header syntax \f(CWVariable: Value\fP
.TP
-.B -dump_both
-dump HEAD and source into stdout
+\fB\-m\fP
+Render the body of Usenet messages according to the header \(lqContent-type\(rq
.TP
-.B -dump_extra
-dump HEAD, source, and extra information into stdout
+\fB\-no-proxy\fP
+do not use proxy
.TP
-.B -post file
-use POST method with file content
+\fB\-post \fIfile\fR
+use POST method to upload data defined in \fIfile\fR. The syntax to be used
+is \f(CWvar1=value1[&var2=value2]...\fP
.TP
-.B -header string
-insert string as a header
+\fB\-4\fP
+IPv4 only. Corresponds to dns_order=4 in configuration files
.TP
-.B +<num>
-goto <num> line
+\fB\-6\fP
+IPv6 only. Corresponds to dns_order=6 in configuration files
+.SS Text pager options
.TP
-.B -num
-show line number
+\fB\-l \fInum\fR
+number of lines preserved internally when receiving plain text from
+stdin (default 10,000)
.TP
-.B -no-proxy
-don't use proxy
+\fB\-r\fP
+use caret notation to display special escape characters (such
+as ANSI escapes or nroff-style backspaces for bold and underlined
+characters) instead of processing them
.TP
-.B -4
-IPv4 only (-o dns_order=4)
+\fB\-s\fP
+squeeze multiple blank lines into one
.TP
-.B -6
-IPv6 only (-o dns_order=6)
+\fB\-t\fP \fInum\fP
+set tab width to \fInum\fR columns. No effect on stdout
+.SS Data type/encoding options
.TP
-.B -no-mouse
-don't use mouse
+\fB\-I \fIcharset\fR
+user defined character encoding of input data
.TP
-.B -cookie
-use cookie.
+\fB\-O \fIcharset\fR
+user defined character encoding of output data
.TP
-.B -no-cookie
-don't use cookie
+\fB\-T \fItype\fR
+explicit characterization of input data by MIME type
+.SS Options for data output, followed by immediate exit
.TP
-.B -graph
-use graphic character
+\fB\-dump\fP
+dump rendered page into stdout. Set implicitly when output is directed
+to a file or pipe
.TP
-.B -no-graph
-don't use graphic character
+\fB\-dump_source\fP
+dump the page's source code into stdout
.TP
-.B -S
-squeeze multiple blank lines
+\fB\-dump_head\fP
+dump response of a HEAD request for a URL into stdout
.TP
-.B -W
-toggle wrap search mode
+\fB\-dump_both\fP
+dump HEAD, and source code for a URL into stdout
.TP
-.B -X
-don't use termcap init/deinit
+\fB\-dump_extra\fP
+dump HEAD, source code, and extra information for a URL into stdout
.TP
-.B -title [=TERM]
-set buffer name to terminal title string.
-If TERM is specified, use the TERM style title configuration.
+\fB\-help\fP
+show a summary of compiled-in features and command line options
.TP
-.B -o opt=value
-assign value to config option
+\fB\-show-option\fP
+show all available configuration options
.TP
-.B -show-option
-show all available config option
+\fB\-version\fP
+show the version of \fIw3m\fP
+.SS Options for overriding default settings and resources
.TP
-.B -config file
-specify config file
+\fB\-bookmark \fIfile\fR
+use \fIfile\fR instead of the default bookmark.html file
.TP
-.B -help
-show usage
+\fB\-config \fIfile\fR
+use \fIfile\fR instead of the default configuration file
.TP
-.B -version
-show w3m version
+\fB\-debug\fP
+DO NOT USE
.TP
-.B -reqlog
-write request logfile
+\fB\-o \fIoption=value\fR
+modify one configuration item with an explicitly given value; without \fIoption=value\fR, equivalent to \fB-show-option\fR
.TP
-.B -debug
-DO NOT USE
+\fB\-reqlog\fP
+log headers of HTTP communication in file \f(CW~/.w3m/request.log\fP
.SH EXAMPLES
+.SS Pager-like usage
+.TP
+Combine snippets of HTML code and preview the page
+.EX
+$ cat header.html footer.html | w3m -T text/html
+.EE
+.TP
+Compare two files using tabs
+.EX
+$ w3m -N config.old config
+.EE
+.SS Browser-like usage
+.TP
+Display web content in monochrome terminal
+.EX
+$ w3m -M http://w3m.sourceforge.net
+.EE
+.TP
+Display embedded graphics
+.EX
+$ w3m -o auto_image=TRUE http://w3m.sourceforge.net
+.EE
+.TP
+Display content from Usenet
+.EX
+$ w3m -m nntp://news.aioe.org/comp.os.linux.networking
+.EE
+.TP
+Upload data for a URL using the POST method
+.EX
+$ w3m -post - http://example.com/form.php <<<'a=0&b=1'
+.EE
+.SS Filter-like usage
+.TP
+Convert an HTML file to plain text with a defined line length
+.EX
+$ w3m -cols 40 foo.html > foo.txt
+.EE
+.TP
+Output the bookmarks page as text with an appended list of links
+.EX
+$ w3m -B -o display_link_number=1 > out.txt
+.EE
+.TP
+Conversion of file format and character encoding
+.EX
+$ w3m -T text/html -I EUC-JP -O UTF-8 < foo.html > foo.txt
+.EE
+.SS Start with no input
+.TP
+Welcome users with a built-in page
+.EX
+$ w3m -v
+.EE
+.\".SH Errors
+.SH ENVIRONMENT
+\fIw3m\fP recognises the environment variable WWW_HOME as defining a
+fallback target for use if it is invoked without one.
+.SH FILES
.TP
-To use w3m as a pager:
-.br
-$ ls | w3m
-.br
-.TP
-To use w3m to translate HTML files:
-.br
-$ cat foo.html | w3m -T text/html
+\f(CW~/.w3m/bookmark.html\fP
+default bookmark file
.TP
-or
-.br
-$ cat foo.html | w3m -dump -T text/html >foo.txt
-.SH FILES
+\f(CW~/.w3m/config\fP
+user defined configuration file; overrides \f(CW/etc/w3m/config\fP
.TP
-.I ${HOME}/.w3m/config
-configuration file
+\f(CW~/.w3m/cookie\fP
+cookie jar; written on exit, read on launch
.TP
-.I ${HOME}/.w3m/keymap
-key binding configuration file
-.\" .TP
-.\" .I ${HOME}/.w3m/menu
-.\" ???
+\f(CW~/.w3m/history\fP
+browser history - visited files and URLs
.TP
-.I ${HOME}/.w3m/mouse
-mouse configuration file
+\f(CW~/.w3m/keymap\fP
+user defined key bindings; overrides default key bindings
.TP
-.I ${HOME}/.w3m/cookie
-cookie file
+\f(CW~/.w3m/mailcap\fP
+external viewer configuration file
.TP
-.I ${HOME}/.w3m/history
-history file
+\f(CW~/.w3m/menu\fP
+user defined menu; overrides default menu
.TP
-.I ${HOME}/.w3m/passwd
-passowrd and username file
+\f(CW~/.w3m/mime.types\fP
+MIME types file
.TP
-.I ${HOME}/.w3m/pre_form
-form parameters file
+\f(CW~/.w3m/mouse\fP
+user defined mouse settings
.TP
-.I ${HOME}/.w3m/mailcap
-external viewer configuration file
+\f(CW~/.w3m/passwd\fP
+password and username file
.TP
-.I ${HOME}/.w3m/mime.types
-MIME types file
+\f(CW~/.w3m/pre_form\fP
+contains predefined values to fill recurrent HTML forms
.\" .TP
-.\" .I ${HOME}/.w3m/urimethodmap
+.\" .I $~/.w3m/urimethodmap
.\" ???
-.SH NOTES
-This is the
-.I
-w3m
-0.5.3 Release.
-.PP
-Please see the MANUAL.html file distributed with w3m for
-more detailed documentation.
-
-Additional information about
-.I
-w3m
-may be found on its Japanese language Web site located at:
- http://w3m.sourceforge.net/index.ja.html
-.br
-or on its English version of the site at:
- http://w3m.sourceforge.net/index.en.html
+.SH SEE ALSO
+README and example files are to be found in the doc directory of your \fIw3m\fP installation. Recent information about \fIw3m\fP may be found on
+.UR http://w3m.sourceforge.net
+the project's web pages at
+.UE
.SH ACKNOWLEDGMENTS
-.I
-w3m
-has incorporated code from several sources.
+\fIw3m\fP has incorporated code from several sources.
Users have contributed patches and suggestions over time.
.SH AUTHOR
-Akinori ITO <aito@fw.ipsj.or.jp>
+.UR aito@fw.ipsj.or.jp
+Akinori ITO
+.UE
+
diff --git a/entity.c b/entity.c
index fdd8f64..45dc95e 100644
--- a/entity.c
+++ b/entity.c
@@ -44,6 +44,8 @@ conv_entity(unsigned int c)
return " ";
if (c == 0xa0)
return NBSP;
+ if (c == 0xad) /* SOFT HYPHEN */
+ return "";
if (c < 0x100) { /* Latin1 (ISO 8859-1) */
if (UseAltEntity)
return alt_latin1[c - 0xa0];
diff --git a/etc.c b/etc.c
index 8fe1215..37c4f15 100644
--- a/etc.c
+++ b/etc.c
@@ -498,7 +498,7 @@ calcPosition(char *l, Lineprop *pr, int len, int pos, int bpos, int mode)
static char *prevl = NULL;
int i, j;
- if (l == NULL || len == 0)
+ if (l == NULL || len == 0 || pos < 0)
return bpos;
if (l == prevl && mode == CP_AUTO) {
if (pos <= len)
@@ -1365,7 +1365,13 @@ setup_child(int child, int i, int f)
if (!child)
SETPGRP();
#endif /* __MINGW32_VERSION */
+ /*
+ * I don't know why but close_tty() sometimes interrupts loadGeneralFile() in loadImage()
+ * and corrupt image data can be cached in ~/.w3m.
+ */
+#if 0
close_tty();
+#endif
close_all_fds_except(i, f);
QuietMessage = TRUE;
fmInitialized = FALSE;
diff --git a/file.c b/file.c
index 567d41e..0333e9a 100644
--- a/file.c
+++ b/file.c
@@ -26,6 +26,8 @@
#define min(a,b) ((a) > (b) ? (b) : (a))
#endif /* not min */
+#define MAX_INPUT_SIZE 80 /* TODO - max should be screen line length */
+
static int frame_source = 0;
static char *guess_filename(char *file);
@@ -47,11 +49,11 @@ static JMP_BUF AbortLoading;
static struct table *tables[MAX_TABLE];
static struct table_mode table_mode[MAX_TABLE];
-#ifdef USE_IMAGE
+#if defined(USE_M17N) || defined(USE_IMAGE)
static ParsedURL *cur_baseURL = NULL;
-#ifdef USE_M17N
-static char cur_document_charset;
#endif
+#ifdef USE_M17N
+static wc_ces cur_document_charset = 0;
#endif
static Str cur_title;
@@ -67,7 +69,7 @@ static int cur_status;
#ifdef MENU_SELECT
/* menu based <select> */
FormSelectOption *select_option;
-static int max_select = MAX_SELECT;
+int max_select = MAX_SELECT;
static int n_select;
static int cur_option_maxwidth;
#endif /* MENU_SELECT */
@@ -79,7 +81,7 @@ static int cur_textarea_rows;
static int cur_textarea_readonly;
static int n_textarea;
static int ignore_nl_textarea;
-static int max_textarea = MAX_TEXTAREA;
+int max_textarea = MAX_TEXTAREA;
static int http_response_code;
@@ -215,7 +217,6 @@ currentLn(Buffer *buf)
static Buffer *
loadSomething(URLFile *f,
- char *path,
Buffer *(*loadproc) (URLFile *, Buffer *), Buffer *defaultbuf)
{
Buffer *buf;
@@ -223,17 +224,23 @@ loadSomething(URLFile *f,
if ((buf = loadproc(f, defaultbuf)) == NULL)
return NULL;
- buf->filename = path;
if (buf->buffername == NULL || buf->buffername[0] == '\0') {
buf->buffername = checkHeader(buf, "Subject:");
- if (buf->buffername == NULL)
- buf->buffername = conv_from_system(lastFileName(path));
+ if (buf->buffername == NULL && buf->filename != NULL)
+ buf->buffername = conv_from_system(lastFileName(buf->filename));
}
if (buf->currentURL.scheme == SCM_UNKNOWN)
buf->currentURL.scheme = f->scheme;
- buf->real_scheme = f->scheme;
if (f->scheme == SCM_LOCAL && buf->sourcefile == NULL)
- buf->sourcefile = path;
+ buf->sourcefile = buf->filename;
+ if (loadproc == loadHTMLBuffer
+#ifdef USE_IMAGE
+ || loadproc == loadImageBuffer
+#endif
+ )
+ buf->type = "text/html";
+ else
+ buf->type = "text/plain";
return buf;
}
@@ -484,28 +491,6 @@ convertLine0(URLFile *uf, Str line, int mode)
return line;
}
-/*
- * loadFile: load file to buffer
- */
-Buffer *
-loadFile(char *path)
-{
- Buffer *buf;
- URLFile uf;
- init_stream(&uf, SCM_LOCAL, NULL);
- examineFile(path, &uf);
- if (uf.stream == NULL)
- return NULL;
- buf = newBuffer(INIT_BUFFER_WIDTH);
- current_content_length = 0;
-#ifdef USE_M17N
- content_charset = 0;
-#endif
- buf = loadSomething(&uf, path, loadBuffer, buf);
- UFclose(&uf);
- return buf;
-}
-
int
matchattr(char *p, char *attr, int len, Str *value)
{
@@ -626,8 +611,10 @@ readHeader(URLFile *uf, Buffer *newBuf, int thru, ParsedURL *pu)
if(w3m_reqlog){
FILE *ff;
ff = fopen(w3m_reqlog, "a");
- Strfputs(tmp, ff);
- fclose(ff);
+ if(ff){
+ Strfputs(tmp, ff);
+ fclose(ff);
+ }
}
if (src)
Strfputs(tmp, src);
@@ -694,6 +681,7 @@ readHeader(URLFile *uf, Buffer *newBuf, int thru, ParsedURL *pu)
#endif
init_stream(&f, SCM_LOCAL, newStrStream(src));
loadHTMLstream(&f, newBuf, NULL, TRUE);
+ UFclose(&f);
for (l = newBuf->lastLine; l && l->real_linenumber;
l = l->prev)
l->real_linenumber = 0;
@@ -1244,6 +1232,7 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu,
unsigned char md5[MD5_DIGEST_LENGTH + 1];
Str uri = HTTPrequestURI(pu, hr);
char nc[] = "00000001";
+ FILE *fp;
Str algorithm = qstr_unquote(get_auth_param(ha->param, "algorithm"));
Str nonce = qstr_unquote(get_auth_param(ha->param, "nonce"));
@@ -1326,10 +1315,11 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu,
/* A2 = Method ":" digest-uri-value ":" H(entity-body) */
if (request && request->body) {
if (request->method == FORM_METHOD_POST && request->enctype == FORM_ENCTYPE_MULTIPART) {
- FILE *fp = fopen(request->body, "r");
+ fp = fopen(request->body, "r");
if (fp != NULL) {
Str ebody;
ebody = Strfgetall(fp);
+ fclose(fp);
MD5(ebody->ptr, strlen(ebody->ptr), md5);
}
else {
@@ -1697,13 +1687,15 @@ getLinkNumberStr(int correction)
/*
* loadGeneralFile: load file to buffer
*/
+#define DO_EXTERNAL ((Buffer *(*)(URLFile *, Buffer *))doExternal)
Buffer *
loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
int flag, FormList *volatile request)
{
URLFile f, *volatile of = NULL;
ParsedURL pu;
- Buffer *b = NULL, *(*volatile proc)() = loadBuffer;
+ Buffer *b = NULL;
+ Buffer *(*volatile proc)(URLFile *, Buffer *) = loadBuffer;
char *volatile tpath;
char *volatile t = "text/plain", *p, *volatile real_type = NULL;
Buffer *volatile t_buf = NULL;
@@ -1730,7 +1722,22 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
add_auth_cookie_flag = 0;
checkRedirection(NULL);
+
load_doc:
+ {
+ const char *sc_redirect;
+ parseURL2(tpath, &pu, current);
+ sc_redirect = query_SCONF_SUBSTITUTE_URL(&pu);
+ if (sc_redirect && *sc_redirect && checkRedirection(&pu)) {
+ tpath = (char *)sc_redirect;
+ request = NULL;
+ add_auth_cookie_flag = 0;
+ current = New(ParsedURL);
+ *current = pu;
+ status = HTST_NORMAL;
+ goto load_doc;
+ }
+ }
TRAP_OFF;
url_option.referer = referer;
url_option.flag = flag;
@@ -1863,7 +1870,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
/* 302: Found */
/* 303: See Other */
/* 307: Temporary Redirect (HTTP/1.1) */
- tpath = url_quote_conv(p, DocumentCharset);
+ tpath = url_encode(p, NULL, 0);
request = NULL;
UFclose(&f);
current = New(ParsedURL);
@@ -2022,7 +2029,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
if (f.is_cgi && (p = checkHeader(t_buf, "Location:")) != NULL &&
checkRedirection(&pu)) {
/* document moved */
- tpath = url_quote_conv(remove_space(p), DocumentCharset);
+ tpath = url_encode(remove_space(p), NULL, 0);
request = NULL;
UFclose(&f);
add_auth_cookie_flag = 0;
@@ -2123,10 +2130,6 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
if (real_type == NULL)
real_type = t;
proc = loadBuffer;
-#ifdef USE_IMAGE
- cur_baseURL = New(ParsedURL);
- copyParsedURL(cur_baseURL, &pu);
-#endif
current_content_length = 0;
if ((p = checkHeader(t_buf, "Content-Length:")) != NULL)
@@ -2197,18 +2200,8 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
#endif
else if (w3m_backend) ;
else if (!(w3m_dump & ~DUMP_FRAME) || is_dump_text_type(t)) {
- if (!do_download && doExternal(f,
- pu.real_file ? pu.real_file : pu.file,
- t, &b, t_buf)) {
- if (b && b != NO_BUFFER) {
- b->real_scheme = f.scheme;
- b->real_type = real_type;
- if (b->currentURL.host == NULL && b->currentURL.file == NULL)
- copyParsedURL(&b->currentURL, &pu);
- }
- UFclose(&f);
- TRAP_OFF;
- return b;
+ if (!do_download && searchExtViewer(t) != NULL) {
+ proc = DO_EXTERNAL;
}
else {
TRAP_OFF;
@@ -2232,36 +2225,30 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
else if (w3m_dump & DUMP_FRAME)
return NULL;
+ if (t_buf == NULL)
+ t_buf = newBuffer(INIT_BUFFER_WIDTH);
+ copyParsedURL(&t_buf->currentURL, &pu);
+ t_buf->filename = pu.real_file ? pu.real_file :
+ pu.file ? conv_to_system(pu.file) : NULL;
if (flag & RG_FRAME) {
- if (t_buf == NULL)
- t_buf = newBuffer(INIT_BUFFER_WIDTH);
t_buf->bufferprop |= BP_FRAME;
}
#ifdef USE_SSL
- if (t_buf)
- t_buf->ssl_certificate = f.ssl_certificate;
+ t_buf->ssl_certificate = f.ssl_certificate;
#endif
frame_source = flag & RG_FRAME_SRC;
- b = loadSomething(&f, pu.real_file ? pu.real_file : pu.file, proc, t_buf);
+ if (proc == DO_EXTERNAL) {
+ b = doExternal(f, t, t_buf);
+ } else {
+ b = loadSomething(&f, proc, t_buf);
+ }
UFclose(&f);
frame_source = 0;
- if (b) {
+ if (b && b != NO_BUFFER) {
b->real_scheme = f.scheme;
b->real_type = real_type;
- if (b->currentURL.host == NULL && b->currentURL.file == NULL)
- copyParsedURL(&b->currentURL, &pu);
- if (is_html_type(t))
- b->type = "text/html";
- else if (w3m_backend) {
- Str s = Strnew_charp(t);
- b->type = s->ptr;
- }
-#ifdef USE_IMAGE
- else if (proc == loadImageBuffer)
- b->type = "text/html";
-#endif
- else
- b->type = "text/plain";
+ if (w3m_backend)
+ b->type = allocStr(t, -1);
if (pu.label) {
if (proc == loadHTMLBuffer) {
Anchor *a;
@@ -2287,10 +2274,11 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
if (header_string)
header_string = NULL;
#ifdef USE_NNTP
- if (f.scheme == SCM_NNTP || f.scheme == SCM_NEWS)
+ if (b && b != NO_BUFFER && (f.scheme == SCM_NNTP || f.scheme == SCM_NEWS))
reAnchorNewsheader(b);
#endif
- preFormUpdateBuffer(b);
+ if (b && b != NO_BUFFER)
+ preFormUpdateBuffer(b);
TRAP_OFF;
return b;
}
@@ -2325,8 +2313,12 @@ push_link(int cmd, int offset, int pos)
struct link_stack *p;
p = New(struct link_stack);
p->cmd = cmd;
- p->offset = offset;
- p->pos = pos;
+ p->offset = (short)offset;
+ if (p->offset < 0)
+ p->offset = 0;
+ p->pos = (short)pos;
+ if (p->pos < 0)
+ p->pos = 0;
p->next = link_stack;
link_stack = p;
}
@@ -2469,6 +2461,7 @@ set_breakpoint(struct readbuffer *obuf, int tag_length)
bcopy((void *)&obuf->anchor, (void *)&obuf->bp.anchor,
sizeof(obuf->anchor));
obuf->bp.img_alt = obuf->img_alt;
+ obuf->bp.input_alt = obuf->input_alt;
obuf->bp.in_bold = obuf->in_bold;
obuf->bp.in_italic = obuf->in_italic;
obuf->bp.in_under = obuf->in_under;
@@ -2486,6 +2479,7 @@ back_to_breakpoint(struct readbuffer *obuf)
bcopy((void *)&obuf->bp.anchor, (void *)&obuf->anchor,
sizeof(obuf->anchor));
obuf->img_alt = obuf->bp.img_alt;
+ obuf->input_alt = obuf->bp.input_alt;
obuf->in_bold = obuf->bp.in_bold;
obuf->in_italic = obuf->bp.in_italic;
obuf->in_under = obuf->bp.in_under;
@@ -2729,7 +2723,7 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent,
Str line = obuf->line, pass = NULL;
char *hidden_anchor = NULL, *hidden_img = NULL, *hidden_bold = NULL,
*hidden_under = NULL, *hidden_italic = NULL, *hidden_strike = NULL,
- *hidden_ins = NULL, *hidden = NULL;
+ *hidden_ins = NULL, *hidden_input = NULL, *hidden = NULL;
#ifdef DEBUG
if (w3m_debug) {
@@ -2761,6 +2755,12 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent,
hidden = hidden_img;
}
}
+ if (obuf->input_alt.in) {
+ if ((hidden_input = has_hidden_link(obuf, HTML_INPUT_ALT)) != NULL) {
+ if (!hidden || hidden_input < hidden)
+ hidden = hidden_input;
+ }
+ }
if (obuf->in_bold) {
if ((hidden_bold = has_hidden_link(obuf, HTML_B)) != NULL) {
if (!hidden || hidden_bold < hidden)
@@ -2812,6 +2812,8 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent,
Strcat_charp(line, "</a>");
if (obuf->img_alt && !hidden_img)
Strcat_charp(line, "</img_alt>");
+ if (obuf->input_alt.in && !hidden_input)
+ Strcat_charp(line, "</input_alt>");
if (obuf->in_bold && !hidden_bold)
Strcat_charp(line, "</b>");
if (obuf->in_italic && !hidden_italic)
@@ -3022,6 +3024,18 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent,
Strcat_charp(tmp, "\">");
push_tag(obuf, tmp->ptr, HTML_IMG_ALT);
}
+ if (!hidden_input && obuf->input_alt.in) {
+ Str tmp;
+ if (obuf->input_alt.hseq > 0)
+ obuf->input_alt.hseq = - obuf->input_alt.hseq;
+ tmp = Sprintf("<INPUT_ALT hseq=\"%d\" fid=\"%d\" name=\"%s\" type=\"%s\" value=\"%s\">",
+ obuf->input_alt.hseq,
+ obuf->input_alt.fid,
+ obuf->input_alt.name ? obuf->input_alt.name->ptr : "",
+ obuf->input_alt.type ? obuf->input_alt.type->ptr : "",
+ obuf->input_alt.value ? obuf->input_alt.value->ptr : "");
+ push_tag(obuf, tmp->ptr, HTML_INPUT_ALT);
+ }
if (!hidden_bold && obuf->in_bold)
push_tag(obuf, "<B>", HTML_B);
if (!hidden_italic && obuf->in_italic)
@@ -3228,7 +3242,7 @@ process_img(struct parsed_tag *tag, int width)
if (!parsedtag_get_value(tag, ATTR_SRC, &p))
return tmp;
- p = remove_space(p);
+ p = url_encode(remove_space(p), cur_baseURL, cur_document_charset);
q = NULL;
parsedtag_get_value(tag, ATTR_ALT, &q);
if (!pseudoInlines && (q == NULL || (*q == '\0' && ignore_null_img_alt)))
@@ -3255,9 +3269,9 @@ process_img(struct parsed_tag *tag, int width)
}
#endif
}
+ i = -1;
#ifdef USE_IMAGE
if (use_image) {
- i = -1;
if (parsedtag_get_value(tag, ATTR_HEIGHT, &i)) {
if (i > 0) {
i = (int)(i * image_scale / 100 + 0.5);
@@ -3322,12 +3336,7 @@ process_img(struct parsed_tag *tag, int width)
Image image;
ParsedURL u;
-#ifdef USE_M17N
- parseURL2(wc_conv(p, InnerCharset, cur_document_charset)->ptr, &u,
- cur_baseURL);
-#else
parseURL2(p, &u, cur_baseURL);
-#endif
image.url = parsedURL2Str(&u)->ptr;
if (!uncompressed_file_type(u.file, &image.ext))
image.ext = filename_extension(u.file, TRUE);
@@ -3346,8 +3355,14 @@ process_img(struct parsed_tag *tag, int width)
if (i < 0)
i = pixel_per_line;
}
- nw = (w > 3) ? (int)((w - 3) / pixel_per_char + 1) : 1;
- ni = (i > 3) ? (int)((i - 3) / pixel_per_line + 1) : 1;
+ if (enable_inline_image) {
+ nw = (w > 1) ? ((w - 1) / pixel_per_char_i + 1) : 1 ;
+ ni = (i > 1) ? ((i - 1) / pixel_per_line_i + 1) : 1 ;
+ }
+ else {
+ nw = (w > 3) ? (int)((w - 3) / pixel_per_char + 1) : 1;
+ ni = (i > 3) ? (int)((i - 3) / pixel_per_line + 1) : 1;
+ }
Strcat(tmp,
Sprintf("<pre_int><img_alt hseq=\"%d\" src=\"", cur_iseq++));
pre_int = TRUE;
@@ -3378,19 +3393,21 @@ process_img(struct parsed_tag *tag, int width)
if (i0 >= 0)
Strcat(tmp, Sprintf(" height=%d", i0));
switch (align) {
+ case ALIGN_MIDDLE:
+ if (!enable_inline_image) {
+ top = ni / 2;
+ bottom = top;
+ if (top * 2 == ni)
+ yoffset = (int)(((ni + 1) * pixel_per_line - i) / 2);
+ else
+ yoffset = (int)((ni * pixel_per_line - i) / 2);
+ break;
+ }
case ALIGN_TOP:
top = 0;
bottom = ni - 1;
yoffset = 0;
break;
- case ALIGN_MIDDLE:
- top = ni / 2;
- bottom = top;
- if (top * 2 == ni)
- yoffset = (int)(((ni + 1) * pixel_per_line - i) / 2);
- else
- yoffset = (int)((ni * pixel_per_line - i) / 2);
- break;
case ALIGN_BOTTOM:
top = ni - 1;
bottom = 0;
@@ -3408,7 +3425,12 @@ process_img(struct parsed_tag *tag, int width)
}
break;
}
- xoffset = (int)((nw * pixel_per_char - w) / 2);
+
+ if (enable_inline_image)
+ xoffset = 0;
+ else
+ xoffset = (int)((nw * pixel_per_char - w) / 2);
+
if (xoffset)
Strcat(tmp, Sprintf(" xoffset=%d", xoffset));
if (yoffset)
@@ -3435,7 +3457,7 @@ process_img(struct parsed_tag *tag, int width)
if (use_image) {
if (n > nw) {
char *r;
- for (r = q, n = 0; r; r += get_mclen(r), n += get_mcwidth(r)) {
+ for (r = q, n = 0; *r; r += get_mclen(r), n += get_mcwidth(r)) {
if (n + get_mcwidth(r) > nw)
break;
}
@@ -3548,7 +3570,7 @@ process_anchor(struct parsed_tag *tag, char *tagbuf)
Str
process_input(struct parsed_tag *tag)
{
- int i, w, v, x, y, z, iw, ih;
+ int i = 20, v, x, y, z, iw, ih, size = 20;
char *q, *p, *r, *p2, *s;
Str tmp = NULL;
char *qq = "";
@@ -3567,9 +3589,9 @@ process_input(struct parsed_tag *tag)
parsedtag_get_value(tag, ATTR_VALUE, &q);
r = "";
parsedtag_get_value(tag, ATTR_NAME, &r);
- w = 20;
- parsedtag_get_value(tag, ATTR_SIZE, &w);
- i = 20;
+ parsedtag_get_value(tag, ATTR_SIZE, &size);
+ if (size > MAX_INPUT_SIZE)
+ size = MAX_INPUT_SIZE;
parsedtag_get_value(tag, ATTR_MAXLENGTH, &i);
p2 = NULL;
parsedtag_get_value(tag, ATTR_ALT, &p2);
@@ -3623,9 +3645,10 @@ process_input(struct parsed_tag *tag)
Strcat(tmp, getLinkNumberStr(0));
Strcat_char(tmp, '(');
}
- Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=%s "
+ Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=\"%s\" "
"name=\"%s\" width=%d maxlength=%d value=\"%s\"",
- cur_hseq++, cur_form_id, p, html_quote(r), w, i, qq));
+ cur_hseq++, cur_form_id, html_quote(p),
+ html_quote(r), size, i, qq));
if (x)
Strcat_charp(tmp, " checked");
if (y)
@@ -3670,18 +3693,18 @@ process_input(struct parsed_tag *tag)
case FORM_INPUT_PASSWORD:
i = 0;
if (q) {
- for (; i < qlen && i < w; i++)
+ for (; i < qlen && i < size; i++)
Strcat_char(tmp, '*');
}
- for (; i < w; i++)
+ for (; i < size; i++)
Strcat_char(tmp, ' ');
break;
case FORM_INPUT_TEXT:
case FORM_INPUT_FILE:
if (q)
- Strcat(tmp, textfieldrep(Strnew_charp(q), w));
+ Strcat(tmp, textfieldrep(Strnew_charp(q), size));
else {
- for (i = 0; i < w; i++)
+ for (i = 0; i < size; i++)
Strcat_char(tmp, ' ');
}
break;
@@ -3731,6 +3754,75 @@ process_input(struct parsed_tag *tag)
return tmp;
}
+Str
+process_button(struct parsed_tag *tag)
+{
+ Str tmp = NULL;
+ char *p, *q, *r, *qq = "";
+ int qlen, v;
+
+ if (cur_form_id < 0) {
+ char *s = "<form_int method=internal action=none>";
+ tmp = process_form(parse_tag(&s, TRUE));
+ }
+ if (tmp == NULL)
+ tmp = Strnew();
+
+ p = "submit";
+ parsedtag_get_value(tag, ATTR_TYPE, &p);
+ q = NULL;
+ parsedtag_get_value(tag, ATTR_VALUE, &q);
+ r = "";
+ parsedtag_get_value(tag, ATTR_NAME, &r);
+
+ v = formtype(p);
+ if (v == FORM_UNKNOWN)
+ return NULL;
+
+ switch (v) {
+ case FORM_INPUT_SUBMIT:
+ case FORM_INPUT_BUTTON:
+ case FORM_INPUT_RESET:
+ break;
+ default:
+ p = "submit";
+ v = FORM_INPUT_SUBMIT;
+ break;
+ }
+
+ if (!q) {
+ switch (v) {
+ case FORM_INPUT_SUBMIT:
+ case FORM_INPUT_BUTTON:
+ q = "SUBMIT";
+ break;
+ case FORM_INPUT_RESET:
+ q = "RESET";
+ break;
+ }
+ }
+ if (q) {
+ qq = html_quote(q);
+ qlen = strlen(q);
+ }
+
+ /* Strcat_charp(tmp, "<pre_int>"); */
+ Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=\"%s\" "
+ "name=\"%s\" value=\"%s\">",
+ cur_hseq++, cur_form_id, html_quote(p),
+ html_quote(r), qq));
+ return tmp;
+}
+
+Str
+process_n_button(void)
+{
+ Str tmp = Strnew();
+ Strcat_charp(tmp, "</input_alt>");
+ /* Strcat_charp(tmp, "</pre_int>"); */
+ return tmp;
+}
+
Str
process_select(struct parsed_tag *tag)
{
@@ -3926,7 +4018,7 @@ process_textarea(struct parsed_tag *tag, int width)
cur_textarea_size = 20;
if (parsedtag_get_value(tag, ATTR_COLS, &p)) {
cur_textarea_size = atoi(p);
- if (p[strlen(p) - 1] == '%')
+ if (strlen(p) > 0 && p[strlen(p) - 1] == '%')
cur_textarea_size = width * cur_textarea_size / 100 - 2;
if (cur_textarea_size <= 0) {
cur_textarea_size = 20;
@@ -4003,7 +4095,9 @@ feed_textarea(char *str)
Strcat_charp(textarea_str[n_textarea], "\r\n");
str++;
}
- else if (*str != '\r')
+ else if (*str == '\r')
+ str++;
+ else
Strcat_char(textarea_str[n_textarea], *(str++));
}
}
@@ -4084,6 +4178,7 @@ process_form_int(struct parsed_tag *tag, int fid)
parsedtag_get_value(tag, ATTR_METHOD, &p);
q = "!CURRENT_URL!";
parsedtag_get_value(tag, ATTR_ACTION, &q);
+ q = url_encode(remove_space(q), cur_baseURL, cur_document_charset);
r = NULL;
#ifdef USE_M17N
if (parsedtag_get_value(tag, ATTR_ACCEPT_CHARSET, &r))
@@ -4113,7 +4208,7 @@ process_form_int(struct parsed_tag *tag, int fid)
forms = New_N(FormList *, forms_size);
form_stack = NewAtom_N(int, forms_size);
}
- else if (forms_size <= form_max) {
+ if (forms_size <= form_max) {
forms_size += form_max;
forms = New_Reuse(FormList *, forms, forms_size);
form_stack = New_Reuse(int, form_stack, forms_size);
@@ -4284,15 +4379,16 @@ getMetaRefreshParam(char *q, Str *refresh_uri)
while (*q) {
if (!strncasecmp(q, "url=", 4)) {
q += 4;
- if (*q == '\"') /* " */
+ if (*q == '\"' || *q == '\'') /* " or ' */
q++;
r = q;
while (*r && !IS_SPACE(*r) && *r != ';')
r++;
s_tmp = Strnew_charp_n(q, r - q);
- if (s_tmp->ptr[s_tmp->length - 1] == '\"') { /* "
- */
+ if (s_tmp->length > 0 &&
+ (s_tmp->ptr[s_tmp->length - 1] == '\"' || /* " */
+ s_tmp->ptr[s_tmp->length - 1] == '\'')) { /* ' */
s_tmp->length--;
s_tmp->ptr[s_tmp->length] = '\0';
}
@@ -4599,6 +4695,12 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
case HTML_DD:
CLOSE_A;
CLOSE_DT;
+ if (h_env->envc == 0 ||
+ (h_env->envc_real < h_env->nenv &&
+ envs[h_env->envc].env != HTML_DL &&
+ envs[h_env->envc].env != HTML_DL_COMPACT)) {
+ PUSH_ENV(HTML_DL);
+ }
if (envs[h_env->envc].env == HTML_DL_COMPACT) {
if (obuf->pos > envs[h_env->envc].indent)
flushline(h_env, obuf, envs[h_env->envc].indent, 0,
@@ -4833,13 +4935,13 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
#ifdef USE_IMAGE
i = 0;
if (parsedtag_get_value(tag, ATTR_TOP_MARGIN, &i)) {
- if (i > obuf->top_margin)
- obuf->top_margin = i;
+ if ((short)i > obuf->top_margin)
+ obuf->top_margin = (short)i;
}
i = 0;
if (parsedtag_get_value(tag, ATTR_BOTTOM_MARGIN, &i)) {
- if (i > obuf->bottom_margin)
- obuf->bottom_margin = i;
+ if ((short)i > obuf->bottom_margin)
+ obuf->bottom_margin = (short)i;
}
#endif
return 0;
@@ -4853,15 +4955,43 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
case HTML_INPUT_ALT:
i = 0;
if (parsedtag_get_value(tag, ATTR_TOP_MARGIN, &i)) {
- if (i > obuf->top_margin)
- obuf->top_margin = i;
+ if ((short)i > obuf->top_margin)
+ obuf->top_margin = (short)i;
}
i = 0;
if (parsedtag_get_value(tag, ATTR_BOTTOM_MARGIN, &i)) {
- if (i > obuf->bottom_margin)
- obuf->bottom_margin = i;
+ if ((short)i > obuf->bottom_margin)
+ obuf->bottom_margin = (short)i;
+ }
+ if (parsedtag_get_value(tag, ATTR_HSEQ, &hseq)) {
+ obuf->input_alt.hseq = hseq;
+ }
+ if (parsedtag_get_value(tag, ATTR_FID, &i)) {
+ obuf->input_alt.fid = i;
}
+ if (parsedtag_get_value(tag, ATTR_TYPE, &p)) {
+ obuf->input_alt.type = Strnew_charp(p);
+ }
+ if (parsedtag_get_value(tag, ATTR_VALUE, &p)) {
+ obuf->input_alt.value = Strnew_charp(p);
+ }
+ if (parsedtag_get_value(tag, ATTR_NAME, &p)) {
+ obuf->input_alt.name = Strnew_charp(p);
+ }
+ obuf->input_alt.in = 1;
return 0;
+ case HTML_N_INPUT_ALT:
+ if (obuf->input_alt.in) {
+ if (!close_effect0(obuf, HTML_INPUT_ALT))
+ push_tag(obuf, "</input_alt>", HTML_N_INPUT_ALT);
+ obuf->input_alt.hseq = 0;
+ obuf->input_alt.fid = -1;
+ obuf->input_alt.in = 0;
+ obuf->input_alt.type = NULL;
+ obuf->input_alt.name = NULL;
+ obuf->input_alt.value = NULL;
+ }
+ return 1;
case HTML_TABLE:
close_anchor(h_env, obuf);
obuf->table_level++;
@@ -4884,6 +5014,8 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
else
w = BORDER_THIN;
}
+ if (DisplayBorders && w == BORDER_NONE)
+ w = BORDER_THIN;
if (parsedtag_get_value(tag, ATTR_WIDTH, &i)) {
if (obuf->table_level == 0)
width = REAL_WIDTH(i, h_env->limit - envs[h_env->envc].indent);
@@ -4892,9 +5024,24 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
}
if (parsedtag_exists(tag, ATTR_HBORDER))
w = BORDER_NOWIN;
+#define MAX_CELLSPACING 1000
+#define MAX_CELLPADDING 1000
+#define MAX_VSPACE 1000
parsedtag_get_value(tag, ATTR_CELLSPACING, &x);
parsedtag_get_value(tag, ATTR_CELLPADDING, &y);
parsedtag_get_value(tag, ATTR_VSPACE, &z);
+ if (x < 0)
+ x = 0;
+ if (y < 0)
+ y = 0;
+ if (z < 0)
+ z = 0;
+ if (x > MAX_CELLSPACING)
+ x = MAX_CELLSPACING;
+ if (y > MAX_CELLPADDING)
+ y = MAX_CELLPADDING;
+ if (z > MAX_VSPACE)
+ z = MAX_VSPACE;
#ifdef ID_EXT
parsedtag_get_value(tag, ATTR_ID, &id);
#endif /* ID_EXT */
@@ -4970,6 +5117,16 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
case HTML_INPUT:
close_anchor(h_env, obuf);
tmp = process_input(tag);
+ if (tmp)
+ HTMLlineproc1(tmp->ptr, h_env);
+ return 1;
+ case HTML_BUTTON:
+ tmp = process_button(tag);
+ if (tmp)
+ HTMLlineproc1(tmp->ptr, h_env);
+ return 1;
+ case HTML_N_BUTTON:
+ tmp = process_n_button();
if (tmp)
HTMLlineproc1(tmp->ptr, h_env);
return 1;
@@ -5067,11 +5224,10 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
}
return 1;
case HTML_BASE:
-#ifdef USE_IMAGE
+#if defined(USE_M17N) || defined(USE_IMAGE)
p = NULL;
if (parsedtag_get_value(tag, ATTR_HREF, &p)) {
- if (!cur_baseURL)
- cur_baseURL = New(ParsedURL);
+ cur_baseURL = New(ParsedURL);
parseURL(p, cur_baseURL, NULL);
}
#endif
@@ -5329,6 +5485,13 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
#ifdef MENU_SELECT
Anchor **a_select = NULL;
#endif
+#if defined(USE_M17N) || defined(USE_IMAGE)
+ ParsedURL *base = baseURL(buf);
+#endif
+#ifdef USE_M17N
+ wc_ces name_charset = url_to_charset(NULL, &buf->currentURL,
+ buf->document_charset);
+#endif
if (out_size == 0) {
out_size = LINELEN;
@@ -5523,16 +5686,17 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
hseq = 0;
id = NULL;
if (parsedtag_get_value(tag, ATTR_NAME, &id)) {
- id = url_quote_conv(id, buf->document_charset);
+ id = url_quote_conv(id, name_charset);
registerName(buf, id, currentLn(buf), pos);
}
if (parsedtag_get_value(tag, ATTR_HREF, &p))
- p = url_quote_conv(remove_space(p),
- buf->document_charset);
+ p = url_encode(remove_space(p), base,
+ buf->document_charset);
if (parsedtag_get_value(tag, ATTR_TARGET, &q))
q = url_quote_conv(q, buf->document_charset);
if (parsedtag_get_value(tag, ATTR_REFERER, &r))
- r = url_quote_conv(r, buf->document_charset);
+ r = url_encode(r, base,
+ buf->document_charset);
parsedtag_get_value(tag, ATTR_TITLE, &s);
parsedtag_get_value(tag, ATTR_ACCESSKEY, &t);
parsedtag_get_value(tag, ATTR_HSEQ, &hseq);
@@ -5571,7 +5735,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
a_href->end.pos = pos;
if (a_href->start.line == a_href->end.line &&
a_href->start.pos == a_href->end.pos) {
- if (buf->hmarklist &&
+ if (buf->hmarklist && a_href->hseq >= 0 &&
a_href->hseq < buf->hmarklist->nmark)
buf->hmarklist->marks[a_href->hseq].invalid = 1;
a_href->hseq = -1;
@@ -5618,7 +5782,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
ParsedURL u;
Image *image;
- parseURL2(a_img->url, &u, cur_baseURL);
+ parseURL2(a_img->url, &u, base);
a_img->image = image = New(Image);
image->url = parsedURL2Str(&u)->ptr;
if (!uncompressed_file_type(u.file, &image->ext))
@@ -5639,7 +5803,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
image->map = q;
image->ismap = ismap;
image->touch = 0;
- image->cache = getImage(image, cur_baseURL,
+ image->cache = getImage(image, base,
IMG_FLAG_SKIP);
}
else if (iseq < 0) {
@@ -5678,7 +5842,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
parsedtag_get_value(tag, ATTR_FID, &form_id);
parsedtag_get_value(tag, ATTR_TOP_MARGIN, &top);
parsedtag_get_value(tag, ATTR_BOTTOM_MARGIN, &bottom);
- if (form_id < 0 || form_id > form_max || forms == NULL)
+ if (form_id < 0 || form_id > form_max ||
+ forms == NULL || forms[form_id] == NULL)
break; /* outside of <form>..</form> */
form = forms[form_id];
if (hseq > 0) {
@@ -5689,6 +5854,21 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
putHmarker(buf->hmarklist, currentLn(buf),
hpos, hseq - 1);
}
+ else if (hseq < 0) {
+ int h = -hseq - 1;
+ int hpos = pos;
+ if (*str == '[')
+ hpos++;
+ if (buf->hmarklist &&
+ h < buf->hmarklist->nmark &&
+ buf->hmarklist->marks[h].invalid) {
+ buf->hmarklist->marks[h].pos = hpos;
+ buf->hmarklist->marks[h].line = currentLn(buf);
+ buf->hmarklist->marks[h].invalid = 0;
+ hseq = -hseq;
+ }
+ }
+
if (!form->target)
form->target = buf->baseTarget;
if (a_textarea &&
@@ -5761,8 +5941,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
break;
if (parsedtag_get_value(tag, ATTR_HREF, &p)) {
MapArea *a;
- p = url_quote_conv(remove_space(p),
- buf->document_charset);
+ p = url_encode(remove_space(p), base,
+ buf->document_charset);
t = NULL;
parsedtag_get_value(tag, ATTR_TARGET, &t);
q = "";
@@ -5811,11 +5991,14 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
break;
case HTML_BASE:
if (parsedtag_get_value(tag, ATTR_HREF, &p)) {
- p = url_quote_conv(remove_space(p),
- buf->document_charset);
+ p = url_encode(remove_space(p), NULL,
+ buf->document_charset);
if (!buf->baseURL)
buf->baseURL = New(ParsedURL);
- parseURL(p, buf->baseURL, NULL);
+ parseURL2(p, buf->baseURL, &buf->currentURL);
+#if defined(USE_M17N) || defined(USE_IMAGE)
+ base = buf->baseURL;
+#endif
}
if (parsedtag_get_value(tag, ATTR_TARGET, &p))
buf->baseTarget =
@@ -5830,8 +6013,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
int refresh_interval = getMetaRefreshParam(q, &tmp);
#ifdef USE_ALARM
if (tmp) {
- p = url_quote_conv(remove_space(tmp->ptr),
- buf->document_charset);
+ p = url_encode(remove_space(tmp->ptr), base,
+ buf->document_charset);
buf->event = setAlarmEvent(buf->event,
refresh_interval,
AL_IMPLICIT_ONCE,
@@ -5844,8 +6027,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
FUNCNAME_reload, NULL);
#else
if (tmp && refresh_interval == 0) {
- p = url_quote_conv(remove_space(tmp->ptr),
- buf->document_charset);
+ p = url_encode(remove_space(tmp->ptr), base,
+ buf->document_charset);
pushEvent(FUNCNAME_gorURL, p);
}
#endif
@@ -5864,14 +6047,14 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
case HTML_TEXTAREA_INT:
if (parsedtag_get_value(tag, ATTR_TEXTAREANUMBER,
&n_textarea)
- && n_textarea < max_textarea) {
+ && n_textarea >= 0 && n_textarea < max_textarea) {
textarea_str[n_textarea] = Strnew();
}
else
n_textarea = -1;
break;
case HTML_N_TEXTAREA_INT:
- if (n_textarea >= 0) {
+ if (a_textarea && n_textarea >= 0) {
FormItemList *item =
(FormItemList *)a_textarea[n_textarea]->url;
item->init_value = item->value =
@@ -5881,7 +6064,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
#ifdef MENU_SELECT
case HTML_SELECT_INT:
if (parsedtag_get_value(tag, ATTR_SELECTNUMBER, &n_select)
- && n_select < max_select) {
+ && n_select >= 0 && n_select < max_select) {
select_option[n_select].first = NULL;
select_option[n_select].last = NULL;
}
@@ -5889,7 +6072,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
n_select = -1;
break;
case HTML_N_SELECT_INT:
- if (n_select >= 0) {
+ if (a_select && n_select >= 0) {
FormItemList *item =
(FormItemList *)a_select[n_select]->url;
item->select_option = select_option[n_select].first;
@@ -5929,7 +6112,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
#ifdef ID_EXT
id = NULL;
if (parsedtag_get_value(tag, ATTR_ID, &id)) {
- id = url_quote_conv(id, buf->document_charset);
+ id = url_quote_conv(id, name_charset);
registerName(buf, id, currentLn(buf), pos);
}
if (renderFrameSet &&
@@ -5964,7 +6147,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
fclose(debug);
#endif
for (form_id = 1; form_id <= form_max; form_id++)
- forms[form_id]->next = forms[form_id - 1];
+ if (forms[form_id])
+ forms[form_id]->next = forms[form_id - 1];
buf->formlist = (form_max >= 0) ? forms[form_max] : NULL;
if (n_textarea)
addMultirowsForm(buf, buf->formitem);
@@ -5982,7 +6166,8 @@ addLink(Buffer *buf, struct parsed_tag *tag)
parsedtag_get_value(tag, ATTR_HREF, &href);
if (href)
- href = url_quote_conv(remove_space(href), buf->document_charset);
+ href = url_encode(remove_space(href), baseURL(buf),
+ buf->document_charset);
parsedtag_get_value(tag, ATTR_TITLE, &title);
parsedtag_get_value(tag, ATTR_TYPE, &ctype);
parsedtag_get_value(tag, ATTR_REL, &rel);
@@ -6154,10 +6339,10 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
while (*line != '\0') {
char *str, *p;
int is_tag = FALSE;
- int pre_mode = (obuf->table_level >= 0) ? tbl_mode->pre_mode :
- obuf->flag;
- int end_tag = (obuf->table_level >= 0) ? tbl_mode->end_tag :
- obuf->end_tag;
+ int pre_mode = (obuf->table_level >= 0 && tbl_mode) ?
+ tbl_mode->pre_mode : obuf->flag;
+ int end_tag = (obuf->table_level >= 0 && tbl_mode) ?
+ tbl_mode->end_tag : obuf->end_tag;
if (*line == '<' || obuf->status != R_ST_NORMAL) {
/*
@@ -6173,7 +6358,7 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
}
if (h_env->tagbuf->length == 0)
continue;
- str = h_env->tagbuf->ptr;
+ str = Strdup(h_env->tagbuf)->ptr;
if (*str == '<') {
if (str[1] && REALLY_THE_BEGINNING_OF_A_TAG(str))
is_tag = TRUE;
@@ -6239,7 +6424,7 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
}
proc_normal:
- if (obuf->table_level >= 0) {
+ if (obuf->table_level >= 0 && tbl && tbl_mode) {
/*
* within table: in <table>..</table>, all input tokens
* are fed to the table renderer, and then the renderer
@@ -6255,6 +6440,8 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
if (obuf->table_level >= 0) {
struct table *tbl0 = tables[obuf->table_level];
str = Sprintf("<table_alt tid=%d>", tbl0->ntable)->ptr;
+ if (tbl0->row < 0)
+ continue;
pushTable(tbl0, tbl);
tbl = tbl0;
tbl_mode = &table_mode[obuf->table_level];
@@ -6272,6 +6459,7 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
do_blankline(h_env, obuf, indent, 0, h_env->limit);
}
save_fonteffect(h_env, obuf);
+ initRenderTable();
renderTable(tbl, tbl_width, h_env);
restore_fonteffect(h_env, obuf);
obuf->flag &= ~RB_IGNORE_P;
@@ -6429,7 +6617,8 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
indent = h_env->envs[h_env->envc].indent;
if (obuf->bp.pos - i > indent) {
Str line;
- append_tags(obuf);
+ append_tags(obuf); /* may reallocate the buffer */
+ bp = obuf->line->ptr + obuf->bp.len;
line = Strnew_charp(bp);
Strshrink(obuf->line, obuf->line->length - obuf->bp.len);
#ifdef FORMAT_NICE
@@ -6756,6 +6945,12 @@ init_henv(struct html_feed_environ *h_env, struct readbuffer *obuf,
obuf->nobr_level = 0;
bzero((void *)&obuf->anchor, sizeof(obuf->anchor));
obuf->img_alt = 0;
+ obuf->input_alt.hseq = 0;
+ obuf->input_alt.fid = -1;
+ obuf->input_alt.in = 0;
+ obuf->input_alt.type = NULL;
+ obuf->input_alt.name = NULL;
+ obuf->input_alt.value = NULL;
obuf->in_bold = 0;
obuf->in_italic = 0;
obuf->in_under = 0;
@@ -6791,6 +6986,15 @@ completeHTMLstream(struct html_feed_environ *h_env, struct readbuffer *obuf)
push_tag(obuf, "</img_alt>", HTML_N_IMG_ALT);
obuf->img_alt = NULL;
}
+ if (obuf->input_alt.in) {
+ push_tag(obuf, "</input_alt>", HTML_N_INPUT_ALT);
+ obuf->input_alt.hseq = 0;
+ obuf->input_alt.fid = -1;
+ obuf->input_alt.in = 0;
+ obuf->input_alt.type = NULL;
+ obuf->input_alt.name = NULL;
+ obuf->input_alt.value = NULL;
+ }
if (obuf->in_bold) {
push_tag(obuf, "</b>", HTML_N_B);
obuf->in_bold = 0;
@@ -6824,9 +7028,12 @@ completeHTMLstream(struct html_feed_environ *h_env, struct readbuffer *obuf)
obuf->table_level = MAX_TABLE - 1;
while (obuf->table_level >= 0) {
+ int tmp = obuf->table_level;
table_mode[obuf->table_level].pre_mode
&= ~(TBLM_SCRIPT | TBLM_STYLE | TBLM_PLAIN);
HTMLlineproc1("</table>", h_env);
+ if (obuf->table_level >= tmp)
+ break;
}
}
@@ -6848,6 +7055,8 @@ print_internal_information(struct html_feed_environ *henv)
if (form_max >= 0) {
FormList *fp;
for (i = 0; i <= form_max; i++) {
+ if (forms[i] == NULL)
+ continue;
fp = forms[i];
s = Sprintf("<form_int fid=\"%d\" action=\"%s\" method=\"%s\"",
i, html_quote(fp->action->ptr),
@@ -6963,8 +7172,6 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal)
image_flag = IMG_FLAG_AUTO;
else
image_flag = IMG_FLAG_SKIP;
- if (newBuf->currentURL.file)
- cur_baseURL = baseURL(newBuf);
#endif
if (w3m_halfload) {
@@ -6987,6 +7194,9 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal)
htmlenv1.f = stdout;
else
htmlenv1.buf = newTextLineList();
+#if defined(USE_M17N) || defined(USE_IMAGE)
+ cur_baseURL = baseURL(newBuf);
+#endif
if (SETJMP(AbortLoading) != 0) {
HTMLlineproc1("<br>Transfer Interrupted!<br>", &htmlenv1);
@@ -7048,18 +7258,23 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal)
}
#endif
lineBuf2 = convertLine(f, lineBuf2, HTML_MODE, &charset, doc_charset);
-#if defined(USE_M17N) && defined(USE_IMAGE)
+#ifdef USE_M17N
cur_document_charset = charset;
#endif
HTMLlineproc0(lineBuf2->ptr, &htmlenv1, internal);
}
if (obuf.status != R_ST_NORMAL) {
- obuf.status = R_ST_EOL;
HTMLlineproc0("\n", &htmlenv1, internal);
}
obuf.status = R_ST_NORMAL;
completeHTMLstream(&htmlenv1, &obuf);
flushline(&htmlenv1, &obuf, 0, 2, htmlenv1.limit);
+#if defined(USE_M17N) || defined(USE_IMAGE)
+ cur_baseURL = NULL;
+#endif
+#ifdef USE_M17N
+ cur_document_charset = 0;
+#endif
if (htmlenv1.title)
newBuf->buffername = htmlenv1.title;
if (w3m_halfdump) {
@@ -7096,16 +7311,17 @@ loadHTMLString(Str page)
MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL;
Buffer *newBuf;
+ init_stream(&f, SCM_LOCAL, newStrStream(page));
+
newBuf = newBuffer(INIT_BUFFER_WIDTH);
if (SETJMP(AbortLoading) != 0) {
TRAP_OFF;
discardBuffer(newBuf);
+ UFclose(&f);
return NULL;
}
TRAP_ON;
- init_stream(&f, SCM_LOCAL, newStrStream(page));
-
#ifdef USE_M17N
newBuf->document_charset = InnerCharset;
#endif
@@ -7115,6 +7331,7 @@ loadHTMLString(Str page)
#endif
TRAP_OFF;
+ UFclose(&f);
newBuf->topLine = newBuf->firstLine;
newBuf->lastLine = newBuf->currentLine;
newBuf->currentLine = newBuf->firstLine;
@@ -7207,7 +7424,7 @@ loadGopherDir(URLFile *uf, ParsedURL *pu, wc_ces * charset)
q = Strnew_m_charp("gopher://", host->ptr, ":", port->ptr,
"/", file->ptr, NULL)->ptr;
Strcat_m_charp(tmp, "<a href=\"",
- html_quote(url_quote_conv(q, *charset)),
+ html_quote(url_encode(q, NULL, *charset)),
"\">", p, html_quote(name->ptr + 1), "</a>\n", NULL);
}
@@ -7243,7 +7460,6 @@ loadBuffer(URLFile *uf, Buffer *volatile newBuf)
if (newBuf == NULL)
newBuf = newBuffer(INIT_BUFFER_WIDTH);
- lineBuf2 = Strnew();
if (SETJMP(AbortLoading) != 0) {
goto _end;
@@ -7331,6 +7547,7 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf)
URLFile f;
MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL;
struct stat st;
+ const ParsedURL *pu = newBuf ? &newBuf->currentURL : NULL;
loadImage(newBuf, IMG_FLAG_STOP);
image.url = uf->url;
@@ -7338,20 +7555,18 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf)
image.width = -1;
image.height = -1;
image.cache = NULL;
- cache = getImage(&image, cur_baseURL, IMG_FLAG_AUTO);
- if (!cur_baseURL->is_nocache && cache->loaded & IMG_FLAG_LOADED &&
+ cache = getImage(&image, (ParsedURL *)pu, IMG_FLAG_AUTO);
+ if (!(pu && pu->is_nocache) && cache->loaded & IMG_FLAG_LOADED &&
!stat(cache->file, &st))
goto image_buffer;
- TRAP_ON;
if (IStype(uf->stream) != IST_ENCODED)
uf->stream = newEncodedStream(uf->stream, uf->encoding);
+ TRAP_ON;
if (save2tmp(*uf, cache->file) < 0) {
- UFclose(uf);
TRAP_OFF;
return NULL;
}
- UFclose(uf);
TRAP_OFF;
cache->loaded = IMG_FLAG_LOADED;
@@ -7367,10 +7582,13 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf)
tmp = Sprintf("<img src=\"%s\"><br><br>", html_quote(image.url));
tmpf = tmpfname(TMPF_SRC, ".html");
src = fopen(tmpf->ptr, "w");
+ if (src == NULL)
+ return NULL;
newBuf->mailcap_source = tmpf->ptr;
init_stream(&f, SCM_LOCAL, newStrStream(tmp));
loadHTMLstream(&f, newBuf, src, TRUE);
+ UFclose(&f);
if (src)
fclose(src);
@@ -7411,7 +7629,7 @@ conv_symbol(Line *l)
symbol = get_symbol(DisplayCharset, &w);
#endif
}
- Strcat_charp(tmp, symbol[(int)c]);
+ Strcat_charp(tmp, symbol[(unsigned char)c % N_SYMBOL]);
#ifdef USE_M17N
p += len - 1;
pr += len - 1;
@@ -7580,8 +7798,11 @@ openGeneralPagerBuffer(InputStream stream)
#ifdef USE_M17N
content_charset = 0;
#endif
+ t_buf = newBuffer(INIT_BUFFER_WIDTH);
+ copyParsedURL(&t_buf->currentURL, NULL);
+ t_buf->currentURL.scheme = SCM_LOCAL;
+ t_buf->currentURL.file = "-";
if (SearchHeader) {
- t_buf = newBuffer(INIT_BUFFER_WIDTH);
readHeader(&uf, t_buf, TRUE, NULL);
t = checkContentType(t_buf);
if (t == NULL)
@@ -7609,14 +7830,13 @@ openGeneralPagerBuffer(InputStream stream)
#ifdef USE_IMAGE
else if (activeImage && displayImage && !useExtImageViewer &&
!(w3m_dump & ~DUMP_FRAME) && !strncasecmp(t, "image/", 6)) {
- cur_baseURL = New(ParsedURL);
- parseURL("-", cur_baseURL, NULL);
buf = loadImageBuffer(&uf, t_buf);
buf->type = "text/html";
}
#endif
else {
- if (doExternal(uf, "-", t, &buf, t_buf)) {
+ if (searchExtViewer(t)) {
+ buf = doExternal(uf, t, t_buf);
UFclose(&uf);
if (buf == NULL || buf == NO_BUFFER)
return buf;
@@ -7629,8 +7849,6 @@ openGeneralPagerBuffer(InputStream stream)
}
}
buf->real_type = t;
- buf->currentURL.scheme = SCM_LOCAL;
- buf->currentURL.file = "-";
return buf;
}
@@ -7766,6 +7984,8 @@ save2tmp(URLFile uf, char *tmpf)
clen_t linelen = 0, trbyte = 0;
MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL;
static JMP_BUF env_bak;
+ volatile int retval = 0;
+ char *volatile buf = NULL;
ff = fopen(tmpf, "wb");
if (ff == NULL) {
@@ -7802,30 +8022,29 @@ save2tmp(URLFile uf, char *tmpf)
else
#endif /* USE_NNTP */
{
- Str buf = Strnew_size(SAVE_BUF_SIZE);
- while (UFread(&uf, buf, SAVE_BUF_SIZE)) {
- if (Strfputs(buf, ff) != buf->length) {
- bcopy(env_bak, AbortLoading, sizeof(JMP_BUF));
- TRAP_OFF;
- fclose(ff);
- current_content_length = 0;
- return -2;
+ int count;
+
+ buf = NewWithoutGC_N(char, SAVE_BUF_SIZE);
+ while ((count = ISread_n(uf.stream, buf, SAVE_BUF_SIZE)) > 0) {
+ if (fwrite(buf, 1, count, ff) != count) {
+ retval = -2;
+ goto _end;
}
- linelen += buf->length;
+ linelen += count;
showProgress(&linelen, &trbyte);
}
}
_end:
bcopy(env_bak, AbortLoading, sizeof(JMP_BUF));
TRAP_OFF;
+ xfree(buf);
fclose(ff);
current_content_length = 0;
- return 0;
+ return retval;
}
-int
-doExternal(URLFile uf, char *path, char *type, Buffer **bufp,
- Buffer *defaultbuf)
+Buffer *
+doExternal(URLFile uf, char *type, Buffer *defaultbuf)
{
Str tmpf, command;
struct mailcap *mcap;
@@ -7834,7 +8053,7 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp,
char *header, *src = NULL, *ext = uf.ext;
if (!(mcap = searchExtViewer(type)))
- return 0;
+ return NULL;
if (mcap->nametemplate) {
tmpf = unquote_mailcap(mcap->nametemplate, NULL, "", NULL, NULL);
@@ -7867,15 +8086,13 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp,
UFclose(&uf);
myExec(command->ptr);
}
- *bufp = NO_BUFFER;
- return 1;
+ return NO_BUFFER;
}
else
#endif
{
if (save2tmp(uf, tmpf->ptr) < 0) {
- *bufp = NULL;
- return 1;
+ return NULL;
}
}
if (mcap->flags & (MAILCAP_HTMLOUTPUT | MAILCAP_COPIOUSOUTPUT)) {
@@ -7918,14 +8135,13 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp,
buf = NO_BUFFER;
}
if (buf && buf != NO_BUFFER) {
- buf->filename = path;
- if (buf->buffername == NULL || buf->buffername[0] == '\0')
- buf->buffername = conv_from_system(lastFileName(path));
+ if ((buf->buffername == NULL || buf->buffername[0] == '\0') &&
+ buf->filename)
+ buf->buffername = conv_from_system(lastFileName(buf->filename));
buf->edit = mcap->edit;
buf->mailcap = mcap;
}
- *bufp = buf;
- return 1;
+ return buf;
}
static int
@@ -7935,7 +8151,8 @@ _MoveFile(char *path1, char *path2)
FILE *f2;
int is_pipe;
clen_t linelen = 0, trbyte = 0;
- Str buf;
+ char *buf = NULL;
+ int count;
f1 = openIS(path1);
if (f1 == NULL)
@@ -7953,12 +8170,13 @@ _MoveFile(char *path1, char *path2)
return -1;
}
current_content_length = 0;
- buf = Strnew_size(SAVE_BUF_SIZE);
- while (ISread(f1, buf, SAVE_BUF_SIZE)) {
- Strfputs(buf, f2);
- linelen += buf->length;
+ buf = NewWithoutGC_N(char, SAVE_BUF_SIZE);
+ while ((count = ISread_n(f1, buf, SAVE_BUF_SIZE)) > 0) {
+ fwrite(buf, 1, count, f2);
+ linelen += count;
showProgress(&linelen, &trbyte);
}
+ xfree(buf);
ISclose(f1);
if (is_pipe)
pclose(f2);
@@ -7998,7 +8216,7 @@ _doFileCopy(char *tmpf, char *defstr, int download)
else {
if (q) {
p = unescape_spaces(Strnew_charp(q))->ptr;
- p = conv_to_system(q);
+ p = conv_to_system(p);
}
p = expandPath(p);
if (checkOverWrite(p) < 0)
@@ -8317,21 +8535,23 @@ uncompress_stream(URLFile *uf, char **src)
}
if (pid2 == 0) {
/* child2 */
- Str buf = Strnew_size(SAVE_BUF_SIZE);
+ char *buf = NewWithoutGC_N(char, SAVE_BUF_SIZE);
+ int count;
FILE *f = NULL;
setup_child(TRUE, 2, UFfileno(uf));
if (tmpf)
f = fopen(tmpf, "wb");
- while (UFread(uf, buf, SAVE_BUF_SIZE)) {
- if (Strfputs(buf, stdout) < 0)
+ while ((count = ISread_n(uf->stream, buf, SAVE_BUF_SIZE)) > 0) {
+ if (fwrite(buf, 1, count, stdout) != count)
+ break;
+ if (f && fwrite(buf, 1, count, f) != count)
break;
- if (f)
- Strfputs(buf, f);
}
UFclose(uf);
if (f)
fclose(f);
+ xfree(buf);
exit(0);
}
/* child1 */
@@ -8378,7 +8598,7 @@ lessopen_stream(char *path)
}
c = getc(fp);
if (c == EOF) {
- fclose(fp);
+ pclose(fp);
return NULL;
}
ungetc(c, fp);
diff --git a/fm.h b/fm.h
index 8378939..96d3ab3 100644
--- a/fm.h
+++ b/fm.h
@@ -76,6 +76,7 @@ typedef int wc_ces; /* XXX: not used */
#include "textlist.h"
#include "funcname1.h"
#include "terms.h"
+#include "istream.h"
#ifndef HAVE_BCOPY
void bcopy(const void *, void *, int);
@@ -264,6 +265,18 @@ extern int REV_LB[];
#define IMG_FLAG_ERROR 2
#define IMG_FLAG_DONT_REMOVE 4
+#define IS_EMPTY_PARSED_URL(pu) ((pu)->scheme == SCM_UNKNOWN && !(pu)->file)
+#define SCONF_RESERVED 0
+#define SCONF_SUBSTITUTE_URL 1
+#define SCONF_URL_CHARSET 2
+#define SCONF_NO_REFERER_FROM 3
+#define SCONF_NO_REFERER_TO 4
+#define SCONF_N_FIELD 5
+#define query_SCONF_SUBSTITUTE_URL(pu) ((const char *)querySiteconf(pu, SCONF_SUBSTITUTE_URL))
+#define query_SCONF_URL_CHARSET(pu) ((const wc_ces *)querySiteconf(pu, SCONF_URL_CHARSET))
+#define query_SCONF_NO_REFERER_FROM(pu) ((const int *)querySiteconf(pu, SCONF_NO_REFERER_FROM))
+#define query_SCONF_NO_REFERER_TO(pu) ((const int *)querySiteconf(pu, SCONF_NO_REFERER_TO))
+
/*
* Macros.
*/
@@ -276,8 +289,6 @@ extern int REV_LB[];
#define inputFilenameHist(p,d,h) inputLineHist(p,d,IN_FILENAME,h)
#define inputChar(p) inputLine(p,"",IN_CHAR)
-#define free(x) GC_free(x) /* let GC do it. */
-
#ifdef __EMX__
#define HAVE_STRCASECMP
#define strcasecmp stricmp
@@ -362,6 +373,8 @@ typedef struct _imageCache {
int index;
short width;
short height;
+ short a_width;
+ short a_height;
} ImageCache;
typedef struct _image {
@@ -562,6 +575,13 @@ typedef struct _DownloadList {
#define INIT_BUFFER_WIDTH ((_INIT_BUFFER_WIDTH > 0) ? _INIT_BUFFER_WIDTH : 0)
#define FOLD_BUFFER_WIDTH (FoldLine ? (INIT_BUFFER_WIDTH + 1) : -1)
+struct input_alt_attr {
+ int hseq;
+ int fid;
+ int in;
+ Str type, name, value;
+};
+
typedef struct {
int pos;
int len;
@@ -569,6 +589,7 @@ typedef struct {
long flag;
Anchor anchor;
Str img_alt;
+ struct input_alt_attr input_alt;
char fontstat[FONTSTAT_SIZE];
short nobr_level;
Lineprop prev_ctype;
@@ -591,6 +612,7 @@ struct readbuffer {
short nobr_level;
Anchor anchor;
Str img_alt;
+ struct input_alt_attr input_alt;
char fontstat[FONTSTAT_SIZE];
char fontstat_stack[FONT_STACK_SIZE][FONTSTAT_SIZE];
int fontstat_sp;
@@ -802,7 +824,7 @@ global char PermitSaveToPipe init(FALSE);
global char DecodeCTE init(FALSE);
global char AutoUncompress init(FALSE);
global char PreserveTimestamp init(TRUE);
-global char ArgvIsURL init(FALSE);
+global char ArgvIsURL init(TRUE);
global char MetaRefresh init(FALSE);
global char fmInitialized init(FALSE);
@@ -874,6 +896,9 @@ global char *index_file init(NULL);
global char *CurrentDir;
global int CurrentPid;
+#if defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE)
+global char *MyProgramName init("w3m");
+#endif /* defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE) */
/*
* global Buffer *Currentbuf;
* global Buffer *Firstbuf;
@@ -896,6 +921,7 @@ global char *CurrentKeyData;
global char *CurrentCmdData;
global char *w3m_reqlog;
extern char *w3m_version;
+extern int enable_inline_image;
#define DUMP_BUFFER 0x01
#define DUMP_HEAD 0x02
@@ -968,10 +994,17 @@ global int MailtoOptions init(MAILTO_OPTIONS_IGNORE);
global char *ExtBrowser init(DEF_EXT_BROWSER);
global char *ExtBrowser2 init(NULL);
global char *ExtBrowser3 init(NULL);
+global char *ExtBrowser4 init(NULL);
+global char *ExtBrowser5 init(NULL);
+global char *ExtBrowser6 init(NULL);
+global char *ExtBrowser7 init(NULL);
+global char *ExtBrowser8 init(NULL);
+global char *ExtBrowser9 init(NULL);
global int BackgroundExtViewer init(TRUE);
global int disable_secret_security_check init(FALSE);
global char *passwd_file init(PASSWD_FILE);
global char *pre_form_file init(PRE_FORM_FILE);
+global char *siteconf_file init(SITECONF_FILE);
global char *ftppasswd init(NULL);
global int ftppass_hostnamegen init(TRUE);
global int do_download init(FALSE);
@@ -991,7 +1024,7 @@ global char *BookmarkFile init(NULL);
global int UseExternalDirBuffer init(TRUE);
global char *DirBufferCommand init("file:///$LIB/dirlist" CGI_EXTENSION);
#ifdef USE_DICT
-global int UseDictCommand init(FALSE);
+global int UseDictCommand init(TRUE);
global char *DictCommand init("file:///$LIB/w3mdict" CGI_EXTENSION);
#endif /* USE_DICT */
global int ignore_null_img_alt init(TRUE);
@@ -1004,7 +1037,7 @@ global int FoldLine init(FALSE);
#define DEFAULT_URL_EMPTY 0
#define DEFAULT_URL_CURRENT 1
#define DEFAULT_URL_LINK 2
-global int DefaultURLString init(DEFAULT_URL_EMPTY);
+global int DefaultURLString init(DEFAULT_URL_CURRENT);
global int MarkAllPages init(FALSE);
#ifdef USE_MIGEMO
@@ -1065,16 +1098,18 @@ global char SimplePreserveSpace init(FALSE);
#define wc_Str_conv(x,charset0,charset1) (x)
#define wc_Str_conv_strict(x,charset0,charset1) (x)
#endif
-global char UseAltEntity init(TRUE);
+global char UseAltEntity init(FALSE);
#define GRAPHIC_CHAR_ASCII 2
#define GRAPHIC_CHAR_DEC 1
#define GRAPHIC_CHAR_CHARSET 0
global char UseGraphicChar init(GRAPHIC_CHAR_CHARSET);
+global char DisplayBorders init(FALSE);
extern char *graph_symbol[];
extern char *graph2_symbol[];
extern int symbol_width;
extern int symbol_width0;
#define N_GRAPH_SYMBOL 32
+#define N_SYMBOL (N_GRAPH_SYMBOL + 14)
#define SYMBOL_BASE 0x20
global int no_rc_dir init(FALSE);
global char *rc_dir init(NULL);
@@ -1113,9 +1148,9 @@ global MouseAction mouse_action;
#ifdef USE_COOKIE
global int default_use_cookie init(TRUE);
-global int use_cookie init(FALSE);
-global int show_cookie init(TRUE);
-global int accept_cookie init(FALSE);
+global int use_cookie init(TRUE);
+global int show_cookie init(FALSE);
+global int accept_cookie init(TRUE);
#define ACCEPT_BAD_COOKIE_DISCARD 0
#define ACCEPT_BAD_COOKIE_ACCEPT 1
#define ACCEPT_BAD_COOKIE_ASK 2
@@ -1135,7 +1170,7 @@ global int view_unseenobject init(TRUE);
#endif
#if defined(USE_SSL) && defined(USE_SSL_VERIFY)
-global int ssl_verify_server init(FALSE);
+global int ssl_verify_server init(TRUE);
global char *ssl_cert_file init(NULL);
global char *ssl_key_file init(NULL);
global char *ssl_ca_path init(NULL);
@@ -1144,15 +1179,17 @@ global int ssl_path_modified init(FALSE);
#endif /* defined(USE_SSL) &&
* defined(USE_SSL_VERIFY) */
#ifdef USE_SSL
-global char *ssl_forbid_method init(NULL);
+global char *ssl_forbid_method init("2, 3");
#endif
global int is_redisplay init(FALSE);
global int clear_buffer init(TRUE);
global double pixel_per_char init(DEFAULT_PIXEL_PER_CHAR);
+global int pixel_per_char_i init(DEFAULT_PIXEL_PER_CHAR);
global int set_pixel_per_char init(FALSE);
#ifdef USE_IMAGE
global double pixel_per_line init(DEFAULT_PIXEL_PER_LINE);
+global int pixel_per_line_i init(DEFAULT_PIXEL_PER_LINE);
global int set_pixel_per_line init(FALSE);
global double image_scale init(100);
#endif
diff --git a/form.c b/form.c
index b7556ca..bc14d39 100644
--- a/form.c
+++ b/form.c
@@ -10,8 +10,10 @@
#include "regex.h"
extern Str *textarea_str;
+extern int max_textarea;
#ifdef MENU_SELECT
extern FormSelectOption *select_option;
+extern int max_select;
#include "menu.h"
#endif /* MENU_SELECT */
@@ -54,10 +56,9 @@ newFormList(char *action, char *method, char *charset, char *enctype,
m = FORM_METHOD_INTERNAL;
/* unknown method is regarded as 'get' */
- if (enctype != NULL && !strcasecmp(enctype, "multipart/form-data")) {
+ if (m != FORM_METHOD_GET && enctype != NULL &&
+ !strcasecmp(enctype, "multipart/form-data")) {
e = FORM_ENCTYPE_MULTIPART;
- if (m == FORM_METHOD_GET)
- m = FORM_METHOD_POST;
}
#ifdef USE_M17N
@@ -122,10 +123,12 @@ formList_addInput(struct form_list *fl, struct parsed_tag *tag)
parsedtag_get_value(tag, ATTR_SIZE, &item->size);
parsedtag_get_value(tag, ATTR_MAXLENGTH, &item->maxlength);
item->readonly = parsedtag_exists(tag, ATTR_READONLY);
- if (parsedtag_get_value(tag, ATTR_TEXTAREANUMBER, &i))
+ if (parsedtag_get_value(tag, ATTR_TEXTAREANUMBER, &i)
+ && i >= 0 && i < max_textarea)
item->value = item->init_value = textarea_str[i];
#ifdef MENU_SELECT
- if (parsedtag_get_value(tag, ATTR_SELECTNUMBER, &i))
+ if (parsedtag_get_value(tag, ATTR_SELECTNUMBER, &i)
+ && i >= 0 && i < max_select)
item->select_option = select_option[i].first;
#endif /* MENU_SELECT */
if (parsedtag_get_value(tag, ATTR_ROWS, &p))
@@ -196,7 +199,7 @@ formtype(char *typestr)
if (!strcasecmp(typestr, _formtypetbl[i]))
return i;
}
- return FORM_UNKNOWN;
+ return FORM_INPUT_TEXT;
}
void
@@ -316,7 +319,8 @@ form_update_line(Line *line, char **str, int spos, int epos, int width,
pos += width - w;
len = line->len + pos + spos - epos;
- buf = New_N(char, len);
+ buf = New_N(char, len + 1);
+ buf[len] = '\0';
prop = New_N(Lineprop, len);
bcopy((void *)line->lineBuf, (void *)buf, spos * sizeof(char));
bcopy((void *)line->propBuf, (void *)prop, spos * sizeof(Lineprop));
@@ -438,6 +442,9 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
switch (form->type) {
case FORM_INPUT_CHECKBOX:
case FORM_INPUT_RADIO:
+ if (buf->currentLine == NULL ||
+ spos >= buf->currentLine->len || spos < 0)
+ break;
if (form->checked)
buf->currentLine->lineBuf[spos] = '*';
else
@@ -455,8 +462,14 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
}
else
#endif /* MENU_SELECT */
+ {
+ if (!form->value)
+ break;
p = form->value->ptr;
+ }
l = buf->currentLine;
+ if (!l)
+ break;
if (form->type == FORM_TEXTAREA) {
int n = a->y - buf->currentLine->linenumber;
if (n > 0)
@@ -469,6 +482,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
rows = form->rows ? form->rows : 1;
col = COLPOS(l, a->start.pos);
for (c_rows = 0; c_rows < rows; c_rows++, l = l->next) {
+ if (l == NULL)
+ break;
if (rows > 1) {
pos = columnPos(l, col);
a = retrieveAnchor(buf->formitem, l->linenumber, pos);
@@ -477,6 +492,9 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
spos = a->start.pos;
epos = a->end.pos;
}
+ if (a->start.line != a->end.line || spos > epos || epos >= l->len ||
+ spos < 0 || epos < 0 || COLPOS(l, epos) < col)
+ break;
pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col,
rows > 1,
form->type == FORM_INPUT_PASSWORD);
@@ -787,7 +805,7 @@ struct pre_form {
static struct pre_form *PreForm = NULL;
static struct pre_form *
-add_pre_form(struct pre_form *prev, char *url, char *name, char *action)
+add_pre_form(struct pre_form *prev, char *url, Regex *re_url, char *name, char *action)
{
ParsedURL pu;
struct pre_form *new;
@@ -796,21 +814,13 @@ add_pre_form(struct pre_form *prev, char *url, char *name, char *action)
new = prev->next = New(struct pre_form);
else
new = PreForm = New(struct pre_form);
- if (url && *url == '/') {
- int l = strlen(url);
- if (l > 1 && url[l - 1] == '/')
- new->url = allocStr(url + 1, l - 2);
- else
- new->url = url + 1;
- new->re_url = newRegex(new->url, FALSE, NULL, NULL);
- if (!new->re_url)
- new->url = NULL;
- }
- else if (url) {
+ if (url && !re_url) {
parseURL2(url, &pu, NULL);
new->url = parsedURL2Str(&pu)->ptr;
- new->re_url = NULL;
}
+ else
+ new->url = url;
+ new->re_url = re_url;
new->name = (name && *name) ? name : NULL;
new->action = (action && *action) ? action : NULL;
new->item = NULL;
@@ -834,7 +844,7 @@ add_pre_form_item(struct pre_form *pf, struct pre_form_item *prev, int type,
new->name = name;
new->value = value;
if (checked && *checked && (!strcmp(checked, "0") ||
- strcasecmp(checked, "off")
+ !strcasecmp(checked, "off")
|| !strcasecmp(checked, "no")))
new->checked = 0;
else
@@ -875,6 +885,7 @@ loadPreForm(void)
return;
while (1) {
char *p, *s, *arg;
+ Regex *re_arg;
line = Strfgets(fp);
if (line->length == 0)
@@ -890,18 +901,20 @@ loadPreForm(void)
if (*p == '#' || *p == '\0')
continue; /* comment or empty line */
s = getWord(&p);
- arg = getWord(&p);
if (!strcmp(s, "url")) {
+ arg = getRegexWord((const char **)&p, &re_arg);
if (!arg || !*arg)
continue;
p = getQWord(&p);
- pf = add_pre_form(pf, arg, NULL, p);
+ pf = add_pre_form(pf, arg, re_arg, NULL, p);
pi = pf->item;
continue;
}
if (!pf)
continue;
+
+ arg = getWord(&p);
if (!strcmp(s, "form")) {
if (!arg || !*arg)
continue;
@@ -913,7 +926,7 @@ loadPreForm(void)
}
if (pf->item) {
struct pre_form *prev = pf;
- pf = add_pre_form(prev, "", s, p);
+ pf = add_pre_form(prev, "", NULL, s, p);
/* copy previous URL */
pf->url = prev->url;
pf->re_url = prev->re_url;
diff --git a/frame.c b/frame.c
index b431437..c595c40 100644
--- a/frame.c
+++ b/frame.c
@@ -91,7 +91,8 @@ newFrame(struct parsed_tag *tag, Buffer *buf)
body->baseURL = baseURL(buf);
if (tag) {
if (parsedtag_get_value(tag, ATTR_SRC, &p))
- body->url = url_quote_conv(remove_space(p), buf->document_charset);
+ body->url = url_encode(remove_space(p), body->baseURL,
+ buf->document_charset);
if (parsedtag_get_value(tag, ATTR_NAME, &p) && *p != '_')
body->name = url_quote_conv(p, buf->document_charset);
}
@@ -639,7 +640,7 @@ createFrameFile(struct frameset *f, FILE * f1, Buffer *current, int level,
case HTML_BASE:
/* "BASE" is prohibit tag */
if (parsedtag_get_value(tag, ATTR_HREF, &q)) {
- q = url_quote_conv(remove_space(q), charset);
+ q = url_encode(remove_space(q), NULL, charset);
parseURL(q, &base, NULL);
}
if (parsedtag_get_value(tag, ATTR_TARGET, &q)) {
@@ -768,8 +769,8 @@ createFrameFile(struct frameset *f, FILE * f1, Buffer *current, int level,
if (!tag->value[j])
break;
tag->value[j] =
- url_quote_conv(remove_space(tag->value[j]),
- charset);
+ url_encode(remove_space(tag->value[j]),
+ &base, charset);
tag->need_reconstruct = TRUE;
parseURL2(tag->value[j], &url, &base);
if (url.scheme == SCM_UNKNOWN ||
@@ -894,8 +895,10 @@ renderFrame(Buffer *Cbuf, int force_reload)
/*
* if (Cbuf->frameQ != NULL) fset = Cbuf->frameQ->frameset; else */
fset = Cbuf->frameset;
- if (fset == NULL || createFrameFile(fset, f, Cbuf, 0, force_reload) < 0)
+ if (fset == NULL || createFrameFile(fset, f, Cbuf, 0, force_reload) < 0) {
+ fclose(f);
return NULL;
+ }
fclose(f);
flag = RG_FRAME;
if ((Cbuf->currentURL).is_nocache)
diff --git a/ftp.c b/ftp.c
index 0002abd..2ca0247 100644
--- a/ftp.c
+++ b/ftp.c
@@ -123,6 +123,7 @@ static int
ftp_login(FTP ftp)
{
int sock, status;
+ int sock_wf;
sock = openSocket(ftp->host, "ftp", 21);
if (sock < 0)
@@ -139,7 +140,6 @@ ftp_login(FTP ftp)
socklen_t socknamelen = sizeof(sockname);
if (!getsockname(sock, (struct sockaddr *)&sockname, &socknamelen)) {
- struct hostent *sockent;
Str tmp = Strnew_charp(ftp->pass);
#ifdef INET6
char hostbuf[NI_MAXHOST];
@@ -156,6 +156,7 @@ ftp_login(FTP ftp)
Strcat_charp(tmp, "unknown");
#else
+ struct hostent *sockent;
if ((sockent = gethostbyaddr((char *)&sockname.sin_addr,
sizeof(sockname.sin_addr),
sockname.sin_family)))
@@ -169,7 +170,10 @@ ftp_login(FTP ftp)
}
}
ftp->rf = newInputStream(sock);
- ftp->wf = fdopen(dup(sock), "wb");
+ if ((sock_wf = dup(sock)) >= 0 )
+ ftp->wf = fdopen(sock_wf, "wb");
+ else
+ goto open_err;
if (!ftp->rf || !ftp->wf)
goto open_err;
IStype(ftp->rf) |= IST_UNCLOSE;
diff --git a/func.c b/func.c
index f389e00..8b5deac 100644
--- a/func.c
+++ b/func.c
@@ -8,6 +8,7 @@
#include "fm.h"
#include "func.h"
#include "myctype.h"
+#include "regex.h"
#include "funcname.c"
#include "functable.c"
@@ -434,6 +435,93 @@ getQWord(char **str)
return tmp->ptr;
}
+/* This extracts /regex/i or m@regex@i from the given string.
+ * Then advances *str to the end of regex.
+ * If the input does not seems to be a regex, this falls back to getQWord().
+ *
+ * Returns a word (no matter whether regex or not) in the give string.
+ * If regex_ret is non-NULL, compiles the regex and stores there.
+ *
+ * XXX: Actually this is unrelated to func.c.
+ */
+char *
+getRegexWord(const char **str, Regex **regex_ret)
+{
+ char *word = NULL;
+ const char *p, *headp, *bodyp, *tailp;
+ char delimiter;
+ int esc;
+ int igncase = 0;
+
+ p = *str;
+ SKIP_BLANKS(p);
+ headp = p;
+
+ /* Get the opening delimiter */
+ if (p[0] == 'm' && IS_PRINT(p[1]) && !IS_ALNUM(p[1]) && p[1] != '\\') {
+ delimiter = p[1];
+ p += 2;
+ }
+ else if (p[0] == '/') {
+ delimiter = '/';
+ p += 1;
+ }
+ else {
+ goto not_regex;
+ }
+ bodyp = p;
+
+ /* Scan the end of the expression */
+ for (esc = 0; *p; ++p) {
+ if (esc) {
+ esc = 0;
+ } else {
+ if (*p == delimiter)
+ break;
+ else if (*p == '\\')
+ esc = 1;
+ }
+ }
+ if (!*p && *headp == '/')
+ goto not_regex;
+ tailp = p;
+
+ /* Check the modifiers */
+ if (*p == delimiter) {
+ while (*++p && !IS_SPACE(*p)) {
+ switch (*p) {
+ case 'i':
+ igncase = 1;
+ break;
+ }
+ /* ignore unknown modifiers */
+ }
+ }
+
+ /* Save the expression */
+ word = allocStr(headp, p - headp);
+
+ /* Compile */
+ if (regex_ret) {
+ if (*tailp == delimiter)
+ word[tailp - headp] = 0;
+ *regex_ret = newRegex(word + (bodyp - headp), igncase, NULL, NULL);
+ if (*tailp == delimiter)
+ word[tailp - headp] = delimiter;
+ }
+ goto last;
+
+not_regex:
+ p = headp;
+ word = getQWord((char **)&p);
+ if (regex_ret)
+ *regex_ret = NULL;
+
+last:
+ *str = p;
+ return word;
+}
+
#ifdef USE_MOUSE
static MouseAction default_mouse_action = {
NULL,
diff --git a/history.c b/history.c
index 951ef83..f2a00b4 100644
--- a/history.c
+++ b/history.c
@@ -17,7 +17,7 @@ historyBuffer(Hist *hist)
for (item = hist->list->last; item; item = item->prev) {
q = html_quote((char *)item->ptr);
if (DecodeURL)
- p = html_quote(url_unquote_conv((char *)item->ptr, 0));
+ p = html_quote(url_decode2((char *)item->ptr, NULL));
else
p = q;
Strcat_charp(src, "<li><a href=\"");
@@ -60,6 +60,7 @@ saveHistory(Hist *hist, size_t size)
FILE *f;
HistItem *item;
char *tmpf;
+ int rename_ret;
if (hist == NULL || hist->list == NULL)
return;
@@ -79,7 +80,11 @@ saveHistory(Hist *hist, size_t size)
disp_err_message("Can't save history", FALSE);
return;
}
- rename(tmpf, rcFile(HISTORY_FILE));
+ rename_ret = rename(tmpf, rcFile(HISTORY_FILE));
+ if (rename_ret != 0) {
+ disp_err_message("Can't save history", FALSE);
+ return;
+ }
}
#endif /* USE_HISTORY */
diff --git a/html.c b/html.c
index bca227e..d9f08e9 100644
--- a/html.c
+++ b/html.c
@@ -56,6 +56,9 @@ unsigned char ALST_INPUT[] =
ATTR_CORE
};
#define MAXA_INPUT MAXA_CORE + 12
+unsigned char ALST_BUTTON[] =
+ { ATTR_TYPE, ATTR_VALUE, ATTR_NAME, ATTR_CORE };
+#define MAXA_BUTTON MAXA_CORE + 3
unsigned char ALST_TEXTAREA[] =
{ ATTR_COLS, ATTR_ROWS, ATTR_NAME, ATTR_READONLY, ATTR_CORE };
#define MAXA_TEXTAREA MAXA_CORE + 4
@@ -247,24 +250,24 @@ TagInfo TagMAP[MAX_HTMLTAG] = {
{"/bdo", NULL, 0, TFLG_END}, /* 121 HTML_N_BDO */
{"big", ALST_NOP, MAXA_NOP, 0}, /* 122 HTML_BIG */
{"/big", NULL, 0, TFLG_END}, /* 123 HTML_N_BIG */
- {"button", ALST_NOP, MAXA_NOP, 0}, /* 124 HTML_BUTTON */
- {"fieldset", ALST_NOP, MAXA_NOP, 0}, /* 125 HTML_FIELDSET */
- {"/fieldset", NULL, 0, TFLG_END}, /* 126 HTML_N_FIELDSET */
- {"iframe", ALST_NOP, MAXA_NOP, 0}, /* 127 HTML_IFRAME */
- {"label", ALST_NOP, MAXA_NOP, 0}, /* 128 HTML_LABEL */
- {"/label", NULL, 0, TFLG_END}, /* 129 HTML_N_LABEL */
- {"legend", ALST_NOP, MAXA_NOP, 0}, /* 130 HTML_LEGEND */
- {"/legend", NULL, 0, TFLG_END}, /* 131 HTML_N_LEGEND */
- {"noscript", ALST_NOP, MAXA_NOP, 0}, /* 132 HTML_NOSCRIPT */
- {"/noscript", NULL, 0, TFLG_END}, /* 133 HTML_N_NOSCRIPT */
- {"object", ALST_NOP, MAXA_NOP, 0}, /* 134 HTML_OBJECT */
- {"optgroup", ALST_NOP, MAXA_NOP, 0}, /* 135 HTML_OPTGROUP */
- {"/optgroup", NULL, 0, TFLG_END}, /* 136 HTML_N_OPTGROUP */
- {"param", ALST_NOP, MAXA_NOP, 0}, /* 137 HTML_PARAM */
- {"small", ALST_NOP, MAXA_NOP, 0}, /* 138 HTML_SMALL */
- {"/small", NULL, 0, TFLG_END}, /* 139 HTML_N_SMALL */
+ {"button", ALST_BUTTON, MAXA_BUTTON, 0}, /* 124 HTML_BUTTON */
+ {"/button", NULL, 0, TFLG_END}, /* 125 HTML_N_BUTTON */
+ {"fieldset", ALST_NOP, MAXA_NOP, 0}, /* 126 HTML_FIELDSET */
+ {"/fieldset", NULL, 0, TFLG_END}, /* 127 HTML_N_FIELDSET */
+ {"iframe", ALST_NOP, MAXA_NOP, 0}, /* 128 HTML_IFRAME */
+ {"label", ALST_NOP, MAXA_NOP, 0}, /* 129 HTML_LABEL */
+ {"/label", NULL, 0, TFLG_END}, /* 130 HTML_N_LABEL */
+ {"legend", ALST_NOP, MAXA_NOP, 0}, /* 131 HTML_LEGEND */
+ {"/legend", NULL, 0, TFLG_END}, /* 132 HTML_N_LEGEND */
+ {"noscript", ALST_NOP, MAXA_NOP, 0}, /* 133 HTML_NOSCRIPT */
+ {"/noscript", NULL, 0, TFLG_END}, /* 134 HTML_N_NOSCRIPT */
+ {"object", ALST_NOP, MAXA_NOP, 0}, /* 135 HTML_OBJECT */
+ {"optgroup", ALST_NOP, MAXA_NOP, 0}, /* 136 HTML_OPTGROUP */
+ {"/optgroup", NULL, 0, TFLG_END}, /* 137 HTML_N_OPTGROUP */
+ {"param", ALST_NOP, MAXA_NOP, 0}, /* 138 HTML_PARAM */
+ {"small", ALST_NOP, MAXA_NOP, 0}, /* 139 HTML_SMALL */
+ {"/small", NULL, 0, TFLG_END}, /* 140 HTML_N_SMALL */
- {NULL, NULL, 0, 0}, /* 140 Undefined */
{NULL, NULL, 0, 0}, /* 141 Undefined */
{NULL, NULL, 0, 0}, /* 142 Undefined */
{NULL, NULL, 0, 0}, /* 143 Undefined */
diff --git a/html.h b/html.h
index 7abbd3b..2a9a431 100644
--- a/html.h
+++ b/html.h
@@ -1,20 +1,20 @@
/* $Id: html.h,v 1.31 2010/08/14 01:29:40 htrb Exp $ */
#ifndef _HTML_H
#define _HTML_H
+#include "config.h"
#ifdef USE_SSL
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <openssl/ssl.h>
#endif /* USE_SSL */
-#include "istream.h"
+#include <time.h>
#define StrUFgets(f) StrISgets((f)->stream)
#define StrmyUFgets(f) StrmyISgets((f)->stream)
#define UFgetc(f) ISgetc((f)->stream)
#define UFundogetc(f) ISundogetc((f)->stream)
-#define UFread(f,buf,len) ISread((f)->stream,buf,len)
-#define UFclose(f) (void)(ISclose((f)->stream) == 0 && ((f)->stream = NULL))
+#define UFclose(f) if (ISclose((f)->stream) == 0) {(f)->stream = NULL ;}
#define UFfileno(f) ISfileno((f)->stream)
struct cmdtable {
@@ -62,11 +62,12 @@ typedef struct _ParsedURL {
int is_nocache;
} ParsedURL;
+union input_stream;
typedef struct {
unsigned char scheme;
char is_cgi;
char encoding;
- InputStream stream;
+ union input_stream *stream;
char *ext;
int compression;
int content_encoding;
@@ -214,21 +215,22 @@ typedef struct {
#define HTML_BIG 122
#define HTML_N_BIG 123
#define HTML_BUTTON 124
-#define HTML_FIELDSET 125
-#define HTML_N_FIELDSET 126
-#define HTML_IFRAME 127
-#define HTML_LABEL 128
-#define HTML_N_LABEL 129
-#define HTML_LEGEND 130
-#define HTML_N_LEGEND 131
-#define HTML_NOSCRIPT 132
-#define HTML_N_NOSCRIPT 133
-#define HTML_OBJECT 134
-#define HTML_OPTGROUP 135
-#define HTML_N_OPTGROUP 136
-#define HTML_PARAM 137
-#define HTML_SMALL 138
-#define HTML_N_SMALL 139
+#define HTML_N_BUTTON 125
+#define HTML_FIELDSET 126
+#define HTML_N_FIELDSET 127
+#define HTML_IFRAME 128
+#define HTML_LABEL 129
+#define HTML_N_LABEL 130
+#define HTML_LEGEND 131
+#define HTML_N_LEGEND 132
+#define HTML_NOSCRIPT 133
+#define HTML_N_NOSCRIPT 134
+#define HTML_OBJECT 135
+#define HTML_OPTGROUP 136
+#define HTML_N_OPTGROUP 137
+#define HTML_PARAM 138
+#define HTML_SMALL 139
+#define HTML_N_SMALL 140
/* pseudo tag */
#define HTML_SELECT_INT 160
diff --git a/image.c b/image.c
index 5f5991a..91034ee 100644
--- a/image.c
+++ b/image.c
@@ -44,6 +44,8 @@ initImage()
activeImage = TRUE;
}
+int get_pixel_per_cell(int *ppc, int *ppl);
+
int
getCharSize()
{
@@ -52,6 +54,24 @@ getCharSize()
int w = 0, h = 0;
set_environ("W3M_TTY", ttyname_tty());
+
+ if (enable_inline_image) {
+ int ppc, ppl;
+
+ if (get_pixel_per_cell(&ppc,&ppl)) {
+ pixel_per_char_i = ppc ;
+ pixel_per_line_i = ppl ;
+ pixel_per_char = (double)ppc;
+ pixel_per_line = (double)ppl;
+ }
+ else {
+ pixel_per_char_i = (int)pixel_per_char;
+ pixel_per_line_i = (int)pixel_per_line;
+ }
+
+ return TRUE;
+ }
+
tmp = Strnew();
if (!strchr(Imgdisplay, '/'))
Strcat_m_charp(tmp, w3m_auxbin_dir(), "/", NULL);
@@ -90,17 +110,18 @@ termImage()
static int
openImgdisplay()
{
+ char *cmd;
+
+ if (!strchr(Imgdisplay, '/'))
+ cmd = Strnew_m_charp(w3m_auxbin_dir(), "/", Imgdisplay, NULL)->ptr;
+ else
+ cmd = Imgdisplay;
Imgdisplay_pid = open_pipe_rw(&Imgdisplay_rf, &Imgdisplay_wf);
if (Imgdisplay_pid < 0)
goto err0;
if (Imgdisplay_pid == 0) {
/* child */
- char *cmd;
setup_child(FALSE, 2, -1);
- if (!strchr(Imgdisplay, '/'))
- cmd = Strnew_m_charp(w3m_auxbin_dir(), "/", Imgdisplay, NULL)->ptr;
- else
- cmd = Imgdisplay;
myExec(cmd);
/* XXX: ifdef __EMX__, use start /f ? */
}
@@ -155,6 +176,10 @@ addImage(ImageCache * cache, int x, int y, int sx, int sy, int w, int h)
static void
syncImage(void)
{
+ if (enable_inline_image) {
+ return;
+ }
+
fputs("3;\n", Imgdisplay_wf); /* XSync() */
fputs("4;\n", Imgdisplay_wf); /* put '\n' */
while (fflush(Imgdisplay_wf) != 0) {
@@ -170,12 +195,16 @@ syncImage(void)
n_terminal_image = 0;
}
+void put_image_osc5379(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh, int n_terminal_image);
+void put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh, int n_terminal_image);
+
void
drawImage()
{
static char buf[64];
int j, draw = FALSE;
TerminalImage *i;
+ struct stat st ;
if (!activeImage)
return;
@@ -183,6 +212,47 @@ drawImage()
return;
for (j = 0; j < n_terminal_image; j++) {
i = &terminal_image[j];
+
+ if (enable_inline_image) {
+ #if 0
+ fprintf(stderr,"file %s x %d y %d w %d h %d sx %d sy %d sw %d sh %d (ppc %d ppl %d)\n",
+ ((enable_inline_image == 2 || getenv("WINDOWID")) &&
+ i->cache->touch) ? i->cache->file : i->cache->url,
+ i->x, i->y,
+ i->cache->width > 0 ? i->cache->width : 0,
+ i->cache->height > 0 ? i->cache->height : 0,
+ i->sx, i->sy, i->width, i->height,
+ pixel_per_char_i, pixel_per_line_i);
+ #endif
+ (enable_inline_image == 2 ? put_image_sixel : put_image_osc5379)(
+ ((enable_inline_image == 2 /* sixel */ || getenv("WINDOWID")) &&
+ /* XXX I don't know why but sometimes i->cache->file doesn't exist. */
+ i->cache->touch && stat(i->cache->file,&st) == 0) ?
+ /* local */ i->cache->file : /* remote */ i->cache->url,
+ i->x / pixel_per_char_i,
+ i->y / pixel_per_line_i,
+ #if 1
+ i->cache->a_width > 0 ?
+ (i->cache->width + i->x % pixel_per_char_i + pixel_per_char_i - 1) /
+ pixel_per_char_i :
+ #endif
+ 0,
+
+ #if 1
+ i->cache->a_height > 0 ?
+ (i->cache->height + i->y % pixel_per_line_i + pixel_per_line_i - 1) /
+ pixel_per_line_i :
+ #endif
+ 0,
+ i->sx / pixel_per_char_i,
+ i->sy / pixel_per_line_i,
+ (i->width + i->sx % pixel_per_char_i + pixel_per_char_i - 1) / pixel_per_char_i,
+ (i->height + i->sy % pixel_per_line_i + pixel_per_line_i - 1) / pixel_per_line_i,
+ n_terminal_image);
+
+ continue ;
+ }
+
if (!(i->cache->loaded & IMG_FLAG_LOADED &&
i->width > 0 && i->height > 0))
continue;
@@ -206,9 +276,15 @@ drawImage()
fputs("\n", Imgdisplay_wf);
draw = TRUE;
}
- if (!draw)
- return;
- syncImage();
+
+ if (!enable_inline_image) {
+ if (!draw)
+ return;
+ syncImage();
+ }
+ else
+ n_terminal_image = 0;
+
touch_cursor();
refresh();
}
@@ -320,6 +396,8 @@ showImageProgress(Buffer *buf)
}
}
if (n) {
+ if (enable_inline_image && n == l)
+ drawImage();
message(Sprintf("%d/%d images loaded", l, n)->ptr,
buf->cursorX + buf->rootX, buf->cursorY + buf->rootY);
refresh();
@@ -333,6 +411,9 @@ loadImage(Buffer *buf, int flag)
struct stat st;
int i, draw = FALSE;
/* int wait_st; */
+#ifdef DONT_CALL_GC_AFTER_FORK
+ char *loadargs[7];
+#endif
if (maxLoadImage > MAX_LOAD_IMAGE)
maxLoadImage = MAX_LOAD_IMAGE;
@@ -346,7 +427,7 @@ loadImage(Buffer *buf, int flag)
}
for (i = 0; i < n_load_image; i++) {
cache = image_cache[i];
- if (!cache)
+ if (!cache || !cache->touch)
continue;
if (lstat(cache->touch, &st))
continue;
@@ -377,7 +458,7 @@ loadImage(Buffer *buf, int flag)
for (i = (buf != image_buffer) ? 0 : maxLoadImage; i < n_load_image; i++) {
cache = image_cache[i];
- if (!cache)
+ if (!cache || !cache->touch)
continue;
if (cache->pid) {
kill(cache->pid, SIGKILL);
@@ -403,7 +484,8 @@ loadImage(Buffer *buf, int flag)
}
if (draw && image_buffer) {
- drawImage();
+ if (!enable_inline_image)
+ drawImage();
showImageProgress(image_buffer);
}
@@ -431,8 +513,29 @@ loadImage(Buffer *buf, int flag)
break;
}
image_cache[i] = cache;
+ if (!cache->touch) {
+ continue;
+ }
flush_tty();
+#ifdef DONT_CALL_GC_AFTER_FORK
+ loadargs[0] = MyProgramName;
+ loadargs[1] = "-$$getimage";
+ loadargs[2] = conv_to_system(cache->url);
+ loadargs[3] = conv_to_system(parsedURL2Str(cache->current)->ptr);
+ loadargs[4] = cache->file;
+ loadargs[5] = cache->touch;
+ loadargs[6] = NULL;
+ if ((cache->pid = fork()) == 0) {
+ setup_child(FALSE, 0, -1);
+ execvp(MyProgramName, loadargs);
+ exit(1);
+ }
+ else if (cache->pid < 0) {
+ cache->pid = 0;
+ return;
+ }
+#else /* !DONT_CALL_GC_AFTER_FORK */
if ((cache->pid = fork()) == 0) {
Buffer *b;
/*
@@ -458,6 +561,7 @@ loadImage(Buffer *buf, int flag)
cache->pid = 0;
return;
}
+#endif /* !DONT_CALL_GC_AFTER_FORK */
}
}
@@ -492,12 +596,30 @@ getImage(Image * image, ParsedURL *current, int flag)
cache->url = image->url;
cache->current = current;
cache->file = tmpfname(TMPF_DFL, image->ext)->ptr;
- cache->touch = tmpfname(TMPF_DFL, NULL)->ptr;
cache->pid = 0;
cache->index = 0;
cache->loaded = IMG_FLAG_UNLOADED;
- cache->width = image->width;
- cache->height = image->height;
+ if (enable_inline_image == 1) {
+ if (image->width > 0 && image->width % pixel_per_char_i > 0)
+ image->width += (pixel_per_char_i - image->width % pixel_per_char_i);
+
+ if (image->height > 0 && image->height % pixel_per_line_i > 0)
+ image->height += (pixel_per_line_i - image->height % pixel_per_line_i);
+ if (image->height > 0 && image->width > 0) {
+ cache->loaded = IMG_FLAG_LOADED;
+ }
+ }
+ if (cache->loaded == IMG_FLAG_UNLOADED) {
+ cache->touch = tmpfname(TMPF_DFL, NULL)->ptr;
+ }
+ else {
+ cache->touch = NULL;
+ }
+
+ cache->width = image->width ;
+ cache->height = image->height ;
+ cache->a_width = image->width;
+ cache->a_height = image->height;
putHash_sv(image_hash, key->ptr, (void *)cache);
}
if (flag != IMG_FLAG_SKIP) {
@@ -519,6 +641,78 @@ getImage(Image * image, ParsedURL *current, int flag)
return cache;
}
+static int
+parseImageHeader(char *path, u_int *width, u_int *height)
+{
+ FILE *fp;
+ u_char buf[8];
+
+ if (!(fp = fopen(path, "r"))) return FALSE;
+
+ if (fread(buf, 1, 2, fp) != 2) goto error;
+
+ if (memcmp(buf, "\xff\xd8", 2) == 0) {
+ /* JPEG */
+ if (fseek(fp, 2, SEEK_CUR) < 0) goto error; /* 0xffe0 */
+ while (fread(buf, 1, 2, fp) == 2) {
+ size_t len = ((buf[0] << 8) | buf[1]) - 2;
+ if (fseek(fp, len, SEEK_CUR) < 0) goto error;
+ if (fread(buf, 1, 2, fp) == 2 &&
+ /* SOF0 or SOF2 */
+ (memcmp(buf, "\xff\xc0", 2) == 0 || memcmp(buf, "\xff\xc2", 2) == 0)) {
+ fseek(fp, 3, SEEK_CUR);
+ if (fread(buf, 1, 2, fp) == 2) {
+ *height = (buf[0] << 8) | buf[1];
+ if (fread(buf, 1, 2, fp) == 2) {
+ *width = (buf[0] << 8) | buf[1];
+ goto success;
+ }
+ }
+ break;
+ }
+ }
+ goto error;
+ }
+
+ if (fread(buf + 2, 1, 1, fp) != 1) goto error;
+
+ if (memcmp(buf, "GIF", 3) == 0) {
+ /* GIF */
+ if (fseek(fp, 3, SEEK_CUR) < 0) goto error;
+ if (fread(buf, 1, 2, fp) == 2) {
+ *width = (buf[1] << 8) | buf[0];
+ if (fread(buf, 1, 2, fp) == 2) {
+ *height = (buf[1] << 8) | buf[0];
+ goto success;
+ }
+ }
+ goto error;
+ }
+
+ if (fread(buf + 3, 1, 5, fp) != 5) goto error;
+
+ if (memcmp(buf, "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a", 8) == 0) {
+ /* PNG */
+ if (fseek(fp, 8, SEEK_CUR) < 0) goto error;
+ if (fread(buf, 1, 4, fp) == 4) {
+ *width = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
+ if (fread(buf, 1, 4, fp) == 4) {
+ *height = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
+ goto success;
+ }
+ }
+ goto error;
+ }
+
+error:
+ fclose(fp);
+ return FALSE;
+
+success:
+ fclose(fp);
+ return TRUE;
+}
+
int
getImageSize(ImageCache * cache)
{
@@ -531,6 +725,10 @@ getImageSize(ImageCache * cache)
if (!cache || !(cache->loaded & IMG_FLAG_LOADED) ||
(cache->width > 0 && cache->height > 0))
return FALSE;
+
+ if (parseImageHeader(cache->file, &w, &h))
+ goto got_image_size;
+
tmp = Strnew();
if (!strchr(Imgdisplay, '/'))
Strcat_m_charp(tmp, w3m_auxbin_dir(), "/", NULL);
@@ -546,6 +744,8 @@ getImageSize(ImageCache * cache)
if (!(w > 0 && h > 0))
return FALSE;
+
+got_image_size:
w = (int)(w * image_scale / 100 + 0.5);
if (w == 0)
w = 1;
@@ -558,11 +758,11 @@ getImageSize(ImageCache * cache)
}
else if (cache->width < 0) {
int tmp = (int)((double)cache->height * w / h + 0.5);
- cache->width = (tmp > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : tmp;
+ cache->a_width = cache->width = (tmp > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : tmp;
}
else if (cache->height < 0) {
int tmp = (int)((double)cache->width * h / w + 0.5);
- cache->height = (tmp > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : tmp;
+ cache->a_height = cache->height = (tmp > MAX_IMAGE_SIZE) ? MAX_IMAGE_SIZE : tmp;
}
if (cache->width == 0)
cache->width = 1;
diff --git a/indep.c b/indep.c
index 65b04aa..5c5de06 100644
--- a/indep.c
+++ b/indep.c
@@ -357,6 +357,20 @@ strcasemstr(char *str, char *srch[], char **ret_ptr)
return -1;
}
+int
+strmatchlen(const char *s1, const char *s2, int maxlen)
+{
+ int i;
+
+ /* To allow the maxlen to be negatie (infinity),
+ * compare by "!=" instead of "<=". */
+ for (i = 0; i != maxlen; ++i) {
+ if (!s1[i] || !s2[i] || s1[i] != s2[i])
+ break;
+ }
+ return i;
+}
+
char *
remove_space(char *str)
{
@@ -707,6 +721,111 @@ shell_quote(char *str)
return str;
}
+void *
+xrealloc(void *ptr, size_t size)
+{
+ void *newptr = realloc(ptr, size);
+ if (newptr == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ exit(-1);
+ }
+ return newptr;
+}
+
+/* Define this as a separate function in case the free() has
+ * an incompatible prototype. */
+void
+xfree(void *ptr)
+{
+ free(ptr);
+}
+
+void *
+w3m_GC_realloc_atomic(void *ptr, size_t size)
+{
+ return ptr ? GC_REALLOC(ptr, size) : GC_MALLOC_ATOMIC(size);
+}
+
+void
+w3m_GC_free(void *ptr)
+{
+ GC_FREE(ptr);
+}
+
+void
+growbuf_init(struct growbuf *gb)
+{
+ gb->ptr = NULL;
+ gb->length = 0;
+ gb->area_size = 0;
+ gb->realloc_proc = &w3m_GC_realloc_atomic;
+ gb->free_proc = &w3m_GC_free;
+}
+
+void
+growbuf_init_without_GC(struct growbuf *gb)
+{
+ gb->ptr = NULL;
+ gb->length = 0;
+ gb->area_size = 0;
+ gb->realloc_proc = &xrealloc;
+ gb->free_proc = &xfree;
+}
+
+void
+growbuf_clear(struct growbuf *gb)
+{
+ (*gb->free_proc) (gb->ptr);
+ gb->ptr = NULL;
+ gb->length = 0;
+ gb->area_size = 0;
+}
+
+Str
+growbuf_to_Str(struct growbuf *gb)
+{
+ Str s;
+
+ if (gb->free_proc == &w3m_GC_free) {
+ growbuf_reserve(gb, gb->length + 1);
+ gb->ptr[gb->length] = '\0';
+ s = New(struct _Str);
+ s->ptr = gb->ptr;
+ s->length = gb->length;
+ s->area_size = gb->area_size;
+ } else {
+ s = Strnew_charp_n(gb->ptr, gb->length);
+ (*gb->free_proc) (gb->ptr);
+ }
+ gb->ptr = NULL;
+ gb->length = 0;
+ gb->area_size = 0;
+ return s;
+}
+
+void
+growbuf_reserve(struct growbuf *gb, int leastarea)
+{
+ int newarea;
+
+ if (gb->area_size < leastarea) {
+ newarea = gb->area_size * 3 / 2;
+ if (newarea < leastarea)
+ newarea = leastarea;
+ newarea += 16;
+ gb->ptr = (*gb->realloc_proc) (gb->ptr, newarea);
+ gb->area_size = newarea;
+ }
+}
+
+void
+growbuf_append(struct growbuf *gb, const char *src, int len)
+{
+ growbuf_reserve(gb, gb->length + len);
+ memcpy(&gb->ptr[gb->length], src, len);
+ gb->length += len;
+}
+
static char *
w3m_dir(const char *name, char *dft)
{
diff --git a/indep.h b/indep.h
index b3819a3..2809832 100644
--- a/indep.h
+++ b/indep.h
@@ -1,7 +1,7 @@
/* $Id: indep.h,v 1.16 2003/09/22 21:02:19 ukai Exp $ */
#ifndef INDEP_H
#define INDEP_H
-#include <gc.h>
+#include "alloc.h"
#include "Str.h"
#include "config.h"
@@ -12,6 +12,14 @@
#define FALSE 0
#endif /* FALSE */
+struct growbuf {
+ char *ptr;
+ int length;
+ int area_size;
+ void *(*realloc_proc) (void *, size_t);
+ void (*free_proc) (void *);
+};
+
#define RAW_MODE 0
#define PAGER_MODE 1
#define HTML_MODE 2
@@ -52,6 +60,7 @@ extern int strncasecmp(const char *s1, const char *s2, size_t n);
extern char *strcasestr(const char *s1, const char *s2);
#endif
extern int strcasemstr(char *str, char *srch[], char **ret_ptr);
+int strmatchlen(const char *s1, const char *s2, int maxlen);
extern char *remove_space(char *str);
extern int non_null(char *s);
extern void cleanup_line(Str s, int mode);
@@ -64,6 +73,18 @@ extern Str Str_url_unquote(Str x, int is_form, int safe);
extern Str Str_form_quote(Str x);
#define Str_form_unquote(x) Str_url_unquote((x), TRUE, FALSE)
extern char *shell_quote(char *str);
+#define xmalloc(s) xrealloc(NULL, s)
+extern void *xrealloc(void *ptr, size_t size);
+extern void xfree(void *ptr);
+extern void *w3m_GC_realloc_atomic(void *ptr, size_t size);
+extern void w3m_GC_free(void *ptr);
+extern void growbuf_init(struct growbuf *gb);
+extern void growbuf_init_without_GC(struct growbuf *gb);
+extern void growbuf_clear(struct growbuf *gb);
+extern Str growbuf_to_Str(struct growbuf *gb);
+extern void growbuf_reserve(struct growbuf *gb, int leastarea);
+extern void growbuf_append(struct growbuf *gb, const char *src, int len);
+#define GROWBUF_ADD_CHAR(gb,ch) ((((gb)->length>=(gb)->area_size)?growbuf_reserve(gb,(gb)->length+1):(void)0),(void)((gb)->ptr[(gb)->length++] = (ch)))
extern char *w3m_auxbin_dir();
extern char *w3m_lib_dir();
@@ -71,10 +92,8 @@ extern char *w3m_etc_dir();
extern char *w3m_conf_dir();
extern char *w3m_help_dir();
-#define New(type) ((type*)GC_MALLOC(sizeof(type)))
-#define NewAtom(type) ((type*)GC_MALLOC_ATOMIC(sizeof(type)))
-#define New_N(type,n) ((type*)GC_MALLOC((n)*sizeof(type)))
-#define NewAtom_N(type,n) ((type*)GC_MALLOC_ATOMIC((n)*sizeof(type)))
-#define New_Reuse(type,ptr,n) ((type*)GC_REALLOC((ptr),(n)*sizeof(type)))
+#define NewWithoutGC(type) ((type*)xmalloc(sizeof(type)))
+#define NewWithoutGC_N(type,n) ((type*)xmalloc((n)*sizeof(type)))
+#define NewWithoutGC_Reuse(type,ptr,n) ((type*)xrealloc(ptr,(n)*sizeof(type)))
#endif /* INDEP_H */
diff --git a/istream.c b/istream.c
index 8967280..74adac5 100644
--- a/istream.c
+++ b/istream.c
@@ -22,8 +22,8 @@
static void basic_close(int *handle);
static int basic_read(int *handle, char *buf, int len);
-static void file_close(struct file_handle *handle);
-static int file_read(struct file_handle *handle, char *buf, int len);
+static void file_close(struct io_file_handle *handle);
+static int file_read(struct io_file_handle *handle, char *buf, int len);
static int str_read(Str handle, char *buf, int len);
@@ -35,12 +35,14 @@ static int ssl_read(struct ssl_handle *handle, char *buf, int len);
static int ens_read(struct ens_handle *handle, char *buf, int len);
static void ens_close(struct ens_handle *handle);
+static void memchop(char *p, int *len);
+
static void
do_update(BaseStream base)
{
int len;
base->stream.cur = base->stream.next = 0;
- len = base->read(base->handle, base->stream.buf, base->stream.size);
+ len = (*base->read) (base->handle, base->stream.buf, base->stream.size);
if (len <= 0)
base->iseos = TRUE;
else
@@ -66,12 +68,12 @@ init_buffer(BaseStream base, char *buf, int bufsize)
StreamBuffer sb = &base->stream;
sb->size = bufsize;
sb->cur = 0;
+ sb->buf = NewWithoutGC_N(uchar, bufsize);
if (buf) {
- sb->buf = (uchar *) buf;
+ memcpy(sb->buf, buf, bufsize);
sb->next = bufsize;
}
else {
- sb->buf = NewAtom_N(uchar, bufsize);
sb->next = 0;
}
base->iseos = FALSE;
@@ -95,10 +97,10 @@ newInputStream(int des)
InputStream stream;
if (des < 0)
return NULL;
- stream = New(union input_stream);
+ stream = NewWithoutGC(union input_stream);
init_base_stream(&stream->base, STREAM_BUF_SIZE);
stream->base.type = IST_BASIC;
- stream->base.handle = New(int);
+ stream->base.handle = NewWithoutGC(int);
*(int *)stream->base.handle = des;
stream->base.read = (int (*)())basic_read;
stream->base.close = (void (*)())basic_close;
@@ -111,10 +113,10 @@ newFileStream(FILE * f, void (*closep) ())
InputStream stream;
if (f == NULL)
return NULL;
- stream = New(union input_stream);
+ stream = NewWithoutGC(union input_stream);
init_base_stream(&stream->base, STREAM_BUF_SIZE);
stream->file.type = IST_FILE;
- stream->file.handle = New(struct file_handle);
+ stream->file.handle = NewWithoutGC(struct io_file_handle);
stream->file.handle->f = f;
if (closep)
stream->file.handle->close = closep;
@@ -131,10 +133,10 @@ newStrStream(Str s)
InputStream stream;
if (s == NULL)
return NULL;
- stream = New(union input_stream);
+ stream = NewWithoutGC(union input_stream);
init_str_stream(&stream->base, s);
stream->str.type = IST_STR;
- stream->str.handle = s;
+ stream->str.handle = NULL;
stream->str.read = (int (*)())str_read;
stream->str.close = NULL;
return stream;
@@ -147,10 +149,10 @@ newSSLStream(SSL * ssl, int sock)
InputStream stream;
if (sock < 0)
return NULL;
- stream = New(union input_stream);
+ stream = NewWithoutGC(union input_stream);
init_base_stream(&stream->base, SSL_BUF_SIZE);
stream->ssl.type = IST_SSL;
- stream->ssl.handle = New(struct ssl_handle);
+ stream->ssl.handle = NewWithoutGC(struct ssl_handle);
stream->ssl.handle->ssl = ssl;
stream->ssl.handle->sock = sock;
stream->ssl.read = (int (*)())ssl_read;
@@ -166,14 +168,14 @@ newEncodedStream(InputStream is, char encoding)
if (is == NULL || (encoding != ENC_QUOTE && encoding != ENC_BASE64 &&
encoding != ENC_UUENCODE))
return is;
- stream = New(union input_stream);
+ stream = NewWithoutGC(union input_stream);
init_base_stream(&stream->base, STREAM_BUF_SIZE);
stream->ens.type = IST_ENCODED;
- stream->ens.handle = New(struct ens_handle);
+ stream->ens.handle = NewWithoutGC(struct ens_handle);
stream->ens.handle->is = is;
stream->ens.handle->pos = 0;
stream->ens.handle->encoding = encoding;
- stream->ens.handle->s = NULL;
+ growbuf_init_without_GC(&stream->ens.handle->gb);
stream->ens.read = (int (*)())ens_read;
stream->ens.close = (void (*)())ens_close;
return stream;
@@ -187,8 +189,10 @@ ISclose(InputStream stream)
stream->base.type & IST_UNCLOSE)
return -1;
prevtrap = mySignal(SIGINT, SIG_IGN);
- stream->base.close(stream->base.handle);
+ stream->base.close (stream->base.handle);
mySignal(SIGINT, prevtrap);
+ xfree(stream->base.stream.buf);
+ xfree(stream);
return 0;
}
@@ -218,122 +222,97 @@ ISundogetc(InputStream stream)
return -1;
}
-#define MARGIN_STR_SIZE 10
Str
-StrISgets(InputStream stream)
+StrISgets2(InputStream stream, char crnl)
{
- BaseStream base;
- StreamBuffer sb;
- Str s = NULL;
- uchar *p;
- int len;
+ struct growbuf gb;
if (stream == NULL)
- return '\0';
- base = &stream->base;
- sb = &base->stream;
-
- while (!base->iseos) {
- if (MUST_BE_UPDATED(base)) {
- do_update(base);
- }
- else {
- if ((p = memchr(&sb->buf[sb->cur], '\n', sb->next - sb->cur))) {
- len = p - &sb->buf[sb->cur] + 1;
- if (s == NULL)
- s = Strnew_size(len);
- Strcat_charp_n(s, (char *)&sb->buf[sb->cur], len);
- sb->cur += len;
- return s;
- }
- else {
- if (s == NULL)
- s = Strnew_size(sb->next - sb->cur + MARGIN_STR_SIZE);
- Strcat_charp_n(s, (char *)&sb->buf[sb->cur],
- sb->next - sb->cur);
- sb->cur = sb->next;
- }
- }
- }
-
- if (s == NULL)
- return Strnew();
- return s;
+ return NULL;
+ growbuf_init(&gb);
+ ISgets_to_growbuf(stream, &gb, crnl);
+ return growbuf_to_Str(&gb);
}
-Str
-StrmyISgets(InputStream stream)
+void
+ISgets_to_growbuf(InputStream stream, struct growbuf *gb, char crnl)
{
- BaseStream base;
- StreamBuffer sb;
- Str s = NULL;
- int i, len;
+ BaseStream base = &stream->base;
+ StreamBuffer sb = &base->stream;
+ int i;
- if (stream == NULL)
- return '\0';
- base = &stream->base;
- sb = &base->stream;
+ gb->length = 0;
while (!base->iseos) {
if (MUST_BE_UPDATED(base)) {
do_update(base);
+ continue;
}
- else {
- if (s && Strlastchar(s) == '\r') {
- if (sb->buf[sb->cur] == '\n')
- Strcat_char(s, (char)sb->buf[sb->cur++]);
- return s;
- }
- for (i = sb->cur;
- i < sb->next && sb->buf[i] != '\n' && sb->buf[i] != '\r';
- i++) ;
- if (i < sb->next) {
- len = i - sb->cur + 1;
- if (s == NULL)
- s = Strnew_size(len + MARGIN_STR_SIZE);
- Strcat_charp_n(s, (char *)&sb->buf[sb->cur], len);
- sb->cur = i + 1;
- if (sb->buf[i] == '\n')
- return s;
+ if (crnl && gb->length > 0 && gb->ptr[gb->length - 1] == '\r') {
+ if (sb->buf[sb->cur] == '\n') {
+ GROWBUF_ADD_CHAR(gb, '\n');
+ ++sb->cur;
}
- else {
- if (s == NULL)
- s = Strnew_size(sb->next - sb->cur + MARGIN_STR_SIZE);
- Strcat_charp_n(s, (char *)&sb->buf[sb->cur],
- sb->next - sb->cur);
- sb->cur = sb->next;
+ break;
+ }
+ for (i = sb->cur; i < sb->next; ++i) {
+ if (sb->buf[i] == '\n' || (crnl && sb->buf[i] == '\r')) {
+ ++i;
+ break;
}
}
+ growbuf_append(gb, &sb->buf[sb->cur], i - sb->cur);
+ sb->cur = i;
+ if (gb->length > 0 && gb->ptr[gb->length - 1] == '\n')
+ break;
}
- if (s == NULL)
- return Strnew();
- return s;
+ growbuf_reserve(gb, gb->length + 1);
+ gb->ptr[gb->length] = '\0';
+ return;
}
+#ifdef unused
int
ISread(InputStream stream, Str buf, int count)
{
- int rest, len;
+ int len;
+
+ if (count + 1 > buf->area_size) {
+ char *newptr = GC_MALLOC_ATOMIC(count + 1);
+ memcpy(newptr, buf->ptr, buf->length);
+ newptr[buf->length] = '\0';
+ buf->ptr = newptr;
+ buf->area_size = count + 1;
+ }
+ len = ISread_n(stream, buf->ptr, count);
+ buf->length = (len > 0) ? len : 0;
+ buf->ptr[buf->length] = '\0';
+ return (len > 0) ? 1 : 0;
+}
+#endif
+
+int
+ISread_n(InputStream stream, char *dst, int count)
+{
+ int len, l;
BaseStream base;
- if (stream == NULL || (base = &stream->base)->iseos)
+ if (stream == NULL || count <= 0)
+ return -1;
+ if ((base = &stream->base)->iseos)
return 0;
- len = buffer_read(&base->stream, buf->ptr, count);
- rest = count - len;
+ len = buffer_read(&base->stream, dst, count);
if (MUST_BE_UPDATED(base)) {
- len = base->read(base->handle, &buf->ptr[len], rest);
- if (len <= 0) {
+ l = (*base->read) (base->handle, &dst[len], count - len);
+ if (l <= 0) {
base->iseos = TRUE;
- len = 0;
+ } else {
+ len += l;
}
- rest -= len;
}
- Strtruncate(buf, count - rest);
- if (buf->length > 0)
- return 1;
- return 0;
+ return len;
}
int
@@ -442,7 +421,11 @@ ssl_check_cert_ident(X509 * x, char *hostname)
for (i = 0; i < n; i++) {
gn = sk_GENERAL_NAME_value(alt, i);
if (gn->type == GEN_DNS) {
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
char *sn = ASN1_STRING_data(gn->d.ia5);
+#else
+ char *sn = ASN1_STRING_get0_data(gn->d.ia5);
+#endif
int sl = ASN1_STRING_length(gn->d.ia5);
if (!seen_dnsname)
@@ -496,8 +479,6 @@ ssl_check_cert_ident(X509 * x, char *hostname)
/* FIXME: gettextize? */
ret = Sprintf("Bad cert ident %s from %s", buf, hostname);
}
- else
- match_ident = TRUE;
}
return ret;
}
@@ -645,6 +626,7 @@ basic_close(int *handle)
#else
close(*(int *)handle);
#endif
+ xfree(handle);
}
static int
@@ -658,13 +640,14 @@ basic_read(int *handle, char *buf, int len)
}
static void
-file_close(struct file_handle *handle)
+file_close(struct io_file_handle *handle)
{
handle->close(handle->f);
+ xfree(handle);
}
static int
-file_read(struct file_handle *handle, char *buf, int len)
+file_read(struct io_file_handle *handle, char *buf, int len)
{
return fread(buf, 1, len, handle->f);
}
@@ -682,6 +665,7 @@ ssl_close(struct ssl_handle *handle)
close(handle->sock);
if (handle->ssl)
SSL_free(handle->ssl);
+ xfree(handle);
}
static int
@@ -717,38 +701,60 @@ static void
ens_close(struct ens_handle *handle)
{
ISclose(handle->is);
+ growbuf_clear(&handle->gb);
+ xfree(handle);
}
static int
ens_read(struct ens_handle *handle, char *buf, int len)
{
- if (handle->s == NULL || handle->pos == handle->s->length) {
+ if (handle->pos == handle->gb.length) {
char *p;
- handle->s = StrmyISgets(handle->is);
- if (handle->s->length == 0)
+ struct growbuf gbtmp;
+
+ ISgets_to_growbuf(handle->is, &handle->gb, TRUE);
+ if (handle->gb.length == 0)
return 0;
- cleanup_line(handle->s, PAGER_MODE);
if (handle->encoding == ENC_BASE64)
- Strchop(handle->s);
+ memchop(handle->gb.ptr, &handle->gb.length);
else if (handle->encoding == ENC_UUENCODE) {
- if (!strncmp(handle->s->ptr, "begin", 5))
- handle->s = StrmyISgets(handle->is);
- Strchop(handle->s);
+ if (handle->gb.length >= 5 &&
+ !strncmp(handle->gb.ptr, "begin", 5))
+ ISgets_to_growbuf(handle->is, &handle->gb, TRUE);
+ memchop(handle->gb.ptr, &handle->gb.length);
}
- p = handle->s->ptr;
+ growbuf_init_without_GC(&gbtmp);
+ p = handle->gb.ptr;
if (handle->encoding == ENC_QUOTE)
- handle->s = decodeQP(&p);
+ decodeQP_to_growbuf(&gbtmp, &p);
else if (handle->encoding == ENC_BASE64)
- handle->s = decodeB(&p);
+ decodeB_to_growbuf(&gbtmp, &p);
else if (handle->encoding == ENC_UUENCODE)
- handle->s = decodeU(&p);
+ decodeU_to_growbuf(&gbtmp, &p);
+ growbuf_clear(&handle->gb);
+ handle->gb = gbtmp;
handle->pos = 0;
}
- if (len > handle->s->length - handle->pos)
- len = handle->s->length - handle->pos;
+ if (len > handle->gb.length - handle->pos)
+ len = handle->gb.length - handle->pos;
- bcopy(&handle->s->ptr[handle->pos], buf, len);
+ memcpy(buf, &handle->gb.ptr[handle->pos], len);
handle->pos += len;
return len;
}
+
+static void
+memchop(char *p, int *len)
+{
+ char *q;
+
+ for (q = p + *len; q > p; --q) {
+ if (q[-1] != '\n' && q[-1] != '\r')
+ break;
+ }
+ if (q != p + *len)
+ *q = '\0';
+ *len = q - p;
+ return;
+}
diff --git a/istream.h b/istream.h
index a220d8b..5a04be0 100644
--- a/istream.h
+++ b/istream.h
@@ -2,13 +2,13 @@
#ifndef IO_STREAM_H
#define IO_STREAM_H
+#include "indep.h"
#include <stdio.h>
#ifdef USE_SSL
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <openssl/ssl.h>
#endif
-#include "Str.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -20,7 +20,7 @@ struct stream_buffer {
typedef struct stream_buffer *StreamBuffer;
-struct file_handle {
+struct io_file_handle {
FILE *f;
void (*close) ();
};
@@ -36,7 +36,7 @@ union input_stream;
struct ens_handle {
union input_stream *is;
- Str s;
+ struct growbuf gb;
int pos;
char encoding;
};
@@ -53,7 +53,7 @@ struct base_stream {
struct file_stream {
struct stream_buffer stream;
- struct file_handle *handle;
+ struct io_file_handle *handle;
char type;
char iseos;
int (*read) ();
@@ -119,9 +119,14 @@ extern InputStream newEncodedStream(InputStream is, char encoding);
extern int ISclose(InputStream stream);
extern int ISgetc(InputStream stream);
extern int ISundogetc(InputStream stream);
-extern Str StrISgets(InputStream stream);
-extern Str StrmyISgets(InputStream stream);
+extern Str StrISgets2(InputStream stream, char crnl);
+#define StrISgets(stream) StrISgets2(stream, FALSE)
+#define StrmyISgets(stream) StrISgets2(stream, TRUE)
+void ISgets_to_growbuf(InputStream stream, struct growbuf *gb, char crnl);
+#ifdef unused
extern int ISread(InputStream stream, Str buf, int count);
+#endif
+int ISread_n(InputStream stream, char *dst, int bufsize);
extern int ISfileno(InputStream stream);
extern int ISeos(InputStream stream);
#ifdef USE_SSL
diff --git a/keybind.c b/keybind.c
index a490962..fec0c65 100644
--- a/keybind.c
+++ b/keybind.c
@@ -91,7 +91,7 @@ unsigned char EscBKeymap[128] = {
/* 0 1 2 3 4 5 6 7 */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
/* 8 9 : ; < = > ? */
- nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
+ nulcmd, nulcmd, nulcmd, nulcmd, sgrmouse, nulcmd, nulcmd, nulcmd,
/* @ A B C D E F G */
nulcmd, movU, movD, movR, movL, nulcmd, goLineL, pgFore,
/* H I J K L M N O */
diff --git a/keybind_lynx.c b/keybind_lynx.c
index 163f6b2..42267ec 100644
--- a/keybind_lynx.c
+++ b/keybind_lynx.c
@@ -99,7 +99,7 @@ unsigned char EscBKeymap[128] = {
/* 0 1 2 3 4 5 6 7 */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
/* 8 9 : ; < = > ? */
- nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
+ nulcmd, nulcmd, nulcmd, nulcmd, sgrmouse, nulcmd, nulcmd, nulcmd,
/* @ A B C D E F G */
nulcmd, prevA, nextA, followA, backBf, nulcmd, goLineL, pgFore,
/* H I J K L M N O */
diff --git a/libwc/ambwidth_map.awk b/libwc/ambwidth_map.awk
index 8544f58..1d9d25f 100644
--- a/libwc/ambwidth_map.awk
+++ b/libwc/ambwidth_map.awk
@@ -3,9 +3,15 @@ BEGIN {
i = 0;
}
$2 == "A" {
- code = sprintf("0x%s", $1);
- if (strtonum(code) < 0x10000) {
- map[i] = code
+ code = code2 = strtonum(sprintf("0x%s", $1))
+ if (match($1, /[.]+[0-9A-Fa-f]+/)) {
+ s = substr($1, RSTART, RLENGTH)
+ sub(/[.]+/, "0x", s)
+ code2 = strtonum(s)
+ }
+ for (; code <= code2; code++) {
+ if (code >= 0x10000) { break }
+ map[i] = sprintf("0x%04X", code)
i++;
}
}
@@ -15,28 +21,14 @@ END {
prev = strtonum(map[0]);
for (j = 1; j < i; j++) {
cur = strtonum(map[j]);
- if (match(map[j], "[.]+")) {
+ if (cur - prev > 1) {
map2[n] = sprintf("%s, %s", start, map[j - 1]);
n++;
- gsub("[.]+", ", 0x", map[j])
- map2[n] = map[j];
- n++;
- start = map[j + 1];
- cur = strtonum(start);
- } else {
- if (cur - prev > 2) {
- map2[n] = sprintf("%s, %s", start, map[j - 1]);
- start = map[j];
- n++;
- }
-
- if (j == i - 1) {
- map2[n] = sprintf("%s, %s", start, map[j]);
- n++;
- }
+ start = map[j];
}
prev = cur;
}
+ if (i > 0) { map2[n] = sprintf("%s, %s", start, map[i - 1]); n++ }
printf("static wc_map ucs_ambwidth_map[] = {\n");
for (j = 0; j < n; j++) {
diff --git a/libwc/charset.c b/libwc/charset.c
index 3f0b74d..ea79b1c 100644
--- a/libwc/charset.c
+++ b/libwc/charset.c
@@ -1,8 +1,7 @@
#include <stdlib.h>
#include <ctype.h>
-#include <gc.h>
-#define New_N(type,n) ((type*)GC_MALLOC((n)*sizeof(type)))
+#include "../alloc.h"
#include "wc.h"
diff --git a/libwc/gb18030.c b/libwc/gb18030.c
index c195d49..d5c9018 100644
--- a/libwc/gb18030.c
+++ b/libwc/gb18030.c
@@ -151,6 +151,7 @@ wc_ucs_to_gb18030(wc_uint32 ucs)
return cc;
}
cc.ccs = WC_CCS_UNKNOWN;
+ cc.code = 0;
return cc;
}
#endif
diff --git a/libwc/iso2022.c b/libwc/iso2022.c
index 33d9a19..a191f28 100644
--- a/libwc/iso2022.c
+++ b/libwc/iso2022.c
@@ -405,7 +405,8 @@ wc_push_to_iso2022(Str os, wc_wchar_t cc, wc_status *st)
case WC_CCS_A_CS94:
if (cc.ccs == WC_CCS_US_ASCII)
cc.ccs = st->g0_ccs;
- g = cs94_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
+ if (WC_CCS_INDEX(cc.ccs) >= WC_F_ISO_BASE)
+ g = cs94_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
break;
case WC_CCS_A_CS94W:
is_wide = 1;
@@ -435,35 +436,41 @@ wc_push_to_iso2022(Str os, wc_wchar_t cc, wc_status *st)
break;
#endif
}
- g = cs94w_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
+ if (WC_CCS_INDEX(cc.ccs) >= WC_F_ISO_BASE)
+ g = cs94w_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
break;
case WC_CCS_A_CS96:
- g = cs96_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
+ if (WC_CCS_INDEX(cc.ccs) >= WC_F_ISO_BASE)
+ g = cs96_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
break;
case WC_CCS_A_CS96W:
is_wide = 1;
- g = cs96w_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
+ if (WC_CCS_INDEX(cc.ccs) >= WC_F_ISO_BASE)
+ g = cs96w_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
break;
case WC_CCS_A_CS942:
- g = cs942_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
+ if (WC_CCS_INDEX(cc.ccs) >= WC_F_ISO_BASE)
+ g = cs942_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
break;
case WC_CCS_A_UNKNOWN_W:
if (WcOption.no_replace)
return;
is_wide = 1;
cc.ccs = WC_CCS_US_ASCII;
- g = cs94_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
+ if (WC_CCS_INDEX(cc.ccs) >= WC_F_ISO_BASE)
+ g = cs94_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
cc.code = ((wc_uint32)WC_REPLACE_W[0] << 8) | WC_REPLACE_W[1];
break;
case WC_CCS_A_UNKNOWN:
if (WcOption.no_replace)
return;
cc.ccs = WC_CCS_US_ASCII;
- g = cs94_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
+ if (WC_CCS_INDEX(cc.ccs) >= WC_F_ISO_BASE)
+ g = cs94_gmap[WC_CCS_INDEX(cc.ccs) - WC_F_ISO_BASE];
cc.code = (wc_uint32)WC_REPLACE[0];
break;
default:
- if ((cc.ccs == WC_CCS_JOHAB || WC_CCS_JOHAB_1 ||
+ if ((cc.ccs == WC_CCS_JOHAB || cc.ccs == WC_CCS_JOHAB_1 ||
cc.ccs == WC_CCS_JOHAB_2 || cc.ccs == WC_CCS_JOHAB_3) &&
cs94w_gmap[WC_F_KS_X_1001 - WC_F_ISO_BASE]) {
wc_wchar_t cc2 = wc_johab_to_ksx1001(cc);
diff --git a/libwc/johab.c b/libwc/johab.c
index 8d587b8..498b1bb 100644
--- a/libwc/johab.c
+++ b/libwc/johab.c
@@ -160,9 +160,9 @@ wc_N_to_johab1(wc_uint32 code)
{
wc_uint32 a, b, c;
- a = N_johab1_map[0][(code / 28) / 21];
- b = N_johab1_map[1][(code / 28) % 21];
- c = N_johab1_map[2][ code % 28 ];
+ a = N_johab1_map[0][(code / 28) / 21 & 0x1F];
+ b = N_johab1_map[1][(code / 28) % 21 & 0x1F];
+ c = N_johab1_map[2][ code % 28 & 0x1F];
return 0x8000 | (a << 10) | (b << 5) | c;
}
diff --git a/libwc/map/big5_ucs.map b/libwc/map/big5_ucs.map
index 0c6fd12..ac817a9 100644
--- a/libwc/map/big5_ucs.map
+++ b/libwc/map/big5_ucs.map
@@ -1,6 +1,8 @@
/* Big5 (Chinese Taiwan) */
-static wc_uint16 big5_ucs_map[ 0x59 * 0x9D ] = {
+#define N_big5_ucs_map (0x59 * 0x9D)
+
+static wc_uint16 big5_ucs_map[ N_big5_ucs_map ] = {
0x3000, /* 0xA140 */
0xFF0C, /* 0xA141 */
0x3001, /* 0xA142 */
diff --git a/libwc/map/cns11643_ucs.map b/libwc/map/cns11643_ucs.map
index b426dd3..fcba334 100644
--- a/libwc/map/cns11643_ucs.map
+++ b/libwc/map/cns11643_ucs.map
@@ -1,6 +1,8 @@
/* CNS 11643 (Chinese Taiwan) */
-static wc_uint16 cns116431_ucs_map[ 0x5E * 0x5E ] = {
+#define N_cns116431_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 cns116431_ucs_map[ N_cns116431_ucs_map ] = {
0x3000, /* 0x2121 */
0xFF0C, /* 0x2122 */
0x3001, /* 0x2123 */
@@ -8839,7 +8841,9 @@ static wc_uint16 cns116431_ucs_map[ 0x5E * 0x5E ] = {
0, /* 0x7E7E */
};
-static wc_uint16 cns116432_ucs_map[ 0x5E * 0x5E ] = {
+#define N_cns116432_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 cns116432_ucs_map[ N_cns116432_ucs_map ] = {
0x4E42, /* 0x2121 */
0x4E5C, /* 0x2122 */
0x51F5, /* 0x2123 */
diff --git a/libwc/map/gb12345_ucs.map b/libwc/map/gb12345_ucs.map
index 55558c7..3fb338d 100644
--- a/libwc/map/gb12345_ucs.map
+++ b/libwc/map/gb12345_ucs.map
@@ -1,6 +1,8 @@
/* GB 12345 (Chinese) */
-static wc_uint16 gb12345_ucs_map[ 0x5E * 0x5E ] = {
+#define N_gb12345_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 gb12345_ucs_map[ N_gb12345_ucs_map ] = {
0x3000, /* 0x2121 */
0x3001, /* 0x2122 */
0x3002, /* 0x2123 */
diff --git a/libwc/map/gb2312_ucs.map b/libwc/map/gb2312_ucs.map
index 38fb88f..3d37465 100644
--- a/libwc/map/gb2312_ucs.map
+++ b/libwc/map/gb2312_ucs.map
@@ -1,6 +1,8 @@
/* GB 2312 (Chinese) */
-static wc_uint16 gb2312_ucs_map[ 0x5E * 0x5E ] = {
+#define N_gb2312_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 gb2312_ucs_map[ N_gb2312_ucs_map ] = {
0x3000, /* 0x2121 */
0x3001, /* 0x2122 */
0x3002, /* 0x2123 */
diff --git a/libwc/map/gbk_ucs.map b/libwc/map/gbk_ucs.map
index 5a0d5ba..d092fd7 100644
--- a/libwc/map/gbk_ucs.map
+++ b/libwc/map/gbk_ucs.map
@@ -6,7 +6,9 @@ static wc_map ucs_gbk_80_map[ N_ucs_gbk_80_map ] = {
{ 0x20AC, 0x0080 },
};
-static wc_uint16 gbk_ucs_map[ 0x7E * 0xBE - 0x5E * 0x5E + 0x0A + 0x16 + 0x06 ] = {
+#define N_gbk_ucs_map (0x7E * 0xBE - 0x5E * 0x5E + 0x0A + 0x16 + 0x06)
+
+static wc_uint16 gbk_ucs_map[ N_gbk_ucs_map ] = {
0x4E02, /* 0x8140 */
0x4E04, /* 0x8141 */
0x4E05, /* 0x8142 */
diff --git a/libwc/map/hkscs_ucs.map b/libwc/map/hkscs_ucs.map
index 96d1566..2fbe6b4 100644
--- a/libwc/map/hkscs_ucs.map
+++ b/libwc/map/hkscs_ucs.map
@@ -1,6 +1,8 @@
/* HKSCS (Chinese Hong Kong) */
-static wc_uint16 hkscs_ucs_map[ 0x1E * 0x9D ] = {
+#define N_hkscs_ucs_map (0x1E * 0x9D)
+
+static wc_uint16 hkscs_ucs_map[ N_hkscs_ucs_map ] = {
0, /* 0x8840 */
0, /* 0x8841 */
0, /* 0x8842 */
diff --git a/libwc/map/jisx0208x0212x0213_ucs.map b/libwc/map/jisx0208x0212x0213_ucs.map
index 1a1d706..28c2a6c 100644
--- a/libwc/map/jisx0208x0212x0213_ucs.map
+++ b/libwc/map/jisx0208x0212x0213_ucs.map
@@ -1,6 +1,8 @@
/* JIS X 0208, JIS X 0212, JIS X 0213 (Japanese) */
-static wc_uint16 jisx0208x02131_ucs_map[ 0x5E * 0x5E ] = {
+#define N_jisx0208x02131_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 jisx0208x02131_ucs_map[ N_jisx0208x02131_ucs_map ] = {
0x3000, /* JIS X 0208 0x2121 */
0x3001, /* JIS X 0208 0x2122 */
0x3002, /* JIS X 0208 0x2123 */
@@ -8839,7 +8841,9 @@ static wc_uint16 jisx0208x02131_ucs_map[ 0x5E * 0x5E ] = {
0, /* JIS X 0213-1 0x7E7E */
};
-static wc_uint16 jisx0212x02132_ucs_map[ 0x5E * 0x5E ] = {
+#define N_jisx0212x02132_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 jisx0212x02132_ucs_map[ N_jisx0212x02132_ucs_map ] = {
0, /* JIS X 0213-2 0x2121 */
0x4E02, /* JIS X 0213-2 0x2122 */
0x4E0F, /* JIS X 0213-2 0x2123 */
diff --git a/libwc/map/ksx1001_ucs.map b/libwc/map/ksx1001_ucs.map
index 9a17d61..cb62f98 100644
--- a/libwc/map/ksx1001_ucs.map
+++ b/libwc/map/ksx1001_ucs.map
@@ -1,6 +1,8 @@
/* KS X 1001 (Korean) */
-static wc_uint16 ksx1001_ucs_map[ 0x5E * 0x5E ] = {
+#define N_ksx1001_ucs_map (0x5E * 0x5E)
+
+static wc_uint16 ksx1001_ucs_map[ N_ksx1001_ucs_map ] = {
0x3000, /* 0x2121 */
0x3001, /* 0x2122 */
0x3002, /* 0x2123 */
diff --git a/libwc/map/sjis_ext_ucs.map b/libwc/map/sjis_ext_ucs.map
index a82995c..cc748ba 100644
--- a/libwc/map/sjis_ext_ucs.map
+++ b/libwc/map/sjis_ext_ucs.map
@@ -1,6 +1,8 @@
/* Shift_JIS/CP932 (Japanese) */
-static wc_uint16 sjis_ext_ucs_map[ 0x5E * 10 ] = {
+#define N_sjis_ext_ucs_map (0x5E * 10)
+
+static wc_uint16 sjis_ext_ucs_map[ N_sjis_ext_ucs_map ] = {
0x2460, /* 0x8740 */
0x2461, /* 0x8741 */
0x2462, /* 0x8742 */
diff --git a/libwc/map/ucs_ambwidth.map b/libwc/map/ucs_ambwidth.map
index 6f03ba8..35ceedb 100644
--- a/libwc/map/ucs_ambwidth.map
+++ b/libwc/map/ucs_ambwidth.map
@@ -1,50 +1,82 @@
static wc_map ucs_ambwidth_map[] = {
{ 0x00A1, 0x00A1 },
{ 0x00A4, 0x00A4 },
- { 0x00A7, 0x00AA },
- { 0x00AD, 0x00BF },
+ { 0x00A7, 0x00A8 },
+ { 0x00AA, 0x00AA },
+ { 0x00AD, 0x00AE },
+ { 0x00B0, 0x00B4 },
+ { 0x00B6, 0x00BA },
+ { 0x00BC, 0x00BF },
{ 0x00C6, 0x00C6 },
{ 0x00D0, 0x00D0 },
{ 0x00D7, 0x00D8 },
{ 0x00DE, 0x00E1 },
- { 0x00E6, 0x00ED },
- { 0x00F0, 0x00F3 },
- { 0x00F7, 0x00FE },
+ { 0x00E6, 0x00E6 },
+ { 0x00E8, 0x00EA },
+ { 0x00EC, 0x00ED },
+ { 0x00F0, 0x00F0 },
+ { 0x00F2, 0x00F3 },
+ { 0x00F7, 0x00FA },
+ { 0x00FC, 0x00FC },
+ { 0x00FE, 0x00FE },
{ 0x0101, 0x0101 },
- { 0x0111, 0x0113 },
+ { 0x0111, 0x0111 },
+ { 0x0113, 0x0113 },
{ 0x011B, 0x011B },
{ 0x0126, 0x0127 },
{ 0x012B, 0x012B },
{ 0x0131, 0x0133 },
{ 0x0138, 0x0138 },
- { 0x013F, 0x0144 },
- { 0x0148, 0x014D },
+ { 0x013F, 0x0142 },
+ { 0x0144, 0x0144 },
+ { 0x0148, 0x014B },
+ { 0x014D, 0x014D },
{ 0x0152, 0x0153 },
{ 0x0166, 0x0167 },
{ 0x016B, 0x016B },
- { 0x01CE, 0x01DC },
+ { 0x01CE, 0x01CE },
+ { 0x01D0, 0x01D0 },
+ { 0x01D2, 0x01D2 },
+ { 0x01D4, 0x01D4 },
+ { 0x01D6, 0x01D6 },
+ { 0x01D8, 0x01D8 },
+ { 0x01DA, 0x01DA },
+ { 0x01DC, 0x01DC },
{ 0x0251, 0x0251 },
{ 0x0261, 0x0261 },
{ 0x02C4, 0x02C4 },
- { 0x02C7, 0x02CD },
+ { 0x02C7, 0x02C7 },
+ { 0x02C9, 0x02CB },
+ { 0x02CD, 0x02CD },
{ 0x02D0, 0x02D0 },
- { 0x02D8, 0x02DF },
+ { 0x02D8, 0x02DB },
+ { 0x02DD, 0x02DD },
+ { 0x02DF, 0x02DF },
{ 0x0300, 0x036F },
- { 0x0391, 0x03A9 },
- { 0x03B1, 0x03C9 },
+ { 0x0391, 0x03A1 },
+ { 0x03A3, 0x03A9 },
+ { 0x03B1, 0x03C1 },
+ { 0x03C3, 0x03C9 },
{ 0x0401, 0x0401 },
- { 0x0410, 0x0451 },
+ { 0x0410, 0x044F },
+ { 0x0451, 0x0451 },
{ 0x2010, 0x2010 },
- { 0x2013, 0x2019 },
+ { 0x2013, 0x2016 },
+ { 0x2018, 0x2019 },
{ 0x201C, 0x201D },
- { 0x2020, 0x2027 },
- { 0x2030, 0x2035 },
+ { 0x2020, 0x2022 },
+ { 0x2024, 0x2027 },
+ { 0x2030, 0x2030 },
+ { 0x2032, 0x2033 },
+ { 0x2035, 0x2035 },
{ 0x203B, 0x203B },
{ 0x203E, 0x203E },
{ 0x2074, 0x2074 },
- { 0x207F, 0x2084 },
+ { 0x207F, 0x207F },
+ { 0x2081, 0x2084 },
{ 0x20AC, 0x20AC },
- { 0x2103, 0x2105 },
+ { 0x2103, 0x2103 },
+ { 0x2105, 0x2105 },
{ 0x2109, 0x2109 },
{ 0x2113, 0x2113 },
{ 0x2116, 0x2116 },
@@ -52,21 +84,28 @@ static wc_map ucs_ambwidth_map[] = {
{ 0x2126, 0x2126 },
{ 0x212B, 0x212B },
{ 0x2153, 0x2154 },
- { 0x215B, 0x216B },
+ { 0x215B, 0x215E },
+ { 0x2160, 0x216B },
{ 0x2170, 0x2179 },
{ 0x2189, 0x2189 },
{ 0x2190, 0x2199 },
{ 0x21B8, 0x21B9 },
- { 0x21D2, 0x21D4 },
+ { 0x21D2, 0x21D2 },
+ { 0x21D4, 0x21D4 },
{ 0x21E7, 0x21E7 },
- { 0x2200, 0x2203 },
+ { 0x2200, 0x2200 },
+ { 0x2202, 0x2203 },
{ 0x2207, 0x2208 },
{ 0x220B, 0x220B },
- { 0x220F, 0x2211 },
+ { 0x220F, 0x220F },
+ { 0x2211, 0x2211 },
{ 0x2215, 0x2215 },
{ 0x221A, 0x221A },
{ 0x221D, 0x2220 },
- { 0x2223, 0x222E },
+ { 0x2223, 0x2223 },
+ { 0x2225, 0x2225 },
+ { 0x2227, 0x222C },
+ { 0x222E, 0x222E },
{ 0x2234, 0x2237 },
{ 0x223C, 0x223D },
{ 0x2248, 0x2248 },
@@ -83,11 +122,13 @@ static wc_map ucs_ambwidth_map[] = {
{ 0x22A5, 0x22A5 },
{ 0x22BF, 0x22BF },
{ 0x2312, 0x2312 },
- { 0x2460, 0x254B },
+ { 0x2460, 0x24E9 },
+ { 0x24EB, 0x254B },
{ 0x2550, 0x2573 },
{ 0x2580, 0x258F },
{ 0x2592, 0x2595 },
- { 0x25A0, 0x25A9 },
+ { 0x25A0, 0x25A1 },
+ { 0x25A3, 0x25A9 },
{ 0x25B2, 0x25B3 },
{ 0x25B6, 0x25B7 },
{ 0x25BC, 0x25BD },
@@ -101,12 +142,20 @@ static wc_map ucs_ambwidth_map[] = {
{ 0x2609, 0x2609 },
{ 0x260E, 0x260F },
{ 0x2614, 0x2615 },
- { 0x261C, 0x261E },
- { 0x2640, 0x2642 },
- { 0x2660, 0x266F },
+ { 0x261C, 0x261C },
+ { 0x261E, 0x261E },
+ { 0x2640, 0x2640 },
+ { 0x2642, 0x2642 },
+ { 0x2660, 0x2661 },
+ { 0x2663, 0x2665 },
+ { 0x2667, 0x266A },
+ { 0x266C, 0x266D },
+ { 0x266F, 0x266F },
{ 0x269E, 0x269F },
{ 0x26BE, 0x26BF },
- { 0x26C4, 0x26E3 },
+ { 0x26C4, 0x26CD },
+ { 0x26CF, 0x26E1 },
+ { 0x26E3, 0x26E3 },
{ 0x26E8, 0x26FF },
{ 0x273D, 0x273D },
{ 0x2757, 0x2757 },
diff --git a/libwc/map/uhc_ucs.map b/libwc/map/uhc_ucs.map
index b6b43ca..55efc09 100644
--- a/libwc/map/uhc_ucs.map
+++ b/libwc/map/uhc_ucs.map
@@ -1,6 +1,8 @@
/* UHC/CP949 (Korean) */
-static wc_uint16 uhc_ucs_map[ 0x20 * 0xB2 + 0x27 * 0x54 + 2 ] = {
+#define N_uhc_ucs_map (0x20 * 0xB2 + 0x27 * 0x54 + 2)
+
+static wc_uint16 uhc_ucs_map[ N_uhc_ucs_map ] = {
0xAC02, /* 0x8141 */
0xAC03, /* 0x8142 */
0xAC05, /* 0x8143 */
diff --git a/libwc/status.c b/libwc/status.c
index d25c924..4a2ebf8 100644
--- a/libwc/status.c
+++ b/libwc/status.c
@@ -1,7 +1,6 @@
#include <string.h>
-#include <gc.h>
-#define New_N(type,n) ((type*)GC_MALLOC((n)*sizeof(type)))
+#include "../alloc.h"
#include "wc.h"
#ifdef USE_UNICODE
diff --git a/libwc/ucs.c b/libwc/ucs.c
index d7b6948..18c3a67 100644
--- a/libwc/ucs.c
+++ b/libwc/ucs.c
@@ -100,6 +100,7 @@ wc_ucs_to_any(wc_uint32 ucs, wc_table *t)
return t->conv(t->ccs, map->code2);
}
cc.ccs = WC_CCS_UNKNOWN;
+ cc.code = 0;
return cc;
}
@@ -108,6 +109,7 @@ wc_any_to_ucs(wc_wchar_t cc)
{
int f;
wc_uint16 *map = NULL;
+ wc_uint32 map_size = 0x80;
wc_map *map2;
f = WC_CCS_INDEX(cc.ccs);
@@ -138,6 +140,7 @@ wc_any_to_ucs(wc_wchar_t cc)
if (f < WC_F_ISO_BASE || f > WC_F_CS94W_END)
return 0;
map = cs94w_ucs_map[f - WC_F_ISO_BASE];
+ map_size = cs94w_ucs_map_size[f - WC_F_ISO_BASE];
cc.code = WC_CS94W_N(cc.code);
break;
case WC_CCS_A_CS96:
@@ -150,6 +153,7 @@ wc_any_to_ucs(wc_wchar_t cc)
if (f < WC_F_ISO_BASE || f > WC_F_CS96W_END)
return WC_C_UCS4_ERROR;
map = cs96w_ucs_map[f - WC_F_ISO_BASE];
+ map_size = cs96w_ucs_map_size[f - WC_F_ISO_BASE];
cc.code = WC_CS96W_N(cc.code);
break;
case WC_CCS_A_CS942:
@@ -174,12 +178,14 @@ wc_any_to_ucs(wc_wchar_t cc)
return WC_C_UCS2_EURO;
}
map = pcs_ucs_map[f - WC_F_PCS_BASE];
+ map_size = pcs_ucs_map_size[f - WC_F_PCS_BASE];
cc.code &= 0x7f;
break;
case WC_CCS_A_PCSW:
if (f < WC_F_PCS_BASE || f > WC_F_PCSW_END)
return WC_C_UCS4_ERROR;
map = pcsw_ucs_map[f - WC_F_PCS_BASE];
+ map_size = pcsw_ucs_map_size[f - WC_F_PCS_BASE];
switch (cc.ccs) {
case WC_CCS_BIG5:
cc.code = WC_BIG5_N(cc.code);
@@ -271,6 +277,8 @@ wc_any_to_ucs(wc_wchar_t cc)
}
if (map == NULL)
return WC_C_UCS4_ERROR;
+ if (map_size == 0 || cc.code > map_size - 1)
+ return WC_C_UCS4_ERROR;
cc.code = map[cc.code];
return cc.code ? cc.code : WC_C_UCS4_ERROR;
}
diff --git a/libwc/ucs.map b/libwc/ucs.map
index dfac6d9..bed5dff 100644
--- a/libwc/ucs.map
+++ b/libwc/ucs.map
@@ -175,6 +175,49 @@ static wc_uint16 *pcs_ucs_map[] = {
NULL, /* (Raw) */
};
+static wc_uint32 pcs_ucs_map_size[] = {
+ 0x80, /* cp437_ucs_map */
+ 0x80, /* cp737_ucs_map */
+ 0x80, /* cp775_ucs_map */
+ 0x80, /* cp850_ucs_map */
+ 0x80, /* cp852_ucs_map */
+ 0x80, /* cp855_ucs_map */
+ 0x80, /* cp856_ucs_map */
+ 0x80, /* cp857_ucs_map */
+ 0x80, /* cp860_ucs_map */
+ 0x80, /* cp861_ucs_map */
+ 0x80, /* cp862_ucs_map */
+ 0x80, /* cp863_ucs_map */
+ 0x80, /* cp864_ucs_map */
+ 0x80, /* cp865_ucs_map */
+ 0x80, /* cp866_ucs_map */
+ 0x80, /* cp869_ucs_map */
+ 0x80, /* cp874_ucs_map */
+ 0x80, /* cp1006_ucs_map */
+ 0x80, /* cp1250_ucs_map */
+ 0x80, /* cp1251_ucs_map */
+ 0x80, /* cp1252_ucs_map */
+ 0x80, /* cp1253_ucs_map */
+ 0x80, /* cp1254_ucs_map */
+ 0x80, /* cp1255_ucs_map */
+ 0x80, /* cp1256_ucs_map */
+ 0x80, /* cp1257_ucs_map */
+ 0x80, /* cp1258_ucs_map */
+ 0, /* NULL */
+ 0x80, /* tcvn57121_ucs_map */
+ 0x20, /* tcvn57122_ucs_map */
+ 0, /* NULL */
+ 0x80, /* viscii111_ucs_map */
+ 0x20, /* viscii112_ucs_map */
+ 0x80, /* vps1_ucs_map */
+ 0x20, /* vps2_ucs_map */
+ 0x80, /* koi8r_ucs_map */
+ 0x80, /* koi8u_ucs_map */
+ 0x80, /* nextstep_ucs_map */
+ 0, /* NULL */
+ 0, /* NULL (Raw) */
+};
+
static wc_uint16 *cs94w_ucs_map[] = {
jisx0208x02131_ucs_map, /* 40 (JIS C 6226) */
gb2312_ucs_map, /* 41 (GB 2312) */
@@ -195,7 +238,28 @@ static wc_uint16 *cs94w_ucs_map[] = {
jisx0212x02132_ucs_map, /* 50 (JIS X 0213-2) */
};
+static wc_uint32 cs94w_ucs_map_size[] = {
+ N_jisx0208x02131_ucs_map, /* 40 (JIS C 6226) */
+ N_gb2312_ucs_map, /* 41 (GB 2312) */
+ N_jisx0208x02131_ucs_map, /* 42 (JIS X 0208) */
+ N_ksx1001_ucs_map, /* 43 (KS X 1001) */
+ N_jisx0212x02132_ucs_map, /* 44 (JIS X 0212) */
+ 0, /* 45 (ISO IR 165) */
+ 0, /* 46 */
+ N_cns116431_ucs_map, /* 47 (CNS 11643-1) */
+ N_cns116432_ucs_map, /* 48 (CNS 11643-2) */
+ 0, /* 49 (CNS 11643-3) */
+ 0, /* 4A (CNS 11643-4) */
+ 0, /* 4B (CNS 11643-5) */
+ 0, /* 4C (CNS 11643-6) */
+ 0, /* 4D (CNS 11643-7) */
+ 0, /* 4E (KSP 9566) */
+ N_jisx0208x02131_ucs_map, /* 4F (JIS X 0213-1) */
+ N_jisx0212x02132_ucs_map, /* 50 (JIS X 0213-2) */
+};
+
static wc_uint16 **cs96w_ucs_map;
+static wc_uint32 *cs96w_ucs_map_size;
static wc_uint16 *pcsw_ucs_map[] = {
big5_ucs_map, /* Big5 */
@@ -233,6 +297,42 @@ static wc_uint16 *pcsw_ucs_map[] = {
hkscs_ucs_map, /* HKSCS-2 */
};
+static wc_uint32 pcsw_ucs_map_size[] = {
+ N_big5_ucs_map, /* Big5 */
+ N_big5_ucs_map, /* Big5-1 */
+ N_big5_ucs_map, /* Big5-2 */
+ 0, /* CNS 11643-8 */
+ 0, /* CNS 11643-9 */
+ 0, /* CNS 11643-10 */
+ 0, /* CNS 11643-11 */
+ 0, /* CNS 11643-12 */
+ 0, /* CNS 11643-13 */
+ 0, /* CNS 11643-14 */
+ 0, /* CNS 11643-15 */
+ 0, /* CNS 11643-16 */
+ 0, /* CNS 11643-X */
+ N_gb12345_ucs_map, /* GB 12345 */
+ 0, /* Johab (special conversion) */
+ 0, /* Johab-1 (special conversion) */
+ 0, /* Johab-2 (special conversion) */
+ N_ksx1001_ucs_map, /* Johab-3 */
+ N_sjis_ext_ucs_map, /* Shift_JIS(CP932) ext */
+ N_sjis_ext_ucs_map, /* Shift_JIS(CP932) ext-1 */
+ N_sjis_ext_ucs_map, /* Shift_JIS(CP932) ext-2 */
+ N_gbk_ucs_map, /* GBK(CP936) */
+ N_gbk_ucs_map, /* GBK(CP936)-1 */
+ N_gbk_ucs_map, /* GBK(CP936)-2 */
+ 0, /* GB18030 GBK-ext (special conversion) */
+ 0, /* GB18030 GBK-ext-1 (special conversion) */
+ 0, /* GB18030 GBK-ext-2 (special conversion) */
+ N_uhc_ucs_map, /* UHC(CP949) */
+ N_uhc_ucs_map, /* UHC(CP949)-1 */
+ N_uhc_ucs_map, /* UHC(CP949)-2 */
+ N_hkscs_ucs_map, /* HKSCS */
+ N_hkscs_ucs_map, /* HKSCS-1 */
+ N_hkscs_ucs_map, /* HKSCS-2 */
+};
+
static wc_wchar_t
ucs_cs94_conv(wc_ccs ccs, wc_uint16 c)
{
diff --git a/libwc/wtf.c b/libwc/wtf.c
index b8cfdc7..94d95c1 100644
--- a/libwc/wtf.c
+++ b/libwc/wtf.c
@@ -120,29 +120,36 @@ int
wtf_strwidth(wc_uchar *p)
{
int w = 0;
+ wc_uchar *q = p + strlen(p);
- while (*p) {
+ while (p < q) {
w += wtf_width(p);
p += WTF_LEN_MAP[*p];
}
return w;
}
-/*
size_t
wtf_len1(wc_uchar *p)
{
- return (size_t)WTF_LEN_MAP[*p];
+ size_t len, len_max = WTF_LEN_MAP[*p];
+
+ for (len = 0; *(p + len); len++)
+ if (len == len_max)
+ break;
+ if (len == 0)
+ len = 1;
+ return len;
}
-*/
size_t
wtf_len(wc_uchar *p)
{
wc_uchar *q = p;
+ wc_uchar *strz = p + strlen(p);
q += WTF_LEN_MAP[*q];
- while (*q && ! WTF_WIDTH_MAP[*q])
+ while (q < strz && ! WTF_WIDTH_MAP[*q])
q += WTF_LEN_MAP[*q];
return q - p;
}
@@ -166,15 +173,17 @@ wtf_type(wc_uchar *p)
((p)[3] = (((c) >> 7) & 0x7f) | 0x80), \
((p)[4] = ( (c) & 0x7f) | 0x80)
#define wtf_to_wcs16(p) \
+ ((p)[0] == 0 || (p)[1] == 0 || (p)[2] == 0 ? 0 : \
((wc_uint32)((p)[0] & 0x03) << 14) \
| ((wc_uint32)((p)[1] & 0x7f) << 7) \
- | ((wc_uint32)((p)[2] & 0x7f) )
+ | ((wc_uint32)((p)[2] & 0x7f) ))
#define wtf_to_wcs32(p) \
+ ((p)[0] == 0 || (p)[1] == 0 || (p)[2] == 0 || (p)[3] == 0 || (p)[4] == 0 ? 0 : \
((wc_uint32)((p)[0] & 0x0f) << 28) \
| ((wc_uint32)((p)[1] & 0x7f) << 21) \
| ((wc_uint32)((p)[2] & 0x7f) << 14) \
| ((wc_uint32)((p)[3] & 0x7f) << 7) \
- | ((wc_uint32)((p)[4] & 0x7f) )
+ | ((wc_uint32)((p)[4] & 0x7f) ))
void
wtf_push(Str os, wc_ccs ccs, wc_uint32 code)
@@ -388,7 +397,7 @@ wtf_parse1(wc_uchar **p)
cc.code = *(q++);
} else if (*q > 0xa0) {
cc.ccs = wtf_gr_ccs;
- if (WC_CCS_IS_WIDE(cc.ccs)) {
+ if (WC_CCS_IS_WIDE(cc.ccs) && *(q+1)) {
cc.code = ((wc_uint32)*q << 8) | *(q+1);
q += 2;
} else
@@ -401,27 +410,47 @@ wtf_parse1(wc_uchar **p)
case WC_CCS_A_CS942:
case WC_CCS_A_PCS:
case WC_CCS_A_UNKNOWN:
- cc.ccs |= *(q++) & 0x7f;
- cc.code = *(q++);
+ if (*q && *(q+1)) {
+ cc.ccs |= *(q++) & 0x7f;
+ cc.code = *(q++);
+ } else {
+ cc.ccs = WC_CCS_US_ASCII;
+ cc.code = (wc_uint32)' ';
+ }
break;
case WC_CCS_A_CS94W:
case WC_CCS_A_CS96W:
case WC_CCS_A_PCSW:
- cc.ccs |= *(q++) & 0x7f;
- cc.code = ((wc_uint32)*q << 8) | *(q+1);
- q += 2;
+ if (*q && *(q+1) && *(q+2)) {
+ cc.ccs |= *(q++) & 0x7f;
+ cc.code = ((wc_uint32)*q << 8) | *(q+1);
+ q += 2;
+ } else {
+ cc.ccs = WC_CCS_US_ASCII;
+ cc.code = (wc_uint32)' ';
+ }
break;
case WC_CCS_A_WCS16:
case WC_CCS_A_WCS16W:
- cc.ccs |= (*q & 0x7c) >> 2;
- cc.code = wtf_to_wcs16(q);
- q += 3;
+ if (*q && *(q+1) && *(q+2)) {
+ cc.ccs |= (*q & 0x7c) >> 2;
+ cc.code = wtf_to_wcs16(q);
+ q += 3;
+ } else {
+ cc.ccs = WC_CCS_US_ASCII;
+ cc.code = (wc_uint32)' ';
+ }
break;
case WC_CCS_A_WCS32:
case WC_CCS_A_WCS32W:
- cc.ccs |= (*q & 0x70) >> 4;
- cc.code = wtf_to_wcs32(q);
- q += 5;
+ if (*q && *(q+1) && *(q+2) && *(q+3) && *(q+4)) {
+ cc.ccs |= (*q & 0x70) >> 4;
+ cc.code = wtf_to_wcs32(q);
+ q += 5;
+ } else {
+ cc.ccs = WC_CCS_US_ASCII;
+ cc.code = (wc_uint32)' ';
+ }
break;
default:
/* case 0: */
diff --git a/libwc/wtf.h b/libwc/wtf.h
index ad47973..435526f 100644
--- a/libwc/wtf.h
+++ b/libwc/wtf.h
@@ -59,8 +59,7 @@ extern void wtf_init(wc_ces ces1, wc_ces ces2);
#define wtf_width(p) (WcOption.use_wide ? (int)WTF_WIDTH_MAP[(wc_uchar)*(p)] \
: ((int)WTF_WIDTH_MAP[(wc_uchar)*(p)] ? 1 : 0))
extern int wtf_strwidth(wc_uchar *p);
-/* extern size_t wtf_len1(wc_uchar *p); */
-#define wtf_len1(p) ((int)WTF_LEN_MAP[(wc_uchar)*(p)])
+extern size_t wtf_len1(wc_uchar *p);
extern size_t wtf_len(wc_uchar *p);
/* extern int wtf_type(wc_uchar *p); */
#define wtf_type(p) WTF_TYPE_MAP[(wc_uchar)*(p)]
diff --git a/linein.c b/linein.c
index b7e81b6..d8f9023 100644
--- a/linein.c
+++ b/linein.c
@@ -714,7 +714,8 @@ _rdcompl(void)
static void
next_dcompl(int next)
{
- static int col, row, len;
+ static int col, row;
+ static unsigned int len;
static Str d;
int i, j, n, y;
Str f;
@@ -780,9 +781,10 @@ next_dcompl(int next)
if (len < n)
len = n;
}
- col = COLS / len;
- if (col == 0)
- col = 1;
+ if (len > 0 && COLS > len)
+ col = COLS / len;
+ else
+ col = 1;
row = (NCFileBuf + col - 1) / col;
disp_next:
@@ -1026,7 +1028,7 @@ _prev(void)
strCurrentBuf = strBuf;
}
if (DecodeURL && (cm_mode & CPL_URL) )
- p = url_unquote_conv(p, 0);
+ p = url_decode2(p, NULL);
strBuf = Strnew_charp(p);
CLen = CPos = setStrType(strBuf, strProp);
offset = 0;
@@ -1045,7 +1047,7 @@ _next(void)
p = nextHist(hist);
if (p) {
if (DecodeURL && (cm_mode & CPL_URL) )
- p = url_unquote_conv(p, 0);
+ p = url_decode2(p, NULL);
strBuf = Strnew_charp(p);
}
else {
diff --git a/local.c b/local.c
index f5a73a2..56d589d 100644
--- a/local.c
+++ b/local.c
@@ -109,6 +109,7 @@ loadLocalDir(char *dname)
n++;
}
}
+ closedir(d);
if (multicolList) {
l = COLS / (maxlen + 2);
@@ -167,7 +168,7 @@ loadLocalDir(char *dname)
else {
#if defined(HAVE_LSTAT) && defined(HAVE_READLINK)
if (S_ISLNK(lst.st_mode)) {
- if ((l = readlink(fbuf->ptr, lbuf, sizeof(lbuf))) > 0) {
+ if ((l = readlink(fbuf->ptr, lbuf, sizeof(lbuf) - 1)) > 0) {
lbuf[l] = '\0';
Strcat_m_charp(tmp, " -> ",
html_quote(conv_from_system(lbuf)), NULL);
@@ -212,18 +213,17 @@ set_environ(char *var, char *value)
if (var != NULL && value != NULL)
setenv(var, value, 1);
#else /* not HAVE_SETENV */
-#ifdef HAVE_PUTENV
static Hash_sv *env_hash = NULL;
Str tmp = Strnew_m_charp(var, "=", value, NULL);
if (env_hash == NULL)
env_hash = newHash_sv(20);
putHash_sv(env_hash, var, (void *)tmp->ptr);
+#ifdef HAVE_PUTENV
putenv(tmp->ptr);
#else /* not HAVE_PUTENV */
extern char **environ;
char **ne;
- char *p;
int i, l, el;
char **e, **newenv;
@@ -250,7 +250,7 @@ set_environ(char *var, char *value)
if (newenv == NULL)
return;
for (e = environ, ne = newenv; *e != NULL; *(ne++) = *(e++)) ;
- *(ne++) = p;
+ *(ne++) = tmp->ptr;
*ne = NULL;
environ = newenv;
#endif /* not HAVE_PUTENV */
@@ -359,6 +359,10 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
int status;
pid_t pid;
char *file = uri, *name = uri, *path_info = NULL, *tmpf = NULL;
+#ifdef HAVE_CHDIR
+ char *cgi_dir;
+#endif
+ char *cgi_basename;
#ifdef __MINGW32_VERSION
return NULL;
@@ -373,18 +377,25 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
if (!fw)
return NULL;
}
+ if (qstr)
+ uri = Strnew_m_charp(uri, "?", qstr, NULL)->ptr;
+#ifdef HAVE_CHDIR
+ cgi_dir = mydirname(file);
+#endif
+ cgi_basename = mybasename(file);
pid = open_pipe_rw(&fr, NULL);
- if (pid < 0)
+ /* Don't invoke gc after here, or the program might crash in some platforms */
+ if (pid < 0) {
+ if (fw)
+ fclose(fw);
return NULL;
- else if (pid) {
+ } else if (pid) {
if (fw)
fclose(fw);
return fr;
}
setup_child(TRUE, 2, fw ? fileno(fw) : -1);
- if (qstr)
- uri = Strnew_m_charp(uri, "?", qstr, NULL)->ptr;
set_cgi_environ(name, file, uri);
if (path_info)
set_environ("PATH_INFO", path_info);
@@ -415,12 +426,14 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
}
#ifdef HAVE_CHDIR /* ifndef __EMX__ ? */
- chdir(mydirname(file));
+ if (chdir(cgi_dir) == -1) {
+ fprintf(stderr, "failed to chdir to %s: %s\n", cgi_dir, strerror(errno));
+ exit(1);
+ }
#endif
- execl(file, mybasename(file), NULL);
+ execl(file, cgi_basename, NULL);
fprintf(stderr, "execl(\"%s\", \"%s\", NULL): %s\n",
- file, mybasename(file), strerror(errno));
+ file, cgi_basename, strerror(errno));
exit(1);
- return NULL;
#endif
}
diff --git a/mailcap.c b/mailcap.c
index c0461df..f0c6242 100644
--- a/mailcap.c
+++ b/mailcap.c
@@ -72,7 +72,7 @@ searchMailcap(struct mailcap *table, char *type)
}
static int
-matchMailcapAttr(char *p, char *attr, int len, Str *value)
+matchMailcapAttr(char *p, char *attr, size_t len, Str *value)
{
int quoted;
char *q = NULL;
diff --git a/main.c b/main.c
index b421943..43e181c 100644
--- a/main.c
+++ b/main.c
@@ -1,6 +1,7 @@
/* $Id: main.c,v 1.270 2010/08/24 10:11:51 htrb Exp $ */
#define MAINPROGRAM
#include "fm.h"
+#include <stdio.h>
#include <signal.h>
#include <setjmp.h>
#include <sys/stat.h>
@@ -11,6 +12,9 @@
#include <sys/wait.h>
#endif
#include <time.h>
+#if defined(__CYGWIN__) && defined(USE_BINMODE_STREAM)
+#include <io.h>
+#endif
#include "terms.h"
#include "myctype.h"
#include "regex.h"
@@ -119,6 +123,8 @@ static int searchKeyNum(void);
#define help() fusage(stdout, 0)
#define usage() fusage(stderr, 1)
+int enable_inline_image; /* 1 == mlterm OSC 5379, 2 == sixel */
+
static void
fversion(FILE * f)
{
@@ -200,9 +206,11 @@ fusage(FILE * f, int err)
#ifdef USE_M17N
fprintf(f, " -I charset document charset\n");
fprintf(f, " -O charset display/output charset\n");
+#if 0 /* use -O{s|j|e} instead */
fprintf(f, " -e EUC-JP\n");
fprintf(f, " -s Shift_JIS\n");
fprintf(f, " -j JIS\n");
+#endif
#endif
fprintf(f, " -B load bookmark\n");
fprintf(f, " -bookmark file specify bookmark file\n");
@@ -214,7 +222,7 @@ fusage(FILE * f, int err)
#endif /* USE_COLOR */
fprintf(f,
" -N open URL of command line on each new tab\n");
- fprintf(f, " -F automatically render frame\n");
+ fprintf(f, " -F automatically render frames\n");
fprintf(f,
" -cols width specify column width (used with -dump)\n");
fprintf(f,
@@ -247,9 +255,13 @@ fusage(FILE * f, int err)
" -cookie use cookie (-no-cookie: don't use cookie)\n");
#endif /* USE_COOKIE */
fprintf(f, " -graph use DEC special graphics for border of table and menu\n");
- fprintf(f, " -no-graph use ACII character for border of table and menu\n");
+ fprintf(f, " -no-graph use ASCII character for border of table and menu\n");
+#if 1 /* pager requires -s */
+ fprintf(f, " -s squeeze multiple blank lines\n");
+#else
fprintf(f, " -S squeeze multiple blank lines\n");
- fprintf(f, " -W toggle wrap search mode\n");
+#endif
+ fprintf(f, " -W toggle search wrap mode\n");
fprintf(f, " -X don't use termcap init/deinit\n");
fprintf(f,
" -title[=TERM] set buffer name to terminal title string\n");
@@ -372,6 +384,13 @@ make_optional_header_string(char *s)
return hs;
}
+static void *
+die_oom(size_t bytes)
+{
+ fprintf(stderr, "Out of memory: %lu bytes unavailable!\n", (unsigned long)bytes);
+ exit(1);
+}
+
int
main(int argc, char **argv, char **envp)
{
@@ -397,7 +416,15 @@ main(int argc, char **argv, char **envp)
wc_ces CodePage;
#endif
#endif
+#if defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE)
+ char **getimage_args = NULL;
+#endif /* defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE) */
GC_INIT();
+#if (GC_VERSION_MAJOR>7) || ((GC_VERSION_MAJOR==7) && (GC_VERSION_MINOR>=2))
+ GC_set_oom_fn(die_oom);
+#else
+ GC_oom_fn = die_oom;
+#endif
#if defined(ENABLE_NLS) || (defined(USE_M17N) && defined(HAVE_LANGINFO_CODESET))
setlocale(LC_ALL, "");
#endif
@@ -418,6 +445,10 @@ main(int argc, char **argv, char **envp)
CurrentDir = currentdir();
CurrentPid = (int)getpid();
+#if defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE)
+ if (argv[0] && *argv[0])
+ MyProgramName = argv[0];
+#endif /* defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE) */
BookmarkFile = NULL;
config_file = NULL;
@@ -530,12 +561,14 @@ main(int argc, char **argv, char **envp)
PagerMax = atoi(argv[i]);
}
#ifdef USE_M17N
+#if 0 /* use -O{s|j|e} instead */
else if (!strcmp("-s", argv[i]))
DisplayCharset = WC_CES_SHIFT_JIS;
else if (!strcmp("-j", argv[i]))
DisplayCharset = WC_CES_ISO_2022_JP;
else if (!strcmp("-e", argv[i]))
DisplayCharset = WC_CES_EUC_JP;
+#endif
else if (!strncmp("-I", argv[i], 2)) {
if (argv[i][2] != '\0')
p = argv[i] + 2;
@@ -660,6 +693,12 @@ main(int argc, char **argv, char **envp)
}
}
#endif
+ else if (!strcmp("-ri", argv[i])) {
+ enable_inline_image = 1;
+ }
+ else if (!strcmp("-sixel", argv[i])) {
+ enable_inline_image = 2;
+ }
else if (!strcmp("-num", argv[i]))
showLineNum = TRUE;
else if (!strcmp("-no-proxy", argv[i]))
@@ -703,7 +742,11 @@ main(int argc, char **argv, char **envp)
accept_cookie = TRUE;
}
#endif /* USE_COOKIE */
+#if 1 /* pager requires -s */
+ else if (!strcmp("-s", argv[i]))
+#else
else if (!strcmp("-S", argv[i]))
+#endif
squeezeBlankLine = TRUE;
else if (!strcmp("-X", argv[i]))
Do_not_use_ti_te = TRUE;
@@ -735,6 +778,15 @@ main(int argc, char **argv, char **envp)
else if (!strcmp("-reqlog",argv[i])) {
w3m_reqlog=rcFile("request.log");
}
+#if defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE)
+ else if (!strcmp("-$$getimage", argv[i])) {
+ ++i;
+ getimage_args = argv + i;
+ i += 4;
+ if (i > argc)
+ usage();
+ }
+#endif /* defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE) */
else {
usage();
}
@@ -823,6 +875,30 @@ main(int argc, char **argv, char **envp)
if (w3m_backend)
backend();
+#if defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE)
+ if (getimage_args) {
+ char *image_url = conv_from_system(getimage_args[0]);
+ char *base_url = conv_from_system(getimage_args[1]);
+ ParsedURL base_pu;
+
+ parseURL2(base_url, &base_pu, NULL);
+ image_source = getimage_args[2];
+ newbuf = loadGeneralFile(image_url, &base_pu, NULL, 0, NULL);
+ if (!newbuf || !newbuf->real_type ||
+ strncasecmp(newbuf->real_type, "image/", 6))
+ unlink(getimage_args[2]);
+#if defined(HAVE_SYMLINK) && defined(HAVE_LSTAT)
+ symlink(getimage_args[2], getimage_args[3]);
+#else
+ {
+ FILE *f = fopen(getimage_args[3], "w");
+ if (f)
+ fclose(f);
+ }
+#endif
+ w3m_exit(0);
+ }
+#endif /* defined(DONT_CALL_GC_AFTER_FORK) && defined(USE_IMAGE) */
if (w3m_dump)
mySignal(SIGINT, SIG_IGN);
@@ -833,7 +909,12 @@ main(int argc, char **argv, char **envp)
mySignal(SIGPIPE, SigPipe);
#endif
+#if (GC_VERSION_MAJOR>7) || ((GC_VERSION_MAJOR==7) && (GC_VERSION_MINOR>=2))
+ orig_GC_warn_proc = GC_get_warn_proc();
+ GC_set_warn_proc(wrap_GC_warn_proc);
+#else
orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
+#endif
err_msg = Strnew();
if (load_argc == 0) {
/* no URL specified */
@@ -894,12 +975,17 @@ main(int argc, char **argv, char **envp)
if (i >= 0) {
SearchHeader = search_header;
DefaultType = default_type;
+ char *url;
+
+ url = load_argv[i];
+ if (getURLScheme(&url) == SCM_MISSING && !ArgvIsURL)
+ url = file_to_url(load_argv[i]);
+ else
+ url = url_encode(conv_from_system(load_argv[i]), NULL, 0);
if (w3m_dump == DUMP_HEAD) {
request = New(FormList);
request->method = FORM_METHOD_HEAD;
- newbuf =
- loadGeneralFile(load_argv[i], NULL, NO_REFERER, 0,
- request);
+ newbuf = loadGeneralFile(url, NULL, NO_REFERER, 0, request);
}
else {
if (post_file && i == 0) {
@@ -928,9 +1014,7 @@ main(int argc, char **argv, char **envp)
else {
request = NULL;
}
- newbuf =
- loadGeneralFile(load_argv[i], NULL, NO_REFERER, 0,
- request);
+ newbuf = loadGeneralFile(url, NULL, NO_REFERER, 0, request);
}
if (newbuf == NULL) {
/* FIXME: gettextize? */
@@ -945,7 +1029,7 @@ main(int argc, char **argv, char **envp)
break;
case SCM_LOCAL:
case SCM_LOCAL_CGI:
- unshiftHist(LoadHist, conv_from_system(load_argv[i]));
+ unshiftHist(LoadHist, url);
default:
pushHashHist(URLHist, parsedURL2Str(&newbuf->currentURL)->ptr);
break;
@@ -1183,13 +1267,13 @@ static void
dump_source(Buffer *buf)
{
FILE *f;
- char c;
+ int c;
if (buf->sourcefile == NULL)
return;
f = fopen(buf->sourcefile, "r");
if (f == NULL)
return;
- while (c = fgetc(f), !feof(f)) {
+ while ((c = fgetc(f)) != EOF) {
putchar(c);
}
fclose(f);
@@ -1246,6 +1330,12 @@ dump_extra(Buffer *buf)
#endif
}
+static int
+cmp_anchor_hseq(const void *a, const void *b)
+{
+ return (*((const Anchor **) a))->hseq - (*((const Anchor **) b))->hseq;
+}
+
static void
do_dump(Buffer *buf)
{
@@ -1266,18 +1356,20 @@ do_dump(Buffer *buf)
int i;
saveBuffer(buf, stdout, FALSE);
if (displayLinkNumber && buf->href) {
+ int nanchor = buf->href->nanchor;
printf("\nReferences:\n\n");
- for (i = 0; i < buf->href->nanchor; i++) {
- ParsedURL pu;
- static Str s = NULL;
- if (buf->href->anchors[i].slave)
+ Anchor **in_order = New_N(Anchor *, buf->href->nanchor);
+ for (i = 0; i < nanchor; i++)
+ in_order[i] = buf->href->anchors + i;
+ qsort(in_order, nanchor, sizeof(Anchor *), cmp_anchor_hseq);
+ for (i = 0; i < nanchor; i++) {
+ ParsedURL pu;
+ char *url;
+ if (in_order[i]->slave)
continue;
- parseURL2(buf->href->anchors[i].url, &pu, baseURL(buf));
- s = parsedURL2Str(&pu);
- if (DecodeURL)
- s = Strnew_charp(url_unquote_conv
- (s->ptr, Currentbuf->document_charset));
- printf("[%d] %s\n", buf->href->anchors[i].hseq + 1, s->ptr);
+ parseURL2(in_order[i]->url, &pu, baseURL(buf));
+ url = url_decode2(parsedURL2Str(&pu)->ptr, Currentbuf);
+ printf("[%d] %s\n", in_order[i]->hseq + 1, url);
}
}
}
@@ -1547,7 +1639,7 @@ nscroll(int n, int mode)
}
/* Move page forward */
-DEFUN(pgFore, NEXT_PAGE, "Move to next page")
+DEFUN(pgFore, NEXT_PAGE, "Scroll down one page")
{
if (vi_prec_num)
nscroll(searchKeyNum() * (Currentbuf->LINES - 1), B_NORMAL);
@@ -1557,7 +1649,7 @@ DEFUN(pgFore, NEXT_PAGE, "Move to next page")
}
/* Move page backward */
-DEFUN(pgBack, PREV_PAGE, "Move to previous page")
+DEFUN(pgBack, PREV_PAGE, "Scroll up one page")
{
if (vi_prec_num)
nscroll(-searchKeyNum() * (Currentbuf->LINES - 1), B_NORMAL);
@@ -1566,20 +1658,32 @@ DEFUN(pgBack, PREV_PAGE, "Move to previous page")
* (Currentbuf->LINES - 1)), prec_num ? B_SCROLL : B_NORMAL);
}
+/* Move half page forward */
+DEFUN(hpgFore, NEXT_HALF_PAGE, "Scroll down half a page")
+{
+ nscroll(searchKeyNum() * (Currentbuf->LINES / 2 - 1), B_NORMAL);
+}
+
+/* Move half page backward */
+DEFUN(hpgBack, PREV_HALF_PAGE, "Scroll up half a page")
+{
+ nscroll(-searchKeyNum() * (Currentbuf->LINES / 2 - 1), B_NORMAL);
+}
+
/* 1 line up */
-DEFUN(lup1, UP, "Scroll up one line")
+DEFUN(lup1, UP, "Scroll the screen up one line")
{
nscroll(searchKeyNum(), B_SCROLL);
}
/* 1 line down */
-DEFUN(ldown1, DOWN, "Scroll down one line")
+DEFUN(ldown1, DOWN, "Scroll the screen down one line")
{
nscroll(-searchKeyNum(), B_SCROLL);
}
/* move cursor position to the center of screen */
-DEFUN(ctrCsrV, CENTER_V, "Move to the center column")
+DEFUN(ctrCsrV, CENTER_V, "Center on cursor line")
{
int offsety;
if (Currentbuf->firstLine == NULL)
@@ -1598,7 +1702,7 @@ DEFUN(ctrCsrV, CENTER_V, "Move to the center column")
}
}
-DEFUN(ctrCsrH, CENTER_H, "Move to the center line")
+DEFUN(ctrCsrH, CENTER_H, "Center on cursor column")
{
int offsetx;
if (Currentbuf->firstLine == NULL)
@@ -1612,7 +1716,7 @@ DEFUN(ctrCsrH, CENTER_H, "Move to the center line")
}
/* Redraw screen */
-DEFUN(rdrwSc, REDRAW, "Redraw screen")
+DEFUN(rdrwSc, REDRAW, "Draw the screen anew")
{
clear();
arrangeCursor(Currentbuf);
@@ -1844,19 +1948,23 @@ srch_nxtprv(int reverse)
result = srchcore(SearchString, routine[reverse]);
if (result & SR_FOUND)
clear_mark(Currentbuf->currentLine);
+ else {
+ if (reverse == 0)
+ Currentbuf->pos -= 1;
+ }
displayBuffer(Currentbuf, B_NORMAL);
disp_srchresult(result, (reverse ? "Backward: " : "Forward: "),
SearchString);
}
/* Search next matching */
-DEFUN(srchnxt, SEARCH_NEXT, "Search next regexp")
+DEFUN(srchnxt, SEARCH_NEXT, "Continue search forward")
{
srch_nxtprv(0);
}
/* Search previous matching */
-DEFUN(srchprv, SEARCH_PREV, "Search previous regexp")
+DEFUN(srchprv, SEARCH_PREV, "Continue search backward")
{
srch_nxtprv(1);
}
@@ -1919,7 +2027,7 @@ DEFUN(col1R, RIGHT, "Shift screen one column right")
displayBuffer(Currentbuf, B_NORMAL);
}
-DEFUN(col1L, LEFT, "Shift screen one column")
+DEFUN(col1L, LEFT, "Shift screen one column left")
{
Buffer *buf = Currentbuf;
Line *l = buf->currentLine;
@@ -1960,7 +2068,7 @@ DEFUN(setEnv, SETENV, "Set environment variable")
displayBuffer(Currentbuf, B_NORMAL);
}
-DEFUN(pipeBuf, PIPE_BUF, "Send rendered document to pipe")
+DEFUN(pipeBuf, PIPE_BUF, "Pipe current buffer through a shell command and display output")
{
Buffer *buf;
char *cmd, *tmpf;
@@ -2006,7 +2114,7 @@ DEFUN(pipeBuf, PIPE_BUF, "Send rendered document to pipe")
}
/* Execute shell command and read output ac pipe. */
-DEFUN(pipesh, PIPE_SHELL, "Execute shell command and browse")
+DEFUN(pipesh, PIPE_SHELL, "Execute shell command and display output")
{
Buffer *buf;
char *cmd;
@@ -2037,7 +2145,7 @@ DEFUN(pipesh, PIPE_SHELL, "Execute shell command and browse")
}
/* Execute shell command and load entire output to buffer */
-DEFUN(readsh, READ_SHELL, "Execute shell command and load")
+DEFUN(readsh, READ_SHELL, "Execute shell command and display output")
{
Buffer *buf;
MySignalHandler(*prevtrap) ();
@@ -2074,7 +2182,7 @@ DEFUN(readsh, READ_SHELL, "Execute shell command and load")
}
/* Execute shell command */
-DEFUN(execsh, EXEC_SHELL SHELL, "Execute shell command")
+DEFUN(execsh, EXEC_SHELL SHELL, "Execute shell command and display output")
{
char *cmd;
@@ -2099,7 +2207,7 @@ DEFUN(execsh, EXEC_SHELL SHELL, "Execute shell command")
}
/* Load file */
-DEFUN(ldfile, LOAD, "Load local file")
+DEFUN(ldfile, LOAD, "Open local file in a new buffer")
{
char *fn;
@@ -2118,7 +2226,7 @@ DEFUN(ldfile, LOAD, "Load local file")
}
/* Load help file */
-DEFUN(ldhelp, HELP, "View help")
+DEFUN(ldhelp, HELP, "Show help panel")
{
#ifdef USE_HELP_CGI
char *lang;
@@ -2167,13 +2275,12 @@ _movL(int n)
displayBuffer(Currentbuf, B_NORMAL);
}
-DEFUN(movL, MOVE_LEFT,
- "Move cursor left (a half screen shift at the left edge)")
+DEFUN(movL, MOVE_LEFT, "Cursor left")
{
_movL(Currentbuf->COLS / 2);
}
-DEFUN(movL1, MOVE_LEFT1, "Move cursor left (1 columns shift at the left edge)")
+DEFUN(movL1, MOVE_LEFT1, "Cursor left. With edge touched, slide")
{
_movL(1);
}
@@ -2190,14 +2297,12 @@ _movD(int n)
displayBuffer(Currentbuf, B_NORMAL);
}
-DEFUN(movD, MOVE_DOWN,
- "Move cursor down (a half screen scroll at the end of screen)")
+DEFUN(movD, MOVE_DOWN, "Cursor down")
{
_movD((Currentbuf->LINES + 1) / 2);
}
-DEFUN(movD1, MOVE_DOWN1,
- "Move cursor down (1 line scroll at the end of screen)")
+DEFUN(movD1, MOVE_DOWN1, "Cursor down. With edge touched, slide")
{
_movD(1);
}
@@ -2214,13 +2319,12 @@ _movU(int n)
displayBuffer(Currentbuf, B_NORMAL);
}
-DEFUN(movU, MOVE_UP,
- "Move cursor up (a half screen scroll at the top of screen)")
+DEFUN(movU, MOVE_UP, "Cursor up")
{
_movU((Currentbuf->LINES + 1) / 2);
}
-DEFUN(movU1, MOVE_UP1, "Move cursor up (1 line scrol at the top of screen)")
+DEFUN(movU1, MOVE_UP1, "Cursor up. With edge touched, slide")
{
_movU(1);
}
@@ -2237,14 +2341,12 @@ _movR(int n)
displayBuffer(Currentbuf, B_NORMAL);
}
-DEFUN(movR, MOVE_RIGHT,
- "Move cursor right (a half screen shift at the right edge)")
+DEFUN(movR, MOVE_RIGHT, "Cursor right")
{
_movR(Currentbuf->COLS / 2);
}
-DEFUN(movR1, MOVE_RIGHT1,
- "Move cursor right (1 columns shift at the right edge)")
+DEFUN(movR1, MOVE_RIGHT1, "Cursor right. With edge touched, slide")
{
_movR(1);
}
@@ -2261,7 +2363,7 @@ DEFUN(movR1, MOVE_RIGHT1,
static wc_uint32
getChar(char *p)
{
- return wc_any_to_ucs(wtf_parse1(&p));
+ return wc_any_to_ucs(wtf_parse1((wc_uchar **)&p));
}
static int
@@ -2296,7 +2398,7 @@ prev_nonnull_line(Line *line)
return 0;
}
-DEFUN(movLW, PREV_WORD, "Move to previous word")
+DEFUN(movLW, PREV_WORD, "Move to the previous word")
{
char *lb;
Line *pline, *l;
@@ -2364,7 +2466,7 @@ next_nonnull_line(Line *line)
return 0;
}
-DEFUN(movRW, NEXT_WORD, "Move to next word")
+DEFUN(movRW, NEXT_WORD, "Move to the next word")
{
char *lb;
Line *pline, *l;
@@ -2442,19 +2544,19 @@ _quitfm(int confirm)
}
/* Quit */
-DEFUN(quitfm, ABORT EXIT, "Quit w3m without confirmation")
+DEFUN(quitfm, ABORT EXIT, "Quit at once")
{
_quitfm(FALSE);
}
/* Question and Quit */
-DEFUN(qquitfm, QUIT, "Quit w3m")
+DEFUN(qquitfm, QUIT, "Quit with confirmation request")
{
_quitfm(confirm_on_quit);
}
/* Select buffer */
-DEFUN(selBuf, SELECT, "Go to buffer selection panel")
+DEFUN(selBuf, SELECT, "Display buffer-stack panel")
{
Buffer *buf;
int ok;
@@ -2502,7 +2604,7 @@ DEFUN(selBuf, SELECT, "Go to buffer selection panel")
}
/* Suspend (on BSD), or run interactive shell (on SysV) */
-DEFUN(susp, INTERRUPT SUSPEND, "Stop loading document")
+DEFUN(susp, INTERRUPT SUSPEND, "Suspend w3m to background")
{
#ifndef SIGSTOP
char *shell;
@@ -2517,7 +2619,17 @@ DEFUN(susp, INTERRUPT SUSPEND, "Stop loading document")
shell = "/bin/sh";
system(shell);
#else /* SIGSTOP */
+#ifdef SIGTSTP
+ signal(SIGTSTP, SIG_DFL); /* just in case */
+ /*
+ * Note: If susp() was called from SIGTSTP handler,
+ * unblocking SIGTSTP would be required here.
+ * Currently not.
+ */
+ kill(0, SIGTSTP); /* stop whole job, not a single process */
+#else
kill((pid_t) 0, SIGSTOP);
+#endif
#endif /* SIGSTOP */
fmInit();
displayBuffer(Currentbuf, B_FORCE_REDRAW);
@@ -2550,7 +2662,7 @@ _goLine(char *l)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
-DEFUN(goLine, GOTO_LINE, "Go to specified line")
+DEFUN(goLine, GOTO_LINE, "Go to the specified line")
{
char *str = searchKeyData();
@@ -2575,7 +2687,7 @@ DEFUN(goLineL, END, "Go to the last line")
}
/* Go to the beginning of the line */
-DEFUN(linbeg, LINE_BEGIN, "Go to the beginning of line")
+DEFUN(linbeg, LINE_BEGIN, "Go to the beginning of the line")
{
if (Currentbuf->firstLine == NULL)
return;
@@ -2587,7 +2699,7 @@ DEFUN(linbeg, LINE_BEGIN, "Go to the beginning of line")
}
/* Go to the bottom of the line */
-DEFUN(linend, LINE_END, "Go to the end of line")
+DEFUN(linend, LINE_END, "Go to the end of the line")
{
if (Currentbuf->firstLine == NULL)
return;
@@ -2616,7 +2728,7 @@ cur_real_linenumber(Buffer *buf)
}
/* Run editor on the current buffer */
-DEFUN(editBf, EDIT, "Edit current document")
+DEFUN(editBf, EDIT, "Edit local source")
{
char *fn = Currentbuf->filename;
Str cmd;
@@ -2643,7 +2755,7 @@ DEFUN(editBf, EDIT, "Edit current document")
}
/* Run editor on the current screen */
-DEFUN(editScr, EDIT_SCREEN, "Edit currently rendered document")
+DEFUN(editScr, EDIT_SCREEN, "Edit rendered copy of document")
{
char *tmpf;
FILE *f;
@@ -2681,7 +2793,7 @@ DEFUN(_mark, MARK, "Set/unset mark")
}
/* Go to next mark */
-DEFUN(nextMk, NEXT_MARK, "Move to next word")
+DEFUN(nextMk, NEXT_MARK, "Go to the next mark")
{
Line *l;
int i;
@@ -2714,7 +2826,7 @@ DEFUN(nextMk, NEXT_MARK, "Move to next word")
}
/* Go to previous mark */
-DEFUN(prevMk, PREV_MARK, "Move to previous mark")
+DEFUN(prevMk, PREV_MARK, "Go to the previous mark")
{
Line *l;
int i;
@@ -2749,7 +2861,7 @@ DEFUN(prevMk, PREV_MARK, "Move to previous mark")
}
/* Mark place to which the regular expression matches */
-DEFUN(reMark, REG_MARK, "Set mark using regexp")
+DEFUN(reMark, REG_MARK, "Mark all occurences of a pattern")
{
Line *l;
char *str;
@@ -2804,12 +2916,15 @@ loadLink(char *url, char *target, char *referer, FormList *request)
union frameset_element *f_element = NULL;
int flag = 0;
ParsedURL *base, pu;
+ const int *no_referer_ptr;
message(Sprintf("loading %s", url)->ptr, 0, 0);
refresh();
+ no_referer_ptr = query_SCONF_NO_REFERER_FROM(&Currentbuf->currentURL);
base = baseURL(Currentbuf);
- if (base == NULL ||
+ if ((no_referer_ptr && *no_referer_ptr) ||
+ base == NULL ||
base->scheme == SCM_LOCAL || base->scheme == SCM_LOCAL_CGI)
referer = NO_REFERER;
if (referer == NULL)
@@ -2830,7 +2945,7 @@ loadLink(char *url, char *target, char *referer, FormList *request)
if (!on_target) /* open link as an indivisual page */
return loadNormalBuf(buf, TRUE);
- if (do_download) /* download (thus no need to render frame) */
+ if (do_download) /* download (thus no need to render frames) */
return loadNormalBuf(buf, FALSE);
if (target == NULL || /* no target specified (that means this page is not a frame page) */
@@ -2959,9 +3074,8 @@ handleMailto(char *url)
}
/* follow HREF link */
-DEFUN(followA, GOTO_LINK, "Go to current link")
+DEFUN(followA, GOTO_LINK, "Follow current hyperlink in a new buffer")
{
- Line *l;
Anchor *a;
ParsedURL u;
#ifdef USE_IMAGE
@@ -2971,7 +3085,6 @@ DEFUN(followA, GOTO_LINK, "Go to current link")
if (Currentbuf->firstLine == NULL)
return;
- l = Currentbuf->currentLine;
#ifdef USE_IMAGE
a = retrieveCurrentImg(Currentbuf);
@@ -3051,15 +3164,13 @@ bufferA(void)
}
/* view inline image */
-DEFUN(followI, VIEW_IMAGE, "View image")
+DEFUN(followI, VIEW_IMAGE, "Display image in viewer")
{
- Line *l;
Anchor *a;
Buffer *buf;
if (Currentbuf->firstLine == NULL)
return;
- l = Currentbuf->currentLine;
a = retrieveCurrentImg(Currentbuf);
if (a == NULL)
@@ -3309,7 +3420,6 @@ followForm(void)
static void
_followForm(int submit)
{
- Line *l;
Anchor *a, *a2;
char *p;
FormItemList *fi, *f2;
@@ -3318,7 +3428,6 @@ _followForm(int submit)
if (Currentbuf->firstLine == NULL)
return;
- l = Currentbuf->currentLine;
a = retrieveCurrentForm(Currentbuf);
if (a == NULL)
@@ -3423,7 +3532,6 @@ _followForm(int submit)
case FORM_INPUT_BUTTON:
do_submit:
tmp = Strnew();
- tmp2 = Strnew();
multipart = (fi->parent->method == FORM_METHOD_POST &&
fi->parent->enctype == FORM_ENCTYPE_MULTIPART);
query_from_followform(&tmp, fi, multipart);
@@ -3501,7 +3609,7 @@ _followForm(int submit)
}
/* go to the top anchor */
-DEFUN(topA, LINK_BEGIN, "Go to the first link")
+DEFUN(topA, LINK_BEGIN, "Move to the first hyperlink")
{
HmarkerList *hl = Currentbuf->hmarklist;
BufferPoint *po;
@@ -3534,7 +3642,7 @@ DEFUN(topA, LINK_BEGIN, "Go to the first link")
}
/* go to the last anchor */
-DEFUN(lastA, LINK_END, "Go to the last link")
+DEFUN(lastA, LINK_END, "Move to the last hyperlink")
{
HmarkerList *hl = Currentbuf->hmarklist;
BufferPoint *po;
@@ -3568,26 +3676,53 @@ DEFUN(lastA, LINK_END, "Go to the last link")
displayBuffer(Currentbuf, B_NORMAL);
}
+/* go to the nth anchor */
+DEFUN(nthA, LINK_N, "Go to the nth link")
+{
+ HmarkerList *hl = Currentbuf->hmarklist;
+ BufferPoint *po;
+ Anchor *an;
+
+ int n = searchKeyNum();
+ if (n < 0 || n > hl->nmark) return;
+
+ if (Currentbuf->firstLine == NULL)
+ return;
+ if (!hl || hl->nmark == 0)
+ return;
+
+ po = hl->marks + n-1;
+ an = retrieveAnchor(Currentbuf->href, po->line, po->pos);
+ if (an == NULL)
+ an = retrieveAnchor(Currentbuf->formitem, po->line, po->pos);
+ if (an == NULL) return;
+
+ gotoLine(Currentbuf, po->line);
+ Currentbuf->pos = po->pos;
+ arrangeCursor(Currentbuf);
+ displayBuffer(Currentbuf, B_NORMAL);
+}
+
/* go to the next anchor */
-DEFUN(nextA, NEXT_LINK, "Move to next link")
+DEFUN(nextA, NEXT_LINK, "Move to the next hyperlink")
{
_nextA(FALSE);
}
/* go to the previous anchor */
-DEFUN(prevA, PREV_LINK, "Move to previous link")
+DEFUN(prevA, PREV_LINK, "Move to the previous hyperlink")
{
_prevA(FALSE);
}
/* go to the next visited anchor */
-DEFUN(nextVA, NEXT_VISITED, "Move to next visited link")
+DEFUN(nextVA, NEXT_VISITED, "Move to the next visited hyperlink")
{
_nextA(TRUE);
}
/* go to the previous visited anchor */
-DEFUN(prevVA, PREV_VISITED, "Move to previous visited link")
+DEFUN(prevVA, PREV_VISITED, "Move to the previous visited hyperlink")
{
_prevA(TRUE);
}
@@ -3863,43 +3998,43 @@ nextY(int d)
}
/* go to the next left anchor */
-DEFUN(nextL, NEXT_LEFT, "Move to next left link")
+DEFUN(nextL, NEXT_LEFT, "Move left to the next hyperlink")
{
nextX(-1, 0);
}
/* go to the next left-up anchor */
-DEFUN(nextLU, NEXT_LEFT_UP, "Move to next left (or upward) link")
+DEFUN(nextLU, NEXT_LEFT_UP, "Move left or upward to the next hyperlink")
{
nextX(-1, -1);
}
/* go to the next right anchor */
-DEFUN(nextR, NEXT_RIGHT, "Move to next right link")
+DEFUN(nextR, NEXT_RIGHT, "Move right to the next hyperlink")
{
nextX(1, 0);
}
/* go to the next right-down anchor */
-DEFUN(nextRD, NEXT_RIGHT_DOWN, "Move to next right (or downward) link")
+DEFUN(nextRD, NEXT_RIGHT_DOWN, "Move right or downward to the next hyperlink")
{
nextX(1, 1);
}
/* go to the next downward anchor */
-DEFUN(nextD, NEXT_DOWN, "Move to next downward link")
+DEFUN(nextD, NEXT_DOWN, "Move downward to the next hyperlink")
{
nextY(1);
}
/* go to the next upward anchor */
-DEFUN(nextU, NEXT_UP, "Move to next upward link")
+DEFUN(nextU, NEXT_UP, "Move upward to the next hyperlink")
{
nextY(-1);
}
/* go to the next bufferr */
-DEFUN(nextBf, NEXT, "Move to next buffer")
+DEFUN(nextBf, NEXT, "Switch to the next buffer")
{
Buffer *buf;
int i;
@@ -3917,7 +4052,7 @@ DEFUN(nextBf, NEXT, "Move to next buffer")
}
/* go to the previous bufferr */
-DEFUN(prevBf, PREV, "Move to previous buffer")
+DEFUN(prevBf, PREV, "Switch to the previous buffer")
{
Buffer *buf;
int i;
@@ -3959,7 +4094,7 @@ checkBackBuffer(Buffer *buf)
}
/* delete current buffer and back to the previous buffer */
-DEFUN(backBf, BACK, "Back to previous buffer")
+DEFUN(backBf, BACK, "Close current buffer and return to the one below in stack")
{
Buffer *buf = Currentbuf->linkBuffer[LB_N_FRAME];
@@ -3970,7 +4105,7 @@ DEFUN(backBf, BACK, "Back to previous buffer")
}
else
/* FIXME: gettextize? */
- disp_message("Can't back...", TRUE);
+ disp_message("Can't go back...", TRUE);
return;
}
@@ -4008,8 +4143,7 @@ DEFUN(backBf, BACK, "Back to previous buffer")
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
-DEFUN(deletePrevBuf, DELETE_PREVBUF,
- "Delete previous buffer (mainly for local-CGI)")
+DEFUN(deletePrevBuf, DELETE_PREVBUF, "Delete previous buffer (mainly for local CGI-scripts)")
{
Buffer *buf = Currentbuf->nextBuffer;
if (buf)
@@ -4055,6 +4189,7 @@ goURL0(char *prompt, int relative)
char *url, *referer;
ParsedURL p_url, *current;
Buffer *cur_buf = Currentbuf;
+ const int *no_referer_ptr;
url = searchKeyData();
if (url == NULL) {
@@ -4064,11 +4199,8 @@ goURL0(char *prompt, int relative)
current = baseURL(Currentbuf);
if (current) {
char *c_url = parsedURL2Str(current)->ptr;
- if (DefaultURLString == DEFAULT_URL_CURRENT) {
- url = c_url;
- if (DecodeURL)
- url = url_unquote_conv(url, 0);
- }
+ if (DefaultURLString == DEFAULT_URL_CURRENT)
+ url = url_decode2(c_url, NULL);
else
pushHist(hist, c_url);
}
@@ -4077,11 +4209,8 @@ goURL0(char *prompt, int relative)
char *a_url;
parseURL2(a->url, &p_url, current);
a_url = parsedURL2Str(&p_url)->ptr;
- if (DefaultURLString == DEFAULT_URL_LINK) {
- url = a_url;
- if (DecodeURL)
- url = url_unquote_conv(url, Currentbuf->document_charset);
- }
+ if (DefaultURLString == DEFAULT_URL_LINK)
+ url = url_decode2(a_url, Currentbuf);
else
pushHist(hist, a_url);
}
@@ -4089,15 +4218,22 @@ goURL0(char *prompt, int relative)
if (url != NULL)
SKIP_BLANKS(url);
}
-#ifdef USE_M17N
- if (url != NULL) {
- if ((relative || *url == '#') && Currentbuf->document_charset)
- url = wc_conv_strict(url, InnerCharset,
- Currentbuf->document_charset)->ptr;
+ if (relative) {
+ no_referer_ptr = query_SCONF_NO_REFERER_FROM(&Currentbuf->currentURL);
+ current = baseURL(Currentbuf);
+ if ((no_referer_ptr && *no_referer_ptr) ||
+ current == NULL ||
+ current->scheme == SCM_LOCAL || current->scheme == SCM_LOCAL_CGI)
+ referer = NO_REFERER;
else
- url = conv_to_system(url);
+ referer = parsedURL2Str(&Currentbuf->currentURL)->ptr;
+ url = url_encode(url, current, Currentbuf->document_charset);
+ }
+ else {
+ current = NULL;
+ referer = NULL;
+ url = url_encode(url, NULL, 0);
}
-#endif
if (url == NULL || *url == '\0') {
displayBuffer(Currentbuf, B_FORCE_REDRAW);
return;
@@ -4106,14 +4242,6 @@ goURL0(char *prompt, int relative)
gotoLabel(url + 1);
return;
}
- if (relative) {
- current = baseURL(Currentbuf);
- referer = parsedURL2Str(&Currentbuf->currentURL)->ptr;
- }
- else {
- current = NULL;
- referer = NULL;
- }
parseURL2(url, &p_url, current);
pushHashHist(URLHist, parsedURL2Str(&p_url)->ptr);
cmd_loadURL(url, current, referer, NULL);
@@ -4121,12 +4249,12 @@ goURL0(char *prompt, int relative)
pushHashHist(URLHist, parsedURL2Str(&Currentbuf->currentURL)->ptr);
}
-DEFUN(goURL, GOTO, "Go to URL")
+DEFUN(goURL, GOTO, "Open specified document in a new buffer")
{
goURL0("Goto URL: ", FALSE);
}
-DEFUN(gorURL, GOTO_RELATIVE, "Go to relative URL")
+DEFUN(gorURL, GOTO_RELATIVE, "Go to relative address")
{
goURL0("Goto relative URL: ", TRUE);
}
@@ -4151,14 +4279,14 @@ cmd_loadBuffer(Buffer *buf, int prop, int linkid)
}
/* load bookmark */
-DEFUN(ldBmark, BOOKMARK VIEW_BOOKMARK, "Read bookmark")
+DEFUN(ldBmark, BOOKMARK VIEW_BOOKMARK, "View bookmarks")
{
cmd_loadURL(BookmarkFile, NULL, NO_REFERER, NULL);
}
/* Add current to bookmark */
-DEFUN(adBmark, ADD_BOOKMARK, "Add current page to bookmark")
+DEFUN(adBmark, ADD_BOOKMARK, "Add current page to bookmarks")
{
Str tmp;
FormList *request;
@@ -4188,7 +4316,7 @@ DEFUN(adBmark, ADD_BOOKMARK, "Add current page to bookmark")
}
/* option setting */
-DEFUN(ldOpt, OPTIONS, "Option setting panel")
+DEFUN(ldOpt, OPTIONS, "Display options setting panel")
{
cmd_loadBuffer(load_option_panel(), BP_NO_URL, LB_NOLINK);
}
@@ -4223,7 +4351,7 @@ DEFUN(msgs, MSGS, "Display error messages")
}
/* page info */
-DEFUN(pginfo, INFO, "View info of current document")
+DEFUN(pginfo, INFO, "Display information about the current document")
{
Buffer *buf;
@@ -4291,7 +4419,7 @@ follow_map(struct parsed_tagarg *arg)
#ifdef USE_MENU
/* link menu */
-DEFUN(linkMn, LINK_MENU, "Popup link element menu")
+DEFUN(linkMn, LINK_MENU, "Pop up link element menu")
{
LinkList *l = link_menu(Currentbuf);
ParsedURL p_url;
@@ -4329,26 +4457,25 @@ anchorMn(Anchor *(*menu_func) (Buffer *), int go)
}
/* accesskey */
-DEFUN(accessKey, ACCESSKEY, "Popup acceskey menu")
+DEFUN(accessKey, ACCESSKEY, "Pop up accesskey menu")
{
anchorMn(accesskey_menu, TRUE);
}
/* list menu */
-DEFUN(listMn, LIST_MENU, "Popup link list menu and go to selected link")
+DEFUN(listMn, LIST_MENU, "Pop up menu for hyperlinks to browse to")
{
anchorMn(list_menu, TRUE);
}
-DEFUN(movlistMn, MOVE_LIST_MENU,
- "Popup link list menu and move cursor to selected link")
+DEFUN(movlistMn, MOVE_LIST_MENU, "Pop up menu to navigate between hyperlinks")
{
anchorMn(list_menu, FALSE);
}
#endif
/* link,anchor,image list */
-DEFUN(linkLst, LIST, "Show all links and images")
+DEFUN(linkLst, LIST, "Show all URLs referenced")
{
Buffer *buf;
@@ -4375,14 +4502,14 @@ DEFUN(cooLst, COOKIE, "View cookie list")
#ifdef USE_HISTORY
/* History page */
-DEFUN(ldHist, HISTORY, "View history of URL")
+DEFUN(ldHist, HISTORY, "Show browsing history")
{
cmd_loadBuffer(historyBuffer(URLHist), BP_NO_URL, LB_NOLINK);
}
#endif /* USE_HISTORY */
/* download HREF link */
-DEFUN(svA, SAVE_LINK, "Save link to file")
+DEFUN(svA, SAVE_LINK, "Save hyperlink target")
{
CurrentKeyData = NULL; /* not allowed in w3m-control: */
do_download = TRUE;
@@ -4391,7 +4518,7 @@ DEFUN(svA, SAVE_LINK, "Save link to file")
}
/* download IMG link */
-DEFUN(svI, SAVE_IMAGE, "Save image to file")
+DEFUN(svI, SAVE_IMAGE, "Save inline image")
{
CurrentKeyData = NULL; /* not allowed in w3m-control: */
do_download = TRUE;
@@ -4400,7 +4527,7 @@ DEFUN(svI, SAVE_IMAGE, "Save image to file")
}
/* save buffer */
-DEFUN(svBuf, PRINT SAVE_SCREEN, "Save rendered document to file")
+DEFUN(svBuf, PRINT SAVE_SCREEN, "Save rendered document")
{
char *qfile = NULL, *file;
FILE *f;
@@ -4449,7 +4576,7 @@ DEFUN(svBuf, PRINT SAVE_SCREEN, "Save rendered document to file")
}
/* save source */
-DEFUN(svSrc, DOWNLOAD SAVE, "Save document source to file")
+DEFUN(svSrc, DOWNLOAD SAVE, "Save document source")
{
char *file;
@@ -4510,8 +4637,7 @@ _peekURL(int only_img)
s = parsedURL2Str(&pu);
}
if (DecodeURL)
- s = Strnew_charp(url_unquote_conv
- (s->ptr, Currentbuf->document_charset));
+ s = Strnew_charp(url_decode2(s->ptr, Currentbuf));
#ifdef USE_M17N
s = checkType(s, &pp, NULL);
p = NewAtom_N(Lineprop, s->length);
@@ -4529,13 +4655,13 @@ _peekURL(int only_img)
}
/* peek URL */
-DEFUN(peekURL, PEEK_LINK, "Peek link URL")
+DEFUN(peekURL, PEEK_LINK, "Show target address")
{
_peekURL(0);
}
/* peek URL of image */
-DEFUN(peekIMG, PEEK_IMG, "Peek image URL")
+DEFUN(peekIMG, PEEK_IMG, "Show image address")
{
_peekURL(1);
}
@@ -4549,7 +4675,7 @@ currentURL(void)
return parsedURL2Str(&Currentbuf->currentURL);
}
-DEFUN(curURL, PEEK, "Peek current URL")
+DEFUN(curURL, PEEK, "Show current address")
{
static Str s = NULL;
#ifdef USE_M17N
@@ -4570,7 +4696,7 @@ DEFUN(curURL, PEEK, "Peek current URL")
offset = 0;
s = currentURL();
if (DecodeURL)
- s = Strnew_charp(url_unquote_conv(s->ptr, 0));
+ s = Strnew_charp(url_decode2(s->ptr, NULL));
#ifdef USE_M17N
s = checkType(s, &pp, NULL);
p = NewAtom_N(Lineprop, s->length);
@@ -4588,7 +4714,7 @@ DEFUN(curURL, PEEK, "Peek current URL")
}
/* view HTML source */
-DEFUN(vwSrc, SOURCE VIEW, "View HTML source")
+DEFUN(vwSrc, SOURCE VIEW, "Toggle between HTML shown or processed")
{
Buffer *buf;
@@ -4679,7 +4805,7 @@ DEFUN(vwSrc, SOURCE VIEW, "View HTML source")
}
/* reload */
-DEFUN(reload, RELOAD, "Reload buffer")
+DEFUN(reload, RELOAD, "Load current document anew")
{
Buffer *buf, *fbuf = NULL, sbuf;
#ifdef USE_M17N
@@ -4804,7 +4930,7 @@ DEFUN(reload, RELOAD, "Reload buffer")
}
/* reshape */
-DEFUN(reshape, RESHAPE, "Re-render buffer")
+DEFUN(reshape, RESHAPE, "Re-render document")
{
Currentbuf->need_reshape = TRUE;
reshapeBuffer(Currentbuf);
@@ -4846,7 +4972,7 @@ change_charset(struct parsed_tagarg *arg)
_docCSet(charset);
}
-DEFUN(docCSet, CHARSET, "Change the current document charset")
+DEFUN(docCSet, CHARSET, "Change the character encoding for the current document")
{
char *cs;
wc_ces charset;
@@ -4864,7 +4990,7 @@ DEFUN(docCSet, CHARSET, "Change the current document charset")
_docCSet(charset);
}
-DEFUN(defCSet, DEFAULT_CHARSET, "Change the default document charset")
+DEFUN(defCSet, DEFAULT_CHARSET, "Change the default character encoding")
{
char *cs;
wc_ces charset;
@@ -4915,13 +5041,13 @@ chkURLBuffer(Buffer *buf)
buf->check_url |= CHK_URL;
}
-DEFUN(chkURL, MARK_URL, "Mark URL-like strings as anchors")
+DEFUN(chkURL, MARK_URL, "Turn URL-like strings into hyperlinks")
{
chkURLBuffer(Currentbuf);
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
-DEFUN(chkWORD, MARK_WORD, "Mark current word as anchor")
+DEFUN(chkWORD, MARK_WORD, "Turn current word into hyperlink")
{
char *p;
int spos, epos;
@@ -4948,15 +5074,15 @@ chkNMIDBuffer(Buffer *buf)
buf->check_url |= CHK_NMID;
}
-DEFUN(chkNMID, MARK_MID, "Mark Message-ID-like strings as anchors")
+DEFUN(chkNMID, MARK_MID, "Turn Message-ID-like strings into hyperlinks")
{
chkNMIDBuffer(Currentbuf);
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
#endif /* USE_NNTP */
-/* render frame */
-DEFUN(rFrame, FRAME, "Render frame")
+/* render frames */
+DEFUN(rFrame, FRAME, "Toggle rendering HTML frames")
{
Buffer *buf;
@@ -5010,6 +5136,24 @@ invoke_browser(char *url)
case 3:
browser = ExtBrowser3;
break;
+ case 4:
+ browser = ExtBrowser4;
+ break;
+ case 5:
+ browser = ExtBrowser5;
+ break;
+ case 6:
+ browser = ExtBrowser6;
+ break;
+ case 7:
+ browser = ExtBrowser7;
+ break;
+ case 8:
+ browser = ExtBrowser8;
+ break;
+ case 9:
+ browser = ExtBrowser9;
+ break;
}
if (browser == NULL || *browser == '\0') {
browser = inputStr("Browse command: ", NULL);
@@ -5038,7 +5182,7 @@ invoke_browser(char *url)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
-DEFUN(extbrz, EXTERN, "Execute external browser")
+DEFUN(extbrz, EXTERN, "Display using an external browser")
{
if (Currentbuf->bufferprop & BP_INTERNAL) {
/* FIXME: gettextize? */
@@ -5055,7 +5199,7 @@ DEFUN(extbrz, EXTERN, "Execute external browser")
invoke_browser(parsedURL2Str(&Currentbuf->currentURL)->ptr);
}
-DEFUN(linkbrz, EXTERN_LINK, "View current link using external browser")
+DEFUN(linkbrz, EXTERN_LINK, "Display target using an external browser")
{
Anchor *a;
ParsedURL pu;
@@ -5070,7 +5214,7 @@ DEFUN(linkbrz, EXTERN_LINK, "View current link using external browser")
}
/* show current line number and number of lines in the entire document */
-DEFUN(curlno, LINE_INFO, "Show current line number")
+DEFUN(curlno, LINE_INFO, "Display current position in document")
{
Line *l = Currentbuf->currentLine;
Str tmp;
@@ -5362,7 +5506,7 @@ process_mouse(int btn, int x, int y)
}
}
-DEFUN(msToggle, MOUSE_TOGGLE, "Toggle activity of mouse")
+DEFUN(msToggle, MOUSE_TOGGLE, "Toggle mouse support")
{
if (use_mouse) {
use_mouse = FALSE;
@@ -5398,6 +5542,60 @@ DEFUN(mouse, MOUSE, "mouse operation")
process_mouse(btn, x, y);
}
+DEFUN(sgrmouse, SGRMOUSE, "SGR 1006 mouse operation")
+{
+ int btn = 0, x = 0, y = 0;
+ unsigned char c;
+
+ do {
+ c = getch();
+ if (IS_DIGIT(c))
+ btn = btn * 10 + c - '0';
+ else if (c == ';')
+ break;
+ else
+ return;
+ } while (1);
+
+#if defined(__CYGWIN__) && CYGWIN_VERSION_DLL_MAJOR < 1005
+ if (cygwin_mouse_btn_swapped) {
+ if (btn == MOUSE_BTN2_DOWN)
+ btn = MOUSE_BTN3_DOWN;
+ else if (btn == MOUSE_BTN3_DOWN)
+ btn = MOUSE_BTN2_DOWN;
+ };
+#endif
+
+ do {
+ c = getch();
+ if (IS_DIGIT(c))
+ x = x * 10 + c - '0';
+ else if (c == ';')
+ break;
+ else
+ return;
+ } while (1);
+ if (x>0) x--;
+
+ do {
+ c = getch();
+ if (IS_DIGIT(c))
+ y = y * 10 + c - '0';
+ else if (c == 'M')
+ break;
+ else if (c == 'm') {
+ btn |= 3;
+ break;
+ } else
+ return;
+ } while (1);
+ if (y>0) y--;
+
+ if (x < 0 || x >= COLS || y < 0 || y > LASTLINE)
+ return;
+ process_mouse(btn, x, y);
+}
+
#ifdef USE_GPM
int
gpm_process_mouse(Gpm_Event * event, void *data)
@@ -5451,7 +5649,7 @@ sysm_process_mouse(int x, int y, int nbs, int obs)
}
#endif /* USE_SYSMOUSE */
-DEFUN(movMs, MOVE_MOUSE, "Move cursor to mouse cursor (for mouse action)")
+DEFUN(movMs, MOVE_MOUSE, "Move cursor to mouse pointer")
{
if (!mouse_action.in_action)
return;
@@ -5473,7 +5671,7 @@ DEFUN(movMs, MOVE_MOUSE, "Move cursor to mouse cursor (for mouse action)")
#define FRAME_WIDTH 1
#endif
-DEFUN(menuMs, MENU_MOUSE, "Popup menu at mouse cursor (for mouse action)")
+DEFUN(menuMs, MENU_MOUSE, "Pop up menu at mouse pointer")
{
if (!mouse_action.in_action)
return;
@@ -5490,7 +5688,7 @@ DEFUN(menuMs, MENU_MOUSE, "Popup menu at mouse cursor (for mouse action)")
}
#endif
-DEFUN(tabMs, TAB_MOUSE, "Move to tab on mouse cursor (for mouse action)")
+DEFUN(tabMs, TAB_MOUSE, "Select tab by mouse action")
{
TabBuffer *tab;
@@ -5503,8 +5701,7 @@ DEFUN(tabMs, TAB_MOUSE, "Move to tab on mouse cursor (for mouse action)")
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
-DEFUN(closeTMs, CLOSE_TAB_MOUSE,
- "Close tab on mouse cursor (for mouse action)")
+DEFUN(closeTMs, CLOSE_TAB_MOUSE, "Close tab at mouse pointer")
{
TabBuffer *tab;
@@ -5518,12 +5715,12 @@ DEFUN(closeTMs, CLOSE_TAB_MOUSE,
}
#endif /* USE_MOUSE */
-DEFUN(dispVer, VERSION, "Display version of w3m")
+DEFUN(dispVer, VERSION, "Display the version of w3m")
{
disp_message(Sprintf("w3m version %s", w3m_version)->ptr, TRUE);
}
-DEFUN(wrapToggle, WRAP_TOGGLE, "Toggle wrap search mode")
+DEFUN(wrapToggle, WRAP_TOGGLE, "Toggle wrapping mode in searches")
{
if (WrapSearch) {
WrapSearch = FALSE;
@@ -5604,7 +5801,7 @@ execdict(char *word)
disp_message("Execution failed", TRUE);
return;
}
- else {
+ else if (buf != NO_BUFFER) {
buf->filename = w;
buf->buffername = Sprintf("%s %s", DICTBUFFERNAME, word)->ptr;
if (buf->type == NULL)
@@ -5671,7 +5868,7 @@ set_buffer_environ(Buffer *buf)
set_environ("W3M_CURRENT_FORM", form2str((FormItemList *)a->url));
else
set_environ("W3M_CURRENT_FORM", "");
- set_environ("W3M_CURRENT_LINE", Sprintf("%d",
+ set_environ("W3M_CURRENT_LINE", Sprintf("%ld",
l->real_linenumber)->ptr);
set_environ("W3M_CURRENT_COLUMN", Sprintf("%d",
buf->currentColumn +
@@ -5747,8 +5944,14 @@ deleteFiles()
Firstbuf = buf;
}
}
- while ((f = popText(fileToDelete)) != NULL)
+ while ((f = popText(fileToDelete)) != NULL) {
unlink(f);
+ if (enable_inline_image == 2 && strcmp(f+strlen(f)-4, ".gif") == 0) {
+ Str firstframe = Strnew_charp(f);
+ Strcat_charp(firstframe, "-1");
+ unlink(firstframe->ptr);
+ }
+ }
}
void
@@ -5768,11 +5971,18 @@ w3m_exit(int i)
#endif
#ifdef __MINGW32_VERSION
WSACleanup();
+#endif
+#ifdef HAVE_MKDTEMP
+ if (no_rc_dir && tmp_dir != rc_dir)
+ if (rmdir(tmp_dir) != 0) {
+ fprintf(stderr, "Can't remove temporary directory (%s)!\n", tmp_dir);
+ exit(1);
+ }
#endif
exit(i);
}
-DEFUN(execCmd, COMMAND, "Execute w3m command(s)")
+DEFUN(execCmd, COMMAND, "Invoke w3m function(s)")
{
char *data, *p;
int cmd;
@@ -5900,7 +6110,7 @@ setAlarmEvent(AlarmEvent * event, int sec, short status, int cmd, void *data)
}
#endif
-DEFUN(reinit, REINIT, "Reload configuration files")
+DEFUN(reinit, REINIT, "Reload configuration file")
{
char *resource = searchKeyData();
@@ -5969,8 +6179,7 @@ DEFUN(reinit, REINIT, "Reload configuration files")
ptr, FALSE);
}
-DEFUN(defKey, DEFINE_KEY,
- "Define a binding between a key stroke and a user command")
+DEFUN(defKey, DEFINE_KEY, "Define a binding between a key stroke combination and a command")
{
char *data;
@@ -6031,7 +6240,7 @@ _newT(void)
nTab++;
}
-DEFUN(newT, NEW_TAB, "Open new tab")
+DEFUN(newT, NEW_TAB, "Open a new tab (with current document)")
{
_newT();
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
@@ -6142,7 +6351,7 @@ deleteTab(TabBuffer * tab)
return FirstTab;
}
-DEFUN(closeT, CLOSE_TAB, "Close current tab")
+DEFUN(closeT, CLOSE_TAB, "Close tab")
{
TabBuffer *tab;
@@ -6157,7 +6366,7 @@ DEFUN(closeT, CLOSE_TAB, "Close current tab")
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
}
-DEFUN(nextT, NEXT_TAB, "Move to next tab")
+DEFUN(nextT, NEXT_TAB, "Switch to the next tab")
{
int i;
@@ -6172,7 +6381,7 @@ DEFUN(nextT, NEXT_TAB, "Move to next tab")
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
}
-DEFUN(prevT, PREV_TAB, "Move to previous tab")
+DEFUN(prevT, PREV_TAB, "Switch to the previous tab")
{
int i;
@@ -6236,7 +6445,7 @@ followTab(TabBuffer * tab)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
-DEFUN(tabA, TAB_LINK, "Open current link on new tab")
+DEFUN(tabA, TAB_LINK, "Follow current hyperlink in a new tab")
{
followTab(prec_num ? numTab(PREC_NUM) : NULL);
}
@@ -6277,13 +6486,13 @@ tabURL0(TabBuffer * tab, char *prompt, int relative)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
-DEFUN(tabURL, TAB_GOTO, "Open URL on new tab")
+DEFUN(tabURL, TAB_GOTO, "Open specified document in a new tab")
{
tabURL0(prec_num ? numTab(PREC_NUM) : NULL,
"Goto URL on new tab: ", FALSE);
}
-DEFUN(tabrURL, TAB_GOTO_RELATIVE, "Open relative URL on new tab")
+DEFUN(tabrURL, TAB_GOTO_RELATIVE, "Open relative address in a new tab")
{
tabURL0(prec_num ? numTab(PREC_NUM) : NULL,
"Goto relative URL on new tab: ", TRUE);
@@ -6328,7 +6537,7 @@ moveTab(TabBuffer * t, TabBuffer * t2, int right)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
-DEFUN(tabR, TAB_RIGHT, "Move current tab right")
+DEFUN(tabR, TAB_RIGHT, "Move right along the tab bar")
{
TabBuffer *tab;
int i;
@@ -6338,7 +6547,7 @@ DEFUN(tabR, TAB_RIGHT, "Move current tab right")
moveTab(CurrentTab, tab ? tab : LastTab, TRUE);
}
-DEFUN(tabL, TAB_LEFT, "Move current tab left")
+DEFUN(tabL, TAB_LEFT, "Move left along the tab bar")
{
TabBuffer *tab;
int i;
@@ -6547,7 +6756,7 @@ stopDownload(void)
}
/* download panel */
-DEFUN(ldDL, DOWNLOAD_LIST, "Display download list panel")
+DEFUN(ldDL, DOWNLOAD_LIST, "Display downloads panel")
{
Buffer *buf;
int replace = FALSE, new_tab = FALSE;
diff --git a/map.c b/map.c
index 90aa35a..bb240ea 100644
--- a/map.c
+++ b/map.c
@@ -279,7 +279,7 @@ follow_map_panel(Buffer *buf, char *name)
p = parsedURL2Str(&pu)->ptr;
q = html_quote(p);
if (DecodeURL)
- p = html_quote(url_unquote_conv(p, buf->document_charset));
+ p = html_quote(url_decode2(p, buf));
else
p = q;
Strcat_m_charp(mappage, "<tr valign=top><td><a href=\"", q, "\">",
@@ -417,10 +417,7 @@ append_map_info(Buffer *buf, Str tmp, FormItemList *fi)
continue;
parseURL2(a->url, &pu, baseURL(buf));
q = html_quote(parsedURL2Str(&pu)->ptr);
- if (DecodeURL)
- p = html_quote(url_unquote_conv(a->url, buf->document_charset));
- else
- p = html_quote(a->url);
+ p = html_quote(url_decode2(a->url, buf));
Strcat_m_charp(tmp, "<tr valign=top><td> <td><a href=\"",
q, "\">",
html_quote(*a->alt ? a->alt : mybasename(a->url)),
@@ -457,10 +454,8 @@ append_link_info(Buffer *buf, Str html, LinkList * link)
Strcat_charp(html, "[Rev]");
if (!l->url)
url = "(empty)";
- else if (DecodeURL)
- url = html_quote(url_unquote_conv(l->url, buf->document_charset));
else
- url = html_quote(l->url);
+ url = html_quote(url_decode2(l->url, buf));
Strcat_m_charp(html, "<td>", url, NULL);
if (l->ctype)
Strcat_m_charp(html, " (", html_quote(l->ctype), ")", NULL);
@@ -498,8 +493,7 @@ append_frame_info(Buffer *buf, Str html, struct frameset *set, int level)
Strcat_charp(html, p);
}
if (DecodeURL)
- p = html_quote(url_unquote_conv(frame.body->url,
- buf->document_charset));
+ p = html_quote(url_decode2(frame.body->url, buf));
else
p = q;
Strcat_m_charp(html, " ", p, "</a></pre_int><br>\n", NULL);
@@ -550,9 +544,7 @@ page_info_panel(Buffer *buf)
#ifdef USE_M17N
Strcat_charp(tmp, "<form method=internal action=charset>");
#endif
- p = parsedURL2Str(&buf->currentURL)->ptr;
- if (DecodeURL)
- p = url_unquote_conv(p, 0);
+ p = url_decode2(parsedURL2Str(&buf->currentURL)->ptr, NULL);
Strcat_m_charp(tmp, "<table cellpadding=0>",
"<tr valign=top><td nowrap>Title<td>",
html_quote(buf->buffername),
@@ -581,7 +573,7 @@ page_info_panel(Buffer *buf)
"<tr valign=top><td nowrap>Number of lines<td>",
Sprintf("%d", all)->ptr,
"<tr valign=top><td nowrap>Transferred bytes<td>",
- Sprintf("%d", buf->trbyte)->ptr, NULL);
+ Sprintf("%lu", (unsigned long)buf->trbyte)->ptr, NULL);
a = retrieveCurrentAnchor(buf);
if (a != NULL) {
@@ -589,7 +581,7 @@ page_info_panel(Buffer *buf)
p = parsedURL2Str(&pu)->ptr;
q = html_quote(p);
if (DecodeURL)
- p = html_quote(url_unquote_conv(p, buf->document_charset));
+ p = html_quote(url_decode2(p, buf));
else
p = q;
Strcat_m_charp(tmp,
@@ -602,7 +594,7 @@ page_info_panel(Buffer *buf)
p = parsedURL2Str(&pu)->ptr;
q = html_quote(p);
if (DecodeURL)
- p = html_quote(url_unquote_conv(p, buf->document_charset));
+ p = html_quote(url_decode2(p, buf));
else
p = q;
Strcat_m_charp(tmp,
@@ -613,10 +605,7 @@ page_info_panel(Buffer *buf)
if (a != NULL) {
FormItemList *fi = (FormItemList *)a->url;
p = form2str(fi);
- if (DecodeURL)
- p = html_quote(url_unquote_conv(p, buf->document_charset));
- else
- p = html_quote(p);
+ p = html_quote(url_decode2(p, buf));
Strcat_m_charp(tmp,
"<tr valign=top><td nowrap>Method/type of current form <td>",
p, NULL);
diff --git a/matrix.c b/matrix.c
index 64fd0ad..bc7a5be 100644
--- a/matrix.c
+++ b/matrix.c
@@ -34,18 +34,12 @@
#include "config.h"
#include "matrix.h"
-#include <gc.h>
+#include "alloc.h"
/*
* Macros from "fm.h".
*/
-#define New(type) ((type*)GC_MALLOC(sizeof(type)))
-#define NewAtom(type) ((type*)GC_MALLOC_ATOMIC(sizeof(type)))
-#define New_N(type,n) ((type*)GC_MALLOC((n)*sizeof(type)))
-#define NewAtom_N(type,n) ((type*)GC_MALLOC_ATOMIC((n)*sizeof(type)))
-#define Renew_N(type,ptr,n) ((type*)GC_REALLOC((ptr),(n)*sizeof(type)))
-
#define SWAPD(a,b) { double tmp = a; a = b; b = tmp; }
#define SWAPI(a,b) { int tmp = a; a = b; b = tmp; }
diff --git a/menu.c b/menu.c
index 774b1bd..b0c890d 100644
--- a/menu.c
+++ b/menu.c
@@ -57,6 +57,7 @@ static int mCancel(char c);
static int mClose(char c);
static int mSusp(char c);
static int mMouse(char c);
+static int mSgrMouse(char c);
static int mSrchF(char c);
static int mSrchB(char c);
static int mSrchN(char c);
@@ -116,15 +117,15 @@ static int (*MenuEscKeymap[128]) (char c) = {
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
-/* O */
+/* O */
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mEscB,
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
-/* [ */
+/* [ */
mNull, mNull, mNull, mEscB, mNull, mNull, mNull, mNull,
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
-/* v */
+/* v */
mNull, mNull, mNull, mNull, mNull, mNull, mPrev, mNull,
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
};
@@ -137,10 +138,11 @@ static int (*MenuEscBKeymap[128]) (char c) = {
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
- mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
-/* A B C D E */
+/* 8 9 : ; < = > ? */
+ mNull, mNull, mNull, mNull, mSgrMouse,mNull,mNull, mNull,
+/* A B C D E */
mNull, mUp, mDown, mOk, mCancel,mClose, mNull, mNull,
-/* L M */
+/* L M */
mNull, mNull, mNull, mNull, mClose, mMouse, mNull, mNull,
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
mNull, mNull, mNull, mNull, mNull, mNull, mNull, mNull,
@@ -359,7 +361,6 @@ geom_menu(Menu *menu, int x, int y, int mselect)
if (win_w > COLS) {
menu->width = COLS - 2 * FRAME_WIDTH;
menu->width -= menu->width % FRAME_WIDTH;
- win_w = menu->width + 2 * FRAME_WIDTH;
}
}
menu->x = win_x + FRAME_WIDTH;
@@ -1203,6 +1204,48 @@ mMouse(char c)
return process_mMouse(btn, x, y);
}
+static int
+mSgrMouse(char c)
+{
+ int btn = 0, x = 0, y = 0;
+ unsigned char ch;
+
+ for (ch = getch(); IS_DIGIT(ch); ch = getch())
+ btn = btn * 10 + ch - '0';
+ if (ch != ';')
+ return MENU_NOTHING;
+
+#if defined (__CYGWIN__) && CYGWIN_VERSION_DLL_MAJOR < 1005
+ if (cygwin_mouse_btn_swapped) {
+ if (btn == MOUSE_BTN2_DOWN)
+ btn = MOUSE_BTN3_DOWN;
+ else if (btn == MOUSE_BTN3_DOWN)
+ btn = MOUSE_BTN2_DOWN;
+ }
+#endif
+
+ for (ch = getch(); IS_DIGIT(ch); ch = getch())
+ x = x * 10 + ch - '0';
+ if (ch != ';')
+ return MENU_NOTHING;
+ if (x > 0)
+ x--;
+
+ for (ch = getch(); IS_DIGIT(ch); ch = getch())
+ y = y * 10 + ch - '0';
+ if (ch == 'm')
+ btn |= 3;
+ else if (ch != 'M' && ch != ';')
+ return MENU_NOTHING;
+ if (y > 0)
+ y--;
+
+ if (x < 0 || x >= COLS || y < 0 || y > LASTLINE)
+ return MENU_NOTHING;
+
+ return process_mMouse(btn, x, y);
+}
+
#ifdef USE_GPM
static int
gpm_process_menu_mouse(Gpm_Event * event, void *data)
@@ -1261,6 +1304,12 @@ mMouse(char c)
{
return (MENU_NOTHING);
}
+
+static int
+mSgrMouse(char c)
+{
+ return (MENU_NOTHING);
+}
#endif /* not USE_MOUSE */
/* --- MenuFunctions (END) --- */
@@ -1289,7 +1338,7 @@ mainMenu(int x, int y)
popupMenu(x, y, &MainMenu);
}
-DEFUN(mainMn, MAIN_MENU MENU, "Popup menu")
+DEFUN(mainMn, MAIN_MENU MENU, "Pop up menu")
{
Menu *menu = &MainMenu;
char *data;
@@ -1317,7 +1366,7 @@ DEFUN(mainMn, MAIN_MENU MENU, "Popup menu")
/* --- SelectMenu --- */
-DEFUN(selMn, SELECT_MENU, "Popup buffer selection menu")
+DEFUN(selMn, SELECT_MENU, "Pop up buffer-stack menu")
{
int x = Currentbuf->cursorX + Currentbuf->rootX,
y = Currentbuf->cursorY + Currentbuf->rootY;
@@ -1365,9 +1414,7 @@ initSelectMenu(void)
break;
default:
Strcat_char(str, ' ');
- p = parsedURL2Str(&buf->currentURL)->ptr;
- if (DecodeURL)
- p = url_unquote_conv(p, 0);
+ p = url_decode2(parsedURL2Str(&buf->currentURL)->ptr, NULL);
Strcat_charp(str, p);
break;
}
@@ -1464,7 +1511,7 @@ smDelBuf(char c)
/* --- SelTabMenu --- */
-DEFUN(tabMn, TAB_MENU, "Popup tab selection menu")
+DEFUN(tabMn, TAB_MENU, "Pop up tab selection menu")
{
int x = Currentbuf->cursorX + Currentbuf->rootX,
y = Currentbuf->cursorY + Currentbuf->rootY;
@@ -1513,9 +1560,7 @@ initSelTabMenu(void)
case SCM_MISSING:
break;
default:
- p = parsedURL2Str(&buf->currentURL)->ptr;
- if (DecodeURL)
- p = url_unquote_conv(p, 0);
+ p = url_decode2(parsedURL2Str(&buf->currentURL)->ptr, NULL);
Strcat_charp(str, p);
break;
}
@@ -1696,7 +1741,7 @@ initMenu(void)
FILE *mf;
MenuList *list;
- w3mMenuList = New_N(MenuList, 3);
+ w3mMenuList = New_N(MenuList, 4);
w3mMenuList[0].id = "Main";
w3mMenuList[0].menu = &MainMenu;
w3mMenuList[0].item = MainMenuItem;
@@ -1845,10 +1890,8 @@ link_menu(Buffer *buf)
Strcat_charp(str, " ");
if (!l->url)
p = "";
- else if (DecodeURL)
- p = url_unquote_conv(l->url, buf->document_charset);
else
- p = l->url;
+ p = url_decode2(l->url, buf);
Strcat_charp(str, p);
label[i] = str->ptr;
if (len < str->length)
@@ -1913,6 +1956,7 @@ accesskey_menu(Buffer *buf)
}
label[nitem] = NULL;
+ set_menu_frame();
new_option_menu(&menu, label, &key, NULL);
menu.initial = 0;
@@ -2024,7 +2068,6 @@ list_menu(Buffer *buf)
}
label[nitem] = NULL;
- set_menu_frame();
set_menu_frame();
new_option_menu(&menu, label, &key, NULL);
diff --git a/mimehead.c b/mimehead.c
index 78997e0..d16270c 100644
--- a/mimehead.c
+++ b/mimehead.c
@@ -63,13 +63,23 @@ ha2d(char x, char y)
Str
decodeB(char **ww)
+{
+ struct growbuf gb;
+
+ growbuf_init(&gb);
+ decodeB_to_growbuf(&gb, ww);
+ return growbuf_to_Str(&gb);
+}
+
+void
+decodeB_to_growbuf(struct growbuf *gb, char **ww)
{
unsigned char c[4];
char *wp = *ww;
char d[3];
int i, n_pad;
- Str ap = Strnew_size(strlen(wp));
+ growbuf_reserve(gb, strlen(wp) + 1);
n_pad = 0;
while (1) {
for (i = 0; i < 4; i++) {
@@ -93,39 +103,50 @@ decodeB(char **ww)
for (i = 0; i < 4; i++) {
c[i] = c2e(c[i]);
if (c[i] == BAD_BASE64) {
- *ww = wp;
- return ap;
+ goto last;
}
}
d[0] = ((c[0] << 2) | (c[1] >> 4));
d[1] = ((c[1] << 4) | (c[2] >> 2));
d[2] = ((c[2] << 6) | c[3]);
for (i = 0; i < 3 - n_pad; i++) {
- Strcat_char(ap, d[i]);
+ GROWBUF_ADD_CHAR(gb, d[i]);
}
if (n_pad || *wp == '\0' || *wp == '?')
break;
}
+last:
+ growbuf_reserve(gb, gb->length + 1);
+ gb->ptr[gb->length] = '\0';
*ww = wp;
- return ap;
+ return;
}
Str
decodeU(char **ww)
+{
+ struct growbuf gb;
+
+ growbuf_init(&gb);
+ decodeU_to_growbuf(&gb, ww);
+ return growbuf_to_Str(&gb);
+}
+
+void
+decodeU_to_growbuf(struct growbuf *gb, char **ww)
{
unsigned char c1, c2;
char *w = *ww;
int n, i;
- Str a;
if (*w <= 0x20 || *w >= 0x60)
- return Strnew_size(0);
+ return;
n = *w - 0x20;
- a = Strnew_size(n);
+ growbuf_reserve(gb, n + 1);
for (w++, i = 2; *w != '\0' && n; n--) {
c1 = (w[0] - 0x20) % 0x40;
c2 = (w[1] - 0x20) % 0x40;
- Strcat_char(a, (c1 << i) | (c2 >> (6 - i)));
+ gb->ptr[gb->length++] = (c1 << i) | (c2 >> (6 - i));
if (i == 6) {
w += 2;
i = 2;
@@ -135,7 +156,8 @@ decodeU(char **ww)
i += 2;
}
}
- return a;
+ gb->ptr[gb->length] = '\0';
+ return;
}
/* RFC2047 (4.2. The "Q" encoding) */
@@ -164,10 +186,20 @@ decodeQ(char **ww)
/* RFC2045 (6.7. Quoted-Printable Content-Transfer-Encoding) */
Str
decodeQP(char **ww)
+{
+ struct growbuf gb;
+
+ growbuf_init(&gb);
+ decodeQP_to_growbuf(&gb, ww);
+ return growbuf_to_Str(&gb);
+}
+
+void
+decodeQP_to_growbuf(struct growbuf *gb, char **ww)
{
char *w = *ww;
- Str a = Strnew_size(strlen(w));
+ growbuf_reserve(gb, strlen(w) + 1);
for (; *w != '\0'; w++) {
if (*w == '=') {
w++;
@@ -180,15 +212,16 @@ decodeQP(char **ww)
else {
if (*w == '\0' || *(w + 1) == '\0')
break;
- Strcat_char(a, ha2d(*w, *(w + 1)));
+ gb->ptr[gb->length++] = ha2d(*w, *(w + 1));
w++;
}
}
else
- Strcat_char(a, *w);
+ gb->ptr[gb->length++] = *w;
}
+ gb->ptr[gb->length] = '\0';
*ww = w;
- return a;
+ return;
}
#ifdef USE_M17N
diff --git a/news.c b/news.c
index 8a1f0e8..c0494b7 100644
--- a/news.c
+++ b/news.c
@@ -76,13 +76,15 @@ news_close(News * news)
static int
news_open(News * news)
{
- int sock, status;
+ int sock, status, fd;
sock = openSocket(news->host, "nntp", news->port);
if (sock < 0)
goto open_err;
news->rf = newInputStream(sock);
- news->wf = fdopen(dup(sock), "wb");
+ if ((fd = dup(sock)) < 0)
+ goto open_err;
+ news->wf = fdopen(fd, "wb");
if (!news->rf || !news->wf)
goto open_err;
IStype(news->rf) |= IST_UNCLOSE;
diff --git a/parsetagx.c b/parsetagx.c
index 6b627d2..1cc7048 100644
--- a/parsetagx.c
+++ b/parsetagx.c
@@ -120,6 +120,7 @@ parse_tag(char **s, int internal)
int i, attr_id = 0, nattr;
/* Parse tag name */
+ tagname[0] = '\0';
q = (*s) + 1;
p = tagname;
if (*q == '/') {
@@ -221,6 +222,7 @@ parse_tag(char **s, int internal)
int j, hidden=FALSE;
for (j=0; j<i; j++) {
if (tag->attrid[j] == ATTR_TYPE &&
+ tag->value[j] &&
strcmp("hidden",tag->value[j]) == 0) {
hidden=TRUE;
break;
diff --git a/po/LINGUAS b/po/LINGUAS
index 1489115..ddd267b 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,2 +1,2 @@
# Set of available languages.
-ja
+ja de zh_CN zh_TW
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 83d8838..9d9691e 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -89,7 +89,7 @@ CATALOGS = @CATALOGS@
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
- cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && if [ x$(GMSGFMT) != x: ] ; then mv t-$${lang}.gmo $${lang}.gmo ; fi
.sin.sed:
sed -e '/^#/d' $< > t-$@
@@ -153,14 +153,14 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--files-from=$(srcdir)/POTFILES.in \
- --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --copyright-holder="$(COPYRIGHT_HOLDER)" \
--msgid-bugs-address="$$msgid_bugs_address" \
;; \
*) \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--files-from=$(srcdir)/POTFILES.in \
- --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --copyright-holder="$(COPYRIGHT_HOLDER)" \
--package-name="$${package_gnu}@PACKAGE@" \
--package-version='@VERSION@' \
--msgid-bugs-address="$$msgid_bugs_address" \
diff --git a/po/Makevars b/po/Makevars
index 2f57810..a60a09d 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -18,7 +18,7 @@ XGETTEXT_OPTIONS = --from-code=EUC-JP --keyword=_ --keyword=N_
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
-COPYRIGHT_HOLDER = Fumitoshi UKAI
+COPYRIGHT_HOLDER = THE w3m'S COPYRIGHT HOLDER
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..b4dcd36
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,936 @@
+# German translation of w3m
+# Copyright (C) 2014 THE w3m'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the w3m package.
+# Markus Hiereth <markus.hiereth@freenet.de>, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: w3m 0.5.3\n"
+"Report-Msgid-Bugs-To: satodai@w3m.jp\n"
+"POT-Creation-Date: 2016-03-14 19:47+0900\n"
+"PO-Revision-Date: 2016-03-14 19:51+0900\n"
+"Last-Translator: Tatsuya Kinoshita <tats@debian.org>\n"
+"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.7.1\n"
+
+#: menu.c:269
+msgid " Back (b) "
+msgstr " Zurück (b) "
+
+#: menu.c:270
+msgid " Select Buffer(s) "
+msgstr " Puffer auswählen (s) "
+
+#: menu.c:272
+msgid " Select Tab (t) "
+msgstr " Reiter auswählen (t) "
+
+#: menu.c:274
+msgid " View Source (v) "
+msgstr " Codeansicht (v) "
+
+#: menu.c:275
+msgid " Edit Source (e) "
+msgstr " Code bearbeiten (e) "
+
+#: menu.c:276
+msgid " Save Source (S) "
+msgstr " Code speichern (S) "
+
+#: menu.c:277
+msgid " Reload (r) "
+msgstr " Erneut laden (r) "
+
+#: menu.c:278 menu.c:285 menu.c:289
+msgid " ---------------- "
+msgstr " ---------------------- "
+
+#: menu.c:279
+msgid " Go Link (a) "
+msgstr " Ziel öffnen.. (a) "
+
+#: menu.c:280
+msgid " on New Tab (n) "
+msgstr " ..in neuem Reiter (n) "
+
+#: menu.c:281
+msgid " Save Link (A) "
+msgstr " Ziel speichern (A) "
+
+#: menu.c:282
+msgid " View Image (i) "
+msgstr " Bild anzeigen (i) "
+
+#: menu.c:283
+msgid " Save Image (I) "
+msgstr " Bild speichern (I) "
+
+#: menu.c:284
+msgid " View Frame (f) "
+msgstr " Frames zeigen (f) "
+
+#: menu.c:286
+msgid " Bookmark (B) "
+msgstr " Lesezeichen (B) "
+
+#: menu.c:287
+msgid " Help (h) "
+msgstr " Hilfe (h) "
+
+#: menu.c:288
+msgid " Option (o) "
+msgstr " Einstellungen (o) "
+
+#: menu.c:290
+msgid " Quit (q) "
+msgstr " Programm verlassen (q) "
+
+#: rc.c:62
+msgid "External Viewer Setup"
+msgstr "Konfiguration für externe Anzeigeprogramme"
+
+#: rc.c:63
+msgid "Tab width in characters"
+msgstr "Tabulatorbreite in Zeichen"
+
+#: rc.c:64
+msgid "Indent for HTML rendering"
+msgstr "Einzug bei HTML-Darstellung"
+
+#: rc.c:65
+msgid "Number of pixels per character (4.0...32.0)"
+msgstr "Anzahl von Pixeln pro Zeichen (4.0 bis 32.0)"
+
+#: rc.c:66
+msgid "Number of pixels per line (4.0...64.0)"
+msgstr "Anzahl von Pixeln pro Zeile (4.0 bis 64.0)"
+
+# entsprechend Bescheibung aus MANUAL.html, mh 14.10.2014
+#: rc.c:67
+msgid "Number of remembered lines when used as a pager"
+msgstr "Anzahl gemerkter, über die Standardeingabe erhaltener Zeilen"
+
+#: rc.c:68
+msgid "Use URL history"
+msgstr "URL-Chronik verwenden"
+
+#: rc.c:69
+msgid "Number of remembered URL"
+msgstr "Anzahl von URLs in Chronik"
+
+#: rc.c:70
+msgid "Save URL history"
+msgstr "URL-Chronik speichern"
+
+#: rc.c:71
+msgid "Render frames automatically"
+msgstr "Frames selbstständig darstellen"
+
+#: rc.c:72
+msgid "Treat argument without scheme as URL"
+msgstr "Eingabe ohne Protokoll-Präfix als URL auffassen"
+
+#: rc.c:73
+msgid "Use _self as default target"
+msgstr "_self als Standard-Zielfenster verwenden"
+
+#: rc.c:74
+msgid "Open link on new tab if target is _blank or _new"
+msgstr ""
+"Link in neuem Reiter öffnen, falls für Zielfenster _blank oder _new "
+"definiert ist"
+
+#: rc.c:75
+msgid "Open download list panel on new tab"
+msgstr "Downloadliste in neuem Reiter öffnen"
+
+#: rc.c:76
+msgid "Display link URL automatically"
+msgstr "URL der Links selbstständig anzeigen"
+
+#: rc.c:77
+msgid "Display link numbers"
+msgstr "Linknummern anzeigen"
+
+#: rc.c:78
+msgid "Display decoded URL"
+msgstr "URL entschlüsselt anzeigen"
+
+#: rc.c:79
+msgid "Display current line number"
+msgstr "Aktuelle Zeilennummer anzeigen"
+
+#: rc.c:80
+msgid "Display inline images"
+msgstr "Eingebettete Bilder anzeigen"
+
+#: rc.c:81
+msgid "Display pseudo-ALTs for inline images with no ALT or TITLE string"
+msgstr "Pseudo-ALTs zu eingebetteten Bildern ohne ALT oder TITLE anzeigen"
+
+#: rc.c:83
+msgid "Load inline images automatically"
+msgstr "Eingebettete Bilder selbstständig laden"
+
+#: rc.c:84
+msgid "Maximum processes for parallel image loading"
+msgstr "Anzahl zulässiger Prozesse zum gleichzeitigen Laden von Bildern"
+
+#: rc.c:85
+msgid "Use external image viewer"
+msgstr "Externen Bildbetrachter verwenden"
+
+#: rc.c:86
+msgid "Scale of image (%)"
+msgstr "Bilder prozentual skalieren"
+
+#: rc.c:87
+msgid "External command to display image"
+msgstr "Befehl für externen Bildbetrachter"
+
+#: rc.c:88
+msgid "Use link list of image map"
+msgstr "Bei Grafiken mit eingebetteten Links Ziele auflisten"
+
+#: rc.c:90
+msgid "Display file names in multi-column format"
+msgstr "Dateinamen auf Spalten verteilt anzeigen"
+
+#: rc.c:91
+msgid "Use ASCII equivalents to display entities"
+msgstr "ASCII-Ersatz für in HTML benannte Zeichen verwenden"
+
+#: rc.c:92
+msgid "Character type for border of table and menu"
+msgstr "Zeichen zum Einrahmen von Tabellen und Menüs"
+
+#: rc.c:93
+msgid "Display table borders, ignore value of BORDER"
+msgstr "Zeige Tabellen gerahmt, BORDER-Wert ignorieren"
+
+#: rc.c:94
+msgid "Fold lines in TEXTAREA"
+msgstr "In Eingabefeldern vom Typ TEXTAREA Texte umbrechen"
+
+#: rc.c:95
+msgid "Display INS, DEL, S and STRIKE element"
+msgstr "Umsetzung der Elemente INS, DEL, S und STRIKE"
+
+#: rc.c:96
+msgid "Display with color"
+msgstr "In Farbe anzeigen"
+
+#: rc.c:97
+msgid "Color of normal character"
+msgstr "Farbe für normalen Text"
+
+#: rc.c:98
+msgid "Color of anchor"
+msgstr "Farbe für Links / Element A"
+
+#: rc.c:99
+msgid "Color of image link"
+msgstr "Farbe für Bilder / Element IMG"
+
+#: rc.c:100
+msgid "Color of form"
+msgstr "Farbe für Eingaben / Element INPUT"
+
+#: rc.c:101
+msgid "Enable coloring of active link"
+msgstr "Aktiven Link farblich hervorheben"
+
+#: rc.c:102
+msgid "Color of currently active link"
+msgstr "Farbe des derzeit aktiven Links "
+
+#: rc.c:103
+msgid "Use visited link color"
+msgstr "Besuchte Links farblich hervorheben"
+
+#: rc.c:104
+msgid "Color of visited link"
+msgstr "Farbe für besuchte Links"
+
+#: rc.c:105
+msgid "Color of background"
+msgstr "Hintergrundfarbe"
+
+#: rc.c:106
+msgid "Color of mark"
+msgstr "Farbe für Textmarken"
+
+# msgstr "Farbe für Textmarkierungen"
+#: rc.c:107
+msgid "Use proxy"
+msgstr "Proxy verwenden"
+
+#: rc.c:108
+msgid "URL of HTTP proxy host"
+msgstr "URL des HTTP-Proxy-Hosts"
+
+#: rc.c:110
+msgid "URL of HTTPS proxy host"
+msgstr "URL des HTTPS-Proxy-Hosts"
+
+#: rc.c:113
+msgid "URL of GOPHER proxy host"
+msgstr "URL des GOPHER-Proxy-Hosts"
+
+#: rc.c:115
+msgid "URL of FTP proxy host"
+msgstr "URL des FTP-Proxy-Hosts"
+
+#: rc.c:116
+msgid "Domains to be accessed directly (no proxy)"
+msgstr "Ohne Proxy, direkt zu kontaktierende Domains"
+
+#: rc.c:117
+msgid "Check noproxy by network address"
+msgstr ""
+"Direkten Datentransfer ohne Proxy mittels Netzwerkadresse sicherstellen"
+
+#: rc.c:118
+msgid "Disable cache"
+msgstr "Zwischenspeicherung deaktivieren"
+
+#: rc.c:120
+msgid "News server"
+msgstr "News-Server"
+
+#: rc.c:121
+msgid "Mode of news server"
+msgstr "Modus des News-Servers"
+
+#: rc.c:122
+msgid "Number of news messages"
+msgstr "News-Anzahl"
+
+#: rc.c:124
+msgid "Order of name resolution"
+msgstr "Reihenfolge der Namens-Auflösung"
+
+#: rc.c:125
+msgid "Directory corresponding to / (document root)"
+msgstr "Wurzelverzeichnis für Dokumente (/)"
+
+#: rc.c:126
+msgid "Directory corresponding to /~user"
+msgstr "Pfad zum Benutzerverzeichnis (~)"
+
+#: rc.c:127
+msgid "Directory corresponding to /cgi-bin"
+msgstr "Verzeichnis für ausführbare Skripte (cgi-bin)"
+
+#: rc.c:128
+msgid "Confirm when quitting with q"
+msgstr "Das Programm erst nach Bestätigung verlassen"
+
+#: rc.c:129
+msgid "Close tab if buffer is last when back"
+msgstr "Reiter mit nur einem Puffer auf Zurück-Befehl hin schließen"
+
+#: rc.c:131
+msgid "Enable mark operations"
+msgstr "Arbeit mit Textmarken ermöglichen"
+
+# msgstr "Arbeit mit Textmarkierungen ermöglichen"
+#: rc.c:133
+msgid "Enable Emacs-style line editing"
+msgstr "Zeilen wie in Emacs bearbeiten"
+
+#: rc.c:134
+msgid "Enable vi-like numeric prefix"
+msgstr "Vorangestellte Zahlen wie in vi aktivieren"
+
+#: rc.c:135
+msgid "Move cursor to top line when going to label"
+msgstr "Labels nach Aufsuchen immer oben positionieren"
+
+#: rc.c:136
+msgid "Move cursor to top line when moving to next page"
+msgstr "Beim Umblättern Eingabemarke nach oben setzen"
+
+#: rc.c:137
+msgid "Fold lines of plain text file"
+msgstr "Zeilen in Textdateien umbrechen"
+
+#: rc.c:138
+msgid "Show line numbers"
+msgstr "Zeilennummern anzeigen"
+
+#: rc.c:139
+msgid "Show search string"
+msgstr "Suchbegriff anzeigen"
+
+#: rc.c:140
+msgid "List of mime.types files"
+msgstr "Liste der mime.types-Dateien"
+
+#: rc.c:141
+msgid "List of mailcap files"
+msgstr "Liste der mailcap-Dateien"
+
+#: rc.c:142
+msgid "List of urimethodmap files"
+msgstr "Liste von Dateien mit URI-Methode-Zuordnungen"
+
+#: rc.c:143
+msgid "Editor"
+msgstr "Editor"
+
+#: rc.c:144
+msgid "Mailer"
+msgstr "Mail-Programm"
+
+# korrespondiert mit Pulldown-Menü, daher verkürzt. mh 09.10.2014
+#: rc.c:145
+msgid "How to call Mailer for mailto URLs with options"
+msgstr "Umgang mit mailto-URLs"
+
+#: rc.c:146
+msgid "External browser"
+msgstr "Externer browser"
+
+#: rc.c:147
+msgid "2nd external browser"
+msgstr "Zweiter externer browser"
+
+#: rc.c:148
+msgid "3rd external browser"
+msgstr "Dritter externer browser"
+
+#: rc.c:149
+msgid "4th external browser"
+msgstr "Vierter externer browser"
+
+#: rc.c:150
+msgid "5th external browser"
+msgstr "Fünfter externer browser"
+
+#: rc.c:151
+msgid "6th external browser"
+msgstr "Sechster externer browser"
+
+#: rc.c:152
+msgid "7th external browser"
+msgstr "Siebter externer browser"
+
+#: rc.c:153
+msgid "8th external browser"
+msgstr "Achter externer browser"
+
+#: rc.c:154
+msgid "9th external browser"
+msgstr "Neunter externer browser"
+
+# entsprechend file:///usr/share/doc/w3m/README.passwd
+# Prüfung beanstandete auch passwd_file mit Zugriffbytes 600, mh, 05.10.2014
+#: rc.c:155
+msgid "Disable secret file security check"
+msgstr "Keine Prüfung der Sicherheit bei Dateien mit geheimem Inhalt"
+
+#: rc.c:156
+msgid "Password file"
+msgstr "Passwort-Datei"
+
+#: rc.c:157
+msgid "File for setting form on loading"
+msgstr "Datei mit vordefinierten Eingaben für Formulare"
+
+#: rc.c:158
+msgid "File for preferences for each site"
+msgstr "Datei mit adress-spezifischen Voreinstellungen"
+
+#: rc.c:159
+msgid "Password for anonymous FTP (your mail address)"
+msgstr "Passwort für anonyme FTP-Anmeldung (Ihre Mailadresse)"
+
+#: rc.c:160
+msgid "Generate domain part of password for FTP"
+msgstr "Domain-Teil des FTP-Passwortes erzeugen"
+
+#: rc.c:161
+msgid "User-Agent identification string"
+msgstr "Browserkennung übermitteln"
+
+#: rc.c:162
+msgid "Accept-Encoding header"
+msgstr "Accept-Encoding-Kopfzeile"
+
+#: rc.c:163
+msgid "Accept header"
+msgstr "Accept-Kopfzeile"
+
+#: rc.c:164
+msgid "Accept-Language header"
+msgstr "Accept-Language-Kopfzeile"
+
+#: rc.c:165
+msgid "Treat URL-like strings as links in all pages"
+msgstr "URL-artige Zeichenketten auf allen Seiten als Links auffassen"
+
+#: rc.c:166
+msgid "Wrap search"
+msgstr "Im Dokument umlaufend suchen"
+
+#: rc.c:167
+msgid "Display unseen objects (e.g. bgimage tag)"
+msgstr "Nicht gezeigte Objekte melden (z.B. Hintergrundbild)"
+
+#: rc.c:168
+msgid "Uncompress compressed data automatically when downloading"
+msgstr "Komprimierte Daten beim Download selbstständig dekomprimieren"
+
+# String nicht in Optionen-Menü gefunden. mh, 05.10.2014
+#: rc.c:170
+msgid "Run external viewer in a separate session"
+msgstr "Externe Anzeigeprogramme in eigener Sitzung laufen lassen"
+
+#: rc.c:172
+msgid "Run external viewer in the background"
+msgstr "Externe Anzeigeprogramme im Hintergrund laufen lassen"
+
+#: rc.c:174
+msgid "Use external program for directory listing"
+msgstr "Externes Programm zum Auflisten von Verzeichnissen verwenden"
+
+#: rc.c:175
+msgid "URL of directory listing command"
+msgstr "URL des Befehls zum Auflisten von Verzeichnissen"
+
+#: rc.c:177
+msgid "Enable dictionary lookup through CGI"
+msgstr "Wörterbuchabfrage mittels CGI aktivieren"
+
+#: rc.c:178
+msgid "URL of dictionary lookup command"
+msgstr "URL des Befehls zur Wörterbuch-Abfrage"
+
+#: rc.c:180
+msgid "Display link name for images lacking ALT"
+msgstr "Bei Bildern ohne ALT-Angabe Linkziel anzeigen"
+
+#: rc.c:181
+msgid "Index file for directories"
+msgstr "Indexdatei für Verzeichnisse"
+
+#: rc.c:182
+msgid "Prepend http:// to URL automatically"
+msgstr "Ziel-Eingaben gegebenenfalls http:// voranstellen"
+
+#: rc.c:183
+msgid "Default value for open-URL command"
+msgstr "Vorgabewert bei der Adresseneingabe"
+
+#: rc.c:184
+msgid "Decode Content-Transfer-Encoding when saving"
+msgstr "Beim Speichern entsprechend Content-Transfer-Encoding entschlüsseln"
+
+#: rc.c:185
+msgid "Preserve timestamp when saving"
+msgstr "Zeitstempel beim Speichern erhalten"
+
+#: rc.c:187
+msgid "Enable mouse"
+msgstr "Maus aktivieren"
+
+#: rc.c:188
+msgid "Scroll in reverse direction of mouse drag"
+msgstr "Mausbewegungen entgegengesetzt scrollen"
+
+#: rc.c:189
+msgid "Behavior of wheel scroll speed"
+msgstr "Umsetzung der Mausradbewegung"
+
+#: rc.c:190
+msgid "(A only)Scroll by # (%) of screen"
+msgstr "(nur A) Um # % des Fensters scrollen"
+
+#: rc.c:191
+msgid "(B only)Scroll by # lines"
+msgstr "(nur B) Um # Zeilen scrollen"
+
+#: rc.c:193
+msgid "Free memory of undisplayed buffers"
+msgstr "Speicherplatz nicht angezeigter Puffer freigeben"
+
+#: rc.c:194
+msgid "Suppress `Referer:' header"
+msgstr "Referer-Kopfzeile unterdrücken"
+
+#: rc.c:195
+msgid "Search case-insensitively"
+msgstr "Groß- und Kleinschreibung beim Suchen ignorieren"
+
+#: rc.c:196
+msgid "Use LESSOPEN"
+msgstr "LESSOPEN verwenden"
+
+#: rc.c:199
+msgid "Perform SSL server verification"
+msgstr "SSL-Server-Verifizierung durchführen"
+
+#: rc.c:200
+msgid "PEM encoded certificate file of client"
+msgstr "PEM-kodierte Zertifikatsdatei des Clients"
+
+#: rc.c:201
+msgid "PEM encoded private key file of client"
+msgstr "PEM-kodierte private Schlüsseldatei des Clients"
+
+#: rc.c:202
+msgid "Path to directory for PEM encoded certificates of CAs"
+msgstr "Pfad zum Verzeichnis für PEM-kodierte Zertifikate von CAs"
+
+#: rc.c:203
+msgid "File consisting of PEM encoded certificates of CAs"
+msgstr "Datei mit PEM-kodierten Zertifikaten von CAs"
+
+#: rc.c:205
+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
+msgstr "Liste unzulässiger SSL-Verfahren (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
+
+#: rc.c:208
+msgid "Enable cookie processing"
+msgstr "Cookie-Verarbeitung aktivieren"
+
+#: rc.c:209
+msgid "Print a message when receiving a cookie"
+msgstr "Den Empfang von Cookies melden"
+
+#: rc.c:210
+msgid "Accept cookies"
+msgstr "Cookies akzeptieren"
+
+#: rc.c:211
+msgid "Action to be taken on invalid cookie"
+msgstr "Reaktion auf ungültiges Cookie"
+
+#: rc.c:212
+msgid "Domains to reject cookies from"
+msgstr "Domains, deren Cookies abzulehnen sind"
+
+#: rc.c:213
+msgid "Domains to accept cookies from"
+msgstr "Domains, deren Cookies akzeptiert werden"
+
+# Variable vom Typ String im Abschnitt Cookies-Einstellungen, mh 10.10.2014
+#: rc.c:214
+msgid "Domains to avoid [wrong number of dots]"
+msgstr "Zu meidende Domains (falsche Anzahl von Punkten)"
+
+#: rc.c:216
+msgid "Number of redirections to follow"
+msgstr "Anzahl zu akzeptierender Umleitungen"
+
+# Konfigurationsvariable vom Typ string, mh, 05.10.2014
+#: rc.c:217
+msgid "Enable processing of meta-refresh tag"
+msgstr "Meta-Refresh-Element verarbeiten"
+
+#: rc.c:220
+msgid "Enable Migemo (Roma-ji search)"
+msgstr "Romaji-Suche mittels Migemo aktivieren"
+
+#: rc.c:221
+msgid "Migemo command"
+msgstr "Migemo-Befehl"
+
+#: rc.c:225
+msgid "Display charset"
+msgstr "Zeichenkodierung der Anzeige"
+
+#: rc.c:226
+msgid "Default document charset"
+msgstr "Zeichenkodierungs-Vorgabe für Dokumente"
+
+#: rc.c:227
+msgid "Automatic charset detect when loading"
+msgstr "Selbstständige Erkennung der Zeichenkodierung beim Laden"
+
+#: rc.c:228
+msgid "System charset"
+msgstr "Zeichenkodierung des Systems"
+
+#: rc.c:229
+msgid "System charset follows locale(LC_CTYPE)"
+msgstr "Zeichenkodierung des Systems entsprechend Locale (LC_CTYPE)"
+
+# war zuvor
+# msgstr "Halfdump mit der zur Anzeige benutzten Zeichenkodierung exportieren"
+#: rc.c:230
+msgid "Output halfdump with display charset"
+msgstr "Halfdump in der zur Anzeige benutzten Kodierung"
+
+# Konfigurationsvariable vom Typ boolean, mh, 05.10.2014
+#: rc.c:231
+msgid "Use multi column characters"
+msgstr "Spaltenübergreifende Zeichen verwenden"
+
+#: rc.c:232
+msgid "Use combining characters"
+msgstr "Kombinationszeichen verwenden"
+
+#: rc.c:233
+msgid "Use double width for some Unicode characters"
+msgstr "Einzelnen Unicode-Zeichen zwei Spalten einräumen"
+
+#: rc.c:234
+msgid "Use Unicode language tags"
+msgstr "Unicode-Sprach-Tags verwenden"
+
+#: rc.c:235
+msgid "Charset conversion using Unicode map"
+msgstr "Zeichen in Unicode kodieren"
+
+#: rc.c:236
+msgid "Charset conversion when loading"
+msgstr "Zeichenkodierung beim Laden anpassen"
+
+#: rc.c:237
+msgid "Adjust search string for document charset"
+msgstr "Zu suchende Zeichenkette der Kodierung des Dokumentes anpassen"
+
+#: rc.c:238
+msgid "Fix character width when conversion"
+msgstr "Bei Umwandlung an der Breite von Zeichen festhalten"
+
+#: rc.c:239
+msgid "Use GB 12345 Unicode map instead of GB 2312's"
+msgstr "GB-12345-Unicode statt GB 2312 verwenden"
+
+#: rc.c:240
+msgid "Use JIS X 0201 Roman for ISO-2022-JP"
+msgstr "JIS X 0201 Roman statt ISO-2022-JP verwenden"
+
+#: rc.c:241
+msgid "Use JIS C 6226:1978 for ISO-2022-JP"
+msgstr "JIS C 6226:1978 statt ISO-2022-JP verwenden"
+
+#: rc.c:242
+msgid "Use JIS X 0201 Katakana"
+msgstr "JIS X 0201 Katakana verwenden"
+
+#: rc.c:243
+msgid "Use JIS X 0212:1990 (Supplemental Kanji)"
+msgstr "JIS X 0212:1990 verwenden (ergänzendes Kanji)"
+
+#: rc.c:244
+msgid "Use JIS X 0213:2000 (2000JIS)"
+msgstr "JIS X 0213:2000 verwenden (2000JIS)"
+
+#: rc.c:245
+msgid "Strict ISO-2022-JP/KR/CN"
+msgstr "Striktes ISO-2022-JP/KR/CN"
+
+#: rc.c:246
+msgid "Treat 4 bytes char. of GB18030 as Unicode"
+msgstr "4-Byte-Zeichen von GB 18030 als Unicode auffassen"
+
+#: rc.c:247
+msgid "Simple Preserve space"
+msgstr "Einfache Platzerhaltung"
+
+#: rc.c:250
+msgid "keymap file"
+msgstr "Tastaturbelegungs-Datei"
+
+#: rc.c:267
+msgid "black"
+msgstr "schwarz"
+
+#: rc.c:268
+msgid "red"
+msgstr "rot"
+
+#: rc.c:269
+msgid "green"
+msgstr "grün"
+
+#: rc.c:270
+msgid "yellow"
+msgstr "gelb"
+
+#: rc.c:271
+msgid "blue"
+msgstr "blau"
+
+#: rc.c:272
+msgid "magenta"
+msgstr "magenta"
+
+#: rc.c:273
+msgid "cyan"
+msgstr "cyan"
+
+#: rc.c:274
+msgid "white"
+msgstr "weiß"
+
+#: rc.c:275
+msgid "terminal"
+msgstr "wie Terminal"
+
+#: rc.c:294
+msgid "none"
+msgstr "keiner"
+
+#: rc.c:295
+msgid "current URL"
+msgstr "aktuelle URL"
+
+#: rc.c:296
+msgid "link URL"
+msgstr "Link-URL"
+
+#: rc.c:301
+msgid "simple"
+msgstr "einfach"
+
+#: rc.c:302
+msgid "use tag"
+msgstr "durch Tags"
+
+#: rc.c:303
+msgid "fontify"
+msgstr "hervorgehoben"
+
+#: rc.c:309
+msgid "A:relative to screen height"
+msgstr "A: relativ zu Fensterhöhe"
+
+#: rc.c:310
+msgid "B:fixed speed"
+msgstr "B: feste Geschwindigkeit"
+
+#: rc.c:317
+msgid "unspecified"
+msgstr "nicht spezifiziert"
+
+#: rc.c:318
+msgid "inet inet6"
+msgstr "inet inet6"
+
+#: rc.c:319
+msgid "inet6 inet"
+msgstr "inet6 inet"
+
+#: rc.c:320
+msgid "inet only"
+msgstr "nur inet"
+
+#: rc.c:321
+msgid "inet6 only"
+msgstr "nur inet6"
+
+#: rc.c:328
+msgid "discard"
+msgstr "verwerfen"
+
+#: rc.c:330
+msgid "accept"
+msgstr "annehmen"
+
+#: rc.c:332
+msgid "ask"
+msgstr "nachfragen"
+
+# gehört zu rc.c:142
+# erscheint in Pulldown-Menü, daher verkürzt. mh 09.10.2014
+#: rc.c:339
+msgid "use internal mailer instead"
+msgstr "Mail intern erstellen"
+
+# gehört zu rc.c:142
+# erscheint in Pulldown-Menü, daher verkürzt. mh 09.10.2014
+#: rc.c:341
+msgid "ignore options and use only the address"
+msgstr "Optionen ignorieren"
+
+# gehört zu rc.c:142
+# erscheint in Pulldown-Menü, daher verkürzt. mh 09.10.2014
+#: rc.c:342
+msgid "use full mailto URL"
+msgstr "komplett verwenden"
+
+#: rc.c:351
+msgid "OFF"
+msgstr "AUS"
+
+#: rc.c:352
+msgid "Only ISO 2022"
+msgstr "Nur ISO-2022"
+
+#: rc.c:353
+msgid "ON"
+msgstr "AN"
+
+# Wert aus einem Set zur Wiedergabe von Rändern, mh, 05.10.2014
+#: rc.c:359
+msgid "ASCII"
+msgstr "ASCII"
+
+# Wert aus einem Set zur Wiedergabe von Rändern, mh, 05.10.2014
+# hier ist "Zeichensatz" akzeptabel mh, 09.10.2014
+#: rc.c:360
+msgid "charset specific"
+msgstr "zeichensatzspezifisch"
+
+# Wert aus einem Set zur Wiedergabe von Rändern, mh, 05.10.2014
+#: rc.c:361
+msgid "DEC special graphics"
+msgstr "mit DEC-Grafiken"
+
+#: rc.c:740
+msgid "Display Settings"
+msgstr "Einstellungen zur Anzeige"
+
+#: rc.c:742
+msgid "Color Settings"
+msgstr "Farbeinstellungen"
+
+#: rc.c:744
+msgid "Miscellaneous Settings"
+msgstr "Weitere Einstellungen"
+
+#: rc.c:745
+msgid "Directory Settings"
+msgstr "Verzeichnis-Einstellungen"
+
+#: rc.c:746
+msgid "External Program Settings"
+msgstr "Einstellungen für externe Programme"
+
+#: rc.c:747
+msgid "Network Settings"
+msgstr "Netzwerk-Einstellungen"
+
+#: rc.c:748
+msgid "Proxy Settings"
+msgstr "Proxy-Einstellungen"
+
+#: rc.c:750
+msgid "SSL Settings"
+msgstr "SSL-Einstellungen"
+
+#: rc.c:753
+msgid "Cookie Settings"
+msgstr "Cookie-Einstellungen"
+
+#: rc.c:756
+msgid "Charset Settings"
+msgstr "Zeichenkodierungs-Einstellungen"
+
+#. TRANSLATORS:
+#. * AcceptLang default: this is used in Accept-Language: HTTP request
+#. * header. For example, ja.po should translate it as
+#. * "ja;q=1.0, en;q=0.5" like that.
+#.
+#: rc.c:1238
+msgid "en;q=1.0"
+msgstr "de;q=1.0, en;q=0.5"
diff --git a/po/ja.po b/po/ja.po
index d67c695..95a5341 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -1,6 +1,6 @@
# Japanese translations for w3m package
# w3m パッケージに対する英訳.
-# Copyright (C) 2003 THE w3m'S COPYRIGHT HOLDER
+# Copyright (C) 2015 THE w3m'S COPYRIGHT HOLDER
# This file is distributed under the same license as the w3m package.
# Fumitoshi UKAI <ukai@debian.or.jp>, 2003.
#
@@ -8,865 +8,897 @@ msgid ""
msgstr ""
"Project-Id-Version: w3m 0.5.3\n"
"Report-Msgid-Bugs-To: satodai@w3m.jp\n"
-"POT-Creation-Date: 2010-08-20 18:44+0900\n"
-"PO-Revision-Date: 2010-08-20 18:45+0900\n"
-"Last-Translator: Fumitoshi UKAI <ukai@debian.or.jp>\n"
+"POT-Creation-Date: 2016-03-14 19:47+0900\n"
+"PO-Revision-Date: 2016-03-14 19:51+0900\n"
+"Last-Translator: Tatsuya Kinoshita <tats@debian.org>\n"
"Language-Team: Japanese\n"
-"Language: \n"
+"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: menu.c:267
+#: menu.c:269
msgid " Back (b) "
msgstr "戻る (b)"
-#: menu.c:268
+#: menu.c:270
msgid " Select Buffer(s) "
msgstr "バッファ選択 (s)"
-#: menu.c:270
+#: menu.c:272
msgid " Select Tab (t) "
msgstr "タブ選択 (t)"
-#: menu.c:272
+#: menu.c:274
msgid " View Source (v) "
msgstr "ソースを表示 (v)"
-#: menu.c:273
+#: menu.c:275
msgid " Edit Source (e) "
msgstr "ソースを編集 (e)"
-#: menu.c:274
+#: menu.c:276
msgid " Save Source (S) "
msgstr "ソースを保存 (S)"
-#: menu.c:275
+#: menu.c:277
msgid " Reload (r) "
msgstr "再読み込み (r)"
-#: menu.c:276 menu.c:283 menu.c:287
+#: menu.c:278 menu.c:285 menu.c:289
msgid " ---------------- "
msgstr "----------------"
-#: menu.c:277
+#: menu.c:279
msgid " Go Link (a) "
msgstr "リンクを表示 (a)"
-#: menu.c:278
+#: menu.c:280
msgid " on New Tab (n) "
msgstr "新タブで表示 (n)"
-#: menu.c:279
+#: menu.c:281
msgid " Save Link (A) "
msgstr "リンクを保存 (A)"
-#: menu.c:280
+#: menu.c:282
msgid " View Image (i) "
msgstr "画像を表示 (i)"
-#: menu.c:281
+#: menu.c:283
msgid " Save Image (I) "
msgstr "画像を保存 (I)"
-#: menu.c:282
+#: menu.c:284
msgid " View Frame (f) "
msgstr "フレーム表示 (f)"
-#: menu.c:284
+#: menu.c:286
msgid " Bookmark (B) "
msgstr "ブックマーク (B)"
-#: menu.c:285
+#: menu.c:287
msgid " Help (h) "
msgstr "ヘルプ (h)"
-#: menu.c:286
+#: menu.c:288
msgid " Option (o) "
msgstr "オプション (o)"
-#: menu.c:288
+#: menu.c:290
msgid " Quit (q) "
msgstr "終了 (q)"
-#: rc.c:60
+#: rc.c:62
msgid "External Viewer Setup"
msgstr "外部ビューアの編集"
-#: rc.c:61
+#: rc.c:63
msgid "Tab width in characters"
msgstr "タブ幅"
-#: rc.c:62
+#: rc.c:64
msgid "Indent for HTML rendering"
msgstr "HTML整形時のインデント幅"
-#: rc.c:63
+#: rc.c:65
msgid "Number of pixels per character (4.0...32.0)"
msgstr "文字幅 (4.0...32.0)"
-#: rc.c:64
+#: rc.c:66
msgid "Number of pixels per line (4.0...64.0)"
msgstr "一行の高さ (4.0...64.0)"
-#: rc.c:65
+#: rc.c:67
msgid "Number of remembered lines when used as a pager"
msgstr "ページャとして利用した時に保存される行数"
-#: rc.c:66
+#: rc.c:68
msgid "Use URL history"
msgstr "履歴を使う"
-#: rc.c:67
+#: rc.c:69
msgid "Number of remembered URL"
msgstr "保持するURL履歴の数"
-#: rc.c:68
+#: rc.c:70
msgid "Save URL history"
msgstr "URL履歴の保存"
-#: rc.c:69
+#: rc.c:71
msgid "Render frames automatically"
msgstr "フレームの自動表示"
-#: rc.c:70
+#: rc.c:72
msgid "Treat argument without scheme as URL"
msgstr "scheme のない引数も URL とみなす"
-#: rc.c:71
+#: rc.c:73
msgid "Use _self as default target"
msgstr "targetが未指定の場合に_selfを使用する"
-#: rc.c:72
+#: rc.c:74
msgid "Open link on new tab if target is _blank or _new"
msgstr "targetが_blankか_newの場合は新しいタブで開く"
-#: rc.c:73
+#: rc.c:75
msgid "Open download list panel on new tab"
msgstr "Download list panel を新しいタブで開く"
-#: rc.c:74
+#: rc.c:76
msgid "Display link URL automatically"
msgstr "リンク先の自動表示"
-#: rc.c:75
+#: rc.c:77
msgid "Display link numbers"
msgstr "リンク番号の表示"
-#: rc.c:76
+#: rc.c:78
msgid "Display decoded URL"
msgstr "URLをデコードして表示"
-#: rc.c:77
+#: rc.c:79
msgid "Display current line number"
msgstr "現在の行番号の表示"
-#: rc.c:78
+#: rc.c:80
msgid "Display inline images"
msgstr "インライン画像を表示"
-#: rc.c:79
+#: rc.c:81
msgid "Display pseudo-ALTs for inline images with no ALT or TITLE string"
msgstr "ALT または TITLE がない画像の代替テキスト表示"
-#: rc.c:81
+#: rc.c:83
msgid "Load inline images automatically"
msgstr "インライン画像を自動で読み込む"
-#: rc.c:82
+#: rc.c:84
msgid "Maximum processes for parallel image loading"
msgstr "画像読み込み時の最大プロセス数"
-#: rc.c:83
+#: rc.c:85
msgid "Use external image viewer"
msgstr "画像を外部ビューワで表示"
-#: rc.c:84
+#: rc.c:86
msgid "Scale of image (%)"
msgstr "画像のスケール(%)"
-#: rc.c:85
+#: rc.c:87
msgid "External command to display image"
msgstr "画像を表示するためのコマンド"
-#: rc.c:86
+#: rc.c:88
msgid "Use link list of image map"
msgstr "イメージマップのリンク先一覧を表示"
-#: rc.c:88
+#: rc.c:90
msgid "Display file names in multi-column format"
msgstr "ファイル名のマルチカラム表示"
-#: rc.c:89
+#: rc.c:91
msgid "Use ASCII equivalents to display entities"
msgstr "エンティティを ASCII の代替表現で表す"
-#: rc.c:90
+#: rc.c:92
msgid "Character type for border of table and menu"
msgstr "テーブルやメニューの枠に使う文字"
-#: rc.c:91
+#: rc.c:93
+msgid "Display table borders, ignore value of BORDER"
+msgstr "BORDER の値は無視してテーブル枠を表示"
+
+#: rc.c:94
msgid "Fold lines in TEXTAREA"
msgstr "TEXTAREA の行を折り返して表示"
-#: rc.c:92
+#: rc.c:95
msgid "Display INS, DEL, S and STRIKE element"
msgstr "INS, DEL, S, STRIKE 要素の表示"
-#: rc.c:93
+#: rc.c:96
msgid "Display with color"
msgstr "カラー表示"
-#: rc.c:94
+#: rc.c:97
msgid "Color of normal character"
msgstr "文字の色"
-#: rc.c:95
+#: rc.c:98
msgid "Color of anchor"
msgstr "アンカーの色"
-#: rc.c:96
+#: rc.c:99
msgid "Color of image link"
msgstr "画像リンクの色"
-#: rc.c:97
+#: rc.c:100
msgid "Color of form"
msgstr "フォームの色"
-#: rc.c:98
+#: rc.c:101
msgid "Enable coloring of active link"
msgstr "現在選択されているリンクの色を指定する"
-#: rc.c:99
+#: rc.c:102
msgid "Color of currently active link"
msgstr "現在選択されているリンクの色"
-#: rc.c:100
+#: rc.c:103
msgid "Use visited link color"
msgstr "訪れたことがあるリンクは色を変える"
-#: rc.c:101
+#: rc.c:104
msgid "Color of visited link"
msgstr "訪れたことがあるリンクの色"
-#: rc.c:102
+#: rc.c:105
msgid "Color of background"
msgstr "背景の色"
-#: rc.c:103
+#: rc.c:106
msgid "Color of mark"
msgstr "マークの色"
-#: rc.c:104
+#: rc.c:107
msgid "Use proxy"
msgstr "プロキシを使用する"
-#: rc.c:105
+#: rc.c:108
msgid "URL of HTTP proxy host"
msgstr "HTTPプロキシ(URLで入力)"
-#: rc.c:107
+#: rc.c:110
msgid "URL of HTTPS proxy host"
msgstr "HTTPSプロキシ(URLで入力)"
-#: rc.c:110
+#: rc.c:113
msgid "URL of GOPHER proxy host"
msgstr "GOPHERプロキシ(URLで入力)"
-#: rc.c:112
+#: rc.c:115
msgid "URL of FTP proxy host"
msgstr "FTPプロキシ(URLで入力)"
-#: rc.c:113
+#: rc.c:116
msgid "Domains to be accessed directly (no proxy)"
msgstr "プロキシから除外するドメイン"
-#: rc.c:114
+#: rc.c:117
msgid "Check noproxy by network address"
msgstr "ネットワークアドレスでプロキシ除外のチェック"
-#: rc.c:115
+#: rc.c:118
msgid "Disable cache"
msgstr "Cache を使わない"
-#: rc.c:117
+#: rc.c:120
msgid "News server"
msgstr "News サーバ"
-#: rc.c:118
+#: rc.c:121
msgid "Mode of news server"
msgstr "News サーバのモード"
-#: rc.c:119
+#: rc.c:122
msgid "Number of news messages"
msgstr "News を一覧表示する時の数"
-#: rc.c:121
+#: rc.c:124
msgid "Order of name resolution"
msgstr "名前解決の順序"
-#: rc.c:122
+#: rc.c:125
msgid "Directory corresponding to / (document root)"
msgstr "/ で表されるディレクトリ(document root)"
-#: rc.c:123
+#: rc.c:126
msgid "Directory corresponding to /~user"
msgstr "/~user で表されるディレクトリ"
-#: rc.c:124
+#: rc.c:127
msgid "Directory corresponding to /cgi-bin"
msgstr "/cgi-bin で表されるディレクトリ"
-#: rc.c:125
+#: rc.c:128
msgid "Confirm when quitting with q"
msgstr "q での終了時に確認する"
-#: rc.c:126
+#: rc.c:129
msgid "Close tab if buffer is last when back"
msgstr "戻る時にバッファが最後ならタブを閉じる"
-#: rc.c:128
+#: rc.c:131
msgid "Enable mark operations"
msgstr "マーク機能を有効にする"
-#: rc.c:130
+#: rc.c:133
msgid "Enable Emacs-style line editing"
msgstr "Emacs風の行編集にする"
-#: rc.c:131
+#: rc.c:134
msgid "Enable vi-like numeric prefix"
msgstr "vi風の数値プレフィクス"
-#: rc.c:132
+#: rc.c:135
msgid "Move cursor to top line when going to label"
msgstr "ラベルに移動する時にカーソルがトップになるようにする"
-#: rc.c:133
+#: rc.c:136
msgid "Move cursor to top line when moving to next page"
msgstr "次のページに移動する時にカーソルがトップになるようにする"
-#: rc.c:134
+#: rc.c:137
msgid "Fold lines of plain text file"
msgstr "plain text ファイルの行を折り返す"
-#: rc.c:135
+#: rc.c:138
msgid "Show line numbers"
msgstr "行番号を表示する"
-#: rc.c:136
+#: rc.c:139
msgid "Show search string"
msgstr "検索文字列を表示する"
-#: rc.c:137
+#: rc.c:140
msgid "List of mime.types files"
msgstr "利用するmime.types"
-#: rc.c:138
+#: rc.c:141
msgid "List of mailcap files"
msgstr "利用するmailcap"
-#: rc.c:139
+#: rc.c:142
msgid "List of urimethodmap files"
msgstr "利用するurimethodmap"
-#: rc.c:140
+#: rc.c:143
msgid "Editor"
msgstr "利用するエディタ"
-#: rc.c:141
+#: rc.c:144
msgid "Mailer"
msgstr "利用するメーラ"
-#: rc.c:142
+#: rc.c:145
msgid "How to call Mailer for mailto URLs with options"
msgstr "mailto タグの取り扱い"
-#: rc.c:143
-msgid "External Browser"
+#: rc.c:146
+msgid "External browser"
msgstr "外部ブラウザ"
-#: rc.c:144
-msgid "Second External Browser"
+#: rc.c:147
+msgid "2nd external browser"
msgstr "外部ブラウザその2"
-#: rc.c:145
-msgid "Third External Browser"
+#: rc.c:148
+msgid "3rd external browser"
msgstr "外部ブラウザその3"
-#: rc.c:146
+#: rc.c:149
+msgid "4th external browser"
+msgstr "外部ブラウザその4"
+
+#: rc.c:150
+msgid "5th external browser"
+msgstr "外部ブラウザその5"
+
+#: rc.c:151
+msgid "6th external browser"
+msgstr "外部ブラウザその6"
+
+#: rc.c:152
+msgid "7th external browser"
+msgstr "外部ブラウザその7"
+
+#: rc.c:153
+msgid "8th external browser"
+msgstr "外部ブラウザその8"
+
+#: rc.c:154
+msgid "9th external browser"
+msgstr "外部ブラウザその9"
+
+#: rc.c:155
msgid "Disable secret file security check"
msgstr "パスワードファイルのパーミッションをチェックしない"
-#: rc.c:147
+#: rc.c:156
msgid "Password file"
msgstr "パスワードファイル"
-#: rc.c:148
+#: rc.c:157
msgid "File for setting form on loading"
msgstr "文書読込時のフォーム設定用ファイル"
-#: rc.c:149
+#: rc.c:158
+msgid "File for preferences for each site"
+msgstr "サイト別設定のファイル"
+
+#: rc.c:159
msgid "Password for anonymous FTP (your mail address)"
msgstr "FTPのパスワード(普通は自分のmail addressを使う)"
-#: rc.c:150
+#: rc.c:160
msgid "Generate domain part of password for FTP"
msgstr "FTPのパスワードのドメイン名を自動生成する"
-#: rc.c:151
+#: rc.c:161
msgid "User-Agent identification string"
msgstr "User-Agent"
-#: rc.c:152
+#: rc.c:162
msgid "Accept-Encoding header"
msgstr "圧縮方法(Accept-Encoding:)"
-#: rc.c:153
+#: rc.c:163
msgid "Accept header"
msgstr "受けつけるメディアタイプ(Accept:)"
-#: rc.c:154
+#: rc.c:164
msgid "Accept-Language header"
msgstr "受けつける言語(Accept-Language:)"
-#: rc.c:155
+#: rc.c:165
msgid "Treat URL-like strings as links in all pages"
msgstr "全てのページのURL風の文字列をリンクにする"
-#: rc.c:156
+#: rc.c:166
msgid "Wrap search"
msgstr "折り返し検索"
-#: rc.c:157
+#: rc.c:167
msgid "Display unseen objects (e.g. bgimage tag)"
msgstr "背景画像等へのリンクを作る"
-#: rc.c:158
+#: rc.c:168
msgid "Uncompress compressed data automatically when downloading"
msgstr "ダウンロード時に自動的に圧縮されたデータを解凍する"
-#: rc.c:160
+#: rc.c:170
msgid "Run external viewer in a separate session"
msgstr "外部ビューアを別セッションで動かす"
-#: rc.c:162
+#: rc.c:172
msgid "Run external viewer in the background"
msgstr "外部ビューアをバックグラウンドで動かす"
-#: rc.c:164
+#: rc.c:174
msgid "Use external program for directory listing"
msgstr "ディレクトリリストに外部コマンドを使う"
-#: rc.c:165
+#: rc.c:175
msgid "URL of directory listing command"
msgstr "ディレクトリリスト用コマンド"
-#: rc.c:167
+#: rc.c:177
msgid "Enable dictionary lookup through CGI"
msgstr "辞書引きをCGI経由でおこなう"
-#: rc.c:168
+#: rc.c:178
msgid "URL of dictionary lookup command"
msgstr "辞書引きコマンドのURL"
-#: rc.c:170
+#: rc.c:180
msgid "Display link name for images lacking ALT"
msgstr "空のIMG ALT属性の時にリンク名を表示する"
-#: rc.c:171
+#: rc.c:181
msgid "Index file for directories"
msgstr "各ディレクトリのインデックスファイル"
-#: rc.c:172
+#: rc.c:182
msgid "Prepend http:// to URL automatically"
msgstr "URLに自動的に http:// を補う"
-#: rc.c:173
+#: rc.c:183
msgid "Default value for open-URL command"
msgstr "URLを開く時のデフォルト文字列"
-#: rc.c:174
+#: rc.c:184
msgid "Decode Content-Transfer-Encoding when saving"
msgstr "保存時に Content-Transfer-Encoding をデコードする"
-#: rc.c:175
+#: rc.c:185
msgid "Preserve timestamp when saving"
msgstr "保存時にタイムスタンプを保持する"
-#: rc.c:177
+#: rc.c:187
msgid "Enable mouse"
msgstr "マウスを使う"
-#: rc.c:178
+#: rc.c:188
msgid "Scroll in reverse direction of mouse drag"
msgstr "マウスのドラッグ動作を逆にする"
-#: rc.c:179
+#: rc.c:189
msgid "Behavior of wheel scroll speed"
msgstr "ホイールでのスクロール速度の扱い"
-#: rc.c:180
+#: rc.c:190
msgid "(A only)Scroll by # (%) of screen"
msgstr "(Aのみ)画面の何%スクロールするか"
-#: rc.c:181
+#: rc.c:191
msgid "(B only)Scroll by # lines"
msgstr "(Bのみ)スクロールする行数"
-#: rc.c:183
+#: rc.c:193
msgid "Free memory of undisplayed buffers"
msgstr "表示されていないバッファのメモリを解放する"
-#: rc.c:184
+#: rc.c:194
msgid "Suppress `Referer:' header"
msgstr "Referer: を送らないようにする"
-#: rc.c:185
+#: rc.c:195
msgid "Search case-insensitively"
msgstr "サーチ時に大文字小文字の区別をしない"
-#: rc.c:186
+#: rc.c:196
msgid "Use LESSOPEN"
msgstr "LESSOPENを使用"
-#: rc.c:189
+#: rc.c:199
msgid "Perform SSL server verification"
msgstr "SSLのサーバ認証を行う"
-#: rc.c:190
+#: rc.c:200
msgid "PEM encoded certificate file of client"
msgstr "SSLのクライアント用PEM形式証明書ファイル"
-#: rc.c:191
+#: rc.c:201
msgid "PEM encoded private key file of client"
msgstr "SSLのクライアント用PEM形式秘密鍵ファイル"
-#: rc.c:192
+#: rc.c:202
msgid "Path to directory for PEM encoded certificates of CAs"
msgstr "SSLの認証局のPEM形式証明書群のあるディレクトリへのパス"
-#: rc.c:193
+#: rc.c:203
msgid "File consisting of PEM encoded certificates of CAs"
msgstr "SSLの認証局のPEM形式証明書群のファイル"
-#: rc.c:195
-msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)"
-msgstr "使わないSSLメソッドのリスト(2: SSLv2, 3: SSLv3, t:TLSv1)"
+#: rc.c:205
+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
+msgstr "使わないSSLメソッドのリスト(2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
-#: rc.c:198
+#: rc.c:208
msgid "Enable cookie processing"
msgstr "クッキーを使用する"
-#: rc.c:199
+#: rc.c:209
msgid "Print a message when receiving a cookie"
msgstr "クッキーを受け付けたときにメッセージを表示する"
-#: rc.c:200
+#: rc.c:210
msgid "Accept cookies"
msgstr "クッキーを受け付ける"
-#: rc.c:201
+#: rc.c:211
msgid "Action to be taken on invalid cookie"
msgstr "問題のあるクッキーでも受け付ける"
-#: rc.c:202
+#: rc.c:212
msgid "Domains to reject cookies from"
msgstr "クッキーを受け付けないドメイン"
-#: rc.c:203
+#: rc.c:213
msgid "Domains to accept cookies from"
msgstr "クッキーを受け付けるドメイン"
-#: rc.c:204
+#: rc.c:214
msgid "Domains to avoid [wrong number of dots]"
msgstr "[wrong number of dots] を無視するドメイン"
-#: rc.c:206
+#: rc.c:216
msgid "Number of redirections to follow"
msgstr "従うリダイレクトの回数"
-#: rc.c:207
+#: rc.c:217
msgid "Enable processing of meta-refresh tag"
msgstr "meta refresh に対応する"
-#: rc.c:210
+#: rc.c:220
msgid "Enable Migemo (Roma-ji search)"
msgstr "Migemo(ローマ字検索)を使用する"
-#: rc.c:211
+#: rc.c:221
msgid "Migemo command"
msgstr "Migemoコマンド"
-#: rc.c:215
+#: rc.c:225
msgid "Display charset"
msgstr "表示用文字コード"
-#: rc.c:216
+#: rc.c:226
msgid "Default document charset"
msgstr "文書の標準の文字コード"
-#: rc.c:217
+#: rc.c:227
msgid "Automatic charset detect when loading"
msgstr "文書の読み込み時に文字コードの自動判定を行う"
-#: rc.c:218
+#: rc.c:228
msgid "System charset"
msgstr "システムの文字コード"
-#: rc.c:219
+#: rc.c:229
msgid "System charset follows locale(LC_CTYPE)"
msgstr "Locale(LC_CTYPE) に従ってシステムの文字コードを設定"
-#: rc.c:220
+#: rc.c:230
msgid "Output halfdump with display charset"
msgstr "表示用文字コードで halfdump の出力を行う"
-#: rc.c:221
+#: rc.c:231
msgid "Use multi column characters"
msgstr "複数カラムの文字を使う"
-#: rc.c:222
+#: rc.c:232
msgid "Use combining characters"
msgstr "結合文字を使う"
-#: rc.c:223
+#: rc.c:233
msgid "Use double width for some Unicode characters"
msgstr "ある種のUnicode文字を全角にする"
-#: rc.c:224
+#: rc.c:234
msgid "Use Unicode language tags"
msgstr "Unicode の言語タグを使う"
-#: rc.c:225
+#: rc.c:235
msgid "Charset conversion using Unicode map"
msgstr "Unicodeを介したコード変換"
-#: rc.c:226
+#: rc.c:236
msgid "Charset conversion when loading"
msgstr "文書の読み込み時に文字コードを変換する"
-#: rc.c:227
+#: rc.c:237
msgid "Adjust search string for document charset"
msgstr "検索文字列を文書の文字コードに変換する"
-#: rc.c:228
+#: rc.c:238
msgid "Fix character width when conversion"
msgstr "文字幅の変わる変換をしない"
-#: rc.c:229
+#: rc.c:239
msgid "Use GB 12345 Unicode map instead of GB 2312's"
msgstr "GB 12345 の Unicode マップを GB 2312 用に使う"
-#: rc.c:230
+#: rc.c:240
msgid "Use JIS X 0201 Roman for ISO-2022-JP"
msgstr "ISO-2022-JP で JIS X 0201-Roman を使う"
-#: rc.c:231
+#: rc.c:241
msgid "Use JIS C 6226:1978 for ISO-2022-JP"
msgstr "ISO-2022-JP で JIS C 6226:1978(旧JIS) を使う"
-#: rc.c:232
+#: rc.c:242
msgid "Use JIS X 0201 Katakana"
msgstr "JIS X 0201-Katakana を使う"
-#: rc.c:233
+#: rc.c:243
msgid "Use JIS X 0212:1990 (Supplemental Kanji)"
msgstr "JIS X 0212:1990(補助漢字) を使う"
-#: rc.c:234
+#: rc.c:244
msgid "Use JIS X 0213:2000 (2000JIS)"
msgstr "JIS X 0213:2000(2000JIS) を使う"
-#: rc.c:235
+#: rc.c:245
msgid "Strict ISO-2022-JP/KR/CN"
msgstr "厳格な ISO-2022-JP/KR/CN を使う"
-#: rc.c:236
+#: rc.c:246
msgid "Treat 4 bytes char. of GB18030 as Unicode"
msgstr "GB18030 の 4バイト文字を Unicode として扱う"
-#: rc.c:237
+#: rc.c:247
msgid "Simple Preserve space"
msgstr "単純な空白の保存"
-#: rc.c:240
+#: rc.c:250
msgid "keymap file"
msgstr "keymapファイル"
-#: rc.c:257
+#: rc.c:267
msgid "black"
msgstr "黒"
-#: rc.c:258
+#: rc.c:268
msgid "red"
msgstr "赤"
-#: rc.c:259
+#: rc.c:269
msgid "green"
msgstr "緑"
-#: rc.c:260
+#: rc.c:270
msgid "yellow"
msgstr "黄"
-#: rc.c:261
+#: rc.c:271
msgid "blue"
msgstr "青"
-#: rc.c:262
+#: rc.c:272
msgid "magenta"
msgstr "紫"
-#: rc.c:263
+#: rc.c:273
msgid "cyan"
msgstr "空色"
-#: rc.c:264
+#: rc.c:274
msgid "white"
msgstr "白"
-#: rc.c:265
+#: rc.c:275
msgid "terminal"
msgstr "端末"
-#: rc.c:284
+#: rc.c:294
msgid "none"
msgstr "無し"
-#: rc.c:285
+#: rc.c:295
msgid "current URL"
msgstr "現在のURL"
-#: rc.c:286
+#: rc.c:296
msgid "link URL"
msgstr "リンク先のURL"
-#: rc.c:291
+#: rc.c:301
msgid "simple"
msgstr "シンプル"
-#: rc.c:292
+#: rc.c:302
msgid "use tag"
msgstr "タグで表示"
-#: rc.c:293
+#: rc.c:303
msgid "fontify"
msgstr "文字装飾"
-#: rc.c:299
+#: rc.c:309
msgid "A:relative to screen height"
msgstr "A:画面サイズに比例"
-#: rc.c:300
+#: rc.c:310
msgid "B:fixed speed"
msgstr "B:一定の行数"
-#: rc.c:307
+#: rc.c:317
msgid "unspecified"
msgstr "指定しない"
-#: rc.c:308
+#: rc.c:318
msgid "inet inet6"
msgstr "IPv4優先"
-#: rc.c:309
+#: rc.c:319
msgid "inet6 inet"
msgstr "IPv6優先"
-#: rc.c:310
+#: rc.c:320
msgid "inet only"
msgstr "IPv4のみ"
-#: rc.c:311
+#: rc.c:321
msgid "inet6 only"
msgstr "IPv6のみ"
-#: rc.c:318
+#: rc.c:328
msgid "discard"
msgstr "破棄する"
-#: rc.c:320
+#: rc.c:330
msgid "accept"
msgstr "受け入れる"
-#: rc.c:322
+#: rc.c:332
msgid "ask"
msgstr "確認する"
-#: rc.c:329
+#: rc.c:339
msgid "use internal mailer instead"
msgstr "内部メーラを使用"
-#: rc.c:331
+#: rc.c:341
msgid "ignore options and use only the address"
msgstr "アドレスのみ使用"
-#: rc.c:332
+#: rc.c:342
msgid "use full mailto URL"
msgstr "URL 全体を使用"
-#: rc.c:341
+#: rc.c:351
msgid "OFF"
msgstr "無効"
-#: rc.c:342
+#: rc.c:352
msgid "Only ISO 2022"
msgstr "ISO 2022 のみ"
-#: rc.c:343
+#: rc.c:353
msgid "ON"
msgstr "有効"
-#: rc.c:349
+#: rc.c:359
msgid "ASCII"
msgstr "ASCII"
-#: rc.c:350
+#: rc.c:360
msgid "charset specific"
msgstr "文字コード依存"
-#: rc.c:351
+#: rc.c:361
msgid "DEC special graphics"
msgstr "DEC 特殊文字"
-#: rc.c:714
+#: rc.c:740
msgid "Display Settings"
msgstr "表示関係"
-#: rc.c:716
+#: rc.c:742
msgid "Color Settings"
msgstr "表示色"
-#: rc.c:718
+#: rc.c:744
msgid "Miscellaneous Settings"
msgstr "雑多な設定"
-#: rc.c:719
+#: rc.c:745
msgid "Directory Settings"
msgstr "ディレクトリ設定"
-#: rc.c:720
+#: rc.c:746
msgid "External Program Settings"
msgstr "外部プログラム"
-#: rc.c:721
+#: rc.c:747
msgid "Network Settings"
msgstr "ネットワークの設定"
-#: rc.c:722
+#: rc.c:748
msgid "Proxy Settings"
msgstr "プロキシの設定"
-#: rc.c:724
+#: rc.c:750
msgid "SSL Settings"
msgstr "SSLの設定"
-#: rc.c:727
+#: rc.c:753
msgid "Cookie Settings"
msgstr "クッキーの設定"
-#: rc.c:730
+#: rc.c:756
msgid "Charset Settings"
msgstr "文字コードの設定"
@@ -875,6 +907,6 @@ msgstr "文字コードの設定"
#. * header. For example, ja.po should translate it as
#. * "ja;q=1.0, en;q=0.5" like that.
#.
-#: rc.c:1209
+#: rc.c:1238
msgid "en;q=1.0"
msgstr "ja;q=1.0, en;q=0.5"
diff --git a/po/w3m.pot b/po/w3m.pot
index e164b1e..bf38ef8 100644
--- a/po/w3m.pot
+++ b/po/w3m.pot
@@ -1,6 +1,6 @@
# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Fumitoshi UKAI
-# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE w3m'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the w3m package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: w3m 0.5.3\n"
"Report-Msgid-Bugs-To: satodai@w3m.jp\n"
-"POT-Creation-Date: 2010-08-20 18:44+0900\n"
+"POT-Creation-Date: 2016-03-14 19:47+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,855 +17,887 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: menu.c:267
+#: menu.c:269
msgid " Back (b) "
msgstr ""
-#: menu.c:268
+#: menu.c:270
msgid " Select Buffer(s) "
msgstr ""
-#: menu.c:270
+#: menu.c:272
msgid " Select Tab (t) "
msgstr ""
-#: menu.c:272
+#: menu.c:274
msgid " View Source (v) "
msgstr ""
-#: menu.c:273
+#: menu.c:275
msgid " Edit Source (e) "
msgstr ""
-#: menu.c:274
+#: menu.c:276
msgid " Save Source (S) "
msgstr ""
-#: menu.c:275
+#: menu.c:277
msgid " Reload (r) "
msgstr ""
-#: menu.c:276 menu.c:283 menu.c:287
+#: menu.c:278 menu.c:285 menu.c:289
msgid " ---------------- "
msgstr ""
-#: menu.c:277
+#: menu.c:279
msgid " Go Link (a) "
msgstr ""
-#: menu.c:278
+#: menu.c:280
msgid " on New Tab (n) "
msgstr ""
-#: menu.c:279
+#: menu.c:281
msgid " Save Link (A) "
msgstr ""
-#: menu.c:280
+#: menu.c:282
msgid " View Image (i) "
msgstr ""
-#: menu.c:281
+#: menu.c:283
msgid " Save Image (I) "
msgstr ""
-#: menu.c:282
+#: menu.c:284
msgid " View Frame (f) "
msgstr ""
-#: menu.c:284
+#: menu.c:286
msgid " Bookmark (B) "
msgstr ""
-#: menu.c:285
+#: menu.c:287
msgid " Help (h) "
msgstr ""
-#: menu.c:286
+#: menu.c:288
msgid " Option (o) "
msgstr ""
-#: menu.c:288
+#: menu.c:290
msgid " Quit (q) "
msgstr ""
-#: rc.c:60
+#: rc.c:62
msgid "External Viewer Setup"
msgstr ""
-#: rc.c:61
+#: rc.c:63
msgid "Tab width in characters"
msgstr ""
-#: rc.c:62
+#: rc.c:64
msgid "Indent for HTML rendering"
msgstr ""
-#: rc.c:63
+#: rc.c:65
msgid "Number of pixels per character (4.0...32.0)"
msgstr ""
-#: rc.c:64
+#: rc.c:66
msgid "Number of pixels per line (4.0...64.0)"
msgstr ""
-#: rc.c:65
+#: rc.c:67
msgid "Number of remembered lines when used as a pager"
msgstr ""
-#: rc.c:66
+#: rc.c:68
msgid "Use URL history"
msgstr ""
-#: rc.c:67
+#: rc.c:69
msgid "Number of remembered URL"
msgstr ""
-#: rc.c:68
+#: rc.c:70
msgid "Save URL history"
msgstr ""
-#: rc.c:69
+#: rc.c:71
msgid "Render frames automatically"
msgstr ""
-#: rc.c:70
+#: rc.c:72
msgid "Treat argument without scheme as URL"
msgstr ""
-#: rc.c:71
+#: rc.c:73
msgid "Use _self as default target"
msgstr ""
-#: rc.c:72
+#: rc.c:74
msgid "Open link on new tab if target is _blank or _new"
msgstr ""
-#: rc.c:73
+#: rc.c:75
msgid "Open download list panel on new tab"
msgstr ""
-#: rc.c:74
+#: rc.c:76
msgid "Display link URL automatically"
msgstr ""
-#: rc.c:75
+#: rc.c:77
msgid "Display link numbers"
msgstr ""
-#: rc.c:76
+#: rc.c:78
msgid "Display decoded URL"
msgstr ""
-#: rc.c:77
+#: rc.c:79
msgid "Display current line number"
msgstr ""
-#: rc.c:78
+#: rc.c:80
msgid "Display inline images"
msgstr ""
-#: rc.c:79
+#: rc.c:81
msgid "Display pseudo-ALTs for inline images with no ALT or TITLE string"
msgstr ""
-#: rc.c:81
+#: rc.c:83
msgid "Load inline images automatically"
msgstr ""
-#: rc.c:82
+#: rc.c:84
msgid "Maximum processes for parallel image loading"
msgstr ""
-#: rc.c:83
+#: rc.c:85
msgid "Use external image viewer"
msgstr ""
-#: rc.c:84
+#: rc.c:86
msgid "Scale of image (%)"
msgstr ""
-#: rc.c:85
+#: rc.c:87
msgid "External command to display image"
msgstr ""
-#: rc.c:86
+#: rc.c:88
msgid "Use link list of image map"
msgstr ""
-#: rc.c:88
+#: rc.c:90
msgid "Display file names in multi-column format"
msgstr ""
-#: rc.c:89
+#: rc.c:91
msgid "Use ASCII equivalents to display entities"
msgstr ""
-#: rc.c:90
+#: rc.c:92
msgid "Character type for border of table and menu"
msgstr ""
-#: rc.c:91
+#: rc.c:93
+msgid "Display table borders, ignore value of BORDER"
+msgstr ""
+
+#: rc.c:94
msgid "Fold lines in TEXTAREA"
msgstr ""
-#: rc.c:92
+#: rc.c:95
msgid "Display INS, DEL, S and STRIKE element"
msgstr ""
-#: rc.c:93
+#: rc.c:96
msgid "Display with color"
msgstr ""
-#: rc.c:94
+#: rc.c:97
msgid "Color of normal character"
msgstr ""
-#: rc.c:95
+#: rc.c:98
msgid "Color of anchor"
msgstr ""
-#: rc.c:96
+#: rc.c:99
msgid "Color of image link"
msgstr ""
-#: rc.c:97
+#: rc.c:100
msgid "Color of form"
msgstr ""
-#: rc.c:98
+#: rc.c:101
msgid "Enable coloring of active link"
msgstr ""
-#: rc.c:99
+#: rc.c:102
msgid "Color of currently active link"
msgstr ""
-#: rc.c:100
+#: rc.c:103
msgid "Use visited link color"
msgstr ""
-#: rc.c:101
+#: rc.c:104
msgid "Color of visited link"
msgstr ""
-#: rc.c:102
+#: rc.c:105
msgid "Color of background"
msgstr ""
-#: rc.c:103
+#: rc.c:106
msgid "Color of mark"
msgstr ""
-#: rc.c:104
+#: rc.c:107
msgid "Use proxy"
msgstr ""
-#: rc.c:105
+#: rc.c:108
msgid "URL of HTTP proxy host"
msgstr ""
-#: rc.c:107
+#: rc.c:110
msgid "URL of HTTPS proxy host"
msgstr ""
-#: rc.c:110
+#: rc.c:113
msgid "URL of GOPHER proxy host"
msgstr ""
-#: rc.c:112
+#: rc.c:115
msgid "URL of FTP proxy host"
msgstr ""
-#: rc.c:113
+#: rc.c:116
msgid "Domains to be accessed directly (no proxy)"
msgstr ""
-#: rc.c:114
+#: rc.c:117
msgid "Check noproxy by network address"
msgstr ""
-#: rc.c:115
+#: rc.c:118
msgid "Disable cache"
msgstr ""
-#: rc.c:117
+#: rc.c:120
msgid "News server"
msgstr ""
-#: rc.c:118
+#: rc.c:121
msgid "Mode of news server"
msgstr ""
-#: rc.c:119
+#: rc.c:122
msgid "Number of news messages"
msgstr ""
-#: rc.c:121
+#: rc.c:124
msgid "Order of name resolution"
msgstr ""
-#: rc.c:122
+#: rc.c:125
msgid "Directory corresponding to / (document root)"
msgstr ""
-#: rc.c:123
+#: rc.c:126
msgid "Directory corresponding to /~user"
msgstr ""
-#: rc.c:124
+#: rc.c:127
msgid "Directory corresponding to /cgi-bin"
msgstr ""
-#: rc.c:125
+#: rc.c:128
msgid "Confirm when quitting with q"
msgstr ""
-#: rc.c:126
+#: rc.c:129
msgid "Close tab if buffer is last when back"
msgstr ""
-#: rc.c:128
+#: rc.c:131
msgid "Enable mark operations"
msgstr ""
-#: rc.c:130
+#: rc.c:133
msgid "Enable Emacs-style line editing"
msgstr ""
-#: rc.c:131
+#: rc.c:134
msgid "Enable vi-like numeric prefix"
msgstr ""
-#: rc.c:132
+#: rc.c:135
msgid "Move cursor to top line when going to label"
msgstr ""
-#: rc.c:133
+#: rc.c:136
msgid "Move cursor to top line when moving to next page"
msgstr ""
-#: rc.c:134
+#: rc.c:137
msgid "Fold lines of plain text file"
msgstr ""
-#: rc.c:135
+#: rc.c:138
msgid "Show line numbers"
msgstr ""
-#: rc.c:136
+#: rc.c:139
msgid "Show search string"
msgstr ""
-#: rc.c:137
+#: rc.c:140
msgid "List of mime.types files"
msgstr ""
-#: rc.c:138
+#: rc.c:141
msgid "List of mailcap files"
msgstr ""
-#: rc.c:139
+#: rc.c:142
msgid "List of urimethodmap files"
msgstr ""
-#: rc.c:140
+#: rc.c:143
msgid "Editor"
msgstr ""
-#: rc.c:141
+#: rc.c:144
msgid "Mailer"
msgstr ""
-#: rc.c:142
+#: rc.c:145
msgid "How to call Mailer for mailto URLs with options"
msgstr ""
-#: rc.c:143
-msgid "External Browser"
+#: rc.c:146
+msgid "External browser"
msgstr ""
-#: rc.c:144
-msgid "Second External Browser"
+#: rc.c:147
+msgid "2nd external browser"
msgstr ""
-#: rc.c:145
-msgid "Third External Browser"
+#: rc.c:148
+msgid "3rd external browser"
msgstr ""
-#: rc.c:146
+#: rc.c:149
+msgid "4th external browser"
+msgstr ""
+
+#: rc.c:150
+msgid "5th external browser"
+msgstr ""
+
+#: rc.c:151
+msgid "6th external browser"
+msgstr ""
+
+#: rc.c:152
+msgid "7th external browser"
+msgstr ""
+
+#: rc.c:153
+msgid "8th external browser"
+msgstr ""
+
+#: rc.c:154
+msgid "9th external browser"
+msgstr ""
+
+#: rc.c:155
msgid "Disable secret file security check"
msgstr ""
-#: rc.c:147
+#: rc.c:156
msgid "Password file"
msgstr ""
-#: rc.c:148
+#: rc.c:157
msgid "File for setting form on loading"
msgstr ""
-#: rc.c:149
+#: rc.c:158
+msgid "File for preferences for each site"
+msgstr ""
+
+#: rc.c:159
msgid "Password for anonymous FTP (your mail address)"
msgstr ""
-#: rc.c:150
+#: rc.c:160
msgid "Generate domain part of password for FTP"
msgstr ""
-#: rc.c:151
+#: rc.c:161
msgid "User-Agent identification string"
msgstr ""
-#: rc.c:152
+#: rc.c:162
msgid "Accept-Encoding header"
msgstr ""
-#: rc.c:153
+#: rc.c:163
msgid "Accept header"
msgstr ""
-#: rc.c:154
+#: rc.c:164
msgid "Accept-Language header"
msgstr ""
-#: rc.c:155
+#: rc.c:165
msgid "Treat URL-like strings as links in all pages"
msgstr ""
-#: rc.c:156
+#: rc.c:166
msgid "Wrap search"
msgstr ""
-#: rc.c:157
+#: rc.c:167
msgid "Display unseen objects (e.g. bgimage tag)"
msgstr ""
-#: rc.c:158
+#: rc.c:168
msgid "Uncompress compressed data automatically when downloading"
msgstr ""
-#: rc.c:160
+#: rc.c:170
msgid "Run external viewer in a separate session"
msgstr ""
-#: rc.c:162
+#: rc.c:172
msgid "Run external viewer in the background"
msgstr ""
-#: rc.c:164
+#: rc.c:174
msgid "Use external program for directory listing"
msgstr ""
-#: rc.c:165
+#: rc.c:175
msgid "URL of directory listing command"
msgstr ""
-#: rc.c:167
+#: rc.c:177
msgid "Enable dictionary lookup through CGI"
msgstr ""
-#: rc.c:168
+#: rc.c:178
msgid "URL of dictionary lookup command"
msgstr ""
-#: rc.c:170
+#: rc.c:180
msgid "Display link name for images lacking ALT"
msgstr ""
-#: rc.c:171
+#: rc.c:181
msgid "Index file for directories"
msgstr ""
-#: rc.c:172
+#: rc.c:182
msgid "Prepend http:// to URL automatically"
msgstr ""
-#: rc.c:173
+#: rc.c:183
msgid "Default value for open-URL command"
msgstr ""
-#: rc.c:174
+#: rc.c:184
msgid "Decode Content-Transfer-Encoding when saving"
msgstr ""
-#: rc.c:175
+#: rc.c:185
msgid "Preserve timestamp when saving"
msgstr ""
-#: rc.c:177
+#: rc.c:187
msgid "Enable mouse"
msgstr ""
-#: rc.c:178
+#: rc.c:188
msgid "Scroll in reverse direction of mouse drag"
msgstr ""
-#: rc.c:179
+#: rc.c:189
msgid "Behavior of wheel scroll speed"
msgstr ""
-#: rc.c:180
+#: rc.c:190
msgid "(A only)Scroll by # (%) of screen"
msgstr ""
-#: rc.c:181
+#: rc.c:191
msgid "(B only)Scroll by # lines"
msgstr ""
-#: rc.c:183
+#: rc.c:193
msgid "Free memory of undisplayed buffers"
msgstr ""
-#: rc.c:184
+#: rc.c:194
msgid "Suppress `Referer:' header"
msgstr ""
-#: rc.c:185
+#: rc.c:195
msgid "Search case-insensitively"
msgstr ""
-#: rc.c:186
+#: rc.c:196
msgid "Use LESSOPEN"
msgstr ""
-#: rc.c:189
+#: rc.c:199
msgid "Perform SSL server verification"
msgstr ""
-#: rc.c:190
+#: rc.c:200
msgid "PEM encoded certificate file of client"
msgstr ""
-#: rc.c:191
+#: rc.c:201
msgid "PEM encoded private key file of client"
msgstr ""
-#: rc.c:192
+#: rc.c:202
msgid "Path to directory for PEM encoded certificates of CAs"
msgstr ""
-#: rc.c:193
+#: rc.c:203
msgid "File consisting of PEM encoded certificates of CAs"
msgstr ""
-#: rc.c:195
-msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)"
+#: rc.c:205
+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
msgstr ""
-#: rc.c:198
+#: rc.c:208
msgid "Enable cookie processing"
msgstr ""
-#: rc.c:199
+#: rc.c:209
msgid "Print a message when receiving a cookie"
msgstr ""
-#: rc.c:200
+#: rc.c:210
msgid "Accept cookies"
msgstr ""
-#: rc.c:201
+#: rc.c:211
msgid "Action to be taken on invalid cookie"
msgstr ""
-#: rc.c:202
+#: rc.c:212
msgid "Domains to reject cookies from"
msgstr ""
-#: rc.c:203
+#: rc.c:213
msgid "Domains to accept cookies from"
msgstr ""
-#: rc.c:204
+#: rc.c:214
msgid "Domains to avoid [wrong number of dots]"
msgstr ""
-#: rc.c:206
+#: rc.c:216
msgid "Number of redirections to follow"
msgstr ""
-#: rc.c:207
+#: rc.c:217
msgid "Enable processing of meta-refresh tag"
msgstr ""
-#: rc.c:210
+#: rc.c:220
msgid "Enable Migemo (Roma-ji search)"
msgstr ""
-#: rc.c:211
+#: rc.c:221
msgid "Migemo command"
msgstr ""
-#: rc.c:215
+#: rc.c:225
msgid "Display charset"
msgstr ""
-#: rc.c:216
+#: rc.c:226
msgid "Default document charset"
msgstr ""
-#: rc.c:217
+#: rc.c:227
msgid "Automatic charset detect when loading"
msgstr ""
-#: rc.c:218
+#: rc.c:228
msgid "System charset"
msgstr ""
-#: rc.c:219
+#: rc.c:229
msgid "System charset follows locale(LC_CTYPE)"
msgstr ""
-#: rc.c:220
+#: rc.c:230
msgid "Output halfdump with display charset"
msgstr ""
-#: rc.c:221
+#: rc.c:231
msgid "Use multi column characters"
msgstr ""
-#: rc.c:222
+#: rc.c:232
msgid "Use combining characters"
msgstr ""
-#: rc.c:223
+#: rc.c:233
msgid "Use double width for some Unicode characters"
msgstr ""
-#: rc.c:224
+#: rc.c:234
msgid "Use Unicode language tags"
msgstr ""
-#: rc.c:225
+#: rc.c:235
msgid "Charset conversion using Unicode map"
msgstr ""
-#: rc.c:226
+#: rc.c:236
msgid "Charset conversion when loading"
msgstr ""
-#: rc.c:227
+#: rc.c:237
msgid "Adjust search string for document charset"
msgstr ""
-#: rc.c:228
+#: rc.c:238
msgid "Fix character width when conversion"
msgstr ""
-#: rc.c:229
+#: rc.c:239
msgid "Use GB 12345 Unicode map instead of GB 2312's"
msgstr ""
-#: rc.c:230
+#: rc.c:240
msgid "Use JIS X 0201 Roman for ISO-2022-JP"
msgstr ""
-#: rc.c:231
+#: rc.c:241
msgid "Use JIS C 6226:1978 for ISO-2022-JP"
msgstr ""
-#: rc.c:232
+#: rc.c:242
msgid "Use JIS X 0201 Katakana"
msgstr ""
-#: rc.c:233
+#: rc.c:243
msgid "Use JIS X 0212:1990 (Supplemental Kanji)"
msgstr ""
-#: rc.c:234
+#: rc.c:244
msgid "Use JIS X 0213:2000 (2000JIS)"
msgstr ""
-#: rc.c:235
+#: rc.c:245
msgid "Strict ISO-2022-JP/KR/CN"
msgstr ""
-#: rc.c:236
+#: rc.c:246
msgid "Treat 4 bytes char. of GB18030 as Unicode"
msgstr ""
-#: rc.c:237
+#: rc.c:247
msgid "Simple Preserve space"
msgstr ""
-#: rc.c:240
+#: rc.c:250
msgid "keymap file"
msgstr ""
-#: rc.c:257
+#: rc.c:267
msgid "black"
msgstr ""
-#: rc.c:258
+#: rc.c:268
msgid "red"
msgstr ""
-#: rc.c:259
+#: rc.c:269
msgid "green"
msgstr ""
-#: rc.c:260
+#: rc.c:270
msgid "yellow"
msgstr ""
-#: rc.c:261
+#: rc.c:271
msgid "blue"
msgstr ""
-#: rc.c:262
+#: rc.c:272
msgid "magenta"
msgstr ""
-#: rc.c:263
+#: rc.c:273
msgid "cyan"
msgstr ""
-#: rc.c:264
+#: rc.c:274
msgid "white"
msgstr ""
-#: rc.c:265
+#: rc.c:275
msgid "terminal"
msgstr ""
-#: rc.c:284
+#: rc.c:294
msgid "none"
msgstr ""
-#: rc.c:285
+#: rc.c:295
msgid "current URL"
msgstr ""
-#: rc.c:286
+#: rc.c:296
msgid "link URL"
msgstr ""
-#: rc.c:291
+#: rc.c:301
msgid "simple"
msgstr ""
-#: rc.c:292
+#: rc.c:302
msgid "use tag"
msgstr ""
-#: rc.c:293
+#: rc.c:303
msgid "fontify"
msgstr ""
-#: rc.c:299
+#: rc.c:309
msgid "A:relative to screen height"
msgstr ""
-#: rc.c:300
+#: rc.c:310
msgid "B:fixed speed"
msgstr ""
-#: rc.c:307
+#: rc.c:317
msgid "unspecified"
msgstr ""
-#: rc.c:308
+#: rc.c:318
msgid "inet inet6"
msgstr ""
-#: rc.c:309
+#: rc.c:319
msgid "inet6 inet"
msgstr ""
-#: rc.c:310
+#: rc.c:320
msgid "inet only"
msgstr ""
-#: rc.c:311
+#: rc.c:321
msgid "inet6 only"
msgstr ""
-#: rc.c:318
+#: rc.c:328
msgid "discard"
msgstr ""
-#: rc.c:320
+#: rc.c:330
msgid "accept"
msgstr ""
-#: rc.c:322
+#: rc.c:332
msgid "ask"
msgstr ""
-#: rc.c:329
+#: rc.c:339
msgid "use internal mailer instead"
msgstr ""
-#: rc.c:331
+#: rc.c:341
msgid "ignore options and use only the address"
msgstr ""
-#: rc.c:332
+#: rc.c:342
msgid "use full mailto URL"
msgstr ""
-#: rc.c:341
+#: rc.c:351
msgid "OFF"
msgstr ""
-#: rc.c:342
+#: rc.c:352
msgid "Only ISO 2022"
msgstr ""
-#: rc.c:343
+#: rc.c:353
msgid "ON"
msgstr ""
-#: rc.c:349
+#: rc.c:359
msgid "ASCII"
msgstr ""
-#: rc.c:350
+#: rc.c:360
msgid "charset specific"
msgstr ""
-#: rc.c:351
+#: rc.c:361
msgid "DEC special graphics"
msgstr ""
-#: rc.c:714
+#: rc.c:740
msgid "Display Settings"
msgstr ""
-#: rc.c:716
+#: rc.c:742
msgid "Color Settings"
msgstr ""
-#: rc.c:718
+#: rc.c:744
msgid "Miscellaneous Settings"
msgstr ""
-#: rc.c:719
+#: rc.c:745
msgid "Directory Settings"
msgstr ""
-#: rc.c:720
+#: rc.c:746
msgid "External Program Settings"
msgstr ""
-#: rc.c:721
+#: rc.c:747
msgid "Network Settings"
msgstr ""
-#: rc.c:722
+#: rc.c:748
msgid "Proxy Settings"
msgstr ""
-#: rc.c:724
+#: rc.c:750
msgid "SSL Settings"
msgstr ""
-#: rc.c:727
+#: rc.c:753
msgid "Cookie Settings"
msgstr ""
-#: rc.c:730
+#: rc.c:756
msgid "Charset Settings"
msgstr ""
@@ -874,6 +906,6 @@ msgstr ""
#. * header. For example, ja.po should translate it as
#. * "ja;q=1.0, en;q=0.5" like that.
#.
-#: rc.c:1209
+#: rc.c:1238
msgid "en;q=1.0"
msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
index 0000000..cf25e22
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,916 @@
+# zh_CN translation for w3m
+# Copyright (C) YEAR THE w3m'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the w3m package.
+# Junde Yi <lmy441900@gmail.com>, 2014.
+# Mingcong Bai <jeffbai@aosc.xyz>, 2014.
+# liushuyu <liushuyu_011@126.com>, 2014.
+# Xingda Zheng <icenowy@outlook.com>, 2014.
+# Mingye Wang (Arthur2e5) <arthur200126@gmail.com>, 2014, 2015.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: w3m 0.5.3\n"
+"Report-Msgid-Bugs-To: satodai@w3m.jp\n"
+"POT-Creation-Date: 2016-03-14 19:47+0900\n"
+"PO-Revision-Date: 2016-03-14 19:51+0900\n"
+"Last-Translator: Tatsuya Kinoshita <tats@debian.org>\n"
+"Language-Team: AOSC zh_CN <aosc@members.fsf.org>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.6\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: menu.c:269
+msgid " Back (b) "
+msgstr " 后退 (b) "
+
+#: menu.c:270
+msgid " Select Buffer(s) "
+msgstr " 选择缓冲区 "
+
+#: menu.c:272
+msgid " Select Tab (t) "
+msgstr " 选择标签 (t) "
+
+#: menu.c:274
+msgid " View Source (v) "
+msgstr " 查看源码 (v) "
+
+#: menu.c:275
+msgid " Edit Source (e) "
+msgstr " 修改源码 (e) "
+
+#: menu.c:276
+msgid " Save Source (S) "
+msgstr " 保存源码 (S) "
+
+#: menu.c:277
+msgid " Reload (r) "
+msgstr " 重新载入 (r) "
+
+#: menu.c:278 menu.c:285 menu.c:289
+msgid " ---------------- "
+msgstr " ---------------- "
+
+#: menu.c:279
+msgid " Go Link (a) "
+msgstr " 转到链接 (a) "
+
+#: menu.c:280
+msgid " on New Tab (n) "
+msgstr " 在新标签 (n) "
+
+#: menu.c:281
+msgid " Save Link (A) "
+msgstr " 保存链接 (A) "
+
+#: menu.c:282
+msgid " View Image (i) "
+msgstr " 查看图片 (i) "
+
+#: menu.c:283
+msgid " Save Image (I) "
+msgstr " 保存图片 (I) "
+
+#: menu.c:284
+msgid " View Frame (f) "
+msgstr " 查看框架 (f) "
+
+#: menu.c:286
+msgid " Bookmark (B) "
+msgstr " 书签 (B) "
+
+#: menu.c:287
+msgid " Help (h) "
+msgstr " 帮助 (h) "
+
+#: menu.c:288
+msgid " Option (o) "
+msgstr " 选项 (o) "
+
+#: menu.c:290
+msgid " Quit (q) "
+msgstr " 退出 (q) "
+
+#: rc.c:62
+msgid "External Viewer Setup"
+msgstr "外部查看器设置"
+
+#: rc.c:63
+msgid "Tab width in characters"
+msgstr "文字中的 TAB 宽度"
+
+#: rc.c:64
+msgid "Indent for HTML rendering"
+msgstr "用于 HTML 渲染"
+
+#: rc.c:65
+msgid "Number of pixels per character (4.0...32.0)"
+msgstr "每字体大小的像素值 (4.0...32.0)"
+
+#: rc.c:66
+msgid "Number of pixels per line (4.0...64.0)"
+msgstr "每行的像素数 (4.0...64.0)"
+
+#: rc.c:67
+msgid "Number of remembered lines when used as a pager"
+msgstr "当作为分页器使用时记忆的行数"
+
+#: rc.c:68
+msgid "Use URL history"
+msgstr "使用 URL 历史记录"
+
+#: rc.c:69
+msgid "Number of remembered URL"
+msgstr "记录的 URL 数量"
+
+#: rc.c:70
+msgid "Save URL history"
+msgstr "保存 URL 历史"
+
+#: rc.c:71
+msgid "Render frames automatically"
+msgstr "自动渲染框架"
+
+#: rc.c:72
+msgid "Treat argument without scheme as URL"
+msgstr "将无格式的参数看作 URL"
+
+#: rc.c:73
+msgid "Use _self as default target"
+msgstr "将自身作为默认目标 (_S)"
+
+#: rc.c:74
+msgid "Open link on new tab if target is _blank or _new"
+msgstr "如果目标为空 (_b) 或新建 (_n) 在新标签打开页面"
+
+#: rc.c:75
+msgid "Open download list panel on new tab"
+msgstr "打开下载列表面板于新标签"
+
+#: rc.c:76
+msgid "Display link URL automatically"
+msgstr "自动显示链接 URL"
+
+#: rc.c:77
+msgid "Display link numbers"
+msgstr "显示链接编号"
+
+#: rc.c:78
+msgid "Display decoded URL"
+msgstr "显示解码后的 URL"
+
+#: rc.c:79
+msgid "Display current line number"
+msgstr "显示当前行数"
+
+#: rc.c:80
+msgid "Display inline images"
+msgstr "显示内联图像"
+
+#: rc.c:81
+msgid "Display pseudo-ALTs for inline images with no ALT or TITLE string"
+msgstr "为不带有 ALT 或 TITLE 字串的内联图像显示伪 ALT"
+
+#: rc.c:83
+msgid "Load inline images automatically"
+msgstr "自动载入行内图像"
+
+#: rc.c:84
+msgid "Maximum processes for parallel image loading"
+msgstr "多线程图像加载的最大进程数"
+
+#: rc.c:85
+msgid "Use external image viewer"
+msgstr "使用外部图片查看器"
+
+#: rc.c:86
+msgid "Scale of image (%)"
+msgstr "图像比例尺 (%)"
+
+#: rc.c:87
+msgid "External command to display image"
+msgstr "用于显示图像的外部命令"
+
+#: rc.c:88
+msgid "Use link list of image map"
+msgstr "使用图像映射的链接列表"
+
+#: rc.c:90
+msgid "Display file names in multi-column format"
+msgstr "以多列格式显示文件名"
+
+#: rc.c:91
+msgid "Use ASCII equivalents to display entities"
+msgstr "使用对应的 ASCII 编码来显示实体 "
+
+#: rc.c:92
+msgid "Character type for border of table and menu"
+msgstr "表格和菜单边框的字符类型"
+
+#: rc.c:93
+msgid "Display table borders, ignore value of BORDER"
+msgstr "显示表格边框,忽略 BORDER 数值"
+
+#: rc.c:94
+msgid "Fold lines in TEXTAREA"
+msgstr "在文本区 (TEXTAREA) 中折叠行"
+
+#: rc.c:95
+msgid "Display INS, DEL, S and STRIKE element"
+msgstr "显示 INS, DEL, S 及 STRIKE 元素"
+
+#: rc.c:96
+msgid "Display with color"
+msgstr "使用带颜色的显示"
+
+#: rc.c:97
+msgid "Color of normal character"
+msgstr "一般文字颜色"
+
+#: rc.c:98
+msgid "Color of anchor"
+msgstr "链接文字颜色"
+
+#: rc.c:99
+msgid "Color of image link"
+msgstr "图片链接颜色"
+
+#: rc.c:100
+msgid "Color of form"
+msgstr "表格颜色"
+
+#: rc.c:101
+msgid "Enable coloring of active link"
+msgstr "为活动链接开启上色"
+
+#: rc.c:102
+msgid "Color of currently active link"
+msgstr "当前活动链接的颜色"
+
+#: rc.c:103
+msgid "Use visited link color"
+msgstr "为访问过的链接上色"
+
+#: rc.c:104
+msgid "Color of visited link"
+msgstr "已访问链接颜色"
+
+#: rc.c:105
+msgid "Color of background"
+msgstr "背景色"
+
+#: rc.c:106
+msgid "Color of mark"
+msgstr "标记颜色"
+
+#: rc.c:107
+msgid "Use proxy"
+msgstr "使用代理服务器"
+
+#: rc.c:108
+msgid "URL of HTTP proxy host"
+msgstr "HTTP 代理主机地址"
+
+#: rc.c:110
+msgid "URL of HTTPS proxy host"
+msgstr "HTTPS 代理主机地址"
+
+#: rc.c:113
+msgid "URL of GOPHER proxy host"
+msgstr "GOPHER 代理主机地址"
+
+#: rc.c:115
+msgid "URL of FTP proxy host"
+msgstr "FTP 代理主机地址"
+
+#: rc.c:116
+msgid "Domains to be accessed directly (no proxy)"
+msgstr "直接访问而不是用代理服务器访问的 URL"
+
+#: rc.c:117
+msgid "Check noproxy by network address"
+msgstr "根据网络地址检查 noproxy"
+
+#: rc.c:118
+msgid "Disable cache"
+msgstr "禁用缓存"
+
+#: rc.c:120
+msgid "News server"
+msgstr "新闻服务器"
+
+#: rc.c:121
+msgid "Mode of news server"
+msgstr "新闻服务器模式"
+
+#: rc.c:122
+msgid "Number of news messages"
+msgstr "新闻消息的数量"
+
+#: rc.c:124
+msgid "Order of name resolution"
+msgstr "名称解析顺序"
+
+#: rc.c:125
+msgid "Directory corresponding to / (document root)"
+msgstr "对应 / 的目录 (文档根目录)"
+
+#: rc.c:126
+msgid "Directory corresponding to /~user"
+msgstr "对应 /~user 的目录"
+
+#: rc.c:127
+msgid "Directory corresponding to /cgi-bin"
+msgstr "对应 /cgi-bin 的目录"
+
+#: rc.c:128
+msgid "Confirm when quitting with q"
+msgstr "使用 q 键退出时请求确认"
+
+#: rc.c:129
+msgid "Close tab if buffer is last when back"
+msgstr "在返回时缓冲区还是以前状态就关闭标签页"
+
+#: rc.c:131
+msgid "Enable mark operations"
+msgstr "启用标记操作"
+
+#: rc.c:133
+msgid "Enable Emacs-style line editing"
+msgstr "启用 Emacs 风格的行编辑"
+
+#: rc.c:134
+msgid "Enable vi-like numeric prefix"
+msgstr "启动 vi 式的数字跳转"
+
+#: rc.c:135
+msgid "Move cursor to top line when going to label"
+msgstr "当移动到标签时将光标移到最顶行"
+
+#: rc.c:136
+msgid "Move cursor to top line when moving to next page"
+msgstr "当转到下一页时将光标移到最顶行"
+
+#: rc.c:137
+msgid "Fold lines of plain text file"
+msgstr "对纯文本文件实行行折叠"
+
+#: rc.c:138
+msgid "Show line numbers"
+msgstr "显示行号"
+
+#: rc.c:139
+msgid "Show search string"
+msgstr "显示搜索字符串"
+
+#: rc.c:140
+msgid "List of mime.types files"
+msgstr "mime.type 文件列表"
+
+#: rc.c:141
+msgid "List of mailcap files"
+msgstr "mailcap 文件列表"
+
+#: rc.c:142
+msgid "List of urimethodmap files"
+msgstr "urlmethodmap 文件列表"
+
+#: rc.c:143
+msgid "Editor"
+msgstr "编辑器"
+
+#: rc.c:144
+msgid "Mailer"
+msgstr "发送者"
+
+#: rc.c:145
+msgid "How to call Mailer for mailto URLs with options"
+msgstr "启动 mailto 地址时调用电子邮件程序的方式和参数"
+
+#: rc.c:146
+msgid "External browser"
+msgstr "外部浏览器"
+
+#: rc.c:147
+msgid "2nd external browser"
+msgstr "第二外部浏览器"
+
+#: rc.c:148
+msgid "3rd external browser"
+msgstr "第三外部浏览器"
+
+#: rc.c:149
+msgid "4th external browser"
+msgstr "第四外部浏览器"
+
+#: rc.c:150
+msgid "5th external browser"
+msgstr "第五外部浏览器"
+
+#: rc.c:151
+msgid "6th external browser"
+msgstr "第六外部浏览器"
+
+#: rc.c:152
+msgid "7th external browser"
+msgstr "第七外部浏览器"
+
+#: rc.c:153
+msgid "8th external browser"
+msgstr "第八外部浏览器"
+
+#: rc.c:154
+msgid "9th external browser"
+msgstr "第九外部浏览器"
+
+#: rc.c:155
+msgid "Disable secret file security check"
+msgstr "关闭秘密文件安全检查"
+
+#: rc.c:156
+msgid "Password file"
+msgstr "密码文件"
+
+#: rc.c:157
+msgid "File for setting form on loading"
+msgstr "设置窗口加载时的文件"
+
+#: rc.c:158
+msgid "File for preferences for each site"
+msgstr "各个站点的首选项文件"
+
+#: rc.c:159
+msgid "Password for anonymous FTP (your mail address)"
+msgstr "匿名FTP密码(您的邮箱地址)"
+
+#: rc.c:160
+msgid "Generate domain part of password for FTP"
+msgstr "为 FTP 生成密码的域部分"
+
+#: rc.c:161
+msgid "User-Agent identification string"
+msgstr "User-Agent 串"
+
+#: rc.c:162
+msgid "Accept-Encoding header"
+msgstr "接受的编码 (Accept-Encoding) 报头"
+
+#: rc.c:163
+msgid "Accept header"
+msgstr "接受 (Accept) 报头"
+
+#: rc.c:164
+msgid "Accept-Language header"
+msgstr "接受的语言 (Accept-Language) 报头"
+
+#: rc.c:165
+msgid "Treat URL-like strings as links in all pages"
+msgstr "将所有页面中类似于 URL 的字符串当做链接"
+
+#: rc.c:166
+msgid "Wrap search"
+msgstr "包装搜索结果"
+
+#: rc.c:167
+msgid "Display unseen objects (e.g. bgimage tag)"
+msgstr "显示看不到的对象 (例如,bdimage标签)"
+
+#: rc.c:168
+msgid "Uncompress compressed data automatically when downloading"
+msgstr "在下载时自动解压被压缩的数据"
+
+#: rc.c:170
+msgid "Run external viewer in a separate session"
+msgstr "在另一个会话中运行外部查看器"
+
+#: rc.c:172
+msgid "Run external viewer in the background"
+msgstr "在后台运行外部查看器"
+
+#: rc.c:174
+msgid "Use external program for directory listing"
+msgstr "使用外部程序列出目录"
+
+#: rc.c:175
+msgid "URL of directory listing command"
+msgstr "目录列表命令的网址"
+
+#: rc.c:177
+msgid "Enable dictionary lookup through CGI"
+msgstr "启用基于 CGI 的词典查询"
+
+#: rc.c:178
+msgid "URL of dictionary lookup command"
+msgstr "字典查找命令的网址"
+
+#: rc.c:180
+msgid "Display link name for images lacking ALT"
+msgstr "对缺少 ALT 的图片显示链接名称"
+
+#: rc.c:181
+msgid "Index file for directories"
+msgstr "目录的索引文件"
+
+#: rc.c:182
+msgid "Prepend http:// to URL automatically"
+msgstr "自动在 URL 前加入 http://"
+
+#: rc.c:183
+msgid "Default value for open-URL command"
+msgstr "打开网址命令的默认值"
+
+#: rc.c:184
+msgid "Decode Content-Transfer-Encoding when saving"
+msgstr "保存时对内容传输编码信息 (Content-Transfer-Encoding) 进行解码"
+
+#: rc.c:185
+msgid "Preserve timestamp when saving"
+msgstr "在保存时保留时间戳"
+
+#: rc.c:187
+msgid "Enable mouse"
+msgstr "启用鼠标"
+
+#: rc.c:188
+msgid "Scroll in reverse direction of mouse drag"
+msgstr "向鼠标拖动的反方向滚动"
+
+#: rc.c:189
+msgid "Behavior of wheel scroll speed"
+msgstr "滚轮滚动速度行为"
+
+#: rc.c:190
+msgid "(A only)Scroll by # (%) of screen"
+msgstr "(仅 A) 每次滚动 # (%) 的屏幕高度"
+
+#: rc.c:191
+msgid "(B only)Scroll by # lines"
+msgstr "(仅 B) 每次滚动 # 行"
+
+#: rc.c:193
+msgid "Free memory of undisplayed buffers"
+msgstr "释放未显示缓存的存储"
+
+#: rc.c:194
+msgid "Suppress `Referer:' header"
+msgstr "禁止 'Referer:' 文件头"
+
+#: rc.c:195
+msgid "Search case-insensitively"
+msgstr "搜索不区分大小写"
+
+#: rc.c:196
+msgid "Use LESSOPEN"
+msgstr "使用 LESSOPEN"
+
+#: rc.c:199
+msgid "Perform SSL server verification"
+msgstr "进行 SSL 服务器检查"
+
+#: rc.c:200
+msgid "PEM encoded certificate file of client"
+msgstr "客户端的 PEM 编码证书文件"
+
+#: rc.c:201
+msgid "PEM encoded private key file of client"
+msgstr "客户端的 PEM 编码私钥文件"
+
+#: rc.c:202
+msgid "Path to directory for PEM encoded certificates of CAs"
+msgstr "PEM 编码 CA 证书目录的路径"
+
+#: rc.c:203
+msgid "File consisting of PEM encoded certificates of CAs"
+msgstr "包含 PEM 编码 CA 证书的文件"
+
+#: rc.c:205
+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
+msgstr "被禁止的 SSL 方式列表 (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
+
+#: rc.c:208
+msgid "Enable cookie processing"
+msgstr "开启 Cookie 处理"
+
+#: rc.c:209
+msgid "Print a message when receiving a cookie"
+msgstr "在接收一个 Cookie 时显示一个消息"
+
+#: rc.c:210
+msgid "Accept cookies"
+msgstr "接受 Cookies"
+
+#: rc.c:211
+msgid "Action to be taken on invalid cookie"
+msgstr "对无效 Cookies 进行的操作"
+
+#: rc.c:212
+msgid "Domains to reject cookies from"
+msgstr "拒绝如下域的 Cookies"
+
+#: rc.c:213
+msgid "Domains to accept cookies from"
+msgstr "接受如下域的 Cookies"
+
+#: rc.c:214
+msgid "Domains to avoid [wrong number of dots]"
+msgstr "避免访问的域 [错误的点数]"
+
+#: rc.c:216
+msgid "Number of redirections to follow"
+msgstr "跟随的重定向数量"
+
+#: rc.c:217
+msgid "Enable processing of meta-refresh tag"
+msgstr "开启 meta-refresh 标签处理"
+
+#: rc.c:220
+msgid "Enable Migemo (Roma-ji search)"
+msgstr "开启 Migemo (罗马字搜索)"
+
+#: rc.c:221
+msgid "Migemo command"
+msgstr "Migemo 命令"
+
+#: rc.c:225
+msgid "Display charset"
+msgstr "显示字符集"
+
+#: rc.c:226
+msgid "Default document charset"
+msgstr "默认文档字符集"
+
+#: rc.c:227
+msgid "Automatic charset detect when loading"
+msgstr "在载入时进行自动字符集探测"
+
+#: rc.c:228
+msgid "System charset"
+msgstr "系统字符集"
+
+#: rc.c:229
+msgid "System charset follows locale(LC_CTYPE)"
+msgstr "根据系统设置 (LC_CTYPE) 选定系统字符集"
+
+#: rc.c:230
+msgid "Output halfdump with display charset"
+msgstr "使用显示字符集输出 halfdump"
+
+#: rc.c:231
+msgid "Use multi column characters"
+msgstr "使用多列字符"
+
+#: rc.c:232
+msgid "Use combining characters"
+msgstr "使用合并字符"
+
+#: rc.c:233
+msgid "Use double width for some Unicode characters"
+msgstr "使 Unicode 字符使用双重宽度"
+
+#: rc.c:234
+msgid "Use Unicode language tags"
+msgstr "使用 Unicode 语言标签"
+
+#: rc.c:235
+msgid "Charset conversion using Unicode map"
+msgstr "使用 Unicode 映射进行字符集转换"
+
+#: rc.c:236
+msgid "Charset conversion when loading"
+msgstr "在载入时进行字符集转换"
+
+#: rc.c:237
+msgid "Adjust search string for document charset"
+msgstr "调整文档字符集的搜索字串"
+
+#: rc.c:238
+msgid "Fix character width when conversion"
+msgstr "在转换时固定字符宽度"
+
+#: rc.c:239
+msgid "Use GB 12345 Unicode map instead of GB 2312's"
+msgstr "使用 GB 12345 Unicode 映射而非 GB 2312"
+
+#: rc.c:240
+msgid "Use JIS X 0201 Roman for ISO-2022-JP"
+msgstr "使用 JIS X 0201 罗马字母于 ISO-2022-JP"
+
+#: rc.c:241
+msgid "Use JIS C 6226:1978 for ISO-2022-JP"
+msgstr "使用 JIS C 6226:1978 于 ISO-2022-JP"
+
+#: rc.c:242
+msgid "Use JIS X 0201 Katakana"
+msgstr "使用 JIS X 0201 片假名"
+
+#: rc.c:243
+msgid "Use JIS X 0212:1990 (Supplemental Kanji)"
+msgstr "使用 JIS X 0212:1990 (补充汉字)"
+
+#: rc.c:244
+msgid "Use JIS X 0213:2000 (2000JIS)"
+msgstr "使用 JIS X 0213:2000 (2000JIS)"
+
+#: rc.c:245
+msgid "Strict ISO-2022-JP/KR/CN"
+msgstr "严格 ISO-2022-JP/KR/CN"
+
+#: rc.c:246
+msgid "Treat 4 bytes char. of GB18030 as Unicode"
+msgstr "视 GB18030 编码的 4 字节字符为 Unicode"
+
+#: rc.c:247
+msgid "Simple Preserve space"
+msgstr "简单的保留空间"
+
+#: rc.c:250
+msgid "keymap file"
+msgstr "键盘映射文件"
+
+#: rc.c:267
+msgid "black"
+msgstr "黑色"
+
+#: rc.c:268
+msgid "red"
+msgstr "红色"
+
+#: rc.c:269
+msgid "green"
+msgstr "绿色"
+
+#: rc.c:270
+msgid "yellow"
+msgstr "黄色"
+
+#: rc.c:271
+msgid "blue"
+msgstr "蓝色"
+
+#: rc.c:272
+msgid "magenta"
+msgstr "品红"
+
+#: rc.c:273
+msgid "cyan"
+msgstr "青色"
+
+#: rc.c:274
+msgid "white"
+msgstr "白色"
+
+#: rc.c:275
+msgid "terminal"
+msgstr "终端"
+
+#: rc.c:294
+msgid "none"
+msgstr "无"
+
+#: rc.c:295
+msgid "current URL"
+msgstr "当前 URL"
+
+#: rc.c:296
+msgid "link URL"
+msgstr "链接 URL"
+
+#: rc.c:301
+msgid "simple"
+msgstr "简单"
+
+#: rc.c:302
+msgid "use tag"
+msgstr "使用标签"
+
+#: rc.c:303
+msgid "fontify"
+msgstr ""
+
+#: rc.c:309
+msgid "A:relative to screen height"
+msgstr "A:相对于屏幕高度"
+
+#: rc.c:310
+msgid "B:fixed speed"
+msgstr "B:固定速度"
+
+#: rc.c:317
+msgid "unspecified"
+msgstr "未指定"
+
+#: rc.c:318
+msgid "inet inet6"
+msgstr ""
+
+#: rc.c:319
+msgid "inet6 inet"
+msgstr ""
+
+#: rc.c:320
+msgid "inet only"
+msgstr "仅 inet"
+
+#: rc.c:321
+msgid "inet6 only"
+msgstr "仅 inet6"
+
+#: rc.c:328
+msgid "discard"
+msgstr "丢弃"
+
+#: rc.c:330
+msgid "accept"
+msgstr "接受"
+
+#: rc.c:332
+msgid "ask"
+msgstr "询问"
+
+#: rc.c:339
+msgid "use internal mailer instead"
+msgstr "使用内建邮件发送器"
+
+#: rc.c:341
+msgid "ignore options and use only the address"
+msgstr "忽略选项而只使用地址"
+
+#: rc.c:342
+msgid "use full mailto URL"
+msgstr "使用整个 mailto URL"
+
+#: rc.c:351
+msgid "OFF"
+msgstr "关"
+
+#: rc.c:352
+msgid "Only ISO 2022"
+msgstr "仅 ISO 2022"
+
+#: rc.c:353
+msgid "ON"
+msgstr "开"
+
+#: rc.c:359
+msgid "ASCII"
+msgstr "ASCII"
+
+#: rc.c:360
+msgid "charset specific"
+msgstr "字符集特定"
+
+#: rc.c:361
+msgid "DEC special graphics"
+msgstr "DEC 特殊图像"
+
+#: rc.c:740
+msgid "Display Settings"
+msgstr "显示设置"
+
+#: rc.c:742
+msgid "Color Settings"
+msgstr "颜色设置"
+
+#: rc.c:744
+msgid "Miscellaneous Settings"
+msgstr "杂项设置"
+
+#: rc.c:745
+msgid "Directory Settings"
+msgstr "目录设置"
+
+#: rc.c:746
+msgid "External Program Settings"
+msgstr "外部程序设置"
+
+#: rc.c:747
+msgid "Network Settings"
+msgstr "网络设置"
+
+#: rc.c:748
+msgid "Proxy Settings"
+msgstr "代理设置"
+
+#: rc.c:750
+msgid "SSL Settings"
+msgstr "SSL 设置"
+
+#: rc.c:753
+msgid "Cookie Settings"
+msgstr "Cookie 设置"
+
+#: rc.c:756
+msgid "Charset Settings"
+msgstr "字符集设置"
+
+#. TRANSLATORS:
+#. * AcceptLang default: this is used in Accept-Language: HTTP request
+#. * header. For example, ja.po should translate it as
+#. * "ja;q=1.0, en;q=0.5" like that.
+#.
+#: rc.c:1238
+msgid "en;q=1.0"
+msgstr "zh-CN;q=1.0, zh-Hans;q=0.9, zh;q=0.8, en;q=0.6"
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644
index 0000000..44f7a14
--- /dev/null
+++ b/po/zh_TW.po
@@ -0,0 +1,916 @@
+# zh_TW translation for w3m, machine converted
+# Copyright (C) YEAR THE w3m'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the w3m package.
+# Junde Yi <lmy441900@gmail.com>, 2014.
+# Mingcong Bai <jeffbai@aosc.xyz>, 2014.
+# liushuyu <liushuyu_011@126.com>, 2014.
+# Xingda Zheng <icenowy@outlook.com>, 2014.
+# Mingye Wang (Arthur2e5) <arthur200126@gmail.com>, 2014, 2015.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: w3m 0.5.3\n"
+"Report-Msgid-Bugs-To: satodai@w3m.jp\n"
+"POT-Creation-Date: 2016-03-14 19:47+0900\n"
+"PO-Revision-Date: 2016-03-14 19:51+0900\n"
+"Last-Translator: Tatsuya Kinoshita <tats@debian.org>\n"
+"Language-Team: AOSC zh_TW fuzzy <aosc@members.fsf.org>\n"
+"Language: zh_TW\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.6\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: menu.c:269
+msgid " Back (b) "
+msgstr " 後退 (b) "
+
+#: menu.c:270
+msgid " Select Buffer(s) "
+msgstr " 選擇緩衝區 "
+
+#: menu.c:272
+msgid " Select Tab (t) "
+msgstr " 選擇標籤 (t) "
+
+#: menu.c:274
+msgid " View Source (v) "
+msgstr " 檢視源碼 (v) "
+
+#: menu.c:275
+msgid " Edit Source (e) "
+msgstr " 修改源碼 (e) "
+
+#: menu.c:276
+msgid " Save Source (S) "
+msgstr " 儲存源碼 (S) "
+
+#: menu.c:277
+msgid " Reload (r) "
+msgstr " 重新載入 (r) "
+
+#: menu.c:278 menu.c:285 menu.c:289
+msgid " ---------------- "
+msgstr " ---------------- "
+
+#: menu.c:279
+msgid " Go Link (a) "
+msgstr " 轉到連結 (a) "
+
+#: menu.c:280
+msgid " on New Tab (n) "
+msgstr " 在新標籤 (n) "
+
+#: menu.c:281
+msgid " Save Link (A) "
+msgstr " 儲存連結 (A) "
+
+#: menu.c:282
+msgid " View Image (i) "
+msgstr " 檢視圖片 (i) "
+
+#: menu.c:283
+msgid " Save Image (I) "
+msgstr " 儲存圖片 (I) "
+
+#: menu.c:284
+msgid " View Frame (f) "
+msgstr " 檢視框架 (f) "
+
+#: menu.c:286
+msgid " Bookmark (B) "
+msgstr " 書籤 (B) "
+
+#: menu.c:287
+msgid " Help (h) "
+msgstr " 幫助 (h) "
+
+#: menu.c:288
+msgid " Option (o) "
+msgstr " 選項 (o) "
+
+#: menu.c:290
+msgid " Quit (q) "
+msgstr " 退出 (q) "
+
+#: rc.c:62
+msgid "External Viewer Setup"
+msgstr "外部檢視器設定"
+
+#: rc.c:63
+msgid "Tab width in characters"
+msgstr "文字中的 TAB 寬度"
+
+#: rc.c:64
+msgid "Indent for HTML rendering"
+msgstr "用於 HTML 渲染"
+
+#: rc.c:65
+msgid "Number of pixels per character (4.0...32.0)"
+msgstr "每字型大小的畫素值 (4.0...32.0)"
+
+#: rc.c:66
+msgid "Number of pixels per line (4.0...64.0)"
+msgstr "每行的畫素數 (4.0...64.0)"
+
+#: rc.c:67
+msgid "Number of remembered lines when used as a pager"
+msgstr "當作為分頁器使用時記憶的行數"
+
+#: rc.c:68
+msgid "Use URL history"
+msgstr "使用 URL 歷史記錄"
+
+#: rc.c:69
+msgid "Number of remembered URL"
+msgstr "記錄的 URL 數量"
+
+#: rc.c:70
+msgid "Save URL history"
+msgstr "儲存 URL 歷史"
+
+#: rc.c:71
+msgid "Render frames automatically"
+msgstr "自動渲染框架"
+
+#: rc.c:72
+msgid "Treat argument without scheme as URL"
+msgstr "將無格式的參數看作 URL"
+
+#: rc.c:73
+msgid "Use _self as default target"
+msgstr "將自身作為預設目標 (_S)"
+
+#: rc.c:74
+msgid "Open link on new tab if target is _blank or _new"
+msgstr "如果目標為空 (_b) 或新建 (_n) 在新標籤開啟頁面"
+
+#: rc.c:75
+msgid "Open download list panel on new tab"
+msgstr "開啟下載列表面板於新標籤"
+
+#: rc.c:76
+msgid "Display link URL automatically"
+msgstr "自動顯示連結 URL"
+
+#: rc.c:77
+msgid "Display link numbers"
+msgstr "顯示連結編號"
+
+#: rc.c:78
+msgid "Display decoded URL"
+msgstr "顯示解碼後的 URL"
+
+#: rc.c:79
+msgid "Display current line number"
+msgstr "顯示當前行數"
+
+#: rc.c:80
+msgid "Display inline images"
+msgstr "顯示內聯影象"
+
+#: rc.c:81
+msgid "Display pseudo-ALTs for inline images with no ALT or TITLE string"
+msgstr "為不帶有 ALT 或 TITLE 字串的內聯影象顯示偽 ALT"
+
+#: rc.c:83
+msgid "Load inline images automatically"
+msgstr "自動載入行內影象"
+
+#: rc.c:84
+msgid "Maximum processes for parallel image loading"
+msgstr "多執行緒影象載入的最大程序數"
+
+#: rc.c:85
+msgid "Use external image viewer"
+msgstr "使用外部圖片檢視器"
+
+#: rc.c:86
+msgid "Scale of image (%)"
+msgstr "影象比例尺 (%)"
+
+#: rc.c:87
+msgid "External command to display image"
+msgstr "用於顯示影象的外部命令"
+
+#: rc.c:88
+msgid "Use link list of image map"
+msgstr "使用影象對映的連結列表"
+
+#: rc.c:90
+msgid "Display file names in multi-column format"
+msgstr "以多列格式顯示檔名"
+
+#: rc.c:91
+msgid "Use ASCII equivalents to display entities"
+msgstr "使用對應的 ASCII 編碼來顯示實體 "
+
+#: rc.c:92
+msgid "Character type for border of table and menu"
+msgstr "表格和選單邊框的字元類型"
+
+#: rc.c:93
+msgid "Display table borders, ignore value of BORDER"
+msgstr "顯示錶格邊框,忽略 BORDER 數值"
+
+#: rc.c:94
+msgid "Fold lines in TEXTAREA"
+msgstr "在文字區 (TEXTAREA) 中摺疊行"
+
+#: rc.c:95
+msgid "Display INS, DEL, S and STRIKE element"
+msgstr "顯示 INS, DEL, S 及 STRIKE 元素"
+
+#: rc.c:96
+msgid "Display with color"
+msgstr "使用帶顏色的顯示"
+
+#: rc.c:97
+msgid "Color of normal character"
+msgstr "一般文字顏色"
+
+#: rc.c:98
+msgid "Color of anchor"
+msgstr "連結文字顏色"
+
+#: rc.c:99
+msgid "Color of image link"
+msgstr "圖片連結顏色"
+
+#: rc.c:100
+msgid "Color of form"
+msgstr "表格顏色"
+
+#: rc.c:101
+msgid "Enable coloring of active link"
+msgstr "為活動連結開啟上色"
+
+#: rc.c:102
+msgid "Color of currently active link"
+msgstr "當前活動連結的顏色"
+
+#: rc.c:103
+msgid "Use visited link color"
+msgstr "為訪問過的連結上色"
+
+#: rc.c:104
+msgid "Color of visited link"
+msgstr "已訪問連結顏色"
+
+#: rc.c:105
+msgid "Color of background"
+msgstr "背景色"
+
+#: rc.c:106
+msgid "Color of mark"
+msgstr "標記顏色"
+
+#: rc.c:107
+msgid "Use proxy"
+msgstr "使用代理伺服器"
+
+#: rc.c:108
+msgid "URL of HTTP proxy host"
+msgstr "HTTP 代理主機地址"
+
+#: rc.c:110
+msgid "URL of HTTPS proxy host"
+msgstr "HTTPS 代理主機地址"
+
+#: rc.c:113
+msgid "URL of GOPHER proxy host"
+msgstr "GOPHER 代理主機地址"
+
+#: rc.c:115
+msgid "URL of FTP proxy host"
+msgstr "FTP 代理主機地址"
+
+#: rc.c:116
+msgid "Domains to be accessed directly (no proxy)"
+msgstr "直接訪問而不是用代理伺服器訪問的 URL"
+
+#: rc.c:117
+msgid "Check noproxy by network address"
+msgstr "根據網路地址檢查 noproxy"
+
+#: rc.c:118
+msgid "Disable cache"
+msgstr "禁用快取"
+
+#: rc.c:120
+msgid "News server"
+msgstr "新聞伺服器"
+
+#: rc.c:121
+msgid "Mode of news server"
+msgstr "新聞伺服器模式"
+
+#: rc.c:122
+msgid "Number of news messages"
+msgstr "新聞訊息的數量"
+
+#: rc.c:124
+msgid "Order of name resolution"
+msgstr "名稱解析順序"
+
+#: rc.c:125
+msgid "Directory corresponding to / (document root)"
+msgstr "對應 / 的目錄 (文件根目錄)"
+
+#: rc.c:126
+msgid "Directory corresponding to /~user"
+msgstr "對應 /~user 的目錄"
+
+#: rc.c:127
+msgid "Directory corresponding to /cgi-bin"
+msgstr "對應 /cgi-bin 的目錄"
+
+#: rc.c:128
+msgid "Confirm when quitting with q"
+msgstr "使用 q 鍵退出時請求確認"
+
+#: rc.c:129
+msgid "Close tab if buffer is last when back"
+msgstr "在返回時緩衝區還是以前狀態就關閉標籤頁"
+
+#: rc.c:131
+msgid "Enable mark operations"
+msgstr "啟用標記操作"
+
+#: rc.c:133
+msgid "Enable Emacs-style line editing"
+msgstr "啟用 Emacs 風格的行編輯"
+
+#: rc.c:134
+msgid "Enable vi-like numeric prefix"
+msgstr "啟動 vi 式的數字跳轉"
+
+#: rc.c:135
+msgid "Move cursor to top line when going to label"
+msgstr "當移動到標籤時將游標移到最頂行"
+
+#: rc.c:136
+msgid "Move cursor to top line when moving to next page"
+msgstr "當轉到下一頁時將游標移到最頂行"
+
+#: rc.c:137
+msgid "Fold lines of plain text file"
+msgstr "對純文字檔案實行行摺疊"
+
+#: rc.c:138
+msgid "Show line numbers"
+msgstr "顯示行號"
+
+#: rc.c:139
+msgid "Show search string"
+msgstr "顯示搜尋字元串"
+
+#: rc.c:140
+msgid "List of mime.types files"
+msgstr "mime.type 檔案列表"
+
+#: rc.c:141
+msgid "List of mailcap files"
+msgstr "mailcap 檔案列表"
+
+#: rc.c:142
+msgid "List of urimethodmap files"
+msgstr "urlmethodmap 檔案列表"
+
+#: rc.c:143
+msgid "Editor"
+msgstr "編輯器"
+
+#: rc.c:144
+msgid "Mailer"
+msgstr "傳送者"
+
+#: rc.c:145
+msgid "How to call Mailer for mailto URLs with options"
+msgstr "啟動 mailto 地址時呼叫電子郵件程式的方式和參數"
+
+#: rc.c:146
+msgid "External browser"
+msgstr "外部瀏覽器"
+
+#: rc.c:147
+msgid "2nd external browser"
+msgstr "第二外部瀏覽器"
+
+#: rc.c:148
+msgid "3rd external browser"
+msgstr "第三外部瀏覽器"
+
+#: rc.c:149
+msgid "4th external browser"
+msgstr "第四外部瀏覽器"
+
+#: rc.c:150
+msgid "5th external browser"
+msgstr "第五外部瀏覽器"
+
+#: rc.c:151
+msgid "6th external browser"
+msgstr "第六外部瀏覽器"
+
+#: rc.c:152
+msgid "7th external browser"
+msgstr "第七外部瀏覽器"
+
+#: rc.c:153
+msgid "8th external browser"
+msgstr "第八外部瀏覽器"
+
+#: rc.c:154
+msgid "9th external browser"
+msgstr "第九外部瀏覽器"
+
+#: rc.c:155
+msgid "Disable secret file security check"
+msgstr "關閉祕密檔案安全檢查"
+
+#: rc.c:156
+msgid "Password file"
+msgstr "密碼檔案"
+
+#: rc.c:157
+msgid "File for setting form on loading"
+msgstr "設定視窗載入時的檔案"
+
+#: rc.c:158
+msgid "File for preferences for each site"
+msgstr "各個站點的首選項檔案"
+
+#: rc.c:159
+msgid "Password for anonymous FTP (your mail address)"
+msgstr "匿名FTP密碼(您的郵箱地址)"
+
+#: rc.c:160
+msgid "Generate domain part of password for FTP"
+msgstr "為 FTP 生成密碼的域部分"
+
+#: rc.c:161
+msgid "User-Agent identification string"
+msgstr "User-Agent 串"
+
+#: rc.c:162
+msgid "Accept-Encoding header"
+msgstr "接受的編碼 (Accept-Encoding) 報頭"
+
+#: rc.c:163
+msgid "Accept header"
+msgstr "接受 (Accept) 報頭"
+
+#: rc.c:164
+msgid "Accept-Language header"
+msgstr "接受的語言 (Accept-Language) 報頭"
+
+#: rc.c:165
+msgid "Treat URL-like strings as links in all pages"
+msgstr "將所有頁面中類似於 URL 的字元串當做連結"
+
+#: rc.c:166
+msgid "Wrap search"
+msgstr "包裝搜尋結果"
+
+#: rc.c:167
+msgid "Display unseen objects (e.g. bgimage tag)"
+msgstr "顯示看不到的物件 (例如,bdimage標籤)"
+
+#: rc.c:168
+msgid "Uncompress compressed data automatically when downloading"
+msgstr "在下載時自動解壓被壓縮的資料"
+
+#: rc.c:170
+msgid "Run external viewer in a separate session"
+msgstr "在另一個會話中執行外部檢視器"
+
+#: rc.c:172
+msgid "Run external viewer in the background"
+msgstr "在後臺執行外部檢視器"
+
+#: rc.c:174
+msgid "Use external program for directory listing"
+msgstr "使用外部程式列出目錄"
+
+#: rc.c:175
+msgid "URL of directory listing command"
+msgstr "目錄列表命令的網址"
+
+#: rc.c:177
+msgid "Enable dictionary lookup through CGI"
+msgstr "啟用基於 CGI 的詞典查詢"
+
+#: rc.c:178
+msgid "URL of dictionary lookup command"
+msgstr "字典查詢命令的網址"
+
+#: rc.c:180
+msgid "Display link name for images lacking ALT"
+msgstr "對缺少 ALT 的圖片顯示連結名稱"
+
+#: rc.c:181
+msgid "Index file for directories"
+msgstr "目錄的索引檔案"
+
+#: rc.c:182
+msgid "Prepend http:// to URL automatically"
+msgstr "自動在 URL 前加入 http://"
+
+#: rc.c:183
+msgid "Default value for open-URL command"
+msgstr "開啟網址命令的預設值"
+
+#: rc.c:184
+msgid "Decode Content-Transfer-Encoding when saving"
+msgstr "儲存時對內容傳輸編碼資訊 (Content-Transfer-Encoding) 進行解碼"
+
+#: rc.c:185
+msgid "Preserve timestamp when saving"
+msgstr "在儲存時保留時間戳"
+
+#: rc.c:187
+msgid "Enable mouse"
+msgstr "啟用滑鼠"
+
+#: rc.c:188
+msgid "Scroll in reverse direction of mouse drag"
+msgstr "向滑鼠拖動的反方向滾動"
+
+#: rc.c:189
+msgid "Behavior of wheel scroll speed"
+msgstr "滾輪滾動速度行為"
+
+#: rc.c:190
+msgid "(A only)Scroll by # (%) of screen"
+msgstr "(僅 A) 每次滾動 # (%) 的螢幕高度"
+
+#: rc.c:191
+msgid "(B only)Scroll by # lines"
+msgstr "(僅 B) 每次滾動 # 行"
+
+#: rc.c:193
+msgid "Free memory of undisplayed buffers"
+msgstr "釋放未顯示快取的儲存"
+
+#: rc.c:194
+msgid "Suppress `Referer:' header"
+msgstr "禁止 'Referer:' 檔案頭"
+
+#: rc.c:195
+msgid "Search case-insensitively"
+msgstr "搜尋不區分大小寫"
+
+#: rc.c:196
+msgid "Use LESSOPEN"
+msgstr "使用 LESSOPEN"
+
+#: rc.c:199
+msgid "Perform SSL server verification"
+msgstr "進行 SSL 伺服器檢查"
+
+#: rc.c:200
+msgid "PEM encoded certificate file of client"
+msgstr "客戶端的 PEM 編碼證書檔案"
+
+#: rc.c:201
+msgid "PEM encoded private key file of client"
+msgstr "客戶端的 PEM 編碼私鑰檔案"
+
+#: rc.c:202
+msgid "Path to directory for PEM encoded certificates of CAs"
+msgstr "PEM 編碼 CA 證書目錄的路徑"
+
+#: rc.c:203
+msgid "File consisting of PEM encoded certificates of CAs"
+msgstr "包含 PEM 編碼 CA 證書的檔案"
+
+#: rc.c:205
+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
+msgstr "被禁止的 SSL 方式列表 (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
+
+#: rc.c:208
+msgid "Enable cookie processing"
+msgstr "開啟 Cookie 處理"
+
+#: rc.c:209
+msgid "Print a message when receiving a cookie"
+msgstr "在接收一個 Cookie 時顯示一個訊息"
+
+#: rc.c:210
+msgid "Accept cookies"
+msgstr "接受 Cookies"
+
+#: rc.c:211
+msgid "Action to be taken on invalid cookie"
+msgstr "對無效 Cookies 進行的操作"
+
+#: rc.c:212
+msgid "Domains to reject cookies from"
+msgstr "拒絕如下域的 Cookies"
+
+#: rc.c:213
+msgid "Domains to accept cookies from"
+msgstr "接受如下域的 Cookies"
+
+#: rc.c:214
+msgid "Domains to avoid [wrong number of dots]"
+msgstr "避免訪問的域 [錯誤的點數]"
+
+#: rc.c:216
+msgid "Number of redirections to follow"
+msgstr "跟隨的重定向數量"
+
+#: rc.c:217
+msgid "Enable processing of meta-refresh tag"
+msgstr "開啟 meta-refresh 標籤處理"
+
+#: rc.c:220
+msgid "Enable Migemo (Roma-ji search)"
+msgstr "開啟 Migemo (羅馬字搜尋)"
+
+#: rc.c:221
+msgid "Migemo command"
+msgstr "Migemo 命令"
+
+#: rc.c:225
+msgid "Display charset"
+msgstr "顯示字符集"
+
+#: rc.c:226
+msgid "Default document charset"
+msgstr "預設文件字符集"
+
+#: rc.c:227
+msgid "Automatic charset detect when loading"
+msgstr "在載入時進行自動字符集探測"
+
+#: rc.c:228
+msgid "System charset"
+msgstr "系統字符集"
+
+#: rc.c:229
+msgid "System charset follows locale(LC_CTYPE)"
+msgstr "根據系統設定 (LC_CTYPE) 選定系統字符集"
+
+#: rc.c:230
+msgid "Output halfdump with display charset"
+msgstr "使用顯示字符集輸出 halfdump"
+
+#: rc.c:231
+msgid "Use multi column characters"
+msgstr "使用多列字元"
+
+#: rc.c:232
+msgid "Use combining characters"
+msgstr "使用合併字元"
+
+#: rc.c:233
+msgid "Use double width for some Unicode characters"
+msgstr "使 Unicode 字元使用雙重寬度"
+
+#: rc.c:234
+msgid "Use Unicode language tags"
+msgstr "使用 Unicode 語言標籤"
+
+#: rc.c:235
+msgid "Charset conversion using Unicode map"
+msgstr "使用 Unicode 對映進行字符集轉換"
+
+#: rc.c:236
+msgid "Charset conversion when loading"
+msgstr "在載入時進行字符集轉換"
+
+#: rc.c:237
+msgid "Adjust search string for document charset"
+msgstr "調整文件字符集的搜尋字串"
+
+#: rc.c:238
+msgid "Fix character width when conversion"
+msgstr "在轉換時固定字元寬度"
+
+#: rc.c:239
+msgid "Use GB 12345 Unicode map instead of GB 2312's"
+msgstr "使用 GB 12345 Unicode 對映而非 GB 2312"
+
+#: rc.c:240
+msgid "Use JIS X 0201 Roman for ISO-2022-JP"
+msgstr "使用 JIS X 0201 羅馬字母於 ISO-2022-JP"
+
+#: rc.c:241
+msgid "Use JIS C 6226:1978 for ISO-2022-JP"
+msgstr "使用 JIS C 6226:1978 於 ISO-2022-JP"
+
+#: rc.c:242
+msgid "Use JIS X 0201 Katakana"
+msgstr "使用 JIS X 0201 片假名"
+
+#: rc.c:243
+msgid "Use JIS X 0212:1990 (Supplemental Kanji)"
+msgstr "使用 JIS X 0212:1990 (補充漢字)"
+
+#: rc.c:244
+msgid "Use JIS X 0213:2000 (2000JIS)"
+msgstr "使用 JIS X 0213:2000 (2000JIS)"
+
+#: rc.c:245
+msgid "Strict ISO-2022-JP/KR/CN"
+msgstr "嚴格 ISO-2022-JP/KR/CN"
+
+#: rc.c:246
+msgid "Treat 4 bytes char. of GB18030 as Unicode"
+msgstr "視 GB18030 編碼的 4 位元組字元為 Unicode"
+
+#: rc.c:247
+msgid "Simple Preserve space"
+msgstr "簡單的保留空間"
+
+#: rc.c:250
+msgid "keymap file"
+msgstr "鍵盤對映檔案"
+
+#: rc.c:267
+msgid "black"
+msgstr "黑色"
+
+#: rc.c:268
+msgid "red"
+msgstr "紅色"
+
+#: rc.c:269
+msgid "green"
+msgstr "綠色"
+
+#: rc.c:270
+msgid "yellow"
+msgstr "黃色"
+
+#: rc.c:271
+msgid "blue"
+msgstr "藍色"
+
+#: rc.c:272
+msgid "magenta"
+msgstr "品紅"
+
+#: rc.c:273
+msgid "cyan"
+msgstr "青色"
+
+#: rc.c:274
+msgid "white"
+msgstr "白色"
+
+#: rc.c:275
+msgid "terminal"
+msgstr "終端"
+
+#: rc.c:294
+msgid "none"
+msgstr "無"
+
+#: rc.c:295
+msgid "current URL"
+msgstr "當前 URL"
+
+#: rc.c:296
+msgid "link URL"
+msgstr "連結 URL"
+
+#: rc.c:301
+msgid "simple"
+msgstr "簡單"
+
+#: rc.c:302
+msgid "use tag"
+msgstr "使用標籤"
+
+#: rc.c:303
+msgid "fontify"
+msgstr ""
+
+#: rc.c:309
+msgid "A:relative to screen height"
+msgstr "A:相對於螢幕高度"
+
+#: rc.c:310
+msgid "B:fixed speed"
+msgstr "B:固定速度"
+
+#: rc.c:317
+msgid "unspecified"
+msgstr "未指定"
+
+#: rc.c:318
+msgid "inet inet6"
+msgstr ""
+
+#: rc.c:319
+msgid "inet6 inet"
+msgstr ""
+
+#: rc.c:320
+msgid "inet only"
+msgstr "僅 inet"
+
+#: rc.c:321
+msgid "inet6 only"
+msgstr "僅 inet6"
+
+#: rc.c:328
+msgid "discard"
+msgstr "丟棄"
+
+#: rc.c:330
+msgid "accept"
+msgstr "接受"
+
+#: rc.c:332
+msgid "ask"
+msgstr "詢問"
+
+#: rc.c:339
+msgid "use internal mailer instead"
+msgstr "使用內建郵件傳送器"
+
+#: rc.c:341
+msgid "ignore options and use only the address"
+msgstr "忽略選項而只使用地址"
+
+#: rc.c:342
+msgid "use full mailto URL"
+msgstr "使用整個 mailto URL"
+
+#: rc.c:351
+msgid "OFF"
+msgstr "關"
+
+#: rc.c:352
+msgid "Only ISO 2022"
+msgstr "僅 ISO 2022"
+
+#: rc.c:353
+msgid "ON"
+msgstr "開"
+
+#: rc.c:359
+msgid "ASCII"
+msgstr "ASCII"
+
+#: rc.c:360
+msgid "charset specific"
+msgstr "字符集特定"
+
+#: rc.c:361
+msgid "DEC special graphics"
+msgstr "DEC 特殊影象"
+
+#: rc.c:740
+msgid "Display Settings"
+msgstr "顯示設定"
+
+#: rc.c:742
+msgid "Color Settings"
+msgstr "顏色設定"
+
+#: rc.c:744
+msgid "Miscellaneous Settings"
+msgstr "雜項設定"
+
+#: rc.c:745
+msgid "Directory Settings"
+msgstr "目錄設定"
+
+#: rc.c:746
+msgid "External Program Settings"
+msgstr "外部程式設定"
+
+#: rc.c:747
+msgid "Network Settings"
+msgstr "網路設定"
+
+#: rc.c:748
+msgid "Proxy Settings"
+msgstr "代理設定"
+
+#: rc.c:750
+msgid "SSL Settings"
+msgstr "SSL 設定"
+
+#: rc.c:753
+msgid "Cookie Settings"
+msgstr "Cookie 設定"
+
+#: rc.c:756
+msgid "Charset Settings"
+msgstr "字符集設定"
+
+#. TRANSLATORS:
+#. * AcceptLang default: this is used in Accept-Language: HTTP request
+#. * header. For example, ja.po should translate it as
+#. * "ja;q=1.0, en;q=0.5" like that.
+#.
+#: rc.c:1238
+msgid "en;q=1.0"
+msgstr "zh-TW;q=1.0, zh-Hants;q=0.9, zh;q=0.8, en;q=0.6"
diff --git a/proto.h b/proto.h
index f8a7345..ed8f890 100644
--- a/proto.h
+++ b/proto.h
@@ -11,6 +11,8 @@ extern void pushEvent(int cmd, void *data);
extern MySignalHandler intTrap(SIGNAL_ARG);
extern void pgFore(void);
extern void pgBack(void);
+extern void hpgFore(void);
+extern void hpgBack(void);
extern void lup1(void);
extern void ldown1(void);
extern void ctrCsrV(void);
@@ -61,6 +63,7 @@ extern void submitForm(void);
extern void followForm(void);
extern void topA(void);
extern void lastA(void);
+extern void nthA(void);
extern void onA(void);
extern void nextA(void);
@@ -162,6 +165,24 @@ extern Str searchURIMethods(ParsedURL *pu);
extern void chkExternalURIBuffer(Buffer *buf);
#endif
extern ParsedURL *schemeToProxy(int scheme);
+#ifdef USE_M17N
+extern wc_ces url_to_charset(const char *url, const ParsedURL *base,
+ wc_ces doc_charset);
+extern char *url_encode(const char *url, const ParsedURL *base,
+ wc_ces doc_charset);
+#if 0
+extern char *url_decode(const char *url, const ParsedURL *base,
+ wc_ces doc_charset);
+#endif
+extern char *url_decode2(const char *url, const Buffer *buf);
+#else /* !defined(USE_M17N) */
+#define url_encode(url, base, cs) url_quote(url)
+extern char *url_decode0(const char *url);
+#if 0
+#define url_decode(url, base, cs) url_decode0(url)
+#endif
+#define url_decode2(url, buf) url_decode0(url)
+#endif /* !defined(USE_M17N) */
extern void examineFile(char *path, URLFile *uf);
extern char *acceptableEncoding();
extern int dir_exist(char *path);
@@ -180,7 +201,6 @@ extern void push_symbol(Str str, char symbol, int width, int n);
#ifdef USE_UNICODE
extern void update_utf8_symbol(void);
#endif
-extern Buffer *loadFile(char *path);
extern Buffer *loadGeneralFile(char *path, ParsedURL *current, char *referer,
int flag, FormList *request);
extern int is_boundary(unsigned char *, unsigned char *);
@@ -207,6 +227,8 @@ extern int getImageSize(ImageCache * cache);
extern Str process_img(struct parsed_tag *tag, int width);
extern Str process_anchor(struct parsed_tag *tag, char *tagbuf);
extern Str process_input(struct parsed_tag *tag);
+extern Str process_button(struct parsed_tag *tag);
+extern Str process_n_button(void);
extern Str process_select(struct parsed_tag *tag);
extern Str process_n_select(void);
extern void feed_select(char *str);
@@ -249,8 +271,7 @@ extern Buffer *openPagerBuffer(InputStream stream, Buffer *buf);
extern Buffer *openGeneralPagerBuffer(InputStream stream);
extern Line *getNextPage(Buffer *buf, int plen);
extern int save2tmp(URLFile uf, char *tmpf);
-extern int doExternal(URLFile uf, char *path, char *type, Buffer **bufp,
- Buffer *defaultbuf);
+extern Buffer *doExternal(URLFile uf, char *type, Buffer *defaultbuf);
extern int _doFileCopy(char *tmpf, char *defstr, int download);
#define doFileCopy(tmpf, defstr) _doFileCopy(tmpf, defstr, FALSE);
extern int doFileMove(char *tmpf, char *defstr);
@@ -372,6 +393,7 @@ extern void align(TextLine *lbuf, int width, int mode);
extern void print_item(struct table *t, int row, int col, int width, Str buf);
extern void print_sep(struct table *t, int row, int type, int maxcol, Str buf);
extern void do_refill(struct table *tbl, int row, int col, int maxlimit);
+extern void initRenderTable(void);
extern void renderTable(struct table *t, int max_width,
struct html_feed_environ *h_env);
extern struct table *begin_table(int border, int spacing, int padding,
@@ -507,7 +529,7 @@ extern ParsedURL *baseURL(Buffer *buf);
extern int openSocket(char *hostname, char *remoteport_name,
unsigned short remoteport_num);
extern void parseURL(char *url, ParsedURL *p_url, ParsedURL *current);
-extern void copyParsedURL(ParsedURL *p, ParsedURL *q);
+extern void copyParsedURL(ParsedURL *p, const ParsedURL *q);
extern void parseURL2(char *url, ParsedURL *pu, ParsedURL *current);
extern Str parsedURL2Str(ParsedURL *pu);
extern int getURLScheme(char **url);
@@ -586,9 +608,12 @@ extern char *getAnchorText(Buffer *buf, AnchorList *al, Anchor *a);
extern Buffer *link_list_panel(Buffer *buf);
extern Str decodeB(char **ww);
+extern void decodeB_to_growbuf(struct growbuf *gb, char **ww);
extern Str decodeQ(char **ww);
extern Str decodeQP(char **ww);
+extern void decodeQP_to_growbuf(struct growbuf *gb, char **ww);
extern Str decodeU(char **ww);
+extern void decodeU_to_growbuf(struct growbuf *gb, char **ww);
#ifdef USE_M17N
extern Str decodeWord(char **ow, wc_ces * charset);
extern Str decodeMIME(Str orgstr, wc_ces * charset);
@@ -611,6 +636,7 @@ extern char *confFile(char *base);
extern char *auxbinFile(char *base);
extern char *libFile(char *base);
extern char *helpFile(char *base);
+extern const void *querySiteconf(const ParsedURL *query_pu, int field);
extern Str localCookie(void);
extern Str loadLocalDir(char *dirname);
extern void set_environ(char *var, char *value);
@@ -683,6 +709,7 @@ extern void reMark(void);
#ifdef USE_MOUSE
extern void mouse(void);
+extern void sgrmouse(void);
extern void mouse_init(void);
extern void mouse_end(void);
extern void mouse_active(void);
@@ -698,6 +725,7 @@ extern void tabMs(void);
extern void closeTMs(void);
#else /* not USE_MOUSE */
#define mouse nulcmd
+#define sgrmouse nulcmd
#define msToggle nulcmd
#define movMs nulcmd
#define menuMs nulcmd
@@ -723,6 +751,8 @@ extern int getKey(char *s);
extern char *getKeyData(int key);
extern char *getWord(char **str);
extern char *getQWord(char **str);
+struct regex;
+extern char *getRegexWord(const char **str, struct regex **regex_ret);
#ifdef USE_MOUSE
extern void initMouseAction(void);
#endif
@@ -786,5 +816,3 @@ extern void dispVer(void);
void srand48(long);
long lrand48(void);
#endif
-
-#include "indep.h"
diff --git a/rc.c b/rc.c
index 8441a39..3fd84ef 100644
--- a/rc.c
+++ b/rc.c
@@ -9,7 +9,9 @@
#include <errno.h>
#include "parsetag.h"
#include "local.h"
+#include "regex.h"
#include <stdlib.h>
+#include <stddef.h>
struct param_ptr {
char *name;
@@ -88,6 +90,7 @@ static int OptionEncode = FALSE;
#define CMT_MULTICOL N_("Display file names in multi-column format")
#define CMT_ALT_ENTITY N_("Use ASCII equivalents to display entities")
#define CMT_GRAPHIC_CHAR N_("Character type for border of table and menu")
+#define CMT_DISP_BORDERS N_("Display table borders, ignore value of BORDER")
#define CMT_FOLD_TEXTAREA N_("Fold lines in TEXTAREA")
#define CMT_DISP_INS_DEL N_("Display INS, DEL, S and STRIKE element")
#define CMT_COLOR N_("Display with color")
@@ -140,12 +143,19 @@ static int OptionEncode = FALSE;
#define CMT_EDITOR N_("Editor")
#define CMT_MAILER N_("Mailer")
#define CMT_MAILTO_OPTIONS N_("How to call Mailer for mailto URLs with options")
-#define CMT_EXTBRZ N_("External Browser")
-#define CMT_EXTBRZ2 N_("Second External Browser")
-#define CMT_EXTBRZ3 N_("Third External Browser")
+#define CMT_EXTBRZ N_("External browser")
+#define CMT_EXTBRZ2 N_("2nd external browser")
+#define CMT_EXTBRZ3 N_("3rd external browser")
+#define CMT_EXTBRZ4 N_("4th external browser")
+#define CMT_EXTBRZ5 N_("5th external browser")
+#define CMT_EXTBRZ6 N_("6th external browser")
+#define CMT_EXTBRZ7 N_("7th external browser")
+#define CMT_EXTBRZ8 N_("8th external browser")
+#define CMT_EXTBRZ9 N_("9th external browser")
#define CMT_DISABLE_SECRET_SECURITY_CHECK N_("Disable secret file security check")
#define CMT_PASSWDFILE N_("Password file")
#define CMT_PRE_FORM_FILE N_("File for setting form on loading")
+#define CMT_SITECONF_FILE N_("File for preferences for each site")
#define CMT_FTPPASS N_("Password for anonymous FTP (your mail address)")
#define CMT_FTPPASS_HOSTNAMEGEN N_("Generate domain part of password for FTP")
#define CMT_USERAGENT N_("User-Agent identification string")
@@ -192,7 +202,7 @@ static int OptionEncode = FALSE;
#define CMT_SSL_CA_PATH N_("Path to directory for PEM encoded certificates of CAs")
#define CMT_SSL_CA_FILE N_("File consisting of PEM encoded certificates of CAs")
#endif /* USE_SSL_VERIFY */
-#define CMT_SSL_FORBID_METHOD N_("List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)")
+#define CMT_SSL_FORBID_METHOD N_("List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)")
#endif /* USE_SSL */
#ifdef USE_COOKIE
#define CMT_USECOOKIE N_("Enable cookie processing")
@@ -390,6 +400,8 @@ struct param_ptr params1[] = {
NULL},
{"graphic_char", P_CHARINT, PI_SEL_C, (void *)&UseGraphicChar,
CMT_GRAPHIC_CHAR, (void *)graphic_char_str},
+ {"display_borders", P_CHARINT, PI_ONOFF, (void *)&DisplayBorders,
+ CMT_DISP_BORDERS, NULL},
{"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea,
CMT_FOLD_TEXTAREA, NULL},
{"display_ins_del", P_INT, PI_SEL_C, (void *)&displayInsDel,
@@ -561,6 +573,18 @@ struct param_ptr params6[] = {
NULL},
{"extbrowser3", P_STRING, PI_TEXT, (void *)&ExtBrowser3, CMT_EXTBRZ3,
NULL},
+ {"extbrowser4", P_STRING, PI_TEXT, (void *)&ExtBrowser4, CMT_EXTBRZ4,
+ NULL},
+ {"extbrowser5", P_STRING, PI_TEXT, (void *)&ExtBrowser5, CMT_EXTBRZ5,
+ NULL},
+ {"extbrowser6", P_STRING, PI_TEXT, (void *)&ExtBrowser6, CMT_EXTBRZ6,
+ NULL},
+ {"extbrowser7", P_STRING, PI_TEXT, (void *)&ExtBrowser7, CMT_EXTBRZ7,
+ NULL},
+ {"extbrowser8", P_STRING, PI_TEXT, (void *)&ExtBrowser8, CMT_EXTBRZ8,
+ NULL},
+ {"extbrowser9", P_STRING, PI_TEXT, (void *)&ExtBrowser9, CMT_EXTBRZ9,
+ NULL},
{"bgextviewer", P_INT, PI_ONOFF, (void *)&BackgroundExtViewer,
CMT_BGEXTVIEW, NULL},
{"use_lessopen", P_INT, PI_ONOFF, (void *)&use_lessopen, CMT_USE_LESSOPEN,
@@ -619,6 +643,8 @@ struct param_ptr params9[] = {
CMT_FTPPASS_HOSTNAMEGEN, NULL},
{"pre_form_file", P_STRING, PI_TEXT, (void *)&pre_form_file,
CMT_PRE_FORM_FILE, NULL},
+ {"siteconf_file", P_STRING, PI_TEXT, (void *)&siteconf_file,
+ CMT_SITECONF_FILE, NULL},
{"user_agent", P_STRING, PI_TEXT, (void *)&UserAgent, CMT_USERAGENT, NULL},
{"no_referer", P_INT, PI_ONOFF, (void *)&NoSendReferer, CMT_NOSENDREFERER,
NULL},
@@ -771,7 +797,7 @@ create_option_search_table()
qsort(RC_search_table, RC_table_size, sizeof(struct rc_search_table),
(int (*)(const void *, const void *))compare_table);
- diff1 = diff2 = 0;
+ diff2 = 0;
for (i = 0; i < RC_table_size - 1; i++) {
p = RC_search_table[i].param->name;
q = RC_search_table[i + 1].param->name;
@@ -829,7 +855,7 @@ void
show_params(FILE * fp)
{
int i, j, l;
- char *t = NULL;
+ const char *t = "";
char *cmt;
#ifdef USE_M17N
@@ -1173,6 +1199,8 @@ do_mkdir(const char *dir, long mode)
#endif /* not __MINW32_VERSION */
#endif /* not __EMX__ */
+static void loadSiteconf(void);
+
void
sync_with_option(void)
{
@@ -1199,6 +1227,7 @@ sync_with_option(void)
#endif
loadPasswd();
loadPreForm();
+ loadSiteconf();
if (AcceptLang == NULL || *AcceptLang == '\0') {
/* TRANSLATORS:
@@ -1250,7 +1279,7 @@ init_rc(void)
if (stat(rc_dir, &st) < 0) {
if (errno == ENOENT) { /* no directory */
if (do_mkdir(rc_dir, 0700) < 0) {
- fprintf(stderr, "Can't create config directory (%s)!", rc_dir);
+ /* fprintf(stderr, "Can't create config directory (%s)!\n", rc_dir); */
goto rc_dir_err;
}
else {
@@ -1258,17 +1287,17 @@ init_rc(void)
}
}
else {
- fprintf(stderr, "Can't open config directory (%s)!", rc_dir);
+ /* fprintf(stderr, "Can't open config directory (%s)!\n", rc_dir); */
goto rc_dir_err;
}
}
if (!S_ISDIR(st.st_mode)) {
/* not a directory */
- fprintf(stderr, "%s is not a directory!", rc_dir);
+ /* fprintf(stderr, "%s is not a directory!\n", rc_dir); */
goto rc_dir_err;
}
if (!(st.st_mode & S_IWUSR)) {
- fprintf(stderr, "%s is not writable!", rc_dir);
+ /* fprintf(stderr, "%s is not writable!\n", rc_dir); */
goto rc_dir_err;
}
no_rc_dir = FALSE;
@@ -1301,6 +1330,11 @@ init_rc(void)
((tmp_dir = getenv("TMP")) == NULL || *tmp_dir == '\0') &&
((tmp_dir = getenv("TEMP")) == NULL || *tmp_dir == '\0'))
tmp_dir = "/tmp";
+#ifdef HAVE_MKDTEMP
+ tmp_dir = mkdtemp(Strnew_m_charp(tmp_dir, "/w3m-XXXXXX", NULL)->ptr);
+ if (tmp_dir == NULL)
+ tmp_dir = rc_dir;
+#endif
create_option_search_table();
goto open_rc;
}
@@ -1483,6 +1517,7 @@ panel_set_option(struct parsed_tagarg *arg)
{
FILE *f = NULL;
char *p;
+ Str s = Strnew(), tmp;
if (config_file == NULL) {
disp_message("There's no config file... config not saved", FALSE);
@@ -1498,14 +1533,17 @@ panel_set_option(struct parsed_tagarg *arg)
if (arg->value) {
p = conv_to_system(arg->value);
if (set_param(arg->arg, p)) {
- if (f)
- fprintf(f, "%s %s\n", arg->arg, p);
+ tmp = Sprintf("%s %s\n", arg->arg, p);
+ Strcat(tmp, s);
+ s = tmp;
}
}
arg = arg->next;
}
- if (f)
+ if (f) {
+ fputs(s->ptr, f);
fclose(f);
+ }
sync_with_option();
backBf();
}
@@ -1556,3 +1594,217 @@ helpFile(char *base)
return expandPath(Strnew_m_charp(w3m_help_dir(), "/", base, NULL)->ptr);
}
#endif
+
+/* siteconf */
+/*
+ * url "<url>"|/<re-url>/|m@<re-url>@i [exact]
+ * substitute_url "<destination-url>"
+ * url_charset <charset>
+ * no_referer_from on|off
+ * no_referer_to on|off
+ *
+ * The last match wins.
+ */
+
+struct siteconf_rec {
+ struct siteconf_rec *next;
+ char *url;
+ Regex *re_url;
+ int url_exact;
+ unsigned char mask[(SCONF_N_FIELD + 7) >> 3];
+
+ char *substitute_url;
+#ifdef USE_M17N
+ wc_ces url_charset;
+#endif
+ int no_referer_from;
+ int no_referer_to;
+};
+#define SCONF_TEST(ent, f) ((ent)->mask[(f)>>3] & (1U<<((f)&7)))
+#define SCONF_SET(ent, f) ((ent)->mask[(f)>>3] |= (1U<<((f)&7)))
+#define SCONF_CLEAR(ent, f) ((ent)->mask[(f)>>3] &= ~(1U<<((f)&7)))
+
+static struct siteconf_rec *siteconf_head = NULL;
+static struct siteconf_rec *newSiteconfRec(void);
+
+static struct siteconf_rec *
+newSiteconfRec(void)
+{
+ struct siteconf_rec *ent;
+
+ ent = New(struct siteconf_rec);
+ ent->next = NULL;
+ ent->url = NULL;
+ ent->re_url = NULL;
+ ent->url_exact = FALSE;
+ memset(ent->mask, 0, sizeof(ent->mask));
+
+ ent->substitute_url = NULL;
+#ifdef USE_M17N
+ ent->url_charset = 0;
+#endif
+ return ent;
+}
+
+static void
+loadSiteconf(void)
+{
+ char *efname;
+ FILE *fp;
+ Str line;
+ struct siteconf_rec *ent = NULL;
+
+ siteconf_head = NULL;
+ if (!siteconf_file)
+ return;
+ if ((efname = expandPath(siteconf_file)) == NULL)
+ return;
+ fp = fopen(efname, "r");
+ if (fp == NULL)
+ return;
+ while (line = Strfgets(fp), line->length > 0) {
+ char *p, *s;
+
+ Strchop(line);
+ p = line->ptr;
+ SKIP_BLANKS(p);
+ if (*p == '#' || *p == '\0')
+ continue;
+ s = getWord(&p);
+
+ /* The "url" begins a new record. */
+ if (strcmp(s, "url") == 0) {
+ char *url, *opt;
+ struct siteconf_rec *newent;
+
+ /* First, register the current record. */
+ if (ent) {
+ ent->next = siteconf_head;
+ siteconf_head = ent;
+ ent = NULL;
+ }
+
+ /* Second, create a new record. */
+ newent = newSiteconfRec();
+ url = getRegexWord((const char **)&p, &newent->re_url);
+ opt = getWord(&p);
+ SKIP_BLANKS(p);
+ if (!newent->re_url) {
+ ParsedURL pu;
+ if (!url || !*url)
+ continue;
+ parseURL2(url, &pu, NULL);
+ newent->url = parsedURL2Str(&pu)->ptr;
+ }
+ /* If we have an extra or unknown option, ignore this record
+ * for future extensions. */
+ if (strcmp(opt, "exact") == 0) {
+ newent->url_exact = TRUE;
+ }
+ else if (*opt != 0)
+ continue;
+ if (*p)
+ continue;
+ ent = newent;
+ continue;
+ }
+
+ /* If the current record is broken, skip to the next "url". */
+ if (!ent)
+ continue;
+
+ /* Fill the new record. */
+ if (strcmp(s, "substitute_url") == 0) {
+ ent->substitute_url = getQWord(&p);
+ SCONF_SET(ent, SCONF_SUBSTITUTE_URL);
+ }
+#ifdef USE_M17N
+ else if (strcmp(s, "url_charset") == 0) {
+ char *charset = getWord(&p);
+ ent->url_charset = (charset && *charset) ?
+ wc_charset_to_ces(charset) : 0;
+ SCONF_SET(ent, SCONF_URL_CHARSET);
+ }
+#endif /* USE_M17N */
+ else if (strcmp(s, "no_referer_from") == 0) {
+ ent->no_referer_from = str_to_bool(getWord(&p), 0);
+ SCONF_SET(ent, SCONF_NO_REFERER_FROM);
+ }
+ else if (strcmp(s, "no_referer_to") == 0) {
+ ent->no_referer_to = str_to_bool(getWord(&p), 0);
+ SCONF_SET(ent, SCONF_NO_REFERER_TO);
+ }
+ }
+ if (ent) {
+ ent->next = siteconf_head;
+ siteconf_head = ent;
+ ent = NULL;
+ }
+ fclose(fp);
+}
+
+const void *
+querySiteconf(const ParsedURL *query_pu, int field)
+{
+ const struct siteconf_rec *ent;
+ Str u;
+ char *firstp, *lastp;
+
+ if (field < 0 || field >= SCONF_N_FIELD)
+ return NULL;
+ if (!query_pu || IS_EMPTY_PARSED_URL(query_pu))
+ return NULL;
+ u = parsedURL2Str((ParsedURL *)query_pu);
+ if (u->length == 0)
+ return NULL;
+
+ for (ent = siteconf_head; ent; ent = ent->next) {
+ if (!SCONF_TEST(ent, field))
+ continue;
+ if (ent->re_url) {
+ if (RegexMatch(ent->re_url, u->ptr, u->length, 1)) {
+ MatchedPosition(ent->re_url, &firstp, &lastp);
+ if (!ent->url_exact)
+ goto url_found;
+ if (firstp != u->ptr || lastp == firstp)
+ continue;
+ if (*lastp == 0 || *lastp == '?' || *(lastp - 1) == '?' ||
+ *lastp == '#' || *(lastp - 1) == '#')
+ goto url_found;
+ }
+ } else {
+ int matchlen = strmatchlen(ent->url, u->ptr, u->length);
+ if (matchlen == 0 || ent->url[matchlen] != 0)
+ continue;
+ firstp = u->ptr;
+ lastp = u->ptr + matchlen;
+ if (*lastp == 0 || *lastp == '?' || *(lastp - 1) == '?' ||
+ *lastp == '#' || *(lastp - 1) == '#')
+ goto url_found;
+ if (!ent->url_exact && (*lastp == '/' || *(lastp - 1) == '/'))
+ goto url_found;
+ }
+ }
+ return NULL;
+
+url_found:
+ switch (field) {
+ case SCONF_SUBSTITUTE_URL:
+ if (ent->substitute_url && *ent->substitute_url) {
+ Str tmp = Strnew_charp_n(u->ptr, firstp - u->ptr);
+ Strcat_charp(tmp, ent->substitute_url);
+ Strcat_charp(tmp, lastp);
+ return tmp->ptr;
+ }
+ return NULL;
+#ifdef USE_M17N
+ case SCONF_URL_CHARSET:
+ return &ent->url_charset;
+#endif
+ case SCONF_NO_REFERER_FROM:
+ return &ent->no_referer_from;
+ case SCONF_NO_REFERER_TO:
+ return &ent->no_referer_to;
+ }
+ return NULL;
+}
diff --git a/regex.c b/regex.c
index 5bee4b2..93406e8 100644
--- a/regex.c
+++ b/regex.c
@@ -77,7 +77,7 @@ static longchar
set_longchar(char *str)
{
unsigned char *p = (unsigned char *)str;
- longchar r;
+ longchar r = { };
#ifdef USE_M17N
if (*p & 0x80) {
@@ -580,7 +580,7 @@ regmatch_iter(struct MatchingContext1 *c,
c->lastpos = c->str;
#ifdef REGEX_DEBUG
if (verbose)
- printf("Succeed: %s %d\n", c->str, c->lastpos - c->str);
+ printf("Succeed: %s %ld\n", c->str, (long)(c->lastpos - c->str));
#endif
YIELD(1, c, 7);
return 0;
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 4da9ce5..5beb9b0 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -60,7 +60,7 @@ w3mhelp-funcname.pl: w3mhelp-funcname.pl.in ../funcname.tab $(top_srcdir)/doc/ke
@cat $(srcdir)/w3mhelp-funcname.pl.in >> w3mhelp-funcname.pl
@echo "done"
-w3mhelp-funcdesc-stamp: $(top_srcdir)/doc/README.func $(top_srcdir)/doc-jp/README.func w3mhelp-funcdesc.en.pl.in w3mhelp-funcdesc.ja.pl.in
+w3mhelp-funcdesc-stamp: $(top_srcdir)/doc/README.func $(top_srcdir)/doc-jp/README.func $(top_srcdir)/doc-de/README.func w3mhelp-funcdesc.en.pl.in w3mhelp-funcdesc.ja.pl.in w3mhelp-funcdesc.de.pl.in
@echo "generating w3mhelp-funcdesc*.pl..."
@for dirlang in $(DOCDIRS); do \
dir=`expr "$$dirlang" : "\(.*\):.*"`; \
@@ -87,7 +87,7 @@ install: $(LIB_TARGETS) $(HELP_TARGETS)
do \
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(AUXBIN_DIR); \
done
- for file in $(LIB_TARGETS); \
+ for file in w3mdict.cgi $(LIB_TARGETS); \
do \
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(CGIBIN_DIR); \
done
@@ -105,7 +105,7 @@ uninstall:
do \
rm -f $(AUXBIN_DIR)/$$file; \
done
- -for file in $(LIB_TARGETS); \
+ -for file in w3mdict.cgi $(LIB_TARGETS); \
do \
rm -f $(LIB_DIR)/$$file; \
done
diff --git a/scripts/w3mdict.cgi b/scripts/w3mdict.cgi
new file mode 100755
index 0000000..6b0e62e
--- /dev/null
+++ b/scripts/w3mdict.cgi
@@ -0,0 +1,56 @@
+#!/bin/sh
+# w3mdict.cgi - A dictd dictionary query cgi for w3m
+#
+# REQUIREMENTS:
+# + dict client software
+# + an address of a dict server, for variable ${DICT_SERVER}
+# + a name of a favorite database on that server, for variable
+# ${FAVORITE_DATABASE}
+# OPTIONALLY:
+# + locally install a dict server (eg. dictd) and a collection
+# of dict databases (eg. wordnet, aka "wn")
+
+DICT_SERVER="localhost"
+FAVORITE_DATABASE="wn"
+RETURN_MESSAGE="\n\nPress 'B' to return to the previous page."
+printf "Content-type: text/plain\n"
+type dict \
+|| {
+ # Originally, we inconsiderately failed silently ...
+ # printf "W3m-control: BACK\n\n"
+ printf "\n\nERROR: dict client software not found${RETURN_MESSAGE}"
+ exit
+ }
+# First, we check only our best and favorite database. This is most
+# likely to give us a best defintion, and avoids displaying a long and
+# cluttered page with entries from many databases.
+dict --host "${DICT_SERVER}" \
+ --database "${FAVORITE_DATABASE}" \
+ "${QUERY_STRING}" 2>&1 \
+&& {
+ printf "${RETURN_MESSAGE}"
+ } \
+|| {
+ # The initial attempt failed, so let's search ALL databases
+ # available on the server.
+ dict --host "${DICT_SERVER}" \
+ "${QUERY_STRING}" 2>&1 \
+ && {
+ printf "${RETURN_MESSAGE}"
+ } \
+ || {
+ # No defintions were found in any of the server's databases, so
+ # let's return to the favorite database in order to retrieve its
+ # guess of what we meant to type. Originally, for this case, we
+ # pushed the user's default action to be entering another word for
+ # a dict defintion, so the print command was:
+ # printf "W3m-control: DICT_WORD\n\n"
+ # Now, we need only print a blank line to separate the cgi header
+ # from the page content.
+ printf "\n"
+ dict --host "${DICT_SERVER}" \
+ --database "${FAVORITE_DATABASE}" \
+ "${QUERY_STRING}" 2>&1
+ printf "${RETURN_MESSAGE}"
+ }
+ }
diff --git a/scripts/w3mhelp-funcdesc.de.pl.in b/scripts/w3mhelp-funcdesc.de.pl.in
new file mode 100644
index 0000000..11539d1
--- /dev/null
+++ b/scripts/w3mhelp-funcdesc.de.pl.in
@@ -0,0 +1,66 @@
+# charset
+$charset = 'UTF-8';
+
+# Buffer selection mode
+
+%buf_funcdesc = (
+ 'BUF:PREV', 'Gehe zum vorherigen Punkt',
+ 'BUF:NEXT', 'Gehe zum nächsten Punkt',
+ 'BUF:DELETE', 'Lösche den ausgewählten Eintrag',
+ 'BUF:GO', 'Gehe zum ausgewählten Eintrag',
+);
+
+%lineedit_funcdesc = (
+ 'LINEEDIT:FORWARD', 'Bewege Cursor vorwärts',
+ 'LINEEDIT:BACK', 'Bewege Cursor rückwärts',
+ 'LINEEDIT:BS', 'Vorheriges Zeichen löschen',
+ 'LINEEDIT:DEL', 'Aktuelles Zeichen löschen',
+ 'LINEEDIT:KILL_AFTER', 'Lösche alles nach dem Cursor',
+ 'LINEEDIT:KILL_BEFORE', 'Lösche alles vor dem Cursor',
+ 'LINEEDIT:TOP', 'Gehe zum Zeilenanfang',
+ 'LINEEDIT:BOTTOM', 'Gehe zum Zeilenende',
+ 'LINEEDIT:PREV', 'Hole den vorherigen Chronik-Eintrag',
+ 'LINEEDIT:NEXT', 'Hole den nächsten Chronik-Eintrag',
+ 'LINEEDIT:EDITOR', 'Bearbeite mit externem Editor',
+ 'LINEEDIT:COMPLETE', 'Versuche, den Dateinamen zu komplettieren',
+ 'LINEEDIT:ACCEPT', 'Eingabezeile annehmen',
+);
+
+%menu_funcdesc = (
+ 'MENU:SELECT', 'Wähle Eintrag aus',
+ 'MENU:CLOSE', 'Schließe Menü',
+ 'MENU:CANCEL', 'Einen Auswahlschritt zurück',
+ 'MENU:DOWN', 'Gehe zum nächsten Punkt',
+ 'MENU:UP', 'Gehe zum vorherigen Punkt',
+ 'MENU:LINE_UP', 'Scrolle einen Punkt aufwärts',
+ 'MENU:LINE_DOWN', 'Scrolle einen Punkt abwärts',
+ 'MENU:TOP', 'Gehe zum ersten Punkt',
+ 'MENU:LAST', 'Gehe zum letzten Punkt',
+ 'MENU:NEXT', 'Gehe zur nächsten Seite',
+ 'MENU:PREV', 'Gehe zur vorherigen Seite',
+ 'MENU:SEARCH_FORE', 'Suche vorwärts',
+ 'MENU:SEARCH_BACK', 'Suche rückwärts',
+ 'MENU:SEARCH_NEXT', 'Suche weitere Übereinstimmung',
+ 'MENU:SEARCH_PREV', 'Suche frühere Übereinstimmung',
+ 'MENU:SUSPEND', 'Zurückstellen',
+);
+
+%title = (
+ "Current keymap file", 'Aktuelle Datei mit Tastaturbefehlszuordnung',
+ "In-page Navigation", 'Navigation auf der Seite',
+ "Hyperlink Operations", 'Umgang mit Hyperlinks',
+ "File/Stream Operations", 'Umgang mit Dateien und Datenströmen',
+ "Buffer Operations", 'Umgang mit Puffern',
+ "Tab Operations", 'Umgang mit Reitern',
+ "Buffer and Tab Selection Mode", 'Puffer/Reiter-Auswahl-Modus',
+ "Bookmark Management", 'Lesezeichenverwaltung',
+ "Searches", 'Suchen',
+ "Dictionary Lookup", 'Abgleich mit Wörterbuch',
+ "Mark Operations", 'Umgang mit Textmarken',
+ "Miscellaneous", 'Verschiedenes',
+ "User-defined key bindings", 'Benutzerdefinierte Tastaturbefehle',
+ "Input Line Editing Mode", 'Bearbeitung der Eingabezeile',
+ "Popup Menu Mode", 'Navigation in Menüs',
+);
+
+1;
diff --git a/scripts/w3mhelp-funcdesc.en.pl.in b/scripts/w3mhelp-funcdesc.en.pl.in
index d854b59..b9f4ed8 100644
--- a/scripts/w3mhelp-funcdesc.en.pl.in
+++ b/scripts/w3mhelp-funcdesc.en.pl.in
@@ -4,44 +4,44 @@ $charset = 'US-ASCII';
# Buffer selection mode
%buf_funcdesc = (
- 'BUF:PREV', 'Select previous buffer',
- 'BUF:NEXT', 'Select next buffer',
- 'BUF:DELETE', 'Delete current buffer',
- 'BUF:GO', 'Go to the selected buffer',
+ 'BUF:PREV', 'Previous item',
+ 'BUF:NEXT', 'Next item',
+ 'BUF:DELETE', 'Delete item',
+ 'BUF:GO', 'Select item',
);
%lineedit_funcdesc = (
- 'LINEEDIT:FORWARD', 'Move cursor forward',
- 'LINEEDIT:BACK', 'Move cursor backward',
+ 'LINEEDIT:FORWARD', 'Cursor forward',
+ 'LINEEDIT:BACK', 'Cursor backward',
'LINEEDIT:BS', 'Delete previous character',
- 'LINEEDIT:DEL', 'Delete current character',
- 'LINEEDIT:KILL_AFTER', 'Kill everything after cursor',
- 'LINEEDIT:KILL_BEFORE', 'Kill everything before cursor',
- 'LINEEDIT:TOP', 'Move to the top of line',
- 'LINEEDIT:BOTTOM', 'Move to the bottom of line',
+ 'LINEEDIT:DEL', 'Delete character',
+ 'LINEEDIT:KILL_AFTER', 'Delete everything after cursor',
+ 'LINEEDIT:KILL_BEFORE', 'Delete everything before cursor',
+ 'LINEEDIT:TOP', 'Cursor to the beginning of the line',
+ 'LINEEDIT:BOTTOM', 'Cursor to the end of the line',
'LINEEDIT:PREV', 'Fetch the previous string from the history list',
'LINEEDIT:NEXT', 'Fetch the next string from the history list',
'LINEEDIT:EDITOR', 'Edit with external editor',
- 'LINEEDIT:COMPLETE', 'Complete filename',
- 'LINEEDIT:ACCEPT', 'Accept',
+ 'LINEEDIT:COMPLETE', 'Try to complete filename',
+ 'LINEEDIT:ACCEPT', 'Accept input line',
);
%menu_funcdesc = (
'MENU:SELECT', 'Select item',
'MENU:CLOSE', 'Close menu',
- 'MENU:CANCEL', 'Back',
- 'MENU:DOWN', 'Move to next item',
- 'MENU:UP', 'Move to previous item',
+ 'MENU:CANCEL', 'One selection step backward',
+ 'MENU:DOWN', 'Move to the next item',
+ 'MENU:UP', 'Move to the previous item',
'MENU:LINE_UP', 'Scroll up one item',
'MENU:LINE_DOWN', 'Scroll down one item',
- 'MENU:TOP', 'Go to top item',
- 'MENU:LAST', 'Go to last item',
- 'MENU:NEXT', 'Go to next page',
- 'MENU:PREV', 'Go to previous page',
- 'MENU:SEARCH_FORE', 'Search foreward',
+ 'MENU:TOP', 'Move to the first item',
+ 'MENU:LAST', 'Move to the final item',
+ 'MENU:NEXT', 'Go to the next page',
+ 'MENU:PREV', 'Go to the previous page',
+ 'MENU:SEARCH_FORE', 'Search forward',
'MENU:SEARCH_BACK', 'Search backward',
- 'MENU:SEARCH_NEXT', 'Search next regexp',
- 'MENU:SEARCH_PREV', 'Search previous regexp',
+ 'MENU:SEARCH_NEXT', 'Search for the next match',
+ 'MENU:SEARCH_PREV', 'Search for the previous match',
'MENU:SUSPEND', 'Suspend',
);
diff --git a/scripts/w3mhelp-funcdesc.ja.pl.in b/scripts/w3mhelp-funcdesc.ja.pl.in
index 051c888..4ef476e 100644
--- a/scripts/w3mhelp-funcdesc.ja.pl.in
+++ b/scripts/w3mhelp-funcdesc.ja.pl.in
@@ -46,21 +46,21 @@ $charset = 'EUC-JP';
);
%title = (
- "Show keymap file", 'keymap �ե������',
- "Page/Cursor motion", '�ڡ���/���������ư',
- "Hyperlink operation", '�ϥ��ѡ�������',
- "File/Stream operation", '�ե�����/���ȥ�����',
- "Buffer operation", '�Хåե����',
- "Tab operation", '�������',
- "Buffer selection mode", '�Хåե�����⡼��',
- "Bookmark operation", '�֥å��ޡ������',
- "Search", '����',
- "Dictionary look-up", '����',
- "Mark operation", '�ޡ������',
- "Miscellany", '����¾',
- "User defined keymaps", '�桼�����',
- "Line-edit mode", '���Խ��⡼��',
- "Popup menu", '��˥塼',
+ "Current keymap file", 'keymap �ե������',
+ "In-page Navigation", '�ڡ���/���������ư',
+ "Hyperlink Operations", '�ϥ��ѡ�������',
+ "File/Stream Operations", '�ե�����/���ȥ�����',
+ "Buffer Operations", '�Хåե����',
+ "Tab Operations", '�������',
+ "Buffer and Tab Selection Mode", '�Хåե�����⡼��',
+ "Bookmark Management", '�֥å��ޡ������',
+ "Searches", '����',
+ "Dictionary Lookup", '����',
+ "Mark Operations", '�ޡ������',
+ "Miscellaneous", '����¾',
+ "User-defined key bindings", '�桼�����',
+ "Input Line Editing Mode", '���Խ��⡼��',
+ "Popup Menu Mode", '��˥塼',
);
1;
diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in
index b2fca8f..503dddc 100644
--- a/scripts/w3mhelp.cgi.in
+++ b/scripts/w3mhelp.cgi.in
@@ -48,7 +48,7 @@ if (defined($ENV{'QUERY_STRING'})) {
}
# print "tlang=$tlang\n";
eval {require "w3mhelp-funcdesc.$tlang.pl";};
- if (defined(%funcdesc)) {
+ if (%funcdesc) {
$lang = $tlang;
}
}
@@ -102,8 +102,7 @@ Content-Type: text/html; charset=$charset
*******
<A HREF="http://w3m.sourceforge.net/">w3m</A>
(WWW-wo-Miru) Version $version by
-<A HREF="mailto:aito\@fw.ipsj.or.jp">A.ITO</A> ********<BR>
- ***** Key assign table *****
+<A HREF="mailto:aito\@fw.ipsj.or.jp">A.ITO</A> ********
</CENTER>
HEADING
@@ -112,25 +111,25 @@ $q_version = $version;
$q_version =~ s/[^A-Za-z0-9_\$\.\-]/sprintf('%%%02X', ord($&))/ge;
$script = "<A HREF=\"$ENV{'SCRIPT_NAME'}?version=$q_version&lang=";
-# doc:en_English doc-jp:ja_Japanese
+# doc:en_English doc-jp:ja_Japanese doc-de:de_German
for $otherlang (@docdirs) {
local(@d) = split(/[:_]/, $otherlang);
if ($d[1] ne $lang) {
$d[1] =~ s/[^A-Za-z0-9_\$\.\-]/sprintf('%%%02X', ord($&))/ge;
- print $script, $d[1], "\">$d[2] version</A>\n";
+ print $script, $d[1], "\">[$d[2]]</A>\n";
}
}
$keymap =~ s/[<>&]/$htmlesc{$&}/ge;
-$head = "Show keymap file";
+$head = 'Current keymap file';
if (defined($title{$head})) {
$head = $title{$head};
$head =~ s/[<>&]/$htmlesc{$&}/ge;
}
print "<P><A HREF=\"$keymap\">$head</A>\n";
-&show_keymap("Page/Cursor motion",
+&show_keymap('In-page Navigation',
split(" ", "pgFore pgBack movR movL movD movU
movR1 movL1 movD1 movU1 ldown1 lup1
shiftl shiftr col1L col1R linbeg linend ctrCsrH ctrCsrV
@@ -139,50 +138,50 @@ print "<P><A HREF=\"$keymap\">$head</A>\n";
nextR nextL nextD nextU nextRD nextLU
undoPos redoPos"));
-&show_keymap("Hyperlink operation",
+&show_keymap('Hyperlink Operations',
split(" ", "followA tabA svA followI svI submitForm
curURL peekURL peekIMG pginfo curlno chkURL chkWORD chkNMID
rFrame extbrz linkbrz linkLst listMn linkMn accessKey"));
-&show_keymap("File/Stream operation",
+&show_keymap('File/Stream Operations',
split(" ", "goURL gorURL tabURL tabrURL ldfile readsh pipesh
pipeBuf"));
-&show_keymap("Buffer operation",
+&show_keymap('Buffer Operations',
split(" ", "backBf nextBf prevBf selMn selBuf vwSrc svSrc svBuf
editBf editScr reload reshape rdrwSc dispI stopI"));
-&show_keymap("Tab operation",
+&show_keymap('Tab Operations',
split(" ", "newT closeT nextT prevT tabMn tabR tabL"));
-&show_keymap("Bookmark operation",
+&show_keymap('Bookmark Management',
split(" ", "ldBmark adBmark"));
-&show_keymap("Search",
+&show_keymap('Searches',
split(" ", "srchfor srchbak srchnxt srchprv isrchfor isrchbak"));
-&show_keymap("Dictionary look-up",
+&show_keymap('Dictionary Lookup',
split(" ", "dictword dictwordat"));
-&show_keymap("Mark operation",
+&show_keymap('Mark Operations',
split(" ", "_mark nextMk prevMk reMark"));
-&show_keymap("Miscellany",
+&show_keymap('Miscellaneous',
split(" ", "mainMn ldhelp ldOpt dispVer cooLst ldHist ldDL
docCSet defCSet
msgs msToggle wrapToggle execCmd setAlarm setOpt setEnv defKey
reinit execsh susp qquitfm quitfm"));
-&show_keymap_data("User defined keymaps");
+&show_keymap_data('User-defined key bindings');
print "<BR>\n<HR WIDTH=80%>\n";
-&show_keymap("Buffer selection mode",
+&show_keymap('Buffer and Tab Selection Mode',
split(" ", "buffer_next buffer_prev buffer_delete buffer_go"));
print "<BR>\n<HR WIDTH=80%>\n";
-&show_keymap("Line-edit mode",
+&show_keymap('Input Line Editing Mode',
split(" ", "lineedit_forward lineedit_back lineedit_backspace
lineedit_delete lineedit_kill_after lineedit_kill_before
lineedit_top lineedit_bottom lineedit_prev lineedit_next
@@ -190,7 +189,7 @@ print "<BR>\n<HR WIDTH=80%>\n";
print "<BR>\n<HR WIDTH=80%>\n";
-&show_keymap("Popup menu",
+&show_keymap('Popup Menu Mode',
split(" ", "menu_select menu_close menu_cancel menu_down menu_up
menu_line_up menu_line_down menu_top menu_last menu_next
menu_prev menu_search_fore menu_search_back menu_search_next
diff --git a/scripts/w3mman/Makefile.in b/scripts/w3mman/Makefile.in
index 569e2fc..ad1cffe 100644
--- a/scripts/w3mman/Makefile.in
+++ b/scripts/w3mman/Makefile.in
@@ -33,11 +33,13 @@ ETC_DIR = $(sysconfdir)
CONF_DIR = $(sysconfdir)/$(PACKAGE)
BIN_DIR = $(bindir)
MAN1_DIR = $(mandir)/man1
+MAN1_DE_DIR = $(mandir)/de/man1
TARGETS = w3mman
CGIBIN_TARGETS = w3mman2html.cgi
MAN1_TARGETS = w3mman.1
-MAN_TARGETS = $(MAN1_TARGETS)
+MAN1_DE_TARGETS = w3mman.de.1
+MAN_TARGETS = $(MAN1_TARGETS) $(MAN1_DE_TARGETS)
MKDIR = mkdir -p
INSTALL = @INSTALL@
@@ -53,6 +55,7 @@ install: $(TARGETS) $(CGIBIN_TARGETS) $(MAN_TARGETS)
-$(MKDIR) $(DESTDIR)$(BIN_DIR)
-$(MKDIR) $(DESTDIR)$(CGIBIN_DIR)
-$(MKDIR) $(DESTDIR)$(MAN1_DIR)
+ -$(MKDIR) $(DESTDIR)$(MAN1_DE_DIR)
for file in $(TARGETS); \
do \
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(BIN_DIR); \
@@ -65,6 +68,12 @@ install: $(TARGETS) $(CGIBIN_TARGETS) $(MAN_TARGETS)
do \
$(INSTALL_MAN) $$file $(DESTDIR)$(MAN1_DIR); \
done
+ for file in $(MAN1_DE_TARGETS); \
+ do \
+ $(INSTALL_MAN) $$file $(DESTDIR)$(MAN1_DE_DIR); \
+ f=`echo "$$file" | sed -e 's/\.de\././'`; \
+ mv $(DESTDIR)$(MAN1_DE_DIR)/$$file $(DESTDIR)$(MAN1_DE_DIR)/$$f; \
+ done
uninstall:
-for file in $(TARGETS); \
@@ -79,6 +88,11 @@ uninstall:
do \
rm -f $(MAN1_DIR)/$$file; \
done
+ -for file in $(MAN1_DE_TARGETS); \
+ do \
+ f=`echo "$$file" | sed -e 's/\.de\././'`; \
+ rm -f $(MAN1_DE_DIR)/$$f; \
+ done
clean:
@@ -89,7 +103,7 @@ distclean:
dist: all
@-rm -fr $(distdir)/w3mman
-$(MKDIR) $(distdir)/w3mman
- cp Makefile README w3mman.in w3mman2html.cgi.in hlink.cgi w3mman.1.in $(distdir)/w3mman
+ cp Makefile README w3mman.in w3mman2html.cgi.in hlink.cgi w3mman.1.in w3mman.de.1.in $(distdir)/w3mman
( cd $(distdir); tar -cf - w3mman | GZIP='' gzip ) \
> $(distdir)/w3mman.tar.gz
-rm -fr $(distdir)/w3mman
diff --git a/scripts/w3mman/w3mman.1.in b/scripts/w3mman/w3mman.1.in
index 1c0361d..68e3afc 100644
--- a/scripts/w3mman/w3mman.1.in
+++ b/scripts/w3mman/w3mman.1.in
@@ -1,4 +1,4 @@
-.TH W3MMAN 1 "Nov 5, 2005"
+.TH W3MMAN 1 "2016-07-13"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -12,36 +12,54 @@
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
-w3mman \- an interface to the on-line reference manuals by w3m(1)
+w3mman \- an interface to the on-line reference manuals via w3m(1)
.SH SYNOPSIS
+.\" mh 2016-07-04: "page" is an optional argument.
+.\" Started without it, w3mman displays a form that allows selection
+.\" of a manual page according to section, name and keyword.
+.\" Therefore square brackets introduced
.B w3mman
-.RI "[-M " path ] " " [ section ] " page"
+[
+.BI \-M " path"
+] [ [
+.I section
+]
+.I page
+]
.br
.B w3mman
-.RI "[-M " path "] -k " keyword
+[
+.BI \-M " path"
+] [
+.I section
+]
+.BI \-k " keyword"
.br
.B w3mman
-.RI -l " file
+.BI \-l " file"
+.br
.SH DESCRIPTION
+.\" mh 2016-07-04 text edited. This section shall deliver
+.\" more information than section NAME
.B w3mman
-is the system's manual pager by
-.BR w3m (1).
+is a Perl script that uses
+.BR w3m (1)
+to serve as a pager for on-line reference manuals.
.SH OPTIONS
A summary of options is included below.
.TP
.BI \-M " path"
-Specify
+Specify
.I path
-as MANPATH.
+as alternative MANPATH to use.
.TP
.BI \-k " keyword"
-Specify
-.I keyword.
+Specify \fIkeyword\fP.
.TP
.BI \-l " file"
-Specify a
-.I file.
+Specify a \fIfile\fP.
.SH ENVIRONMENT
+Two variables are available for debugging.
.TP
.B W3MMAN_W3M
If W3MMAN_W3M is set, its value is used instead of @W3M@.
@@ -51,7 +69,7 @@ If W3MMAN_MAN is set, its value is used instead of @MAN@.
.SH FILES
.TP
.I @libexecdir@/@PACKAGE@/cgi-bin/w3mman2html.cgi
-convert manual page to html.
+manual page to HTML converter.
.SH SEE ALSO
.BR man (1),
.BR w3m (1).
diff --git a/scripts/w3mman/w3mman.de.1.in b/scripts/w3mman/w3mman.de.1.in
new file mode 100644
index 0000000..d6c5a44
--- /dev/null
+++ b/scripts/w3mman/w3mman.de.1.in
@@ -0,0 +1,71 @@
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH W3MMAN 1 2016\-07\-13
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+w3mman \- eine Schnittstelle zur Anzeige von Online\-Referenzhandbüchern durch
+w3m(1)
+.SH SYNOPSIS
+.\" mh 2016-07-04: "page" is an optional argument.
+.\" Started without it, w3mman displays a form that allows selection
+.\" of a manual page according to section, name and keyword.
+.\" Therefore square brackets introduced
+\fBw3mman\fP [ \fB\-M\fP \fIPfad\fP ] [ \fIAbschnitt\fP ] [ \fISeite\fP ]
+.br
+\fBw3mman\fP [\fB\-M\fP \fIPfad\fP] \fB\-k\fP \fIStichwort\fP
+.br
+\fBw3mman\fP \fB\-l\fP \fIDatei\fP
+.br
+.SH BESCHREIBUNG
+.\" mh 2016-07-04 text edited. This section shall deliver
+.\" more information than section NAME
+\fBw3mman\fP ist ein Perl\-Skript, welches auf \fBw3m\fP(1) zurückgreift, um als
+Betrachter für Online\-Referenzhandbücher zu dienen.
+.SH OPTIONEN
+Es folgt eine Zusammenfassung der Optionen.
+.TP
+\fB\-M\fP\fI Pfad\fP
+Suchpfad für Handbuchseiten auf \fIPfad\fP setzen
+.TP
+\fB\-k\fP \fIStichwort\fP
+zum \fIStichwort\fP passende Handbuchseiten anzeigen
+.TP
+\fB\-l\fP \fIDatei\fP
+die Handbuchseiten\-Datei \fIDatei\fP anzeigen
+.SH UMGEBUNGSVARIABLEN
+Zur Fehleranalyse stehen zwei Variablen zur Verfügung.
+.TP
+\fBW3MMAN_W3M\fP
+Ist W3MMAN_W3M gesetzt, wird ihr Wert anstelle von @W3M@ verwendet.
+.TP
+\fBW3MMAN_MAN\fP
+Ist W3MMAN_MAN gesetzt, wird ihr Wert anstelle von @MAN@ verwendet.
+.SH DATEIEN
+.TP
+\fI@libexecdir@/@PACKAGE@/cgi\-bin/w3mman2html.cgi\fP
+Skript, welches Handbuchseiten in HTML konvertiert
+.SH "SIEHE AUCH"
+\fBman\fP(1), \fBw3m\fP(1).
+.SH AUTOR
+Diese Handbuchseite wurde von Fumitoshi UKAI <ukai@debian.or.jp> für
+Debian GNU / Linux geschrieben, sie kann aber auch auf anderen Systemen
+verwendet werden.
+Die deutsche Übersetzung wurde 2016 von
+.UR markus.hiereth@freenet.de
+Markus Hiereth
+.UE
+erstellt.
diff --git a/scripts/w3mman/w3mman.in b/scripts/w3mman/w3mman.in
index 6a27e70..fae7a41 100644
--- a/scripts/w3mman/w3mman.in
+++ b/scripts/w3mman/w3mman.in
@@ -7,7 +7,7 @@ $SCRIPT = 'file:///$LIB/w3mman2html.cgi';
sub usage {
($_ = $0) =~ s@.*/@@;
print STDERR "$_ [-M <path>] [[<section>] <command>]\n";
- print STDERR "$_ [-M <path>] [-k <keyword>]\n";
+ print STDERR "$_ [-M <path>] [<section>] [-k <keyword>]\n";
print STDERR "$_ [-l <file>]\n";
exit 1;
}
@@ -20,7 +20,8 @@ while (@ARGV) {
$ENV{'MANPATH'} = shift @ARGV;
} elsif (/^-k$/) {
@ARGV || &usage();
- $query = "?keyword=" . &form_encode(shift @ARGV);
+ if ( $query eq "" ) { $query = "?quit=ok"; }
+ $query .= "&keyword=" . &form_encode(shift @ARGV);
} elsif (/^-l$/) {
@ARGV || &usage();
$query = "?quit=ok&local=" . &form_encode(shift @ARGV);
@@ -28,11 +29,11 @@ while (@ARGV) {
} elsif (/^-/) {
&usage();
} elsif (/^\d/ || $_ eq 'n') {
- @ARGV || &usage();
- $query = "?quit=ok&man=" . &form_encode(shift @ARGV);
+ if ( $query eq "" ) { $query = "?quit=ok"; }
$query .= "§ion=" . &form_encode($_);
} else {
- $query = "?quit=ok&man=" . &form_encode($_);
+ if ( $query eq "" ) { $query = "?quit=ok"; }
+ $query .= "&man=" . &form_encode($_);
}
}
diff --git a/scripts/w3mman/w3mman2html.cgi.in b/scripts/w3mman/w3mman2html.cgi.in
index f430307..d660681 100644
--- a/scripts/w3mman/w3mman2html.cgi.in
+++ b/scripts/w3mman/w3mman2html.cgi.in
@@ -23,18 +23,23 @@ if ((! $query{"man"}) && (! $query{"local"})) {
if ($query{"keyword"}) {
$keyword = $query{"keyword"};
$k = &html_quote($keyword);
+ if ($query{"section"}) {
+ $section = $query{"section"};
+ $sectionopt = "-s $section ";
+ } else {
+ $sectionopt = "";
+ }
print <<EOF;
Content-Type: text/html
<html>
-<head><title>man -k $k</title></head>
+<head><title>man $sectionopt-k $k</title></head>
<body>
-<h2>man -k <b>$k</b></h2>
+<h2>man $sectionopt-k <b>$k</b></h2>
<ul>
EOF
$keyword =~ s:([^-\w\200-\377.,])::g;
- open(F, "$MAN -k $keyword 2> /dev/null |");
- @line = ();
+ open(F, "$MAN $sectionopt -k $keyword 2> /dev/null |");
while(<F>) {
chop;
$_ = &html_quote($_);
@@ -59,10 +64,10 @@ Content-Type: text/html
<body>
<form action="$CGI">
<table>
-<tr><td>Manual:<td><input name=man>
-<tr><td>Section:<td><input name=section>
-<tr><td>Keyword:<td><input name=keyword>
-<tr><td><td><input type=submit> <input type=reset>
+<tr><td>Manual:<td><input name=man />
+<tr><td>Section:<td><input name=section />
+<tr><td>Keyword:<td><input name=keyword />
+<tr><td><td><input type=submit /> <input type=reset />
</table>
</form>
</body>
@@ -126,12 +131,14 @@ while(<F>) {
s/\&/\&/g;
s/\</\</g;
s/\>/\>/g;
+ # non ASCII UTF-8 codepoint
+ my $utf8="[\300-\337][\200-\277]|[\340-\357][\200-\277]{2}|[\360-\367][\200-\277]{3}|[\370-\373][\200-\277]{4}|[\374\375][\200-\277]{5}";
- s@([\200-\377].)(\010{1,2}\1)+@<b>$1</b>@g;
+ s@($utf8)(\010\1)+@<b>$1</b>@g;
s@(\&\w+;|.)(\010\1)+@<b>$1</b>@g;
- s@__\010{1,2}((\<b\>)?[\200-\377].(\</b\>)?)@<u>$1</u>@g;
+ s@_\010((\<b\>)?($utf8)(\</b\>)?)@<u>$1</u>@g;
s@_\010((\<b\>)?(\&\w+\;|.)(\</b\>)?)@<u>$1</u>@g;
- s@((\<b\>)?[\200-\377].(\</b\>)?)\010{1,2}__@<u>$1</u>@g;
+ s@((\<b\>)?($utf8)(\</b\>)?)\010_@<u>$1</u>@g;
s@((\<b\>)?(\&\w+\;|.)(\</b\>)?)\010_@<u>$1</u>@g;
s@.\010(.)@$1@g;
@@ -156,7 +163,7 @@ EOF
}
s@(http|ftp)://[\w.\-/~]+[\w/]@<a href="$&">$&</a>@g;
- s@(\W)(mailto:)?(\w[\w.\-]*\@\w[\w.\-]*\.[\w.\-]*\w)@$1<a href="mailto:$3">$2$3</a>@g;
+ s@\b(mailto:|)(\w[\w.\-]*\@\w[\w.\-]*\.[\w.\-]*\w)@<a href="mailto:$2">$1$2</a>@g;
s@(\W)(\~?/[\w.][\w.\-/~]*)@$1 . &file_ref($2)@ge;
s@(include(<\/?[bu]\>|\s)*\<)([\w.\-/]+)@$1 . &include_ref($3)@ge;
if ($prev && m@^\s*(\<[bu]\>)*(\w[\w.\-]*)(\</[bu]\>)*(\([\dm]\w*\))@) {
@@ -220,7 +227,7 @@ sub is_command {
local($p);
(! -d && -x) || return 0;
- if (! defined(%PATH)) {
+ if (! %PATH) {
for $p (split(":", $ENV{'PATH'})) {
$p =~ s@/+$@@;
$PATH{$p} = 1;
diff --git a/symbol.c b/symbol.c
index 50475ae..c047c56 100644
--- a/symbol.c
+++ b/symbol.c
@@ -176,10 +176,10 @@ push_symbol(Str str, char symbol, int width, int n)
#ifdef USE_M17N
if (width == 2)
- p = alt2_symbol[(int)symbol];
+ p = alt2_symbol[(unsigned char)symbol % N_SYMBOL];
else
#endif
- p = alt_symbol[(int)symbol];
+ p = alt_symbol[(unsigned char)symbol % N_SYMBOL];
for (i = 0; i < 2 && *p; i++, p++)
buf[i] = (*p == ' ') ? NBSP_CODE : *p;
diff --git a/table.c b/table.c
index e1243ff..eb5c9ba 100644
--- a/table.c
+++ b/table.c
@@ -188,7 +188,7 @@ dv2sv(double *dv, short *iv, int size)
indexarray = NewAtom_N(short, size);
edv = NewAtom_N(double, size);
for (i = 0; i < size; i++) {
- iv[i] = ceil(dv[i]);
+ iv[i] = (short) ceil(dv[i]);
edv[i] = (double)iv[i] - dv[i];
}
@@ -205,7 +205,7 @@ dv2sv(double *dv, short *iv, int size)
indexarray[i] = k;
}
iw = min((int)(w + 0.5), size);
- if (iw == 0)
+ if (iw <= 1)
return;
x = edv[(int)indexarray[iw - 1]];
for (i = 0; i < size; i++) {
@@ -429,7 +429,6 @@ visible_length(char *str)
char *t, *r2;
int amp_len = 0;
- t = str;
while (*str) {
prev_status = status;
if (next_status(*str, &status)) {
@@ -761,7 +760,7 @@ do_refill(struct table *tbl, int row, int col, int maxlimit)
struct parsed_tag *tag;
if ((tag = parse_tag(&p, TRUE)) != NULL)
parsedtag_get_value(tag, ATTR_TID, &id);
- if (id >= 0 && id < tbl->ntable) {
+ if (id >= 0 && id < tbl->ntable && tbl->tables[id].ptr) {
int alignment;
TextLineListItem *ti;
struct table *t = tbl->tables[id].ptr;
@@ -961,7 +960,7 @@ set_integered_width(struct table *t, double *dwidth, short *iwidth)
for (step = 0; step < 2; step++) {
for (i = 0; i <= t->maxcol; i += n) {
int nn;
- char *idx;
+ short *idx;
double nsum;
if (sum < 0.5)
return;
@@ -982,7 +981,7 @@ set_integered_width(struct table *t, double *dwidth, short *iwidth)
(double)rulewidth - mod[ii] > 0.5)
fixed[ii] = 1;
}
- idx = NewAtom_N(char, n);
+ idx = NewAtom_N(short, n);
for (k = 0; k < cell->maxcell; k++) {
int kk, w, width, m;
j = cell->index[k];
@@ -1624,6 +1623,15 @@ get_table_width(struct table *t, short *orgwidth, short *cellwidth, int flag)
#define fixed_table_width(t)\
(get_table_width(t,t->fixed_width,t->cell.fixed_width,CHECK_MINIMUM))
+#define MAX_COTABLE_LEVEL 100
+static int cotable_level;
+
+void
+initRenderTable(void)
+{
+ cotable_level = 0;
+}
+
void
renderCoTable(struct table *tbl, int maxlimit)
{
@@ -1634,8 +1642,14 @@ renderCoTable(struct table *tbl, int maxlimit)
int i, col, row;
int indent, maxwidth;
+ if (cotable_level >= MAX_COTABLE_LEVEL)
+ return; /* workaround to prevent infinite recursion */
+ cotable_level++;
+
for (i = 0; i < tbl->ntable; i++) {
t = tbl->tables[i].ptr;
+ if (t == NULL)
+ continue;
col = tbl->tables[i].col;
row = tbl->tables[i].row;
indent = tbl->tables[i].indent;
@@ -1691,7 +1705,7 @@ renderTable(struct table *t, int max_width, struct html_feed_environ *h_env)
{
int i, j, w, r, h;
Str renderbuf;
- short new_tabwidth[MAXCOL];
+ short new_tabwidth[MAXCOL] = { 0 };
#ifdef MATRIX
int itr;
VEC *newwidth;
@@ -1724,6 +1738,10 @@ renderTable(struct table *t, int max_width, struct html_feed_environ *h_env)
if (max_width < rulewidth)
max_width = rulewidth;
+#define MAX_TABWIDTH 10000
+ if (max_width > MAX_TABWIDTH)
+ max_width = MAX_TABWIDTH;
+
check_maximum_width(t);
#ifdef MATRIX
@@ -2272,7 +2290,8 @@ skip_space(struct table *t, char *line, struct table_linfo *linfo,
}
if (s > 0) {
#ifdef USE_M17N
- if (ctype == PC_KANJI1 && prev_ctype == PC_KANJI1)
+ if (!SimplePreserveSpace &&
+ ctype == PC_KANJI1 && prev_ctype == PC_KANJI1)
skip += s;
else
#endif
@@ -2323,6 +2342,8 @@ feed_table_block_tag(struct table *tbl,
int offset;
if (mode->indent_level <= 0 && indent == -1)
return;
+ if (mode->indent_level >= CHAR_MAX && indent == 1)
+ return;
setwidth(tbl, mode);
feed_table_inline_tag(tbl, line, mode, -1);
clearcontentssize(tbl, mode);
@@ -2336,10 +2357,14 @@ feed_table_block_tag(struct table *tbl,
if (mode->indent_level < MAX_INDENT_LEVEL)
tbl->indent -= INDENT_INCR;
}
+ if (tbl->indent < 0)
+ tbl->indent = 0;
offset = tbl->indent;
if (cmd == HTML_DT) {
if (mode->indent_level > 0 && mode->indent_level <= MAX_INDENT_LEVEL)
offset -= INDENT_INCR;
+ if (offset < 0)
+ offset = 0;
}
if (tbl->indent > 0) {
check_minimum0(tbl, 0);
@@ -2546,8 +2571,10 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
}
}
#ifdef ID_EXT
- if (parsedtag_get_value(tag, ATTR_ID, &p))
+ if (parsedtag_get_value(tag, ATTR_ID, &p)) {
+ check_row(tbl, tbl->row);
tbl->tridvalue[tbl->row] = Strnew_charp(p);
+ }
#endif /* ID_EXT */
tbl->trattr = align | valign;
break;
@@ -2572,7 +2599,7 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
}
tbl->col++;
check_row(tbl, tbl->row);
- while (tbl->tabattr[tbl->row][tbl->col]) {
+ while (tbl->col < MAXCOL && tbl->tabattr[tbl->row][tbl->col]) {
tbl->col++;
}
if (tbl->col > MAXCOL - 1) {
@@ -2600,12 +2627,16 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
if ((tbl->row + rowspan) >= tbl->max_rowsize)
check_row(tbl, tbl->row + rowspan);
}
+ if (rowspan < 1)
+ rowspan = 1;
if (parsedtag_get_value(tag, ATTR_COLSPAN, &colspan)) {
if ((tbl->col + colspan) >= MAXCOL) {
/* Can't expand column */
colspan = MAXCOL - tbl->col;
}
}
+ if (colspan < 1)
+ colspan = 1;
if (parsedtag_get_value(tag, ATTR_ALIGN, &i)) {
switch (i) {
case ALIGN_LEFT:
@@ -2878,6 +2909,14 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
tmp = process_input(tag);
feed_table1(tbl, tmp, mode, width);
break;
+ case HTML_BUTTON:
+ tmp = process_button(tag);
+ feed_table1(tbl, tmp, mode, width);
+ break;
+ case HTML_N_BUTTON:
+ tmp = process_n_button();
+ feed_table1(tbl, tmp, mode, width);
+ break;
case HTML_SELECT:
tmp = process_select(tag);
if (tmp)
@@ -3010,7 +3049,6 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
break;
case HTML_TABLE_ALT:
id = -1;
- w = 0;
parsedtag_get_value(tag, ATTR_TID, &id);
if (id >= 0 && id < tbl->ntable) {
struct table *tbl1 = tbl->tables[id].ptr;
diff --git a/table.h b/table.h
index 83b661f..fdcdef3 100644
--- a/table.h
+++ b/table.h
@@ -17,7 +17,7 @@
#define MAX_TABLE_N 20 /* maximum number of table in same level */
#define MAXROW 50
-#define MAXCOL 50
+#define MAXCOL 256
#define MAX_WIDTH 80
diff --git a/tagtable.tab b/tagtable.tab
index f9b7b76..f5a2c30 100644
--- a/tagtable.tab
+++ b/tagtable.tab
@@ -176,6 +176,7 @@ bdo HTML_BDO
big HTML_BIG
/big HTML_N_BIG
button HTML_BUTTON
+/button HTML_N_BUTTON
fieldset HTML_FIELDSET
/fieldset HTML_N_FIELDSET
iframe HTML_IFRAME
diff --git a/terms.c b/terms.c
index 7a3c987..a636ac0 100644
--- a/terms.c
+++ b/terms.c
@@ -12,6 +12,7 @@
#include <unistd.h>
#include "config.h"
#include <string.h>
+#include <sys/wait.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
@@ -222,6 +223,7 @@ static void
check_cygwin_console(void)
{
char *term = getenv("TERM");
+ char *ctype;
HANDLE hWnd;
if (term == NULL)
@@ -236,7 +238,9 @@ check_cygwin_console(void)
isLocalConsole = 1;
}
}
- if (strncmp(getenv("LANG"), "ja", 2) == 0) {
+ if (((ctype = getenv("LC_ALL")) ||
+ (ctype = getenv("LC_CTYPE")) ||
+ (ctype = getenv("LANG"))) && strncmp(ctype, "ja", 2) == 0) {
isWinConsole = TERM_CYGWIN_RESERVE_IME;
}
#ifdef SUPPORT_WIN9X_CONSOLE_MBCS
@@ -463,6 +467,262 @@ writestr(char *s)
#define MOVE(line,column) writestr(tgoto(T_cm,column,line));
+#ifdef USE_IMAGE
+void
+put_image_osc5379(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh, int n_terminal_image)
+{
+ Str buf;
+ char *size ;
+
+ if (w > 0 && h > 0)
+ size = Sprintf("%dx%d",w,h)->ptr;
+ else
+ size = "";
+
+ MOVE(y,x);
+ buf = Sprintf("\x1b]5379;show_picture %s %s %dx%d+%d+%d\x07",url,size,sw,sh,sx,sy);
+ writestr(buf->ptr);
+ MOVE(Currentbuf->cursorY,Currentbuf->cursorX);
+}
+
+static void
+save_gif(const char *path, u_char *header, size_t header_size, u_char *body, size_t body_size)
+{
+ int fd;
+
+ if ((fd = open(path, O_WRONLY|O_CREAT, 0600)) >= 0) {
+ write(fd, header, header_size) ;
+ write(fd, body, body_size) ;
+ write(fd, "\x3b" , 1) ;
+ close(fd) ;
+ }
+}
+
+static u_char *
+skip_gif_header(u_char *p)
+{
+ /* Header */
+ p += 10;
+
+ if (*(p) & 0x80) {
+ p += (3 * (2 << ((*p) & 0x7)));
+ }
+ p += 3;
+
+ return p;
+}
+
+static Str
+save_first_animation_frame(const char *path)
+{
+ int fd;
+ struct stat st;
+ u_char *header;
+ size_t header_size;
+ u_char *body;
+ u_char *p;
+ ssize_t len;
+ Str new_path;
+
+ new_path = Strnew_charp(path);
+ Strcat_charp(new_path, "-1");
+ if (stat(new_path->ptr, &st) == 0) {
+ return new_path;
+ }
+
+ if ((fd = open( path, O_RDONLY)) < 0) {
+ return NULL;
+ }
+
+ if (fstat( fd, &st) != 0 || ! (header = GC_malloc( st.st_size))){
+ close( fd);
+ return NULL;
+ }
+
+ len = read(fd, header, st.st_size);
+ close(fd);
+
+ /* Header */
+
+ if (len != st.st_size || strncmp(header, "GIF89a", 6) != 0) {
+ return NULL;
+ }
+
+ p = skip_gif_header(header);
+ header_size = p - header;
+
+ /* Application Extension */
+ if (p[0] == 0x21 && p[1] == 0xff) {
+ p += 19;
+ }
+
+ /* Other blocks */
+ body = NULL;
+ while (p + 2 < header + st.st_size) {
+ if (*(p++) == 0x21 && *(p++) == 0xf9 && *(p++) == 0x04) {
+ if( body) {
+ /* Graphic Control Extension */
+ save_gif(new_path->ptr, header, header_size, body, p - 3 - body);
+ return new_path;
+ }
+ else {
+ /* skip the first frame. */
+ }
+ body = p - 3;
+ }
+ }
+
+ return NULL;
+}
+
+void ttymode_set(int mode, int imode);
+void ttymode_reset(int mode, int imode);
+
+void
+put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh, int n_terminal_image)
+{
+ pid_t pid;
+ int do_anim;
+ MySignalHandler(*volatile previntr) (SIGNAL_ARG);
+ MySignalHandler(*volatile prevquit) (SIGNAL_ARG);
+ MySignalHandler(*volatile prevstop) (SIGNAL_ARG);
+
+ MOVE(y,x);
+ flush_tty();
+
+ do_anim = (n_terminal_image == 1 && x == 0 && y == 0 && sx == 0 && sy == 0);
+
+ previntr = mySignal(SIGINT, SIG_IGN);
+ prevquit = mySignal(SIGQUIT, SIG_IGN);
+ prevstop = mySignal(SIGTSTP, SIG_IGN);
+
+ if ((pid = fork()) == 0) {
+ char *env;
+ int n = 0;
+ char *argv[20];
+ char digit[2][11+1];
+ char clip[44+3+1];
+ Str str_url;
+
+ close(STDERR_FILENO); /* Don't output error message. */
+ if (do_anim) {
+ writestr("\x1b[?80h");
+ }
+ else if (!strstr(url, "://") && strcmp(url+strlen(url)-4, ".gif") == 0 &&
+ (str_url = save_first_animation_frame(url))) {
+ url = str_url->ptr;
+ }
+ ttymode_set(ISIG, 0);
+
+ if ((env = getenv("W3M_IMG2SIXEL"))) {
+ char *p;
+ env = Strnew_charp(env)->ptr;
+ while (n < 8 && (p = strchr(env, ' '))) {
+ *p = '\0';
+ if (*env != '\0') {
+ argv[n++] = env;
+ }
+ env = p+1;
+ }
+ if (*env != '\0') {
+ argv[n++] = env;
+ }
+ }
+ else {
+ argv[n++] = "img2sixel";
+ }
+ argv[n++] = "-l";
+ argv[n++] = do_anim ? "auto" : "disable";
+ argv[n++] = "-w";
+ sprintf(digit[0], "%d", w*pixel_per_char_i);
+ argv[n++] = digit[0];
+ argv[n++] = "-h";
+ sprintf(digit[1], "%d", h*pixel_per_line_i);
+ argv[n++] = digit[1];
+ argv[n++] = "-c";
+ sprintf(clip, "%dx%d+%d+%d", sw*pixel_per_char_i, sh*pixel_per_line_i,
+ sx*pixel_per_char_i, sy*pixel_per_line_i);
+ argv[n++] = clip;
+ argv[n++] = url;
+ if (getenv("TERM") && strcmp(getenv("TERM"), "screen") == 0 &&
+ (!getenv("SCREEN_VARIANT") || strcmp(getenv("SCREEN_VARIANT"), "sixel") != 0)) {
+ argv[n++] = "-P";
+ }
+ argv[n++] = NULL;
+ execvp(argv[0],argv);
+ exit(0);
+ }
+ else if (pid > 0) {
+ int status;
+ waitpid(pid, &status, 0);
+ ttymode_reset(ISIG, 0);
+ mySignal(SIGINT, previntr);
+ mySignal(SIGQUIT, prevquit);
+ mySignal(SIGTSTP, prevstop);
+ if (do_anim) {
+ writestr("\x1b[?80l");
+ }
+ }
+
+ MOVE(Currentbuf->cursorY,Currentbuf->cursorX);
+}
+
+int
+get_pixel_per_cell(int *ppc, int *ppl)
+{
+ fd_set rfd;
+ struct timeval tval;
+ char buf[100];
+ char *p;
+ ssize_t len;
+ ssize_t left;
+ int wp,hp,wc,hc;
+ int i;
+
+#ifdef TIOCGWINSZ
+ struct winsize ws;
+ if (ioctl(tty, TIOCGWINSZ, &ws) == 0 && ws.ws_ypixel > 0 && ws.ws_row > 0 &&
+ ws.ws_xpixel > 0 && ws.ws_col > 0) {
+ *ppc = ws.ws_xpixel / ws.ws_col;
+ *ppl = ws.ws_ypixel / ws.ws_row;
+ return 1;
+ }
+#endif
+
+ fputs("\x1b[14t\x1b[18t",ttyf); flush_tty();
+
+ p = buf;
+ left = sizeof(buf) - 1;
+ for (i = 0; i < 10; i++) {
+ tval.tv_usec = 200000; /* 0.2 sec * 10 */
+ tval.tv_sec = 0;
+ FD_ZERO(&rfd);
+ FD_SET(tty,&rfd);
+ if (select(tty+1,&rfd,NULL,NULL,&tval) <= 0 || ! FD_ISSET(tty,&rfd))
+ continue;
+
+ if ((len = read(tty,p,left)) <= 0)
+ continue;
+ p[len] = '\0';
+
+ if (sscanf(buf,"\x1b[4;%d;%dt\x1b[8;%d;%dt",&hp,&wp,&hc,&wc) == 4) {
+ if (wp > 0 && wc > 0 && hp > 0 && hc > 0) {
+ *ppc = wp / wc;
+ *ppl = hp / hc;
+ return 1;
+ }
+ else {
+ return 0;
+ }
+ }
+ p += len;
+ left -= len;
+ }
+
+ return 0;
+}
+#endif /* USE_IMAGE */
+
#ifdef USE_MOUSE
#define W3M_TERM_INFO(name, title, mouse) name, title, mouse
#define NEED_XTERM_ON (1)
@@ -563,7 +823,7 @@ ttymode_set(int mode, int imode)
while (TerminalSet(tty, &ioval) == -1) {
if (errno == EINTR || errno == EAGAIN)
continue;
- printf("Error occured while set %x: errno=%d\n", mode, errno);
+ printf("Error occurred while set %x: errno=%d\n", mode, errno);
reset_error_exit(SIGNAL_ARGLIST);
}
#endif
@@ -584,7 +844,7 @@ ttymode_reset(int mode, int imode)
while (TerminalSet(tty, &ioval) == -1) {
if (errno == EINTR || errno == EAGAIN)
continue;
- printf("Error occured while reset %x: errno=%d\n", mode, errno);
+ printf("Error occurred while reset %x: errno=%d\n", mode, errno);
reset_error_exit(SIGNAL_ARGLIST);
}
#endif /* __MINGW32_VERSION */
@@ -601,7 +861,7 @@ set_cc(int spec, int val)
while (TerminalSet(tty, &ioval) == -1) {
if (errno == EINTR || errno == EAGAIN)
continue;
- printf("Error occured: errno=%d\n", errno);
+ printf("Error occurred: errno=%d\n", errno);
reset_error_exit(SIGNAL_ARGLIST);
}
}
@@ -634,7 +894,8 @@ reset_tty(void)
writestr(T_se); /* reset terminal */
flush_tty();
TerminalSet(tty, &d_ioval);
- close_tty();
+ if (tty != 2)
+ close_tty();
}
static MySignalHandler
@@ -953,7 +1214,6 @@ addch(char pc)
{
l_prop *pr;
int dest, i;
- short *dirty;
#ifdef USE_M17N
static Str tmp = NULL;
char **p;
@@ -975,7 +1235,6 @@ addch(char pc)
return;
p = ScreenImage[CurLine]->lineimage;
pr = ScreenImage[CurLine]->lineprop;
- dirty = &ScreenImage[CurLine]->isdirty;
#ifndef USE_M17N
/* Eliminate unprintables according to * iso-8859-*.
@@ -1986,6 +2245,10 @@ skip_escseq(void)
getch();
getch();
getch();
+ } else if (is_xterm && c == '<') {
+ c = getch();
+ while (IS_DIGIT(c) || c == ';')
+ c = getch();
}
else
#endif
@@ -2019,7 +2282,7 @@ sleep_till_anykey(int sec, int purge)
}
er = TerminalSet(tty, &ioval);
if (er == -1) {
- printf("Error occured: errno=%d\n", errno);
+ printf("Error occurred: errno=%d\n", errno);
reset_error_exit(SIGNAL_ARGLIST);
}
return ret;
@@ -2027,8 +2290,8 @@ sleep_till_anykey(int sec, int purge)
#ifdef USE_MOUSE
-#define XTERM_ON {fputs("\033[?1001s\033[?1000h",ttyf); flush_tty();}
-#define XTERM_OFF {fputs("\033[?1000l\033[?1001r",ttyf); flush_tty();}
+#define XTERM_ON {fputs("\033[?1001s\033[?1000h\033[?1006h",ttyf); flush_tty();}
+#define XTERM_OFF {fputs("\033[?1006l\033[?1000l\033[?1001r",ttyf); flush_tty();}
#define CYGWIN_ON {fputs("\033[?1000h",ttyf); flush_tty();}
#define CYGWIN_OFF {fputs("\033[?1000l",ttyf); flush_tty();}
diff --git a/url.c b/url.c
index ed6062e..1c17e18 100644
--- a/url.c
+++ b/url.c
@@ -121,6 +121,7 @@ static struct table2 DefaultGuess[] = {
};
static void add_index_file(ParsedURL *pu, URLFile *uf);
+static char * schemeNumToName(int scheme);
/* #define HTTP_DEFAULT_FILE "/index.html" */
@@ -318,14 +319,19 @@ openSSLHandle(int sock, char *hostname, char **p_cert)
#endif /* defined(USE_SSL_VERIFY) */
if (ssl_ctx == NULL) {
int option;
-#if SSLEAY_VERSION_NUMBER < 0x0800
+#if OPENSSL_VERSION_NUMBER < 0x0800
ssl_ctx = SSL_CTX_new();
X509_set_default_verify_paths(ssl_ctx->cert);
#else /* SSLEAY_VERSION_NUMBER >= 0x0800 */
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
SSLeay_add_ssl_algorithms();
SSL_load_error_strings();
+#else
+ OPENSSL_init_ssl(0, NULL);
+#endif
if (!(ssl_ctx = SSL_CTX_new(SSLv23_client_method())))
goto eend;
+ SSL_CTX_set_cipher_list(ssl_ctx, "DEFAULT:!LOW:!RC4:!EXP");
option = SSL_OP_ALL;
if (ssl_forbid_method) {
if (strchr(ssl_forbid_method, '2'))
@@ -336,8 +342,20 @@ openSSLHandle(int sock, char *hostname, char **p_cert)
option |= SSL_OP_NO_TLSv1;
if (strchr(ssl_forbid_method, 'T'))
option |= SSL_OP_NO_TLSv1;
+ if (strchr(ssl_forbid_method, '4'))
+ option |= SSL_OP_NO_TLSv1;
+ if (strchr(ssl_forbid_method, '5'))
+ option |= SSL_OP_NO_TLSv1_1;
}
+#ifdef SSL_OP_NO_COMPRESSION
+ option |= SSL_OP_NO_COMPRESSION;
+#endif
SSL_CTX_set_options(ssl_ctx, option);
+
+#ifdef SSL_MODE_RELEASE_BUFFERS
+ SSL_CTX_set_mode (ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
+#endif
+
#ifdef USE_SSL_VERIFY
/* derived from openssl-0.9.5/apps/s_{client,cb}.c */
#if 1 /* use SSL_get_verify_result() to verify cert */
@@ -444,6 +462,8 @@ baseURL(Buffer *buf)
/* <BASE> tag is defined in the document */
return buf->baseURL;
}
+ else if (IS_EMPTY_PARSED_URL(&buf->currentURL))
+ return NULL;
else
return &buf->currentURL;
}
@@ -638,16 +658,21 @@ openSocket(char *const hostname,
#define COPYPATH_SPC_ALLOW 0
#define COPYPATH_SPC_IGNORE 1
#define COPYPATH_SPC_REPLACE 2
+#define COPYPATH_SPC_MASK 3
+#define COPYPATH_LOWERCASE 4
static char *
copyPath(char *orgpath, int length, int option)
{
Str tmp = Strnew();
- while (*orgpath && length != 0) {
- if (IS_SPACE(*orgpath)) {
- switch (option) {
+ char ch;
+ while ((ch = *orgpath) != 0 && length != 0) {
+ if (option & COPYPATH_LOWERCASE)
+ ch = TOLOWER(ch);
+ if (IS_SPACE(ch)) {
+ switch (option & COPYPATH_SPC_MASK) {
case COPYPATH_SPC_ALLOW:
- Strcat_char(tmp, *orgpath);
+ Strcat_char(tmp, ch);
break;
case COPYPATH_SPC_IGNORE:
/* do nothing */
@@ -658,7 +683,7 @@ copyPath(char *orgpath, int length, int option)
}
}
else
- Strcat_char(tmp, *orgpath);
+ Strcat_char(tmp, ch);
orgpath++;
length--;
}
@@ -668,22 +693,14 @@ copyPath(char *orgpath, int length, int option)
void
parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
{
- char *p, *q;
+ char *p, *q, *qq;
Str tmp;
url = url_quote(url); /* quote 0x01-0x20, 0x7F-0xFF */
p = url;
+ copyParsedURL(p_url, NULL);
p_url->scheme = SCM_MISSING;
- p_url->port = 0;
- p_url->user = NULL;
- p_url->pass = NULL;
- p_url->host = NULL;
- p_url->is_nocache = 0;
- p_url->file = NULL;
- p_url->real_file = NULL;
- p_url->query = NULL;
- p_url->label = NULL;
/* RFC1808: Relative Uniform Resource Locators
* 4. Resolving Relative URLs
@@ -694,7 +711,7 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
goto do_label;
}
#if defined( __EMX__ ) || defined( __CYGWIN__ )
- if (!strncmp(url, "file://localhost/", 17)) {
+ if (!strncasecmp(url, "file://localhost/", 17)) {
p_url->scheme = SCM_LOCAL;
p += 17 - 1;
url += 17 - 1;
@@ -802,19 +819,20 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
/* scheme://user:pass@host or
* scheme://host:port
*/
- p_url->host = copyPath(q, p - q, COPYPATH_SPC_IGNORE);
+ qq = q;
q = ++p;
while (*p && strchr("@/?#", *p) == NULL)
p++;
if (*p == '@') {
/* scheme://user:pass@... */
+ p_url->user = copyPath(qq, q - 1 - qq, COPYPATH_SPC_IGNORE);
p_url->pass = copyPath(q, p - q, COPYPATH_SPC_ALLOW);
- q = ++p;
- p_url->user = p_url->host;
- p_url->host = NULL;
+ p++;
goto analyze_url;
}
/* scheme://host:port/ */
+ p_url->host = copyPath(qq, q - 1 - qq,
+ COPYPATH_SPC_IGNORE | COPYPATH_LOWERCASE);
tmp = Strnew_charp_n(q, p - q);
p_url->port = atoi(tmp->ptr);
/* *p is one of ['\0', '/', '?', '#'] */
@@ -822,15 +840,19 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
case '@':
/* scheme://user@... */
p_url->user = copyPath(q, p - q, COPYPATH_SPC_IGNORE);
- q = ++p;
+ p++;
goto analyze_url;
case '\0':
/* scheme://host */
case '/':
case '?':
case '#':
- p_url->host = copyPath(q, p - q, COPYPATH_SPC_IGNORE);
- p_url->port = DefaultPort[p_url->scheme];
+ p_url->host = copyPath(q, p - q,
+ COPYPATH_SPC_IGNORE | COPYPATH_LOWERCASE);
+ if (p_url->scheme != SCM_UNKNOWN)
+ p_url->port = DefaultPort[p_url->scheme];
+ else
+ p_url->port = 0;
break;
}
analyze_file:
@@ -956,12 +978,16 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
p_url->label = NULL;
}
-#define initParsedURL(p) bzero(p,sizeof(ParsedURL))
#define ALLOC_STR(s) ((s)==NULL?NULL:allocStr(s,-1))
void
-copyParsedURL(ParsedURL *p, ParsedURL *q)
+copyParsedURL(ParsedURL *p, const ParsedURL *q)
{
+ if (q == NULL) {
+ memset(p, 0, sizeof(ParsedURL));
+ p->scheme = SCM_UNKNOWN;
+ return;
+ }
p->scheme = q->scheme;
p->port = q->port;
p->is_nocache = q->is_nocache;
@@ -1279,10 +1305,24 @@ getURLScheme(char **url)
return scheme;
}
+static char *
+schemeNumToName(int scheme)
+{
+ int i;
+
+ for (i = 0; schemetable[i].cmdname != NULL; i++) {
+ if (schemetable[i].cmd == scheme)
+ return schemetable[i].cmdname;
+ }
+ return NULL;
+}
+
static char *
otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
{
Str s = Strnew();
+ const int *no_referer_ptr;
+ int no_referer;
Strcat_charp(s, "User-Agent: ");
if (UserAgent == NULL || *UserAgent == '\0')
@@ -1306,7 +1346,12 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
Strcat_charp(s, "Pragma: no-cache\r\n");
Strcat_charp(s, "Cache-control: no-cache\r\n");
}
- if (!NoSendReferer) {
+ no_referer = NoSendReferer;
+ no_referer_ptr = query_SCONF_NO_REFERER_FROM(current);
+ no_referer = no_referer || (no_referer_ptr && *no_referer_ptr);
+ no_referer_ptr = query_SCONF_NO_REFERER_TO(target);
+ no_referer = no_referer || (no_referer_ptr && *no_referer_ptr);
+ if (!no_referer) {
#ifdef USE_SSL
if (current && current->scheme == SCM_HTTPS && target->scheme != SCM_HTTPS) {
/* Don't send Referer: if https:// -> http:// */
@@ -1314,6 +1359,7 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
else
#endif
if (referer == NULL && current && current->scheme != SCM_LOCAL &&
+ current->scheme != SCM_LOCAL_CGI &&
(current->scheme != SCM_FTP ||
(current->user == NULL && current->pass == NULL))) {
char *p = current->label;
@@ -1384,7 +1430,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
{
Str tmp;
TextListItem *i;
- int seen_www_auth = 0;
#ifdef USE_COOKIE
Str cookie;
#endif /* USE_COOKIE */
@@ -1400,7 +1445,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
for (i = extra->first; i != NULL; i = i->next) {
if (strncasecmp(i->ptr, "Authorization:",
sizeof("Authorization:") - 1) == 0) {
- seen_www_auth = 1;
#ifdef USE_SSL
if (hr->command == HR_COMMAND_CONNECT)
continue;
@@ -1430,20 +1474,20 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
#endif /* USE_COOKIE */
if (hr->command == HR_COMMAND_POST) {
if (hr->request->enctype == FORM_ENCTYPE_MULTIPART) {
- Strcat_charp(tmp, "Content-type: multipart/form-data; boundary=");
+ Strcat_charp(tmp, "Content-Type: multipart/form-data; boundary=");
Strcat_charp(tmp, hr->request->boundary);
Strcat_charp(tmp, "\r\n");
Strcat(tmp,
- Sprintf("Content-length: %ld\r\n", hr->request->length));
+ Sprintf("Content-Length: %ld\r\n", hr->request->length));
Strcat_charp(tmp, "\r\n");
}
else {
if (!override_content_type) {
Strcat_charp(tmp,
- "Content-type: application/x-www-form-urlencoded\r\n");
+ "Content-Type: application/x-www-form-urlencoded\r\n");
}
Strcat(tmp,
- Sprintf("Content-length: %ld\r\n", hr->request->length));
+ Sprintf("Content-Length: %ld\r\n", hr->request->length));
if (header_string)
Strcat(tmp, header_string);
Strcat_charp(tmp, "\r\n");
@@ -1603,7 +1647,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
pu->host != NULL && !check_no_proxy(pu->host)) {
hr->flag |= HR_FLAG_PROXY;
sock = openSocket(FTP_proxy_parsed.host,
- schemetable[FTP_proxy_parsed.scheme].cmdname,
+ schemeNumToName(FTP_proxy_parsed.scheme),
FTP_proxy_parsed.port);
if (sock < 0)
return uf;
@@ -1645,15 +1689,15 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
}
else if (pu->scheme == SCM_HTTPS) {
sock = openSocket(HTTPS_proxy_parsed.host,
- schemetable[HTTPS_proxy_parsed.scheme].
- cmdname, HTTPS_proxy_parsed.port);
+ schemeNumToName(HTTPS_proxy_parsed.scheme),
+ HTTPS_proxy_parsed.port);
sslh = NULL;
}
else {
#endif /* USE_SSL */
sock = openSocket(HTTP_proxy_parsed.host,
- schemetable[HTTP_proxy_parsed.scheme].
- cmdname, HTTP_proxy_parsed.port);
+ schemeNumToName(HTTP_proxy_parsed.scheme),
+ HTTP_proxy_parsed.port);
#ifdef USE_SSL
sslh = NULL;
}
@@ -1685,8 +1729,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
}
}
else {
- sock = openSocket(pu->host,
- schemetable[pu->scheme].cmdname, pu->port);
+ sock = openSocket(pu->host, schemeNumToName(pu->scheme), pu->port);
if (sock < 0) {
*status = HTST_MISSING;
return uf;
@@ -1713,6 +1756,8 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
write(sock, tmp->ptr, tmp->length);
if(w3m_reqlog){
FILE *ff = fopen(w3m_reqlog, "a");
+ if (ff == NULL)
+ return uf;
if (sslh)
fputs("HTTPS: request via SSL\n", ff);
else
@@ -1735,6 +1780,8 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
write(sock, tmp->ptr, tmp->length);
if(w3m_reqlog){
FILE *ff = fopen(w3m_reqlog, "a");
+ if (ff == NULL)
+ return uf;
fwrite(tmp->ptr, sizeof(char), tmp->length, ff);
fclose(ff);
}
@@ -1750,7 +1797,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
pu->host != NULL && !check_no_proxy(pu->host)) {
hr->flag |= HR_FLAG_PROXY;
sock = openSocket(GOPHER_proxy_parsed.host,
- schemetable[GOPHER_proxy_parsed.scheme].cmdname,
+ schemeNumToName(GOPHER_proxy_parsed.scheme),
GOPHER_proxy_parsed.port);
if (sock < 0)
return uf;
@@ -1758,8 +1805,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
tmp = HTTPrequest(pu, current, hr, extra_header);
}
else {
- sock = openSocket(pu->host,
- schemetable[pu->scheme].cmdname, pu->port);
+ sock = openSocket(pu->host, schemeNumToName(pu->scheme), pu->port);
if (sock < 0)
return uf;
if (pu->file == NULL)
@@ -2049,7 +2095,7 @@ filename_extension(char *path, int is_url)
break;
}
if (*last_dot == '.') {
- for (i = 1; last_dot[i] && i < 8; i++) {
+ for (i = 1; i < 8 && last_dot[i]; i++) {
if (is_url && !IS_ALNUM(last_dot[i]))
break;
}
@@ -2234,3 +2280,66 @@ schemeToProxy(int scheme)
}
return pu;
}
+
+#ifdef USE_M17N
+wc_ces
+url_to_charset(const char *url, const ParsedURL *base, wc_ces doc_charset)
+{
+ const ParsedURL *pu;
+ ParsedURL pu_buf;
+ const wc_ces *csptr;
+
+ if (url && *url && *url != '#') {
+ parseURL2((char *)url, &pu_buf, (ParsedURL *)base);
+ pu = &pu_buf;
+ } else {
+ pu = base;
+ }
+ if (pu && (pu->scheme == SCM_LOCAL || pu->scheme == SCM_LOCAL_CGI))
+ return SystemCharset;
+ csptr = query_SCONF_URL_CHARSET(pu);
+ return (csptr && *csptr) ? *csptr :
+ doc_charset ? doc_charset : DocumentCharset;
+}
+
+char *
+url_encode(const char *url, const ParsedURL *base, wc_ces doc_charset)
+{
+ return url_quote_conv((char *)url,
+ url_to_charset(url, base, doc_charset));
+}
+
+#if 0 /* unused */
+char *
+url_decode(const char *url, const ParsedURL *base, wc_ces doc_charset)
+{
+ if (!DecodeURL)
+ return (char *)url;
+ return url_unquote_conv((char *)url,
+ url_to_charset(url, base, doc_charset));
+}
+#endif
+
+char *
+url_decode2(const char *url, const Buffer *buf)
+{
+ wc_ces url_charset;
+
+ if (!DecodeURL)
+ return (char *)url;
+ url_charset = buf ?
+ url_to_charset(url, baseURL((Buffer *)buf), buf->document_charset) :
+ url_to_charset(url, NULL, 0);
+ return url_unquote_conv((char *)url, url_charset);
+}
+
+#else /* !defined(USE_M17N) */
+
+char *
+url_decode0(const char *url)
+{
+ if (!DecodeURL)
+ return (char *)url;
+ return url_unquote_conv((char *)url, 0);
+}
+#endif /* !defined(USE_M17N) */
diff --git a/version.c.in b/version.c.in
index 31d30e4..ab25163 100644
--- a/version.c.in
+++ b/version.c.in
@@ -1,5 +1,5 @@
/* $Id: version.c.in,v 1.49 2012/05/22 09:45:56 inu Exp $ */
-#define CURRENT_VERSION "w3m/0.5.3+cvs"
+#define CURRENT_VERSION "w3m/0.5.3+gitYYYYMMDD"
#ifndef FM_H
char *w3m_version = CURRENT_VERSION;
diff --git a/w3m-doc/install.html.in b/w3m-doc/install.html.in
index 8e27f03..610e4be 100644
--- a/w3m-doc/install.html.in
+++ b/w3m-doc/install.html.in
@@ -232,7 +232,7 @@
<DT>DICT
<DD><B>$B<-=q0z$-5!G=(B</B>$B$rM-8z$K$7$^$9!#(B<BR>
$BD4$Y$?$$C18l$K%+!<%=%k$r9g$o$;!"!H(B<B>ESC W</B>$B!I$G(B <B>w3mdict</B> $B%3%^%s%I$r8F$S=P$7$^$9!#(B<BR>
- <B>w3mdict</B> $B%3%^%s%I$O(B w3m $B$N%"!<%+%$%V$K$OF1:-$5$l$F$$$J$$$N$G!"<+?H$N4D6-$K9g$o$;$F:n@.$7$F$/$@$5$$!#(B<BR>
+ <B>w3mdict</B> $B%3%^%s%I$O<+?H$N4D6-$K9g$o$;$F:n@.$G$-$^$9!#(B<BR>
$B$?$H$($P!"$b$C$H$b4JC1$JNc$H$7$F!"(B<B>man</B> $B%3%^%s%I$K(B wrap $B$9$k>l9g!"0J2<$N$h$&$K$7$^$9!#(B<BR>
<BLOCKQUOTE>
% cat w3mdict<BR>
diff --git a/w3m-doc/outline.html.in b/w3m-doc/outline.html.in
index 60bda47..4ed2a59 100644
--- a/w3m-doc/outline.html.in
+++ b/w3m-doc/outline.html.in
@@ -146,8 +146,8 @@ w3m $B$N(Bmake$B;~$K;XDj$7$?%-!<A`:n$K$h$C$F!"%X%k%W%U%!%$%k$,0[$J$j$^$9!#(B
<TR> <TD>c</TD> <TD>$B8=%Z!<%8$N(B URL $B$rI=<((B</TD></TR>
<TR> <TD>=</TD> <TD>$B8=%I%-%e%a%s%H$N>pJs$rI=<((B</TD></TR>
<TR> <TD>F</TD> <TD>$B%U%l!<%`$rI=<($9$k(B</TD></TR>
- <TR> <TD>M</TD> <TD>$B8=%Z!<%8$r30It%V%i%&%6$GI=<($9$k(B(2M,3M $B$G(B2$BHVL\$H(B3$BHVL\$N%V%i%&%6$r8F$S$@$9(B)</TD></TR>
- <TR> <TD>ESC M</TD> <TD>$B%j%s%/@h$r30It%V%i%&%6$GI=<($9$k(B(2ESC M,3ESC M $B$G(B2$BHVL\$H(B3$BHVL\$N%V%i%&%6$r8F$S$@$9(B)</TD></TR>
+ <TR> <TD>M</TD> <TD>$B8=%Z!<%8$r30It%V%i%&%6$GI=<($9$k(B(2M, 3M, ..., 9M $B$G(B2$BHVL\!$(B3$BHVL\!$(B9$BHVL\$N%V%i%&%6$r8F$S$@$9(B)</TD></TR>
+ <TR> <TD>ESC M</TD> <TD>$B%j%s%/@h$r30It%V%i%&%6$GI=<($9$k(B(2ESC M, 3ESC M, ..., 9ESC M $B$G(B2$BHVL\!$(B3$BHVL\!$(B9$BHVL\$N%V%i%&%6$r8F$S$@$9(B)</TD></TR>
</TABLE>
<H5>$B%U%!%$%k(B/$B%9%H%j!<%`A`:n(B</H5>
@@ -257,8 +257,8 @@ w3m $B$N(Bmake$B;~$K;XDj$7$?%-!<A`:n$K$h$C$F!"%X%k%W%U%!%$%k$,0[$J$j$^$9!#(B
<TR><TD>c<TD>$B8=:_$NJ8=q$N(B URL $B$rI=<($7$^$9!%(B
<TR><TD>=<TD>$B8=:_$NJ8=q$K4X$9$k>pJs$rI=<($7$^$9!%(B
<TR><TD>F<TD><FRAMESET> $B$r4^$`J8=q$rI=<($7$F$$$k$H$-$K!$(B<FRAME> $B%?%0$N;X$9J#?t$NJ8=q$r(B1$B$D$NJ8=q$KJQ49$7$FI=<($7$^$9!%(B
-<TR><TD>M<TD>$B8=:_8+$F$$$k%Z!<%8$r!$30It%V%i%&%6$r;H$C$FI=<($7$^$9!%(B 2M, 3M $B$G(B2$BHVL\$H(B3$BHVL\$N%V%i%&%6$r;H$$$^$9!%(B
-<TR><TD>ESC M<TD>$B8=:_$N%j%s%/@h$r!$30It%V%i%&%6$r;H$C$FI=<($7$^$9!%(B 2ESC M, 3ESC M $B$G(B2$BHVL\$H(B3$BHVL\$N%V%i%&%6$r;H$$$^$9!%(B
+<TR><TD>M<TD>$B8=:_8+$F$$$k%Z!<%8$r!$30It%V%i%&%6$r;H$C$FI=<($7$^$9!%(B 2M, 3M, ..., 9M $B$G(B2$BHVL\!$(B3$BHVL\!$(B9$BHVL\$N%V%i%&%6$r;H$$$^$9!%(B
+<TR><TD>ESC M<TD>$B8=:_$N%j%s%/@h$r!$30It%V%i%&%6$r;H$C$FI=<($7$^$9!%(B 2ESC M, 3ESC M, ..., 9ESC M $B$G(B2$BHVL\!$(B3$BHVL\!$(B9$BHVL\$N%V%i%&%6$r;H$$$^$9!%(B
</table>
<H5>$B%U%!%$%k$H(B URL $B4X78$NA`:n(B</H5>
diff --git a/w3m-doc/sample/keymap.cgi b/w3m-doc/sample/keymap.cgi
index f68f5fb..d92c60f 100755
--- a/w3m-doc/sample/keymap.cgi
+++ b/w3m-doc/sample/keymap.cgi
@@ -203,7 +203,6 @@ GOTO_LINK
HELP
HISTORY
INFO
-INIT_MAILCAP
INTERRUPT
LEFT
LINE_BEGIN
diff --git a/w3mbookmark.c b/w3mbookmark.c
index 4355536..a306f26 100644
--- a/w3mbookmark.c
+++ b/w3mbookmark.c
@@ -79,6 +79,7 @@ print_bookmark_panel(char *bmark, char *url, char *title, char *charset)
}
}
printf("</select>\n");
+ fclose(f);
}
printf(bkmark_src2, html_quote(url), html_quote(title));
}
@@ -99,7 +100,7 @@ create_new_bookmark(char *bmark, char *section, char *title, char *url,
fprintf(f, "<body>\n<h1>Bookmarks</h1>\n");
fprintf(f, "<h2>%s</h2>\n<ul>\n", section);
fprintf(f, "<li><a href=\"%s\">%s</a>\n", url, title);
- fprintf(f, end_section);
+ fprintf(f, "%s", end_section);
fprintf(f, "</ul>\n</body>\n</html>\n");
fclose(f);
}
@@ -168,7 +169,10 @@ insert_bookmark(char *bmark, struct parsed_tagarg *data)
/* In this case, a new bookmark is appeneded after the bookmark file */
return create_new_bookmark(bmark, section, title, url, "a");
}
- f = fopen(bmark, "w");
+ if ((f = fopen(bmark, "w")) == NULL) {
+ printf("\nCannot open bookmark %s\n", bmark);
+ return FALSE;
+ }
while (tl->nitem) {
fputs(popText(tl), f);
}
diff --git a/w3mhelp-lynx_en.html.in b/w3mhelp-lynx_en.html.in
index 7448877..d073b0f 100644
--- a/w3mhelp-lynx_en.html.in
+++ b/w3mhelp-lynx_en.html.in
@@ -43,20 +43,20 @@ w3m</A>
<table cellpadding=0>
<TR><TD WIDTH=100>RET, C-f, Right arrow<TD>Follow hyperlink
<TR><TD>d, ESC RET<TD>Save link to file
-<TR><TD>u<TD>Peek link URL
-<TR><TD>i<TD>Peek image URL
+<TR><TD>u<TD>Peek at link URL
+<TR><TD>i<TD>Peek at image URL
<TR><TD>I<TD>View inline image
<TR><TD>ESC I<TD>Save inline image to file
-<TR><TD>:<TD>Mark URL-like strings as anchors
-<TR><TD>ESC :<TD>Mark Message-ID-like strings as news anchors
-<TR><TD>c<TD>Peek current URL
+<TR><TD>:<TD>Mark URL-like strings as links
+<TR><TD>ESC :<TD>Mark Message-ID-like strings as links
+<TR><TD>c<TD>Peek at current URL
<TR><TD>=<TD>Display information about current document
-<TR><TD>C-h<TD>View history of URL
-<TR><TD>F<TD>Render frame
+<TR><TD>C-h<TD>View browser history
+<TR><TD>F<TD>Render frames
<TR><TD>M<TD>Browse current document using external browser
-(use 2M and 3M to invoke second and third browser)
+(prefix 2, 3, ..., or 9 to invoke alternate configured browsers, e.g. 3 M)
<TR><TD>ESC M<TD>Browse link using external browser
-(use 2ESC M and 3ESC M to invoke second and third browser)
+(prefixed as above, e.g. 3ESC M)
</table>
<H2>File/Stream operation</H2>
@@ -98,7 +98,7 @@ w3m</A>
<table cellpadding=0>
<TR><TD WIDTH=100>/, C-s<TD>Search forward
<TR><TD>n<TD>Search next
-<TR><TD>w<TD>Toggle wrap search mode
+<TR><TD>w<TD>Toggle search wrap mode
</table>
<H2>Mark operation</H2>
@@ -121,7 +121,7 @@ w3m</A>
<TR><TD>Q<TD>Quit without confirmation
</table>
-<H2>Line-edit mode</H2>
+<H2>Line-editing mode</H2>
<table cellpadding=0>
<TR><TD WIDTH=100>C-f<TD>Move cursor forward
<TR><TD>C-b<TD>Move cursor backward
diff --git a/w3mhelp-lynx_ja.html.in b/w3mhelp-lynx_ja.html.in
index d160984..828b5a3 100644
--- a/w3mhelp-lynx_ja.html.in
+++ b/w3mhelp-lynx_ja.html.in
@@ -58,9 +58,9 @@
<TR><TD>F<TD><FRAMESET>��ޤ�ʸ���ɽ�����Ƥ���Ȥ��ˡ�<FRAME>
�����λؤ�ʣ����ʸ���1�Ĥ�ʸ����Ѵ�����ɽ�����ޤ���
<TR><TD>M<TD>���߸��Ƥ���ڡ��������֥饦����Ȥä�ɽ�����ޤ���
-2M, 3M ��2���ܤ�3���ܤΥ֥饦����Ȥ��ޤ���
+2M, 3M, ..., 9M ��2���ܡ�3���ܡ�9���ܤΥ֥饦����Ȥ��ޤ���
<TR><TD>ESC M<TD>���ߤΥ��������֥饦����Ȥä�ɽ�����ޤ���
-2ESC M, 3ESC M ��2���ܤ�3���ܤΥ֥饦����Ȥ��ޤ���
+2ESC M, 3ESC M, ..., 9ESC M ��2���ܡ�3���ܡ�9���ܤΥ֥饦����Ȥ��ޤ���
</table>
<H3>�ե������URL�ط������</H3>
diff --git a/w3mhelp-w3m_en.html.in b/w3mhelp-w3m_en.html.in
index eb46e8a..a692142 100644
--- a/w3mhelp-w3m_en.html.in
+++ b/w3mhelp-w3m_en.html.in
@@ -47,21 +47,21 @@ w3m</A>
<table cellpadding=0>
<TR><TD WIDTH=100>RET<TD>Follow hyperlink
<TR><TD>a, ESC RET<TD>Save link to file
-<TR><TD>u<TD>Peek link URL
-<TR><TD>i<TD>Peek image URL
+<TR><TD>u<TD>Peek at link URL
+<TR><TD>i<TD>Peek at image URL
<TR><TD>I<TD>View inline image
<TR><TD>ESC I<TD>Save inline image to file
-<TR><TD>:<TD>Mark URL-like strings as anchors
-<TR><TD>ESC :<TD>Mark Message-ID-like strings as news anchors
-<TR><TD>c<TD>Peek current URL
+<TR><TD>:<TD>Mark URL-like strings as links
+<TR><TD>ESC :<TD>Mark Message-ID-like strings as links
+<TR><TD>c<TD>Peek at current URL
<TR><TD>=<TD>Display information about current document
<TR><TD>C-g<TD>Show current line number
-<TR><TD>C-h<TD>View history of URL
-<TR><TD>F<TD>Render frame
+<TR><TD>C-h<TD>View browser history
+<TR><TD>F<TD>Render frames
<TR><TD>M<TD>Browse current document using external browser
-(use 2M and 3M to invoke second and third browser)
+(prefix 2, 3, ..., or 9 to invoke alternate configured browsers, e.g. 3 M)
<TR><TD>ESC M<TD>Browse link using external browser
-(use 2ESC M and 3ESC M to invoke second and third browser)
+(prefixed as above, e.g. 3ESC M)
</table>
<H2>File/Stream operation</H2>
@@ -105,7 +105,7 @@ w3m</A>
<TR><TD>?,C-r<TD>Search backward
<TR><TD>n<TD>Search next
<TR><TD>N<TD>Search previous
-<TR><TD>C-w<TD>Toggle wrap search mode
+<TR><TD>C-w<TD>Toggle search wrap mode
</table>
<H2>Dictionary look-up</H2>
@@ -134,7 +134,7 @@ w3m</A>
<TR><TD>Q<TD>Quit without confirmation
</table>
-<H2>Line-edit mode</H2>
+<H2>Line-editing mode</H2>
<table cellpadding=0>
<TR><TD WIDTH=100>C-f<TD>Move cursor forward
<TR><TD>C-b<TD>Move cursor backward
diff --git a/w3mhelp-w3m_ja.html.in b/w3mhelp-w3m_ja.html.in
index 95464ab..72cb849 100644
--- a/w3mhelp-w3m_ja.html.in
+++ b/w3mhelp-w3m_ja.html.in
@@ -61,8 +61,8 @@
<TR> <TD>C-g</TD> <TD>�ڡ�����Ǥθ��߰��֤�ɽ��</TD></TR>
<TR> <TD>C-h</TD> <TD>URL�����ɽ��</TD></TR>
<TR> <TD>F</TD> <TD>�ե졼���ɽ������</TD></TR>
- <TR> <TD>M</TD> <TD>���ڡ��������֥饦����ɽ������(2M,3M��2���ܤ�3���ܤΥ֥饦����ƤӤ���)</TD></TR>
- <TR> <TD>ESC M</TD> <TD>���������֥饦����ɽ������(2ESC M,3ESC M��2���ܤ�3���ܤΥ֥饦����ƤӤ���)</TD></TR>
+ <TR> <TD>M</TD> <TD>���ڡ��������֥饦����ɽ������(2M, 3M, ..., 9M ��2���ܡ�3���ܡ�9���ܤΥ֥饦����ƤӤ���)</TD></TR>
+ <TR> <TD>ESC M</TD> <TD>���������֥饦����ɽ������(2ESC M, 3ESC M, ..., 9ESC M ��2���ܡ�3���ܡ�9���ܤΥ֥饦����ƤӤ���)</TD></TR>
</TABLE>
<H2>�ե�����/���ȥ�����</H2>
diff --git a/w3mhelperpanel.c b/w3mhelperpanel.c
index 110794b..96b60a0 100644
--- a/w3mhelperpanel.c
+++ b/w3mhelperpanel.c
@@ -115,6 +115,7 @@ printMailcapPanel(char *mailcap)
printf("</table>\n<input type=submit name=submit value=\"%s\">\n</form>\n\
</body>\n</html>\n",
MSG_DOIT);
+ fclose(f);
}
void
diff --git a/w3mimg/Makefile.in b/w3mimg/Makefile.in
index dfc550c..8e2ad73 100644
--- a/w3mimg/Makefile.in
+++ b/w3mimg/Makefile.in
@@ -16,9 +16,9 @@ IMGCFLAGS=@IMGX11CFLAGS@ @IMGFBCFLAGS@ @IMGWINCFLAGS@
IMGOBJS=@IMGOBJS@
.PHONY: $(SUBDIRS)
-all: @IMGTARGETS@ w3mimg.a
+all: w3mimg.a
-w3mimg.a: $(IMGOBJS)
+w3mimg.a: w3mimg.o @IMGTARGETS@
$(AR) rv $@ $(IMGOBJS)
$(RANLIB) $@
diff --git a/w3mimg/fb/fb.c b/w3mimg/fb/fb.c
index cd11128..7960584 100644
--- a/w3mimg/fb/fb.c
+++ b/w3mimg/fb/fb.c
@@ -12,12 +12,24 @@
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
+#if defined(__linux__)
#include <linux/fb.h>
+#elif defined(__FreeBSD__)
+#include <sys/fbio.h>
+#endif
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+#include <machine/param.h>
+#endif
#include "fb.h"
#define FB_ENV "FRAMEBUFFER"
+#if defined(__linux__)
#define FB_DEFDEV "/dev/fb0"
+#elif defined(__FreeBSD__)
+#define FB_DEFDEV "/dev/ttyv0"
+#endif
#define MONO_OFFSET_8BIT 0x40
#define COLORS_MONO_8BIT 0x40
@@ -38,22 +50,65 @@
#define IMAGE_SIZE_MAX 10000
+#if defined(__linux__)
static struct fb_cmap *fb_cmap_create(struct fb_fix_screeninfo *,
struct fb_var_screeninfo *);
+#elif defined(__FreeBSD__)
+static video_color_palette_t *fb_cmap_create(video_info_t *video_info,
+ video_adapter_info_t *video_adapter_info);
+#endif
+#if defined(__linux__)
static void fb_cmap_destroy(struct fb_cmap *cmap);
+#elif defined(__FreeBSD__)
+static void fb_cmap_destroy(video_color_palette_t *cmap);
+#endif
+#if defined(__linux__)
static int fb_fscrn_get(int fbfp, struct fb_fix_screeninfo *scinfo);
+#endif
+#if defined(__linux__)
static void *fb_mmap(int fbfp, struct fb_fix_screeninfo *scinfo);
+#elif defined(__FreeBSD__)
+static void *fb_mmap(int fbfp, video_adapter_info_t *video_adapter_info);
+#endif
+#if defined(__linux__)
static int fb_munmap(void *buf, struct fb_fix_screeninfo *scinfo);
+#elif defined(__FreeBSD__)
+static int fb_munmap(void *buf, video_adapter_info_t *video_adapter_info);
+#endif
+#if defined(__linux__)
static int fb_vscrn_get(int fbfp, struct fb_var_screeninfo *scinfo);
+#endif
+#if defined(__linux__)
static int fb_cmap_set(int fbfp, struct fb_cmap *cmap);
+#elif defined(__FreeBSD__)
+static int fb_cmap_set(int fbfp, video_color_palette_t *cmap);
+#endif
+#if defined(__linux__)
static int fb_cmap_get(int fbfp, struct fb_cmap *cmap);
+#elif defined(__FreeBSD__)
+static int fb_cmap_get(int fbfp, video_color_palette_t *cmap);
+#endif
static int fb_cmap_init(void);
static int fb_get_cmap_index(int r, int g, int b);
static unsigned long fb_get_packed_color(int r, int g, int b);
+#if defined(__FreeBSD__)
+static int fb_video_mode_get(int fbfp, int *video_mode);
+static int fb_video_info_get(int fbfp, video_info_t *video_info);
+static int fb_video_adapter_info_get(int fbfp, video_adapter_info_t *video_adapter_info);
+#endif
+#if defined(__linux__)
static struct fb_fix_screeninfo fscinfo;
static struct fb_var_screeninfo vscinfo;
+#elif defined(__FreeBSD__)
+static video_info_t video_info;
+static video_adapter_info_t video_adapter_info;
+#endif
+#if defined(__linux__)
static struct fb_cmap *cmap = NULL, *cmap_org = NULL;
+#elif defined(__FreeBSD__)
+static video_color_palette_t *cmap = NULL, *cmap_org = NULL;
+#endif
static int is_open = FALSE;
static int fbfp = -1;
static size_t pixel_size = 0;
@@ -63,6 +118,9 @@ int
fb_open(void)
{
char *fbdev = { FB_DEFDEV };
+#if defined(__FreeBSD__)
+ int video_mode;
+#endif
if (is_open == TRUE)
return 1;
@@ -76,6 +134,7 @@ fb_open(void)
goto ERR_END;
}
+#if defined(__linux__)
if (fb_fscrn_get(fbfp, &fscinfo)) {
goto ERR_END;
}
@@ -83,22 +142,69 @@ fb_open(void)
if (fb_vscrn_get(fbfp, &vscinfo)) {
goto ERR_END;
}
+#elif defined(__FreeBSD__)
+ if (fb_video_mode_get(fbfp, &video_mode)) {
+ goto ERR_END;
+ }
+ video_info.vi_mode = video_mode;
+
+ if (fb_video_info_get(fbfp, &video_info)) {
+ goto ERR_END;
+ }
+ if (fb_video_adapter_info_get(fbfp, &video_adapter_info)) {
+ goto ERR_END;
+ }
+ if (!(video_info.vi_flags & V_INFO_GRAPHICS) ||
+ !(video_info.vi_flags & V_INFO_LINEAR)) {
+ goto ERR_END;
+ }
+#endif
+
+#if defined(__linux__)
if ((cmap = fb_cmap_create(&fscinfo, &vscinfo)) == (struct fb_cmap *)-1) {
goto ERR_END;
}
+#elif defined(__FreeBSD__)
+ if ((cmap = fb_cmap_create(&video_info, &video_adapter_info)) == (video_color_palette_t *)-1) {
+ goto ERR_END;
+ }
+#endif
+#if defined(__linux__)
if (!(buf = fb_mmap(fbfp, &fscinfo))) {
fprintf(stderr, "Can't allocate memory.\n");
goto ERR_END;
}
+#elif defined(__FreeBSD__)
+ if (!(buf = fb_mmap(fbfp, &video_adapter_info))) {
+ fprintf(stderr, "Can't allocate memory.\n");
+ goto ERR_END;
+ }
+#endif
+#if defined(__linux__)
if (fscinfo.type != FB_TYPE_PACKED_PIXELS) {
fprintf(stderr, "This type of framebuffer is not supported.\n");
goto ERR_END;
}
+#elif defined(__FreeBSD__)
+ if (!(video_info.vi_mem_model == V_INFO_MM_PACKED ||
+ video_info.vi_mem_model == V_INFO_MM_DIRECT)) {
+ fprintf(stderr, "This type of framebuffer is not supported.\n");
+ goto ERR_END;
+ }
+#endif
+#if defined(__linux__)
if (fscinfo.visual == FB_VISUAL_PSEUDOCOLOR && vscinfo.bits_per_pixel == 8) {
+#elif defined(__FreeBSD__)
+ if (video_adapter_info.va_flags & V_ADP_PALETTE &&
+ video_info.vi_mem_model == V_INFO_MM_PACKED &&
+ video_info.vi_depth == 8) {
+#else
+ if (0) {
+#endif
if (fb_cmap_get(fbfp, cmap)) {
fprintf(stderr, "Can't get color map.\n");
fb_cmap_destroy(cmap);
@@ -111,6 +217,7 @@ fb_open(void)
pixel_size = 1;
}
+#if defined(__linux__)
else if ((fscinfo.visual == FB_VISUAL_TRUECOLOR ||
fscinfo.visual == FB_VISUAL_DIRECTCOLOR) &&
(vscinfo.bits_per_pixel == 15 ||
@@ -118,6 +225,14 @@ fb_open(void)
vscinfo.bits_per_pixel == 24 || vscinfo.bits_per_pixel == 32)) {
pixel_size = (vscinfo.bits_per_pixel + 7) / CHAR_BIT;
}
+#elif defined(__FreeBSD__)
+ else if (video_info.vi_mem_model == V_INFO_MM_DIRECT &&
+ (video_info.vi_depth == 15 ||
+ video_info.vi_depth == 16 ||
+ video_info.vi_depth == 24 || video_info.vi_depth == 32)) {
+ pixel_size = (video_info.vi_depth + 7) / CHAR_BIT;
+ }
+#endif
else {
fprintf(stderr, "This type of framebuffer is not supported.\n");
goto ERR_END;
@@ -147,7 +262,11 @@ fb_close(void)
cmap = NULL;
}
if (buf != NULL) {
+#if defined(__linux__)
fb_munmap(buf, &fscinfo);
+#elif defined(__FreeBSD__)
+ fb_munmap(buf, &video_adapter_info);
+#endif
buf = NULL;
}
@@ -259,11 +378,19 @@ fb_image_draw(FB_IMAGE * image, int x, int y, int sx, int sy, int width,
if (y + height > fb_height())
height = fb_height() - y;
+#if defined(__linux__)
offset_fb = fscinfo.line_length * y + pixel_size * x;
+#elif defined(__FreeBSD__)
+ offset_fb = video_adapter_info.va_line_width * y + pixel_size * x;
+#endif
offset_img = image->rowstride * sy + pixel_size * sx;
for (i = 0; i < height; i++) {
memcpy(buf + offset_fb, image->data + offset_img, pixel_size * width);
+#if defined(__linux__)
offset_fb += fscinfo.line_length;
+#elif defined(__FreeBSD__)
+ offset_fb += video_adapter_info.va_line_width;
+#endif
offset_img += image->rowstride;
}
@@ -336,7 +463,11 @@ fb_width(void)
if (is_open != TRUE)
return 0;
+#if defined(__linux__)
return vscinfo.xres;
+#elif defined(__FreeBSD__)
+ return video_info.vi_width;
+#endif
}
int
@@ -345,7 +476,11 @@ fb_height(void)
if (is_open != TRUE)
return 0;
+#if defined(__linux__)
return vscinfo.yres;
+#elif defined(__FreeBSD__)
+ return video_info.vi_height;
+#endif
}
int
@@ -369,7 +504,11 @@ fb_clear(int x, int y, int w, int h, int r, int g, int b)
h = fb_height() - y;
if (tmp == NULL) {
+#if defined(__linux__)
tmp = malloc(fscinfo.line_length);
+#elif defined(__FreeBSD__)
+ tmp = malloc(video_adapter_info.va_line_width);
+#endif
if (tmp == NULL)
return 1;
}
@@ -384,10 +523,18 @@ fb_clear(int x, int y, int w, int h, int r, int g, int b)
gg = g;
bb = b;
}
+#if defined(__linux__)
offset_fb = fscinfo.line_length * y + pixel_size * x;
+#elif defined(__FreeBSD__)
+ offset_fb = video_adapter_info.va_line_width * y + pixel_size * x;
+#endif
for (i = 0; i < h; i++) {
memcpy(buf + offset_fb, tmp, pixel_size * w);
+#if defined(__linux__)
offset_fb += fscinfo.line_length;
+#elif defined(__FreeBSD__)
+ offset_fb += video_adapter_info.va_line_width;
+#endif
}
return 0;
}
@@ -400,11 +547,21 @@ fb_get_packed_color(int r, int g, int b)
return fb_get_cmap_index(r, g, b);
}
else {
+#if defined(__linux__)
return
((r >> (CHAR_BIT - vscinfo.red.length)) << vscinfo.red.offset) +
((g >> (CHAR_BIT - vscinfo.green.length)) << vscinfo.green.
offset) +
((b >> (CHAR_BIT - vscinfo.blue.length)) << vscinfo.blue.offset);
+#elif defined(__FreeBSD__)
+ return
+ ((r >> (CHAR_BIT - video_info.vi_pixel_fsizes[0])) <<
+ video_info.vi_pixel_fields[0]) +
+ ((g >> (CHAR_BIT - video_info.vi_pixel_fsizes[1])) <<
+ video_info.vi_pixel_fields[1]) +
+ ((b >> (CHAR_BIT - video_info.vi_pixel_fsizes[2])) <<
+ video_info.vi_pixel_fields[2]);
+#endif
}
}
@@ -433,16 +590,31 @@ fb_cmap_init(void)
if (cmap == NULL)
return 1;
+#if defined(__linux__)
if (cmap->len < COLOR_OFFSET_8BIT + COLORS_8BIT) {
fprintf(stderr, "Can't allocate enough color.\n");
return 1;
}
+#elif defined(__FreeBSD__)
+ if (cmap->count < COLOR_OFFSET_8BIT + COLORS_8BIT) {
+ fprintf(stderr, "Can't allocate enough color.\n");
+ return 1;
+ }
+#endif
if (cmap_org == NULL) {
+#if defined(__linux__)
if ((cmap_org =
fb_cmap_create(&fscinfo, &vscinfo)) == (struct fb_cmap *)-1) {
return 1;
}
+#elif defined(__FreeBSD__)
+ if ((cmap_org =
+ fb_cmap_create(&video_info, &video_adapter_info)) ==
+ (video_color_palette_t *)-1) {
+ return 1;
+ }
+#endif
if (fb_cmap_get(fbfp, cmap_org)) {
fprintf(stderr, "Can't get color map.\n");
@@ -452,8 +624,13 @@ fb_cmap_init(void)
}
}
+#if defined(__linux__)
cmap->start = MONO_OFFSET_8BIT;
cmap->len = COLORS_8BIT + COLORS_MONO_8BIT;
+#elif defined(__FreeBSD__)
+ cmap->index = MONO_OFFSET_8BIT;
+ cmap->count = COLORS_8BIT + COLORS_MONO_8BIT;
+#endif
for (lp = 0; lp < COLORS_MONO_8BIT; lp++) {
int c;
@@ -506,73 +683,223 @@ fb_cmap_init(void)
#define LUT_MAX (256)
+#if defined(__linux__)
static struct fb_cmap *
fb_cmap_create(struct fb_fix_screeninfo *fscinfo,
struct fb_var_screeninfo *vscinfo)
+#elif defined(__FreeBSD__)
+static video_color_palette_t *
+fb_cmap_create(video_info_t *video_info,
+ video_adapter_info_t *video_adapter_info)
+#endif
{
+#if defined(__linux__)
struct fb_cmap *cmap;
+#elif defined(__FreeBSD__)
+ video_color_palette_t *cmap;
+#endif
int cmaplen = LUT_MAX;
/* check the existence of colormap */
+#if defined(__linux__)
if (fscinfo->visual == FB_VISUAL_MONO01 ||
fscinfo->visual == FB_VISUAL_MONO10 ||
fscinfo->visual == FB_VISUAL_TRUECOLOR)
return NULL;
+#elif defined(__FreeBSD__)
+ if (!(video_adapter_info->va_flags & V_ADP_PALETTE))
+ return NULL;
+#endif
+#if defined(__linux__)
cmap = (struct fb_cmap *)malloc(sizeof(struct fb_cmap));
+#elif defined(__FreeBSD__)
+ cmap = (video_color_palette_t *)malloc(sizeof(video_color_palette_t));
+#endif
if (!cmap) {
perror("cmap malloc error\n");
+#if defined(__linux__)
return (struct fb_cmap *)-1;
+#elif defined(__FreeBSD__)
+ return (video_color_palette_t *)-1;
+#endif
}
+#if defined(__linux__)
memset(cmap, 0, sizeof(struct fb_cmap));
+#elif defined(__FreeBSD__)
+ memset(cmap, 0, sizeof(video_color_palette_t));
+#endif
+
+#if defined(__FreeBSD__)
+ if (video_info->vi_mem_model == V_INFO_MM_PACKED) {
+ cmap->red = (u_char *) malloc(sizeof(u_char) * cmaplen);
+ if (!cmap->red) {
+ perror("red lut malloc error\n");
+ return (video_color_palette_t *)-1;
+ }
+ cmap->green = (u_char *) malloc(sizeof(u_char) * cmaplen);
+ if (!cmap->green) {
+ perror("green lut malloc error\n");
+ free(cmap->red);
+ return (video_color_palette_t *)-1;
+ }
+ cmap->blue = (u_char *) malloc(sizeof(u_char) * cmaplen);
+ if (!cmap->blue) {
+ perror("blue lut malloc error\n");
+ free(cmap->red);
+ free(cmap->green);
+ return (video_color_palette_t *)-1;
+ }
+ cmap->transparent = (u_char *) malloc(sizeof(u_char) * cmaplen);
+ if (!cmap->transparent) {
+ perror("transparent lut malloc error\n");
+ free(cmap->red);
+ free(cmap->green);
+ free(cmap->blue);
+ return (video_color_palette_t *)-1;
+ }
+ cmap->count = cmaplen;
+ return cmap;
+ }
+#endif
/* Allocates memory for a colormap */
+#if defined(__linux__)
if (vscinfo->red.length) {
cmap->red = (__u16 *) malloc(sizeof(__u16) * cmaplen);
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[0]) {
+ cmap->red = (u_char *) malloc(sizeof(u_char) * cmaplen);
+#else
+ if (0) {
+#endif
if (!cmap->red) {
perror("red lut malloc error\n");
+#if defined(__linux__)
return (struct fb_cmap *)-1;
+#elif defined(__FreeBSD__)
+ return (video_color_palette_t *)-1;
+#endif
}
}
+#if defined(__linux__)
if (vscinfo->green.length) {
cmap->green = (__u16 *) malloc(sizeof(__u16) * cmaplen);
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[1]) {
+ cmap->green = (u_char *) malloc(sizeof(u_char) * cmaplen);
+#else
+ if (0) {
+#endif
if (!cmap->green) {
+#if defined(__linux__)
if (vscinfo->red.length)
free(cmap->red);
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[0])
+ free(cmap->red);
+#endif
perror("green lut malloc error\n");
+#if defined(__linux__)
return (struct fb_cmap *)-1;
+#elif defined(__FreeBSD__)
+ return (video_color_palette_t *)-1;
+#endif
}
}
+#if defined(__linux__)
if (vscinfo->blue.length) {
cmap->blue = (__u16 *) malloc(sizeof(__u16) * cmaplen);
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[2]) {
+ cmap->blue = (u_char *) malloc(sizeof(u_char) * cmaplen);
+#else
+ if (0) {
+#endif
if (!cmap->blue) {
+#if defined(__linux__)
if (vscinfo->red.length)
free(cmap->red);
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[0])
+ free(cmap->red);
+#endif
+#if defined(__linux__)
if (vscinfo->green.length)
free(cmap->green);
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[1])
+ free(cmap->green);
+#endif
perror("blue lut malloc error\n");
+#if defined(__linux__)
return (struct fb_cmap *)-1;
+#elif defined(__FreeBSD__)
+ return (video_color_palette_t *)-1;
+#endif
}
}
+#if defined(__linux__)
if (vscinfo->transp.length) {
cmap->transp = (__u16 *) malloc(sizeof(__u16) * cmaplen);
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[3]) {
+ cmap->transparent = (u_char *) malloc(sizeof(u_char) * cmaplen);
+#else
+ if (0) {
+#endif
+#if defined(__linux__)
if (!cmap->transp) {
+#elif defined(__FreeBSD__)
+ if (!cmap->transparent) {
+#else
+ if (0) {
+#endif
+#if defined(__linux__)
if (vscinfo->red.length)
free(cmap->red);
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[0])
+ free(cmap->red);
+#endif
+#if defined(__linux__)
if (vscinfo->green.length)
free(cmap->green);
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[1])
+ free(cmap->green);
+#endif
+#if defined(__linux__)
if (vscinfo->blue.length)
free(cmap->blue);
perror("transp lut malloc error\n");
+#elif defined(__FreeBSD__)
+ if (video_info->vi_pixel_fsizes[2])
+ free(cmap->blue);
+ perror("transparent lut malloc error\n");
+#endif
+#if defined(__linux__)
return (struct fb_cmap *)-1;
+#elif defined(__FreeBSD__)
+ return (video_color_palette_t *)-1;
+#endif
}
}
+#if defined(__linux__)
cmap->len = cmaplen;
+#elif defined(__FreeBSD__)
+ cmap->count = cmaplen;
+#endif
return cmap;
}
+#if defined(__linux__)
static void
fb_cmap_destroy(struct fb_cmap *cmap)
+#elif defined(__FreeBSD__)
+static void
+fb_cmap_destroy(video_color_palette_t *cmap)
+#endif
{
if (cmap->red)
free(cmap->red);
@@ -580,28 +907,57 @@ fb_cmap_destroy(struct fb_cmap *cmap)
free(cmap->green);
if (cmap->blue)
free(cmap->blue);
+#if defined(__linux__)
if (cmap->transp)
free(cmap->transp);
+#elif defined(__FreeBSD__)
+ if (cmap->transparent)
+ free(cmap->transparent);
+#endif
free(cmap);
}
+#if defined(__linux__)
static int
fb_cmap_get(int fbfp, struct fb_cmap *cmap)
+#elif defined(__FreeBSD__)
+static int
+fb_cmap_get(int fbfp, video_color_palette_t *cmap)
+#endif
{
+#if defined(__linux__)
if (ioctl(fbfp, FBIOGETCMAP, cmap)) {
perror("ioctl FBIOGETCMAP error\n");
return -1;
}
+#elif defined(__FreeBSD__)
+ if (ioctl(fbfp, FBIO_GETPALETTE, cmap) == -1) {
+ perror("ioctl FBIO_GETPALETTE error\n");
+ return -1;
+ }
+#endif
return 0;
}
+#if defined(__linux__)
static int
fb_cmap_set(int fbfp, struct fb_cmap *cmap)
+#elif defined(__FreeBSD__)
+static int
+fb_cmap_set(int fbfp, video_color_palette_t *cmap)
+#endif
{
+#if defined(__linux__)
if (ioctl(fbfp, FBIOPUTCMAP, cmap)) {
perror("ioctl FBIOPUTCMAP error\n");
return -1;
}
+#elif defined(__FreeBSD__)
+ if (ioctl(fbfp, FBIO_SETPALETTE, cmap) == -1) {
+ perror("ioctl FBIO_SETPALETTE error\n");
+ return -1;
+ }
+#endif
return 0;
}
@@ -612,10 +968,16 @@ fb_cmap_set(int fbfp, struct fb_cmap *cmap)
* fb_munmap() deletes the mappings
*/
+#if defined(__linux__)
static void *
fb_mmap(int fbfp, struct fb_fix_screeninfo *scinfo)
+#elif defined(__FreeBSD__)
+static void *
+fb_mmap(int fbfp, video_adapter_info_t *video_adapter_info)
+#endif
{
void *buf;
+#if defined(__linux__)
if ((buf = (unsigned char *)
mmap(NULL, scinfo->smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fbfp,
(off_t) 0))
@@ -623,13 +985,41 @@ fb_mmap(int fbfp, struct fb_fix_screeninfo *scinfo)
perror("mmap error");
return NULL;
}
+#elif defined(__FreeBSD__)
+ size_t mmap_offset;
+ size_t mmap_length;
+ mmap_offset = (size_t)(video_adapter_info->va_window) & (PAGE_MASK);
+ mmap_length = (size_t)(video_adapter_info->va_window_size +
+ mmap_offset + PAGE_MASK) & (~PAGE_MASK);
+ if ((buf = (unsigned char *)
+ mmap(NULL, mmap_length, PROT_READ | PROT_WRITE, MAP_SHARED, fbfp,
+ (off_t) 0))
+ == MAP_FAILED) {
+ perror("mmap error");
+ return NULL;
+ }
+#endif
return buf;
}
+#if defined(__linux__)
static int
fb_munmap(void *buf, struct fb_fix_screeninfo *scinfo)
+#elif defined(__FreeBSD__)
+static int
+fb_munmap(void *buf, video_adapter_info_t *video_adapter_info)
+#endif
{
+#if defined(__linux__)
return munmap(buf, scinfo->smem_len);
+#elif defined(__FreeBSD__)
+ size_t mmap_offset;
+ size_t mmap_length;
+ mmap_offset = (size_t)(video_adapter_info->va_window) & (PAGE_MASK);
+ mmap_length = (size_t)(video_adapter_info->va_window_size +
+ mmap_offset + PAGE_MASK) & (~PAGE_MASK);
+ return munmap((void *)((u_long)buf & (~PAGE_MASK)), mmap_length);
+#endif
}
/*
@@ -637,6 +1027,7 @@ fb_munmap(void *buf, struct fb_fix_screeninfo *scinfo)
*
* fb_fscrn_get() get information
*/
+#if defined(__linux__)
static int
fb_fscrn_get(int fbfp, struct fb_fix_screeninfo *scinfo)
{
@@ -646,12 +1037,14 @@ fb_fscrn_get(int fbfp, struct fb_fix_screeninfo *scinfo)
}
return 0;
}
+#endif
/*
* (struct fb_var_screeninfo) device independent variable information
*
* fb_vscrn_get() get information
*/
+#if defined(__linux__)
static int
fb_vscrn_get(int fbfp, struct fb_var_screeninfo *scinfo)
{
@@ -661,3 +1054,41 @@ fb_vscrn_get(int fbfp, struct fb_var_screeninfo *scinfo)
}
return 0;
}
+#endif
+
+#if defined(__FreeBSD__)
+static int
+fb_video_mode_get(int fbfp, int *video_mode)
+{
+ if (ioctl(fbfp, FBIO_GETMODE, video_mode) == -1) {
+ perror("ioctl FBIO_GETMODE error\n");
+ return -1;
+ }
+ return 0;
+}
+#endif
+
+#if defined(__FreeBSD__)
+static int
+fb_video_info_get(int fbfp, video_info_t *video_info)
+{
+ if (ioctl(fbfp, FBIO_MODEINFO, video_info) == -1) {
+ perror("ioctl FBIO_MODEINFO error\n");
+ return -1;
+ }
+ return 0;
+}
+#endif
+
+#if defined(__FreeBSD__)
+static int
+fb_video_adapter_info_get(int fbfp, video_adapter_info_t *video_adapter_info)
+{
+ if (ioctl(fbfp, FBIO_ADPINFO, video_adapter_info) == -1) {
+ perror("ioctl FBIO_ADPINFO error\n");
+ return -1;
+ }
+ return 0;
+}
+#endif
+
diff --git a/w3mimg/fb/fb.h b/w3mimg/fb/fb.h
index 1138bb0..5d86454 100644
--- a/w3mimg/fb/fb.h
+++ b/w3mimg/fb/fb.h
@@ -1,7 +1,11 @@
/* $Id: fb.h,v 1.7 2003/07/07 15:48:17 ukai Exp $ */
#ifndef fb_header
#define fb_header
+#if defined(__linux__)
#include <linux/fb.h>
+#elif defined(__FreeBSD__)
+#include <sys/fbio.h>
+#endif
typedef struct {
int num;
diff --git a/w3mimg/fb/fb_gdkpixbuf.c b/w3mimg/fb/fb_gdkpixbuf.c
index 36e3b62..f1e8d97 100644
--- a/w3mimg/fb/fb_gdkpixbuf.c
+++ b/w3mimg/fb/fb_gdkpixbuf.c
@@ -6,7 +6,7 @@
#include "config.h"
#if defined(USE_GTK2)
#include <glib-object.h>
-#include <gdk/gdk.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
#endif
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "fb.h"
diff --git a/w3mimg/fb/fb_imlib2.c b/w3mimg/fb/fb_imlib2.c
index ea36637..1a5151c 100644
--- a/w3mimg/fb/fb_imlib2.c
+++ b/w3mimg/fb/fb_imlib2.c
@@ -3,7 +3,6 @@
fb_imlib2.c 0.3 Copyright (C) 2002, hito
**************************************************************************/
-#include <X11/Xlib.h>
#include <Imlib2.h>
#include "fb.h"
#include "fb_img.h"
diff --git a/w3mimg/fb/fb_w3mimg.c b/w3mimg/fb/fb_w3mimg.c
index d3ae5a9..62511f0 100644
--- a/w3mimg/fb/fb_w3mimg.c
+++ b/w3mimg/fb/fb_w3mimg.c
@@ -153,10 +153,15 @@ check_tty_console(char *tty)
return 0;
if (strncmp(tty, "/dev/", 5) == 0)
tty += 5;
+#if defined(__linux__)
if (strncmp(tty, "tty", 3) == 0 && isdigit(*(tty + 3)))
return 1;
if (strncmp(tty, "vc/", 3) == 0 && isdigit(*(tty + 3)))
return 1;
+#elif defined(__FreeBSD__)
+ if (strncmp(tty, "ttyv", 4) == 0 && isxdigit(*(tty + 4)))
+ return 1;
+#endif
return 0;
}
#else
@@ -172,7 +177,9 @@ w3mimg_fbopen()
return NULL;
memset(wop, 0, sizeof(w3mimg_op));
- if (!check_tty_console(getenv("W3M_TTY")) && strcmp("jfbterm", getenv("TERM")) != 0) {
+ if (!check_tty_console(getenv("W3M_TTY")) &&
+ strncmp("fbterm", getenv("TERM"), 6) != 0 &&
+ strncmp("jfbterm", getenv("TERM"), 7) != 0) {
fprintf(stderr, "w3mimgdisplay/fb: tty is not console\n");
goto error;
}
diff --git a/w3mimg/x11/x11_w3mimg.c b/w3mimg/x11/x11_w3mimg.c
index f5be4a8..9a539de 100644
--- a/w3mimg/x11/x11_w3mimg.c
+++ b/w3mimg/x11/x11_w3mimg.c
@@ -14,7 +14,7 @@
#elif defined(USE_GDKPIXBUF)
#if defined(USE_GTK2)
#include <glib-object.h>
-#include <gdk/gdk.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
#else
#include <gdk-pixbuf/gdk-pixbuf-xlib.h>
@@ -121,24 +121,32 @@ x11_init(w3mimg_op * self)
if (self == NULL)
return 0;
xi = (struct x11_info *)self->priv;
+#if defined(USE_IMLIB)
if (xi == NULL)
return 0;
-#if defined(USE_IMLIB)
if (!xi->id) {
xi->id = Imlib_init(xi->display);
if (!xi->id)
return 0;
}
#elif defined(USE_GDKPIXBUF)
- if (!xi->init_flag) {
+ if (!xi) {
+#if defined(USE_GTK2)
+ g_type_init();
+#endif
+ }
+ else if (!xi->init_flag) {
+ XWindowAttributes attr;
#if defined(USE_GTK2)
g_type_init();
#endif
- gdk_pixbuf_xlib_init(xi->display, 0);
+ XGetWindowAttributes(xi->display, xi->parent, &attr);
+ /* gdk_pixbuf_xlib_init_with_depth() ignores depth, sigh... */
+ gdk_pixbuf_xlib_init_with_depth(xi->display, 0, attr.depth);
xi->init_flag = TRUE;
}
#endif
- if (!xi->imageGC) {
+ if (xi && !xi->imageGC) {
xi->imageGC = XCreateGC(xi->display, xi->parent, 0, NULL);
if (!xi->imageGC)
return 0;
@@ -200,14 +208,16 @@ x11_set_background(w3mimg_op * self, char *background)
{
XColor screen_def, exact_def;
struct x11_info *xi;
+ XWindowAttributes attr;
if (self == NULL)
return;
xi = (struct x11_info *)self->priv;
if (xi == NULL)
return;
+ XGetWindowAttributes(xi->display, xi->window, &attr);
if (background &&
- XAllocNamedColor(xi->display, DefaultColormap(xi->display, 0),
+ XAllocNamedColor(xi->display, attr.colormap,
background, &screen_def, &exact_def))
xi->background_pixel = screen_def.pixel;
else {
@@ -216,7 +226,7 @@ x11_set_background(w3mimg_op * self, char *background)
XImage *i;
p = XCreatePixmap(xi->display, xi->window, 1, 1,
- DefaultDepth(xi->display, 0));
+ attr.depth);
gc = XCreateGC(xi->display, xi->window, 0, NULL);
if (!p || !gc)
exit(1); /* XXX */
@@ -258,6 +268,7 @@ x11_img_new(struct x11_info *xi, int w, int h, int n)
{
struct x11_image *img = NULL;
int i;
+ XWindowAttributes attr;
img = malloc(sizeof(*img));
if (!img)
@@ -267,9 +278,10 @@ x11_img_new(struct x11_info *xi, int w, int h, int n)
if (!img->pixmap)
goto ERROR;
+ XGetWindowAttributes(xi->display, xi->window, &attr);
for (i = 0; i < n; i++) {
img->pixmap[i] = XCreatePixmap(xi->display, xi->parent, w, h,
- DefaultDepth(xi->display, 0));
+ attr.depth);
if (!img->pixmap[i])
goto ERROR;
@@ -318,6 +330,41 @@ resize_image(GdkPixbuf * pixbuf, int width, int height)
return NULL;
return resized_pixbuf;
}
+
+#if defined(USE_GTK2)
+static void
+render_pixbuf_to_pixmap_32(Display *display, GC gc, Pixmap pixmap, GdkPixbuf * pixbuf)
+{
+ unsigned int x, y, width, height, rowstride, bytes_per_pixel;
+ unsigned char *line;
+ XImage *image;
+
+ width = gdk_pixbuf_get_width(pixbuf) ;
+ height = gdk_pixbuf_get_height(pixbuf) ;
+
+ if (!(image = XGetImage(display, pixmap, 0, 0, width, height, AllPlanes, ZPixmap)))
+ return ;
+
+ bytes_per_pixel = (gdk_pixbuf_get_has_alpha(pixbuf)) ? 4 : 3;
+ rowstride = gdk_pixbuf_get_rowstride(pixbuf);
+ line = gdk_pixbuf_get_pixels(pixbuf);
+
+ for (y = 0; y < height; y++) {
+ u_char *pixel;
+
+ pixel = line;
+ for (x = 0; x < width; x++) {
+ XPutPixel(image, x, y,
+ (pixel[0] <<16) | (pixel[1] <<8) | pixel[2] | 0xff000000);
+ pixel += bytes_per_pixel;
+ }
+ line += rowstride;
+ }
+
+ XPutImage(display, pixmap, gc, image, 0, 0, 0, 0, width, height);
+ XDestroyImage(image);
+}
+#endif
#endif
static int
@@ -342,6 +389,7 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
GList *frames;
#endif
#endif
+ XWindowAttributes attr;
if (self == NULL)
return 0;
@@ -349,6 +397,7 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
if (xi == NULL)
return 0;
+ XGetWindowAttributes(xi->display, xi->window, &attr);
#if defined(USE_IMLIB)
im = Imlib_load_image(xi->id, fname);
if (!im)
@@ -358,7 +407,7 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
if (h <= 0)
h = im->rgb_height;
img->pixmap = (void *)XCreatePixmap(xi->display, xi->parent, w, h,
- DefaultDepth(xi->display, 0));
+ attr.depth);
if (!img->pixmap)
return 0;
XSetForeground(xi->display, xi->imageGC, xi->background_pixel);
@@ -374,17 +423,21 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
w = imlib_image_get_width();
if (h <= 0)
h = imlib_image_get_height();
+
+ im = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), w, h);
+ imlib_context_set_image(im);
+
img->pixmap = (void *)XCreatePixmap(xi->display, xi->parent, w, h,
- DefaultDepth(xi->display, 0));
+ attr.depth);
if (!img->pixmap)
return 0;
XSetForeground(xi->display, xi->imageGC, xi->background_pixel);
XFillRectangle(xi->display, (Pixmap) img->pixmap, xi->imageGC, 0, 0, w, h);
imlib_context_set_display(xi->display);
- imlib_context_set_visual(DefaultVisual(xi->display, 0));
- imlib_context_set_colormap(DefaultColormap(xi->display, 0));
+ imlib_context_set_visual(attr.visual);
+ imlib_context_set_colormap(attr.colormap);
imlib_context_set_drawable((Drawable) img->pixmap);
- imlib_render_image_on_drawable_at_size(0, 0, w, h);
+ imlib_render_image_on_drawable(0, 0);
imlib_free_image();
#elif defined(USE_GDKPIXBUF)
max_anim = self->max_anim;
@@ -416,7 +469,7 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
ratio_h = 1.0 * h / ih;
}
tmp_pixmap = XCreatePixmap(xi->display, xi->parent, w, h,
- DefaultDepth(xi->display, 0));
+ attr.depth);
XSetForeground(xi->display, xi->imageGC, xi->background_pixel);
XFillRectangle(xi->display, (Pixmap) tmp_pixmap, xi->imageGC, 0, 0, w, h);
if (!tmp_pixmap) {
@@ -459,7 +512,10 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
if (delay > ximg->delay)
ximg->delay = delay;
- gdk_pixbuf_xlib_render_to_drawable_alpha(pixbuf,
+ if (attr.depth == 32)
+ render_pixbuf_to_pixmap_32(xi->display, xi->imageGC, ximg->pixmap[j], pixbuf);
+ else
+ gdk_pixbuf_xlib_render_to_drawable_alpha(pixbuf,
(Drawable) ximg->pixmap[j], 0,
0, 0, 0, w, h,
GDK_PIXBUF_ALPHA_BILEVEL, 1,
@@ -653,9 +709,11 @@ x11_get_image_size(w3mimg_op * self, W3MImage * img, char *fname, int *w,
if (self == NULL)
return 0;
+#if defined(USE_IMLIB) && defined(USE_IMLIB2)
xi = (struct x11_info *)self->priv;
if (xi == NULL)
return 0;
+#endif
#if defined(USE_IMLIB)
im = Imlib_load_image(xi->id, fname);
@@ -755,6 +813,9 @@ w3mimg_x11open()
return NULL;
memset(wop, 0, sizeof(w3mimg_op));
+ if (getenv("W3M_USE_REMOTE_IMAGE"))
+ goto end;
+
xi = (struct x11_info *)malloc(sizeof(struct x11_info));
if (xi == NULL)
goto error;
@@ -807,6 +868,7 @@ w3mimg_x11open()
wop->priv = xi;
+ end:
wop->init = x11_init;
wop->finish = x11_finish;
wop->active = x11_active;
diff --git a/w3mimgdisplay.c b/w3mimgdisplay.c
index 5486a47..ccfa373 100644
--- a/w3mimgdisplay.c
+++ b/w3mimgdisplay.c
@@ -281,6 +281,10 @@ DrawImage(char *buf, int redraw)
maxImage = n + 1;
imageBuf = (W3MImage *) realloc((void *)imageBuf,
sizeof(W3MImage) * maxImage);
+ if (imageBuf == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ exit(1);
+ }
for (; i < maxImage; i++)
imageBuf[i].pixmap = NULL;
}
|