File: issue71.html

package info (click to toggle)
lg-issue71 1-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,104 kB
  • ctags: 218
  • sloc: perl: 89; makefile: 58; sh: 45; tcl: 14
file content (7534 lines) | stat: -rw-r--r-- 299,848 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> Linux Gazette Table of Contents LG #71</TITLE>
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000" >
<center>
<!-- A HREF="http://www.linuxgazette.com/">
<H1><IMG SRC="../gx/newlogo.jpg" ALT="LINUX GAZETTE" border="0"></H1></A> --> 
<A HREF="http://www.linuxgazette.com/">
<H1><IMG ALT="LINUX GAZETTE" SRC="../gx/lglogo.png" 
	WIDTH="600" HEIGHT="124" border="0"></H1></A> 
<H2>October 2001, Issue 71 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Published by <I>Linux Journal</I></H2> 

<A HREF=../lg_frontpage.html>Front Page</A> &nbsp;|&nbsp;
<A HREF=../lg_frontpage.html>Back Issues</A> &nbsp;|&nbsp;
<A HREF=../lg_faq.html>FAQ</A> &nbsp;|&nbsp;
<A HREF=../mirrors.html>Mirrors</A> &nbsp;|&nbsp;
<A HREF="http://www.linuxgazette.com/search.html">Search (www.linuxgazette.com)</A> 
<!-- *** BEGIN mirror site search link *** -->
<!-- &nbsp; <A HREF="http://www.linuxgazette.com/search.html">(SITE.COM
mirror)</A> -->
<!-- *** END mirror site search link *** -->

</CENTER>

<!--=================================================================-->

<table>
<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG
SRC="../gx/hammel/cleardot.gif" ALT="" HSPACE=30 VSPACE=2 HEIGHT=1
WIDTH=1 ALIGN=LEFT></TD>
<TD></TD>
</TR>
<tr><td>
<table>
<tr>
<td VALIGN="top"><H1><font color="#BB0000">Visit Our Sponsors:</font></H1></td></tr>



<!-- *** BEGIN sponsors *** -->
<TR><TD>
	<A HREF="http://www.penguincomputing.com"><IMG ALT="Penguin Computing" SRC="../gx/sponsors/penguincomputing.gif" BORDER="0" VSPACE="10"></A>
</TD></TR>

<TR><TD>
	<A HREF="http://www.linuxnetworx.com"><IMG ALT="Linux NetworX" SRC="../gx/sponsors/linuxnetworx.gif" BORDER="0" VSPACE="10"></A>
</TD></TR>


<!-- *** END sponsors *** -->




</table>
</td>
<!--==================================================================-->
<TD ROWSPAN="3" WIDTH="2" BGCOLOR="#000000" NOSAVE><IMG
SRC="../gx/hammel/cleardot.gif" ALT="" HSPACE=1 HEIGHT=1 WIDTH=1%></TD>
<td VALIGN=top>
<H1><font color="#BB0000">Table of Contents:</font></H1>




<!-- *** BEGIN toc *** -->
<UL>
	<LI>  <a HREF="lg_mail71.html">The MailBag</A> 
	<LI>  <a HREF="lg_bytes71.html">News Bytes</A> 
	<LI>  <a HREF="lg_answer71.html">The Answer Gang</A> 
	<LI>  <a HREF="lg_tips71.html">More 2-Cent Tips</A> 
	<LI>  <a HREF="arndt.html">A Need for Documentation</A> , <EM>by Matthias Arndt</EM>
	<LI>  <a HREF="joshi.html">Code Optimization Using the GNU C Compiler</A> , <EM>by Rahul U Joshi</EM>
	<LI>  <a HREF="orr.html">The Foolish Things We Do With Our Computers</A> , <EM>by Mike "Iron" Orr</EM>
	<LI>  <a HREF="qubism.html">Qubism</A> , <EM>by Jon "Sir Flakey" Harsem</EM>
	<LI>  <a HREF="spiel.html">Numerical Workbenches, part III</A> , <EM>by Christoph Spiel</EM>
	<LI>  <a HREF="lg_backpage71.html">The Back Page</A> 
</UL>

<!-- *** END toc *** -->




</td>
</tr>
<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG
	SRC="../gx/hammel/cleardot.gif" 
	ALT="-------------------------------------------------------------" 
	HSPACE=30 VSPACE=2 HEIGHT=1 WIDTH=1 ALIGN=LEFT></TD>
<TD></TD>
</TR>
</table> <!-- ******************************************* -->

<H3 ALIGN="center"><EM>Linux Gazette</EM> Staff and The Answer Gang</H3>
<BLOCKQUOTE>
<STRONG>Editor:</STRONG> Michael Orr<BR>
<STRONG>Technical Editor:</STRONG> Heather Stern<BR>
<STRONG>Senior Contributing Editor:</STRONG> Jim Dennis<BR>
<STRONG>Contributing Editors:</STRONG>
Ben Okopnik, Dan Wilder, Don Marti
</BLOCKQUOTE>

<TABLE WIDTH="100%"><TR>
<TD WIDTH="100%" BGCOLOR="#000000"><IMG
SRC="../gx/hammel/cleardot.gif" ALT="" HSPACE=30 VSPACE=2 HEIGHT=1
WIDTH=1 ALIGN=LEFT></TD>
</TR></TABLE>

<P> <!-- ************************************************** -->
<table>
<tr><td>
<A HREF="issue71.txt.gz">TWDT 1 (gzipped text file)</A><BR>
<A HREF="issue71.html">TWDT 2 (HTML file)</A><BR>
are files containing the entire issue: one in text format, one in HTML. 
They are provided 
strictly as a way to save the contents as one file for later printing in
the format of your choice; 
there is no guarantee of working links in the HTML version.
 </td></tr>
<!--==================================================================-->
<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG
SRC="../gx/hammel/cleardot.gif" ALT="" HSPACE=30 VSPACE=2 HEIGHT=1
WIDTH=1 ALIGN=LEFT></TD>
<TD></TD>
</TR>
<tr><td>
<center>
<I>Linux Gazette</I><img alt="[tm]" src="../gx/tm.gif">, 
<A HREF="http://www.linuxgazette.com/">http://www.linuxgazette.com/</A><BR> 
This page maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com"> gazette@ssc.com</A>
<P> 
<H5>Copyright &copy; 1996-2001 Specialized Systems Consultants, Inc.</H5>
</center>
</td></tr>
<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG
SRC="../gx/hammel/cleardot.gif" ALT="" HSPACE=30 VSPACE=2 HEIGHT=1
WIDTH=1 ALIGN=LEFT></TD>
<TD></TD>
</TR>
</table>
<center>
<H1><A NAME="wanted"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/mailbox.gif">
The Mailbag</A></H1> <BR>
<!-- BEGIN wanted -->

</center>
<P> <hr> <P>
<!-- =================================================================== -->
<center><H3><font color="maroon">HELP WANTED : Article Ideas</font></H3></center>
<P>
<P> Send tech-support questions, Tips, answers and article ideas to The Answer Gang
&lt;<A HREF="mailto:linux-questions-only@ssc.com"
	>linux-questions-only@ssc.com</A>&gt;.  Other mail (including
questions or comments about the <EM>Gazette</EM> itself) should go to
&lt;<A HREF="mailto:gazette@ssc.com">gazette@ssc.com</A>&gt;.  All material
sent to either of these addresses will be considered for publication in the
next issue.  <EM>Please send answers to the original querent too, so that s/he
can get the answer without waiting for the next issue.</EM>

<P> Unanswered questions might appear here.  Questions with
answers--or answers only--appear in The Answer Gang, 2-Cent Tips, or here,
depending on their content.  There is no guarantee that questions will
<em>ever</em> be answered, especially if not related to Linux.

<P> <STRONG>Before asking a question, please check the
<A HREF=../lg_faq.html><I>Linux Gazette</I> FAQ</A> to see if it has been
answered there.</STRONG>

<P> <HR> <P>
<!--====================================================================-->

<!-- BEGIN HELP WANTED : Article Ideas -->

<UL>
<!-- index_text begins -->
<li><A HREF="#wanted/1"
	><strong>Suggestion on Gazette contents.</strong></a>
<li><A HREF="#wanted/4"
	><strong>Asound Ethernet card</strong></a>
<li><A HREF="#wanted/5"
	><strong>Linux in other languages</strong></a>
<li><A HREF="#wanted/8"
	><strong>Content Suggestion</strong></a>
<!-- index_text ends -->
</UL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="wanted/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Suggestion on Gazette contents.</FONT></H3>
Thu, 6 Sep 2001 11:04:37 +0530 (IST)
<BR>Atul Sowani (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20help%20wanted%20%231">asowani from ptc.com</a>)


<P><STRONG>
I've been TLG reader since long time (almost from the first issue).
Some time back, there used to be a column "Graphics Musings" (I
hope I've got the name correctly), which used to have information
about various graphics packages and utilities. Could you revive
that column or a new one on similar lines? i.e., not essentially on
graphics utilities alone, but also including other noteworthy
utilities too?
</STRONG></P>

<P>
Atul, the column was The Graphics Muse by Michael Hammel
(<A HREF="mailto:mjhammel@graphics-muse.org"
	>mjhammel@graphics-muse.org</A>, whom I'm cc'ing).  His farewell article was
<A HREF="../issue46/gm.html"
	>http://www.linuxgazette.com/issue46/gm.html</A>
Michael stopped writing his Linux Gazette column because (1) he wanted
to consolidate his free graphics-related work on one web site
(<A HREF="http://www.graphics-muse.org"
	>http://www.graphics-muse.org</A>), and (2) he needed to spend more time on
paid employment.  Nevertheless, Michael remains a friend of Linux Gazette
(part of the Clueful Horde) and occasionally answers questions from the
Mailbag or helps the Gazette with graphics issues.  He is also active in
a Colorado Linux users group, if I remember correctly.
</P>
<P>
If somebody would like to start a new
graphics-related series for LG, we'd be glad to publish it.  But it can't
be called The Graphics Muse since Michael is still using that title.
</P>
<P>
Since Linux Gazette's articles come from our readers, "we" cannot revive
the column, but "you" as a reader can.  Even if you're not a graphics
expert, if you use Linux graphics programs regularly, you can write about
your experiences (and frustrations) with them.  It just has to be "new
information": stuff that hasn't been published in LG before (or is so old
it needs an update), and hasn't been overreported elsewhere.
</P>
<P>
As for other utilities, those are some of the things Thomas Adam writes
about in his series The Weekend Mechanic.
If you have any suggestions for topics you'd like to see him cover,
e-mail him at <A HREF="mailto:thomas_adam16@yahoo.com"
	>thomas_adam16@yahoo.com</A>.  Or send article requests to The
Answer Gang (<A HREF="mailto:linux-questions-only@ssc.com"
	>linux-questions-only@ssc.com</A>) and we'll put them in the
Mailbag.
</P>

<p><em>... and having been copied on this, Michael Hammel chimed in ...</em></p>

<P>
Someone actually remembers that column?  
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)" 
		height="24" width="20" align="middle">
</P>
<P>
Actually,  the ".org" address is for my personal stuff.  The ".com" address
holds the Graphics Muse content.  Of course, last year I started dating my
high school sweetheart, and now we're married.  So I haven't actually had
time to update that site in over a year.  I hope to get back to it
eventually, but its not on the near term schedule.
</P>
<P><STRONG>
paid employment.  Nevertheless, Michael remains a friend of Linux Gazette
</STRONG></P>
<P>
Paid employment is taking precedence these days.  Articles on graphics for
Linux Journal and Linux Magazine are usually as close as I come to doing 'Muse
style writings these days.
</P>
<P><STRONG>
(part of the Clueful Horde) and occasionally answers questions from the
Mailbag or helps the Gazette with graphics issues.  He is also active in
a Colorado Linux users group, if I remember correctly.
</STRONG></P>
<P>
Sort of.  I moved to Houston to be with my (now) wife and her daughter,
though I still participate on the Colorado LUGs mailing list (BLUG and
CLUE, specifically).  I also am Senior Editor for LWN.net and write the On
The Desktop page.
</P>
<P><STRONG>
If somebody would like to start a new
graphics-related series for LG, we'd be glad to publish it.  But it can't
be called The Graphics Muse since Michael is still using that title.
</STRONG></P>
<P>
That's correct.  It's still copyrighted by me.  I'd hoped to do a series of
books under the umbrella "Graphics Muse", but that hasn't happened.
</P>
<P>
Interesting that someone would remember that column from so long ago.
Especially now that graphics on Linux has become big business.
</P>
<P>
Later.
<br>--
<br>Michael J. Hammel
<br>The Graphics Muse
</P>

<!-- end 3 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="wanted/4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Asound Ethernet card</FONT></H3>
Thu, 20 Sep 2001 20:31:24 -0700
<BR>Mike Orr (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20help%20wanted%20%234"><em>LG</em> Editor</a>)

<P>
Has anybody had any luck with the Asound ALM2 Ethernet card?
I usually stick with 3com, epro or ne2000 cards to avoid driver
problems, but this one said Linux driver on the box and it was $10,
so I thought it was an ne2000 compatible.  Turns out it has a RealTek
8139 chip, which corresponds to the experimental 8139too module
(Linux 2.4.3).  But the driver doesn't recognize the card.
"init_module: no such device.  Hint: insmod errors can be caused by
incorrect module parameters, including invalid IO or IRQ parameters."
</P>
<P>
Thinking it was futile, I looked up the I/O address of the card in
<TT>/proc/pci</TT> and tried "modprobe 8139too io=0xa000".  This resulted in,
"invalid parameter parm_io".
</P>

<!-- end 4 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="wanted/5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Linux in other languages</FONT></H3>
Mon, 3 Sep 2001 15:34:19 +0100
<BR>Ravishankar Rajendran (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20help%20wanted%20%235">RRajendran from dljdirect.co.uk</a>)

<P><STRONG>
I am interested in developing a linux version in Tamil( an Indian
language).  It would be very helpful, if you can provide an article
providing an outline of the process of going about it.
</STRONG></P>

<p><em>... Mike likes the idea ...</em></p>

<P>
This would make an excellent
article, if there's anybody with experience to be able to write it.
Even an article on how the Spanish or Chinese versions of Linux were
built would be worthwhile.
</P>
<p><em>... Mike also encouraged him to contact those most likely to have
	experience with language ports ...</em></p>

<P>
Ravishanker, talk with the distributions that already offer multilingual
versions of Linux.  Linux--and the Unix programs and tools it is bundled
with--were originally written in English, but several distributions have
appeared in non-English-speaking countries with Linux speaking their
language.  <A HREF="http://www.turbolinux.com/">TurboLinux</A> 6.5 for the iSeries
(<A HREF="http://www.turbolinux.com/products/index.html"
	>http://www.turbolinux.com/products/index.html</A>) supports "English,
Japanese, Korean, and Simplified and Traditional Chinese with the
unified code base", and claims to have the leading support for wide
character sets.  Conectiva Linux (<A HREF="http://www.conectiva.com"
	>http://www.conectiva.com</A>) is based in
Brazil and offers Portuguese, Spanish and English versions.  <A HREF="http://www.suse.com/">SuSE</A>
(<A HREF="http://www.suse.de"
	>http://www.suse.de</A>) is based in Germany and offers versions in seven
Western European languages and Czech.  
<A HREF="http://www.linux-mandrake.com/">Mandrake</A>, 
<A HREF="http://www.redhat.com/">Red Hat</A> and others also
offer various levels of multilingual support.
</P>
<P>
Some of the issues you will face include:
</P>
<ul>
<li> Character set.  Does Tamil have an alphabetic or idiographic writing
system?  Is it supported in Unicode?  Is there an acceptable ASCII
version of the writing system, or do one of the established 8-bit
character sets support it?  Linux currently works best with the 8-bit
character sets, but parts of the system and some applications support
16-bit Unicode.  Support for Unicode characters above 16 bits is less.
<li> Time zone, keyboard, locale, etc.  This is the easy part; just use the
standard Linux utilities to configure these.  Is there a standard
locale name for Tamil?
<li> GNU gettext is a set of C functions to enable your program to speak
multiple languages.  For programs which use gettext, it's a "simple"
matter of having a translator prepare catalog files containing
translated versions of all the strings in the programs.  For programs
which don't use gettext, you'll either have to modify the program to
make it gettext-aware, or do something else.
<li> Certain points of grammar are hard to internationalize consistently.
This makes it a huge logical challenge to come up with catalog strings.
The problem is that the string must be a unique key to find the
other-language string, but oftentimes a single string in English maps to
multiple strings in other languages.  For instance, in
English we say, "0 dogs, 1 dog, 2+ dogs...".  In Russian they say, "1
sobaka, 2-4 sobaki, 5+ sobak" (dog), "1 huligan, 2-4 huligana, 5+
huliganov" (hooligan), "1+ pal'to" (overcoat).  Many programmers just
throw up their hands and write "1 file(s) copied" in the good ol' DOS
tradition.  Worse yet is when some languages put filler words in a
different order than the default language.  Or when a word has one form
in one language but multiple case-dependant forms in another.  One must
artificially create identical-but-unique strings in the default language
to match all the distinct combinations in all the languages supported.
Or restructure your sentances to avoid differing case forms.
<br>
OK, just when you got that down, Russian has a second word for dog:
"1 pyos, 2-4 p'sa, 5+ p'sov".  And two words for horse (loshad',
kon')....
<li> To localize X-windows, first determine whether there's an existing
8-bit or Unicode font that supports Tamil.  If so, all users will have
to have that font installed, and every application configured to use
that font.  If not, you'll have to create a font.
<li> If Tabil has other conventions (besides just the font) that differ
from Western languages, you may need to use or write a special version
of xterm to handle the characters.  For instance, jterm handles
Japanese.  Emacs has a bunch of optional features called MULE for
non-Western languages; you may have to install extra emacs packages to
use these.
<li> You'll need to find and install an X keymap for Tabil.
<li> To localize the console, you'll first have to determine whether
there's an existing font and keymap that can be used.  If so, just
configure them as the default.  If not, you'll have to write them.
Note that a console keymap can be used to generate an X keymap, so
you only have to maintain your keymap one place.  The Unix display
driver has a Unicode mode, but unfortunately the ancient hardware
generator on PC video cards can display only 256 unique characters
at a time.  You can configure a primary character set and an alternate
character set (2 x 256), but you have to switch between the two.
If you want to display a document that has both Russian and German
characters (to say nothing of Japanese), forget it.
<li> Being Unicode-compatible is a worthwhile goal, because that is the
direction other Linux systems are slowly going.
</ul>
<P>
Look through the HOWTOs at <A HREF="http://www.linuxdoc.org"
	>http://www.linuxdoc.org</A>.  Look at the
other-language HOWTOs like the Thai HOWTO, Chinese HOWTO, Danish HOWTO,
Esperanto HOWTO, etc.  The Font HOWTO may  help with font issues.  The
Keyboard-and-Console HOWTO explains how to set up the text console for
different languages.  The Unicode HOWTO explains some other aspects of
Unicode.
</P>
<P>
Contact Linux Focus (<A HREF="http://www.linuxfocus.com"
	>http://www.linuxfocus.com</A>) and see if they have
any advice.  Linux Focus is a zine with a lot more non-English-speaking
staff than LG.
</P>

<p><em>... and Ravishankar replies ...</em></p>

<strong><P>
Thanks a lot for the help. I will keep you posted on the progress.
</P></strong>

<!-- end 7 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="wanted/8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Content Suggestion</FONT></H3>
Fri, 28 Sep 2001 08:34:14 -0700
<BR>Boning, Mike (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20help%20wanted%20%238">Mike.Boning from UNIFORM.ARAMARK.com</a>)

<P>
After the recent suggestion from the Gartner Group to abandon Microsoft IIS,
many companies are going to be looking at moving to Linux/<A HREF="http://www.apache.org/">Apache</A>. It would
be wise to publish good information regarding comparisons, compatibilities,
and particularly migration paths.
</P>


<!-- end 8 -->
<P> <hr> </p>
<!-- =================================================================== -->
<center><H3><font color="maroon">GENERAL MAIL</font></H3></center>
<P> <HR> </P>
<!--====================================================================-->

<!-- BEGIN GENERAL MAIL -->

<UL>
<!-- index_text begins -->
<li><A HREF="#mailbag/1"
	><strong>Thinking of and Praying for you</strong></a>
<li><A HREF="#mailbag/3"
	><strong>Ben's fame to claim???</strong></a>
<li><A HREF="#mailbag/5"
	></a>Re: Apropos question --or--
<br><A HREF="#mailbag/5"
	><strong>Non-ASCII characters and LG</strong></a>
<li><A HREF="#mailbag/7"
	><strong>Missed the toons</strong></a>
<li><A HREF="#mailbag/8"
	><strong>email with multiple POP3 accounts</strong></a>
<li><A HREF="#mailbag/9"
	><strong>Link fix needed</strong></a>
<!-- index_text ends -->
</UL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Thinking of and Praying for you</FONT></H3>
Wed, 12 Sep 2001 22:54:08 +0200
<BR>Wiri (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20mailbag%20%231">wbr from online.fr</a>)

<P><STRONG>
Hello Linuxg@zette,
</STRONG></P>
<P><STRONG>
Please accept our expression of condolence for the terror that has struck your
country. God bless you and America !
</STRONG></P>
<P><STRONG>
Wilf and friends.
</STRONG></P>
<P>
Thank you very much, Wilf; I realize this isn't a Linux topic, but I didn't
want your message of support to just stand unanswered. Just a bit of military
historical perspective: at one point, Rome lost three <EM>legions</EM> and one of
their governors in a single ambush in the Teutoburger Forest. Never before had
they suffered a disaster of those proportions; nothing even close. The result?
Roman armies marched; and afterwards, there was not enough left of the tribes
that had attacked them to even bother Rome for *five centuries.*
</P>
<P><em>
"We have awakened a sleeping giant and filled him with a terrible resolve."
-- Admiral Yamamoto, after Pearl Harbor
</em></P>
<P>
Thank you again. And <EM>thank you</EM> to all of our friends who are with us in
compassion, caring, and spirit.
</P>
<P>
Ben Okopnik
<br>US Army veteran
</P>

<p><em>See also the <a href="lg_bytes71.html#legislation">News Bytes</a> and 
	<a href="lg_answer71.html">TAG</a> columns for some more words from
	the <b>Linux Gazette</b> staff on this topic. -- Heather </em></p>


<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag/3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Ben's fame to claim???</FONT></H3>
Wed, 5 Sep 2001 22:31:20 +0100 (BST)
<BR>Thomas Adam (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20mailbag%20%233">The Weekend Mechanic</a>)

<P>
Dear Ben (and others),
</P>
<P>
I just thought that you and the rest of the team at
the LG, would like to know that I was flicking through
a friends copy of a British magazine called PCPlus.
Although this is mostly orientated towards Windoze
users, they do have a Linux section.
</P>
<P>
In this section the subject of shell scripting was
being taught. I was not impressed with their content.
The author of the article referred to shell scripting
as a "dos batch file" equivalent, but gave no mention
that BASH in fact has many boolean logic
control-structures. But that is by-the-by.
</P>
<P>
The real reason why this e-mail is being sent to you,
is that in one of the references, they pointed it to
Ben Okopnik's article on The basics of shell languages
(in issue 52). It is nice to know that the LG is used
in such a context.
</P>
<P>
Keep up the good work guys,
<br>Regards,
<br>Thomas Adam -- The Linux Weekend Mechanic
</P>

<P><em>
&lt;smile&gt; Always good to hear that somebody is getting good use out of this
stuff. Thanks for the note, Thomas!
-- Ben Okopnik</em></P>


<!-- end 4 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag/5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Non-ASCII characters and LG</FONT></H3>
Wed, 26 Sep 2001 11:28:04 -0700
<BR>S&aacute;ndor B&aacute;r&aacute;ny (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20mailbag%20%235">bs@tud.at</a>)
<p><em>As frustrating as I find "quoted printable" or HTML attachments, they
	are ways that foreign character sets can survive to get to me.  
	I'm pleased to say that since he is active on Debian mailing lists,
	some of whose archives do not ruin his name, I was able to rescue
	it from the Dread Question Mark Disease.  The rest of our answer is
	from Mike Orr. -- Heather</em></p>

<P><STRONG>
thank you very much for your answer about apropos. The solution you sent
works properly. I had myself something similiar; however I could not
imagine there is no built-in possibility for my problem which I have
overseen.
</STRONG></P>
<P>
An OS can never give you all the commands you want, especially since
they conflict with the commands someone else wants.  What Unix gives
you is a comprehensive set of basic commands and the building blocks
to build higher-level custom commands.  This is why shell scripts and
aliases are so highly valued by Unix enthusiasts, because they give
you the ability to make custom commands for anything the developers
might have forgotten.
</P>
<P><STRONG>
I crosschecked it again and my mailer inserts the proper headers:
Content-Type: text/plain; charset=iso-8859-2
</STRONG></P>
<P><STRONG>
Content-Transfer-Encoding: 8bit
</STRONG></P>
<P><STRONG>
I find it really very pity you do attempt any use of i18n in your
mailer. I am from Hungary, so I actually need the iso-8859-2 charcter
code when I use my mother language for mails; however, my name is within
the simple Western-Europe or ascii256 charset. If you US people insist
on using us-ascii then ther are plenty of guys on the world who do not
have any chance to see their name as in their personal documents. I have
recently run some circles around locales and gnome (which I prefer to
kde), and I have to tell you how much I was shocked by the fact how long
way is to go till we reach to the point Windows95 already had. I have
freefonts, ttfs, X fonts for several languages etc. but when I wanted to
print out proper hungarian characters I had to redirect the StarOffice
postscript output to file (was also forced to use elementary postscript
fonts), and drive it through 'ogonkify'. A large number of Linux users
can not live with us-ascii, so at a given point they are lost.
</STRONG></P>
<P>
The problem of representing multiple languages is acute, and I strongly
wish Linux was more advanced in that area.  If editors and browsers
fully supported Unicode seamlessly across the board, we would switch to
it in an instant.  However, 8-bit character sets continue to be better
supported.  The limitation is that only one 8-bit character set can be
active at a time, meaning you can't properly display a document containing
English and Russian and German unless one of the languages is ASCII-ified.
This was a pain when I had Russian friends in Russia and Germany I sent
e-mail to and typed up text documents for.
</P>
<P>
LG has just thrown its hands up in the air and taken the
incorrect-but-easiest approach of using Latin-1 but pretending it's
ASCII.  Most of the non-English mail we get uses Latin-1 characters.
I try to convert these to HTML entities when I see them, but I don't
make a time-consuming effort of it.  Compounding this is the fact that
many of us use mutt as our mailreader, and mutt replaces non-ASCII
characters with "?".  Then if you save the message or forward it, mutt
converts the placeholder "?" into real "?", and then the original character
is completely lost.  With Romance/Germanic languages we can usually
guess what the original character was and substitute it back
(because "ma?ana" is clearly "ma&ntilde;ana", "K?ln" is "K&ouml;ln",
"Jos?" is "Jos&eacute;",
"Universit?t" must be "Universit&auml;t" because "Universit&ouml;t",
"Universit&uuml;t" and "Universit&szlig;t" don't exist, etc--unless
you want to say "Universit&ouml;t" is slang for "dead university"!);
however, with names from other languages we're at a total loss.
</P>
<P>
Perhaps someday we can come up with a more enlightened way to support
multiple languages, but this is what we have now.
</P>
<P><STRONG>
Last question: are you plan to publish on the <em>Linux Gazette</em>
	 page this new Answer-Gang mail address? Or
not publishing it is the proper way to avoid getting rid of off-topic
questions 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">)
</STRONG></P>
<P>
The linux-questions-only address is at the top of the Mailbag page and The
Answer Gang index page, where we have always published it.  The top of
the 2-Cent Tips page still has the gazette address, but I've asked Heather
to change it.  In any case, I bounce everything to linux-questions-only that
was misaddressed to gazette.
</P>
<P>
If you see anywhere else (besides in back issues) where the gazette
address or the obsolete tag address is used, please let me know and
we'll change it.
</P>
<P>
I thought about putting the address on the home page but decided against
it, because people should at least have a look at what The Answer Gang
is about before they find out there is a submission address.
</P>
<P>
The problem of off-topic questions was not caused by Gazette readers.
It was caused by the fact that the tag address was published on many
webpages with no reference to LG.  So people would type their question
into search engines, find the tag address, and send us questions, often
without even realizing Linux Gazette existed.  Our off-topic questions
were easily 50% of the total.  See the past several issues of The Back
Page for the more amusing ones, and issues of The Answer Gang before
that.
</P>
<P>
Since switching to the linux-questions-only address, our off-topic
rate has dropped to near zero, and we are also seeing fewer Linux
questions from people who don't even bother to read the FAQs and
documentation first but just expect us to hold their hand.  LG believes
in helping those who help themselves.
</P>
<p>-- Mike


<!-- end 6 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag/7"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Missed the toons</FONT></H3>
Fri, 14 Sep 2001 10:06:26 +0530
<BR>Sudhakar . A N (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20mailbag%20%237">sudhakar.an from eximsoft.com</a>)

<p>
<STRONG>I miss the toons in your lates issue.</STRONG>
</P>

<P>
We miss them too.  Shane Collinge has to
concentrate on paid employment for a while, so HelpDex is on hiatus.  
Eric Kasten has his hands full doing whatever he's doing, so Tuxedo Tails
is also taking a break.  

<P> Jon "Sir Flakey" Harsem is still going strong, so we have a new 
installment of <A HREF="qubism.html">Qubisms</A> this month for your
cartoon fix.  It was missing last month because I, um, forgot to include it.
Most Qubism cartoons are non-Linux but I'm including some of the funnier
ones anyway.</P>  

<P> I originally told Eric Kasten we wanted only Linux cartoons,
but he said Linux is too specific a topic to come up with that many
cartoons about, so I've been publishing non-Linux Tuxedo Tails panels too.
</P>

<P>--Mike.</P>


<!-- end 7 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag/8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">email with multiple POP3 accounts</FONT></H3>
Thu, 30 Aug 2001 11:33:54 +0800
<BR>Artemista - (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20mailbag%20%238">artemista from mail.com</a>)

<P>
Thanks to everyone who responded to my question. With everyone's advice, I was able to figure out a solution to the problem.
</P>
<P>
-- Artemista
</P>

<!-- end 8 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag/9"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Link fix needed: http://www.linuxgazette.com/issue70/tag/9.html</FONT></H3>
Sat, 01 Sep 2001 21:56:10 -0600
<BR>Alvin Austin (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%20mailbag%20%239">alvin from crlogic.com</a>)

<P>
Hi Heather,
</P>
<P>
In the latest Linux Gazette online issue, the link to the "internet cafe" is set
to that of "Password aging" instead of:
</P>
<P><BLOCKQuote>
<A HREF="../issue70/tag/9.html"
	>http://www.linuxgazette.com/issue70/tag/9.html</A>
</BLOCKQuote></P>
<P>
You will want to correct this.
</P>
<P>
Have a nice day,
</P>
<P>
Alvin Austin 
</p>

<p><em>Ooops!  Sorry about that!  As Mike noted elsewhere, my conversion
	script caught a bug last month, and I <b>mostly</b> managed to
	clean up after it, but obviously, I missed another one. 
	-- Heather</em></p>

<!-- end 9 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
	of <I>Linux Gazette</I> 
<a href="http://www.linuxgazette.com/copying.html"
	>Copyright &copy;</a> 2001
<BR>Published in issue 71 of <I>Linux Gazette</I> October 2001</H5>
<H6 ALIGN="center">HTML script maintained by
	<A HREF="mailto:star@starshine.org">Heather Stern</a> of
	Starshine Technical Services,
	<A HREF="http://www.starshine.org/">http://www.starshine.org/</A> 
</H6>
<!-- *** END copyright *** -->
<H4 ALIGN="center">"Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>

<HR> <!-- ******************************************* -->

<center>
<table cellpadding=7><tr><td>
<IMG SRC="../gx/bytes.gif" border=1  ALT="News Bytes">
</td><td>
<H3>Contents:</H3>
<ul>

<li><a HREF="#legislation">Legislation and More Legislation</a>
<li><a HREF="#links">Linux Links</a>
<li><a HREF="#conferences">Conferences and Events</a>
<li><a HREF="#general">News in General</a>
<li><a HREF="#distro">Distro News</A>
<li><a HREF="#commercial">Software and Product Announcements</a>
</ul>
</td></tr></table>

<STRONG>Selected and formatted by  <A
HREF="mailto:michael.conry@softhome.net">Michael Conry</A> and <A
HREF="mailto:gazette@ssc.com">Mike ("Iron") Orr</A></STRONG> </center>

<P> Submitters, send your News Bytes items in 
<FONT SIZE="+2"><STRONG>PLAIN TEXT</STRONG></FONT>
format.  Other formats may be rejected without reading.  You have been
warned!  A one- or two-paragraph summary plus URL gets you a better
announcement than an entire press release.

<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<font color="green">
October 2001 <I>Linux Journal</I>
</font>
</H3>

<IMG ALT=" "   SRC="misc/bytes/lj-cover90.png" WIDTH=200 HEIGHT=268
ALIGN="left" HSPACE="20">

<P> 
The October issue of <A HREF="http://www.linuxjournal.com/"><I>Linux
Journal</I></A> is on newsstands now.
This issue focuses on Engineering.  Click 
<A HREF="http://www.linuxjournal.com/lj-issues/issue90/index.html">here</A>
to view the table of contents, or 
<A HREF="http://www.linuxjournal.com/subscribe/index.html">here</A> 
to subscribe.

<P>
<FONT COLOR="green">All articles through December 1999 are available for
public reading at 
<A HREF="http://www.linuxjournal.com/lj-issues/mags.html">http://www.linuxjournal.com/lj-issues/mags.html</A></FONT>.  
Recent articles are available on-line for subscribers only at 
<A HREF="http://interactive.linuxjournal.com">
http://interactive.linuxjournal.com/</A>.  

<BR CLEAR="all">

<a name="legislation"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Legislation and More Legislation</font></H3></center>

<P> <STRONG>Behold the debut of a new News Bytes section.</STRONG>

<P> This is the third month in
a row that the legal landscape surrounding Linux users and programmers has
been rapidly changing.  We want to give adequate coverage to these
changes--new laws and proposed laws--around the world.  Since we have
personal knowledge only of the US and Ireland, we'll need readers to <A
HREF="mailto:gazette@ssc.com">tell us</A> what's happening in their
countries.  This is important because anything that gets enacted in one
country is often held up as an example to encourage similar legislation in
other countries.  

<P> For any new law, one must ask:  Who is pushing it?  What will they
gain?  Who will lose under it (re fines or jail time)?  Why?  Do the
proponents have a secret agenda to use the law in ways the legislature
didn't intend?  Do they have a not-so-secret agenda to push for bigger laws
after this one is passed and accepted by the public?  What unintended
effects will the law have that even its proponents did not predict?
We can't answer all these, but hopefully we can start asking the questions.

<P> Especially the last question.  This section is partly an Ode to the Law
of Unintended Effects, because there are so many of them recently.  

<HR NOSHADE WIDTH="20%"> <!-- ********************************* -->

LG reported in <A HREF="../issue69/orr.html">July</A>
and <A HREF="../issue70/lg_bytes70.html#dmca">August</A> about
the unexpected fallout from the
<STRONG>Digital Millenium Copyright Act (DMCA)</STRONG>.
Companies are using it to suppress criticism of their shoddy designs,
prevent customers from protecting themselves from the effects
of said shoddy designs, and even jail a foreign programmer for writing (in
his home country) a program that is legal in his home country.  Now that 
Dmitry is facing a possible sentance of 25 years, I guess a decline in
corporate profits is more serious than armed robberies--even if the decline
in profits is hypothetical or imagined.  (Didja notice how in spite of
Napster, Gnutella and DeCSS, the sales of CDs and DVDs continue to go
nowhere but up?)

<P> Foreign programmers like Alan Cox (#2 Linux kernel developer and former
Usenix coordinator) are <A
HREF="http://lwn.net/2001/0726/letters.php3">avoiding the US</A> in order not
to fall into the same trap Dmitry did.
American programmers are
<A HREF="http://noframes.linuxjournal.com/articles/misc/0048.html#effects">
looking for jobs elsewhere</A> -- anywhere -- now that
normal and necessary practices in security development and security
certification are illegal.  Not that there may be many
places to go: the major proponents of the DMCA (the five biggest
media-publishing and software-publishing conglomorates) are using the 
established US law as an example to push for similar laws in Canada, Europe
and the FTAA (a possible future free-trade zone covering North and South
America), saying: "See, they did it, so you should too."

<HR NOSHADE WIDTH="20%">  <!-- **************** -->

In September, change went from "high gear" to "extremely
high gear" and then into "overdrive".  The Big 5 publishers came back with an
even sweeter proposal, the son of DMCA.  Aiming to plug the "loopholes" in 
the DMCA (meaning the last bit of fair use the DMCA allows), the
<STRONG>Security Systems Standards and Certification Act</A> (SSSCA)</STRONG>
<A HREF="http://www.politechbot.com/docs/hollings.090701.html">[draft
text]</A> 
<A HREF="http://cryptome.org/sssca.htm">[another draft]</A> would make it
illegal to "manufacture, import, offer to the public, provide or otherwise
traffic in any interactive digital device that does not include and utilize
certified security technologies that adhere to the security systems standards
adopted under section 104." 

<P> "Security systems standards" means software that
enforces digital copyrights.  Remember 
<A HREF="http://www.theregister.co.uk/content/archive/17009.html">
CRPM</A>, the aborted effort to put
non-bypassable rights management into the firmware of all new IDE hard
drives?  That was scrapped because too many customers would refuse to buy
such products.  But SSSCA would make this or the equivalent mandatory.  

<P> Linux Weekly News <A HREF="http://lwn.net/2001/0913">writes</A>,
"The definition of a 'digital device' is just as broad as it sounds -
essentially, anything--hardware or software--that is capable of moving
and storing bits.  In particular, a computer running Linux is certainly
such a digital device, as is Linux itself or any of a number of other
free programs."  Free-software advocates are concerned, because is it
even <EM>possible</EM> for Linux to be compliant?  Linus could implement some
rights-management code in the kernel, but because it's open source, any
programmer could just comment it out.  And the companies would presumably
want to keep their (shoddy?) rights algorithm secret, so it would be
available only in binary form.  Would they even make a Linux version?  If
they did, would Linus have to link a proprietary, binary-only library into
the standard kernel and change Linux's license to allow and mandate this?
Would the kernel have a new module "digirights.o" with the help text, "If
you are outside the United States, choose 'N' for maximum flexibility,
reliability, speed and security.  If you are inside the US, be aware that
choosing 'N' may be a felony, and you should consult a lawyer before
proceeding."

<P> Another problem is that the technical standard is to be determined by
"representatives of interactive digital device manufacturers and
representatives of copyright owners".  What about representatives of the
public?  The constitutional right of copyright is a balance between the
author's interests (payment) and the public's interests (the "progress of
science and useful arts" by having everything become public domain after a
limited time, and fair-use rights in the meantime).  But this law is 
one-sided in favor not even of the authors, but of the big publishing houses.

<P> There is also a certain antitrust exemption in the bill.

<P> One concession to fair use remains: TV time-shifting.  People will be
allowed to record a TV show if it's an "over-the-air broadcast, non-premium
cable channel or non-premium satellite channel".  Recording a Showtime movie
would become illegal since it's on a premium cable channel.  Note that there's
no provision for radio, webcasting or future technologies, so there would be no
fair use at all for those.

<P> The SSSCA is not law yet.  In fact, as of early September it had not
even been introduced in Congress, just debated informally.  More happened
later, but let's keep things chronological....

<HR NOSHADE WIDTH="20%"> <!-- ********************* -->

On September 11, the tragedy heard round the world.  This has been
well reported elsewhere, so I will stick to the issues relating to Linux.
Suddenly, <A HREF="http://www.wired.com/news/politics/0,1283,46816,00.html">
crypto back doors</A> and crypto export limitations are fashionable
again.  Congress is falling over itself trying to pass anti-terrorism
legislation as quickly as possible.  Some of this legislation is good and 
necessary.  But lobbying groups and government agencies are finding a rare
window of opportunity to sneak long-desired unrelated topics into the
package, and they are not shy about exploiting it.  It's a lobbyist's dream as
Congress is in a spending mood and eager to pass any legislation that purports
to hinder terrorism, without enough time to evaluate whether the actual effects
will be good or bad.

<P> Of course, there are the usual arguments against <STRONG>encryption back 
doors</STRONG>:
<UL>
<LI> If encryption is outlawed, only outlaws will have encryption.
<LI> You want we should destroy our freedom in order to save it?
<LI> Even if our government and allied governments are good now, what if
one of them becomes bad?  How will we invalidate the keys it holds, especially
for old messages in a fixed (unchangeable) format?
<LI> What about rogue employees in the government or keyholding service?
Especially those who might sell the information to marketers, or use it for
identity theft to raise $$ for their meth fix?
<LI> E-commerce will decline because nobody wants to trust their personal 
information to something with a back door.
<LI> Strong encryption will continue to be developed overseas.  Our competitors
and enemies will have an advantage.
<LI> Skilled tech workers will vote with their feet and move to countries where
they can work on projects unencumbered by restrictions.
<LI> Exports will decline because foreigners will laugh at the security of
American encryption products.
</UL>

<P> Exactly one week after the terror attacks, the Nimda worm/virus
appeared, the son of Code Red.  The Justice Department 
<A HREF="http://www.securityfocus.com/news/257">included</A> in
its Anti-Terrorism Act language that would <STRONG>define hackers,
virus-writers and web site defacers as "terrorists", eligible for life
imprisonment without parole.</STRONG>  "Cracking a computer for the purpose of
obtaining anything of value, or to deliberately cause damage" would carry the
same penalties as assassinating a public official or dropping a chemical 
weapon.  The law would be retroactive to the beginning of time, so even 
crimes committed long ago could be tried under it.  Fortunately for Kevin
Mitnick, he's already received his sentance.  But those who break into a
grocery store's web site and order a pack of gum for free had better watch
out.  And those who provide "'advice or assistance' to cyber crooks, or 
harbor or conceal a computer intruder" would receive the same punishment as
the intruders themselves.  "DNA samples would be collected from hackers upon
conviction, and retroactively from those currently in custody or under
federal supervision. The samples would go into the federal database that
currently catalogs murderers and kidnappers."

<P> What happens if you cross an Anti-Terrorism Act with a Digital Millenium
Copyright Act?  Answer: Dmitry goes to prison for life.  No, that hasn't been
proposed.  But watch out for that definition of "hacking" and see what
exactly it includes, and whether it expands later.  Remember the law of
Unintended Effects.

<P> Larry Ellison, the head of Oracle, is 
<A HREF="http://www.siliconvalley.com/docs/news/svfront/ellsn092301.htm">
calling for</A> <STRONG>national ID cards</STRONG>.  This may sound like
merely the musings of a concerned citizen until you remember that an ID-card
system needs a database, and why not an Oracle database?  Ellison is offering
to give the government the software for free, but still, what a PR bonanza for
Oracle it would be.  (Like when Microsoft "gives" software to schools.  Of
course, nowadays it "sells" software to schools....)  Regarding identity cards
themselves <A
HREF="http://www.privacy.org/pi/activities/idcard/idcard_faq.html"> this
report</A> looks at countries that use them and countries that don't use them,
and notes the differences between what each country originially intended its
card for vs how it's being used now.  (Again, the Law of Unintended Effects.)

<P> There is one bright side: Congress is considering splitting up the 
omnibus Anti-Terrorism bill.  That would allow it to pass the most urgent
portions right away, but hold off on the more controversial measures until
they can ascertain which ones would cause more harm than good.

<HR NOSHADE WIDTH="20%">  <!-- ******************************* -->

<P> In late September, the <STRONG>SSSCA</STRONG> was introduced in the
Senate.  It has a long way to go before it becomes law, since it has not even
been introduced in the House yet.  Most are predicting it has too many
critics to pass this year, but portions of it could crop up in future years.

<P> <I>Linux Journal's</I> Don Marti <A
HREF="http://www.linuxjournal.com/articles/conversations/0034.html">chided
Michael Eisner</A>, the Charman and CEO of the Walt Disney Company, for
planning a trip to Washington, DC, to "close the deal on a computer
censorship bill, the SSSCA, you're buying from Congress."  He also 
chided Senator Fritz Hollings (D-SC) under the headline, <A
HREF="http://www.linuxjournal.com/articles/conversations/0036.html">
"Senator Hollings Cheaper Than We Thought"</A>, saying that Eisner had paid
Hollings $18,500 to
get the bill introduced.  (And not the $25,000 <I>LJ</I> had previously
reported.)  Of course, the payment was in the form of
cumulative campaign contributions, not a direct bill payment (pun intended).  

<P> The Register notes in <A
HREF="http://www.theregister.co.uk/content/4/21830.html">
"Copy-Control Senator Sleeps While Fair-Use Rights Burn"</A> that the Big 5
media companies are among the top 20 contributors to Hollings' election
campaigns: AOL Time Warner, the Murdoch-owned News Corporation, Viacom's CBS,
the National Association of Broadacsters, and Walt Disney Company.
If you type "senator hollings campaign contributions disney" into
<A HREF="http://www.yahoo.com/">Yahoo</A>, several other articles come up,
including <A
HREF="http://www.commoncause.org/publications/040297_rpt4.htm">this one</A>.
(Yes, you <EM>can</EM> try this at home.  Type "senator &lt;NAME&gt; campaign
contributions" and see what comes up for your favorite Congresscritter.  Or
"representative &lt;NAME&gt;" for members of the House.)


<P> Here's an article that looks at SSSCA from the manufacturer's 
standpoint:
<A HREF="http://lists.essential.org/pipermail/am-info/Week-of-Mon-20010917/007186.html">
Bill Could Force Copy Control On IT Firms</A>.  It says the SSSCA "could slow
the development of the technologies it seeks to regulate by shifting the
attention of the industry from product development to lobbying."  One attorney
comments, "Telling us what systems to pay for and implement to protect someone
else's property doesn't make sense."

<P>  
<A HREF="http://www.theregister.co.uk/content/6/21577.html">Another Register
article</A> says the
SSSCA "would close all the irritating little loopholes in the DMCA right
around the necks of consumers, where, the industry reckons, the pressure
rightly belongs."  And, "Conveniently, and by design, the words 'fair use'
appear nowhere in the draft. The industry lobbyists never liked that
troublesome phrase in the DMCA, so now it's gone."  The article also points
out that the SSSCA does not require new complient hardware to be
backward-compatible with older hardware, meaning another round of buying the
same content again.

<HR NOSHADE WIDTH="20%">  <!-- ******************************* -->

<P> The <STRONG>role of the 
<A HREF="http://www.eff.org/">Electronic Frontier Foundation (EFF)</A>
</STRONG> emerged as a topic in activists' discussions.
Many people think of the EFF as a lobbying organization, but its mission is
actually to defend individuals who have been unjustly accused.  Taking on
full-scale lobbying of Congresscritters would require significant changes to
EFF's structure, tarnish its reputation among those who raise their noses at
"lobbyists", place the organization in a different tax category, and distract
it from defending individuals.  

<P> Thus, the free-software and "free Dmitry" groups are debating whether
they should start a lobbying organization themselves.  Of course, one's first
knee-jerk reaction is to stay as far the h*ll away from Washington as
possible, but if we don't do it, who will?  Of course, it would mean doing
some distasteful things.  Like (gasp) making campaign contributions to 
influence a Congresscritter's votes.  Is the free-software community ready to
sponsor a PAC? (PAC = Political-Action Committee, a fancy term for "lobbying
group".)  Even though freeniks have some of the highest noses and loudest
sneers against "lobbying scum"?  Some are considering it, thinking 
it's the only way make a dent in the rapidly-accelerating onslaught against
our rights.  Obviously it's something that it will take a long time to come to
consensus on.

<HR NOSHADE WIDTH="20%">  <!-- ******************************* -->

There is another bright side, as pointed out in the IT article.  The media
companies should watch what they wish for because they just might get it.
Perhaps the Law of Unintended Effects will end up applying to them.  Especially
if enough people decide they can do without the Big 5's content.  

<P> Or if artists
start giving away all their music for free.  That would generate more
fans at shows, and bands receive much more money from one concert patron
($5-10, plus $10 if she buys a T-shirt) than they do from one CD purchase
(less than $1).  And if she buys a CD at a show, they both win: she gets a
discounted price (often $10), and the band get a few dollars rather than the 25
cents they would get from a retail sale.

<P> Then we would see corporate profits drop.

<HR NOSHADE WIDTH="20%">  <!-- ******************************* -->

In conclusion, the DMCA was passed and nobody noticed.  (A few people like
Richard Stallman <A HREF="http://www.gnu.org/philosophy/right-to-read.html">
sounded the alarm</A>, but everybody said it wouldn't get that bad.) Now when
it's too late, we are seeing the effects.  We're also seeing DMCA-like laws
pushed in countries we thought were "safe".  Then the publishers pull a rabbit
out of their hat with another law, and it doesn't take a rocket scientist to
see that it will also turn out to be more powerful than it appears when it's
passed (if it's passed), just like the DMCA. 

<P> This, coupled with the crypto back door and hacking-considered-terrorism
proposals and others, foreshadow a society fifty years from now vastly
different than now, where everything is pay-per-view, fair use is forgotten,
all available computer hardware enforces this, and Linux has been illegal for
so long that nobody remembers what it was.  But the biggest companies will
still have familiar names--AOL Time Warner, Walt Disney, Microsoft.  The laws
give a competitive advantage to the companies that were dominant at the time of
the laws' adoption, since they can use the laws to sue everybody else out of
existence.  (Why else do you think they pushed so heavily for the laws in the
first place?)  Perhaps many people in today's computer field will drop out in
disgust and switch to other professions, and shun e-mail and the phone in favor
of face-to-face activities.  Farfetched?  Perhaps, but we've learned and not to
trust the CEOs and politicos any farther than we can throw them, and to expect
the worst because it will turn out worse than that.  

<P> Of course, one wonders whether the needs of the publishers for
strong encryption and the needs of the FBI for weak encryption are on a
collision course.  We've already seen that the needs of the FBI (to catch
bad guys) and the needs of e-commerce (to promote a healthy economy) are
opposite: that's why the Clinton administration weakened crypto export laws,
and why the FBI is now pushing back.

<HR NOSHADE WIDTH="20%">  <!-- ********************** -->

<STRONG>Other items of interest</STRONG>

<P> <A HREF="http://www.sciencemag.org/cgi/content/full/293/5537/2028">"Anticircumvention Rules: Threat to Science"</A> (Science magazine)
argues that the DMCA is a threat to all scientists, not just those in
computer security and encryption research.  "Virtually all computer
scientists, as well as many other scientists with some programming skills, find
it necessary on occasion to reverse engineer computer programs.  Sometimes they
have to bypass an authentication procedure or some other technical measure in
order to find out how the program works, how to fix it, or how to adapt it in
some way. The act of bypassing the authentication procedure or other technical
measure, as well as the making of a tool to aid the reverse engineering
process, may violate the DMCA.  Although the DMCA also has an exception for
reverse engineering of a program, it too is narrow. It only applies if the sole
purpose of the reverse engineering is to achieve program-to-program
interoperability and if reverse engineering is necessary to do so. Trying to
fix a bug or understand the underlying algorithm does not qualify. Information
even incidentally learned in the course of a privileged reverse engineering
process cannot be divulged to any other person except for the sole purposes of
enabling program-to-program interoperability."  The article also speculates
about a pharmaceutical company that "produces data to prove that a new drug is
safe but technically protects it so that only certain tests can be performed on
the data, all of which support the safety claim. A scientist who doubted the
safety claim and tried to process the data by additional tests would violate
the DMCA if he or she bypassed the access control system restricting use of the
data."

<P> Lawrence Lessig, who wrote _Code and Other Laws of Cyberspace_, is
<A HREF="http://lwn.net/2001/features/LawrenceLessig.php3">interviewed</A>
by LWN's Dennis Tenney.  He gives his perspective on the
DMCA, Dmitry Sklyarov's case, Hailstorm, international jurisdiction,
etc.

<P> Background on the 
<A HREF="http://www.informationweek.com/story/IWK20010711S0010">DeCSS case</A>.

<P> A <A HREF="http://slashdot.org/comments.pl?sid=21786&threshold=1&commentsort=0&mode=thread&pid=2358824#2364678">Slashdot post</A>
that describes some of the lesser-known provisions of the DMCA.

<P> Phil Zimmerman, creator of PGP encryption, 
<A HREF="http://www.philzimmermann.com/news-Response_WashPost.shtml">explains</A>
how he was misrepresented by the Washington Post.  The Post reported that he
was "overwhelmed with feelings of guilt" over the fact that the September 11th
terrorists may have used PGP in planning their attack.  Zimmerman reiterates
that he thinks the public having access to strong encryption without back doors
is a good idea, and that PGP is a good tool for human rights around the world.
He also insists he will not allow any back doors in PGP.

<a name="links"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Linux Links</font></H3></center>

<P> <hr> <P> 

<IMG ALT="Linux Focus" SRC="../gx/linuxfocus.jpg" WIDTH="143" HEIGHT="45">
<BR CLEAR="all">
The following articles are in the September-October issue of the multilingual
ezine <A HREF="http://www.linuxfocus.org/">Linux Focus</A>.

<UL>
<LI><a href="http://linuxfocus.org/English/September2001/article139.shtml">
XMRM : Morphing with Linux</a></LI>
<LI><A HREF="http://linuxfocus.org/English/September2001/article198.shtml">
Avoiding security holes when developing an application - Part 5: race conditions</A>
<LI> <A HREF="http://linuxfocus.org/English/September2001/article206.shtml">Using XML and XSLT to build LinuxFocus.org(/Nederlands)</A>
<LI> <A HREF="http://linuxfocus.org/English/September2001/article213.shtml">Analyzing your internet applications' log files</A>
<LI> <A HREF="http://linuxfocus.org/English/September2001/article214.shtml">Psionic Portsentry 1.1, the defender of the ports</A>
<LI> <A HREF="http://linuxfocus.org/English/September2001/article215.shtml">E-mail over UUCP: The professional solution for dialup users</A>
<LI> <A HREF="http://linuxfocus.org/English/September2001/article216.shtml">Shell Programming</A>
</UL>


<P> In case you missed some of 
<a href="http://www.linuxjournal.com/">
Linux Journal's</a> technical web articles over
the past few months here are some links to
System Administration articles by Marcel Gagn&eacute;<br>
<ul>
<li>Your Network's Secret Life<br>
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0059.html">part 1</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0060.html">part 2</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0061.html">part 3</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0062.html">part 4</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0063.html">part 5</A>.
<li>Tux Knows It's Nice to Share<br>
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0051.html">part 1</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0052.html">part 2</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0053.html">part 3</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0054.html">part 4</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0055.html">part 5</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0056.html">part 6</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0057.html">part 7</A>,
<A HREF="http://noframes.linuxjournal.com/articles/sysadmin/0058.html">part 8</A>.
</ul>

<P><a href="http://www.linuxjournal.com/">
Linux Journal</a> also has an online
<a href="http://www.linuxjournal.com/articles/linux_review/0052.html">
Review</a> of the book
Linux Administration: A Beginner's Guide, Second Edition.

<p><a href="http://www.linux-mag.com/">
Linux Magazine</a> have an article on MySQL 
<a href="http://www.linux-mag.com/2001-06/mysql_01.html">
performance tuning</a>.
Much of the information could be applied to any SQL database.

<p>
<a href="http://www.thedukeofurl.org">
The Duke of URL</a> has
<ul>
<li>A <a href="http://www.thedukeofurl.org/reviews/misc/applixware50">
review</a> of 
Applixware Office 5.0.
<li>An <a href="http://www.thedukeofurl.org/reviews/misc/tamingbeast">
editorial</a> called 
"Taming the Beast."  It's all about Microsoft's latest attempts to 
corner the market and even has a little history, as well.
</ul>
<p><a href="http://www.linuxports.com/">The Linux Review</a> have taken a
<a href="http://www.linuxports.com/entry.lxp?lxpe=104">
look</a> at the new KDE 2.2 and its applications. The review points out
missing features that allegedly make the corresponding Windows and Macintosh 
applications superior (even MS Outlook!). There is also a
<a href="http://www.linuxports.com/entry.lxp?lxpe=106">
follow up</a>. Courtesy 
<a href="http://www.lwn.net/">LWN</a>.

<P>
Could DMCA be
<a href="http://mail.nl.linux.org/humorix/2001-08/msg00016.html">
outflanked</a> by new cosmogeny and quest for meaning of life ;-).

<P>There is an
<a href="http://www.osnews.com/story.php?news_id=93">
interview</a> with the creator of MenuetOS over at
<a href="http://www.osnews.com/">OS News</a>. 
<a href="http://www.menuetos.org/">
MenuetOS</a>
is a small assembly-language OS
that fits on a floppy with room for a few applications.  The video
driver has 16.7 million colours.

<p>
Some links courtesy of <a href="http://www.slashdot.org/">Slashdot</a>:
<ul>
<li> 
Congress Mulls 
<a href="http://www.wired.com/news/politics/0,1283,46816,00.html">
Stiff Crypto Laws</a>
in response to terror attacks.
<li> 
CmdrTaco 
<a href="http://slashdot.org/articles/01/09/13/154222.shtml">
explains</a>
how Slashdot stayed up during their highest load ever
after the attacks.  Comments about MySQL and static pages.
<li> 
ZDNet 
<a href="http://techupdate.zdnet.com/techupdate/stories/main/0,14179,2808791-1,00.html">
reviews</a>
12 Linux support services.
<li>
Guido has written a web page of 
<a href="http://www.python.org/doc/Newbies.html">
resources</a> for Python newbies
<li>
<a href="http://www.ibm.com/">IBM</a> to 
<a href="http://www.investors.com/editorial/tech.asp?v=8/28">
sell</a> Linux-based brokering software,
</ul>

<P>
In industry bad news,
<a href="http://lwn.net/">Linux Weekly News</a>
have 
<a href="http://lwn.net/2001/0913/">
reported</a> that Great Bridge has closed its doors.  Great Bridge was the
company that brought LG the article 
<A HREF="http://www.linuxgazette.com/issue68/mitchell.html">The Opening of the
Field: PostgreSQL's Multi-Version Concurrency Control</A>.

<a name="conferences"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Upcoming conferences and events</font></H3></center>


<P> Listings courtesy <EM>Linux Journal</EM>.  See <EM>LJ</EM>'s
<A HREF="http://noframes.linuxjournal.com/events/">Events</A> page for the
latest goings-on.


<!-- *** BEGIN events table [this line needed by Linux Gazette events.py *** -->

<table cellpadding=5 border=0 width=100%>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Cluster 2001</b><BR>
        <td valign=top>October 8-11, 2001<BR>Newport Beach, CA<BR>
	<A HREF="http://www.cacr.caltech.edu/cluster2001/"
        target=_blank>
        http://www.cacr.caltech.edu/cluster2001/</A>
        <BR>   
        </td></tr> 

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
	<b>Linux Lunacy<br>Co-Produced by <i>Linux
	Journal</i> and Geek Cruises</b><BR>
	<td valign=top>October 21-28, 2001<BR>Eastern Caribbean<BR>
	<A HREF="http://www.geekcruises.com/" target=_blank>
	http://www.geekcruises.com</A><BR>
	</td></tr> 

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>LinuxWorld Conference & Expo</b><BR>
        <td valign=top>October 30 - November 1, 2001<BR>Frankfurt, Germany<BR>
        <A HREF="http://www.linuxworldexpo.de" target=_blank>
        http://www.linuxworldexpo.de</A><BR>
        </td></tr>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>5th Annual Linux Showcase & Conference</b><BR>
        <td valign=top>November 6-10, 2001<BR>Oakland, CA<BR>
        <A HREF="http://www.linuxshowcase.org/" target=_blank>
        http://www.linuxshowcase.org/</A><BR>
        </td></tr> 

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Strictly e-Business Solutions Expo</b><BR>
        <td valign=top>November 7-8, 2001<BR>Houston, TX<BR>
        <A HREF="http://www.strictlyebusinessexpo.com/" target=_blank>
        http://www.strictlyebusinessexpo.com</A><BR>
        </td></tr> 

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>  

<tr><td valign=top>
        <b>LINUX Business Expo</b><BR>Co-located with COMDEX<br>
        <td valign=top>November 12-16, 2001<BR>Las Vegas, NV<BR>
        <A HREF="http://www.linuxbusinessexpo.com" target=_blank>
        http://www.linuxbusinessexpo.com</A><BR>
        </td></tr>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>15th Systems Administration Conference/LISA 2001</b><BR>
        <td valign=top>December 2-7, 2001<BR>San Diego, CA<BR>
        <A HREF="http://www.usenix.org/events/lisa2001/" target=_blank>
        http://www.usenix.org/events/lisa2001</A><BR>
        </td></tr>  

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr> 


</table>
<!-- *** END events table [this line needed by Linux Gazette events.py *** -->



<a name="general"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">News in General</font></H3></center>


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Python10 conference
</FONT>
</H3> 

<P> The 
<a href="http://www.python10.org">
Tenth International Python Conference</a> (Python 10) will be held on 
February 4-7, 2002, at the Hilton Alexandria Mark Centre in Alexandria, 
Virginia.
The Call for Papers for the Refereed Paper Track, and the Call for 
Tutorials can be found at 
<a href="http://www.python10.org/p10-callpapers.html">
www.python10.org/p10-callpapers.html</a>, 
and 
<a href="http://www.python10.org/p10-calltutorials.html">
www.python10.org/p10-calltutorials.html</a>,
respectively.  The deadline for 
submitting a paper to the Refereed Paper Track is Monday, October 8, 
2001.  The deadline for submitting a proposal for Tutorials Day is Monday, 
October 1, 2001.


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">LLNL Adds Linux Cluster Supercomputing Power to ASCI Project 
</FONT>
</H3> 

<P>SGI Federal, a
subsidiary of 
<a href="http://www.sgi.com/">SGI</a>,
has 
<a
href="http://www.linuxnetworx.com/news/8.28.2001.49-Lawrence_Liverm.html">
teamed up</a> with 
<a href="http://www.linuxnetworx.com">
Linux NetworX</a> to win a bid to build three Parallel 
Capacity Resource (PCR) Linux cluster computing systems totalling 472 Pentium 
4 processors for the National Nuclear Security Administration's Accelerated Strategic 
Computing Initiative (ASCI). 
ASCI is a program to reach 100-trillion calculations per second by 2005 
that will help scientists  to maintain the 
safety and reliability of the U.S. nuclear stockpile by simulating the
aging and operation of nuclear weapons.  With a theoretical peak 
performance of 857 gigaFLOP/s, the largest of the three systems with 252 Pentium 
4 processors, named PCR P4A, will be one the fastest Linux clusters ever built.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Petroleum Penguins
</FONT>
</H3> 

<P><a href="http://www.lgc.com/">
Landmark Graphics Corp.</a>, a wholly owned business unit of
Halliburton Company, today announced plans to offer its full
suite of integrated UNIX exploration and production applications on a range
of Linux platforms with rollout beginning in the fourth quarter of 2001.
This marks the most significant commitment to date by a major technology
provider in the oil and gas industry to support the "open source" Linux
operating system. Compaq, Dell, EMC, IBM, Intel and Network Appliance are
working with Landmark to offer a broad range of optimized Linux solutions,
including workstations, servers and storage. 

<a name="distro"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Distro News</font></H3></center>

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Debian
</FONT>
</H3> 
<a href="http://www.debian.org/News/weekly/2001/21/">
There are</a> a lot of orphaned (102) and up-for-adoption (35) packages out
there. Some of the packages include kicq, knews, mcvert (Mac to Unix file
converter) and several others. A list of packages is found 
<a href="http://lists.debian.org/debian-devel-announce/2001/debian-devel-announce-200109/msg00003.html">
here</a>.
<p>
<hr width="20%" noshade>
<p>
Adam Di Carlo 
<a href="http://lists.debian.org/debian-boot/2001/debian-boot-200109/msg00255.html">
announced</a> that version 3.0.14 of the boot floppies are 
<a href="http://people.debian.org/~aph/debian/dists/woody/main/">
available</a> for testing for powerpc and
i386. Hammer on them and send reports, comments or praise to debian-boot@lists.debian.org.
<a href="http://www.debian.org/News/weekly/2001/22/">
Original story</a>.
<p>
<hr width="20%" noshade>
<p>
Debian Security is crucial to users and should be managed properly. 
<a href="http://www.debian.org/News/weekly/2001/23/">
Recently</a>, to
help improve the situation, Joey Hess has 
<a href="http://lists.debian.org/debian-security/2001/debian-security-200109/msg00225.html">
asked</a> for a Security Secretary, who
will 
<a href="http://lists.debian.org/debian-security/2001/debian-security-200109/msg00299.html">
help</a> the Debian Security Team doing their work.
<p>
Reports taken from 
<a href="http://www.debian.org/News/weekly/">
Debian Weekly News</a>.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">SuSE
</FONT>
</H3> 

<P>From the end of August,
<a href="http://www.suse.de/en/">SuSE Linux</a> 
<a href="http://www.suse.de/en/sles/">
Enterprise Server 7</a> will be available for Intel's 32-bit 
architecture (x86), Intel's 64-bit architecture (Itanium processor family), 
and IBM's mainframe platform S/390. Versions for IBM's iSeries, 
pSeries, and zSeries will follow in late autumn.
Included in the purchase price, are maintenance services that make sure that
SuSE Linux Enterprise Server 7 is always  up-to-date, stable, and tested.
SuSE regularly informs users by e-mail and makes the respective patches,
fixes, and updates available via FTP server.
For more information please refer to 
<a href="http://www.suse.de/en/sles/">
http://www.suse.de/en/sles/</a>
<p>
<hr width="20%" noshade>
<P>SuSE Linux have also announced that 
<a href="http://www.suse.de/en/produkte/solutions/database_server/index.html">
SuSE Linux Database Server</a>
combines the operating system platform of SuSE Linux Enterprise 
Server with IBM's DB2 Database to form a complete solution for professional users. 
In mid September, SuSE Linux will present an updated version of the solution package.

<a name="commercial"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Software and Product Announcements</font></H3></center>


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">New CPCI SBC from MEN Micro
</FONT>
</H3> 

<P>
<a href="http://www.menmicro.com/">
MEN Micro</a> have released
a new CompactPCI single board computer (SBC).  The SBC comes in three
versions, and each version includes a 300 MHz PowerPC XPC8245. The D3, as
the new SBC is designated, is a one-slot 6U CompactPCI board. In CompactPCI
systems it operates as a master system-slot board, but in embedded
applications it can also operate as a standalone processing unit without a
bus connection.  As a computer, the D3 comes with up to 256K of DRAM in a
SODIMM slot, two megabytes (MB) of flash memory and an ATA-compatible
CompactFlash site, in addition to numerous other I/O features. The D3 can
run either the VxWorks or Linux operating systems. For more information on
the D3 including a data sheet, go to 
<a href="http://www.men.de/products/press/">
www.men.de/products/press</a>.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Rackspace Named Best Dedicated Host
</FONT>
</H3> 

<P>
<a href="http://www.rackspace.com/index.php">
Rackspace</a>, who hosts more than 2,500 Linux servers, has earned the title of
"Best Dedicated Host", 
as judged by the editors of
Web Hosting Magazine,
because of their dedication to customer service. 

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">SAIR Linux and GNU Certification
</FONT>
</H3> 

<P>
Recently, to assist in promoting the Linux+
certification effort, 
<a href="http://www.linuxcertification.com">
SAIR Linux and GNU Certification</a> has released a version of its
Fundamentals course-ware, which doubles as preparation course-ware for
<a href="http://www.comptia.org/">
CompTIA's</a> Linux+ Certification exam.
SAIR Linux and GNU
was contacted by CompTIA to aid in the development of CompTIA's
Linux+ Certification exam.  The course title is SAIR Linux
and GNU Fundamentals/Linux+.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Linux Based Ethernet Compatible Set Top Box
</FONT>
</H3> 

<P> <a href="http://www.vtmt.com/">
Media Technology</a> have launched their new product, the
<a href="http://www.vtmt.com/html/vt900.html">
VT900 Set Top Box</a>.  
The VT900 enables Ethernet 10/100 data streams to be converted to composite 
analog RF data streams or digital S-Video data streams compatible with all 
standard TV sets.  Over 250 channels of various forms of  TV-format data 
have been successfully tested with the VT900.
Implementing Linux, the VT900 incorporates a full browser, and supports all 
plug-ins.  Partnerships have been established with  both Century Embedded 
Software Inc., and Enreach Technology Inc, to further develop application 
software.
The VT900 is designed using the National Semiconductor Geode processor in 
conjunction with the Sigma Design EM8400 MPEG Decoder and the Macphyter 
Ethernet adapter.  Optionally available  are DVD Player, CDRW, Floppy and 
standard IDE Hardware.


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Team ASA Announces NPWR SBC up-grade with Dual Gigabit Ethernet Ports
</FONT>
</H3> 

<P> <a href="http://www.teamasa.com/">
Team ASA's</a>
NPWR is a Single Board Computer (SBC) designed for 
manufacturers and OEMs in the Network Attached Storage (NAS), RAID, 
and Personal Server marketplaces. It is 
now available with dual Gigabit 
Ethernet ports.
The NPWR is powered by the Intel XScale processor, the XScale is a 
RISC CPU with clock rates reaching as high as 733 MHz. NPWR's 
standard configuration includes 160 Mbytes per Second  (LVD) SCSI 
port, 8 Mbytes of FLASH ROM, 128 Mbytes of SDRAM and a Gigabit 
Ethernet port.  


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">DocPro DocBook Tool Set
</FONT>
</H3> 

<P><a href="http://www.commandprompt.com/">
Command Prompt, Inc.</a> is pleased to announce 
<a href="http://www.commandprompt.com/products_DocPro.lxp">
DocPro</a>, the
"professional DocBook tool set".
DocPro is a compilation of tools designed to allow technical writers to
effectively process their DocBook SGML and XML layout.  DocBook itself
is a powerful markup language. However, the tools are painful to compile,
configure and work with. Command Prompt, Inc. has eliminated the problems
associated with the integration of these tools into a production
environment.  DocPro comes in Basic and Deluxe versions, and should work
with all RedHat 6.2 and later compatible distributions of Linux.
 
<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Tarantella Enterprise 3 Starter for Linux
</FONT>
</H3> 

<P> 
<a href="http://www.tarantella.com/">Tarantella, Inc.</a> 
has announced the availability of
<a href="http://www.tarantella.com/products/e3/starter.html">
Tarantella Enterprise 3 Starter for Linux</a> software.
The product makes it possible to publish Windows, Web, Java, AS/400, Linux
and UNIX applications securely to client devices anywhere. It
can be used for a wide
range of tasks, such as remote system administration or accessing company
applications and services from home.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Embedded Open Motif
</FONT>
</H3> 
<a href="http://www.ics.com/">
Integrated Computer Solutions</a> has announced  a
version of Open Motif targeted at embedded and handheld devices with
limited displays, memory, and processing power.
<a href="http://www.motifzone.net/projects/?group_id=16">
Embedded Open Motif</a> has been ported to the Compaq IPAQ and the Agenda
VR3 from Agenda Computing. Both source code and binary packages are
available for free download from the  
<a href="http://www.motifzone.net/">
MotifZone</a>.
Get more information online at:
<a href="http://www.motifzone.net/forum/forum.php?forum_id=140">
http://www.motifzone.net/forum/forum.php?forum_id=140</a>

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">WAP Opera
</FONT>
</H3> 

<P><a href="http://www.opera.com/">Opera Software</a>
have 
<a href="http://www.opera.com/pressreleases/20010905.html">
announced</a> that future versions of its browser will support the new and
improved Wireless Application Protocol (WAP) 2.0 standard.
<p>
<hr width="20%" noshade>
<p>
Opera Software have also opened the
revamped 
<a href="http://my.opera.com/">
MyOpera</a> community and released the second edition of their popular
Opera Composer, inviting users to join an Opera community or create their
own. In this new version, users can customise their own Web browser for
the Linux platform as well as for Windows,

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Alabanza
</FONT>
</H3> 

<P> 
<a href="http://www.alabanza.com/">
Alabanza</a> has 
<a href="http://www.alabanza.com/pages/press_sitebuilder.html">
launched</a> version 4.1 of
of its Automated Web Hosting Software Suite, which was originally
built on and still runs on the Linux operating system. The latest version of the
software suite includes a new Web Site Builder tool it acquired from OnNet Web
Hosting. Version 4.1 automates administrative Web hosting tasks, empowers users to
update sites, provides for complete security and furnishes electronic commerce
services for small businesses.
Alabanza's Automated Web Hosting Software Suite 4.1 is the most proven, reliable
and secure solution on the market for hundreds of Web designers and developers,
systems integrators, Internet service providers and telecommunications carriers.
It allows end users to automate administrative tasks, manage content, and update
Web sites with a significant decrease in time and costs; all within a secure
environment.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">BrainTAGS
</FONT>
</H3> 

<P> 
<a href="http://www.braintags.de/">
BrainT@GS</a>
has released NetRelay.  This software-tool automates processes between web
client, server and databases. This includes automatic record creation,
deletion, display and up-date and integration of a template-engine. The
intelligent and structured architecture of NetRelay makes the development
of dynamic web applications more transparent and structured. NetRelay
creates a clear separation between logic and presentation and also
generates automatic XML documents, enabling easy data-transfer.  NetRelay
is database independent. NetRelay runs on any server platform supporting
the JDK, and has been tested on Linux.

<!-- *** BEGIN copyright *** -->
<P> <hr> <P> 
<H5 ALIGN=center>
Copyright &copy; 2001, Michael Conry and 
the Editors of <A HREF="mailto:gazette@ssc.com"><I>Linux Gazette</I></A>.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 71 of <i>Linux Gazette</i>, October 2001</H5>
<!-- *** END copyright *** -->


<center>
<H1><A NAME="answer">
	<img src="../gx/dennis/qbubble.gif" alt="(?)" 
		border="0" align="middle">
	<font color="#B03060">The Answer Gang</font>
	<img src="../gx/dennis/bbubble.gif" alt="(!)" 
		border="0" align="middle">
</A></H1> 
<BR>
<H4>By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang,
	the Editors of Linux Gazette... 
	and You!
<br>Send questions (or interesting answers) to
	<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a>
</H4>
<p><em><font color="#990000">There is no guarantee that your questions
	here will <b>ever</b> be answered.  Readers at confidential sites
	must provide permission to publish.  However, you can be published 
	anonymously - just let us know!
</font></em></p>
</center>

<p><hr><p>
<H3>Contents:</H3>
<dl>
<dt><a href="#tag/greeting"
	><strong>&para;: Greetings From Heather Stern</strong></A></dl>

<DL>
<!-- index_text begins -->
<dt><A HREF="#tag/1"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>Q: avoid getting answers from apropos in the man sections 3 and 3x</strong></a>
<dt><A HREF="#tag/2"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>"crypt" function in Linux</strong></a>
<dt><A HREF="#tag/3"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	></a>I think this would be a common problem at least is has been for me
	--or--
<dd><A HREF="#tag/3"
	><strong>Dependency Hell</strong></a>
<dt><A HREF="#tag/4"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>Is This a Good Book for Linux Programming?</strong></a>
<dt><A HREF="#tag/5"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>What ISPs Do We Use for Linux</strong></a>
<dt><A HREF="#tag/6"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>How to let the world find your Linux Server when using DHCP</strong></a>
<dt><A HREF="#tag/7"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>trouble w/ dual boot</strong></a>
<dt><A HREF="#tag/8"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	></a>Any good resources on laptop hardware support? --or--
<dd><A HREF="#tag/8"
	><strong>HOWTO find a good laptop</strong></a>
<!-- index_text ends -->
</DL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/greeting"><HR WIDTH="75%" ALIGN="center"></A>
<H3 align="left"><img src="../gx/dennis/hbubble.gif" 
	height="50" width="60" alt="(&para;) " border="0"
	>Greetings from Heather Stern</H3>
<!-- begin hgreeting -->
<p>   Ouch.

<p>
   The world trade center in shambles.  The financial community is still
   mostly in shock.  The airline industry is rightfully quite horrified.
   I know <em>I'm</em> horrified...

<p>
   What can we, members of the free software community, do?

<p>
   I know a lot of sites have put up banners linking to various helpful
   organizations, the Red Cross, funds for the families of all the 
   emergency personnel killed, and so on.  So much in fact, that I wonder
   how many charities will go short shrift of donations, clothes, and
   other things, simply because this one presently has everyone's attention.

<p>
   But that's what we do <em>as people</em>.  As a <em>community</em> we
   can do a lot more.  <a href="http://www.slashdot.org/">Slashdot</a>
   did great on keeping us all in tune with the news, when the routers 
   in front of almost every major news service were going into meltdown.
   People used IRC and websites to find out if friends were alive and well,
   I saw wikis, I saw email lists briefly stop talking about the topic
   of the moment and reserve the day for traffic about who was okay.  Now
   this didn't just mean wondering whether anybody died in New York.  For
   instance, a friendly soul from the GNOME Usability Project was trapped
   in China for 6 days longer than he expected... making it to our user
   group meeting just in time, I might add, but I think it probably 
   dampened his enthusiasm for our chinese food.

<p>
   We're an international community, and now an international problem that
   has existed for a long time has been made more obvious.  These people
   that took these planes used little that was unavailable to Cro Magnon
   Man.  I'll update them to the Bronze Age because they found a cheat 
   sheet for how to not be followed - but we're still talking tribal 
   hunters, not 21st century "agents" from The Matrix.

<p>Yet there are these pushes to "wiretap" email. (See the Crypto-Gram
   Newsletter, <a href="http://www.counterpane.com/crypto-gram-109a.html"
		>http://www.counterpane.com/crypto-gram-109a.html</a>
   for some details.)  The ultra-protectionism
   of Big Corporate copyrights continues (you think the 
	<a href="http://www.educause.edu/issues/dmca.html"
		>Digital Millenium Copyright Act</a>, already passed
   and being enforced, is bad?  Look at the bill 
	"<a href="http://216.110.42.179/docs/hollings.090701.html"
	>SSSCA</a>" up for attention.  According to the EFF's Cindy Cohn
	it makes the DMCA "look like the Bill Of Rights".) while frankly, 
   my ability as a real individual who writes about one tune every 2 years, 
   lyrics a little more often, and at least one article a month, to 
   continue to enforce my OWN copyrights and fair use rights under the 
   US Code, Title 17
   (<a href="http://www4.law.cornell.edu/uscode/17/index.html"
	>http://www4.law.cornell.edu/uscode/17/index.html</a>) 
   continues straight into the gutter.
   My expectation of safety when I visit a foreign country obviously won't
   be based on the idea that I was an invited speaker -- as far as I know,
   anybody who was trapped in another city because all flights were grounded
   has gotten home now, even the ones who took a taxi From Chicago to Los
   Angeles -- but Dmitry Sklyarov, a Russian citizen, continues to live 
   trapped in the USA because eBooks can't be sold in Russia unless you 
   can make a backup of them, and he agreed to TALK about how the encryption 
   works on US soil.

<p>
  <strong>NOW</strong> I'm terrified.

<p>Of course most of my email lives a very public life already.  But let's
   face it, a translucent dime store postcard written on in big black marker
   has more privacy than the average internet Joe.  It's not a federal 
   felony to hassle a small town ISP because they don't want to let you 
   wiretap all of their customers just because you have a warrant on one of 
   them.  (We'll leave out whether the "up to something" they might
   be up to is about real life-and-death matters or merely about someone
   wanting to play Mom for us.)  It's not a federal crime to impersonate
   being someone important so that your spam gets into a victim's box.
   Hey, I may dislike spam a great deal, but it's just a delete button,
   okay?  He's said his piece and I ignore it.    We paint over graffiti
   on the walls of small towns, no attention, no fanfare, and eventually
   the spams die.   End of story.

<p>
   Soon, however, it may be a federal crime -- penalty, to lose most of
   your rights of US citizenship forever -- to deface a website.  HELLO
   real world!  This is about equivalent to "joyriding".  Give 'em some
   community service and get on with life. Goodness knows what level of 
   punishment they have in mind for someone who 
   believes that mail containing things about money matters really ought
   to be in an envelope that can't be steamed open, even in the figurative
   sense of cyberspace.  (If you don't use PGP or 
	<a href="http://www.gnupg.org/">GnuPG</a> already, establish
   the habit now.  Free interoperable clients for MSwin and Mac: 
	<a href="http://www.pgp.com/products/freeware/default.asp"
	>http://www.pgp.com/products/freeware/default.asp</a>) 
   Or that we have a reasonable expectation of privacy and freedom to 
   assemble as a group for any other reason.  Or that the business 
   transactions of any US company are none of any other company's or 
   country's direct business, 
   unless some sort of model of trust exists between them.
   Join the <a href="http://www.eff.org/">Electronic Frontier Foundation</a>
   and keep up on other resources about what is going on.  As a group we
   have a better chance.  (There are other privacy related groups out there
   too.  <a href="http://www.cato.org/">Cato.org</a>, the 
	<a href="http://www.aclu.org/">American Civil Liberties Union</a>, 
	and Europeans might consider checking out the Justis database,
	<a href="http://www.justis.com/database/european_law.html"
	>http://www.justis.com/database/european_law.html</a>.  I'm sorry
	I can't read other languages or surely I'd have more pointers...)

<p>
   The electronic 'zines I'm subscribed to were singing the praises of the
   IT staff who arranged for businesses to go onward regardless of the 
   chaos.  They're only just starting to notice the drastic legislation
   that's trying to come down the pipe on a wave of patriotism, duty, and
   budget-grubbing.  I work with and know a lot of sysadmins.  I can tell
   you that a lot of sysadmins right now don't like the idea of being
   put in a tight spot: as a cop, with none of the legal defenses a cop
   has for doing his job;  as a carrier of bits, with none of the legal
   defenses of a telphony Common Carrier for the fact that we are not the
   origin of any of this information;  as an implementor of company policy,
   and a professional with special skills, but without the defense of 
   "client privilege" that other professions enjoy.

<p>A number of legislators are quite up in arms over the idea that they 
   are being asked to vote on these matters without enough time to read
   all the horrid little details.  However, some seem to want this extra 
   time so they have a chance to draft their own pet departments, see
<a href="http://dailynews.yahoo.com/htx/ap/20010920/us/attacks_terrorism_laws_3.html">http://dailynews.yahoo.com/htx/ap/20010920/us/attacks_terrorism_laws_3.html</a>.  Call your reps now and make sure that whatever does finally get
   drafted actually defends and supports <em>you</em>.  I'm sad to say that
   email probably isn't enough -- you can try it, but they get a ton, and it
   carries little emotional power.  Use a phone and <strong>talk</strong>
   to these people.  

<p>
   While a proposed bill isn't exactly 
   "closed source" it is pretty much what something huge like OpenOffice
   or the linux kernel is to someone uninitiated to the wizardry of C and
   perhaps even deeply experienced in the same.  Of course in <em>our</em>
   scope we have all sorts of utilities to help us manage large projects
   and sort through things.  So what I'd love to see is some sort of
   "pretty print" style parser that goes over proposed bills and exposes
   the described crimes, regulations, penalties and so on to a bit of
   serious debugging.   The "sources" are readable by anyone on THOMAS,
	<a href="http://thomas.loc.gov/">http://thomas.loc.gov/</a>; 
   although goodness knows if those are up to date with what is being 
   argued on the Congress floor, it's a start.  I'm sure somebody out 
   there can give it a shot!

<p><em>On a somewhat more local note, we had many more threads than this,
        in fact I am amazed at the percentage of incoming questions that we
        answered.  But I just got all boiled up and had to let off the
        above rant.  On the plus side my scripts are doing better by
        far than last month.  So I have picked some highly juicy ones
        and hope you'll forgive me the short list.  We have new
        <a href="tag/bios.html">Biographies</a>
        for the Answer Gang, too, so you can get a sense of who answers 
	your questions here.</em></p>
<!-- end hgreeting -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/1"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 1 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>Q: avoid getting answers from apropos in the man sections 3 and 3x</H3>


<p><strong>
From S&aacute;ndor B&aacute;r&aacute;ny 
</strong></p> 
<p align="right"><strong>Answered By Mike Orr
</strong></p>
<BLOCKQUOTE>
Dear Answer Gang,
</BLOCKQUOTE>
<BLOCKQUOTE>
I am looking for a way to avoid getting answers to my apropos queries
from the man sections 3 and 3x (ie I want to see only command names and
no APIs). How can I do that without statically removing those man
sections?
</BLOCKQUOTE>
<BLOCKQUOTE>
Regards,
</BLOCKQUOTE>
<BLOCKQUOTE>
S&aacute;ndor B&aacute;r&aacute;ny
</BLOCKQUOTE>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Mike] 
If you want to see only a certain section, you can pass that as the
second argument to "man".  For instance, "crontab" has two pages.
"man 5 crontab" shows the file format, and "man 1 crontab" (or "man
8 crontab" on some systems) shows the command.
</blockQuote>
<blockQuote>
Apropos doesn't have any options, but man can be called as:
</blockQuote>

<blockquote><code><font color="#000033"><br>man -S 1:5:8 MyCommand
<br>man --sections=1:5:8 MyCommand
</font></code></blockquote>
<blockQuote>
to make it search only certain sections.  In this case, it will display
the first file it finds.
</blockQuote>
<blockQuote>
The easiest way to do what you want would be to have a shell script or
function that greps the output of "apropos" to remove the unwanted lines:
</blockQuote>

<blockquote><code><font color="#000033"><br>#!/bin/sh
<br>apropos $* | fgrep -v '(3)
<br>(3X)'
</font></code></blockquote>
<blockQuote>
Or if you like regular expressions:
</blockQuote>

<blockquote><code><font color="#000033"><br>#!/bin/sh
<br>apropos $* | egrep -v '\((3|3X)\)'
</font></code></blockquote>

<!-- end 1 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/2"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 2 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>"crypt" function in Linux</H3>


<p><strong>From Ben Okopnik 
</strong></p> 
<p align="right"><strong>Answered By  
<p></strong></p>
<BLOCKQUOTE>
Just a little while ago, I needed to use the "crypt" program, so
well-known in other Unices, to encode a text file (for those of you
unfamiliar with it, it encrypts the contents of a file using a password
that you supply. A fairly useful little utility when you want just a bit
of added security on a publicly-readable file.) Imagine my surprise when
I found that Linux does not have one! Once again, it's Perl to the rescue.
</BLOCKQUOTE>
<BLOCKQUOTE>
This version follows the syntax of the original "crypt", although
I'm certain that the algorithm is different. The encryption and the
decryption are symmetric, meaning that the same syntax is used for both
(with the obvious exception of the relevant filenames):
</BLOCKQUOTE>

<blockquote><code><font color="#000033"><br># This encrypts the contents of "mysecret.txt" using "iAMw0tIam" as the
<br># password and saves the results to "mysecret.encrypted".
<br>crypt iAMw0tIam &lt; mysecret.txt &gt; mysecret.encrypted
<br>
<br># This prints out the decrypted contents of "mysecret.encrypted" to the
<br># screen.
<br>crypt iAMw0tIam &lt; mysecret.encrypted
<br>
<br># This decrypts the contents of "mysecret.encrypted" and writes the results
<br># to "mysecret.decrypted".
<br>crypt iAMw0tIam &lt; mysecret.encrypted &gt; mysecret.decrypted
</font></code></blockquote>
<BLOCKQUOTE>
Long passwords are preferable to short ones for better security;
"crypt" accepts them without a problem, provided that any password
containing spaces or other "weird characters" is quoted (preferably
in single quotes).
</BLOCKQUOTE>

<blockquote><code><font color="#000033"><br>  crypt 'Praeterea, censeo Carthaginem esse delendam.' &lt; file &gt; file.enc
</font></code></blockquote>
<BLOCKQUOTE>
As always, bug reports, comments, and piles of diamonds are welcome. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</BLOCKQUOTE>
<p align="center">See attached <tt><a href="../misc/tag/crypt.perl.txt">crypt.perl.txt</a></tt></p>
<BLOCKQUOTE>
Ben Okopnik
</BLOCKQUOTE>

<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/3"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 3 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>Dependency Hell</H3>


<p><strong>From Andrew 
</strong></p> 
<p></strong></p>

<p align="right"><strong>Answered By  Thomas Adams, Dan Wilder, Heather Stern
</strong></p>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Hello Gang,
</STRONG></P>
<P><STRONG>
Hope you don't minding me milking some knowledge from
you. One thing that has been bugging me for a while now is this.
</STRONG></P>
<P><STRONG>
I am running Redhat 6.1 with a recompiled kernel (2.2.19)..
</STRONG></P>
<P><STRONG>
This is the thing though. There are given programs that i may/do want to
install that need different libraries for them to work. Most of my upgrades
have been via rpm -U scenario (easy to keep track of what is on my system).
</STRONG></P>
<P><STRONG>
I need to install gcc which when i do the following i get this
</STRONG></P>

<pre><strong>[root@echelon /root]# rpm -ivh gcc-2.96-54.i386.rpm
error: failed dependencies:
        cpp =3D 2.96 is needed by gcc-2.96-54
</strong></pre>
<P><STRONG>
so then i do this
</STRONG></P>

<pre><strong>[root@echelon /root]# rpm -q cpp
cpp-1.1.2-24
</strong></pre>
<P><STRONG>
so i better upgrade
</STRONG></P>

<pre><strong>[root@echelon /root]# rpm -U cpp-2.96-85.i386.rpm
error: failed dependencies:
        libc.so.6(GLIBC_2.2)   is needed by cpp-2.96-85
        cpp =3D 1.1.2 is needed by egcs-1.1.2-30
        cpp =3D 1.1.2 is needed by egcs-objc-1.1.2-30
</strong></pre>
<P><STRONG>
Mmmm i know GLIBC is pretty important so i get the version above &amp; do the
following
</STRONG></P>

<pre><strong>[root@echelon /root]# rpm -q glibc
glibc-2.1.3-22
</strong></pre>
<P><STRONG>
so ok lets upgrade this (or at least try to)
</STRONG></P>

<pre><strong>[root@echelon /root]# rpm -U glibc-2.2-12.i386.rpm
error: failed dependencies:
        glibc-common =3D 2.2 is needed by glibc-2.2-12
        glibc &gt; 2.1.3 conflicts with db3-3.1.17-4.6x
        glibc &gt; 2.1.3 conflicts with rpm-4.0-6x
        libdb.so.2 is needed by enlightenment-conf-0.15-9
        libdb.so.2 is needed by pan-0.9.1-0_helix_1
        libdb.so.2 is needed by ggv-0.95-0_helix_1
        libdb.so.2 is needed by pygnome-1.0.53-0_helix_3
	[ . . . about 70 more complaints . . . ]
        libdb.so.3(GLIBC_2.1) is needed by perl-5.00503-6
        libdb.so.3(GLIBC_2.1) is needed by pam-0.72-20.6.x
        libdb.so.3(GLIBC_2.1) is needed by php-3.0.18-1.6.x
        libdb.so.3(GLIBC_2.1) is needed by sendmail-8.11.0-1
        libdb.so.3(GLIBC_2.1) is needed by openldap-1.2.9-6
</strong></pre>
<P><STRONG>
Do you see wehat i am getting at
</STRONG></P>
<P><STRONG>
How would you get around these issues   it can become rather frustrating
</STRONG></P>
<P><STRONG>
Any advice on this would be great like always
</STRONG></P>
<P><STRONG>
Thanx guys n girls
</STRONG></P>
<P><STRONG>
Regards
</STRONG></P>
<P><STRONG>
Andrew
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
Hi Andrew,
</blockQuote>
<blockQuote>
Yuck!! You have managed to expose one of the more
annoying features that the RPM format
brings....version dependant files.
</blockQuote>
<blockQuote>
Since every package (or nearly every) is linked to
another, you can imagine just how one package may be
needed by another.
</blockQuote>
<blockQuote>
To try and get arounf your problem, you can specify to
install an RPM file without looking for it's
dependencies, thus:
</blockQuote>

<blockquote><code><font color="#000033"><br>rpm -i --nodeps ./rpmfile-version-3.rpm
</font></code></blockquote>
<blockQuote>
But, one caveat with this, is that if you don't
have/install the dependencies, then the program might
not work.
</blockQuote>
<blockQuote>
Hope That Helps
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan] 
It is a common problem.  The common solution is to upgrade the
installation using the upgrade method provided by the
distribution.  It may be time for you to upgrade across-the-board to
Redhat 7.1.
</blockQuote>
<blockQuote>
It is possible to upgrade a distribution piecemeal, but it becomes
more difficult (as you have observed) as the number of dependencies
increases.
</blockQuote>
<blockQuote>
The alternative is going off-distribution and building the specific
things you need from source, one at a time.  This is more often not
worth the effort.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
Heh.  Jim calls this "dependency hell".  Every distro has it.  <A HREF="http://www.debian.org/">Debian</A>
is pretty good about reducing the number of parts in the puzzle -- about
the time you're looking at upgrading glibc, they call it the next version
name, and a lot of people bust their butts to make the upgrade smooth.
Of course, unless you're using <A HREF="http://www.libranet.com/">LibraNet</A> or something, the install is a
bit rocky...
</blockQuote>
<blockQuote>
For staying with an older distro a bit longer (hey, it's not crashing,
why change it much, right?) my common solution is to remove the offending
rpms, use alien (a perl script) to transform deb files from the equivalent
Debian variant, and then use those to provide the libraries and so on, that
just my app needs.  I've used this trick to introduce lynx-ssl to a number
of systems that otherwise only come with a non-SSL version, often a bit old.
</blockQuote>
<blockQuote>
Nonetheless, I agree with Dan -- once you've decided to upgrade glibc, it's
time to take your upgrade seriously, and make a new round of it.  Distros
vary widely as to whether it's safer to upgrade or to just install
anew;  with a good backup of all your personal files (don't forget odd things
like any tweaks you made to config files in <TT>/etc/</TT> or <TT>/usr/lib</TT>, notes about
hardware you have and need support for, etc.) you can try an upgrade, and
<EM>if</EM> it bombs, <EM>then</EM> install fresh.
</blockQuote>

<!-- end 3 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/4"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 4 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>Is This a Good Book for Linux Programming?</H3>


<p><strong>From Chris Gianakopoulos 
</strong></p> 
<p></strong></p>

<p align="right"><strong>Answered By  John Karns, Faber Fedor
</strong></p>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Hello Gang,
I've mentioned that I am working on an embedded project that will use
Linux as its kernel.  As a result, I am learning to write cool software
for the Linux platform.
</STRONG></P>
<P><STRONG>
The type of stuff that I have to do will be fork()s and exec()s (the "s"
indicates lots of <TT> fork()</TT> and <TT> exec()</TT> invocations), IPC stuff, signals (I
know -- that's IPC stuff, too). and pipes.  I know that there will be
slight differences (for example, the <TT> spawn()</TT> function), but now for the
question.
</STRONG></P>
<P><STRONG>
There are lots of good guides (and of course, the man pages).  I am also
presently reading a book entitled "Advanced Programming in the Unix
Environment" by Stevens.
</STRONG></P>
<P><STRONG>
Will that Stevens book lead me astray?  It really is giving me lots of
good insight (what other insight could there be?), so I hope that you
tell me that it is good reading for learning to create complex software
systems in Linux.
</STRONG></P>
<P><STRONG>
Of course, I will read the man pages and guides, and I expect that some
header file may be in different places (I saw slight differences for
network programming).
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [J.Karns] 
I've seen that book recommended for Linux programming on a LUG list I
subscribe to.  Additionally, this one:
</blockQuote>
<blockQuote><BLOCKQuote>
The Design of the Unix Operating System, Pr. Hall, ISBN-0-13-201799-7
Moris J. Bach
</BLOCKQuote></blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Thanks for the confirmation.  I've got the Bach book and read it years
ago.  It is my reference for Unix internals.
I will read the Stevens book just for the sport of it since it applies
to my <A HREF="http://www.freebsd.org/">FreeBSD</A> system.  I am happy that it also applies to Linux.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber] 
Excellent book, IMO.  I was re-reading it Friday night (yes, I need a
life 
<IMG SRC="../gx/dennis/smily.gif" ALT=";-)" 
		height="24" width="20" align="middle"> and still learning new things.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
I claim to have a life -- my peers don't agree with me when I start to
talk about technical stuff.  I'm almost finished with chapter 9 -- the
stuff that talks about session leaders and stuff.  Soon I read about
signals -- almost like writing interrupt handlers only a little easier.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber] 
I don't do the kind of programming that you do, but I think the
combination of the Stevens book and the kernel documentation
(usr/src/linux/Documentation assuming you've installed the kernel
sources) should do you well
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
It will be not quite like an embedded project.  That's what makes it fun
because it will be more like standard Unix programming (which I have not
yet done).  I'll have to deal with such issues as do I run various
servers as daemons?  What if I want daemon-to-daemon communication -- do
I use named pipes?
</STRONG></P>
<P><STRONG>
As I learn and discover, I will pass this type of information as 2 cent
tips.
</STRONG></P>
<P><STRONG>
Thanks for that info, Fabor.  I will keep that Linux Documentation stuff
in my mind.  I know that I ramble whenever I talk about this project
that I am working on.  Here's why, though.
</STRONG></P>
<P><STRONG>
When I was doing DSP (digital signal processor) programming, I would ask
myself questions like "I wish that I could use DMA for those A/D
samples."  Then, I would turn around and discover that the feature
existed.
</STRONG></P>
<P><STRONG>
Linux is the same way.  I'm architecting this system as I were designing
hardware to do the job.  You want I/O?  Use the messaging IPC.  That
allows programming language independence with respect to server
implementation.  Linux (and Unix) has all of these cool things that
provide for a concurrent implementation of the system.
</STRONG></P>
<P><STRONG>
And that stability.  The things that people can do when they work
together!!
</STRONG></P>

<!-- end 4 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/5"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 5 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>What ISPs Do We Use for Linux</H3>


<p><strong>From Chris Gianakopoulos 
</strong></p> 
<p></strong></p>

<p align="right"><strong>Answered By  Dan Wilder, Heather Stern, Thomas Adams, Faber Fedor, John Karns,
 Ben Okopnik, Mike Orr
</strong></p>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Hello gang,
I am going to lose my Internet service provider at the end of this year
because they are going to disappear.
</STRONG></P>
<P><STRONG>
I am visiting various web pages for ISPs out there, but, I am clueless
about how to determine their (the ISPs) interoperability with Linux.
</STRONG></P>
<P><STRONG>
For example, I talked to the support staff at www.excelonline.com, and
they said that their ISP service should work with Linux.
</STRONG></P>
<P><STRONG>
I'm not sure what the failure mechanisms are, and I will probably do lots
more surfing of the web so that I can find a suitable replacement for my
current ISP (provided by www.gateway.net).
</STRONG></P>
<P><STRONG>
About Linux Friendly ISPs...  What does friendly mean?  Does it mean that
standard protocols are used?
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan] 
The short answer is, "almost any ISP works with Linux, but don't
count on technical support from most of them."
</blockQuote>
<blockQuote>
With most ISPs, you'll have to know how to set up your PPP, dhcp,
whatever, yourself.  Increasingly, people are going to DSL and cable,
and you need to watch out for the ones who want you to put the router
or modem inside your box.  Some of these are unsupported in Linux.
Better to go with a provider who furnishes an external router or
modem.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Mike] 
An external modem will be more expensive ($200), but is worth it because
it's "standard".  My Cisco 678  connects to an ordinary Ethernet card, and
is configured via telnet or a null-modem cable (minicom/kermit).
(Actually, I could never get the telnet mode to work because I couldn't
figure out the device's IP address on its configuration network.  So I
went the minicom way.)  The modem is switchable between bridging and
routing.  The telco said I have to use bridging mode, so I'm directly on
the ISP's network.  The modem converts from Ethernet to DSL, then to ATM,
then back to Ethernet at my ISP.  For those that use the telco's own ISP,
I hear they use routing mode over PPP.
</blockQuote>
<blockQuote>
The telcos/cablecos frequently have promotions where you get a free or
discounted modem.  And my ISP (oz.net/theriver.com, covering Washington
and Colorado) has deals for ex-Covad customers now that Covad is
bankrupt:  free setup and installation for their portion of the fees
and free first and last month.  I expect other ISPs have similar deals.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Ben] 
By now, it's "you name it, and I've used it." I have not yet run into an
ISP to which I couldn't connect (AOL is neither an ISP _nor_ anything that
I want to connect to; I'd hate to wash my modem out with soap...) I've gone
through, oh, at least a dozen ISPs - in the Bahamas, all over the Caribbean,
in Bermuda, and a number of different ones in the States. Come to think of
it, better make that around two dozen. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle"> I've used Ethernet, PCMCIA/serial/
USB modems, both wired and radio, and I'm about to try it via a cell phone.
These days, I'm about to drop AT&amp;T, their support policies <EM>and</EM> quality of
service started from egregiously bad and took a sharp downward turn. And
the rates.  Blechhh.
</blockQuote>
<blockQuote>
Anyway - trust me: if it's at all possible, Linux has a way to do it.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber] 
Basically, yes.  TCP/IP is TCP/IP and even Microsoft Exchange supports
SMTP and POP. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)" 
		height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
[For connectivity itself] most dialup places that speak MSwin-only use PAP.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
Almost all services should work with Linux.  Some might be a little more
difficult to deal with than others, but most ISP's today use chap <TT>/</TT> pap
and set things up to be compatible with the default MSW client internet
connection cfg.  I have found wvdial to work in almost all cases.  Here in
Bogota, virtually all ISP's are using w2k or other MSW platform servers,
with no login scripts, which seem to be a thing of the past - which means
less fuss for you.  I have tried at least three different ones over the
past 3 yrs and all have worked.  Although sometimes (not too often) I have
to try dialing more than once to get a connection due to PAP
authentication gotcha's; but I tend to think that it's more an issue of
telecommunications complications than anything else.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Mike] 
PAP and CHAP authentication are conceptually similar to an ssh login
without a password prompt.  It does send a login and password, but this
is part of the built-in handshaking process rather than something you
have to script.  To troubleshoot, set PPP to debugging mode and watch
the handshake strings and error messages.  I haven't used pppd for years,
but the most frequent errors I used to get were the one about the line
not being 8-bit clean (you have to escape more special characters), or
the mysterious "serial line loops back" or whatever, meaning it tries to
contact the remote host but reaches itself; I think that means some
client/server switch is wrong.
</blockQuote>
<blockQuote>
As they say, Microsoft loves industry standards so much that it never
saw a protocol it didn't embrace and extend.  NT4 had PAP and CHAP, but
it was "Microsoft PAP and CHAP".  pppd users had to install a patch,
which eventually made its way into the standard package.  Each version
of NT/Win2000/WinXP may introduce similar subtleties.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
That's interesting (but not the least bit surprising) - I wasn't aware of
that.
</STRONG></P>
<P><STRONG>
Cool -- I partly understand things.
I noticed that my new ISP uses PAP.  My (soon to be) previous ISP uses
CHAP.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber] 
As Dan pointed out, just about any ISP will suffice, just don't expect
any technical support.  If you do require technical support, be
preparedto switch over to Windows for the duration of the phone call.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
That's cool.  I can live without the support --
It's more fun figuring things out myself (and with your
help -- of course).
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
I have found that either wvdial or xisp or (there's a k toy, is it kisp?
kdial?  oh well, it was on freshmeat somewhere) work slightly differently,
so if one doesn't work for you try the others before even starting to stress
out.  Jim does dialup.   I haven't had to in years, though I can trouble
shoot a raw PPP connection if I really have to.
</blockQuote>
<blockQuote>
Between freshmeat and the debian packages listing there are so many
front-ends trying to make it easy to do dialup, it's hard to just pick one
to use 
<IMG SRC="../gx/dennis/smily.gif" ALT=";P" 
		height="24" width="20" align="middle">
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
That's true.  Sometimes, I feel more comfortable doing it the "hard"
way, just so I know how to set up the various ppp scripts.  For my
<A HREF="http://www.freebsd.org/">FreeBSD</A> machine, I have two alternatives.  I can use the pppd (our
daemon), or I can use a program called ppp (a user space process).  The
latter is pretty cool, because, by turning on ip forwarding (with the
sysctl command), and passing "-nat" to the ppp program, I get ip
masquerading.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
An important part of the issue might be to tell them that you're running
Linux, and ask if they would have a problem providing answers to you
regarding such a platform.  If they turn up their nose at you, look
elsewhere.  I would maybe ask them what platform they are using for their
operation, and look for one which is using a *nix <TT>/</TT> non-MSW platform.
</blockQuote>
<blockQuote>
There should be a number of ISP's that (still) fit this category.
Another reason I would tend to avoid the MSW people would be that I would
assume the *nix people might be a little more savvy technically speaking,
as setting up a w2k <TT>/</TT> or NT box may done with a few mouse clicks - ok
maybe several.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Or does it mean that a bunch of advertising
stuff does not clog your display window when using, for example, Netscape?
</STRONG></P>
<P><STRONG>
For example, a friend told me that when you use America Online, you need
their special browser to interact with them.  I thought that all browsers
used http over TCP for the communications mechanism.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber] 
AOL is a proprietary network, with proprietary protocols. IMNSHO, AOL is
not an ISP (in terms of a center that whose primary purpose is to let
you gain access to the Internet) but a private networks which,
coincidentally, you can access the Internet through.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Now I see why this is so.  ISPs I sort of understand.  AOL, I did not
understand (since I do not see their protocols in the textbooks that I
read).
</STRONG></P>
<P><STRONG>
As far as email is concerned, I thought that POP and SMTP would be
supported by each and every ISP (possibly a misconception on my part).
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Mike] 
Every regular ISP supports POP.  Some may try to steer you toward IMAP
instead of POP because it's more "advanced".  Of course, if you don't
need IMAP's features (which allow complex operations on messages stored
on the server, rather than downloading them to your PC and reading them
there), POP works just fine.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber] 
As longas it's not a proprietary network like AOL or Delphi (is that one
still around?  What about Bix?), then you should be okay.  But check
with the ISP JIC.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Very cool!  I just tried an experiment using a friend's ISP account with
the provider that I was interested in (with the friend's permission of
course, and we were not simultaneously using the service), and it works!
It was just a connectivity experiment -- not one to rob somebody's
bandwidth.
</STRONG></P>
<P><STRONG>
So, my goals were to discover if ISPs are somewhat generic in their
behaviors (it seemed logical that they should be).  Thanks to your
responses, and my experiment, I am now confident to proceed.
</STRONG></P>
<P><STRONG>
If a few of you could respond to the question "Which dialup ISP do you use
with your Linux system", that would be cool.  I'll go ahead and read the
HOWTOs and figure out all of that chap-secrets stuff and make it work for
my <A HREF="http://www.suse.com/">SuSE</A> Linux distribution.
</STRONG></P>
<P><STRONG>
I guess that I am sort of lost because I am not getting the information
that I want from the various ISP sites (due to my ignorance of course).
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan] 
You didn't mention where you were.
</blockQuote>
<p>
... Not that this kept most of the Gang from jumping in, nor
that the results might not also be useful to you, dear readers ...
</p>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
How silly of me, Dan.  I forgot to mention that I am in the Chicago, IL
area.  Thanks for the ultra quick reply.  I just tried an experiment with
www.excelonline.com using my sister-in-law's login using my FreeBSD
machine as a router.  Therefore this particular ISP works with FreeBSD's
ppp user space program.  Linux should be free sailing -- I expect.
</STRONG></P>
<P><STRONG>
I gotta log off because the use of her ISP account (with her permission,
of course -- she's sitting next to me) was only for experimental purposes.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
With a *nix acc't you might want to look for an ISP which offers
shell accounts.  It's nice to be able to log in and read mail from their
server if need be, or place a .forward file to have your mail temporarily
forwarded somewhere else if you plan to travel to where there will be a
local email account available.
</blockQuote>
<blockQuote>
And, there might be more reliability with an ISP using a *nix-based
box.  :-0
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Mike] 
Good luck.  Most ISPs consider shell accounts a security risk, generator of
most of their tech-support calls ("Can you install/upgrade this
mailreader/newsreader/ compiler/library?"), and not a marketing priority
(because most of their customers wouldn't know what to do with a shell
account if it bit them).
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
No doubt the shell acc'ts are rarer today than a few years ago. I admit
that I haven't shopped for an ISP shell acc't for about 3 years;  but at
that time I did come across a few.  Also, my Colorado ISP acc't which I've
had since about 1995 is still a shell acc't.  They use a kerberos'd DEC
ultrix.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan] 
In the Seattle area, where our offices are located, we have a number
of Linux-supportive ISPs, such as blarg.net, eskimo.com, serv.net,
zipcon.net, oz.net, speakeasy.net, and others to whom I no doubt do
an unjustice by not listing here.  Some of these providers have points of
presence in other cities.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
My provider, Idiom.com, offers dialup.  It's S.F regional and spreading, but
I don't think it's nationwide quite yet.  The owner is a big BSD fan so it's
all free software under the hood, and an all-digital internal backbone.  It
may be more expensive than others, but we like getting our DSL from someone
we can trust - not like those PacBell bozos...
</blockQuote>
<blockQuote>
For Jim and I, Idiom's dialup is mainly a backup for if we are out of town,
but it's still handy.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
Hello. That is a shame that Gateway are cutting their
ties with providing Intenet Access. I know of a few
ISP's in the UK that are Linux "friendly":
</blockQuote>

<blockquote><pre>www.uklinux.net
www.f9.net.uk
www.vigin.net
</pre></blockquote>
<blockQuote>
All offer PPP support allowing you to dial in.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
I did find a good ISP.  At least the tech support staff answered their
phone during a Saturday morning and afternoon.  When I asked them if it
took 25 minutes to service my phone call because of their heavy service
load, they told me that there is only a few people around their on
weekends.  I suspected something like that.  I almost gave up waiting,
but, I decided to give them a fair shake (on the belief that they were
real busy).  It was worth the wait!  When I asked them if they knew if
their system would play well with Linux, they told me that they would
help me if I had any problems.  They the fellow said "We're just a bunch
of computer geeks hanging around here" (or something like that).  I saw
their coolness (I'm somewhat of a geek too), and decided to give their
site a try.  They have a good staff at www.excel.com.
</STRONG></P>
<P><STRONG>
As things went, I had no problems setting things up on my FreeBSD
machine (using user-space ppp) and no problems using Linux (using
wvdial).
</STRONG></P>
<P><STRONG>
I'm rereading the HOWTO that
talks about ip masquerading for Linux, because I do tend to give my
FreeBSD machine and Linux machines equal treatment.  It's making sense
now...
</STRONG></P>
<P><STRONG>
Thanks much to all of you that answered!  You all, once again,
increased my confidence in this stuff.  This is just like engineering --
lots of successes and lots of time me being humbled.  There's always
something to learn in this protocol world (and Linux world).  That's
what makes it so much fun.
</STRONG></P>
<P><STRONG>
Chris Gianakopoulos
</STRONG></P>

<!-- end 5 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/6"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 6 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>How to let the world find your Linux Server when using DHCP</H3>


<p><strong>From Jason Bailey 
</strong></p> 
<p align="right"><strong>Answered By  
<p></strong></p>

<h4 align="center"><br>  Abstract
</h4>
<BLOCKQUOTE>
Many of us have broadband connecting our Linux machines to the
Internet and would like to play around with our own webservers, but
for a variety of reasons are unable to get a static address. This
article should help you with publishing your Linux server's current
IP address to an ISP's web server.
</BLOCKQUOTE>

<h4 align="center"><br>  Introduction
</h4>
<BLOCKQUOTE>
I've wanted to have my own web server for many years. Partly because
I'm a geek who has a need to do things just because I can. But more
importantly, I've wanted to do it because many ISPs don't let you
play with cool stuff like databases, perl, php, python, etc.
</BLOCKQUOTE>
<BLOCKQUOTE>
So what's the big deal? You say. Set up a Linux box and you are good
to go. Well, it is that easy if you don 't care about sharing this
website with anybody else. My ISP won't give me a static IP for my
cable modem. So I thought, what if I could create a webpage on my
ISP's web server which would point to my web server? The game was
afoot! I began searching google.com and pestering the members of my
LUG (Linux Users Group) for ideas.
</BLOCKQUOTE>
<BLOCKQUOTE>
One of the most helpful articles I found was written for Linux
Gazette several years ago by Henry H Lu. I have followed a lot of
his basic ideas, though I have reduced the number of files used and
I've standardized on shell script as opposed to using both shell
script and perl. Henry does have a nice example of how to make the
FTP portion work with Geocities if you happen to be using them.
</BLOCKQUOTE>

<h4 align="center"><br>  Automating FTP
</h4>
<BLOCKQUOTE>
The file transfer protocol client interaction can be a bit difficult
to script if you are having to wait for prompts for username and
password. One way around these prompts is to use the .netrc file.
The layout for the file would be as follows:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
machine www.MyISP.com login JoeUser password Top$ecret
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
Please note that you must change this file to read/write owner only
when you create it. For more information about the .netrc file and
its uses do a man netrc at you command prompt.
</BLOCKQUOTE>

<h4 align="center"><br>  HTML File Template
</h4>
<BLOCKQUOTE>
I found that the easiest way to do this was create an HTML file
which has a placeholder everywhere I want the IP address to go. I
chose "~~~IP~~~" to be my placeholder since it stands out and I'd
never have it appear anywhere else in my document. The following is
an example of what you might use.
</BLOCKQUOTE>
<p align="center">See attached <tt><a href="../misc/tag/up.html_source.txt">up.html_source.txt</a></tt></p>

<h4 align="center"><br>  The Shell Script
</h4>
<BLOCKQUOTE>
I'll first show the script and then explain what each part does.
</BLOCKQUOTE>
<p align="center">See attached <tt><a href="../misc/tag/dhcp-myip.sh.txt">dhcp-myip.sh.txt</a></tt></p>
<BLOCKQUOTE>
First, we find the IP address using ifconfig on our WAN device (depending on
your setup it may be eth0, ppp0, etc)
and parse out all information we do not want. If you are not sure if you are
using eth0, eth1, ppp0, ppp1, etc you can
type ifconfig to see which devices you are currently running and look for the
</BLOCKQUOTE>
<BLOCKQUOTE>
one with a valid Internet IP address.
</BLOCKQUOTE>
<BLOCKQUOTE>
We save the IP address in the variable MyIP and in an ASCII file. Then we com
pare a file that contains the
current IP address and one that contains the IP address which we had the last
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQUOTE><CODE>
time the script ran. If these two
</CODE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
addresses are the same we are done. If they are different, we use take our up
.html_source file and replace ~~~IP~~~
with our current IP and store the results in up.html. Next we FTP th
e file
to our ISP. Finally, we copy our current IP to "MyIP.then" for future referen
ce.
</BLOCKQUOTE>
<BLOCKQUOTE>
Make sure you do a chmod +x to the script after you save it.
</BLOCKQUOTE>

<h4 align="center"><br>  Repeating the Process
</h4>
<BLOCKQUOTE>
After you have tested out the script, you'll probably want to have it run eve
ry five to fifteen minutes. You can easily to this
by adding a cron job. It is important that you run the cron job as the user w
ho has the files in his home directory and has the
FTP server information in his .netrc file.
</BLOCKQUOTE>

<h4 align="center"><br>  Conclusion
</h4>
<BLOCKQUOTE>
If you want to make your web server, which is on a dynamic IP address, easily
</BLOCKQUOTE>
<BLOCKQUOTE>
found by your friends and other. This script can
</BLOCKQUOTE>
<BLOCKQUOTE>
make it as easy for them to find your home server as going to <A HREF="http://www.MyIS"
	>http://www.MyIS</A>
P.com/~JoeUser/ip.html. The scripts are easy
to reconfigure to suite your needs. My next step is to write a PHP script tha
t will ping my IP address and if it gets a
response it would send you to the server. If no response was received, it wou
ld give a page that explains that the site it
down. I hope you find this as useful and fun as I did.
</BLOCKQUOTE>
<BLOCKQUOTE>
Jason Bailey
</BLOCKQUOTE>
<HR width="10%" align="left"><BLOCKQUOTE>
When I'm not at work doing system admin stuff, at school pursuing my Computer Science degree, at a Susitna Linux Users Group meeting or off doing freelance computer work, you can find me hanging out in beautiful Palmer, Alaska with my wife and kids.
</BLOCKQUOTE>

<!-- end 6 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/7"><HR WIDTH="75%" ALIGN="center"></A>
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>trouble w/ dual boot</H3>


<p><strong>From Jeferson 
</strong></p> 
<p></strong></p>

<p align="right"><strong>Answered By  Mike Orr, Heather Stern, John Karns
</strong></p>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
&lt;html&gt;&lt;head&gt;&lt;meta http-equiv='content-type' content='text/html;'&gt;
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
Aaaaargh 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">  allow me to quote my favorite wimpy, but totally virus proof
mailer --
</blockQuote>
<blockQuote>
[text/html is unsupported, treating like TEXT/PLAIN]
</blockQuote>
<blockQuote>
(somewhat after the fact, I note that there can be good reasons to do
this - foreign character sets maybe - but leave plaintext plain, okay?)
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Hey guys, how r ya doing huh ?
</STRONG></P>
<P><STRONG>
I'm having a little problem here with my OS, I've installed
Conectiva Linux in the Master HD and I had the MS windows installed
ins the Maste Slave hd, what can I do to have a graphical interface
or even an easier way to boot in the system, without having to go
to the system setup and change the boot order ...
</STRONG></P>
<P><STRONG>
Can ya help me ???
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Mike] 
Have you looked at the HOWTOs at www.linuxdoc.org?
<A HREF="http://www.linuxdoc.org/HOWTO/HOWTO-INDEX/howtos.html"
	>http://www.linuxdoc.org/HOWTO/HOWTO-INDEX/howtos.html</A>
Search for "Windows" and "Win" in the text.  There are several HOWTOs
about making Linux coexist with Windows.
</blockQuote>
<blockQuote>
Also poke around www.linuxnewbie.org for other information you might
find useful.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
I've already looked at the HOW-TOs and my problem is a bit different, there
is any way I can manage the boot, like... now I want to boot with Win32, I
just reboot the pc and choose MSWIN, later I'll be in a mood to boot with
Linux, then I reboot the system and choose LINUX, I've already tryied with
"system commander", the Grub... wait a second, isn't grub a graphical
interface for the LILO ? how can I change the configurations of the lilo,
where is it's configuration file?
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
<TT>/etc/lilo.conf</TT> is a text file that <TT>/sbin/lilo</TT> (a progam) uses to compose
LILO (the boot loader).  It's usually quite well documented in <TT>/usr/share/doc</TT>
somewhere, in a directory named either lilo, or lilo with a version number.
And in 'man lilo' plus those HOWTOs that Mike mentioned.
</blockQuote>
<blockQuote>
grub is not a GUI for LILO particularly; it's a boot loader in its own right.
But you can use it to point at LILO as a second stage if you want.
</blockQuote>
<blockQuote>
GAG, the initials are for the spanish words of "Graphical Boot Manager",
is an entirely GUI bootloader, and it <EM>is</EM> its own configurator
- that sounds a bit more like what you are really asking for.
The link's quite slow for me but might be a bit closer to your ISP there
in Brazil:
</blockQuote>
<blockQuote><BLOCKQuote>
<A HREF="http://www.rastersoft.com/gageng.htm"
	>http://www.rastersoft.com/gageng.htm</A>
</BLOCKQuote></blockQuote>
<blockQuote>
Gujin is another alternative bootloader, it's supposed to be smart enough
to look for bootable drives or kernels on its own, so it doesn't need setup:
</blockQuote>
<blockQuote><BLOCKQuote>
<A HREF="http://gujin.sourceforge.net"
	>http://gujin.sourceforge.net</A>
</BLOCKQuote></blockQuote>
<blockQuote>
But if I misinterpreted what you want, there are GUI tools which run
under X to help you set up <TT>/etc/lilo.conf</TT> - among them Glilo (GTK), Klilo,
lilo-config, or BootRip.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
Also, later versions of lilo have a gui-like interface which offer a menu
with a 'point &amp; shoot' menu-bar.  BTW, even the older lilo versions offer
a "menu" of sorts, if you press the '?' key at the boot prompt, which will
display a list of available choices; although you still have type the
selection rather than "point &amp; shoot".  Even this can be minimized by
using a short label in your lilo.conf:
</blockQuote>
<p align="center">See attached <tt><a href="../misc/tag/jkarns.lilo.txt">jkarns.lilo.txt</a></tt></p>
<blockQuote>
If your machine is fast enough and has ample memory, you might also
consider installing VMWare, and avoid having to reboot.  Although if
you're a gamer, it might not offer what you want.  Anyway, they are
offering an "express" version for $50, which isn't so expensive.  I've
been very happy with the software, but it's running on a 700 Mhz machine
with 128 MB of RAM.  Even w2k runs fast enough to be satisfactory.  I also
purchased a copy to run on a 500 Mhz <TT>/</TT> SCSI machine which is a bit slower,
but still tolerable.  A 380 Mhz <TT>/</TT> IDE <TT>/</TT> 64 MB machine is also usable, but
a bit too slow to be pleasureable.
</blockQuote>
<blockQuote>
There are other products available both commercial (e.g., Win4Lin) and GPL
(Wine).  Re: wine, it is indeed a formidable task to emulate an entire API
on a foreign OS.  They deserve lots of credit for getting as far as they
have, but it's still alpha.  I haven't looked at Win4Lin so can't comment,
except to say that I believe that VMWare is the most mature product in
this venue.  BTW, they also offer a version for w2k <TT>/</TT> NT to host Linux,
but since I think that Linux is the more stable OS, it seems a better idea
to use Linux as the host 
<IMG SRC="../gx/dennis/smily.gif" ALT="=:&lt;)" 
		height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
Well if he <EM>is</EM> a gamer, I really think he ought to look at Transgaming
(<A HREF="http://www.transgaming.com"
	>http://www.transgaming.com</A>)
and see if their <A HREF="http://www.winehq.com/">WINE</A> + ActiveX solution works for his games.  I saw a demo
at LWE and it ran Diablo for MSwin directly; I was impressed.
</blockQuote>
<blockQuote>
Lilo also supports a value called "alias" and if you make it a single
character then you can even get one-tap loading.  Here's about the
simplest example that works -- assuming you have the world's plainest
configuration, basically, C: at the start, "all one big slash" for the
second partition with a linux kernel named "vmlinuz" at its root,
your swap partition invisible at the end, and no framebuffers or other
hardware oddities requiring an "append=" line. <TT>/vmlinuz</TT> could be a symlink
to wherever you really keep your kernels, if you prefer.
</blockQuote>

<blockquote><pre>boot=/dev/hda2
single-key
image = /vmlinuz
  label = linux
  alias = 1
other = /dev/hda1
  label = dos
  alias = 2
</pre></blockquote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
PS: Sorry about the HTML
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
That's okay, now you know 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
</STRONG></P>
<P><STRONG>
Thankx
<br>Jeferson
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
You're welcome
</blockQuote>

<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/8"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 1 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>HOWTO find a good laptop</H3>


<p><strong>From William Thornton 
</strong></p> 
<p></strong></p>

<p align="right"><strong>Answered By  Heather Stern, Faber Fedor, John Karns, Mike Orr
</strong></p>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Just wondering if you can point me to any good web resources on what
laptop hardware is currently supported under linux. What I've been able
to find are how-to's (as in how to install linux on a laptop. And these
seem to be out of date. You can't even buy the models listed anymore.)
Any help would be greatly appreciated. Thanks.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
One of the originals - and most extensive - was Kenneth Harker's
"Linux on Laptops".
</blockQuote>
<blockQuote>
It was at utexas.edu, but that URL has since changed, and unfortunately
I don't have the updated one.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber]
</blockQuote>

<blockQuote><ul>
<LI>Go to <A HREF="http://www.google.com"
	>http://www.google.com</A>.


<LI>Type "linux laptops" in the search field.


<LI>Click on the first link.
</ol></blockQuote>
<blockQuote>
For those of you watching at home, the link is, of course...
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
... Kenneth Harker's site full of links to personal testimony
and other resources:
<A HREF="http://www.linux-laptop.net"
	>http://www.linux-laptop.net</A>
</blockQuote>
<blockQuote><DL><DT>
Or Werner Hauser's Mobilix:
<DD><A HREF="http://www.mobilix.org"
	>http://www.mobilix.org</A>
</DL></blockQuote>
<blockQuote>
Alternatively you could cheat, and buy a laptop from a vendor that sells
laptops pre-loaded with Linux...
</blockQuote>
<blockQuote>
Distros have gotten better about being able to be installed on a laptop;
the rise of laptops with accessible CD bays has helped a lot too.
</blockQuote>
<blockQuote>
The important thing to know is that you should consider your parts of
hardware <EM>individually</EM> when looking at buying a laptop.  Model names and
numbers themselves are immaterial, except that those may make it easier
to find fellow users of the same hardware.  Yes, the same real manufacturers
sell through many vendors, with the exception of a few giants like Sony and
IBM that build their own stuff.
</blockQuote>
<blockQuote>
USB
</blockQuote>
<blockQuote>
pretty much no problem.  The command 'lspci' can tell you if you have UHCI or OHCI,
then you can load up the right one and rock on.
</blockQuote>
<blockQuote>
Infrared
</blockQuote>
<blockQuote>
Find out what chipset it has (this is harder than it looks, just
"fast" doesn't cut it).  Linux supports several but to get Fast IR
you need to know which kind, and it needs to be one of the small
handful we handle.  Mobilix has good info.
</blockQuote>
<blockQuote>
Mouse
</blockQuote>
<blockQuote>
luckily most mice are just PS/2;  there are a few synaptics style
touchpads out there, that have a PS/2 compatible mode anyway.  Those
"jogdial" things Sony has need a special program, but we have one.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
... and now those of the USB variety are available.  I have been using one
for the past few months, since I purchased a Dell Inspiron.  This allows
using an external keyboard which helps to make the laptop a better
replacement for a desktop.  That way I can use both an external mouse and
keyboard, and still have the serial port free for an external modem should
I choose to use one.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
Video card
</blockQuote>
<blockQuote>
If you're planning to slash the bleeding edge, you really have to
be sure on this one.  It's one of the parts you cannot easily
replace!  Note that some manufacturers throw their own cheap X
servers together - check into them further and see if they are
going the XFCOM route (which eventually leads to the source being
merged with XFree, when the card is yesterday's news) or staying
proprietary.  And whether they need a kernel module to support GL
and/or acceleration.  (hey, that'd be sweet.  But I wouldn't bet
on finding that.)  If you're a gamer, check if the video has proper
texturing support.  Many don't.
</blockQuote>
<blockQuote>
Also, X 4.1 is getting there, but there still might be a few cards
better supported under X 3.3.6.
</blockQuote>
<blockQuote><DL><DT>
Driver Status for XFree86[tm] 4.1.0
<DD><A HREF="http://www.xfree86.org/4.1.0/Status.html"
	>http://www.xfree86.org/4.1.0/Status.html</A>
</DL></blockQuote>
<blockQuote>
For libvga I always recommend trying the VESA setting before giving
up.  And setting the VesaSave value to a different number can help
solve if it's coming out with a text mode that puts your cursor below
the screen  
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
I had a rough time with the Inspiron - the only way I could get X to work
was by DL'ing the XF86Config file from the mfr's Internet site; and I have
yet to get it to work for other resolutions than 1400 x 1050.  Even though
they offer several to cover various resolutions, they did a very poor job
- some were just duplicates under different names.
</blockQuote>
<blockQuote>
Be careful of the ATI r128 chip series.  There are around 10 different
variations of that chip, designated as r128 SM, r128 RE, etc., and they
are not compatible; so check the X docs to verify that the chip is
supported - or better yet verify that the chip is indeed the same as one
of the models mentioned on one of the Linux laptop sites, i.e. that it
has not been changed by the mfr for the currently shipping models.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather]
ATI is actually rather infamous in the community for generating
new troubles with every minor BIOS and circuitboard revision.
That problem is not at all limited to laptops 
<IMG SRC="../gx/dennis/unsmily.gif" ALT=":(" 
		height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
Your monitor
</blockQuote>
<blockQuote>
Sounds odd, but yes, this needs to be considered seperately.
</blockQuote>
<blockQuote>
Try to get X modelines from someone else who has the same screen.
They don't need to be from the same distro, and in fact, you can
steal modelines from an XF86Config that's meant for version 3 and
use them on version 4 just fine.  You <EM>cannot</EM> steal the whole file
and use it though - the format has changed a bit.  Put your modelines
in the Monitor section, in either case.
</blockQuote>
<blockQuote>
Sound
</blockQuote>
<blockQuote>
You actually have a pretty good chance here.  So far lspci has always
been good for me at coughing up what chipset the sound is, and after
that it's easy to look up.  (This doesn't work on older models that
have ISA sound, but you're talking about new machines here.) The
important tidbit is, there are three different ways to get sound
support working, and you only need one of them to work.  In order of
preference, it can be a normal kernel module, the ALSA project
probably has drivers for you, or you can use OSS.  <A HREF="http://www.suse.com/">SuSE</A> makes sound
setup easy.  Your distro may vary.
</blockQuote>
<blockQuote>
<A HREF="http://www.alsa-project.org"
	>http://www.alsa-project.org</A>
</blockQuote>
<blockQuote>
Ethernet
</blockQuote>
<blockQuote>
Usually isn't much of a problem.  lspci should tell you what it is,
then just load the right module.  In fact lspci is usually better
than the box for telling what's in it;  many manufacturers are
licensing chipsets these days.
</blockQuote>
<blockQuote>
If you have a builtin modem...
</blockQuote>
<blockQuote>
Ouch.  Most of these are winmodems, er, 'scuse me, "controllerless".
In other words they are born missing one or two of the three core
chips that make a real modem work.  For anyone who's been under a
rock for the last few years, that means that they are "easily
upgradable" but also cheap and prone to breaking down under heavy
CPU load.
</blockQuote>
<blockQuote>
I list the ones mentioned at linmodems.org here, because many of
the projects have moved recently.  The linmodems links still work
too.
</blockQuote>
<blockQuote>
Don't be afraid to buy a PCMCIA card to replace these.  Nobody
will blame you.  But <EM>do</EM> check the resources at linmodems before
buying a card - some folks have been burned by PCMCIA softmodems,
those pretty much don't work for us.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
In my case, I had to DL the pcmcia pkg from the 'net and install it
separately after installing SuSE 7.1 due to a quirk with the newer TI
PCI4451 PC card Cardbus Controller chip that the machine uses.  Trying to
use the SuSE packaged version would hang the machine.  This was explained
in one of the pages about my machine referenced from the harker site.
</blockQuote>
<blockQuote>
Also, one can check the docs that are pkg'd with the pcmcia stand-alone
pkg.  There has in the past been a document included which lists the cards
known to work, with the caveat that card mfr's sometimes change the chips
inside the cards without changing the model designation - it's rare but
not unheard of, so you can find yourself with a card that doesn't work,
even though it's on the compatible list.  I've had pretty good luck with
Xircom in the past - a CEM33/10 and a CEM56/100 which both have a full
modem implementation rather than a winmodem (the only people who 'win' are
the mfr and Microsoft 
<IMG SRC="../gx/dennis/unsmily.gif" ALT=":-(" 
		height="24" width="20" align="middle"> ).
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather]
</blockQuote>

<blockQuote><ul>
<LI>IBM Mwave works fine, they have a GPL'd project.

	<A HREF="http://www-124.ibm.com/acpmodem"
	>http://www-124.ibm.com/acpmodem</A>

<LI>Intel's HaM driver seems to have a BSDish license (yes, with source).

	<A HREF="http://developer.intel.com/design/modems/support/license/r-333-5.htm"
	>http://developer.intel.com/design/modems/support/license/r-333-5.htm</A>




<LI>For Motorola's SM56 they have shut down making softmodems, but still
provide the driver.  They built it under RH 7.1 so use a 2.4 kernel.
You can consider this modem doomed, since it's a binary driver and
Linus has long since stated that binary only drivers will be allowed
to break and no kernel developer will ever cry a tear about it.


	<A HREF="http://e-www.motorola.com/products/softmodem/support/software.html"
	>http://e-www.motorola.com/products/softmodem/support/software.html</A>


<LI>Lucent's Microelectronics Group has been spun off to be called
Agere Systems, and they have a page with sources now, as well as
pointers to packages for a handful of distros. Use this for anything
calling itself an LTmodem, which may include some Xircoms.  There are
also other projects playing with LTmodems as their target hardware (see
the linmodems page), so you have more than one thing to try too.  At
least this modem will work.

	<A HREF="http://www.physcip.uni-stuttgart.de/heby/ltmodem"
	>http://www.physcip.uni-stuttgart.de/heby/ltmodem</A>
</ul></blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
These are perhaps the most ubiquitous of winmodems, and some say offer the
best chance of working under Linux.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather]
</blockQuote>

<blockQuote><ul>
<LI>PCTel's modem drivers have no source but they seem to be keeping
up via an unofficial site managed by Jan Stifter.

	<A HREF="http://www.medres.ch/~jstifter/linux/pctel.html"
	>http://www.medres.ch/~jstifter/linux/pctel.html</A>

<LI>Conexant used to be hopeless but some French company named Olitec came
up with something anyway.  Binary, of course.  And only for a few 2.2.x
kernels, no sign of a 2.4.x version.  Sigh.  (site in French)

	<A HREF="http://www.olitec.com/pci56kv2.html"
	>http://www.olitec.com/pci56kv2.html</A>

<LI>The linmodems page has drivers for the ESS and Ambient Tech chipsets.

<LI>3com/USR softmodems, as of this writing, are hopeless.  I checked 3com's
site but it's painful to wander around in.
</ul></blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
Dell was shipping two versions which they were designating as mini-pci
3com ether combo cards.  The one that was shipped in my machine is known
under the name of Actiontel, and has an LTModem paired with an Intel
eepro-100 ethernet chip - luckily for me both components are Linux
compatible; probably because they were offering machines pre-installed
with Linux.  They have since changed their policy and are no longer
offering pre-installed Linux, except on their servers.  Consequently they
are now shipping one of the modem chips mentioned above, which people
don't seem to having much luck with, and many have bought a pcmcia card to
use instead.  However, there are two items of interest in this regard,
IMO:
</blockQuote>

<blockQuote><ol>
<LI>many of the pcmcia cards seem to run quite warm, even hot - especially
the ether / modem combos cards, which adds extra heat to your laptop, and
also means more battery drain.


<LI>many laptops are implementing the ether / modem combo cards for the
mini-pci slot connector which is also being offered on many desktop style
mobos.  This connector very much resembles the one used for the type of
memory module (so)dimms currently being used.  Thus if desired it is
possible to purchase one of these from an after market 3rd party and
replace an incompatible card with one that is Linux compatible.
</ol></blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
Did I miss anything?
</blockQuote>
<blockQuote>
Oh, probably.  But if you have a feature listed that you're
wondering about, try Google! Linux (<A HREF="http://www.google.com/linux"
	>http://www.google.com/linux</A>
- and do NOT put a slash on the end) and type in the buzzword
or chipset.  Chances are good you'll find something on it.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
... not too much!
</blockQuote>
<blockQuote>
Just one more thing.  We need to make the hardware co's more Linux
cognizant.  Be sure to mention that you're buying the machine because you
have reason to believe that it is Linux compatible, and if it wasn't you
wouldn't be purchasing from them!  Also mention any items that you know
not to be compatible, such as the winmodem.  Express your interest that
they consider increasing their Linux support in the future.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
Wow! I thought I MIGHT get one answer to my question. Instead I get
three very good answers.  The info at linux-laptops.net seems to be
much more up to date than what I'd been finding.
</STRONG></P>
<P><STRONG>
Thanks! I should be pretty well armed with info
for my next trip to the computer store.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Mike] 
Thanks for the encouragement.
</blockQuote>

<!-- end 8 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
        of <I>Linux Gazette</I>
<a href="http://www.linuxgazette.com/copying.html"
        >Copyright &copy;</a> 2001
<BR>Published in issue 71 of <I>Linux Gazette</I> October 2001</H5>
<H6 ALIGN="center">HTML script maintained by
        <A HREF="mailto:star@starshine.org">Heather Stern</a> of
        Starshine Technical Services,
        <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->

<center>
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.jpg">
More 2&cent; Tips!</A></H1> <BR>
<!-- BEGIN tips -->

Send Linux Tips and Tricks to <A HREF="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</A></center>
</center>
<UL>
<!-- index_text begins -->
<li>Tech tips from
	<A HREF="http://noframes.linuxjournal.com/subscribe/lja-sub.html"
		><I>Linux Journal's</I> Weekly News Notes</A>
	<ul>
	<li><A HREF="#tips/0a">Private domains</a>
	<li><A HREF="#tips/0b">On-line dictionary</a>
	<li><A HREF="#tips/0c">Telnet via http</a>
	<li><A HREF="#tips/0d">Changing the title bar on an xterm</a>
	<li><A HREF="#tips/0e">Running BIND as non-root</a>
	<li><A HREF="#tips/0f">HTML Tidy</a>
	<li><A HREF="#tips/0g">Moving Internet services among servers</a>
	</ul>
<li><A HREF="#tips/1"
	><strong>sendmail 2c TIP * 2</strong></a>
<li><A HREF="#tips/2"
	><strong>About Converting Image Files</strong></a>
<li><A HREF="#tips/3"
	><strong>While in hack mode...</strong></a>
<li><A HREF="#tips/4"
	><strong>xshowrgb (xcolorsel replacement)</strong></a>
<li><A HREF="#tips/5"
	><strong>re: kernel compilation error in issue 70</strong></a>
<li><A HREF="#tips/6"
	><strong>Tarpit</strong></a>
<li><A HREF="#tips/7"
	><strong>Monitoring log files in real time</strong></a>
<li><A HREF="#tips/8"
	><strong>HSP Micromodem</strong></a>
<li><A HREF="#tips/9"
	><strong>Query about Makefile</strong></a>
<li><A HREF="#tips/10"
	><strong>Re: linux signwriting programs</strong></a>
<!-- index_text ends -->
</UL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/0"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">LJ Tech Tips</FONT></H3>
September 2001

<h4 align="center"><a name="tips/0a">Private domains</a></h4>
<P>
If you give an example hostname in documentation or as part of your
answer in an on-line forum, use one of the safe domains listed in RFC
2606. example.com, example.net and example.org are not assigned to
anyone, so you can safely use them in examples without someone's
actual server getting slammed if a reader takes you literally.
</P>
<HR width="10%" align="center">
<h4 align="center"><a name="tips/0b">On-line dictionary</a></h4>
<P>
When someone says you're "meretricious", that's a compliment, right?
Not necessarily. Save yourself a trip to the library with the
easy-to-use dict utility by Rik Faith, available on the dict.org web
site:
<A HREF="http://www.dict.org/links.html"
	>http://www.dict.org/links.html</A>
</P>
<P>
The Dictionary Server Protocol is RFC2229
</P>
<P><DL><DT>
Or use Merriam-Webster's dictionary:
<DD><A HREF="http://www.m-w.com"
	>http://www.m-w.com</A>
</DL></P>
<HR width="10%" align="center">
<h4 align="center"><a name="tips/0c">Telnet via http</a></h4>
<P>
If you can only do HTTP from work and want to send resums from your
shell account, check out GNU httptunnel. It encapsulates any TCP
connection in an HTTP connection, so it will work through an
application-level proxy.
</P>
<P>
(PPP over ssh over httptunnel is left as an exercise for those readers
who really want to give the corporate security pigs the finger.)
</P>
<P><DL><DT>
You can get more information from Nocrew.org:
<DD><A HREF="http://www.nocrew.org/software/httptunnel.html"
	>http://www.nocrew.org/software/httptunnel.html</A>
</DL></P>
<P><DL><DT>
or from GNU.org:
<DD><A HREF="http://www.gnu.org/directory/httptunnel.html"
	>http://www.gnu.org/directory/httptunnel.html</A>
</DL></P>
<HR width="10%" align="center">
<h4 align="center"><a name="tips/0d">Changing the title bar on an xterm</a></h4>
<P>
"xterm" isn't a very helpful window bar title for an xterm. You can
put extra information in the title bar, however, with escape
sequences. For example, this repeats your shell prompt both in the
title bar and the command line:
</P>
<P><BLOCKQuote>
export PS1="\[\033]0;$PS1\007\]$PS1"
</BLOCKQuote></P>
<P><DL><DT>
For more xterm title bar customization, see the Bash Prompt HOWTO by Giles Orr:
<DD><A HREF="http://www.shelluser.net/~giles/bashprompt/howto/xterm-title-bar-manipulations.html"
	>http://www.shelluser.net/~giles/bashprompt/howto/xterm-title-bar-manipulations.html</A>
</DL></P>
<HR width="10%" align="center">
<h4 align="center"><a name="tips/0e">Running BIND as non-root</a></h4>
<P>
One of the main rules of security is "Don't run anything as root that
you don't have to." To run BIND as a non-root user, first create a
user and group "named", then add the -u (user) and -g (group) options
to the init script for BIND.
</P>
<P>
On some distributions the init script is called "bind" and on others
it's called "named".
</P>
<P>
For example, in <A HREF="http://www.debian.org/">Debian</A>, change the "start-stop-daemon" line in
<TT>/etc/init.d/bind</TT> to:
</P>
<P><CODE>
start-stop-daemon --start --quiet --exec /usr/sbin/named -- -g named -u named
</CODE></P>
<HR width="10%" align="center">
<h4 align="center"><a name="tips/0f">HTML Tidy</h4>
<P>
Got old web pages that are so messy you just stick a couple of extra
&lt;/table&gt; tags on the end and hope for the best? Try HTML Tidy, the
pretty-printer for HTML, available from the HTML Tidy web site:
<A HREF="http://www.w3.org/People/Raggett/tidy"
	>http://www.w3.org/People/Raggett/tidy</A> or your favorite Linux packages
site.
</P>
<P>
HTML Tidy fixes common HTML mistakes and puts everything in an
easy-to-edit format. The author claims it does a good job of stripping
excess markup from Microsoft Word documents saved as HTML, too.
</P>
<HR width="10%" align="center">
<h4 align="center"><a name="tips/0g">Moving Internet services 
				among servers</a></h4>
<P>
To keep the flexibility of moving services from one system to another
without reconfiguring all the clients, it's a good idea to set up
CNAME records in your DNS. Some good examples are "pop", "smtp",
"news", "shell" and "webproxy"--that way you can move the outgoing
mail server or the Squid server to its own host without having to
reconfigure all the clients.
</P>
<P>
But with the increasing number of mobile users, don't make the mistake
of, for example, setting client software to only use "smtp" and "pop"
for their mail. Fully qualify the domain name, so that when they take
their laptops to the leetconference.com network, they don't end up
trying to send their mail through smtp.leetconference.com by mistake,
and get it bounced back for attempted spamming. Configure client
software for CNAMEs like smtp.internal.example.com.
</P>

<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">(sendmail 2c TIP) * 2</FONT></H3>
Thu, 13 Sep 2001 18:50:56 -0700
<BR>Guy Milliron (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%231">The Answer Gang</a>)

<P>
2c TIP:  Sendmail ignores everything after a plus symbol in a
username field of an email address.  Hence if while cruisin the Wild
Wide Waste, you come across something that needs your email
address, you and put in <B>USER+comment@domain.com</B>    When
you get mail/UCE/Spam to that address, you'll know who sold it, or
put it on a web page and a spider ran across it.  Even works on
webpages when you want to put a "Mail Me" link.  At least you
know a spider harvested your address.
</P>
<P>
Which leads into another 2c TIP.  I use <TT>/etc/aliases</TT> file to control
my mail.  Like I could alias "fubar" to my normal email account
"guy". If for some reason I get a lot of spam from that email
address "fubar" - I would just delete the alias "fubar" from the file,
and the "account" is gone, but my normal email address is intact
for my friends to use.
</P>
<P>
I do this with my clients that I host for.  I inform them of the
benefits of aliasing, and then offer each account they have up to 3
aliases.
</P>
<P>
<EM>Smile</EM>
<br>--
<br>Guy Milliron
</P>

<!-- sig -->


<!-- end 1 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">A 2 Cent About Converting Image Files</FONT></H3>
Sat, 8 Sep 2001 18:04:03 -0500
<BR>Chris Gianakopoulos (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%232">The Answer Gang</a>)

<P>
Hello Answer Gang,
Sometime this week, I noticed that somebody was asking about how to
automating the Gimp so that it could convert image file formats from one
format into another from the shell command line.
</P>
<P>
I cannot remember who it was, because I lost the email, thus, I'll post
this message and hope that the person will see my posting.
</P>
<P>
The ImageMagick tools will do the trick.  They have a utility called
"convert" that can do the necessary conversions from the command line.
</P>
<P>
I must give credit to the author of the article.  Her name is Katja
Socher, and the URL is
<A HREF="http://www.linuxfocus.org/English/July2001/article211.shtml"
	>http://www.linuxfocus.org/English/July2001/article211.shtml</A>.
   Her article is entitled "Do magic with images on the shell".  She
shows all kinds of cool things that can be done with ImageMagick.
</P>
<P>
I just stumbled on the article, and by coincidence, I was also trying to
find a tool to convert images from one format into another.  Of
ImageMagick can do much more than convert images.
</P>
<P>
Chris Gianakopoulos
</P>

<!-- sig -->


<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">While in hack mode...</FONT></H3>
Sat, 15 Sep 2001 15:28:55 +0000
<BR>Ben Okopnik (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%233">The Answer Gang</a>)


<P>
Back in LG#60, one of our readers ("Roy") posted a little Tcl/Tk script
to TAG - in effect, this thing pops up a little 'sticky note' with a
message, and goes away when it's clicked. I saved it, and put it to use
occasionally - it's a rather useful toy. A few minutes ago, however,
I happened to glance at the code, and noticed that there was a "dead"
section in there, code that was supposed to execute but didn't. So,
having fixed it and added a usage message, here's the 'New and Improved'
version of the script I called "3m" for semi-obvious reasons:
</P>
<p align="center">see attached 
<a href="misc/tips/sm.tcl.txt">misc/tips/sm.tcl.txt</a></p>

<P>
Contrary to the original author's statement, "funny characters" (shell
metacharacters) can indeed be used in the message; simply enclose the
entire message in single quotes.
</P>
<P><CODE>
# This displays the message and saves it with a timestamp
<BR>3m - Lunch with Liana, 1:00-2:00pm Sunday &amp;
</CODE></P>
<P><CODE>
# Oh-oh - here come those funny characters!
<BR>3m 'Watch out for <EM>Larry</EM>, &amp;Moe&amp;, and %Curly%!!!' &amp;
</CODE></P>
<P>
Tcl/Tk will simply display the quoted text enclosed in curly braces.
Also, note the (unquoted) '&amp;' at the end of the line - this puts
the process in the background, and allows you to continue using your
xterm... perhaps to launch more 'sticky notes'. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</P>

<!-- end 3 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">xshowrgb (xcolorsel replacement)</FONT></H3>
Mon, 17 Sep 2001 15:52:11 +1200 (NZST)
<BR>Ryurick M. Hristev (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%234">r.hristev from phys.canterbury.ac.nz</a>)

<P>
Hello,
</P>
<P>
For your 2c Tips page:
</P>
<P><BLOCKQuote>
Attached is an perl script as a xcolorsel replacement
(xcolorsel doesn't work on X11R6).
</BLOCKQuote></P>
<P>
Require the perl-Tk package
(RedHat users may find it on the Developer Module Archive disk).
</P>

<p align="center">see attached 
<a href="misc/tips/xshowrgb.perl-tk.txt">misc/tips/xshowrgb.perl-tk.txt</a></p>
<P>
Cheers,
<br>--
<br>Ryurick M. Hristev
</P>

<p><em>I usually use xcolors or gcolorsel, myself.  With the caveats that 
xcolors creates a <b>huge</b> window and gcolorsel requires GNOME, they're 
enough for me to get a quick eyeball on the named color I want to use.  
-- Heather</em></p>

<!-- end 4 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">re: kernel compilation error in issue 70</FONT></H3>
Tue, 11 Sep 2001 00:12:55 -0400
<BR>Kenneth Veith (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%235">kencv from coil.com</a>)

<P>
Hi,
</P>
<P>
I ran into similar problems. The following, from RedHat's
site, fixed the problem for me.
</P>
<h4>
7.1 Compiling a kernel from source in <A HREF="http://www.redhat.com/">Red Hat</A> Linux 7
</h4>
<P>
For various reasons, gcc is no longer able to compile the kernel from
source because it uses the 2.96 version of the GNU C
Compiler. However, it is still easy to compile your kernel, as version
2.91.66 of the egcs C compiler has been included with the
distribution. Please note that the details involved with compiling a
kernel are not covered here. For more information please read
the Linux Kernel HOWTO at
<A HREF="http://www.redhat.com/mirrors/LDP/HOWTO/Kernel-HOWTO.html"
	>http://www.redhat.com/mirrors/LDP/HOWTO/Kernel-HOWTO.html</A>. This document
is assuming
you have a basic grasp of what is necessary to compile a kernel and
simply cannot get the @$&amp;%@$@*% thing to compile in Red
Hat Linux 7. This information only applies to pristine source,
downloaded from a site such as kernel.org, as the changes necessary
to compile have already been made to the source from the
kernel-source-2.2.16-22.i386.rpm package.
</P>
<P>
After downloading and extracting the source in <TT>/usr/src</TT>, cd
to/usr/src/linux and open the Makefile in your favorite editor. You will
need to look for a line similar to this:
</P>
<Pre>
CC      =$(CROSS_COMPILE)gcc -D__KERNEL__ -I$(HPATH)
</Pre>
<P>
This line specifies which C compiler to use to build the kernel. It
should be changed to:
</P>
<Pre>
CC      =$(CROSS_COMPILE)kgcc -D__KERNEL__ -I$(HPATH)
</Pre>
<P>
for Red Hat Linux 7. The kgcc compiler is egcs 2.91.66. From here you
can proceed with the typical compiling steps.
</P>
<DL><DT>
The url for this is
<DD><A HREF="http://www.redhat.com/support/docs/gotchas/7.0/gotchas-7-7.html#ss7.1"
	>http://www.redhat.com/support/docs/gotchas/7.0/gotchas-7-7.html#ss7.1</A>
</DL>
<P>
Hope this helps.
<br>Kenneth Veith
</P>

<!-- end 5 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Tarpit</FONT></H3>
Thu, 20 Sep 2001 11:03:21 -0700
<BR>Mike Orr (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%236"><em>LG</em> Editor</a>)

<P>
Here's a tar pit program that sits on unused IP addresses and plays
with Internet worms.
</P>
<P>
<A HREF="http://www.threenorth.com/LaBrea"
	>http://www.threenorth.com/LaBrea</A>
</P>
<P>
Courtesy <A HREF="http://www.slashdot.org/">Slashdot</A>.
-- Mike
</P>


<!-- end 6 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/7"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Monitoring log files in real time</FONT></H3>
Thu, 20 Sep 2001 13:06:48 -0700
<BR>Mike Orr (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%237"><em>LG</em> Editor</a>)


<P>
When you're debugging a program that writes error messages to a log
file, run "<tt>tail -f LOGFILENAME</tt>" in another
window.  You'll see the error messages immediately when they
occur.
</P>
<P>
If it's hard to distinguish the lines referring to the latest error,
press Enter a few times in that window.  That won't affect the file,
but it will put a few blank lines on the screen.  Then it will be easy
to see where the next error message starts.
</P>
<P>-- Mike
</P>

<!-- end 7 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">HSP Micromodem</FONT></H3>
Mon, 10 Sep 2001 21:58:22 -0500 (COT)
<BR>John Karns (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%238">The Answer Gang</a>)

<P>
JJ asked:
</P>
<P><STRONG>
Pie ChartsHi all,
I'm desperately looking for a driver for my HSP56 Micromodem, a device
integrated on my Mainboard.
Could you suggest some site to download it?
</STRONG></P>
<P>
Try searching for "linmodem" with your favorite search engine - I usually
favor google for Linux related searches.  There is a site dedicated to
information regarding setting up modems under Linux, and is called
something like www.linmodem.org.  I can't remember whether it's .org or
.net, or something else.
</P>
<P>
-- John Karns 
</P>

<dl><dt>It's plural, and .org ...
<dd>if anything calls itself an "HSP" 
	"HSF" or "HCF" modem, this is the place to see if linux hates
	it or can deal with it.  -- Heather
<dd><tt><a href="http://www.linmodems.org/">http://www.linmodems.org/</a></tt>
</dl>


<!-- end 8 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/9"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Query about Makefile</FONT></H3>
Tue, 18 Sep 2001 22:10:39 -0500
<BR>Chris Gianakopoulos (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%239">The Answer Gang</a>)

<P>
Amol wrote:
</P>

<P><STRONG>
Hello everybody ,
</STRONG></P>
<P><STRONG>
I am new to this Linux field . I just want to
know all information about Makefile concept used  for
compling and configuring Linux kernel .
Where can I get good resource about Makefile ?
</STRONG></P>
<P><STRONG>
amol
</STRONG></P>
<P>
Hi Amol,
I read a book entitled "Mastering Make, A Guide to Building Programs on
DOS, OS/2, and Unix Systems" by Tondo, Nathanson, and Young.  The ISBN is
ISBN 0-13-121906-5.
I suspect that the O Reilly book about make is also good.
</P>
<P>
Hope that helps,
<br>Chris Gianakopoulos
</P>

<!-- end 9 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/10"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Re: linux signwriting programs</FONT></H3>
Tue, 4 Sep 2001 10:11:42 -0700
<BR>Mike Orr (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2071%5D%202c%20Tips%20%2310"><em>LG</em> Editor</a>)

<P>
Steve Gosden wrote:
</P>
<P><STRONG>
PLEASE SEND ME TO A SITE WHERE I CAN DOWNLOAD A SIGNWRITING PROGRAM THAT
USES LINUX.
<br>REGARDS STEVE
</STRONG></P>

<!-- sig -->

<P>
The 'banner' program prints large ASCII banners.  On <A HREF="http://www.debian.org/">Debian</A> it's
<TT>/usr/games/banner</TT>, part of the standard 'bsdmainutils' package.
</P>
<P>
If that program isn't suitable, tell us more about what kinds of signs
you're trying to make.
</P>
<P>
Do any Answer Gang members have recommendations for making signs with
colors or signs with graphics?
</P>

<p><em>You could try one of these:</em></p>
<em>
<ul>
<li>AAType - like banner, only uses AAlib and truetype fonts to make it
	look cool: 
<br><tt><a href="http://w1.520.telia.com/~u52013156/aatype.html"
	>http://w1.520.telia.com/~u52013156/aatype.html</a></tt>
<li>gozer - another truetype text banner thingy:
<br><tt><a href="http://linuxbrit.co.uk/gozer/"
	>http://linuxbrit.co.uk/gozer/</a></tt>
<li>figlet is especially handy, it comes with most distros:
<br><tt><a href="http://ianchai.50megs.com/figlet.html"
	>http://ianchai.50megs.com/figlet.html</a></tt>
<li>and if he means "normal" signs ... as long as your printer is up to 
	it, there is OF COURSE my favorite, The Gimp.  Pretty darn easy to
	tell it you want 250 point fonts.  It isn't trying specially to be
	"Print Shop Deluxe" ... aiming more for Photoshop really ... but
	you can do just about anything with it.
<br><tt><a href="http://www.gimp.org">http://www.gimp.org</a></tt>
<li>If it was one of those banner/greeting card/calendar etc. programs
	you wanted then maybe Chilliware's IceSculptor would work for
	you.  As far as I can tell Chilliware itself is unreachable
	(were they bought by someone?) but it's pretty easy to find their
	boxed product in various e-stores, at least right now.  I can't
	give you any info about how easy it is to install, etc.
</ul>
</em>
<p><em>-- Heather</em></p>
</em>

<P>
Long ago on the VAX/VMS mainframes we used to make ASCII-art signs that showed
Snoopy holding a sign with your text on it.  Since the printer used that
tractor-fed paper, it was easy to make a wide sign.  The program might have
been called 'banner'.
</P>

<p><em>We had them in my old PDP-11 days, certainly. -- Heather</em></p>

<!-- end 10 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
	of <I>Linux Gazette</I> 
<a href="http://www.linuxgazette.com/copying.html"
	>Copyright &copy;</a> 2001
<BR>Published in issue 71 of <I>Linux Gazette</I> October 2001</H5>
<H6 ALIGN="center">HTML script maintained by
	<A HREF="mailto:star@starshine.org">Heather Stern</a> of
	Starshine Technical Services,
	<A HREF="http://www.starshine.org/">http://www.starshine.org/</A> 
</H6>
<!-- *** END copyright *** -->

<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">A Need for Documentation</font></H1>
<H4>By <a href="mailto:matthiasarndt@gmx.net">Matthias Arndt</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->




<H2><A NAME="SECTION00010000000000000000">
Contents</A>
</H2>
<!--Table of Contents-->

<UL>
<LI><A NAME="tex2html15"
  HREF="#SECTION00020000000000000000">1 Introduction</A>
<LI><A NAME="tex2html16"
  HREF="#SECTION00030000000000000000">2 Why should I write documentation?</A>
<LI><A NAME="tex2html17"
  HREF="#SECTION00040000000000000000">3 What aspects of my project/program should I document?</A>
<LI><A NAME="tex2html18"
  HREF="#SECTION00050000000000000000">4 How do I write documentation?</A>
<LI><A NAME="tex2html19"
  HREF="#SECTION00060000000000000000">5 What formats should I use for my documentation?</A>
<UL>
<LI><A NAME="tex2html20"
  HREF="#SECTION00061000000000000000">5.1 File formats suitable for documentation</A>
<LI><A NAME="tex2html21"
  HREF="#SECTION00062000000000000000">5.2 Source code documentation</A>
</UL>
<LI><A NAME="tex2html22"
  HREF="#SECTION00070000000000000000">6 Documentation formatting with HTML</A>
<LI><A NAME="tex2html23"
  HREF="#SECTION00080000000000000000">7 Use LyX</A>
<LI><A NAME="tex2html24"
  HREF="#SECTION00090000000000000000">8 What about PDF?</A>
<LI><A NAME="tex2html25"
  HREF="#SECTION000100000000000000000">9 Conclusion</A>

</UL>
<!--End of Table of Contents-->

<P>

<H2><A NAME="SECTION00020000000000000000">
1 Introduction</A>
</H2>

<P>
Giving everything a GUI has become a popular trend in the Linux community.
This implies that more and more program authors tend to use a GUI-based 
configuration dialog.

<P>
However, you lose an important thing when GUIs are used for everything:
documentation.  People who can point-and-click
are often the one who think: ```Why should I read the programs
documentation? I simply point-and-click--and it works.''

<P>
But it would be better to encourage people to read documentation.
In fact, the better the documentation, the simpler it is to use 
a program. Take the Apache web server for example, it comes 
with heavy documentation.  As a result, anybody who can understand a little
English is able to use Apache and configure it--without using a
point-and-click interface.

<P>
This article tries to encourage programmers to document their projects,
as well as to provide ideas and tips on doing so.

<P>

<H2><A NAME="SECTION00030000000000000000">
2 Why should I write documentation?</A>
</H2>

<P>
Lots of reasons! More documentation means easier usage. More documentation
means better add-on modules. More documentation means happier users.
As soon as a user gets stuck trying to get a program feature to work, he
or she starts to read that program's documentation. Imagine, therefore, 
creating well-structured and well-written documentation that will make it
easy for the user to get that feature to work.

<P>

<H2><A NAME="SECTION00040000000000000000">
3 What aspects of my project/program should I document?</A>
</H2>

<P>
In general the following aspects of a program or project should be
documented:

<P>

<OL>
<LI>Basic usage is mostly covered in a man page.
</LI>
<LI>More advanced usage can be achieved by listing ALL configuration
options in the documentation and giving examples on how to use them
(take the very good Apache documentation for example).
</LI>
<LI>Source code, of course, because somebody may want to add features
to the program.
</LI>
<LI>Examples of usage to supply a working basic configuration file
and document it heavily.
</LI>
<LI>Installation of the program, because not all programs work with <B>./configure
&amp;&amp; make &amp;&amp; make install</B>.
</LI>
<LI>User interface, especially if it is not a common point-and-click
one.
</LI>
</OL>
This list can be extended further. But in general a well-documented
program will cover at least these, and it will do so in a readable
fashion.

<P>

<H2><A NAME="SECTION00050000000000000000">
4 How do I write documentation?</A>
</H2>

<P>
Use your favourite text editor, as the formats I propose here can all
be written using a text editor.

<P>
Style is worth mentioning as well. Write your documentation in an
easy-to-read style. Do not try to use poetry.

<P>
The preferred language for documentation is plain English, as almost
anyone who uses a computer is able to understand it. You can always
add documentation in your native language as well. But keep in mind
that not everyone speaks German or Russian. At least include English
documentation for the most basic parts of your project. Someone who
cannot understand the simplest parts of the documentation will not read
it, and in many cases he will not use that program.

<P>
The rest is up to you. Always keep in mind that writing the documentation
is the ugliest part of developing.

<P>

<H2><A NAME="SECTION00060000000000000000">
5 What formats should I use for my documentation?</A>
</H2>

<P>

<H3><A NAME="SECTION00061000000000000000">
5.1 File formats suitable for documentation</A>
</H3>

<P>
Use a standard one, nobody likes proprietary file formats. This 
effectively kills MS Word, StarOffice or anything like that for documentational
purposes.

<P>
The most simple format is plain text. It can be read everywhere, and
everyone can use his or her favourite pager or editor.

<P>
If you want your documentation to be printable, L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X is a good
choice. It is relatively easy to use, at least for writing a documentation
file. Advantages of using L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X are the system-independent
output format and a stylish formatted document. You can even export
it to HTML.

<P>
The most preferred choice nowadays is HTML. It is hypertext, there
are readers for all platforms available, and it can be distributed
on the project's homepage for on-line reading.

<P>
You can also use an SGML- or XML-based format such as DocBook or 
LinuxDoc/SGML.  These formats provide the most flexibility for converting
to many other output formats (including formats which haven't been invented
yet), or parsing as structured text (for automated text-processing tools),
but require a learning curve similar to
L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X.

<P>

<H3><A NAME="SECTION00062000000000000000">
5.2 Source code documentation</A>
</H3>

<P>
Source code can simply be documented by heavy use of comments and
suitable variable names. API descriptions in an external file is important,
especially if you're writing a library or something else that can
be extended.

<P>

<H2><A NAME="SECTION00070000000000000000">
6 Documentation formatting with HTML</A>
</H2>

<P>
Always use the most common subset of HTML. Do not use frames or Javascript
in documentation. Simply use &lt;H1&gt;&lt;/H1&gt; to &lt;H6&gt;&lt;/H6&gt; for sections and
&lt;P&gt;&lt;/P&gt; for paragraphs. Read your favourite HTML-Howto for more detail.

<P>

<H2><A NAME="SECTION00080000000000000000">
7 Use LyX</A>
</H2>

<P>
This my personal tip for writing program documentation. It features
what-you-see-is-what-you-mean input and result formatting in L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X,
as well as export to ASCII and HTML. Think of it as some sort of GUI frontend
for L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X. Always keep in mind that LyX is not a WYSIWYG
text processor</B>.

<P>
LyX comes with most Linux distributions, with its own
documentation file. Give it a try--it's easy to use and the results
are stunning.

<P>
The export features of LyX make it well-suited for our purpose.
You can create a .dvi file of your documentation that can be printed
on almost all Linux boxes configured for printing. So even
the distribution of a printable manual is easy.

<P>

<H2><A NAME="SECTION00090000000000000000">
8 What about PDF?</A>
</H2>

<P>
PDF is an extended version of Postscript. Its main disadvantage for
documentation is it requires a graphic display or a printer to
be viewed properly.  

<P>
PDF is also less reliable on Linux.  HTML files and man pages "just
work".  L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X files work if you
install the software correctly. But there are incompatibilities between
the various PDF-authoring tools and viewers, and you may end up
distributing a document that somebody can't open or that has some of the
text showing up blank in various viewers.

<P>
PDF files are also huge, especially if you include pictures and tables. 
Displaying PDF files is slow compared to HTML, DVI or plain
text. You may use it--but I do not recommend PDF for project documentation.

<P>

<H2><A NAME="SECTION000100000000000000000">
9 Conclusion</A>
</H2>

<P>
Writing documentation can be fun if you use the right tools. Always
remember that the documentation should be written so that anyone
can read it.

<P>
Now, go do it--good documentation is worth the effort.





<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Matthias Arndt</H4>
<EM>I'm a Linux enthusiast from northern Germany.
I like plain old fifties rock'n'roll music, writing
stories and publishing in the <i>Linux Gazette</i>, of course.
Currently I'm studying computer science in conjunction with
economics.</EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2001, Matthias Arndt.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 71 of <i>Linux Gazette</i>, October 2001</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">Code Optimization Using the GNU C Compiler</font></H1>
<H4>By <a href="mailto:rahulj@veritas.com">Rahul U Joshi</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->




<p>
<i>
This article describes some of the code optimization techniques used by the
GNU C Compiler, in order to give the reader a feel of what code optimization is
and how it can increase the efficiency of the generated object code.
</i></p>

<h2>Contents</h2>
<OL>
<LI><a href="#sect1">Introduction</a>
<LI><a href="#sect2">Assembly Language Code for a C Program</a>
<LI><a href="#sect3">Constant Folding</a>
<LI><a href="#sect4">Common Subexpression Elimination</a>
<LI><a href="#sect5">Dead Code Elimination</a>
<LI><a href="#sect6">Strength Reduction using Induction Variable</a>
<LI><a href="#sect7">Conclusion</a>
<LI><a href="#sect8">Acknowledgments</a>
<LI><a href="#sect9">References</a>
</OL>

<h2><A NAME="sect1">1. Introduction</A></h2>
<p>
    As we all know, a compiler is a program that reads the source program in
a high-level language and translates it into (typically) machine language. This
is a complicated process involving a number of stages. If the compiler is
an <i>optimizing compiler,</i> one of these stages "optimizes" the 
machine language code so that it either takes less time to run or occupies
less memory or sometimes both. Of course, whatever optimizations the compiler
does, it must not affect the logic of the program i.e. the optimization must
preserve the meaning of the program. One might wonder what type of optimizations
the compiler uses to produce efficient machine code? Since in no case the 
meaning of the program being compiled should be changed, the compiler must
inspect the program very thoroughly and find out the suitable optimizations
that can be applied. As we may wonder, such a thorough analysis of the program
and then finding and applying suitable optimizations is a complex and time
consuming process, the details of which are beyond the scope of this article.
</p>

<p>
    What I am going to describe in this article are a few type of code
optimizations that the GNU C Compiler uses so that we can understand how the
code is optimized and appreciate the complexity of the optimization process.
The GNU C Compiler is a sophisticated optimizing C compiler that uses a large
array of optimization techniques to produce efficient code. It may not be
possible to describe all of them, so I have chosen some that are interesting
and also easy to understand. A complete list of the optimization techniques
that are used by the GNU C compiler is available at <a href="http://www.redhat.com/products/support/gnupro/gnupro_gcc.html">http://www.redhat.com/products/support/gnupro/gnupro_gcc.html</a>.
Instead of simply describing what a particular optimization technique does,
I will describe them using the assembly language code that is generated by
the GNU C Compiler. This method will also enable the readers to further
explore code optimization carried out by the compiler and also the advanced
optimization techniques, in case they are interested.
</p>


<h2><A name="sect2">2. Assembly Language Code for a C Program</A></h2>
<p>
    The GNU C Compiler (called GCC henceforth) reads a C program source file and
translates it into an object program that contains the machine code for the
program in binary form. However, it can also produce assembly language source
code for the program instead of the object code, so that we can read it and
understand how the assembly language program looks. We will be generating such
assembly language files to see the optimizations being used by the compiler,
so it would be beneficial if we see how the assembly language code for a simple
C program looks like. However, also note that we need not understand <i>each</i>
assembly language statement in the generated code, so some statements that are
not crucial towards understanding the code optimization will not be explained
for simplicity. To generate the assembly language code, create a file
<tt>test1.c</tt> as shown below and give the following command:</p>

    <PRE>$ gcc -c -S test1.c</PRE>

<p>
This will generate a file <tt>test1.s</tt>, which has the assembly language listing of
the generated code for the C program. The file <tt>test1.c</tt> along with the assembly
language code is shown below.</p>

<PRE><TT>
 1 : /* test1.c */
 2 : /* This first file simply demonstrates how the assembly program that the
 3 :    compiler produces looks like and some peculiarities of the GNU 
 4 :    assembler that follows some different conventions from MASM/TASM.
 5 :  */
 6 : #include &lt;stdio.h&gt;
 7 : 
 8 : int main()
 9 : {
10 :     printf("Hello, World\n");
11 :     return 0;
12 : }
13 : 
14 : /* end test1.c */
15 : /* ----------------------------------------------------------------- */
16 : /* generated assembly language file */
17 :     .file   "test1.c"           /* some assembler directives to be */
18 :     .version    "01.01"         /* ignored */
19 : gcc2_compiled.:
20 : .section    .rodata             /* this segment has read-only data */
21 : .LC0:
22 :     .string "Hello, World\n"
23 : .text
24 :     .align 4
25 : .globl main
26 :     .type    main,@function
27 : main:                           /* main function begins */
28 :     pushl $.LC0                 /* push parameter for printf() on stack */
29 :     call printf                 /* call the function */
30 :     addl $4,%esp                /* clear the stack */
31 : 
32 :     xorl  %eax,%eax             /* make EAX = 0, functions use register */
33 :     jmp .L1                     /* EAX to return values */
34 :     .p2align 4,,7               /* this is an alignment directive */
35 : .L1:
36 :     ret                         /* return from main, done */
37 : .Lfe1:
38 :     /* other assembler directives to be ignored */
39 :     .size    main,.Lfe1-main        
40 :     .ident  "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
41 : /* end of the generated assembly language file */
42 : /* ---------------------------------------------------------------- */
</TT></PRE>

<p>
In case you know about the architecture
of the 80386 or higher microprocessors and have experience with assembly
language programming, you will find that the assembly language that is produced
is only partly familiar to you. This assembly language follows the AT&amp;T
assembler syntax that is different from the Intel/Microsoft
Assembler/Turbo Assembler syntax that most of us are probably familiar with.
Let us go through the assembly language code. We will ignore the assembler
directives as they are not crucial towards understanding the generated code.
On line 20 a read-only data segment has been defined with the string <tt>"Hello,
World\n"</tt> in it. A label <tt>.LC0</tt> has been assigned to the string. On line 27, the code for the <tt>main()</tt>
function begins. As we know, in C language the parameters to functions are
passed by pushing them on the stack, and the parameters are pushed in the
reverse order i.e. the last parameter is pushed first on the stack. In this
case, the <tt>printf()</tt> function is being called with a single parameter, the
string <tt>"Hello, World\n"</tt>. The statement <tt>pushl $.LC0</tt> pushes the address of the
string <tt>"Hello, World\n"</tt> on the stack. The "<tt>l</tt>" in <tt>pushl</tt> stands for "long" as we
are dealing with 32 bit variables. In all the assembly language programs that
we will see, the mnemonics will be followed by an "<tt>l</tt>" to indicate that we are
dealing with 32 bit variables. The "<tt>$</tt>" preceding <tt>.LC0</tt> means the address of the
string. The next statement calls the <tt>printf()</tt> function. After the <tt>printf()</tt>
function finishes execution, we need to cleanup the stack, so we need to add 4
to ESP. (Why 4? That's because we pushed 4 bytes on the stack before calling
<tt>printf()</tt>.)
To do so, we would normally write, <tt>ADD ESP, 4</tt>. The Intel convention is
<tt>&lt;instruction&gt; dest, src</tt>. However, the AT&amp;T convention is <tt>&lt;instruction&gt; src, dest</tt>, so you can
see that the instruction on line 30 is <tt>addl $4, %esp</tt>. Immediate operands like
4 are prefixed by a $ and register names are prefixed by a %. This convention
was followed to maintain compatibility with the BSD assembler. The next
statement XOR's EAX with itself so that EAX = 0 afterwards. This is because
the return value from a function is stored in the EAX register. After that,
you will see a jump instruction and an alignment directive. These will not be
explained and it will suffice to know that <tt>main()</tt> function will return back at
this point. Now that we understand how the assembly language code looks like,
let us move towards the optimizations.</p>

<h2><A name="sect3">3. Constant Folding</a></h2>
<p>
    Constant folding is the simplest code optimization to understand. Let
us suppose that you write the statement <tt>x = 45 * 88;</tt> in your C program. A non-optimizing
compiler will generate code to multiply 45 by 88 and store the
value in x. An optimizing compiler will detect that both 45 and 88 are
constants, so their product will also be a constant. Hence it will find 45 *
88 = 3960 and generate code that simply copies 3960 into x. This is 
<i>constant folding</i>, and means the calculation is done just once, at
compile time, rather than every time the program is run. To illustrate this,
create the file <tt>test2.c</tt> as shown below. Generate the assembly code
for this program as was shown earlier. Since by default, GCC does not
optimize the program, you will see that the assembly code is a
straightforward translation of the C program (Lines 18 to 62).</p>

<PRE><TT>
 1 : /* test2.c */
 2 : /* Demonstration of constant propagation */
 3 : #include &lt;stdio.h&gt;
 4 : 
 5 : int main()
 6 : {
 7 :     int x, y, z;
 8 :     x = 10;
 9 :     y = x + 45;
10 :     z = y + 4;
11 :     printf("The value of z = %d", z);
12 :     return 0;
13 : }
14 : /* end of test2.c */
15 : 
16 : /* ---------------------------------------------------------------- */
17 : /* assembly language file without any optimizations */
18 :     .file   "test2.c"
19 :     .version    "01.01"
20 : gcc2_compiled.:
21 : .section    .rodata
22 : .LC0:
23 :     .string "The value of z = %d"
24 : .text
25 :     .align 4
26 : .globl main
27 :     .type    main,@function
28 : main:
29 :     pushl %ebp             /* save EBP register on stack */
30 :     movl %esp,%ebp         /* EBP = ESP */
31 :     subl $12,%esp          /* Create stack frame. 3 variables x 4 bytes */
32 : 
33 :     /* x = 10; */
34 :     movl $10,-4(%ebp)      /* x = 10. x is topmost on the stack */
35 : 
36 :     /* y = x + 45; */
37 :     movl -4(%ebp),%edx     /* EDX = x */
38 :     addl $45,%edx          /* EDX = EDX + 45 */
39 :     movl %edx,-8(%ebp)     /* y = EDX. y is second from top of stack */
40 : 
41 :     /* z = y + 4 */
42 :     movl -8(%ebp),%edx     /* EDX = y */
43 :     addl $4,%edx           /* EDX = EDX + 4 */
44 :     movl %edx,-12(%ebp)    /* z = EDX. z is third from top of stack */
45 : 
46 :     /* printf("The value of z = ", z); */
47 :     movl -12(%ebp),%eax    /* EAX = z */
48 :     pushl %eax             /* push EAX(=z) as first parameter of printf */
49 :     pushl $.LC0            /* second parameter for printf */
50 :     call printf                 
51 :     addl $8,%esp           /* clear stack */
52 : 
53 :     /* return 0; */
54 :     xorl %eax,%eax         /* for return 0 */
55 :     jmp .L1
56 :     .p2align 4,,7
57 : .L1:
58 :     leave
59 :     ret
60 : .Lfe1:
61 :     .size    main,.Lfe1-main
62 :     .ident  "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
63 : /* end of assembly language code */
64 : /* ---------------------------------------------------------------- */
65 : 
66 : /* ---------------------------------------------------------------- */
67 : /* generated assembly language code after optimization */
68 : 
69 :     .file   "test2.c"
70 :     .version    "01.01"
71 : gcc2_compiled.:
72 : .section    .rodata
73 : .LC0:
74 :     .string "The value of z = %d"
75 : .text
76 :     .align 4
77 : .globl main
78 :     .type    main,@function
79 : main:
80 :     pushl %ebp             /* Save EBP register on stack */
81 :     movl %esp,%ebp         /* EBP = ESP */
82 : 
83 :     /* by constant propagation, z will always be 59 */
84 :     /* printf("The value of z = %d", z); */
85 :     pushl $59              /* first printf parameter */
86 :     pushl $.LC0            /* second printf parameter */
87 :     call printf
88 :                            /* no need of cleanup, we are exiting anyway */
89 :     /* return 0; */
90 :     xorl %eax,%eax              
91 :     leave
92 :     ret
93 : .Lfe1:
94 :     .size    main,.Lfe1-main
95 :     .ident  "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
96 : /* end of assembly language code */
97 : /* ----------------------------------------------------------------- */
</TT></PRE>

<p>
    There are some new things in the assembly code that we need to
understand. First of all, the <tt>main()</tt> function defines 3 local variables for
whom space will be allocated on the stack. Also, to access these variables, we
will be using the indexed addressing mode and we will be using EBP for that.
So the first statement saves the current value of EBP onto the stack. Then
the stack pointer ESP is copied into EBP (note that the source ESP is first)
so that EBP can be used for accessing the local variables. Finally, we need
to create space for three 4-byte variables on the stack, so we subtract 12
from ESP; i.e., we grow the stack by 12 bytes. <tt>x</tt> will be the
bottom-most stack element and at an offset of -4 from EBP. See the diagram
below.</p>

<pre><tt>
             EBP-----> ---------------
                       |      x      |       4 Bytes
                       ---------------
                       |      y      |       4 Bytes
                       ---------------
                       |      z      |       4 Bytes
             ESP-----> ---------------
                       |             |
                       |             |
                   ^   |             |
                   |         ...
Address increases  |   |             |
as we go up        | 0 ---------------  
</tt></pre>

<p>
Similarly, the offset of y from EBP is -8 and that of z is -12. Now consider the
assignment <tt>x = 10;</tt>. The statement to implement it on line 34 is 
<tt>movl $10, -4(%ebp)</tt>. The indexed addressing mode is written as 
<tt>&lt;offset&gt;(&lt;base register&gt;)</tt>. Thus the above statement will copy the constant 10
to the address (EBP - 4) i.e. the address of <tt>x</tt> on the stack. In a similar
manner, <tt>-8(%ebp)</tt> is used to access <tt>y</tt> and <tt>-12(%ebp)</tt> is used to access <tt>z</tt>. Lines
37, 38 and 39 evaluate <tt>x + 45</tt> and assign the result to <tt>y</tt>. To do so, the value
of <tt>x</tt> is first copied into the EDX register, 45 is added to it and the result
which is in EDX is copied to <tt>y</tt>. The code for <tt>z = y + 4</tt> is similar. In line 47
the parameters for <tt>printf()</tt> are pushed on the stack. The last parameter (<tt>z</tt>) is
pushed first and then the address of the string is pushed. In line 51, we
cleanup the stack by adding 8 to ESP. I guess that since we pushed two 4-byte
parameters, we had to add 8 to ESP. In the first example, we pushed only one
parameter and hence we had to add just 4 to ESP. The rest of the code is easy
to understand.</p>

<p>
    Now if we look at the above program, when we evaluate <tt>x + 45</tt>, the
value of <tt>x</tt> is always going to be 10 because of the assignment <tt>x = 10</tt>.
Therefore <tt>x + 45</tt> will always evaluate to 55. So the statement always assigns
55 to <tt>y</tt>. Similarly, when evaluating <tt>y + 4</tt>, the result will always be 59. If
the optimization is enabled, the compiler will be in a position to detect
this. To enable optimization, use the -O2 option. Enter the following command:</p>

    <PRE>gcc -c -S -O2 test2.c</PRE>

<p>
The assembly code generated with optimization enabled is shown in lines 69 to
95. Notice that on line 85, the compiler directly pushes the constant 59 on
the stack followed by the address of the string and calls <tt>printf()</tt>. Thus, by
constant folding, the compiler evaluates the various expressions in the
program only once and plugs the final value into the generated code. One more
interesting thing to observe is that after constant folding, there is no need
of the variables <tt>x</tt>, <tt>y</tt> and <tt>z</tt>. Therefore no space for them is allocated on the
stack, thus reducing the memory requirement of the program. This brings out
the fact that one optimization may lead to another one. In the above case
constant folding lead to a decrease in run time (since all the computations
are done at compile time) and also to a decrease in the space requirements.</p>

<h2><a name="sect4">4. Common Subexpression Elimination</a></h2>
<p>
    Many a times, it happens that the same expression is evaluated at
different places in the same program and the values of the operands in the
expression do not change in between the two evaluations of that expression.
For example, the program may evaluate say <tt>a * b</tt> at the beginning and at the
end. If the values of <tt>a</tt> and <tt>b</tt> do not change in between these two evaluations
of <tt>a * b</tt>, then instead of evaluating <tt>a * b</tt> again at the end, we can save the
result of the evaluation of <tt>a * b</tt> at the beginning in some temporary variable
and use it at the end. This will help eliminate redundant computations in the
program. This optimization is called as <i>common subexpression elimination</i>.
Consider the following program that demonstrates it.</p>

<PRE><TT>
 1 : /* test3.c */
 2 : /* common subexpression elimination, and also of constant propagation */
 3 : #include &lt;stdio.h&gt;
 4 : 
 5 : int main()
 6 : {
 7 :     int a, b;
 8 :     int x, y, z;
 9 :     scanf("%d %d", &amp;a, &amp;b);
10 :     x = a * b;
11 : 
12 :     if(b &gt;= 4)
13 :     {
14 :         y = a * b;
15 :         z = 0;
16 :     }
17 :     else
18 :     {
19 :         z = a * b * 4;
20 :         y = 0;
21 :     }
22 : 
23 :     printf("x = %d, y = %d, z = %d\n", x, y, z);
24 :     return 0;
25 : }
26 : /* end of test3.c */    
27 : 
28 : /* ----------------------------------------------------------------- */
29 : /* generated unoptimized assembly language code */
30 :     .file   "test3.c"
31 :     .version    "01.01"
32 : gcc2_compiled.:
33 : .section    .rodata
34 : .LC0:
35 :     .string "%d %d"
36 : .LC1:
37 :     .string "x = %d, y = %d, z = %d\n"
38 : .text
39 :     .align 4
40 : .globl main
41 :     .type    main,@function
42 : main:
43 :     pushl %ebp                  /* save EBP */
44 :     movl %esp,%ebp              /* EBP = ESP */
45 :     subl $20,%esp               /* Create space for 5 variables */
46 : 
47 :     /* scanf("%d %d". &amp;a, &amp;b); */
48 :     leal -8(%ebp),%eax
49 :     pushl %eax                  /* push address of b on stack */
50 :     leal -4(%ebp),%eax
51 :     pushl %eax                  /* push address of a on stack */
52 :     pushl $.LC0                 /* push address of string */
53 :     call scanf
54 :     addl $12,%esp               /* stack cleanup after scanf */
55 : 
56 :     /* x = a * b; */
57 :     movl -4(%ebp),%eax          /* EAX = a */
58 :     imull -8(%ebp),%eax         /* EAX = EAX * b = a * b */
59 :     movl %eax,-12(%ebp)         /* x = EAX = a * b */
60 : 
61 :     /* if( b &gt;= 4)... */
62 :     cmpl $3,-8(%ebp)            /* compare b with 3 */
63 :     jle .L2                     /* else part at label .L2, if follows */
64 : 
65 :     /* y = a * b; */
66 :     movl -4(%ebp),%eax          /* EAX = a */
67 :     imull -8(%ebp),%eax         /* EAX = EAX * b = a * b */
68 :     movl %eax,-16(%ebp)         /* y = EAX = a * b */
69 :     /* z = 0; */
70 :     movl $0,-20(%ebp)
71 :     jmp .L3                     /* jump over the else part */
72 : 
73 :     .p2align 4,,7
74 : .L2:
75 :     /* else part begins here */
76 : 
77 :     /* z = a * b * 4; */
78 :     movl -4(%ebp),%eax          /* EAX = a */
79 :     imull -8(%ebp),%eax         /* EAX = EAX * b = a * b */
80 :     leal 0(,%eax,4),%edx        /* EDX = EAX*4 + 0 */
81 :     movl %edx,-20(%ebp)         /* z = EDX */
82 :     /* y = 0; */
83 :     movl $0,-16(%ebp)
84 : .L3:
85 :     /* if..else is over here */
86 : 
87 :     /* printf("x = %d, y = %d, z = %d\n", x, y, x); */
88 :     movl -20(%ebp),%eax
89 :     pushl %eax                  /* push address of z on stack */
90 :     movl -16(%ebp),%eax
91 :     pushl %eax                  /* push address of y on stack */
92 :     movl -12(%ebp),%eax
93 :     pushl %eax                  /* push address of x on stack */
94 :     pushl $.LC1                 /* address of string */
95 :     call printf
96 :     addl $16,%esp               /* stack cleanup after printf */
97 : 
98 :     /* return 0 */
99 :     xorl %eax,%eax
100 :     jmp .L1
101 :     .p2align 4,,7
102 : .L1:
103 :     leave
104 :     ret
105 : .Lfe1:
106 :     .size    main,.Lfe1-main
107 :     .ident  "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
108 : /* end of unoptimized assembly language code */
109 : /* --------------------------------------------------------------- */
110 : 
111 : /* --------------------------------------------------------------- */
112 : /* generated optimized assembly language code */
113 :     .file   "test3.c"
114 :     .version    "01.01"
115 : gcc2_compiled.:
116 : .section    .rodata
117 : .LC0:
118 :     .string "%d %d"
119 : .LC1:
120 :     .string "x = %d, y = %d, z = %d\n"
121 : .text
122 :     .align 4
123 : .globl main
124 :     .type    main,@function
125 : main:
126 :     pushl %ebp               /* save EBP */
127 :     movl %esp,%ebp           /* EBP = ESP */
128 :     subl $8,%esp             /* space for just 2 variables on stack */
129 : 
130 :     /* scanf("%d %d", &amp;a, &amp;b); */
131 :     leal -4(%ebp),%eax
132 :     pushl %eax               /* push address of b on stack */
133 :     leal -8(%ebp),%eax
134 :     pushl %eax               /* push address of a on stack */
135 :     pushl $.LC0              /* address of string */
136 :     call scanf
137 : 
138 :     /* x = a * b; */
139 :     movl -4(%ebp),%eax       /* EAX = b */
140 :     movl %eax,%edx           /* EDX = EAX = b */
141 :     imull -8(%ebp),%edx      /* EDX = EDX * a = b * a = a * b */
142 : 
143 :     addl $12,%esp            /* delayed stack cleanup */
144 :     /* if( b >= 4).... */
145 :     cmpl $3,%eax             /* compare EAX = b with 3 */
146 :     jle .L17                 /* else part from label .L17 */
147 : 
148 :                              /* y stored in ECX, z in EAX, x in EDX */   
149 :     /* y = a * b; */
150 :     movl %edx,%ecx
151 :     /* z = 0; */
152 :     xorl %eax,%eax
153 :     jmp .L18                 /* jump over the else part */
154 :     .p2align 4,,7
155 : .L17:
156 :     /* z = a * b * 4; */
157 :     leal 0(,%edx,4),%eax     /* LEA EAX, [EDX*4]+0 */
158 :     /* y = 0; */
159 :     xorl %ecx,%ecx
160 : .L18:
161 :     pushl %eax               /* push value of z */
162 :     pushl %ecx               /* push value of y */
163 :     pushl %edx               /* push value of x */
164 :     pushl $.LC1              /* push address of string */
165 :     call printf
166 :     /* stack cleanup after printf not necessary */
167 : 
168 :     /* return 0; */
169 :     xorl %eax,%eax
170 :     leave
171 :     ret
172 : .Lfe1:
173 :     .size    main,.Lfe1-main
174 :     .ident  "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
175 : /* end optimized assembly code */
176 : /* -------------------------------------------------------------- */
</TT></PRE>

<p>
    This program has an example of a common subexpression. On line 10, the expression
<tt>a * b</tt> is evaluated the first time, and then again on lines 14 and 19. The last two evaluations
of <tt>a * b</tt> are redundant since the value of neither <tt>a</tt> nor <tt>b</tt> changes after the first evaluation.
Thus these two evaluations are common subexpressions that can be eliminated. Lines 30 to 108
show the unoptimized assembly code that is a straightforward translation of the C code and
should be easy to understand. Now consider the optimized assembly language code from lines 113
to 176. The first thing to notice is that now only variables <tt>a</tt> and <tt>b</tt> are stored on the stack,
hence a stack of just 8 bytes is required as opposed to a 20 byte stack for the unoptimized
version. You may wonder what's so special about variables <tt>a</tt> and <tt>b</tt>. The specialty is that the
address of variables <tt>a</tt> and <tt>b</tt> is used in the program (for <tt>scanf()</tt>) and variables that reside in
the registers cannot have a memory address. Hence the compiler is unable to put them inside
the registers. The registers that the compiler chooses for other variables are as follows:
<tt>x</tt> in EDX, <tt>y</tt> in ECX and <tt>z</tt> in EAX. Statements 139 to 141 evaluate <tt>a * b</tt> and the value is stored
in EDX (which holds <tt>x</tt>). Also, the value of <tt>b</tt> is available in the register EAX.
One more thing to notice is the delayed cleanup of stack after the call to
<tt>scanf()</tt> on line 143. May be there is some advantage in doing so, I don't know.</p>

<p>
    Next starts the <tt>if</tt> statement. In the <tt>if</tt> part, the expression <tt>a * b</tt> is reevaluated and
we expect that the compiler will use the value stored in EDX. That is exactly
what the compiler does. For the statement <tt>y = a * b</tt>, the generated code on
line 150 simply copies the value of <tt>a * b</tt> in register EDX into the register
ECX (which holds <tt>y</tt>). In the <tt>else</tt> part again, there is a common subexpression
in the statement <tt>z = a * b * 4</tt>. Thus we expect that the compiler will take
the value of <tt>a * b</tt> in EDX, multiply it by 4 and then store the result in EAX
(which holds <tt>z</tt>). Now there are many ways in which this can be done. One is
to use a sequence of <tt>movl</tt>, <tt>imull</tt> instructions as in</p>
<pre><tt>
    movl %edx, %eax         /* EAX = EDX  = a * b */
    imull $4, %eax          /* EAX = EAX * 4 */
</tt></pre>
<p>
The second choice is to use a shift (<tt>sall</tt>) instead of <tt>imull</tt> in the above
sequence of instructions. However, it turns out that the GCC uses an obscure
speed trick to optimize the code. It uses the instruction</p>
<pre><tt>
    leal 0(,%edx,4), %eax
</tt></pre>
<p>
This instruction uses the scaling and indexing capabilities of the 80386
processors. The above instruction takes EDX as the index register, 4 as the
scale and 0 as the offset, calculates the effective address and stores it
in the EAX register. Thus the register EAX gets a value EDX(=a*b)*4 + 0 i.e.
<tt>a * b * 4</tt>. The <tt>leal</tt> instruction always executes in 2 clock cycles on an 80386,
whereas a simple shift will take around 7 clock cycles. We see
that the compiler knows about processor peculiarities and uses
it when it generates the code.</p>

<p>
    Thus it can be seen that common subexpressions save a lot of computations and also
space that is used up by the code for these redundant computations. At this stage, one can
understand that the compiler when analyzing the program for optimization must keep a track
of how and when the variables change, the expressions that are evaluated and also
which registers are allocated to variables. In general such a kind of analysis that the
compiler performs on the program is called as <i>data flow analysis</i>.</p>


<h2><a name="sect5">5. Dead Code Elimination</a></h2>
<p>
    Dead code is the code in the program that will never be executed for any input or other
conditions. A common example is an <tt>if</tt> statement. If the compiler finds out that the condition
inside the <tt>if</tt> is never going to be true, then the body of the <tt>if</tt> statement will never be
executed. In that case, the compiler can completely eliminate this dead code, thus saving the
memory space occupied by the code. The following program demonstrates dead code elimination.</p>

<pre><tt>
 1 : /* test4.c */
 2 : /* demonstration of dead code elimination */
 3 : #include &lt;stdio.h&gt;
 4 :
 5 : int main()
 6 : {
 7 :     int x;
 8 :
 9 :     scanf("%d", &amp;x);
10 :
11 :     if(x &lt; 0 && x &gt; 0)
12 :     {
13 :         x = 99;
14 :         printf("Hello. Inside the if!!!");
15 :     }
16 :
17 :     return 0;
18 : }
19 : /* end of test4.c */
20 :
21 : /* --------------------------------------------------------------- */
22 : /* optimized assembly code */
23 :     .file   "test4.c"
24 :     .version    "01.01"
25 : gcc2_compiled.:
26 : .section    .rodata
27 : .LC0:
28 :     .string "%d"
29 : .LC1:
30 :     .string "Hello. Inside the if!!!"
31 : .text
32 :     .align 4
33 : .globl main
34 :     .type    main,@function
35 : main:
36 :     pushl %ebp             /* save EBP on stack */
37 :     movl %esp,%ebp         /* EBP = ESP */
38 :     subl $4,%esp           /* create space for x on the stack */
39 :
40 :     /* scanf("%d", &amp;x); */
41 :     leal -4(%ebp),%eax
42 :     pushl %eax             /* push address of a on stack */
43 :     pushl $.LC0            /* push string on stack */
44 :     call scanf
45 :
46 :     /* the entire body of the if and the condition checking is dead code */
47 :     /* return 0; */
48 :     xorl %eax,%eax         /* no stack cleanup, we are exiting anyway */
49 :     leave
50 :     ret
51 : .Lfe1:
52 :     .size    main,.Lfe1-main
53 :     .ident  "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
54 : /* end optimized assembly code */
55 : /* ---------------------------------------------------------------- */
</tt></pre>

<p>
    Since the unoptimized assembly language code serves no purpose and also its easy
to understand, I have omitted it. In the program, the condition on line 11 is <tt>x &lt; 0 &amp;&amp; x &gt; 0</tt>,
which can never be true. The compiler finds this and concludes that the body of the <tt>if</tt>
statement forms dead code, so it does not generate any code for that. One interesting
thing to notice is that after the body of <tt>if</tt> has been eliminated, the string
<tt>"Hello. Inside the if!!!"</tt> is no longer needed and hence can be eliminated from the read-only
data section. However, detection of such things probably will increase the complexity of the
compiler and hence is not done.</p>

<h2><a name="sect6">6. Strength Reduction using Induction Variable</a></h2>
<p>
    One type of code optimization is strength reduction in which a "costly" operation is
replaced by a less expensive one. For example, the evaluation of x<SUP>2</SUP> is much more efficient if
we multiply x by x rather than call the exponentiation routine. One place where this optimization
can be applied is in loops. Many times in a loop, one variable changes in synchronization with
the loop variable. Such a variable is called as <i>induction variable</i>. Induction variables give
the compiler a chance to apply strength reduction, as can be seen from the following program.</p>

<PRE><TT>
 1 : /* test5.c */
 2 : /* demonstration of induction variable elimination */
 3 : int main()
 4 : {
 5 :     int i, j;
 6 :
 7 :     for(i = 0; i &lt; 10; i++)
 8 :     {
 9 :         j = i * 7;
10 :         printf("i = %d, j = %d", i, j);
11 :     }
12 :     return 0;
13 : }
14 : /* end test5.c */
15 :
16 : /* --------------------------------------------------------------- */
17 : /* optimized assembly language code */
18 :     .file   "test5.c"
19 :     .version    "01.01"
20 : gcc2_compiled.:
21 : .section    .rodata
22 : .LC0:
23 :     .string "i = %d, j = %d"
24 : .text
25 :     .align 4
26 : .globl main
27 :     .type    main,@function
28 : main:
29 :     pushl %ebp                  /* save EBP on stack */
30 :     movl %esp,%ebp              /* ESP = EBP */
31 :
32 :     pushl %esi                  /* ESI will hold 'j' */
33 :     pushl %ebx                  /* EBX will hold 'i' */
34 :     xorl %ebx,%ebx              /* both are initialized to zero */
35 :     xorl %esi,%esi
36 :     .p2align 4,,7
37 : .L5:
38 :     /* printf("i = %d, j = %d", i, j); */
39 :     pushl %esi                  /* push value of j */
40 :     pushl %ebx                  /* push value of i */
41 :     pushl $.LC0                 /* push address of string */
42 :     call printf
43 :     addl $12,%esp               /* stack cleanup */
44 :
45 :     /* instead of saying j = i * 7, its efficient to say j = j + 7 */
46 :     addl $7,%esi
47 :     incl %ebx                   /* i++ */
48 :     cmpl $9,%ebx                /* is i &lt;= 9, then repeat the loop */
49 :     jle .L5
50 :
51 :     /* return 0; */
52 :     xorl %eax,%eax
53 :     leal -8(%ebp),%esp
54 :     popl %ebx
55 :     popl %esi
56 :     leave
57 :     ret
58 : .Lfe1:
59 :     .size    main,.Lfe1-main
60 :     .ident  "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
61 :
62 : /* end optimized assembly code */
63 : /* ----------------------------------------------------------------- */
</TT></PRE>

<p>
    Here <tt>i</tt> is the loop variable whereas <tt>j</tt> is the induction variable as <tt>j</tt> always changes
in lock step with <tt>i</tt>. In the generated assembly language code, the compiler has decided to
use registers to store both <tt>i</tt> and <tt>j</tt> with <tt>i</tt> in EBX and <tt>j</tt> in ESI. Line 34 initializes EBX(=<tt>i</tt>) to
zero, as is indicated in the initialization part of the for loop. The compiler sees that during
the first pass, <tt>j</tt> will be assigned a value of 0, so it also initialized ESI to 0 in line 35.
The loop starts at line 37 and continues till line 49. Since <tt>j</tt> already has its value assigned
to it, the first thing the compiler does inside the loop is to call the <tt>printf()</tt> function. Here,
the compiler has adjusted the order of the statements in the loop so as to enable it to use
strength reduction. After analyzing the program, the compiler sees that inside the loop,
the value of <tt>i</tt> is always going to increase by 1 and since <tt>j</tt> is an induction variable, its
value is always going to increase by 7. Therefore, instead of multiplying <tt>i</tt> by 7 (which is costly),
it adds 7 to the old value of <tt>j</tt> before going on to the next iteration. Thus a costly operation
of multiplication has been replaced by addition which is cheaper (in terms of time).</p>

<h2><a name="sect7">7. Conclusion</a></h2>

<p>
    In this article we have seen some very basic code optimization techniques that the
GNU C Compiler uses to optimize the generated code. From these optimization techniques and
the various pieces of information that are required to apply them, the reader can appreciate
the type of sophisticated and complex analysis that the compiler must carry out on the
program. It has to keep track of various things like variables, their storage places (memory
or registers), expression evaluations, constant expressions, dead code etc. It is because of
this high complexity of the process that the compiler takes much longer to compile a program
with optimization enabled. There are many details that are involved in code
optimization and code generation that I have not explained and that I don't know.
Code optimization is a field of active research and interested
readers can refer to [1] for additional information.</p>

<h2><a name="sect8">8. Acknowledgments</a></h2>
<p>
I would like to thank my Bachelor's project guide Dr. Uday Khedker for creating my
interest in compilers and code optimization. I would also like to thank the <i>Linux
Gazette, Linux Documentation Project, PC Quest</I> and the <i>Pune Linux User's Group</i>
(<a href="http://www.pluggies.org">http://www.pluggies.org</a>)
which have earlier accepted and published my contributions that inspires me to write more.
</p>
<h2><a name="sect9">9. References</a></h2>

<OL>
<LI><i>Compilers: Principles, Techniques, and Tools</i>, A.V.Aho, Ravi Sethi and J.D.Ullman, Addison Wesley.
<LI><i>Systems Programming and Operating Systems</i>, D.M.Dhamdhere, Tata McGraw-Hill.
<LI><A HREF="http://www.linuxdoc.org/HOWTO/Assembly-HOWTO/index.html"><i>Assembly HOWTO</i></A>, Franois-Ren Rideau, Linux Documentation Project.
<LI><i>Advanced 80386 Programming Techniques</i>, James L. Turley, Osborne McGraw-Hill.
</OL>





<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Rahul U Joshi</H4>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<EM>I have recently joined Veritas Software India Pvt. Ltd. as an Associate
Software Engineer. I have worked on a research project entitled "Node Listing
Based Global Data Flow Analysis" during my Bachelor's degree. I am interested
in compilers, programming languages, operating systems and parallel/distributed
processing. I have contributed articles to Linux Gazette about
parallel processing and about optimizing C.</EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2001, Rahul U Joshi.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 71 of <i>Linux Gazette</i>, October 2001</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">The Foolish Things We Do With Our Computers</font></H1>
<H4>By <a href="mailto:gazette@ssc.com">Mike "Iron" Orr</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->




On September 6, I, um, dropped a fork on my hard drive while it was running.  
I asked The Answer Gang and Nick Moffitt what other foolish things they've done
with their computers, and here are the responses.

<H2>The Case of the Dropped Fork</H2>

<P> I keep my computer's
cover open to avoid overheating.  A fork fell off my desk, through the
computer case and landed on the hard drive.  The other half of the fork landed
on the, um, power supply.  Fortunately not *in* the power supply. 
<IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">  
I extracted the fork--being glad I didn't get a shock--and then discovered I
couldn't save my nedit files ("read-only file system").  The disk light stayed
on continuously.  I ran 'mount' and got an input/output error.  Suspecting the
drive was fried, I wrote down all the changes I'd made to my Python files in
the nedit windows.  I tried "su -c mount /Backups" to mount my backup partition
on the other drive, but it wouldn't do anything.  I got most of the way through
writing down my changes when nedit aborted.  I closed what I could and tried to
quit the X session, but the computer froze.  I pressed Reset, but it wouldn't
get past the BIOS.  I turned off the computer, waited a bit, and turned it back
on.  This time it booted OK.
<IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">  
<IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">  

<P> The computer ran for a couple days, then then it started crashing in
the middle of the night and on bad days I would get two Oopses a day.
My roommate
strongly hinted I fix my computer, because he works at night and depends on it
being the Internet gateway for his Windows boxen.  I wanted to install <A
HREF="http://www.rocklinux.org">ROCK Linux</A> and try it out, so this gave me
an excuse.  But I couldn't get through the installation routine without an
Oops.  It didn't matter whether both HDs were connected or only one.  Thinking
something unknown might be wrong with the computer besides just the hard drive,
I got the parts to build another computer: AMD Duron 800 (more than twice as
fast as my K6 350 woohoo!), the cheapest brand-name HD (10 GB), and a PCI
Ethernet card and sound card (because my new motherboard didn't have ISA
slots), and an ATX case.  Next month, I'll write about my adventures 
installing ROCK.

<HR NOSHADE WIDTH="80%"> <!-- ************************* -->
<H2>The Viking Ship</H2>

By <A HREF="mailto:nick@zork.net">Nick Moffitt</A> 

<P> I haven't got any blunder stories for you, but here's
something we used to do with computer hardware back in high school:

<P> My brother's school at the time had a bunch of surplus IBM
model Bs (predecessor of the XT I think) that I took home.  I only had
so many outlets in my room (I had used up all the plugs I dared, and
was using oil lamps to light the place, but that's another story), so
I had no use for most of them myself.

<P> My friend Jason had a bunch of clock-chip crystals from some
card that ran at 66MHz or something.  He probably got them from Boeing
Surplus, where you can buy drill bits by the pound, hard hats for a
dollar, and Ultrasparc pieces as-is.  At least, that was the way it
used to be.

<P> So we built a crude Viking ship out of spare plywood and set
a model B atop it.  I ran an extension cord out into the yard to power
it, Jason inserted the crystal, and we watched, entranced, as the poor
4.77MHz chip slowly slagged itself.  It smelled to high heaven, and
the boat didn't catch on fire, so we resorted to setting flaming peeps
adrift in his bathtub for our Viking funerals.

<P> "What do you suppose the reaction will be once they reach
Valhalla?" Jason asked.  

<P> "OLAF LOOK!  BUN-NY!" &lt;stomp&gt; &lt;squish&gt;

<H4>Iron writes:</H4>

When I worked at an ISP, we got our servers from the Boeing Surplus.  The owner
would buy ten of them at once, whatever model they were selling at $30 each
including monitor.  The first time, it was these miscellaneous stray 386s.  Two
years later, it was Dell 486s.

<P> At Bumbershoot (a multi-arts festival every Labor Day weekend), in the art
exhibit was a set of ferry-boat models made out of driftwood with scrounged
parts, with white Christmas lights inside.  They actually looked pretty cool.

<HR NOSHADE WIDTH="80%"> <!-- ************************* -->
<H2>Upgrade Hell</H2>
By <A HREF="mailto:stern@starshine.org">Heather Stern</A>

<P> Gosh, so many years in computing, hard to think what was the dumbest
thing... oh yeah, we can narrow it down to just Linux.

<P> Heh.

<P> I think the dumbest thing I've done with my laptop is upgrade it all in
one day before I needed it for something... but doesn't everyone do THAT?
Face it, upgrades are dangerous.

<P> But you know, if you ate whole herrings like Tux you wouldn't have had that
fork bomb.

<P> &lt;badum Ching!&gt;

<HR NOSHADE WIDTH="80%"> <!-- ************************* -->
<H2>I/O Cards</H2>
By <A HREF="mailto:pilolla@gateway.net">Chris Gianakopoulos</A>

<P> My dumbest computer act was unplugging and reinserting I/O cards in my
S-100 (CP/M) system because I didn't want to wait that long 3-second
duration for CP/M to reboot when I was fixing my hardware.  After about 40
Acts of Boldness, I finally plugged in the I/O card not quite so straight
into the socket and there were lots of sparks.

<P> I just took it apart, and after two weeks (front panel dangling on the
floor), I decided to fix the thing.  One killer, though.  The computer
would randomly crash and the front panel lights (it was an Altair 8800
with an 18-slot motherboard), would just light up.  After 4 months, when
it got in one of its moods, I got a frequency counter and saw that the
system clock was superposed where it should not have been.  Looking up the
signal definitions and the connector pinouts, I saw that there was a piece
of copper (from my hot-swapped I/O card connector fingers) shorting the
system clock to some other pin (I cannot remember the signals except that
one of them was the bus clock).  Yes I was electronically oriented (a real
computer hacker), and that's what made me so careless.

<P> Not only that, but I was unplugging and reinserting the
I/O card without removing power from the computer.  How cool I was!

<H3> <A HREF="mailto:jkarns@csd.net">John Karns</A> writes:</H3>

Hmm, you just dated yourself [about the Altair 8800]--and to join you, I'll
admit that I remember those!  I think it was the same model Altair that one of
my college classes was assigned to write a low-pass filter algorithm
for--assembler debugging was a bear, as programming tools were non-existent--at
least for us.

<H3> Chris writes:</H3>

Those were the days of CP/M.  But, now we have Linux, so that we have
those days and more!

<H3>Iron writes:</H3>

Especially with all those emulators Linux has.  

<H3>John writes:</H3>

<P> I still have a 486 / 100 on which I ran Slackware.  Although I haven't used
it in a while, it actually runs X tolerably well, thanks to the SCSI HD.

<P> I just wish they would offer SCSI on laptops - every time my system does a
disk buffer flush, there's a short and noticeable pause if I happen to be
moving the cursor around the screen to remind me that I'm running an IDE
HD.  IMO, using a SCSI HD yields a gain similar to having ample RAM in
the machine - helps smooth things out.

<H3>Iron writes:</H3>
What does "superposed" mean?  [Regarding the system clock that was 
superposed where it should not have been.]

<H3>Chris writes:</H3>

<P> I read too many linear systems books.  Some books will call the term
superposed, and other books will call the term superimposed (more
intuitive).  Anyway, it means one mathematical function algebraically
summed with another mathematical functions.  For example, you might have
a 5 volt DC signal with a 240 millivolt sinusoidal signal riding on top
of the 5 volt signal.  So, you would have a sine wave with an amplitude
of 240 millivolts and a DC offset of 5 volts.

<P> I suspect that you understand what I just said.  You were probably
wondering where the heck I concocted a word such as "superpose".
Usually the word is used in the context of superposition with respect to
a linear system.  I'm not gonna start talking about superposition,
because you will probably kill me for rambling (again).

<P> Anyway, I saw a 1-MHz signal appearing where it
shouldn't have been.
I'm sorry -- I talk so much.  Get me talking about science and stuff and
I ramble......

<H3>Iron writes:</H3>

<P> I figured it meant the same thing as superimposed.  I just couldn't,
with my puny understanding of electronics, figure out how a system
clock could "superimpose" itself somewhere, or why it would matter.

<H3>Chris writes:</H3>

<P> Oh, now I understand.  Utilizing my puny mind, I got bold and was
unplugging circuit boards (and plugging them back into the motherboard)
with the power on the computer!  After fixing my fried computer, every
now and then, I could not boot up the computer.  All of the front panel
lights, on the Altair 8800 computer, just lit up (abnormally).  When I
finally fixed the problem, I saw that there was a piece of copper
short-circuiting the system clock signal to an adjacent pin inside one
of the card edge connectors (These were 100-pin connectors - thus, the
S-100 bus).

<P> The piece of copper was a portion of foil that got sort of torn off
from the edge connector of the I/O card that I was constantly removing
and plugging into the computer.



<HR NOSHADE WIDTH="80%"> <!-- ************************* -->
<H2>Cold Therapy</H2>
By <A HREF="mailto:guy@gmnow.net">Guy Milliron</A>

<P> I do this (Sorta) all the time with my PCs (currently).  I have only one
floppy drive.  So when I need to use it on any system (Linux systems or my 
OS-challenged systems), I just hot-swap it in.. power, I/O cables and all!

<P> Reason: Just like you, I don't want to wait.  The Challenged OS takes 7
minutes to boot, linux only takes like less than two (But I lose my uptime
longevity).

<P> The most foolish thing I've done?   Has got to be when I had a 386 CPU that
would overheat and crash the system due to my power supply fan had gone out.
So three or four times daily I would take 2 zip lock bags and fill them with
ice cubes and put them IN the computer right on top of the CPU.  It actually
worked very well until I was able to buy a new system.

<P> BTW, I still have that same 386/33 motherboard.  Was going to make it a
Linux Router, till I found the LinkSYS router.

<H3>Iron writes:</H3>

That takes the cake!  If I could draw, I'd make a picture of a computer with
melting ice cubes in it.

<HR NOSHADE WIDTH="80%"> <!-- ************************* -->
<H2>Leaky Laptop</H2>
By <A HREF="mailto:jkarns@csd.net">John Karns</A>

<P> As recently as this past Spring I put my laptop into a backpack to bring
to a friend's house along with some other things, one of which was ... a
water bottle.  Well, the top wasn't really screwed onto the bottle very
securely, and ... you can guess what happened.  When I arrived at my
destination and pulled the backpack out of the car, I noticed that the
seat was very damp.  Upon checking the contents of the backpack and
removing the laptop, water sort of dripped out of the side of the machine
as I held it sideways / vertical.

<P> I took it inside and disassembled it partially, and left it on a table
with a fan blowing into it.  The important thing to remember in such cases
is not to turn on the machine (or other electronic device)!  After I took
it home I removed the mobo and left it over-night.  Luckily, the machine
survived the ordeal, without damage to the HD.  The screen showed a few
white spots, but those went away after a few weeks - sigh of relief.  I
was just glad that it was the older laptop and not the one I had just
bought a week before.

<H3>Iron writes:</H3>

That's another picture I'd draw: a laptop with water dripping out the side.

<P> <EM>If you would like to tell us about the most foolish thing you've done
with your computer, maybe we'll publish it.  
<A HREF="mailto:gazette@ssc.com">gazette@ssc.com</A> </EM>





<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Mike Orr</H4>
<EM>Mike ("Iron") is the Editor of <I>Linux Gazette</I>.  You can read what he
has to say in the Back Page column in this issue.  He has been a Linux
enthusiast since 1991 and a Debian user since 1995.  He is SSC's web technical
coordinator, which means he gets to write a lot of Python scripts.
Non-computer interests include Ska and Oi! music and the international language
Esperanto.  The nickname Iron was given to him in college--short for Iron Orr,
hahaha.</EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2001, Mike "Iron" Orr.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 71 of <i>Linux Gazette</i>, October 2001</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">Qubism</font></H1>
<H4>By <a href="mailto:sirflakey@core.org.au">Jon "Sir Flakey" Harsem</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->



<P>

<IMG ALT="qb-10th-s.jpg" SRC="misc/qubism/qb-10th-s.jpg" 
	WIDTH="600" HEIGHT="240">
<BR CLEAR="all">

<IMG ALT="qb-longday-s.jpg" SRC="misc/qubism/qb-longday-s.jpg" 
	WIDTH="600" HEIGHT="257">
<BR CLEAR="all">

<IMG ALT="qb-rsync-s.jpg" SRC="misc/qubism/qb-rsync-s.jpg" 
	WIDTH="600" HEIGHT="240">
<BR CLEAR="all">

<IMG ALT="qb-wordprocessor-s.jpg" SRC="misc/qubism/qb-wordprocessor-s.jpg" 
	WIDTH="600" HEIGHT="240">
<BR CLEAR="all">

<IMG ALT="qb-worms-s.jpg" SRC="misc/qubism/qb-worms-s.jpg" 
	WIDTH="600" HEIGHT="240">
<BR CLEAR="all">

<IMG ALT="qb-iiscrack-s.jpg" SRC="misc/qubism/qb-iiscrack-s.jpg" 
	WIDTH="600" HEIGHT="240">
<BR CLEAR="all">

<IMG ALT="qb-leanbeef-s.jpg" SRC="misc/qubism/qb-leanbeef-s.jpg" 
	WIDTH="600" HEIGHT="240">
<BR CLEAR="all">

<IMG ALT="qb-stuffed-s.jpg" SRC="misc/qubism/qb-stuffed-s.jpg" 
	WIDTH="600" HEIGHT="240">
<BR CLEAR="all">

<IMG ALT="qb-xonipaq-s.jpg" SRC="misc/qubism/qb-xonipaq-s.jpg" 
	WIDTH="600" HEIGHT="240">
<BR CLEAR="all">




<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Jon "SirFlakey" Harsem</H4>
Jon is the creator of the Qubism cartoon strip and current
Editor-in-Chief of the 
<A HREF="http://www.core.org.au/">CORE</A> News Site.  
Somewhere along the early stages of
his life he picked up a pencil and started drawing on the wallpaper.  Now
his cartoons appear 5 days a week on-line, go figure. He confesses to
owning a Mac but swears it is for "personal use".

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2001, Jon "Sir Flakey" Harsem.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 69 of <i>Linux Gazette</i>, August 2001</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">Numerical Workbenches, part III</font></H1>
<H4>By <a href="mailto:cspiel@hammersmith-consulting.com">Christoph Spiel</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->




<p>Parts&nbsp;I and II of this little series on numerical math workbenches on
GNU/Linux have covered rather dry subjects like matrix manipulations and <em>
for</em>-loops. This part brings more color to the screens as it turns to the
graphical capabilities of GNU/Octave, Scilab, and Tela. It will deviate from
the previous way of presenting the three applications, because the differences
of the graphical backends are far too big to allow for a uniform treatment
with only a few explanations on the differences.</p>

<p>The article starts with an introduction applicable to all programs. To give
the reader maximum benefit, all applications have to solve the same three real
life <a href="#problems">problems</a>. This simplifies the comparison despite
the differences of the implementations. In the last part, <a href="#octave">
Octave</a>, <a href="#scilab">Scilab</a>, and <a href="#tela">Tela</a> have to
tackle the given tasks.</p>

<h2><a name="introduction">Introduction</a></h2>

<dl>
<dt><strong><a name="item_Discrete_Data_Only">Discrete Data
Only</a></strong><br>
</dt>

<dd>As all three applications are designed to work with vectors and matrices,
their graphics backends only understand this kind of data. Doh! For the user
this means that the graph of a mathematical function like 

<pre>
                { sin(x)/x  for x &lt;&gt; 0
    y := f(x) = {
                {    1      for x == 0
</pre>

<p>cannot be drawn from the above expression, but the function has to be
transformed into discrete pairs&nbsp;(<em>x(i)</em>,&nbsp;<em>y(i)</em>). This
transformation is called sampling. To sample <em>f(x)</em>, we pick
values&nbsp;<em>x</em> where we are interested in <em>f(x)</em> and compute
<em>f</em> for the given <em>x</em>. Any reader who has followed the earlier
parts, will immediately recognize that this involves a vector operation.</p>

<pre>
    ### GNU/Octave code
</pre>

<pre>
    function y = f(x)
        if x == 0.0
            y = 1.0;
        else
            y = sin(x) ./ x;
        endif
    endfunction
</pre>

<pre>
    x = linspace(0.0, 4*pi, 50);
    y = f(x);
</pre>

<p><em>linspace(start, end, n)</em> returns a vector from <em>start</em> to
<em>end</em>, whose <em>n</em>&nbsp;elements are evenly spaced. The
vectors&nbsp;<em>x</em> and <em>y</em> can be passed to an appropriate
plotting function.</p>

<p>If data already are in vectorized form, they can be displayed
immediately.</p>
</dd>

<dt><strong><a name="item_Complexity_at_Large">Complexity at
Large</a></strong><br>
</dt>

<dd>How do we actually display a graph? This question leads us to the
fundamental problem all applications run into when it comes to graphical
output of data: either complicated or many simple function calls! Let us first
consider the complexity for the user of a call to solve a system of linear
equations 

<pre>
    x = a \ b             # Octave, Scilab
</pre>

<p>or</p>

<pre>
    x = linsolve(a, b)    // Tela
</pre>

<p>Even if we try hard to artificially complicate the calls (yet leaving them
useful), we hit the end of the road at</p>

<pre>
    x = linsolve(a, b, "CompletePivoting", "DoIterativeRefinement")
</pre>

<p>This is, with the two additional parameters -- pivoting strategy and
iterative refinement of the solution -- the user completely controls <em>
linsolve()</em>. All other ``decisions'' can reasonably be taken by the
workbench itself, for example, what algorithm to use if matrix&nbsp;<em>a</em>
has a special form.</p>

<p>Contrast this with the 2d-graph of</p>

<pre>
    x = [2.25,  2.27,  2.42,  ...]
    y = [0.363, 0.360, 0.337, ...]
</pre>

<p>What options can we think of?</p>

<ul>
<li>Draw isolated data points or connect data points with straight lines.</li>

<li>Which symbol to draw at each data point? A dot, star, circle, or asterisk?
What color should the data points be?</li>

<li>Which kind of line to draw between the data points? Continuous, dashed,
dotted, or dash-dotted? What line thickness and what color is the line?</li>

<li>Scale the plot to fit within the plotting window?</li>

<li>Draw coordinate axes? Linear or logarithmic <em>x</em> or <em>y</em> axis?
Both axes logarithmic?</li>

<li>Graduate or annotate the axes?</li>

<li>...</li>
</ul>

<p>Many more reasonable options are conceivable. The point is: we cannot
expect plotting to be as simple to use as is for example solving a system of
linear equations -- not because the applications are badly written, but
because the topic is inherently more complicated on the user's side. Hence,
nobody should be surprised if she ever needs 20 or more lines to define a
publication quality plot in Octave, Scilab, or Tela.</p>
</dd>
</dl>

<h2><a name="problems">Problems</a></h2>

<p>To make the competition interesting, I put up problems, which are not too
far away from the Real World(tm). Each of the three applications will have to
cope with three different types of plots:</p>

<ol>
<li><strong><a name="item_2D_Plot_of_Discrete_Data">2D Plot of Discrete
Data</a></strong><br>
 

<p>Display three sets of data (<a href="misc/spiel/l1.ascii">l1.ascii</a>, <a
href="misc/spiel/l2.ascii">l2.ascii</a>, <a href="misc/spiel/l3.ascii">
l3.ascii</a>) on a single page. The sets have a different number of data
points.</p>

<p>The data are stored as two columns, column&nbsp;1 holds the <em>
x</em>-value, and column&nbsp;2 the <em>y</em>-value:</p>

<pre>
    0.2808  3.419E-07
    0.3711  3.459E-07
    0.4882  3.488E-07
    ...
</pre>

<p>The graph must show title, axes captions, and legend. The <em>x</em> and
<em>y</em> ranges are supplied by the user.</p>
</li>

<li><strong><a name="item_3D_Plot_of_a_Function">3D Plot of a
Function</a></strong><br>
 Plot Rosenbrock's function (in two dimensions) 

<pre>
    f(u, v) = 100*(v - u^2)^2 + (1 - u)^2
</pre>

<p>as a 3d-surface in the parameter ranges -3&nbsp;&lt;=&nbsp;<em>
u</em>&nbsp;&lt;=&nbsp;3 and -2&nbsp;&lt;=&nbsp;<em>
v</em>&nbsp;&lt;=&nbsp;4.</p>

<p>Annotate the plot with title and axes captions.</p>
</li>

<li><strong><a name="item_Contour_Plot_of_a_Function">Contour Plot of a
Function</a></strong><br>
 Plot function 

<pre>
    g(u, v) = exp(u) * (4*u^2 + 2*v^2 + 4*u*v + 2*v + 1)
</pre>

<p>with contours, this is, <em>f(u, v) = z</em> for given <em>z</em> in the
parameter ranges -4.5&nbsp;&lt;=&nbsp;<em>u</em>&nbsp;&lt;=&nbsp;-0.5 and
-1&nbsp;&lt;=&nbsp;<em>v</em> &lt;=&nbsp;3.</p>

<p>The iso-lines are defined by a user-specified ``weight'' function.</p>

<pre>
                          (  z - z_0  ) 3
    z_iso = (z_1 - z_0) * ( --------- )   + z_0
                          ( z_1 - z_0 )
</pre>

<p>where <em>z_0</em> and <em>z_1</em> are the minimum and maximum values of
<em>g(u, v)</em> in the plot's range.</p>

<p>Again, annotate the plot with title and axes captions.</p>
</li>
</ol>

<p>All graphics must be rendered for two devices,</p>

<ul>
<li>X11 terminal and</li>

<li>Postscript printer.</li>
</ul>

<h2><a name="octave">Octave</a></h2>

<p>You know Gnuplot? Then learning to use GNU/Octave's plot functions will be
a piece of cake. All you need to do is precede the Gnuplot commands with a
``<code>g</code>'' to reach at the Octave equivalent. -- Oh, you haven't tried
Gnuplot yet? Then I will guide you through the examples. However, having a
Gnuplot manual (online or dead-tree edition) ready may be helpful.</p>

If you do not want to download Gnuplot's manual, you can use one of the <a
href= 
"http://pi3.informatik.uni-mannheim.de/staff/mitarbeiter/westmann/gnuplot.html">
publicly accessible versions</a>.

<h3><a name="octave: 2d discrete data plot">Octave: 2D Discrete Data
Plot</a></h3>

<p>For an easier discussion, I have split the code into blocks. Each block
gathers commands that belong together. The blocks are labeled with numbers in
square brackets, to allow for referencing them in the text.</p>

<pre>
    ### [1] Read data set_i into N_i-times-2 matrices
    set1 = load("l1.ascii");
    set2 = load("l2.ascii");
    set3 = load("l3.ascii");
</pre>

<pre>
    ### [2] Reset Gnuplot
    graw("reset;");
    clearplot;
</pre>

<pre>
    ### [3] Define decorations and plot area
    gset title "Comparison of sets L1, L2, and L3";
    gset xlabel "Temperature / K";
    gset ylabel "Voltage / V";
    gset key top left;
    gset xrange [0 : 100];
    gset yrange [8e-8 : 2e-6];
</pre>

<pre>
    ### [4] Plot data
    hold on;
    gplot set1 title "Set L1" with points;
    gplot set2 title "Set L2" with points;
    gplot set3 title "Set L3" with points;
    hold off;
</pre>

<pre>
    ### [5] Switch to PostScript output and plot into file
    gset terminal push;
    gset terminal postscript;
    gset output "oct1.eps";
    replot;
    gset terminal pop;
    gset output;
</pre>

<p><img height="450" alt=
"[Graphics: The Gnuplot window that has been opened by Octave's graphics commands shows the three data sets. The data points are drawn with blue, green, and red markers. The markers themselves have different shape. The plot has a title. Both axes show the annotations as defined by the gset-commands.]"
 src="misc/spiel/oct1.png" width="600"> The output to the Postscript terminal,
block&nbsp;[6], produced a <a href="misc/spiel/oct1.eps">printable version
(eps)</a> of the graphics.</p>

<p>Block&nbsp;[1] should be clear from the previous articles. The first
interaction with Gnuplot happens in [2], where Gnuplot is reset to a known
state and the X11-plot window gets cleared. A known state is helpful when
still experimenting with Gnuplot's options. In our case reseting is
unnecessary, but it does not hurt.</p>

<p>The block of <code>gset</code> commands, [3] is self explaining except</p>

<pre>
    gset key top left
</pre>

<p>which means: ``put the legend (or key) inside the plotting area at the
north-west corner''. <code>xrange</code> and <code>yrange</code> with their
special interval syntax set the width and height of the plot range.</p>

<p>Now, the actual data can be rendered into the plot window [4]. Because the
data sets have different sizes, they cannot be gathered in a single matrix.
Hence, each data set must be plotted by itself, and Gnuplot must be told --
with <code>hold on</code> -- that it should collect all <code>
gplot</code>&nbsp;commands until the last plot of the set is completed and
<code>hold off</code> is called. The calls to <em>gplot</em> essentially
contain the data matrix</p>

<pre>
    gplot set1
</pre>

<p>The title, which shows up in the plot's legend, is assigned in the call to
<code>gplot</code>, too.</p>

<p>Block&nbsp;[5] is specific to the way Gnuplot works. For each plot it uses
a <em>terminal</em> and an <em>output</em> file (remember that in UN*X
everything is a file, as for example is the console). When Gnuplot is running
under X, the terminal type defaults to X11 and output file defaults to
Gnuplot's X11-graphic window. Both, <em>terminal</em> and <em>
output</em>&nbsp;file can be changed independently with <code>gset</code>
commands. Thus, to get the same graphics in a different format, we switch from
the current terminal to Postscript, and put an ordinary file's name at the
output. Function&nbsp;<code>replot</code> replays all plot commands for us, we
do not have to write them again. After that the terminal and output settings
are undone, which is optional, but helpful if the user wants to twiddle some
more <code>gset</code>'s and repeatedly check their influence on the graph's
appearance.</p>

<h3><a name="octave: 3d function plot">Octave: 3D Function Plot</a></h3>

<pre>
    ### [1] Define function
    function z = f(u, v)
        ## truncated Rosenbrock function
        z = 100.0*(v - u.^2).^2 + (1.0 - u).^2;
        zv = z(:);
        zv(find(zv &gt; 100.0)) = 100.0;
        z = reshape(zv, size(z));
    endfunction
</pre>

<pre>
    ### [2] Sample function f()
    x = linspace(-3, 3, 40);
    y = linspace(-2, 4, 40);
    [xx, yy] = meshgrid(x, y);
    z_splot = splice_mat(xx, yy, f(xx, yy));
</pre>

<pre>
    ### [3] Reset Gnuplot
    graw("reset;");
    clearplot;
</pre>

<pre>
    ### [4] Define decorations and viewing direction
    gset data style line;
    gset title "Rosenbrock Function";
    gset xlabel "u";
    gset ylabel "v";
    gset view 30, 160;
    gset hidden;
    gset nokey
    gset parametric;
</pre>

<pre>
    ### [5] Plot
    gsplot z_splot;
</pre>

<pre>
    ### [6] Switch to PostScript output and plot into file
    gset terminal push;
    gset terminal postscript;
    gset output "oct2.eps";
    replot;
    gset terminal pop;
    gset output;
    gset noparametric;
</pre>

<pre>
    system("gzip --best --force oct2.eps");
</pre>

<p><img height="450" alt=
"[Graphics: The Gnuplot window shows a red-mesh that is 'deformed' according to function f(u, v). The whole plot looks like the imprint of a boomerang.]"
 src="misc/spiel/oct2.png" width="600"> A <a href="misc/spiel/oct2.eps.gz">
printer-ready version</a> (eps.gz) is available, too.</p>

<p>Again the first block, [1], should be easy to understand for anyone who has
read Part&nbsp;1 and 2 of this series for it only uses known functions. In
contrast, [2] introduces two new functions. Out friend <em>linspace()</em>
quickly generates two vectors which will define where <em>f(u, v)</em> will be
evaluated: from vectors&nbsp;<em>x</em> and <em>y</em>, a grid is constructed,
this is, two matrices&nbsp;<em>xx</em> and <em>yy</em>, where each pair of
matrix elements <em>(xx(i,&nbsp;j),&nbsp;yy(i,&nbsp;j))</em>,
1&nbsp;&lt;=&nbsp;<em>i</em>,&nbsp;<em>j</em> &lt;=&nbsp;40, define a (grid-)
point at which function&nbsp;<em>z&nbsp;=&nbsp;f(u, v)</em> will be evaluated.
The matrix of all <em>z</em>-values at the grid points then simply is <code>zz
= f(xx, yy)</code>. However, we are not done at this point, because Octave
requires to pass a specially formatted matrix to the 3d-plot
function&nbsp;<em>gsplot</em>.</p>

<p>The user-defined function <a href="misc/spiel/splice_mat.m">
splice_mat()</a> does exactly the needed operation: collect the grid data <em>
xx</em> and <em>yy</em> along with the <em>z</em>-values in matrix&nbsp;<em>
z_plot</em>. Matrix&nbsp;<em>z_plot</em> can be handed over to <em>gsplot</em>
without further ado (given Gnuplot is in parametric mode. (we will be in
parametric mode and for the given kind of problem parametric mode is the only
way to go (and I don't want to introduce another level of parenthesis
(really!))))</p>

<p>Block&nbsp;[4], a collection of <code>gset</code>s, looks almost familiar.
Some new settings are</p>

<ul>
<li><strong><a name="item_gset_data_style_line">gset data style
line</a></strong><br>
 Join adjacent mesh-points with (by default: red) lines.</li>

<li><strong><a name="item_gset_view_x_angle%2C_z_angle">gset view x_angle,
z_angle</a></strong><br>
 Rotate the view point around the <em>x</em>-axis by <em>x_angle</em> degrees,
then rotate around the new <em>z</em>-axis by <em>z_angle</em> degrees.</li>

<li><strong><a name="item_gset_hidden">gset hidden</a></strong><br>
 Suppress invisible mesh lines. The back side of the mesh is drawn differently
(green in the X11-window and with dashed black lines in the
Postscript&nbsp;terminal).</li>

<li><strong><a name="item_gset_nokey">gset nokey</a></strong><br>
 Suppress any legend.</li>

<li><strong><a name="item_gset_parametric">gset parametric</a></strong><br>
 See GNU/Octave's documentation. (<code>help -i gsplot</code> from Octave, or
<code>info octave --node='Three-Dimensional Plotting'</code> from the
shell.)</li>
</ul>

<p>After so much preparation, the actual plot command, <code>gsplot
z_splot</code> in [5] looks trivial.</p>

<p>The Postscript block&nbsp;[6] is similar to [5] in Section <a href= 
"#octave: 2d discrete data plot">``Octave: 2d discrete data plot''</a>. The
only additional job [6] does is gzipping the eps-file. In general <em>
system(``shell-commands'')</em> executes <em>shell-commands</em> in a
sub-shell. Obviously, this is extremely useful when interacting with an
external application, like gzip(1).</p>

<h3><a name="octave: contour function plot">Octave: Contour Function
Plot</a></h3>

<pre>
    ### [1] Define function
    function z = g(u, v)
        z = exp(u) .* (4.0*u.^2 + 2.0*v.^2 + 4.0*u.*v + 2.0*v + 1.0);
    endfunction
</pre>

<pre>
    ### [2] Define weight function for iso-line distances
    function y = pow_weight(x, n)
        ## Map interval X onto itself, weight with N-th power.
        d = max(x) - min(x);
        y = d*((x - min(x))/d).^n + min(x);
    endfunction
</pre>

<pre>
    ### [3] Sample function g()
    x = linspace(-4.5, -0.5, 40);
    y = linspace(-1.0, 3.0, 40);
    [xx, yy] = meshgrid(x, y);
    zz = g(xx, yy);
    z_splot = splice_mat(xx, yy, zz);
</pre>

<pre>
    ### [4] Compute iso-line distances
    iso_levels = pow_weight(linspace(min(min(zz))*1.01, ...
                                     max(max(zz))*0.99, 12), 3.0);
    il_str = sprintf("%f,", iso_levels);
    il_str = il_str(1 : length(il_str)-1);    # remove last ","
</pre>

<pre>
    ### [5] Reset Gnuplot
    graw("reset;");
    clearplot;
</pre>

<pre>
    ### [6] Define decorations and viewing direction
    gset data style line;
    gset title "Contour Plot of g(u, v)";
    gset xlabel "u";
    gset ylabel "v";
    gset contour base;
    gset nosurface;
    gset view 0, 0;
    eval(sprintf("gset cntrparam levels discrete %s", il_str));
    gset parametric;
</pre>

<pre>
    ### [7] Plot
    gsplot z_splot;
</pre>

<pre>
    ### [8] Switch to PostScript output and plot into file
    gset terminal push;
    gset terminal postscript;
    gset output "oct3.eps";
    replot;
    gset terminal pop;
    gset output;
    gset noparametric;
</pre>

<p><img height="450" alt=
"[Graphics: The Gnuplot window shows 12 iso-lines each with a different color. The plot exhibits a saddle point of g(u, v) in the right third of the image.]"
 src="misc/spiel/oct3.png" width="600"> A <a href="misc/spiel/oct3.eps">
printable version (eps)</a> is available, too.</p>

<p>After working through the 2d discrete and the 3d function plot examples,
the top three blocks&nbsp;[1-3] of the contour function script should not
raise many questions. In block&nbsp;[4] however, I have to prepare a trick,
which I must play at the end of block&nbsp;[6]. The job is to plot contour
lines with a user-defined function. The values of this function and therefore
the positions of the iso-lines are not known in advance.</p>

<p>Gnuplot offers several ways to define iso-lines, for example, automatic
computation of a given number of (linearly spaced) contours or defining a
minimum and a maximum contour value with a fixed increment between two
adjacent contours. Our problem requires a more general solution because the
iso-lines are not equally spaced along the <em>z</em>-axis. For completely
arbitrary iso-line values, as the third way if specifying contour lines,
Gnuplot has the following <code>gset</code> command</p>

<pre>
    gset cntrparam discrete z1, z2, ..., zN
</pre>

<p>where <em>z1</em>, <em>z2</em>, ..., <em>zN</em> are the <em>z</em>-values
of the iso-lines given as <em>floating point literals</em>. Thus,</p>

<pre>
    gset cntrparam discrete 0.2, 0.4, 0.8
</pre>

<p>is a perfect call, whereas</p>

<pre>
    z1 = 0.2
    z2 = 0.4
    z3 = 0.8
    gset cntrparam discrete z1, z2, z3
</pre>

<p>is nothing but a syntax error as would be</p>

<pre>
    gset cntrparam discrete iso_levels
</pre>

<p>Remember, <code>gset</code> needs floating point literals!</p>

<p>We are stuck unless we apply a bit of magic. If we present a complete
<code>gset</code> line to Octave, one where the values of vector <em>
iso_levels</em> are ``interpolated'' into (Perl programmers do this all day
long), the race is won. Here is how the trick is played:</p>

<pre>
    # Convert iso_levels to comma-separated string.  Octave reuses
    # the format specifier list if there are more items to print than
    # there are format specifiers.  Don't try this with C's printf :-)
    il_string = sprintf("%f,", iso_levels)
</pre>

<pre>
    # Remove comma past last contour value in the string.
    il_string = il_string(1 : length(il_string)-1)
</pre>

<pre>
    # Play interpolation trick a second time
    gset_string = sprintf("gset cntrparam levels discrete %s", il_string);
</pre>

<pre>
    # Execute the command which is stored in the variable gset_string
    eval(gset_string);
</pre>

<p>For readers who do not like abstract descriptions, this is a transcript of
a session (where long lines have been edited to fit):</p>

<pre>
    octave:10&gt; il_string = sprintf("%f,", iso_levels)
    il_string = 0.583444,0.592029,0.652120,0.815224,1.132847,1.656497, \
                2.437679,3.527900,4.978667,6.841486,9.167864,12.009307,
    octave:11&gt; il_string = il_string(1 : length(il_string)-1)
    il_string = 0.583444,0.592029,0.652120,0.815224,1.132847,1.656497, \
                2.437679,3.527900,4.978667,6.841486,9.167864,12.009307
    octave:12&gt; gset_string = sprintf("gset cntrparam levels discrete %s", \
                                     il_string)
    gset_string = gset cntrparam levels discrete 0.583444,0.592029, \
                0.652120,0.815224,1.132847,1.656497,2.437679,3.527900, \
                4.978667,6.841486,9.167864,12.009307
</pre>

<p>In the script, no temporary variable&nbsp;<em>gset_string</em> has been
introduced, but <em>sprintf()</em> sends its output directly to <em>
eval()</em>.</p>

<p>Block&nbsp;[6]: Gnuplot does not excel in plotting contours. In fact the
GNuplot user-manual suggests not to use it directly. Anyhow, we proceed,
because the out approach is easier to understand. The following three <code>
gset</code>s switch Gnuplot into contour-mode:</p>

<pre>
    gset contour base    # draw contours in the xy-plane
    gset nosurface       # do not draw the surface's mesh
    gset view 0, 0       # view the xy-plane from above
</pre>

<p>Blocks&nbsp;[7] and [8] closely resemble those we have already seen in
Section <a href="#octave: 2d discrete data plot">``Octave: 2D Discrete Data
Plot''</a> and <a href="#octave: 3d function plot">``Octave: 3D Function
Plot''</a>.</p>

<p>More demo plots of Gnuplot can be found at <a href= 
"http://www.gnuplot.org/gnuplot/gpdocs/all2.htm">
http://www.gnuplot.org/gnuplot/gpdocs/all2.htm</a></p>

<h2><a name="scilab">Scilab</a></h2>

<p>And now for a rather different approach ...</p>

<p>Scilab goes a different way to cope with the complexity, which we have
discussed in Section <a href="#complexity at large">Complexity at Large</a>.
In contrary to Gnuplot, Scilab does not strictly separate plotting and
setting, but offers a plethora (buckle up, then try: <code>apropos
plot</code>) of different plot commands to produce different kinds of plots.
Furthermore, the plot functions themselves take many arguments that change the
plots' appearances. Some of the arguments are so cryptic that you almost
certainly will want to have the appropriate man-page within sight.</p>

<p>For the reader who wants to look at the on-line help, but does not have
Scilab installed, the <a href= 
"http://www.num.uni-sb.de/~ehrhardt/Ue_PraMa/scilab/doc/html/manual/docu023.html">
Scilab manual</a> is available online.</p>

<h3><a name="scilab: 2d discrete data plot">Scilab: 2D Discrete Data
Plot</a></h3>

<pre>
    // [1] Read data set_i into N_i-times-2 matrices
    set1 = read("l1.ascii", -1, 2);
    set2 = read("l2.ascii", -1, 2);
    set3 = read("l3.ascii", -1, 2);
</pre>

<pre>
    // [2] Clear plot window's contents
    xbasc();
</pre>

<pre>
    // [3] Plot data; 1st plot command defines plot area
    plot2d(set1(:, 1), set1(:, 2), -1, "011", ..
           rect = [0, 8e-8, 100, 2e-6]);
    plot2d(set2(:, 1), set2(:, 2), -2, "000");
    plot2d(set3(:, 1), set3(:, 2), -3, "000");
</pre>

<pre>
    // [4] Define decorations
    xtitle(["Comparison of sets", "L1, L2, and L3"], ..
           "Temperature / K", "Voltage / V");
    legends(["Set L1   ", "Set L2   ", "Set L3   "], [-1, -2, -3], 2);
</pre>

<pre>
    // [5] Save plot window's contents to file; convert file to PostScript
    xbasimp(0, "sci1.xps");
    unix("scilab -save_p sci1.xps.0 Postscript");
</pre>

<p><img height="447" alt=
"[Graphics: Please see the image caption of '2D Discrete Data Plot' in the Octave section.]"
 src="misc/spiel/sci1.png" width="600"> The <a href="misc/spiel/sci1.eps">
Encapsulated Postscript output</a> is available, too.</p>

<p>Block&nbsp;[1] reads the data from disk-files into matrices.</p>

<p>Block&nbsp;[2] clears the graphics window (if it exists). Even more
important, <em>xbasc()</em> deletes all graphics commands that have been
recorded for the window. The mnemonic for <em>xbasc()</em> is x-bas-c for
<strong>x</strong>11-function, <strong>bas</strong>ic level, <strong>
c</strong>lear.</p>

<p>Tip: When playing with Scilab's plot functions, preceding the plot function
call with a clear command often saves keystrokes</p>

<pre>
    xbasc(); plot2d(...);
</pre>

<p>in one line can be recalled for editing with a single C-p and replayed with
a single hit of the return-key.</p>

<p>In Block&nbsp;[3] the enigma raises its head! What in the world does</p>

<pre>
   plot2d(set1(:, 1),                      // vector of x-values
          set1(:, 2),                      // vector of y-values
          -1,                              // style index
          "011",                           // decoration control
          rect = [0, 8e-8, 100, 2e-6]);    // plot dimensions
</pre>

<p>do? I have added a comment for each argument, yet, to what does a ``style
index'' of -1 refer to? A badly dressed hacker? And what does the string in
``decoration control'' mean?</p>

<dl>
<dt><strong><a name="item_Style_index">Style index</a></strong><br>
</dt>

<dd>controls the kind of marker to draw for each data point or the color of
the line that joins the data points. A positive value&nbsp;<em>i</em> means:
draw a line with color&nbsp;<em>i</em>, a negative value means: use marker
type&nbsp;<em>abs(i)</em>. Note that <em>plot2d()</em> draws either markers or
lines, never both. If markers and lines are required for the same data set,
two plots with different style indices are necessary.</dd>

<dt><strong><a name="item_Decoration_control">Decoration
control</a></strong><br>
</dt>

<dd>always is a string of length&nbsp;3. Each character of the string controls
a certain aspect of the plot's decorations. 

<dl>
<dt><strong><a name="item_Character_1">Character 1</a></strong><br>
</dt>

<dd>Toggle display of the plot caption. '<code>0</code>' is no caption,
'<code>1</code>' tells Scilab to display a caption.</dd>

<dt><strong><a name="item_Character_2">Character 2</a></strong><br>
</dt>

<dd>Control how the size of the plot is computed. Valid characters range from
'<code>0</code>' to '<code>8</code>'. Please see <em>plot2d()</em>
documentation for details. 

<p>Here, we use '<code>1</code>' for the first plot and '<code>0</code>' for
all others. '<code>1</code>' lets the user explicitely specify the plot range
in the <code>rect</code>&nbsp;argument to <em>plot2d()</em>. If <em>
plot2d()</em> is called with '<code>0</code>', the size of a previous plot is
used and no size computation is done.</p>
</dd>

<dt><strong><a name="item_Character_3">Character 3</a></strong><br>
</dt>

<dd>Set the type of axes drawn around the plot. The user can choose from six
different values. We choose '<code>1</code>' for the first plot, which gives
axes on the bottom and the left hand side. The following plots use
'<code>0</code>', which means nothing is drawn around the plot.</dd>
</dl>
</dd>
</dl>

<p>Gee, that is quite a mouthful! Block&nbsp;[4] will give us some rest.</p>

<pre>
    xtitle([title_line1; title_line2; ...], x_label, y_label)
</pre>

<p>Puts a possibly multi-line title into an existing plot and optionally
decorates the <em>x</em> and <em>y</em>-axis with labels.</p>

<pre>
    legends([legend_1, legend_2, ...], [style_1, style_2, ...], position)
</pre>

<p>Places a legend in a plot where the position is given by <em>position</em>.
<em>position = 1</em> refers to the north east corner. The remaining corners
are enumerated counter-clockwise, this is, <em>position = 2</em> will put the
legend in the north west corner. The <em>style_i</em> parameters refer to the
same numbers that we have used as style indices in the <em>plot2d()</em>
calls. They determine which kind of marker or line is drawn right next to the
legend's text. The text is given by <em>legend_i</em>.</p>

<p>Finally, Block&nbsp;[5] converts the data in the graphics window to a
Postscript file.</p>

<pre>
    xbasimp(0, "sci1.xps")
</pre>

<p>Replays all graphics commands for window&nbsp;0 (our only graphics window)
into <em>sci1.xps</em>. The function's name has nothing to do with a
X11-daemon named ``bas'', but has its stem from <strong>x</strong>11 and
<strong>bas</strong>ic level as <em>xbasc()</em>. The ``<strong>imp</strong>''
comes from the French word ``imprimer'', which means ``to print''. From which
language does ``fsck'' come from? N vcls, I guess.</p>

<p>File&nbsp;<em>sci1.xps</em> almost contains valid Postscript, but not
quite. The contents must be processed by Scilab</p>

<pre>
    scilab -save_p sci1.xps.0 Postscript
</pre>

<p>adding the correct Postscript header and repositioning the graphics on the
page. The external Scilab is called by the <em>
unix(``shell-commands'')</em>&nbsp;function.</p>

<h3><a name="scilab: 3d function plot">Scilab: 3D Function Plot</a></h3>

<pre>
    // [1] Define function
    function z = f(u, v)
        // truncated Rosenbrock function
        z = 100.0*(v - u.^2).^2 + (1.0 - u).^2
        z(find(z &gt; 100)) = 100;
    endfunction
</pre>

<pre>
    // [2] Define sampling grid for f()
    x = linspace(-3, 3, 40);
    y = linspace(-2, 4, 40);
</pre>

<pre>
    // [3] Clear plot window's contents
    xbasc();
</pre>

<pre>
    // [4] Plot
    fplot3d(x, y, f, 65, 1.5);
</pre>

<pre>
    // [5] Define decoration
    xtitle("Rosenbrock Function", "u", "v");
</pre>

<pre>
    // [6] Save plot window's contents to file; convert file to PostScript
    xbasimp(0, "sci2.xps");
    unix("scilab -save_p sci2.xps.0 Postscript; " ..
         + "gzip  --best --force sci2.eps");
</pre>

<p><img height="447" alt=
"[Graphics: Please see the image caption of '3D Function Plot' in the Octave section.]"
 src="misc/spiel/sci2.png" width="600"> Here is the gzipped <a href= 
"misc/spiel/sci2.eps.gz">Encapsulated Postscript version</a> (eps.gz) of the
graphics.</p>

<p>After so much new stuff in Section <a href="#scilab: 2d discrete data
plot">Scilab: 2D Discrete Data Plot</a> the only unknown here hides in
Block&nbsp;[4]:</p>

<pre>
    fplot3d(x_vector, y_vector, function_of_x_and_y, alpha, theta)
</pre>

<p>The vectors&nbsp;<em>x_vector</em> and <em>y_vector</em> define the grid on
which <em>function_of_x_and_y</em> is evaluated. Comparing <em>fplot3d()</em>
with Octave's <em>gsplot</em> we notice, that Scilab generates the grid for
us. Function&nbsp;<em>fplot3d()</em> is a convenience function, built on top
of</p>

<pre>
    plot3d(x_vector, y_vector, z_matrix, alpha, theta)
</pre>

<p>which resembles <em>gsplot</em> (and Tela's <em>mesh()</em>).</p>

<p>The parameters <em>theta</em> and <em>alpha</em>, define the elevation of
the view point and the rotation around the <em>z</em>-axis respectively.</p>

<h3><a name="scilab: contour function plot">Scilab: Contour Function
Plot</a></h3>

<pre>
    // [1] Define function
    function z = g(u, v)
        z = exp(u) .* (4.0*u.^2 + 2.0*v.^2 + 4.0*u.*v + 2.0*v + 1.0)
    endfunction
</pre>

<pre>
    // [2] Define weight function for iso-line distances
    function y = pow_weight(x, n)
        // Map interval X onto itself, weight with N-th power.
        d = max(x) - min(x)
        y = d*((x - min(x))/d).^n + min(x)
    endfunction
</pre>

<pre>
    // [3] Define sampling grid for g()
    x = linspace(-4.5, -0.5, 40);
    y = linspace(-1.0, 3.0, 40);
</pre>

<pre>
    // [4] Evaluate g() at points defined by X and Y
    z = eval3d(g, x, y);
</pre>

<pre>
    // [5] Compute iso-line distances
    iso_levels = pow_weight(linspace(min(z)*1.01, max(z)*0.99, 12), 3.0);
</pre>

<pre>
    // [6] Clear plot window's contents
    xbasc();
</pre>

<pre>
    // [7] Set format of iso-line annotation and plot
    xset("fpf", "%.2f");
    contour2d(x, y, z, iso_levels);
</pre>

<pre>
    // [8] Define decoration
    xtitle("Contour Plot of g(u, v)", "u", "v");
</pre>

<pre>
    // [9] Save plot window's contents to file; convert file to PostScript
    xbasimp(0, "sci3.xps");
    unix("scilab -save_p sci3.xps.0 Postscript");
</pre>

<p><img height="447" alt=
"[Graphics: Please see the image caption of 'Contour Function Plot' in the Octave section for the image's description.]"
 src="misc/spiel/sci3.png" width="600"> The output is available as <a href= 
"misc/spiel/sci3.eps">printer-ready version</a> (eps), too.</p>

<p>Remember the difficulties we had with the user-defined iso-lines in
Octave/Gnuplot? The problem can be solved in Scilab without any tricks, magic,
or bribery. As with <em>plot3d()</em>, Scilab defines a convenience
function</p>

<pre>
    fcontour2d(x_vector, y_vector, function_of_x_and_y, levels)
</pre>

<p>as a wrapper around</p>

<pre>
    contour2d(x_vector, y_vector, z_matrix, levels)
</pre>

<p>However, as we must know the maximum and minimum value of <em>g(u, v)</em>
on the grid, <em>fcontour2d()</em> would not save us anything. Thus, Block [4]
computes <em>g(u, v)</em> on the grid defined by <em>x</em> and <em>
y</em>:</p>

<pre>
    z = eval3d(g, x, y)
</pre>

<p>In Block&nbsp;[7], we use <em>z</em> and <em>iso_levels</em> from
Block&nbsp;[5]. The <em>xset()</em> call sets the <strong>f</strong>loating
<strong>p</strong>oint <strong>f</strong>ormat (``fpf'') to
``<code>%.2f</code>'', which is a C-printf format specifier that forces all
contour line numbers to have two digits after the decimal point.</p>

<p>All other blocks only use functions already discussed in the other
plots.</p>

<p>More demo plots of Scilab are found at <a href= 
"http://www-rocq.inria.fr/scilab/doc/demos_html/node183.html">INRIA's Scilab
site</a>.</p>

<p>Scilab has much more to offer than the functions we have seen right above.
For example, it supplies</p>

<ul>
<li>Low-level functions to draw points, lines, polygons, etc.</li>

<li>
<p>Surface facets which are the building blocks for 3d-environments. (See for
example Enrico Segre's amazing <a href= 
"http://www.polito.it/~segre/scigallery.html">Scigallery</a>)</p>
</li>

<li>High-level GUI-interface for rapid development of tailor-made Scilab
applications.</li>

<li>Feedback functions that allow passing back information from any graphics
window to Scilab.</li>
</ul>

<h2><a name="tela">Tela</a></h2>

<p>In the sections on <a href="#octave">Octave</a> and <a href="#scilab">
Scilab</a>, we have seen that both applications save auxiliary ``state'' of
the plot window. Gnuplot does so to the max: <code>gplot</code> or <code>
gsplot</code> have almost no parameters. The state is controlled by <code>
gset</code> commands. Scilab stores some state of the plot window as, for
example, the legend and title.</p>

<p>Tela uses the external application PlotMTV to display graphs. With PlotMTV,
Tela is located on the other side of the spectrum: its plots have no state,
and all information about the plot has to go into the call to the actual
plotting function. The advantage of Tela's approach is that multiple plots do
not interfere (unless we force them to do so by calling <code>hold(on)</code>
or <code>hold(off)</code> as we will see soon). The downside is that the calls
to plotting functions can get rather long.</p>

<p>As has been in the discussions of the other plotting applications, it is
helpful to have a PlotMTV manual within reach.</p>

<h3><a name="tela: 2d discrete data plot">Tela: 2D Discrete Data Plot</a></h3>

<pre>
    // [1] Read data set_i into N_i-times-2 matrices
    set1 = import1("l1.ascii");
    set2 = import1("l2.ascii");
    set3 = import1("l3.ascii");
</pre>

<pre>
    // [2] Define plotting function
    function do_plot(d1, d2, d3)
    {
         hold(on);    // postpone actual plotting until hold(off)
</pre>

<pre>
         // render set 1
         plot(d1[:, 1], d1[:, 2],
              "linestyle",  0,
              "markertype", 2,
              "linelabel",  "Set L1",
              // Define decorations
              "toplabel",   "Comparison of sets",
              "subtitle",   "L1, L2, and L3",
              "xlabel",     "Temperature / K",
              "ylabel",     "Voltage / V",
              // Define plot area
              "xmin",       0,
              "xmax",       100,
              "ymin",       8e-8,
              "ymax",       2e-6);
         // render set 2
         plot(d2[:, 1], d2[:, 2],
              "linestyle",  0,
              "markertype", 3,
              "linelabel",  "Set L2");
         // render set 3
         plot(d3[:, 1], d3[:, 2],
              "linestyle",  0,
              "markertype", 4,
              "linelabel",  "Set L3");
</pre>

<pre>
         hold(off);    // plot!
    };
</pre>

<pre>
    // [3] Plot to X11 window
    do_plot(set1, set2, set3);
</pre>

<pre>
    // [4] Plot into a postscript file
    plotopt("-o tela1.eps -printcmd 'cat' -noxplot -print");
    do_plot(set1, set2, set3);
</pre>

<p>Hmm, this script looks differently! It does -- because I have to play
another trick that has to do with the statelessness plot functions. As Tela
``forgets'' the parameters after displaying graphics in an X11-window, I would
have to retype everything with output redirected to a Postscript file. Well,
code duplication is known to be the root of many (not all) evil. Thus, the
Tela plots are wrapped into a function. The further strategy is displaying the
plot in an X11 window, changing the output file and type, which is somewhat
analogous to Gnuplot, and then plotting again into an eps-file:</p>

<pre>
    do_plot(...);    // display plot in X11 window
    plotopt("-o foo.eps -printcmd 'cat' -noxplot -print");  // redirect output
    do_plot(...);    // render plot in Encapsulated Postscript file foo.eps
</pre>

<p><img height="800" alt=
"[Graphics: Please see the image caption of '2D Discrete Data Plot' in the Octave section.]"
 src="misc/spiel/tela1.png" width="600"> <a href="misc/spiel/tela1.eps">
Encapsulated Postscript version</a> of the graphics.</p>

<p>Function&nbsp;<em>do_plot</em> in Block&nbsp;[2] takes care of all output
by using function&nbsp;<em>plot()</em>. The general structure of Tela's <em>
plot()</em>, in fact all Tela plot functions, is first passing the mandatory
data arguments as vectors or matrices followed by optional key-value
strings.</p>

<pre>
    plot(x_vector, y_vector                 // data
         "option_key1", "option_value1",    // option 1
         "option_key2", "option_value2",    // option 2
         ...
         "option_keyN", "option_valueN");   // option N
</pre>

<p>Note that putting one key-value pair per line enhances the readability of
the whole call.</p>

<p>The key-value strings themselves are self-explaining. Non-obvious
associations like linestyle&nbsp;=&gt;&nbsp;0 (= invisible line) or
markertype&nbsp;=&gt;&nbsp;2 (= plus sign) must be looked up in the manual or
in a reference plot which shows all available line styles.</p>

<h3><a name="tela: 3d function plot">Tela: 3D Function Plot</a></h3>

<pre>
    function v = linspace(a, b; n)
    {
        if (isdefined(n)) nn = n else nn = 100;
        v = a + (0 : nn - 1) * (b - a) / (nn - 1) 
    };
</pre>

<pre>
    // [1] Define function
    function z = f(u, v)
    {
        // truncated Rosenbrock function
        z = 100.0*(v - u^2)^2 + (1.0 - u)^2;
        z[find(z &gt; 100.0)] = 100.0;
    };
</pre>

<pre>
    // [2] Sample function f()
    x = linspace(-3.0, 3.0, 40);
    y = linspace(-2.0, 4.0, 40);
    [xx, yy] = grid(x, y);
    zz = f(xx, yy);
</pre>

<pre>
    // [3] Define plot function
    function do_plot(x, y, zz)
    {
        mesh(zz,
             "xgrid",       x,
             "ygrid",       y,
             "toplabel",    "Rosenbrock Function",
             "xlabel",      "u",
             "ylabel",      "v",
             "hiddenline",  "true",
             "eyepos.z",    2.0)
    };
</pre>

<pre>
    // [4] Render plot into X11 window
    do_plot(x, y, zz);
</pre>

<pre>
    // [5] Plot into a postscript file
    plotopt("-o tela2.eps -printcmd 'cat' -noxplot -print");
    do_plot(x, y, zz);
    system("gzip --best --force tela2.eps");
</pre>

<p><img height="800" alt=
"[Graphics: Please see the image caption of '3D Function Plot' in the Octave section.]"
 src="misc/spiel/tela2.png" width="600"> An gzipped <a href= 
"misc/spiel/tela2.eps.gz">Encapsulated Postscript version</a> (eps.gz) of the
plot is available, too.</p>

<p>Tela has no built in <em>linspace()</em>&nbsp;function, so I quickly define
one.</p>

<p>Block&nbsp;[2] resembles Block&nbsp;[2] in Section <a href="#octave: 3d 
function plot">``Octave: 3D Function Plot''</a>, where Octave's <em>
meshgrid()</em> has been replaced by Tela's <em>grid()</em>.</p>

<p>The 3d-mesh plotting function <em>mesh()</em> takes a matrix of <em>
z</em>-values as its first argument; the grid-specification is given in the
options:</p>

<pre>
        mesh(z_matrix,
             "xgrid", x_vector,
             "ygrid", y_vector);
</pre>

<p>Of course, the sizes of <em>z_matrix</em>, <em>x_vector</em>, and <em>
y_vector</em> must be compatible.</p>

<h3><a name="tela: contour function plot">Tela: Contour Function Plot</a></h3>

<pre>
    function v = linspace(a, b; n)
    {
        if (isdefined(n)) nn = n else nn = 100;
        v = a + (0 : nn - 1) * (b - a) / (nn - 1) 
    };
</pre>

<pre>
    // [1] Define function
    function z = g(u, v)
    {
        z = exp(u) * (4.0*u^2 + 2.0*v^2 + 4.0*u*v + 2.0*v + 1.0)
    };
</pre>

<pre>
    // [2] Define weight function for iso-line distances
    function y = pow_weight(x, n)
    {
        // Map interval X onto itself, weight with N-th power.
        d = max(x) - min(x);
        y = d*((x - min(x))/d)^n + min(x)
    };
</pre>

<pre>
    // [3] Sample function f()
    x = linspace(-4.5, -0.5, 40);
    y = linspace(-1.0, 3.0, 40);
    [xx, yy] = grid(x, y);
    zz = g(xx, yy);
</pre>

<pre>
    // [4] Compute iso-line distances
    iso_levels = pow_weight(linspace(min(zz)*1.01, max(zz)*0.99, 12), 3.0);
    il_str = sformat("``", iso_levels);
    il_str = il_str[2 : length(il_str)];
</pre>

<pre>
    // [5] Define plot function
    function do_plot(x, y, zz, iso_levels_str)
    {
        contour(zz,
                "xgrid",    x,
                "ygrid",    y,
                "toplabel", "Contour Plot of g(u, v)",
                "xlabel",   "u",
                "ylabel",   "v",
                "contours", iso_levels_str)
    };
</pre>

<pre>
    // [6] Render plot into X11 window
    do_plot(x, y, zz, il_str);
</pre>

<pre>
    // [7] Plot into a postscript file
    plotopt("-o tela3.eps -printcmd 'cat' -noxplot -print");
    do_plot(x, y, zz, il_str);
</pre>

<p><img height="800" alt=
"[Graphics: Please see the image caption of 'Contour Function Plot' in the Octave section for the image's description.]"
 src="misc/spiel/tela3.png" width="600"> Also available is an Encapsulated
Postscript <a href="misc/spiel/tela3.eps">printer version</a>.</p>

<p>Tela requires us to play a similar trick on PlotMTV as we had to when
convincing Octave to pass the contours' values to Gnuplot. However, the trick
in Block&nbsp;[4] is not as involved. Again, the first step is to compute the
vector&nbsp;<em>iso_levels</em>. Function&nbsp;<em>sformat()</em> works
analogously to Octave's <em>sprintf()</em>, though the vectors are differently
formatted as the transcript shows (<em>il_str</em> has been edited to fit the
line).</p>

<pre>
    &gt;il_str = sformat("``", iso_levels);
    &gt;il_str
    "#(0.583444, 0.592029, 0.65212, 0.815224, 1.13285, 1.6565, \
    2.43768, 3.5279, 4.97867, 6.84149, 9.16786, 12.0093)"
</pre>

<p>PlotMTV does understand a vector that is enclosed in parenthesis, but the
leading sharp-sign must go</p>

<pre>
    il_str = il_str[2 : length(il_str)];
</pre>

<p>In this form, <em>il_string</em> can be passed as value to the option key
<code>contours</code> in function&nbsp;<em>contour()</em>.</p>

<p>More demo plots of PlotMTV can be found at <a href= 
"http://csep1.phy.ornl.gov/cornell_proceedings/tutorials/Plotmtv/overview.html">
ORNL</a> and at <a href= 
"http://www.hammersmith-consulting.com/plotmtv-us-g.html">HSC</a>.</p>

<p>By the way, PlotMTV suits perfectly as graphical backend for home grown
scripts and programs. The PlotMTV manual consistently helps the reader to
develop programmatic interfaces for her own applications.</p>

<h2><a name="closing comments on graphics">Closing Comments on
Graphics</a></h2>

<p>We have seen how to get publication ready data and function plots from
GNU/Octave, Scilab, and Tela. Sometimes the solutions have been intricate,
because of implementations' restrictions. However, all <a href="#problems">
problems</a> could be solved.</p>

<p>The effort in creating pleasantly looking graphs appears to be high and
almost independent of the chosen application.</p>





<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Christoph Spiel</H4>
Chris runs an Open Source Software consulting company in Upper Bavaria/Germany.
<EM>Despite being trained as a physicist -- he holds a PhD in physics from Munich
University of Technology -- his main interests revolve around numerics,
heterogenous programming environments, and software engineering.  He can be
reached at 
<A HREF="mailto:cspiel@hammersmith-consulting.com">cspiel@hammersmith-consulting.com</A>.</EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2001, Christoph Spiel.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 71 of <i>Linux Gazette</i>, October 2001</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more <STRONG>SCARY!</STRONG></I>"
</H4>

<P> <hr> <P> 

<H1><font color="maroon">The Back Page</font></H1>

<ul>
<li><a HREF="#wacko">Wacko Topic of the Month</a>
<li><a HREF="#nottag">Not The Answer Gang</a>
<li><a HREF="#spam">World of Spam</a>
</ul>

<a name="wacko"></a>
<P> <hr> <P> 
<!--====================================================================-->

<center><H3><font color="maroon">Wacko Topic of the Month</font></H3></center>

<P> <hr> <P> 
<!--====================================================================-->

<H1><FONT COLOR="#CC0000">
<IMG ALT="" SRC="misc/backpage/redbat.png" WIDTH="89" HEIGHT="61">
<IMG ALT="" SRC="misc/backpage/redbat.png" WIDTH="89" HEIGHT="61">
Red Bat Linux
<IMG ALT="[bat.png]" SRC="misc/backpage/redbat.png" WIDTH="89" HEIGHT="61">
<IMG ALT="" SRC="misc/backpage/redbat.png" WIDTH="89" HEIGHT="61">
</FONT></H1>

<P> <FONT COLOR="#CC0000">Red Bat--The Halloween Edition.</FONT>  The only
distribution with a SUI (spooky user interface).  Voted most
popular distribution in Transylvania.  Distributed under the GNU ("Goblins,
Newts and Undertakers") Public License.  Featured packages:

<UL>
<LI> SATAN
<LI> kill, killall, terminate
<LI> Dracula Web Server
<LI> BTP (Blood Transfer Protocol)
<LI> alien 
<LI> bastille (get rid of your enemies quick)
<LI> bob (watch Bill Gates bob for apples)
<LI> croff (like cron, but run events at random times)
<LI> curses (cast curses on your enemies.  The curse will contain words like tail, toe, head, touch, finger, gawk, gnome, frog)
<LI> dungeon (the rattling of ipchains, bind and whiptail, and ringing of bells)
<LI> espell (evil spellchecker, with interesting "suggestions" for words.  A companion to <A HREF="../issue51/collinge.html">VI-agra</A>.)
<LI> exorcise
<LI> fork (a good way to <A HREF="orr.html">destroy your hard drive</A>)
<LI> fortune, palmreader (used to extract data from Palm Pirates)
<LI> frankenpotato (dress a genetically-modified potato. Inspired by the KDE Potato Guy.  See a <A HREF="misc/backpage/frankenpotato.jpg">screenshot</A>.)
<LI> ghostscript
<LI> gibberish
<LI> goblin (gobble input.  Same as "cat >/dev/null 2>&1".)
<LI> hell (crash your neighbor's computer)
<LI> insane (drive another user insane)
<LI> ipmasqadm (plan a masquerade ball)
<LI> konquest, kruler (KDE World Domination games)
<LI> mc (Midnight Commander)
<LI> mkzombie
<LI> replicator
<LI> scare (same as "fortune | write $VICTIM")
<LI> setiathome (search for extraterrestrial life)
<LI> shadow 
<LI> spellcaster (cast a variety of spells.  Use with the kernel's IP Multicasting feature for extra effect.)
<LI> stormpkg (Storm Package Manager with an embedded game of Risk)
<LI> tar+feather
<LI> threaten
<LI> tmpreaper
<LI> trickortreat (a port scanning tool)
<LI> who (make a sound like an owl)
<LI> witch (call up a witch in six easy keystrokes including the newline)

</UL>

<SMALL>
(For those who didn't get the "bob" joke, Microsoft Bob was a "family-oriented
interface for Microsoft Windows" that utterly failed in the marketplace.  The
pages are gone from Microsoft's web site, but here's a 
<A
HREF="http://www.gratefuldad.com/twinsoft/products/msbob/msbob.html">product
summary</A> from a third-party sales site and a <A
HREF="http://www.strategymag.com/articles/magazine/19950123/10078.html">Canadian
prelaunch announcement</A>.)
</SMALL>  

<P>
<IMG ALT="[skull &amp; crossbones]" SRC="misc/backpage/kill.jpg">
<BR CLEAR="all">


<a name="nottag"></a>
<P> <hr> <P> 
<!--====================================================================-->

<center><H3><font color="maroon">Not The Answer Gang</font></H3></center>

<P> <HR> <P> 
<!--======================================================================-->
<P>
<H3 ALIGN="center">Help me crack my school</H3>

<p align="right"><FONT COLOR="#000000"><strong>Answered By Iron, Heather Stern
</strong></FONT></p>

<STRONG>
just wondering how I can get into my schools computer?  Its not like I am
going to do anything with it but I was just wondering if there is a way to
hack into the network system and well u know....
</STRONG>

<P>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Iron]


<P> If you read past issues of The Answer Gang, you'll see that we do not
offer help for cracking networks.  But you will find much of entertainment,
and may learn a thing or two about Linux.  

<P> If you type "hack,hacking,hacker" (that's "hack OR hacking OR hacker")
in the LG search engine, you will see several articles about hacking.  
[Note: the search engine was changed after this was written, and comma-OR
no longer works.]  But you
will discover that the word has a different meaning than how you are using it.
Hacking means spending long hours at the computer doing trial-and-error
experiments, and making new discoveries about how the system works or creating
new generally-useful programs.  Breaking into somebody else's computer is a
whole different activity, and the term for this is "cracking".

<P> Of course if you're in the US, there's a bill in Congress now that would
<A HREF="lg_bytes71.html#legislation">equate cracking with terrorism</A> and
land you life in prison.

<P>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather]
<P>

<BLOCKQUOTE>
just wondering how I can get into my schools computer? 
</BLOCKQUOTE>

Wait for the teacher to let you into class, turn it on, then wait for him
or her to tell you all the class login ID.

<BLOCKQUOTE>
Its not like I am going to do anything with it but I was just wondering
</BLOCKQUOTE>

...why I paid so much for community college (gosh I could go to the movies
a few times or buy some great clothes) when I hate computers, but then I
remember someone saying there's a bunch of money in computers, so I really
ought to get into one.

<BLOCKQUOTE>
if there is a way to hack into the network system and well u know....
</BLOCKQUOTE>

After I get all the money out of this computer I plan to shake any loose
change out of that ethernet hub too.


<H3 ALIGN="center">2-Cent Tip</H3>

<P>
<PRE>
rm -rf /bin/laden
</PRE>

Do it now and often!

<P> -- <BR>
BanDiDo is powered by Mandrake Linux and beer!

<BLOCKQUOTE><EM>
	[You can also make this a nightly cron job.  -Iron.]
</EM></BLOCKQUOTE>




<a name="spam"></a>
<P> <hr> <P> 
<!--====================================================================-->

<center><H3><font color="maroon">World of Spam</font></H3></center>

<P> <HR> <P> 
<!--======================================================================-->
<P>

<H3>Custom Made Theatrical/Costume Fangs</H3>
From: Killer Fangs!! &lt;shmuck@loser.com&gt;

<P> Have you been looking for a really good set of fangs?  Are you trying to
achieve a certain look, be it from your favorite movie, or your worst
nightmare?  Your search is over! Each set of our fangs meet standards of
quality as well as aesthetic appearance and will offer you that special "look"
you want. We offer custom fit, custom colored, and hand carved fangs tailored
to your specifications.

<P> Don't wait too long to start your fangs for Halloween!

<H4>Ben Okopnik writes:</H4>
Not much Linux content, though.

<H4>Chris G. writes:</H4>
Unless we can transmute our daemon processes into vampires by attaching
those fangs to them.
	




<HR> <!-- ************************************************************** -->

<P> Happy Linuxing!

<P> Mike ("Iron") Orr<br>
Editor, <A HREF="http://www.linuxgazette.com/"><i>Linux Gazette</i></A>, <A
HREF="mailto:gazette@ssc.com">gazette@ssc.com</a>
<BR CLEAR="all">

<!-- *** END Not Linux *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <P> 
<H5 ALIGN=center>
Copyright &copy; 2001, the Editors of <I>Linux Gazette</I>.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 71 of <i>Linux Gazette</i>, October 2001</H5>
<!-- *** END copyright *** -->


</BODY></HTML>