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
|
1998-03-23 Jim Meyering <meyering@eng.ascend.com>
* acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
automatically handles it.
1998-03-19 Jim Meyering <meyering@eng.ascend.com>
* src/system.h (SCHAR_MIN): Define.
(SHRT_MIN): Define.
od.c needs these when compiling with NCR's R2.0c C compiler.
(TYPE_MAXIMUM): Cast result to `(t)' so this macro works with
`unsigned char'.
From Greg Wooledge.
1998-03-15 Jim Meyering <meyering@eng.ascend.com>
* src/tail.c (tail_file): Merge largely-duplicated blocks of code.
1998-03-03 Paul Eggert <eggert@twinsun.com>
* src/sort.c (xtmpfopen): Open temporary file exclusively, to
foil a common denial-of-service attack.
* src/tac.c (save_stdin): Likewise.
1998-02-16 Jim Meyering <meyering@eng.ascend.com>
* configure.in (jm_FUNC_LSTAT): Use it.
(jm_FUNC_STAT): Use it.
* lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c.
1998-02-06 Jim Meyering <meyering@eng.ascend.com>
* Version 1.22e.
* configure.in: Don't use AM_MAINTAINER_MODE or
AC_PATH_PROG(PERL, perl).
(jm_PERL): Use this.
1998-02-04 Jim Meyering <meyering@eng.ascend.com>
* tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl.
(mk_script): Set to ../mk-script.
(x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script.
Remove @MAINT@ cruft.
(Makefile.am): Likewise.
Remove @MAINT@ cruft. Now `missing' will explain the failure
when people don't have Perl yet modify a file whose rebuilding
would lead to the use of Perl.
* tests/Makefile.am (EXTRA_DIST): Add mk-script.
* tests/*/mk-script.pl: Remove files.
* GNUmakefile: New file.
* Makefile.am (EXTRA_DIST): Add GNUmakefile.
Don't include Makefile.maint from here. It's included from GNUmakefile.
1998-01-30 Paul Eggert <eggert@twinsun.com>
* configure.in (AC_LFS): Put before anything that can affect or use
CPPFLAGS, LDFLAGS, or LIBS.
1998-01-25 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.maint: New file.
* Makefile.am: Move rules common to textutils, fileutils, sh-utils
into Makefile.maint.
Include Makefile.maint.
(EXTRA_DIST): Add Makefile.maint.
* src/cat.c (cat): Convert comma-expressions to pairs of
semicolon-terminated stmts.
Add braces around compound if/else stmts.
1998-01-24 Jim Meyering <meyering@na-net.ornl.gov>
* src/tail.c (parse_obsolescent_option): Do not interpret `-f -n 1 ...'
as obsolescent options.
Accept new option: --sleep-interval=SECONDS (-s).
FIXME: document new option in textutils.texi.
(parse_options): Recognize it.
(usage): Describe it.
(tail_forever): Use it.
(dump_remainder): Use it.
* tests/tail/Test.pm (f-1): Add test for option-processing of `-f -n 1'.
* tests/cut/: Rename directory to remove `-test' suffix.
* tests/join/: Likewise.
* tests/md5sum/: Likewise.
* tests/pr/: Likewise.
* tests/sort/: Likewise.
* tests/tr/: Likewise.
* configure.in (AC_OUTPUT): Reflect renamings in tests/.
* tests/Makefile.am (SUBDIRS): Reflect renamings in tests/.
* src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
bug in Cray C 5.0.3.0 when T == time_t.
1998-01-18 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (strncoll, strncoll_s2_readonly, look_for_fraction,
numcompare): Remove the `unsigned' from some `unsigned char*'
parameter types. Add casts via UCHAR where necessary to avoid
problems with unwanted sign extension. Based on a patch from
Kaveh Ghazi to appease Irix4's cc compiler.
1998-01-17 Jim Meyering <meyering@na-net.ornl.gov>
* src/split.c (next_file_name): Rewrite. This removes an artificial
limit (albeit already high, at INT_MAX :-) on the number of files
split could create. Reported by Ralf W. Stephan.
1998-01-16 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c: (mergefps): Add braces to avoid ambiguous `else' stmt.
(nls_set_fraction): Likewise.
* src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
for Irix-4.0.5. From Kaveh Ghazi.
* configure.in: Check for langinfo.h.
* lib/getline.c: Make PARAMS-defining conditionals consistent.
* lib/linebuffer.h: Likewise.
* lib/long-options.h: Likewise.
* lib/memcasecmp.h: Likewise.
* lib/xstrtod.h: Likewise.
* lib/xstrtol.h: Likewise.
Suggestion from Kaveh Ghazi.
* tests/head/Test.pm (fail-0): Disable test. It depends on
sizeof(long) being 32 bits. Reported by Kaveh Ghazi.
1998-01-10 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.22d.
* src/system.h [HAVE_LIMITS_H]: Include limits.h
(TYPE_SIGNED): Define.
(TYPE_MINIMUM): Define.
(TYPE_MAXIMUM): Define.
(CHAR_BIT): Define.
(SCHAR_MAX): Define.
(UCHAR_MAX): Define.
(SHRT_MAX): Define.
(INT_MAX): Define.
(UINT_MAX): Define.
(LONG_MAX): Define.
(ULONG_MAX): Define.
* src/*.c: Remove definitions of those symbols.
* src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
since it now includes limit.h which defines RE_DUP_MAX.
* src/nl.c: Likewise.
* src/tac.c: Likewise.
* lib/xstrtol.c (bkm_scale): Renamed from BKM_SCALE.
Rewrite macro as function. Return a value. Update caller.
Cast __ZLONG_MAX `__unsigned long int' before casting to double to
avoid SunOS /bin/cc compiler bug.
1998-01-08 Jim Meyering <meyering@na-net.ornl.gov>
* src/tac-pipe.c: New file. But not yet used.
* src/Makefile.am (EXTRA_DIST): Add tac-pipe.c.
* src/tac.c (tac_stream): Don't perform arithmetic on now-void* pointer
result of xrealloc (until recently it was char*).
* configure.in (AC_CHECK_FUNCS): Add nl_langinfo.
* src/sort.c (inittables): Add && HAVE_NL_LANGINFO to the #if-test
guarding the nls month-checking code.
(nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
`unsigned' from dcls of text and lim.
(main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.
1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.
* configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
those files will be built via the ANSI2KNR-filtering rules if necessary.
1997-12-25 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Remove AC_DEFINE of _GNU_SOURCE.
* acconfig.h (_GNU_SOURCE): Define if not already defined.
Put this code in @TOP@ section.
(_GNU_SOURCE): Remove #undef.
1997-12-22 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: AC_DEFINE _GNU_SOURCE.
* acconfig.h: Add _GNU_SOURCE.
1997-12-21 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_CHECK_HEADERS): Add stdlib.h.
* src/system.h: Merge in things from fileutils' version of this file.
* src/csplit.c: s/__P/PARAMS/.
* src/fmt.c: s/__P/PARAMS/.
* src/od.c: s/__P/PARAMS/.
* src/pr.c: s/__P/PARAMS/.
1997-12-14 Jim Meyering <meyering@na-net.ornl.gov>
* src/sys2.h: s/HAVE_DECLARATION_/HAVE_DECL_/g.
1997-12-13 Jim Meyering <meyering@na-net.ornl.gov>
* src/fmt.c (main): Add some braces.
Check return code from fclose of each input file.
Close stdout and check for errors.
* src/csplit.c (close_output_file): Check ferror before calling fclose.
(main): Close stdout and check for errors.
1997-11-15 Jim Meyering <meyering@na-net.ornl.gov>
* acconfig.h: Add mktime.
* configure.in (jm_FUNC_MKTIME): Use it.
* lib/mktime.c: New file.
* lib/Makefile.am (EXTRA_DIST): Add mktime.c
* intl/Makefile.in (distclean): Don't remove libintl.h here.
* Makefile.am (DISTCLEANFILES): Remove it here instead.
1997-11-13 Jim Meyering <meyering@na-net.ornl.gov>
* lib/strftime.c: Update from FSF.
* m4/strftime.m4: Check for POSIX.2's %f format spec.
1997-11-12 Jim Meyering <meyering@na-net.ornl.gov>
* src/system.h [!HAVE_MEMPCPY] (mempcpy): Define.
* configure.in (AC_CHECK_FUNCS): Add mempcpy.
1997-11-09 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (jm_FUNC_STRFTIME): Use it.
* m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
* m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
(jm_FUNC_GNU_STRFTIME): Use new macro.
(jm_FUNC_STRFTIME): New macro. Likewise.
Reported by Noel Cragg.
1997-11-08 Jim Meyering <meyering@na-net.ornl.gov>
* m4/lfs.m4 (AC_LFS): New file/macro.
* m4/Makefile.am (EXTRA_DIST): Add lfs.m4.
* configure.in (AC_LFS): Use it.
(AC_CHECK_FUNCS): Add fseeko.
* src/od.c (fseeko): Define a stub if ! HAVE_FSEEKO.
(skip): Use fseeko if available. Don't use lseek; it causes
the stdio stream to become out of sync with respect to the
underyling file descriptor.
From Paul Eggert.
1997-10-16 Paul Eggert <eggert@twinsun.com>
* configure.in (AC_CHECK_FUNCS): Add fseeko.
* src/od.c (skip): Use fseeko. Don't use lseek; it causes
the stdio stream to become out of sync with respect to the
underyling file descriptor.
1997-11-06 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (getmonth): Remove HAVE_ALLOCA #ifdefs.
We always have alloca.
(keycompare): Don't use variable size arrays (it's a gcc-extension).
Rewrite code that increments new lengths when not `ignoring'.
1997-11-02 Jim Meyering <meyering@na-net.ornl.gov>
* acconfig.h: Add malloc and realloc.
* src/wc.c (main): New option, --max-line-length (-L).
(wc, write_counts): Implement it.
From Bruno Haible.
1997-10-26 Jim Meyering <meyering@na-net.ornl.gov>
* lib/memcasecmp.c: Convert to upper case before comparing.
This makes join -i work with sort -f.
Reported by Arthur Pool.
1997-10-25 Jim Meyering <meyering@na-net.ornl.gov>
* lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
(xcalloc): #ifdef-out unused function.
(xrealloc): Remove code to work around deficient versions of realloc.
Now we have an autoconf-enabled replacement version.
(xmalloc): Remove code to work around deficient versions of malloc.
Now we have an autoconf-enabled replacement version.
* lib/memcmp.c (rpl_memcmp): Rename from memcmp.
* src/sort.c (NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/.
* lib/xmalloc.c (xalloc_fail_func): Initialize to 0, not NULL.
* configure.in (jm_FUNC_MALLOC): Use it.
(jm_FUNC_REALLOC): Use it.
* lib/Makefile.am (EXTRA_DIST): Add malloc.c.
* lib/malloc.c: New file.
* m4/malloc.m4: New file.
* m4/Makefile.am (EXTRA_DIST): Add malloc.m4.
* lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
(EXTRA_DIST): Add realloc.c.
(EXTRA_DIST): Add malloc.c.
* src/system.h: Include xalloc.h.
Remove dcls of xmalloc, xcalloc and xrealloc.
* lib/xalloc.h: New file.
* lib/xmalloc.c: Include xalloc.h.
Change VOID to void.
(xalloc_exit_failure): Renamed extern.
(xalloc_msg_memory_exhausted): New extern.
(xalloc_fail_func): New extern.
(fixup_null_alloc): Use new variables.
1997-10-24 Jim Meyering <meyering@na-net.ornl.gov>
* src/unexpand.c: Remove old-style xmalloc and xrealloc decls.
(add_tabstop): Cast first arg of xrealloc to char*.
* src/sort.c: Include xalloc.h.
(xmalloc): Remove function.
(xrealloc): Remove function.
(main): Set xalloc_fail_func to cleanup.
Set xalloc_exit_failure SORT_FAILURE.
* src/paste.c: Remove old-style xmalloc and xrealloc decls.
(paste_parallel): Cast first arg of xrealloc to char*.
* src/od.c: Remove old-style xmalloc and xrealloc decls.
(decode_format_string): Cast first arg of xrealloc to char*.
* src/expand.c: Remove old-style xmalloc and xrealloc decls.
(add_tabstop): Cast first arg of xrealloc to char*.
* lib/xalloc.h: New file.
* src/cut.c (ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.
(getstr): Cast xmalloc return value to char*.
* src/csplit.c: Include xalloc.h.
(xmalloc): Remove function.
(xrealloc): Remove function.
(main): Set xalloc_fail_func to cleanup.
* src/*.c: Remove old-style xmalloc and xrealloc decls.
* src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
Suggestion from Achim Blumensath.
1997-10-23 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.am (aclocal-files): Also depend on m4/Makefile.am.
* src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
[!HAVE_DECLARATION_MALLOC]: Declare malloc.
[!HAVE_DECLARATION_REALLOC]: Declare realloc.
[!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
[!HAVE_DECLARATION_STRSTR]: Declare strstr.
* src/cat.c: Remove stpcpy dcl.
* src/csplit.c: Remove malloc and realloc dcls.
* src/sort.c: Remove free, malloc, and realloc dcls.
* src/tac.c: Remove malloc, and realloc dcls.
* src/tr.c: Remove stpcpy dcl.
On some systems, strstr and stpcpy are macros, so declaring them
unconditionally gets syntax errors.
Reported by Mark M. Kettenis.
* configure.in: Use jm_CHECK_DECLS.
* m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.
1997-10-22 Jim Meyering <meyering@na-net.ornl.gov>
* m4/decl.m4: New file.
* m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS.
1997-10-16 Paul Eggert <eggert@twinsun.com>
* src/od.c (LONG_MAX): Define if not defined.
1997-10-16 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (look_for_fraction): Patch from Orn Hansen.
(getmonth): Compare the two month names only to the length of the
string in the month table. Patch from Orn Hansen.
(NLS_STRNCMP): New macro.
(strncoll_s2_readonly): New function.
(inittables): Don't use temporary `comp' to hide type of
comparator function.
(nls_sort_month_comp): Declare parameters to be void* to match
comparator function type required for qsort.
(getmonth): Use NLS_STRNCMP rather than #ifdef.
Use do-while, rather than while-loop.
1997-10-14 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c: (_NL_ITEM) [!defined]: Define.
From from Ørn E. Hansen.
* src/sort.c: Use STREQ in place of most uses of strcmp.
(NLS_STRCMP): Define.
(getmonth): Remove ifdef and use NLS_STRCMP instead.
Use HAVE_ALLOCA, not _HAVE_ALLOCA.
(zaptemp): Make parameter `const'.
* tests/sort-test/Test.pm: Add tests to exercise new fraccompare.
* src/sort.c (CHARS_IN_ABM): Remove definition
(inittables): Remove assumption that all abbreviated month names have
length 3.
(getmonth): Likewise.
(main): Add #if's for more efficient code when using the GNU C library.
From Ulrich Drepper.
* src/sort.c (strncoll): Rename parameter to LEN.
(keycompare): Move assignment out of if-expression.
* lib/xstrdup.c: New file.
* lib/Makefile.am (libtu_a_SOURCES): Add xstrdup.c
* src/sort.c: Declare xstrdup.
(my_setlocale): New function.
(main): Guard against failure of strdup (use xstrdup) and setlocale.
* src/system.h (STREQ): Define.
* src/od.c (STREQ): Remove definition.
* src/sort.c (look_for_fraction): Eliminate arbitrary limit on
number of `groups'. Declare as void, not int.
Patch from Ørn E. Hansen.
(main): When determining whether we're in the C or POSIX locale,
don't rely on the form of the string returned by setlocale.
Suggestion from Ulrich Drepper.
1997-10-12 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c: Apply big patch from Ørn E. Hansen.
Clean up, indent.
(NLS_MEMCMP): Define.
(keycompare): Use it instead of open-coded #ifdefs.
(compare): Likewise.
(NLS_MAP): Remove unused definitions.
Replace with uses of UCHAR.
(nls_locale_map): Remove dcl of unused file-scope array.
1997-10-10 Jim Meyering <meyering@na-net.ornl.gov>
* tests/sort-test/Test.pm: Add a test.
From William Lewis.
1997-10-07 Jim Meyering <meyering@na-net.ornl.gov>
* src/*.c: Update bug-reporting address.
* src/cat.c: Indent cpp directives to reflect nesting.
* src/cksum.c: Likewise.
* src/csplit.c: Likewise.
* src/fmt.c: Likewise.
* src/nl.c: Likewise.
* src/paste.c: Likewise.
1997-09-27 Jim Meyering <meyering@na-net.ornl.gov>
* m4/memcmp.m4: Integrate test to detect bug in memcmp from the
Next x86 OpenStep C library. Test program from William Lewis.
1997-09-21 Jim Meyering <meyering@na-net.ornl.gov>
* src/od.c [struct tspec] (hexl_mode_trailer): Rename from `trailer.'
(dump_hexl_mode_trailer): Rename from dump_string_trailer.
Use fputs and putchar instead of trivial or %-less printfs.
(decode_one_format): Parenthesize each field_width assignment in an
argument list to make the side effect a little more apparent.
(write_block): Use fputs and putchar instead of trivial or %-less
printfs.
(dump_strings): Cast string_min to off_t to avoid long-standing warning.
* src/od.c: Implement new `z' (hexl-mode) modifier.
[struct tspec] (trailer): New field.
(field_width): Likewise.
(dump_string_trailer): New function.
(decode_one_format): Save each field_width in the tspec.
Patch from John Kodis.
1997-09-14 Jim Meyering <meyering@na-net.ornl.gov>
* src/od.c (main) [--traditional]: Don't give diagnostic about there
being more than three arguments if there are *no* arguments specified.
Reported by Jochen Hein.
1997-09-13 Jim Meyering <meyering@na-net.ornl.gov>
* tests/sort-test/Test.pm: Add tests 19a and 19b.
1997-07-21 Jim Meyering <meyering@na-net.ornl.gov>
* src/tail.c (parse_obsolescent_option): #ifdef-out portability warning.
1997-07-19 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (checkfp): Print the `disorder' message. Include both
the number and the contents of the first out-of-order line, in addition
to the file name. Change meaning of return value.
(check): Don't print disorder message here.
Adjust test of checkfp's return value.
Feature suggestion from Karl Heuer.
1997-07-13 Jim Meyering <meyering@na-net.ornl.gov>
* doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
Now, automake includes it automatically.
* src/head.c: Include xstrtoul.h.
Remove global variable, unit_size.
(atou): Remove now-unused function.
(parse_unit): Likewise.
(string_to_ull): New function.
(head): Take new parameter, count_lines. Use it instead of unit_size.
Update callers.
(head_file): Likewise.
(main): Use string_to_ull, not atou/parse_unit.
The problem was that overflow wasn't detected, so `head -c 4096m'
was treated just like `head -c 0'.
Reported by Jerome Abela.
* tests/wc: New directory.
* tests/head: New directory.
* tests/Makefile.am (SUBDIRS): Add head and wc.
* configure.in (AC_OUTPUT): Add tests/head/Makefile and
tests/wc/Makefile.
1997-07-05 Jim Meyering <meyering@na-net.ornl.gov>
* src/tail.c (parse_obsolescent_option): If POSIXLY_CORRECT is set, give
a diagnostic and fail when there are two or more non-option arguments.
1997-07-04 Jim Meyering <meyering@na-net.ornl.gov>
* tests/tac/mk-script.pl: Redirect output of cmp to /dev/null.
* configure.in (ALL_LINGUAS): Add Norwegian (no).
* Makefile.am (aclocal-files): Look in source directory, not build dir.
From Andreas Schwab.
Sun Jun 15 06:36:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/pr.c (init_header) [T_BUF_FMT]: Output the 4-digit year (not the
2-digit abbreviation) in each page header. Reported by Noah Friedman.
Sat Jun 14 12:29:12 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/cut.c (cut_fields): Detect when the input is empty and handle
that special case. Before `cut -f1 < /dev/null' would improperly
output a single newline. Reported by Phil Richards.
Sun Apr 27 15:10:58 1997 Jim Meyering <meyering@na-net.ornl.gov>
* man/Makefile.am (DISTFILES): Add $(man_MANS).
* configure.in (ALL_LINGUAS): Add Czech (cs) and Swedish (sv).
Thu Apr 3 21:14:02 1997 Jim Meyering <meyering@na-net.ornl.gov>
* m4/Makefile.am (EXTRA_DIST): Update file list.
* tests/cut-test/Test.pm: Add test from Phil Richards.
Sat Mar 22 20:29:10 1997 Jim Meyering <meyering@na-net.ornl.gov>
* missing: New file -- from the automake-1.1m distribution.
Fri Mar 21 23:56:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
(aclocal.m4): Use aclocal's new -I option.
Thu Mar 13 21:46:04 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/tr.c (main): Make sure c1 is not -1 before using it as an
array index. Patch from Greg McGary. Although this is truly a
bug, I believe it would not cause tr to misbehave on most systems.
I could not construct a test case with which this bug causes tr
to generate invalid output.
* tests/pr-test/Test.pm: Add test that -o 0 works.
* src/pr.c (main): Allow use of 0 (zero) as the margin offset
argument to the -o option. Patch from Gary Anderson.
Fri Feb 28 22:32:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/uniq.c (usage): Fix typo in --help output. From Andreas Schwab.
Tue Feb 25 20:34:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (noinst_HEADERS): Add obstack.h.
(libtu_a_SOURCES): Add obstack.c.
Sun Feb 16 08:30:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
* tests/Makefile.am (SUBDIRS): Add tac.
* tests/tac: New directory.
* configure.in (AC_OUTPUT): Add tests/tac/Makefile.
* tests/pr-test/{tt-0FF, tt-bl, tta3-0FF, ttb3-0FF, tt-FF, tt-t,
tta3-FF, ttb3-FF}: New files. Renamed (s/T/tt/) to avoid name clashes
on case-independent filesystems.
* tests/pr-test/Test.pm (Tests '7.*'): Reflect file-renaming.
* src/tail.c (parse_obsolescent_option): Reverse order of args in
diagnostic. Remove `' quotes in diagnostic.
(parse_options): Remove `' quotes in diagnostic.
Sat Feb 8 22:43:45 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/tail.c (parse_obsolescent_option): Give warning diagnostic for
(but now accept) obsolescent usage with more than one file argument.
Sun Feb 2 23:06:59 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/join.c: Move alloca-related preprocessor code into system.h.
* src/od.c: Remove alloca-related preprocessor code.
* src/system.h: Add alloca-related preprocessor code.
Sat Feb 1 07:21:43 1997 Jim Meyering <meyering@na-net.ornl.gov>
* tests/pr-test/*: Rename files to avoid exceeding 14-character limit.
* tests/pr-test/Test.pm: Reflect renamings.
* tests/pr-test/mk-script.pl (spec_to_list): Warn about all filenames
that exceed max-length before dying.
* src/pr.c (init_parameters): For compatibility: use default
separator `TAB' with full length lines. From Roland Huebner.
Fri Jan 31 19:53:54 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/tac.c: Rename globals buffer and buffer_size to have G_ prefix
to avoid shadowing local variables.
* lib/long-options.c (parse_long_options): Compare getopt_long return
value against -1, not EOF. Use NULL, not `(int *) 0' as last parameter
in getopt_long call.
* src/pr.c (add_line_number): Rename from `number' to avoid shadowing
local variables.
* src/*.c: Compare getopt_long return value against -1, not EOF.
Use NULL, not `(int *) 0' as last parameter in getopt_long call.
(usage): Bracket bug-reporting address with <> and append a period.
Wed Jan 29 20:54:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
* tests/tr-test/Test.pm: Do each test twice: get input via REDIR
and PIPE.
* tests/tail/Test.pm (test_vector): Do each (non-stdin-requiring)
test three times.
* tests/pr-test/Test.pm: Remove common_option_prefix flag.
(test_vector): Prepend the common option here instead.
* tests/md5sum-test/Test.pm: Remove input_via_stdin flag.
Do each test twice: get input via REDIR and PIPE.
* tests/cut-test/Test.pm: Do each test three times.
* tests/cut-test/mk-script.pl: Allow each test to be run any or all
of three different ways. Program input may be specified via a file
or files listed on the command line, via input redirection (if there's
only one file), or via a pipe.
Tue Jan 28 20:54:06 1997 Jim Meyering <meyering@na-net.ornl.gov>
* tests/cut-test/mk-script.pl: Remove `t' prefix on all generated
test file names.
Change suffixes from (.in, .exp, .out, .err) to (.I, .X, .O, .E).
Ensure that no test file (generated or maintainer-supplied) has a
name longer than 14 characters.
Sun Jan 26 12:49:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.22.
* src/tail.c (parse_options): Add quotes to make messages identical.
Sat Jan 25 00:12:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/tail.c (parse_obsolescent_option): Comment.
(parse_options): Remove unnecessary goto and label.
* tests/sort-test/mk-script.pl: Interpret `input arg is a hash
reference' as meaning that the tested program will read no input.
Most of the tests for the date program use this feature.
Also for date, the generated script now reflects specification
(in Test.pm) of default and per-test environment settings.
* src/csplit.c: Reflect changes to xstrtol and xstrtoul interfaces.
* src/fold.c: Likewise.
* src/head.c: Likewise.
* src/join.c: Likewise.
* src/nl.c: Likewise.
* src/od.c: Likewise.
* src/pr.c: Likewise.
* src/uniq.c: Likewise.
* lib/xstrtoul.h (XSTRTOL_H): Undefine it.
* lib/xstrtol.h [!_STRTOL_ERROR]: Define the type `enum strtol_error'
only if it hasn't already been defined.
(_STRTOL_ERROR): Undefine.
* lib/xstrtol.c (__xstrtol): Change interpretation of
VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former
when any suffix is valid, the later when no suffix is allowed.
Fri Jan 24 23:36:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
* lib/long-options.c (parse_long_options): Reset optind to zero
before just returning so that getopt internals get initialized from
the probably-new parameters when/if getopt is called later.
From Ulrich Drepper.
Thu Jan 23 19:17:03 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/tail.c (parse_obsolescent_option): Recognize and fail for
more malformed obsolescent options. Makes for better diagnostics.
Wed Jan 22 21:34:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
* tests/Makefile.am (SUBDIRS): Add tail.
* tests/tail: New directory.
* configure.in (AC_OUTPUT): Add tests/tail/Makefile.
* src/tail.c (parse_options): New function.
(parse_obsolescent_option): New function.
(main): Use the new functions instead of open-coding them.
This better fixes the bug in handling obsolescent `+Nc' options.
General cleanup.
Tue Jan 21 22:49:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/tail.c (main): Properly handle what the POSIX spec calls
the `obsolescent' usage (e.g., tail +2c). It didn't work.
Reported by Karl Heuer.
Sun Jan 12 22:13:27 1997 Jim Meyering <meyering@na-net.ornl.gov>
* tests/tr-test/Test.pm: Rename tests so that the associated files
have names that are distinct even on filesystems on which file
names are case insensitive.
Reported by Fred Fish.
* tests/cut-test/Test.pm: Likewise.
* tests/tr-test/Makefile.am: Regenerated to reflect renamed tests.
* tests/cut-test/Makefile.am: Likewise.
Wed Jan 8 16:38:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.21.
* lib/getopt.c (_getopt_internal): Use `_', rather than the
(sometimes-)expansion `gettext'.
Tue Jan 7 22:50:13 1997 Jim Meyering <meyering@na-net.ornl.gov>
* lib/getopt.c: New (more POSIX compliant) version from GNU libc.
[_]: Define to gettext also if ENABLE_NLS is defined.
This is temporary.
Thu Jan 2 21:17:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
* src/pr.c (init_fps): Initialize lines_stored field in three places.
This avoids uninitialized memory reads in close_file.
Wed Jan 1 17:32:18 1997 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_ARG_PROGRAM): Remove explicit use.
It's implicit in AM_INIT_AUTOMAKE. From Wayne Stewart.
Sun Dec 29 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/pr.c (init_header): Plug a small memory leak by using stack
rather than heap for a 15-byte temporary buffer.
Sat Dec 28 00:03:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/pr.c (TAB_WIDTH): Parenthesize uses of parameters and renamed
from tab_width.
(POS_AFTER_TAB): Renamed from pos_after_tab. Define in terms of
TAB_WIDTH rather than duplicating the expression.
Fri Dec 27 17:29:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/join-test/mk-script.pl: Fix a couple of thinkos and typos.
Now it works with pr's tests, too.
* tests/pr-test/Makefile.am (explicit): Regenerate list of files,
this time with duplicates removed.
* src/pr.c (usage): Break long string literal into two separate
printf statements to accomodate default maximum of 2048 characters
for Irix-4.0.5. Reported by Kaveh Ghazi.
* Makefile.am (aclocal.m4): No longer depend on acinclude.m4.
* tests/Makefile.am (SUBDIRS): Add pr-test.
* configure.in: AC_REQUIRE version 2.12 of autoconf.
AC_OUTPUT: Add tests/pr-test/Makefile.
Sun Dec 22 08:11:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4: Move macros to individual files in new directory, m4/.
See ChangeLog entries in sh-utils for the details.
* configure.in: Increment version to 1.20a.
* tests/md5sum-test/Makefile.am: Use same framework as other tests.
* tests/md5sum-test/Test.pm: New file.
Sat Dec 21 20:32:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/Makefile.am (EXTRA_DIST): Add README and Makefile.am.in.
* tests/Makefile.am.in: New file.
* tests/sort-test/Makefile.am: Clone the Makefile.am from join-test.
Replace only the definition of $x and the auto-generated lists of
test files.
* tests/cut-test/Makefile.am: Likewise.
* tests/tr-test/Makefile.am: Likewise.
* tests/join-test/Makefile.am: Add @MAINT@-protected rule for
verifying that Makefile.am is consistent with Test.pm.
Fri Dec 20 00:08:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/join-test/Makefile.am (MAINTAINERCLEANFILES): Use $(in1)
and $(in2), not $(in).
* tests/join-test/mk-script.pl: New option: --list.
Generate lists of files used/generated.
Thu Dec 19 23:28:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/join-test/mk-script.pl: Rewrite to be more general -- so
it can be used for join, cut, sort, tr, and soon, pr test suites.
* tests/tr-test/mk-script.pl: Symlink through CVS repo to join's
mk-script.pl.
* tests/sort-test/mk-script.pl: Likewise.
* tests/cut-test/mk-script.pl: Likewise.
* tests/tr-test/Test.pm: Adapted for new mk-script.pl.
* tests/join-test/Test.pm: Likewise.
Tue Dec 17 16:48:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/join-test/Makefile.am (.pl): Make generated file read-only so
I don't accidentally modify it instead of the one with the .pl suffix.
* acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than
now-obsolete AC_C_CROSS.
(jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one
since there's nothing GNU-specific about the replacement. Contrast
with gnu_ prefix added to strftime.
(jm_FUNC_MEMCMP): New macro.
* configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP.
* acconfig.h: Add memcmp.
* README: Remove warning about memcmp. The new macro handles it.
Mon Dec 16 23:03:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/Makefile.am (pkgdata_DATA): Remove unnecessary assignment.
From Eric Backus.
(AUTOMAKE_OPTIONS): Likewise.
Sat Dec 14 14:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
name for cross compiling.
Remove definitions of gettext-related macros. The gettext
installation procedure installs corresponding .m4 files so that
aclocal will use them.
1996-12-12 Paul Eggert <eggert@twinsun.com>
* system.h (ISDIGIT): Replace with smaller, faster edition
that yields nonzero only on ASCII digits.
(ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
used to have.
* tr.c (is_char_class_member): Use ISDIGIT_LOCALE instead of
ISDIGIT to test for characters in CC_DIGIT class.
* sort.c (digits): Remove; subsumed by new ISDIGIT.
(inittables): Remove initialization of `digits'.
(fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
(fraccompare, numcompare): Avoid casts to unsigned char that are no
longer needed.
* csplit.c (get_format_width, get_format_prec): Avoid
unnecessary comparison of digit to '\0'.
Thu Dec 12 23:42:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (usage): Clarify description of -u option.
From Karl Berry.
Wed Dec 11 19:32:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.20.
Tue Dec 10 00:15:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
The file name, `build-script.pl' is longer than 14 characters.
Rename it.
* tests/cut-test/mk-script.pl: Rename from build-script.pl.
* tests/cut-test/Makefile.am: Reflect renaming.
* tests/tr-test/mk-script.pl: Rename from build-script.pl.
* tests/tr-test/Makefile.am: Reflect renaming.
* tests/sort-test/mk-script.pl: Rename from build-script.pl.
* tests/sort-test/Makefile.am: Reflect renaming.
* tests/join-test/mk-script.pl: Rename from build-script.pl.
* tests/join-test/Makefile.am: Reflect renaming.
Reported by Karl Heuer.
* configure.in (VERSION): Bump to 1.19r.
(AC_ISC_POSIX): Remove kludgy macro.
Use this test instead:
(LIBS): Add -lcposix if it contains strerror.
Patch from Karl Heuer.
Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
=========== Update for automake-1.1k.
* Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
* configure.in (AM_CONFIG_HEADER): Use it.
(AC_OUTPUT): Remove stamp-h timestamping statement.
Now, AM_CONFIG_HEADER does it automatically.
* lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per
new automake requirement.
Rename tu_* variables to libtu_a_*.
Wed Dec 4 21:03:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/pr.c: Apply big patch from Roland Huebner.
* src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
[:upper:] to [:upper:] and [:lower:] to [:lower:].
(main) [POSIXLY_CORRECT]: Give a more specific diagnostic for
the invalid identity mappings [:upper:] to [:upper:] and [:lower:]
to [:lower:].
(class_ok): Update table to reflect that tr now allows these
identity mappings. Suggestion from Risto Kankkunen.
Thu Nov 28 00:31:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
for gettext-0.10.25.
Tue Nov 26 23:05:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (fraccompare): Add explicit `int' in `register' dcls,
to avoid new warning from gcc.
Sun Nov 24 21:02:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/sort-test/Makefile.am (t): Add names of those 5 tests.
* tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code.
* src/sort.c (set_ordering): Revert 1994-05-04 change to this function
so that blanks are not unconditionally ignored when computing start
and end positions for numeric keys with explicit character offsets.
Reported by Markus Demleitner.
Sat Nov 23 16:07:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
* cat.c (usage): Alphabetize option descriptions the way sort -f would.
* fmt.c (usage): Likewise.
* join.c (usage): Likewise.
* md5sum.c (usage): Likewise.
* od.c (usage): Likewise.
* pr.c (usage): Likewise.
* sort.c (usage): Likewise.
* split.c (usage): Likewise.
* wc.c (usage): Likewise.
From Karl Berry.
Fri Nov 22 20:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/csplit.c (process_regexp): Update CURRENT_LINE only if
the new value would be larger. This avoids the infinite loop
otherwise provoked by situations like this:
printf "\na\n" | csplit - '/a/-1' '{*}'
From Jens Schmidt.
Tue Nov 19 23:16:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
has this built-in.
Sat Nov 2 08:50:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
* doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
Otherwise, the generated info files have names longer than
the 14-byte max of some old systems.
Reported by Karl Heuer.
Fri Nov 1 21:33:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/strtol.c: Update from GNU libc.
* tests/sort-test/Test.pm: Add a test to exercize this fix.
* src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
(checkfp): Fix off-by-one error that resulted in writing one byte
beyond the end of a malloc'd buffer. It caused `sort -c' to segfault
on Linux systems having a relatively recent libc. Before, running
the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
would provoke the memory overrun (though not necessarily the failure).
Add an assertion.
Reported by Risto Kankkunen.
Thu Oct 31 17:48:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (key_init): New function.
(main): Use key_init in the two places where it was open-coded.
This fixes a UMR of the general_numeric field.
* src/join.c (decode_field_spec): Always give FIELD_INDEX a value.
This avoids a spurious UMR report from purify.
(prjoin): Add an assertion.
(add_field): Update assertion.
* src/tr.c (es_free): New function.
(parse_str): Use it to plug a small memory leak.
Wed Oct 23 22:02:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/md5.c: Update from GNU libc.
* lib/md5.h: Update from GNU libc.
Mon Oct 21 16:48:12 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/tr.c (validate): Remove TAB from diagnostic, for consistency.
Sun Oct 20 13:44:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
* Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'
(EXTRA_DIST): Remove.
* configure.in: Remove README_ALPHA related code. Automake takes
care of it automatically now when in gnits mode.
* lib/md5.c (md5_process_bytes): Cast void* pointer to char* before
doing arithmetic with it.
Sat Oct 19 23:13:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/md5.c: Update from GNU libc.
* lib/md5.h: Update from GNU libc.
Fri Oct 18 00:08:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_OUTPUT): Add tests/join-test/Makefile.
* tests/Makefile.am (SUBDIRS): Add join-test.
Tue Oct 15 23:25:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/tr.c (get_next): Rewrite to treat lower/upper mapping as a
special case.
(main): Write separate loops to initialize mapping for lower->upper
and upper->lower conversion.
Reported by Arne Henrik Juul.
Sun Oct 13 12:52:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/xstrtol.c (__xstrtol): Return an error for invalid suffix.
Before, e.g., `split -b 1M' would be silently accepted and treated
like `split -b 1'. Reported by Franc,ois.
* src/split.c (usage): Remove parameter, REASON.
(main): Update callers to use combination of error (0, 0, ... and
usage (EXIT_FAILURE).
(main): When a string operand cannot be converted to a number of
bytes or lines, include that string in the diagnostic.
Sat Oct 12 00:05:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol.
* lib/Makefile.am (EXTRA_DIST): Remove.
Thu Oct 10 23:41:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/md5.c (md5_stream): Apply fix from Ralph Loader
<loader@maths.ox.ac.uk> via Ulrich Drepper.
Wed Oct 9 07:26:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD).
Tue Oct 8 21:32:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/error.c: Include error.h to align with libit --
under protest, François :-).
Sun Oct 6 08:02:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME,
AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions.
They're included in automake-1.1f.
* configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of
open-coding it.
Sat Oct 5 12:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/memcpy.c [HAVE_CONFIG_H]: Include config.h.
From Karl Berry.
Fri Oct 4 07:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove it.
* acconfig.h (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove now-unused variable.
* lib/long-options.c (parse_long_options): Separate package name
and version number to accomodate new --version output requirement.
* lib/long-options.h: Update prototype.
Thu Oct 3 23:27:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c (main): Remove dead code that used to print --version
output.
Tue Oct 1 06:54:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM.
* src/Makefile.am (sort_LDADD): Use any library (-lm) that
gets substituted for @POW_LIBM@.
* tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum.
Mon Sep 30 23:35:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum.
* acinclude.m4: Update definitions from gettext-0.24.
Sun Sep 29 20:04:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/sort-test/build-script.pl: Die if close fails.
* tests/tr-test/build-script.pl: Likewise.
* configure.in (AC_OUTPUT): Add tests/cut-test/Makefile.
* tests/Makefile.am (SUBDIRS): Add cut-test.
* tests/cut-test: New directory.
Fri Sep 27 22:22:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (ALL_LINGUAS): Add spanish (es).
Thu Sep 26 21:02:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c (usage): Remove references in --help output to
the now-deprecated --string option. Support for it will be
removed soon. Using this option can provoke a memory access
violation on some systems because of (unavoidable in an efficient
implementation) alignment assumptions made by functions in md5.c.
md5sum.c could leave the option in and accomodate the alignment
restriction, but this option was intended solely for testing, and
the tests are now all file-oriented, so it's not necessary.
* tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option.
Wed Sep 25 21:43:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/sort-test/Makefile.am (t): Factor out .in suffix.
Include new test: t16a.
* tests/tr-test/Makefile.am (t): Likewise.
* src/Makefile.am (EXTRA_DIST): Remove md5-test.rfc.
Mon Sep 23 10:00:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/md5sum-test/Makefile.am (EXTRA_DIST): Distribute $(TESTS).
Sun Sep 22 09:24:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (keycompare): Declare translate to be unsigned char *.
Otherwise, sign extension caused misordering when using e.g. -f.
Reported by Erick Branderhorst.
* tests/sort-test/Test.pm: Add Erick's test for that fix.
* tests/Makefile.am (SUBDIRS): Add md5sum-test.
Sat Sep 21 13:34:59 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (check): Remove tests for md5sum.
* tests/md5sum-test: New directory. Put them here instead.
* configure.in (AC_OUTPUT): Add tests/md5sum-test/Makefile.
Thu Sep 19 08:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/: Rename from checks.
* Makefile.am (SUBDIRS): Change `checks' to `tests'.
* configure.in (AC_OUTPUT): Likewise.
* configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.am (EXTRA_DIST): Remove acinclude.m4.
Thu Sep 12 17:05:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Add getline.c.
(tu_SOURCES): Remove getline.c
From Kaveh Ghazi.
Sun Sep 8 13:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* checks/sort-test/build-script.pl: Prefix $in with \$srcdir/
so make check works with VPATH build. From Uli Drepper.
Sat Sep 7 12:25:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/system.h: Add comments justifying IS* versions of ctype.h macros.
* src/fmt.c (check_punctuation): Use ISPUNCT instead of ispunct.
(get_line): Use ISSPACE instead of isspace. From Bruno Haible.
Mon Sep 2 10:34:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/*.c (usage): Tell where to report bugs.
Sun Aug 25 22:50:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
* checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests.
($x-tests): Guard dependencies with @MAINT@.
* checks/tr-test/Makefile.am: Likewise.
Sat Aug 24 14:25:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings.
Wed Aug 21 22:28:26 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (ALL_LINGUAS): Add polish (pl).
Sun Aug 18 09:34:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
* checks/Makefile.am (SUBDIRS): Add sort-test.
Sat Aug 17 18:57:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.am (EXTRA_DIST): Add acinclude.m4.
Tue Aug 13 21:47:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
Automake includes them automatically.
* configure.in (AM_INIT_AUTOMAKE): Use it.
(AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
(AC_PROG_MAKE_SET): Likewise.
Sun Aug 11 20:49:21 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Rename a few macros for automake-1.1c.
(AC_REPLACE_GNU_GETOPT): Remove.
(AC_PATH_PROG): Find perl -- needed only for checks if you
change or remove things with e.g. make maintainerclean.
* lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@. New AM_WITH_REGEX
adds .o files to @LIBOBJ@.
(tu_SOURCES): Add getopt.c and getopt1.c.
(EXTRA_DIST): Remove getopt.c and getopt1.c.
* acinclude.m4: New file -- derived from aclocal.m4.
* aclocal.m4: This file is now generated by the aclocal program
(which comes with the automake package.)
Sun Aug 4 10:50:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
* checks/: New directory.
* checks/Makefile.am: New file.
* configure.in (AC_OUTPUT): Add new directories: checks,
checks/tr-test.
* Makefile.am (SUBDIRS): Likewise.
Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
redefinition warnings on solaris.
(textdomain) [!ENABLE_NLS]: Likewise.
Thu Jul 25 23:06:35 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/unexpand.c (unexpand): Move EOF check to follow code that
processes and generates output for pending spaces. Before
`printf ' ' |unexpand -t 1,2' generated no output.
* src/md5sum.c (md5_check): Remove parameter, BINARY.
Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
from the input stream rather than the one from the command line.
(main): Fail with a diagnostic if --binary or --text is specified
when verifying checksums.
Reported by Eli Zaretskii <eliz@is.elta.co.il>.
Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Add check for error_at_line so systems with
GNU libc don't compile and link with distributed error.c.
* lib/Makefile.am (tu_SOURCES): Remove error.c.
(EXTRA_DIST): Add error.c.
* configure.in (AC_REPLACE_FUNCS): Replace getline.c.
Add related check for the getdelim function.
From Ulrich Drepper -- as done in gettext.
Sat Jul 20 15:59:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (PACKAGE_VERSION): Use space instead of hyphen to
separate PACKAGE and VERSION.
* aclocal.m4 (AM_SANITY_CHECK_CC): New macro. Derived from
macros from Bruno Haible and from Cygnus.
* configure.in (AM_SANITY_CHECK_CC): Use it.
Wed Jul 17 00:30:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
* install-sh: Get version with MIT copyright.
Tue Jul 16 00:09:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* aclocal.m4 (fp_C_PROTOTYPES): Improved version from
François Pinard.
Update all other macros to reference $fp_cv_prog_cc_stdc, rather
than $ac_cv_prog_cc_stdc.
* src/od.c (OFF_T_MAX): Remove definition.
(main): Compare against LONG_MAX rather than OFF_T_MAX.
Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Many files: Update FSF address.
Sun Jul 14 16:53:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/unexpand.c (unexpand): Fix bug that contributed to endless loop
when invoking `echo ' ' |unexpand -t 1,2': use print_tab_index, not
tab_index in inner flush_pend: while loop. From Keith Owens
<kaos@audio.apana.org.au>.
* src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
[!INT_MAX]: Define it.
(main): Append INT_MAX to command-line-specified tab list to
ensure termination in unexpand's inner loop.
Derived from a patch from Keith Owens.
Thu Jul 11 22:04:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.19.
* configure.in (VERSION): Bump to 1.19.
Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
* aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
those options on that system, sys/stat.h gets compile errors.
With help from Marcus Daniels.
* getopt.c: Update from gettext-0.10.23.
* getopt1.c: Likewise.
* getopt.h: Likewise.
Tue Jul 9 18:07:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
so the left operand of the << isn't signed.
From Kjetil Torgrim Homme.
* po/Makefile.in.in (install-data): Don't install NLS files when
they're not requested. From Ulrich Drepper. Reported by
Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
Fri Jul 5 21:55:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
* po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
* ABOUT-NLS: Likewise.
* intl/*: Likewise.
* aclocal.m4: Likewise.
Thu Jul 4 07:24:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/uniq.c (usage): Remove space before newline in usage message.
* src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
[NEWLINE_REPLACEMENT_STRING*]: Remove macros.
(main): Output a leading backslash for a line describing a file
whose name contains a newline. Then translate each NEWLINE byte
in the file name to the string, "\\n", and each backslash to "\\\\".
File names that don't contain NEWLINE aren't translated.
(split_3): Rewrite to handle file names with embedded newlines.
Miles Bader and Jim Blandy suggested this new encoding scheme.
* src/md5sum.c (md5_file): Replace obsolete comment with a description
of the function.
(md5_check): Don't use "s"-adding trick to form the plural of
`checksum.' That doesn't work well with translation.
Suggestions from Ulrich Drepper.
(split_3): Add missing semicolon so it compiles. From Jim Blandy.
Wed Jul 3 23:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
fact that leading blanks may be stripped.
Tue Jul 2 21:51:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (ALL_LINGUAS): Add dutch (nl).
Mon Jul 1 23:50:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
(split_3): Translate NL bytes not to NUL, but to
NEWLINE_REPLACEMENT_STRING.
Suggested by Ulrich Drepper.
(main): Translate back to NL-containing filename.
Sun Jun 30 22:42:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c (split_3): Take an additional parameter, S_LEN.
Adapt caller.
Map translated NEWLINE-containing filename back into the original
NEWLINE-containing name.
(md5_check): Translate NEWLINE bytes to NUL bytes in filename.
Sat Jun 29 18:59:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
appears in the output of --version. Reported by RMS.
Wed Jun 26 21:35:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (LDADD): Remove sort-specific hack to link
with -lm.
* aclocal.m4 (AM_FUNC_STRTOD): New macro.
* configure.in (AM_FUNC_STRTOD): Use it.
(AC_REPLACE_FUNCS): Remove strtod.
Suggested by Tom Tromey.
* po/Makefile.in.in (install-data): Add `else true;' to avoid
letting failing if-condition cause make failure.
From Fred Fish (fnf@ninemoons.com).
Tue Jun 25 21:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.18a.
Tue Jun 18 20:43:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
* aclocal.m4: Update from gettext-0.10.20.
* ABOUT-NLS: Likewise.
* intl/*: Likewise.
Thu Jun 13 22:31:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (VERSION): Bump to 1.18a.
* po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30.
Depend on POTFILES only when using maintainer mode.
* intl/*: Update from gettext-0.10.18.
Tue Jun 11 23:32:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.18.
* po/Makefile.in.in: Update from gettext-0.10.17.
* intl/*: Likewise.
* ABOUT-NLS: Likewise.
Mon Jun 10 18:22:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.am (cvs-dist): Use -c option in cvs tag command.
Fri Jun 7 22:06:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (VERSION): Set to 1.18.
* src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using
the strtod supplied with this package. Otherwise, linking failed on
Solaris-2.4 systems. Reported by Wayne Stewart <wstewa@atl.com>.
Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
* po/Makefile.in.in: Update from gettext-0.10.16.
* intl/*: Likewise.
* ABOUT-NLS: Likewise.
* aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
gettext-related ones.
Update from gettext-0.10.16.
Fri May 31 22:04:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.17.
* Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is
distributed.
Thu May 30 00:07:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.16.
* tail.c (main): Interpret the old-style +VALUE and -VALUE options
like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm]
suffix multipliers. This makes the code consistent with --help
output. Reported by Karl Heuer.
* sort.c (limfield): #ifdef-out a block of code that makes
GNU sort incompatible with Unix sort when a key-end spec refers
to the N'th character in a field that has fewer than N characters.
The POSIX spec doesn't appear to specify behavior for this case.
From Karl Heuer.
* po/Makefile.in.in (stamp-cat-id): Avoid using temp filename
longer than 14 characters.
(mostlyclean): Likewise.
From Karl Heuer.
* po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only
when using maintainer mode. Reported by Karl Heuer.
* po/Makefile.in.in (.po.mo): Reenable dependency and rule.
It is required when using native NLS, e.g. on Solaris.
From Marcus Daniels.
* od.c (decode_one_format): Use %lu (not %d) printf format
corresponding to unsigned long, SIZE.
* Version 1.15.
* intl/Makefile.in (installcheck): New target.
* po/Makefile.in.in (installcheck): New target.
* od.c (decode_one_format): Take another parameter.
Give a specific diagnostic for invalid format spec here rather
than an overly general one from caller's caller.
(decode_format_string): Update caller.
(main): Don't give diagnostic here when decode_format_string fails.
Remove assertions that could fail on some Crays because they don't
have a two-byte type.
Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.
Mon May 27 17:43:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
* cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
less portable fileno (stdin) and fileno (stdout).
* sort.c (main): Use STDIN_FILENO instead of less portable
fileno (stdin).
Mon May 20 21:50:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
* Makefile.am (distcheck): Remove target and rule -- automake-0.33
adds it automatically.
Sun May 19 13:15:49 1996 Jim Meyering (meyering@na-net.ornl.gov)
* configure.in (LINGUAS): Add ko.
* Makefile.am (distcheck): Remove @MAINT@ prefix from first command.
Thu May 16 22:18:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
* Makefile.am (distcheck): New target. From Gord Matzigkeit.
Fri May 10 20:46:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
* po/Makefile.in.in (all-yes): Always depend on CATALOGS. Otherwise
they won't be built and install could fail. From Ulrich Drepper.
(.po.mo): Disable dependency and rule when not in maintainer mode.
* aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
on whether we're using GNU gettext. From Ulrich Drepper.
Wed May 8 21:10:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
* intl/Makefile.in (distdir): Renamed from dist. For compatibility
with automake-0.32.
* po/Makefile.in.in (distdir): Likewise.
* po/Makefile.in.in (all-yes): Depend on GMOFILES.
Depend on CATALOGS and GMOFILES files only in maintainer mode.
Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
* configure.in: Require autoconf-2.10.
* aclocal.m4 (jm_MAINTAINER_MODE): New macro.
* configure.in (jm_MAINTAINER_MODE): Use it.
Sat May 4 20:40:01 1996 Jim Meyering (meyering@na-net.ornl.gov)
* configure.in (LINGUAS): Add de.
* po/de.po: New file.
* memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
* regex.c [IN_CTYPE_DOMAIN]: Likewise.
* system.h [IN_CTYPE_DOMAIN]: Likewise.
Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
* fmt.c (copy_rest): Don't copy past end of prefix. Output
trailing spaces if the prefix had any. Before, fmt would
improperly output NUL bytes. The command
perl -e 'print "| S";' |fmt -p' | '|tr '\0' @
output `|@S'. Reported by François Pinard.
* sort.c (main): Give a better diagnostic for `sort -0'.
Reported by Karl Berry.
* configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
Otherwise, some systems lose because the value AC_C_INLINE choses
with plain `cc' is different from that chosen when using the ANSI-mode
C compiler. From Kaveh Ghazi.
Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
* aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
* configure.in: Use it.
* lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
(EXTRA_DIST): Add getopt.c and getopt1.c
* src/*.c, src/*.h: Update Copyright years to include 1996.
Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
* getline.c: New version from gettext-0.10.12.
* getline.h: Likewise.
* configure.in (AC_CHECK_FUNCS): Add getdelim.
Suggested by Ulrich Drepper.
* md5sum.c (md5_check): Remove spurious newline at end of error
format string.
* od.c (decode_one_format): Use printf's L modifier for long doubles,
not `l'. From Eric Backus.
* Makefile.am (LDADD): Put @INTLLIBS@ before package library.
* od.c: Include <values.h>.
[!BITSPERBYTE]: Define.
[OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
* configure.in (AC_CHECK_HEADERS): Add values.h.
Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov)
* Makefile.am (cvs-dist): New rule. Based on the one from
Tom Tromey's automake.
Thu Apr 18 22:13:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
* tail.c (main): Make code clearer: use new variable `n_files' in
place of `argc - optind'. Use `file' instead of `argv + optind'.
Sat Apr 13 13:08:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
* lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
not memcasecmp.c.
* memcasecmp.c: Unprotoize.
[ISASCII]: Define.
[ISUPPER]: Define.
* join.c (decode_field_spec): Rename local variable `valid'
to invalid (and reverse sense) to avoid conflict with the
macro definition in /usr/include/locale.h on SunOS 4.1.3.
Tue Apr 9 22:43:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
* uniq.c: Add new option --ignore-case (-i).
Include memcasecmp.h.
(different): Compare with memcasecmp if ignoring case.
(main): Handle 'i'.
* join.c (memcasecmp): Remove static definition of function.
Include memcasecmp.h instead.
* memcasecmp.c: New file.
* memcasecmp.h: New file.
* lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
(noinst_HEADERS): Add memcasecmp.h.
Thu Apr 4 17:05:33 1996 Jim Meyering (meyering@na-net.ornl.gov)
* tr.c: The following commands all failed unnecessarily.
tr -cs '[:upper:]' '[X*]'
tr -dcs '[:lower:]' n-rs-z
tr -ds '[:xdigit:]' [:alnum:]'
tr -dcs '[:alnum:]' [:digit:]'
tr -dc '[:upper:]'
Reported by Ross Ridge (ross@worf.mks.com).
(validate): Add missing conjunct (translating) in test for
`translating and complementing character classes' error. Before,
valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
(homogeneous_spec_list): New function.
(validate): Use it to relax the old (overly restrictive) restriction
that prohibited use of complemented character classes when translating.
Now, that is allowed as long as the translation maps many to one.
(get_spec_stats): Rename and redefine global has_char_class from
has_upper_or_lower.
Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
* aclocal.m4: Update NLS macros from gettext-0.10.11.
* src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
when srcdir != builddir. From Kaveh Ghazi.
Wed Mar 27 23:33:36 1996 Jim Meyering (meyering@na-net.ornl.gov)
* cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
to be POSIX compliant. From Stephen Gildea <gildea@x.org>.
Sun Mar 24 08:47:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
* join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
* od.c (skip, main): Likewise.
* tr.c (main): Likewise.
* cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
EXIT_FAILURE, rather than 0 or 1.
Sat Mar 23 23:14:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
* system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
is defined to zero. Suggested by Paul Eggert.
* sort.c [SORT_FAILURE]: New macro.
Be careful to exit with 1 only when -c is used and the
input is not properly sorted. In all other cases, use
SORT_FAILURE as required by POSIX.
(main): Change some `error (1, ...' to use SORT_FAILURE.
Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
Replace all uses of `2' (as exit code) with SORT_FAILURE.
Thu Mar 21 22:47:50 1996 Jim Meyering (meyering@na-net.ornl.gov)
* csplit.c: Include assert.h, but disable assertions.
(process_line_count): Replace if-abort with a slightly relaxed
assertion. Before, `echo |csplit - 1 1' would abort.
Reported by Samuli.Karkkainen@hut.fi.
(parse_patterns): Disallow uses like `csplit FILE 0' with zero
line number, `csplit FILE 2 1' with decreasing line numbers, and
warn about uses like `csplit FILE 3 3' that have equal line numbers.
* sort.c (main): Declare to be of type int, not void.
From Peter Seebach <seebs@taniemarie.solon.com>.
* cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
wc.c (main): Likewise.
Sat Mar 16 16:30:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
* configure.in (PACKAGE_VERSION): New macro.
* acconfig.h (PACKAGE_VERSION): Add it.
* src/Makefile.am: Remove rules for generating version.c.
Remove references to version.o, version.h, and stamp-v.
* version.c: Remove file.
* version.h: Remove file.
* cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
version.h.
(main): Use PACKAGE_VERSION instead of version_string.
Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov)
* sort.c (write_bytes): Renamed from xfwrite.
Remove SIZE parameter. It was always 1. Update all callers.
Rename NELEM parameter to N_BYTES and change its type to size_t.
Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov)
* cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
Initialize for internationalized message support: call setlocale,
bindtextdomain, and textdomain.
* system.h: Add definitions and includes for NLS.
* Makefile.am (SUBDIRS): Add intl and po.
* src/Makefile.am (datadir): Define.
(localedir): Define.
(DEFS): Add LOCALEDIR definition.
(LDADD): Add @INTLLIBS@.
* aclocal.m4: Add NLS-related macro definitions from
gettext distribution.
* acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
HAVE_STPCPY): New macros.
Add PACKAGE and VERSION.
* configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
(VERSION): Likewise.
(ALL_LINGUAS): Define.
(AC_CHECK_HEADERS): Add float.h.
(ud_GNU_GETTEXT): Use it.
Link an nls file.
(AC_OUTPUT): Reflect addition of two new directories, intl and po.
Create po/Makefile.
From François Pinard.
* tr.c (star_digits_closebracket): Declare formal param, IDX,
and local I to be of type size_t (rather than int) to avoid
warnings from gcc -Wall.
Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
* src/Makefile.am: Adapt for automake-0.30.
(noinst_HEADERS): Rename from HEADERS.
(INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
to DEFS automatically.
* lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
* join.c (xfields) [without -t]: Ignore leading blanks.
From David Dyck (dcd@tc.fluke.COM).
Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
* join.c [TOLOWER]: Define.
(usage): Briefly describe new --ignore-case (-i) option.
(memcasecmp): New function.
(main): Set IGNORE_CASE for -i.
(keycmp): Compare with memcasecmp if IGNORE_CASE is set.
Suggestion and an initial patch from Alberto Accomazzi
<alberto@cfa0.harvard.edu>.
Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
* sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'.
(usage): Describe it.
(main): Set eolchar to 0 for -z.
From Mark W. Eichin <eichin@cygnus.com>.
Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
* join.c (main): Mark two strings for translation.
* md5sum.c (md5_check): Mark a string for translation.
From François Pinard.
Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
Update for automake-0.29.
* Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
* src/Makefile.am: Likewise.
* lib/Makefile.am: Likewise.
* doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
* man/Makefile.am (man_MANS): Renamed from MANS.
* fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
[FALSE]: Likewise.
From Derek Clegg (dclegg@next.com).
Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
* Version 1.14.
Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
* tail.c (dump_remainder): Flush stdout when tailing-forever on
multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>.
Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
* aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
not just -Xc. From François Pinard.
* doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is
distributed automatically. From Tom Tromey.
Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov)
* nl.c: Include rx.h after limit.h (not before) to avoid warning
about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects
its definition. From Kaveh Ghazi.
* src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
works again. Reported by François Pinard and Kaveh Ghazi.
* rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
[SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
(RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
mismatch errors from e.g. SunOS's /bin/cc.
Reported by Kaveh Ghazi.
Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov)
* configure.in (VERSION): Set variable directly rather than from
a separate file.
* Makefile.am (DIST_OTHER): Remove VERSION.
* src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
(stamp-v): New target; depend on Makefile.
(DISTCLEANFILES): Add stamp-v, version.c.
Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov)
* sort.c (keycompare): Rewrite cases handling ignored characters
so that they really are ignored. Reported by Carl Johnson
<carlj@cjlinux.home.org>.
Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in: Touch stamp-h only if config.h is remade.
* csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
syntax_parens field.
Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com)
Use automake to generate Makefile.in files.
* Makefile.am: New file.
* doc/Makefile.am: New file.
* lib/Makefile.am: New file.
* man/Makefile.am: New file.
* src/Makefile.am: New file.
Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com)
* fmt.c (main): Use xstrtol instead of atoi.
* fold.c (main): Use xstrtol instead of atoi.
(fold_file): Make a couple locals `int', not size_t, and cast
fwrite's third parameter to size_t.
* nl.c (main): Use xstrtol instead of atoi.
Rename misleading --first-page=N option to --starting-line-number=N.
(usage): Update.
* uniq.c (main): Use xstrtol instead of atoi.
Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com)
* aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com)
* aclocal.m4 (ud_WITH_REGEX): New macro.
* configure.in: Use it.
* rx.c, rx.h: New files.
* lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
(SOURCES, DISTFILES): Add rx.c, rx.h.
* acconfig.h (WITH_REGEX): Add it.
* csplit.c [!WITH_REGEX]: Include rx.h.
* nl.c [!WITH_REGEX]: Likewise.
* tac.c [!WITH_REGEX]: Likewise.
From Ulrich Drepper and François Pinard.
Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com)
* sort.c (main): Diagnose invalid arguments to -k, then fail.
* sort.c (numcompare): Properly handle all cases in which signs differ.
From Karl Heuer.
* Makefile.in (mandir): @mandir@ is just $(prefix)/man.
Append `/man1'. Reported by Karl Heuer.
* sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer.
* src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi.
Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com)
* lib/Makefile.in (default): New target.
* sort.c (numcompare): Properly order `-' and valid integers;
treat `-' as if it were zero. Reported by Ross Alexander
<r.alexander@auckland.ac.nz>.
* Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
(.PHONY): Depend on default.
Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com)
* aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
(jm_AUTODEPS): Likewise.
(jm_WITH_GNU_MAKE): Likewise.
* configure.in (jm_AUTODEPS): Remove.
* sort.c (begfield): Replace loop with equivalent if-else.
(limfield): Fix bug that made field specs like -k1.5 return a
pointer into LINE beyond the first field.
Don't try to trim trailing blanks here; it's not
possible because we don't know where the field begins.
Replace loop with equivalent if-else.
(trim_trailing_blanks): New function.
(findlines): Call it.
(keycompare): Likewise.
(main): Don't decrement T2 corresponding to `x' in field
specs like -ku.v,w.x.
Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com)
* csplit.c [!UINT_MAX]: Define.
[!INT_MAX]: Define.
Include xstrtoul.h.
(string_to_number): Remove function.
(check_for_offset): Use xstrtoul instead of string_to_number.
(parse_repeat_count): Likewise.
(parse_patterns): Likewise.
(main): Likewise.
Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
* Makefile.in (all et. al.): If make was invoked with -k and a
sub-make fails, fail after the loop rather than exiting right away.
Otherwise, make's -k option could be ineffective.
Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com)
* src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
Update for autoconf-2.5:
* src/Makefile.in (libdir): Set to @libdir@.
(bindir): Set to @bindir@.
* doc/Makefile.in (infodir): Set to @infodir@.
* man/Makefile.in (exec_prefix): Remove it.
(mandir): Set to @mandir@.
(bindir): Remove it.
Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
* Makefile.in (default): New default target. Depend on `all' to
work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
<luik@isa.de>.
Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com)
* mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
* aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
* src/Makefile.in (C_MKDEP): Rename from MKDEP.
* lib/Makefile.in (C_MKDEP): Likewise.
* mkdep-Makefile (C_MKDEP): Likewise.
Add comments.
* csplit.c [__P]: Don't define it here.
* pr.c [__P]: Don't define it here.
* fmt.c [__P]: Don't define it here.
* system.h [__P]: Define it here.
* aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
Revamp, with suggestions from Franc,ois Pinard.
(jm_WITH_GNU_MAKE): New macro.
(jm_PROG_MKDEP): New macro.
* configure.in (jm_PROG_MKDEP): Use it.
* src/Makefile.in (MKDEP): Set it.
* lib/Makefile.in (MKDEP): Likewise.
* mkdep-Makefile: Use MKDEP, not DEP_CC.
(DEP_CFLAGS): Remove it.
Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
* sort.c: Add support for sorting numbers in scientific notation.
Include xstrtod.h.
(struct keyfield): Add field: general_numeric.
(usage): Describe -g option.
(general_numcompare): New function.
(keycompare): Use new comparison function when general_numeric
flag is set.
(set_ordering): Honor `g' flag.
(main): Initialize and use new field.
From Marcus Daniels <marcus@sysc.pdx.edu>.
* configure.in (AC_REPLACE_FUNCS): Add strtod.
* lib/Makefile.in (SOURCES): Add xstrtod.c.
(OBJECTS): Add xstrtod.o.
(DISTFILES): Add xstrtod.h.
* csplit.c (cleanup): Don't exit.
(interrupt_handler): Rewrite to reset default signal handler
then repost caught signal.
(xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
process_line_count, process_regexp, create_output_file,
close_output_file): Call cleanup_fatal, not cleanup.
Add const attribute to lots of parameters.
(cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
Update callers.
* tac.c: (cleanup): Don't exit.
(cleanup_fatal): New function. Call cleanup, then exit.
(sighandler): New function.
(cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
Update callers.
(tac_stdin): Set up sighandler as signal handler, not `cleanup'.
Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com)
* od.c (skip): Cast fseek's offset argument to `long'.
Erik Bennett <bennett@cvo.oneworld.com> reported that this is
necessary on BSDI systems. And if offset doesn't fit in a long,
then try using lseek instead.
* sort.c (xmalloc): Declare static.
(xrealloc): Likewise.
* tac.c (cleanup): Add signal number parameter.
Update callers.
* cat.c (main): Don't die when dev/ino of input and output are
the same and the file descriptors correspond to stdin and stdout.
This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
Otherwise, running `cat << X > $$' would fail with `cat: -: input
file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
* Makefile.in (DISTFILES): Add @README_ALPHA@.
(config.status) Depend on VERSION.
* configure.in: Set README_ALPHA if the version number ends in [a-z].
Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com)
* fold.c (usage): Clarify meaning of --spaces. From Karl Berry.
src/Makefile.in (.c._c): Don't redirect directly to $@.
(._c._o, .c._o): Remove temporary src file.
Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com)
* VERSION: New file.
* configure.in (VERSION): New variable.
(PACKAGE): New variable.
* Makefile.in (DISTFILES): Add VERSION.
(distdir): Use @PACKAGE@-@VERSION@, not distname.
Remove all references to distname.
* src/Makefile.in (version.c): Generate it.
(SOURCES): Remove now-generated version.c.
(distclean): Delete version.c.
* doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
not version.c
* */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
Remove all references to distname.
* split.c: New option: --verbose.
(main): Recognize it.
(usage): Document it.
From Marty Leisner <leisner@sdsp.mc.xerox.com>.
Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com)
* src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
and unexpand.c.
* pr.c: Protoize.
(store_columns): Remove spurious 2nd argument in call to read_line.
[__P]: Define. Use it in prototyped forward decls.
* csplit.c: Move prototypes after struct declarations.
Remove prototypes for xmalloc, xrealloc.
Protect prototypes with __P.
(new_control_record): Cast arg 1 to realloc.
* fmt.c [__P]: Test PROTOTYPES, not __STDC__.
Protoize.
Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com)
* csplit.c (close_output_file): Set output_stream to NULL so we
don't recurse endlessly between this function and cleanup.
* unexpand.c: Reorder functions to obviate forward dcls. Remove
forward dcls. Protoize. Add `const' attribute to some parameters.
Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com)
* wc.c: Reorder functions to obviate forward dcls. Remove
forward dcls. Protoize. Add `const' attribute to some parameters.
* uniq.c: Likewise.
* split.c: Likewise.
* split.c (isdigits, convint): Remove these.
(main): Use xstrtol instead.
Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com)
* paste.c (main): Move function body to end of file.
Remove forward dcls and protoize.
* sum.c (main): Likewise.
* nl.c: Protoize. Reorder functions to obviate forward dcls.
Remove forward dcls.
* tac.c: Likewise.
* src/Makefile.in (OBJECTS): Reflect that all of the above
now use prototypes.
* sum.c (bsd_sum_file): Give file name parameter const attribute.
(sysv_sum_file): Likewise.
* tac.c (xwrite): Give output buffer parameter const attribute.
(output): Likewise for both parameters.
(tac): Likewise for file name parameter.
(tac_file): Likewise.
Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com)
* md5sum.c (md5_check): Use the same message format when there is
a single file and it gets a read error or checksum mismatch as when
there are more. Write that warning to standard error, not standard
output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com)
* sort.c (xtmpfopen): New function to set proper permissions on
temporary files. Use it instead of xfopen. Reported by Erik Corry
(erik@kroete2.freinet.de).
Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com)
* aclocal.m4 (jm_WITH_AUTODEPS): New directive.
* configure.in: Use it.
* lib/Makefile.in (INCLUDE, COMPILE): New variables.
(.c.o): Rewrite to be more like src/Makefile.in.
* src/Makefile.in (distclean): Remove .deps.
Include @top_srcdir@/mkdep-Makefile.
* mkdep.Makefile: New file.
* Makefile.in (DISTFILES): Add mkdep-Makefile.
* doc/Makefile.in (mostlyclean): Also remove *.info.
Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com)
* od.c: Indent cpp directives.
* tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
with large repeat counts.
(struct E_string): New struct.
(find_closing_delim): Take E_string arg rather than char* and length.
(find_bracketed_repeat): Likewise.
(star_digits_closebracket): New function.
(append_char_class): No longer give diagnostic.
(append_equiv_class): Likewise.
(build_spec_list): Give them here instead, allowing string1 like
[:*][:upper:] that got errors before.
Take E_string arg rather than char*.
Convert switch stmts into if-then so as to use ES_MATCH.
Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com)
* cat.c: Protoize. Reorder functions to obviate forward dcls.
Remove forward dcls.
* expand.c: Likewise.
* fold.c: Likewise.
* head.c: Likewise.
* od.c: Likewise.
* sort.c: Likewise.
* tail.c: Likewise.
* src/Makefile.in (OBJECTS): Reflect that all of the above
now use prototypes.
* head.c: Add `const' attribute to dcls of lots of formals.
* sort.c: Add `const' attribute to dcls of lots of formals.
Move struct dcls to precede dcls of file-scope variables.
(monthtab, keyhead): Separate variable dcls from type dcls.
Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com)
* join.c (add_field_list): Allow SPACE and TAB as well as `,' as
list item separators, per POSIX spec.
(prjoin): Rewrite loop that iterates over field specs.
Handle case in which file spec is 0.
Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com)
* strpbrk.c: New file.
* lib/Makefile.in (SOURCES): Add strpbrk.c.
Remove bcopy.c.
Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com)
* join.c (add_field): No longer return a value.
(decode_field_spec): New function.
(add_field_list): Rewrite to be more strict.
Before, `,1.2' was accepted as valid.
(main): Use xstrtol instead atoi.
Combine nearly identical -a and -v cases.
Close input files.
Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com)
* join.c (main): Report `too few/many non-option arguments'
then print --help output rather than just the latter.
Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
(usage): Describe POSIX -1, -2 options and deprecate -j* ones
* join.c (usage): Move to precede all other functions.
* join.c: Protoize.
Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com)
* csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
to determine whether `sigaction' functions are available.
Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
Fix suggested by Karl Berry.
* md5sum.c (main): Declare counter, N_STRINGS, to be an integral
type, not `char'.
* cut.c: Convert many declarations using `int' to use `unsigned int'
to avoid warnings from `gcc -Wall' about comparing signed and
unsigned types.
(set_fields): Use memset (not open coded loop) to initialize array.
Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com)
* Version 1.13.
* Makefile.in (DISTFILES): Remove README.alpha for major release.
* od.c (decode_one_format): Remove spurious semicolon.
From John Kodis.
Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
* man/Makefile.in (install-data, uninstall): Use sed not basename.
The GNU Coding Standard suggests that only a select set of
relatively standard utilities be used in Makefiles. basename is
not among them. Suggested by Ulrich Drepper.
Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com)
* cksum.c: Protoize.
* cut.c: Protoize.
* src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
prototypes.
(cksum): Depend on cksum$O.
(cut): Depend on cut$O.
Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
* Version 1.12.2.
* Makefile.in (DISTFILES): Add README.alpha.
* lib/Makfile.in: (GETOPT, MEMCHR, REGEX): New variables.
(OBJECTS): Use them instead of hardcoding object file names.
Suggested by Ulrich Drepper.
* md5sum.c (md5_check): Distinguish between open/read failure
and checksum mismatch.
Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com)
* md5sum.c: Protoize.
* src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
(join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
(md5sum): Depend on md5sum$O.
* md5sum.c (main, usage): Remove -h, -s, -v short options.
Rename --verbose to --warn, --quiet to --status.
(main): Handle --help and --version using parse_long_options.
(md5_check): Check ferror.
* sort.c (tempname): Replace `16' with a more readable expansion.
Make sure that counter never exceeds 99999.
(checkfp): Rearrange loop to avoid duplicate test.
Move a couple dcls from function scope into inner block.
Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com)
* md5sum.c (main): Fail if either --verbose or --quiet is specified
when not verifying checksums.
* md5sum.c (md5_check): Fail if no valid line is found.
Don't use the word `fail' unless there were failures --
instead, say `all N tests passed.'
* md5sum.c (main) [handling --string option]: Don't output
nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com).
* md5-test.rfc: Remove now-inconsistant `b' marker.
(usage): Clarify help message. With suggestions from Greg Troxel.
Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
* sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
compiler warning. From Ulrich Drepper.
* pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
compiler warning. From Ulrich Drepper.
* Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
From Franc,ois.
Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com)
* system.h (_): Define macro -- as empty for now.
* src/*.c: Annotate localizable strings with _(...). From Franc,ois.
Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com)
* Version 1.12.1.
* configure.in: Add fp_C_PROTOTYPES.
Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com)
* src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
Add suffixes, dependencies, and rules to convert ANSI source to K&R
when required. Mark tr.o and comm.o as the only such files (for now).
* tr.c: Protoize.
* comm.c: Protoize.
* Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
(configure): Depend on aclocal.m4.
(stamp.h.in): Depend on aclocal.m4 and acconfig.h.
Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
* md5sum.c (md5_check): Use getline instead of fgets.
* lib/Makefile.in: (SOURCES): Add getline.c.
(OBJECTS): Add getline.o.
(DISTFILES): Add getline.h.
(getline.o): Depend on getline.h.
* md5.c [memcpy]: Define to bcopy if needed.
(md5_buffer): Explicitely cast SWAP expressions to unsigned
to avoid warning.
* lib/Makefile.in (strtoul.o): Depend on strtol.c.
* sort.c (check): Print `disorder on...' message on standard error,
not stdout. This is a minor concession to POSIX which says
`no output shall be produced...'.
* sort.c (main): Fix -k so it works. -k 2,3 was being treated
like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com)
* man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
before applying $(transform) to manual name. From Karl Berry.
* md5sum.c (have_read_stdin): New global variable.
(md5_file, md5_check): Set it.
(main): Use it.
* md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
(md5_file): Take a new parameter, MD5_RESULT, and no longer
generate output.
(md5_check): Invoke md5_file instead of calling fopen directly.
When giving a diagnostic for a line with invalid format, also report
the line number.
(main): Generate output after a successful md5_file call.
[in many places]: Upon detection of an error, rather than exiting
immediately, issue a diagnostic, note that an error occurred and
exit later.
Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com)
* tail.c (tail_bytes) [from_start]: For regular files, seek
relative to the initial input file pointer position, not
necessarily from the beginning of the file.
[!from_start]: Don't back up past the initial position of the
input file pointer.
(tail_lines): Call file_lines only if FD refers to a regular file
with its file pointer positioned at beginning of file. Otherwise,
call pipe_lines. This is a kludge. Once there's a decent test
suite, fix this properly.
Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
would output both lines of the input file even though the first had
already been read. Reported by John Roll (john@panic.harvard.edu).
* md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
* csplit.c (main): When too few arguments are given, don't just
issue the usage message; also report why.
Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com)
* md5sum.c (md5_check): New function -- extracted from main.
Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
* md5sum.c (md5_file): New function -- extracted from main.
(main): Call the new function instead of doing all that in an
if-stmt. Always use "%s" format rather than raw filename as
format argument in printf-style functions like error. Otherwise,
filenames containing `%' are likely to lose.
Remove all mention of `old format'.
(split_3): No longer parse the `new format.' There is only one
valid format now: the compatible one.
* lib/Makefile.in: (SOURCES): Add md5.c.
(OBJECTS): Add md5.o.
(DISTFILES): Add md5.h.
(md5.o): Depend on md5.h.
* system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
* lib/md5.c (md5_stream): Check for read failure and return
indication of success rather than second argument.
* lib/md5.h (md5_stream): Update prototype.
[__P]: Define macro.
* md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
(main): Report an error if md5_stream fails. Otherwise, running
`md5sum dir-on-mounted-filesystem' always reported the checksum
for an empty file. Now it gets the `is a directory' error.
Greg McGary (gkm@magilla.cichlid.com) reported that the released
version got stuck in an infinite loop with such arguments.
* lib/md5.c: New file.
* lib/md5.h: New file.
* md5sum.c: Rewritten to use library interface.
From Ulrich Drepper.
Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com)
* configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com)
* md5sum.c Add #else block after #ifdef VMS.
(main): Rename local variable.
Detect and report failed fclose calls on stdout and checkfile_stream.
* tr.c (unqote): Comment out unreachable break stmts.
(append_range): Declare FIRST and LAST parameters to be unsigned int,
not size_t.
(find_closing_delim): Clean up interface, separating boolean success
indicator and index.
(find_bracketed_repeat): Likewise.
(build_spec_list): Adapt to use new interfaces.
Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
type size_t, not int.
(main): Declare NR and CHARS_READ to be of type long, not int.
* sort.c (main): Comment out unreachable break stmt.
* tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type
off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
* comm.c: Reorder functions so main is last, so no forward dcls
are needed.
Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com)
* sort.c (main): When using obsolescent +pos -pos syntax, allow
omission of field spec only when character offset is specified.
Otherwise, -. +. would be accepted.
Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com)
* sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
position specification. For compatibility with existing practice
(what vendors?), omitting M is now equivalent to specifying `0' for M,
but only when using the +pos -pos syntax, not with the -k option.
From Rick Sladkey (jrs@world.std.com).
Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com)
* od.c (dump): Correct loop-termination criterion.
Before, running `printf 1234| ./od --width=4 --read-bytes=4'
printed output for 8 bytes -- the last four were garbage.
This happened only when the dump limit, N, was specified (with
--read-bytes=N) and N was a multiple of bytes_per_block
(usually 16, but 4 in this example). From Andreas Schwab.
Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com)
* lib/Makefile.in (check): Depend on libtu.a.
* md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
(main): Print each sum line in (de facto) standard Plumb/Lankester
format.
New option: --quiet.
Check option no longer takes an argument.
When checking, exit status reflects success.
Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com)
* md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
Autoconf (via config.h) defines it away for compilers that don't
grok it.
* cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
defining to avoid redefinition warning on some systems.
* csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
This avoids potential conflict with max macro from some system's
header files when using bad pre-ANSI compilers.
* uniq.c (usage): Fix typo in text of --help output.
From Steve McConnel <steve@acadcomp.sil.org>
* md5sum.c [uint32]: When testing for 32-bit arithmetic type,
also check `unsigned long', as a concession to systems with
int's smaller than 32 bits.
* configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
AC_FUNC_MEMCMP already handles it. This avoids warnings from
ranlib on nextstep systems. From Kaveh Ghazi.
* csplit.c (interrupt_handler): Declare to have a single integer
parameter. Otherwise, some compilers fail with a type mismatch
error in sa_handler assignment.
* fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with
headers that typedef `word' get syntax errors because of the
variable by the same name.
* join.c [join]: Redefine to avoid conflict with prototype in some
system header file. Also for Unicos.
* md5sum.c (main): Remove spurious colon in getopt spec string.
From Ken Pizzini <kenp@spry.com>.
Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com)
* md5sum.c (md5_file): Initialize two elements of LEN portably,
rather than with ANSI aggregate initialization. Reported by
Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com)
* Version 1.12.
* md5sum.c (process_buffer): Copy values from struct into
individual local variables before performing computation on them,
then copy results back into returned struct. Solely for better
optimization by compilers that can't keep struct members in
registers. From Ulrich Drepper.
Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com)
* md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
Don't use #elif. Some older compilers don't grok it.
(split_3): New function to parse out sum, flag, and filename
when reading check file.
(hex_digits): Remove length parameter since string parameter is
now nul-terminated.
(main): Don't allocate separate arrays for filename and sum
when checking. Get pointers into line buffer with split_3 instead
of using sscanf.
(main): Treat `no file args' just like `-' when not checking
or using strings.
(hex_digits): Unprotoize.
* md5sum.c (main): Don't use a separate loop to convert to lower
case. Suggested by Ulrich Drepper.
(CLOSE): New macro.
(md5_file): Use it.
From Ulrich Drepper.
* md5sum.c: Don't include values.h.
[__P]: Undefine it.
* md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
and _POSIX_VERSION. Reported by Arne H. Juul.
Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com)
* tr.c [NDEBUG]: Define it to disable assertions. Some systems
have a broken <assert.h> header.
(is_char_class_member): Set a variable in each branch of switch
stmt and return that value after the switch (rather than returning
directly from every branch).
(unquote): More int->size_t changes.
(build_spec_list): More int->size_t changes.
Be very careful about comparison now that variables are unsigned:
Use i + 2 < len rather than i < len - 2. The latter didn't work
for len < 2. Caught early thanks to a thorough regression test
suite.
Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com)
* sort.c (xfclose): Don't try to flush stdin, only stdout.
Otherwise, at least Ultrix-4.3's fflush would return EOF.
Reported by Jim Blandy (jimb@cyclic.com).
* tr.c (non_neg_strtol): Don't compare signed and unsigned.
[struct Spec_list] (indefinite_repeat_element): New member.
Use size_t rather than int or unsigned long where reasonable.
(get_spec_status): Make interface cleaner.
(get_s1_spec_status): New function.
(get_s2_spec_status): New function.
(validate): Use new functions instead of get_spec_status.
Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
* md5sum.c: New file. From Ulrich Drepper.
* md5-test.rfc: New file.
* Makefile.in: (PROGS): Add md5sum.
(check): Run a recursive make in each subdirectory.
* man/Makefile.in: (MANFILES): Add md5sum.1.
* src/Makefile.in: (SOURCES): Add md5sum.c.
(OBJECTS): Add md5sum.o.
(PROGS): Add md5sum.
(check): Add basic checks for md5sum.
(md5sum): Add dependency and link rule.
(DISTFILES): Add md5-test.rfc.
* tr.c (look_up_char_class, append_char_class, append_equiv_class):
Use const attribute when appropriate.
Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com)
* join.c: Overhauled to make -a1 and -a2 options work.
Passed all tests in a fairly thorough test suite.
Reported by Michael Hasselberg (mikelh@zonta.ping.de).
Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
* tail.c (main): Remove dcl of and statements that set now-unused
variable.
* system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
Without this, SunOS doesn't get type for memchr.
Reported by Kaveh Ghazi.
Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com)
* tail.c (tail_lines): Change one more `long' to `off_t'.
Otherwise, tail didn't work on NetBSD. From Arne H. Juul.
* csplit.c [struct control]: Change type of `repeat' to unsigned
long to avoid conversion warning.
Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com)
* Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
* xstrtol.c (__strtol): Remove prototype altogether.
Move inclusion of xstrtol.h back so that it follows system headers.
* Version 1.11.2.
Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com)
* join.c (ADD_FIELD): Declare in K&R style, not ANSI.
From Kaveh Ghazi.
* xstrtol.c: Define NDEBUG for systems with losing assert.h.
(__strtol): Add __unsigned to prototype and use __P.
Move inclusion of xstrtol.h to precede prototype.
From Kaveh Ghazi.
* memmove.c: Include config.h for definition of const.
From Kaveh Ghazi.
* All Makefile.in (install-exec, install-exec): New targets.
From Karl Berry.
* tr.c (look_up_char_class): Take a string length argument -- required
because the argument is a string that is *not* NUL-terminated.
Use strncmp, not strcmp and add string lengths comparison.
(append_char_class): Update caller. Before this change,
tr '[:upper:]' '[:lower:]' read one uninitialized byte.
From Andreas Schwab.
* split.c (next_file_name): Move dcls of file-scope variables into
this function. Don't rely on arithmetic being two's complement.
* paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
Instead, declare two FILE structs and use their addresses.
* csplit.c (record_line_starts): Remove set-but-not-used,
file-scope variable.
Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com)
* all source files (usage): Include one- or two-line synopsis
in --help output. From Karl Berry.
* lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
longer used.
Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com)
* Version 1.11.1
Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com)
* all Makefile.in (maintainer-clean): Renamed from realclean
per GNU Standards.
Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com)
* sort.c (main): Use stat, not safe_stat. The latter was unnecessary.
Don't include safe-stat.h.
* lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
Remove all associated rules. safe-l?stat.h are no longer used.
* sort.c Don't hard-code /tmp.
[DEFAULT_TMPDIR]: Use this instead.
* tac.c (save_stdin): Likewise.
* sort.c (set_ordering): Properly parse arguments like `+x.yn'.
Reported by John Salmon (johns@mullet.anu.edu.au).
Patch from Mike Haertel.
Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com)
* sort.c (tempname): AND-off high bits of pid so that its decimal
string representation is no longer than five digits.
From Hans Verkuil (hans@wyst.hobby.nl).
Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
* expand.c (add_tabstop): Give correct size when reallocating
tab_list buffer. From Geoff Odhner (geoff@franklin.com).
Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
* configure.in: (AC_OUTPUT): Use echo, not date, to avoid creating
unnecessary conflicts for people using version control software
like RCS and CVS.
(AC_ARG_PROGRAM): Use it.
Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com)
* head.c: Remove block of redundant comments describing options.
(usage): Remove reference to -l option. It's not valid.
* od.c (write_block): Declare index I as unsigned int, not int.
(get_lcm): Likewise.
(dump_strings): Likewise.
(main): Likewise.
(dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
(dump_strings): Declare bufsize to be of type size_t, not int.
* split.c (next_file_name): Don't reuse X as an index.
Declare new variable I instead.
Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com)
* csplit.c: Declare as `unsigned int' all variables that were
just `unsigned'.
(make_filename): Change type of arg to unsigned int.
(split_file): Change type of indices to unsigned int.
Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com)
* od.c (main): Detect and fail when argument to -N is too large
to fit in an off_t.
Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com)
* configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
Remove check for sizeof long.
* linebuffer.h: Undefine __P before defining it.
* long-options.h: Likewise.
* xstrtol.h: Likewise.
* memcpy.c: New file.
* lib/Makefile.in (SOURCES): Add memcpy.c.
Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com)
* src/*.c: Update Copyright dates.
Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com)
* system.h: Remove index/rindex and bcmp/bcopy/bzero references.
Separate errno declaration from STDC_HEADERS.
* wc.c (wc): For efficiency, handle separately the cases in which
words need not be counted. Suggested by Karl Heuer.
* wc.c (wc): Don't overcount the number of bytes when reading
from a regular file on stdin with file pointer not at BOF.
From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command
`(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
the size of the file. Now it outputs `0'.
Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com)
* cat.c (cat): Use memmove rather than bcopy.
* csplit.c (load_buffer): Use memcpy rather than bcopy.
(extract_regexp): Use strrchr, not rindex.
* fmt.c (isopen, isclose, isperiod): Use strchr, not index.
(flush_paragraph): Use memmove instead of bcopy.
* fold.c (fold_file): Use memmove instead of bcopy.
* od.c (decode_format_string): Use memmove instead of bcopy.
[EQUAL_BLOCKS]: Use memcmp, not bcmp.
(parse_old_offset): Use strchr, not index.
(dump): Use memset, not bzero.
* sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
(fillbuf): Use memmove instead of bcopy.
* split.c (main): Use memset, not bzero.
(line_bytes_split): Use memmove instead of bcopy.
* tac.c (tac): Use memmove instead of bcopy.
(output): Use memcpy instead of bcopy.
* tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
* tr.c (substr): Use memcpy instead of bcopy.
(card_of_complement, set_initialize): Use memset, not bzero.
* tr.c (substr): Don't allocate a byte for trailing NUL in result
since the result needn't be NUL-terminated. Don't NUL terminate it.
* configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
not bcopy.
(AC_CHECK_FUNCS): Add strchr and strrchr.
* lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
* memmove.c: New file.
* memcpy.c: New file.
Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com)
* fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph
not followed by a newline would be followed by data copied from
uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
Reported by Franc,ois Pinard.
* od.c: Rename macros with FP_ prefix. Use FLOAT_ instead.
AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
Be careful to use off_t instead of explicit `unsigned long'.
Otherwise, systems like 4.4BSD lose on calls to fseek that
expect off_t (which is long long on that system).
(parse_old_offset): Use xstrtoul
(main): Likewise.
* src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com)
* tail.c (numerous functions): Give char* filename arguments the
const attribute.
* lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used.
Add xstrtol.c and xstrtoul.c.
(OBJECTS): Likewise for .o files.
(DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
* lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
(distclean): Remove references to safe-l?stat.c.
Remove all related rules and dependencies.
* src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com)
* tail.c (tail_file): Fix call to error with %s in format, but
no corresponding argument.
* src/*.c: Include "error.h" instead of simply declaring
`void error ();'.
* od.c (main): Use %lu, not %d for unsigned long.
(my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul
and STRTOL_FATAL_ERROR instead.
Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com)
* sort.c (main): Fix interpretation of field offsets when specified
via -k option. They were being interpreted as zero-indexed. POSIX
says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>.
(keycompare): Don't ignore characters at the end of words when
otherwise they would compare equal. From Rik Faith.
* tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
to off_t because n_bytes is used as the option to fseek and off_t may
be long long (e.g. on BSD4.4). The only place where a 32-bit limit is
imposed is in the string-to-integer converstion of xstrtol.
(main): Use xstrtol instead of manual string to integer conversion.
* csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
comparisons against '0' and '9'.
* tr.c [!ULONGMAX]: Define it.
[!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
* full-write.c: Declare (or not) errno based on definedness or
errno, not STDC_HEADERS.
* safe-read.c: Likewise.
* xwrite.c: Likewise.
Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com)
* tail.c (dump_remainder): Flush standard output just before
sleeping so that `tail -f' will output partial lines sooner.
This applies only when following the end of a single file.
From Leonard N. Zubkoff <lnz@dandelion.com>.
* tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
XWRITE calls.
* tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
* system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
not already defined.
Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com)
* tr.c: Include <getopt.h> instead of "getopt.h".
* sort.c (tempname): Merge two very similar sprintf stmts into one.
* tail.c: Use BUFSIZ instead of BUFSIZE.
* cut.c: Declare DELIM to be `int' rather than unsigned char.
* fmt.c: Use index, not strchr -- per GNU Standards.
Reported by Kaveh Ghazi.
Always include <config.h>.
(main): Include program name in --version output.
Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com)
* Version 1.11.
Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com)
* memcmp.c, srtoul.c: Use up-to-date versions.
Reported by Franc,ois Pinard.
* src/Makefile.in (DEFS): Remove -Dlint... again.
* src/Makefile.in (PROGS): Add fmt!
Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com)
* Version 1.10.
Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com)
* linebuffer.h: Use __P instead of _P since the latter conflicts
with a definition in some <ctype.h>. From Kaveh Ghazi.
Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com)
* tr.c: Add const attribute where appropriate.
* tail.c (BUFSIZ): Use definition from <stdio.h>.
Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com)
* tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
n_bytes is positive. Turn off assertions. `tail /dev/null' was
getting a failed assertion. Reported by Doug McLaren
(dougmc@comco.com).
* cut.c (cut_bytes): Print at least a newline for every line of input.
(cut_fields): Print a newline even for lines whose only selected
field is empty. But print nothing when using -s without -f1.
And print nothing for empty input. Reported by
Richard_Sharman@software.mitel.com.
Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com)
* fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
* linebuffer.h: Likewise.
Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com)
* configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
already handles it. From Kaveh Ghazi.
* {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems
get failures when it's defined. From Kaveh Ghazi.
* cat.c (cat): Conditionalize test for errno == ENOSYS. It's not
defined on some Next and Alliant systems. From Kaveh Ghazi.
* sort.c join.c (main): Include version.h and call parse_long_options
with the proper number of arguments. Reported by Franc,ois Pinard.
Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com)
* (configure.in): Add AC_OFF_T and rearrange by type along the
same lines as autoscan.
* fmt.c, fmt.1: New files.
Both from Ross Paterson (rap@doc.ic.ac.uk).
* Makefile.in (PROGS): Add fmt.
* src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
(fmt): Add a link rule.
* man/Makefile.in (MANFILES): Add fmt.1.
Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com)
* Makefile.in (All of them): Update from the ones in sh-utils.
From now on, rules and definitions that are comon to the fileutils,
textutils, and sh-utils will get ChangeLog entries only in the
sh-utils.
Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com)
* od.c (my_strtoul): Set errno to zero before calling strtoul.
Otherwise, od can fail complaining about a valid integer argument.
From Andreas Schwab.
Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com)
* tr.c (main): Give an error and fail when squeezing repeats
and no non-options are given. Reported by Tony Robinson
(ajr@eng.cam.ac.uk).
* sort.c (main): Temporarily copy each input file that might be
another name for the output file. When in doubt (e.g. a pipe),
copy. This allows the dangerous (historical -- in cnews) idiom
`cat file | sort -o file' to work properly. Don't rely on this
behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com).
Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
Remove CONFIG_BROKETS ifdef.
* src/Makefile.in lib/Makefile.in: Don't define it.
Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com)
* full-write.c (full_write): Declare argument LEN to be size_t.
Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com)
* tail.c (tail_file): [For multiple files only]: Report truncation
of monitored file and reset current file size. From Franc,ois Pinard.
Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com)
* system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
From Franc,ois Pinard.
Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
* system.h: Remove `|| defined(_POSIX_VERSION)' from test that
decides whether to include <fcntl.h>. From Francois Pinard.
Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com)
* tr.c (substr): Fix off-by-one allocation error.
Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com)
* tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
(tac): Fix typo that had `1' as arg #2 of error after failed read.
Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>.
Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com)
* configure.in [INSTALL]: Revert change of March 25. autoconf
has been fixed.
Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com)
* join.c (prline): Remove unused function. Indent.
Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com)
* tail.c (tail_forever): Don't print headers when asked not to.
From Karsten Thygesen <karthy@kom.auc.dk>.
* wc.c (wc): Optimize for the case when only bytes are being counted
and the input is not a regular file. From Jeff Moore <jbm@mordor.com>.
Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com)
* configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
* memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com)
* csplit.c (struct control): Add new field, repeat_forever.
Remove now-unneeded definition of INT_MAX.
(process_regexp): Test repeat_forever instead of comparing `repeat'
to INT_MAX.
(split_file): Don't even reference `repeat' count if repeat_forever
is set.
(new_control_record): Initialize repeat_forever field.
(parse_repeat_count): Set it instead of setting repeat count to
INT_MAX.
(process_line_count): Abort for internal error instead of calling
handle_line_error.
* long-options.c (parse_long_options): Take a new argument indicating
the utility name (e.g. "join", not "gjoin") for version output.
Print both the utility and the package names, e.g. `join - GNU
textutils-1.9.1' instead of just the package name.
* join.c (main): Call parse_long_options with program name arg.
* sort.c (main): Ditto.
* All source except sort.c and join.c (main): Change --version output
to include utility name as well as package name and version info.
Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
* configure.in: Use AC_SET_MAKE.
* Makefile.in: Edit MAKE assignments into @SET_MAKE@.
Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com)
* tr.c (main): In addition to the --help usage pointer, give an
explicit error message for too many arguments.
Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com)
* configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
of explicit echo commands.
[INSTALL]: When AC_PROG_INSTALL resorts to setting this to
`./install.sh', make it `../install.sh' instead since that
script will be invoked only from subdirectories.
[AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
* cat.c (cat): The command `:|cat -s' failed on Irix5 because
ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
it returned EINVAL. Detect this.
(main) [lint]: Initialize variables to suppress `used before
initialized' warnings.
* csplit.c: Change long option name from --suffix to --suffix-format.
* od.c (skip): Correct a comment.
(main): Don't output anything to stdout if the sole input file
doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
* od.c (dump) [lint]: Initialize a variable to suppress `used before
initialized' warning.
(main) [lint]: Ditto.
* paste.c (paste_parallel) [lint]: Ditto.
Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
* configure.in: Don't set LDFLAGS since linking now uses both
LDFLAGS and CFLAGS.
Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com)
* unexpand.c (unexpand): Don't segfault when given a name of a
nonexistent file.
* expand.c (expand): Ditto.
Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
* src/Makefile.in: Change all link commands to use both $(CFLAGS)
and $(LDFLAGS).
* csplit.c (load_buffer): Rather than incrementing buffer size,
double it each time we fail to find a newline. Otherwise, csplit
would run out of memory when processing files with very long lines.
Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
* man/Makefile.in (manprefix): Use binprefix as the default.
Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com)
* cat.c: Use full_write and safe_read instead of write and read resp.
* csplit.c: Ditto.
* head.c: Ditto.
* split.c: Ditto.
* tac.c: Ditto.
* sum.c: Use safe_read instead of read.
* tr.c: Ditto.
* wc.c: Ditto.
* tail.c: Replace calls to xwrite with calls to fwrite.
Use fopen/fclose instead of open/close.
(write_header): Use a single call to printf instead of four to xwrite.
Use safe_read instead of read.
* head.c: Ditto.
Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
* install.sh: New file.
Makefile.in [DISTFILES]: Add it.
Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com)
* memcmp.c: Use the latest version from the GNU C library.
* cut.c [ADD_RANGE_PAIR]: New macro.
(set_fields): Collect the list of all selected ranges before
allocating and initializing the boolean lookup table.
(cut_bytes, cut_fields): Complete rewrite. Avoid copying
into buffer whenever possible. Properly handle input without
trailing newline.
(getstr): New function. Copied from getline.c, but with minor changes.
* sort.c (main): Properly handle -Tdir.
Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
Reported by Kristoffer Rose (kris@diku.dk).
* cut.c (main): Give separate errors for `-s without -f'
and `-d without -f'.
(main): Now -d '' means `use the NUL byte as the delimiter'.
Before, it got an error.
Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com)
* configure.in [test for 8-bit clean memcmp]: Add a test to detect
losing memcmp from SunOS4.1.x. From Robert H. de Vries
<robert@and.nl>.
Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
* configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
so it goes in config.status. This eliminates unnecessary second run
of configure.
Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com)
* configure.in (AC_HAVE_FUNCS): Add isascii.
* system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
on AIX PS/2 1.3 systems because isascii is a function and it is used
in definitions (with the necessary side effect of assigning to a
global variable) of the is* macros. Also test HAVE_ISASCII and
redefine ISASCII(c) instead of isascii.
Reported by Minh Tran-Le (tranle@intellicorp.com).
Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com)
* configure.in: Don't run the test for 8-bit clean memcmp if we
already know we'll be using our replacement.
Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com)
* Version 1.9.1.
* tac.c (usage): Fix typo in long usage.
* sort.c (usage): Likewise.
From Philippe.Schnoebelen@imag.fr.
* cut.c [FATAL_ERROR]: New macro.
(main): Call both error and usage (2) through FATAL_ERROR in
many places. Before, only `error (2...' was called.
(invalid_list): Removed. This function is subsumed by FATAL_ERROR.
* cut.c (cut_fields): Properly handle input lacking a terminating
newline. Before, the command `printf "a\tb" |cut -f 1' generated
no output.
Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com)
od.c (usage): Change --backward-compatible to --traditional in
the long usage message.
Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com)
* Version 1.9.
Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com)
* cut.c (cut_fields): Revert July 27 change. Instead, strip off
trailing delimiter unless given a range of fields like `3-' that
extends to end of line.
(set_fields): Moved local `eol_range_start' to file-scope.
Reported by Arne H. Juul (arnej@solan.unit.no).
Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com)
* fold.c (fold_file): Don't get stuck in an endless loop when
width is smaller than 8 and there are TABs in the input.
Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com)
* join.c: Remove now-unused dcls of show_help and show_version.
Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com)
* csplit.c [INT_MAX]: Make sure it's defined.
[not HAVE_LIMITS_H]: Don't include limits.h.
From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com)
* Version 1.8.1.
Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com)
* sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
* sort.c (main): Handle --help and --version options.
* Makefile.in (sort.o): Depend on long-options.h.
Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com)
* csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
`--longopt=arg' syntax in --help message rather than `--longopt arg'.
From Francois Pinard.
* tail.c: Don't include <signal.h>. It hasn't been necessary
since the Dec 12, 1992 change.
* join.c (main): Accept `-v 1' again. Adding the --version
long option had broken it, although -v1 still worked. Call
parse_long_options instead of adding "help" and "version"
to join's longopt strct.
* Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
and long-options.h.
* (join): Depend on and link with long-options.o.
* (join.o): Depend on long-options.h.
* od.c: Change --compatible (-C) to --backward-compatible (-B).
* csplit.c: Change --abandon-null-files to --elide-empty-files.
Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com)
* tr.c (get_next, string2_extend): Add default: label to switch stmt.
* cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
Exit successfully for --help, non-zero for usage error.
From Francois Pinard.
* configure.in: Add AC_STAT_MACROS_BROKEN.
* system.h [AC_STAT_MACROS_BROKEN]: Test it.
Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com)
* linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
<config.h> or "config.h".
* cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
* configure.in: Use AC_CONFIG_HEADER.
* Makefile.in [DIST]: Add config.h.in.
* Makefile.in: Convert so make may be run from subdirectories.
Add dependencies on config.h.
* src/Makefile.in: Ditto.
* lib/Makefile.in: Ditto.
* man/Makefile.in: Ditto.
Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com)
* memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
In the 64-bit assignment, be careful to cast the shift operand to
long.
Abort if sizeof (unsigned long) > 8.
Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com)
* csplit.c: Allow repeat counts to be specified via `{*}'.
New option --suffix=format. Supercedes --digits option.
New option --abandon-null-files.
From Ronald F. Guilmette (rfg@netcom.com).
* csplit.1: Updated.
From Ronald F. Guilmette.
* csplit.c: Remove register keyword (replace with `int' in two cases).
* csplit.c: [MAX]: Macro renamed from max and moved to top of file.
(bytes_to_octal_digits): New static array.
(get_format_flags): Combine '+' and ' ' cases of switch stmt.
Return count if for loop terminates.
(get_format_width): Use `bytes_to_octal_digits' instead of just 11.
(get_format_prec): Make sure is_negative is defined before used.
(get_format_conv_type): Give a different error message if there
is no conversion specifier.
Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
(max_out): Use `%%' rather than `%' in format string.
Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com)
* pr.c (main): When argc == 1, don't try to xmalloc (0).
Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com)
* xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
or "config.h".
Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com)
* configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com)
* src/*.c: Print version on standard output, not stderr.
* configure.in: Add AC_LONG_64_BITS.
* memchr.c: Use #ifdef LONG_64_BITS instead of
`if (sizeof(longword) > 4)'.
Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com)
* cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
always handle devices. Ignore errno == EINVAL and errno == ENODEV.
`cat -v /dev/null' was failing on many systems.
* cut.c (cut_fields): Don't strip off trailing delimiter e.g.
`echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
From William Dowling <will@franklin.com>.
Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com)
* Version 1.8.
* memchr.c: De-ansify the fixed version from glibc.
It is supposed to work on systems with 64-bit long ints.
Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com)
* Version 1.7.
Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
* Version 1.6.
Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com)
* pr.c (cols_ready_to_print): New function. It replaces a global
variable by the same name and computes on the fly the value that
was supposed to be maintained through that variable. This should
put to rest the `pr -2a' bug.
(main): Don't let getopt_long reorder arguments so we can
distinguish between `pr -1 -2' and `pr -12'. Rework handling of
-n and +n options.
* fold.c: Declare xmalloc.
Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com)
* sort.c (main): fflush before exit, so a closed stdout doesn't lose.
Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
* mkinstalldirs: New file.
* Makefile.in (installdirs): Use it to create installation directories.
Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
* all source: With --version, print version and exit immediately.
Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com)
* Makefile.in (installdirs): New rules for creating installation
directories. (install): depend on it.
* tail.c (main): Remove --compatible since `+1f' may be used
to get the BSD `-0f' behavior portably.
* fold.c (main): Turn -N arguments, where N is a digit, into -wN.
From Ian Lance Taylor (ian@cygnus.com).
Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com)
* tail.c (main): New option -C, --compatible to make `tail -0f'
work like `tail +1f' for compatibility with BSD tail.
Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com)
* pr.c (print_page): Decrement cols_ready_to_print even when
lines_to_print == 0. The command `echo |pr -2ta' *still* didn't
terminate. Add parentheses for clarity.
Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
* Version 1.5.
* od.c (main): Remove set-but-not-used variable, `usage_error'.
* split.c (main): Call usage with an argument.
Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
* configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
for 8-bit clean memcmp.
* cat.c (usage, main): Remove unused argument.
* csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
(check_for_offset): Remove unused argument `argnum.'
* configure.in: Add AC_SIZE_T.
Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
* uniq.c (main): Interpret non-option arguments with a leading `+'
only if we haven't seen `--'.
* tr.c (main): Change variable name to avoid shadowed dcl.
* wc.c (write_counts): Ditto.
* sum.1: Make documentation agree with the code.
* od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
* configure.in [AC_HAVE_HEADERS]: Add limits.h.
* configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
* od.c (parse_old_offset): Don't use prototype in function
definition. Remove unnecessary conjunct from test for hexadecimal
prefix.
* od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
for long double support; there are compilers (Stardent Vistra svr4)
without long double but still define __STDC__.
Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com)
* src/*.c and man/*.c except for sort: Add --help and --version
options.
* pr.c: Convert to use getopt_long.
* lib/memcmp.c: Use version from glibc.
[WORDS_BIGENDIAN]: Test this instead of the using glibc's
__BYTE_ORDER macro.
* configure.in: Use AC_WORDS_BIGENDIAN to set it.
* od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
indicate hex.
* Makefile.in (dist): Depend on Makefile so that changes to
Makefile.in (like adding new files to DISTRIB) are reflected
in the new distribution.
Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com)
* {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
other options so users can use them to override DEFS.
* src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
* Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
configure's AC_SUBST will set these.
* Makefile.in [Makefile]: Add dependencies and a rule to remake it.
[targets that cd then run make in subdirectories]: Don't depend
on `cd ..'; use a subshell instead.
* Makefile.in [info, install-info, dvi, check, installcheck]:
New targets but no rules; comply with standards.
* configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
hasn't specified CFLAGS.
[LDFLAGS]: Substitute into Makefile.
Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com)
* od.c: New option --compatible, -C.
(parse_old_offset): New function.
* od.1: Document new option.
Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com)
* cut.c, expand.c, join.c, nl.c: Always call error with errno
(not zero) after failed fclose or non-zero ferror.
Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu)
* configure.in: Add check for working memcmp; use GNU's if
the system's doesn't grok the 8th bit.
* memcmp.c: Fix it so it groks the 8th bit.
TODO: We really need to provide a fast memcmp, since most
machines will have a broken memcmp. Probably should get
the one from glibc.
* sort.c (mergefps): Maintain keybeg and keylim when copying
the current line to `saved'.
(numcompare): Skip white space here since -n no longer implies -b.
(getmonth): Skip white space here since -M no longer implies -b.
(compare): Completely overhauled to make the 8th bit work right,
also to properly handle the global reverse option.
(set_ordering): -n no longer implies -b, according to Posix.
For consistency, -M also no longer implies -b.
(main): Correct treatment of -r and global keys.
(findlines): Clear keybeg and keylim if no keys are used.
(sort): Avoid overwriting tempfiles[] array bounds.
Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com)
* pr.c (close_file): Reverse May 13, '92 change, but add the condition
that cols_ready_to_print not be decremented when printing across.
The command `echo |pr -2ta' didn't terminate.
(print_page): Rewrite conditional (that had side effects in second
conjunct) using nested if statements to make it clear that we do
indeed want those semantics.
Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
* Version 1.4.
* system.h: Try BBSIZE if BSIZE isn't defined.
From Tony Robinson <ajr@eng.cam.ac.uk>.
Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
* tail.c (tail_forever): Use an array of file descriptors
instead of forking processes.
(dump_remainder): Return number of bytes read.
(tail_file): Fill in the new array.
From Ian Lance Taylor.
Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
* system.h: Only define index, bcmp, etc. if not already defined.
Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com)
* tr.c (is_char_class_member): Remove unreached return after abort.
Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com)
* csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion
of <ctype.h> and definitions of is* ctype macros to system.h.
Change a few more uses of is* ctype macros to (protected) upper
case versions.
* system.h: Add isascii-protected ctype IS* macros.
Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
* all files using getopt.h: Convert static declarations of
struct option to use new macros from getopt.h: no_argument,
required_argument, and optional_argument.
Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com)
* od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
* tr.c (main): Close stdin and stdout and check return status.
Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
instead of USG.
Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com)
* tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
use isascii if it is defined.
(is_char_class_member, make_printable_char, make_printable_str,
non_neg_strtol): Use new macros instead of lower case ones
from <ctype.h>.
* od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
macros like pr.c. Suggested by David J. MacKenzie.
* od.c (print_ascii, dump_strings): Check for isascii before isprint.
(dump_strings): Free malloc'd buffer before returning.
(skip): Return non-zero if an error occurred, zero otherwise.
Exit only if asked to skip beyond end of combined input.
(check_and_close): New function.
(skip, read_block, read_char): Call check_and_close when done
processing the file associated with in_stream.
(skip, read_block, read_char): Set have_read_stdin.
(main): Close stdin (if it was ever read) and check for errors
just before exiting.
(write_block, dump_strings, dump): Don't test return value from
functions that operate on streams. Rely on later ferror tests.
Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* sort.c (main, usage): Add -T option.
Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* tail.c (tail_forever, sigusr1, kill_kids): New functions to
do -f on multiple files.
(main): Call tail_forever.
From Ian Lance Taylor.
Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* cut.c (cut_fields): Add cast.
* od.c (decode_one_format): Remove '#' from pre_fmt_string;
many systems don't support it.
Conditionalize long double support on __STDC__, not __GNUC__.
From Ian Lance Taylor.
Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com)
* sort.c (numcompare, keycompare): Add parentheses suggested
by gcc -Wall. Put braces around individual monthtab initializers.
* cksum.c: Declare error. Make checksum table `const.'
* pr.c: Remove comment and dcl of unused variable, `print_a_number'.
* split.c (main): Add `default: abort();' to enumeration switch.
* All files: Make all functions and extern variables static.
Make all longopts arrays const as well as static.
Make a couple statically initialized aggregates `const.'
Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* od.c (main): Make old-style format options accumulate.
From Jim Meyering.
Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* tr.c (look_up_char_class): Add cast.
* nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
Add `const' to variable receiving value from re_compile_pattern.
* wc.c (wc): If doing only -c, use st_size for regular files.
* fold.c (fold_file): Was folding 1 column too early.
From Eric Backus <ericb@lsid.hp.com>.
* memset.c: New file.
Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* cksum.c: New file.
Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* tac.c (tac_stdin): Handle SIGPIPE.
* sort.c (main): Handle SIGTERM.
* od.c: New file.
* system.h [USG || STDC_HEADERS]: Define bcmp.
Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk.
Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* paste.c (main): Don't write on a string constant.
Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
* tr.c: Minor cleanup. Replaced some assert(0) with abort().
Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* cmp.c, cmp.1: Move to diff distribution.
Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* system.h: Change FOO_MISSING to HAVE_FOO.
Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* pr.c (COLUMN): Add structure member to remember filename.
(main, init_fps, open_file, close_file): Use it.
(close_file): Don't decrement cols_ready_to_print when closing
a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein).
Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* cmp.c: --show-chars -> --print-chars.
* pr.c: Rename some variables.
Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* system.h: Define DEV_BSIZE if not defined.
Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* system.h, tac.c: SIGTYPE -> RETSIGTYPE.
Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* sort.c (main): Don't stop processing args when we hit "-";
treat it like a regular filename.
From ian@airs.com (Ian Lance Taylor).
* pr.c (print_page): Fix off by one line count when ^L is in input.
From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
* tr.c (validate): Change error message so it doesn't mention
actual name of --truncate-set1 option. From David MacKenzie.
Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu)
* tr.c (string2_extend, validate): Give an error message when
translating without --truncate-set1, with empty string2, and
with non-empty string1. "tr 1 ''" produced a failed assertion.
Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* system.h: Change how ST_BLKSIZE is calculated to allow for
non-POSIX systems that don't define BSIZE in sys/param.h.
Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* sum.c (main, bsd_sum_file): Don't print filename if BSD
algorithm is used and only one file was given.
Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu)
* tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
with starting character equal to ending character. This is
contrary to the POSIX spec, but what is already implemented
in find_closing_delim.
Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* Version 1.3.
* sort.c (numcompare, checkfp): Add parens to placate gcc2.
* sort.c (mergefps): For -u, output the first, not last, of
the lines that compare equal. From Mike Haertel.
Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* tr.c: Remove initial capitals and periods from error messages.
Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* sum.c (main): Add -r option for SYSV compat.
Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* sort.c (compare): If -s given, leave lines in their original order.
(main): Recognize -s.
(usage): Document -s.
From Mike Haertel.
Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu)
* sort.c (sort): Check for complete parsing of buffer into
lines before nixing temp files.
Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* sum.c (sysv_sum_file): Use %lu instead of %u to print a
long. Not that it matters for GNU . . .
* tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
(append_normal_char, append_range, append_char_class,
append_repeated_char, append_equiv_class, spec_init):
Initialize `next' field of new `struct List_element'.
From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu)
* join.c (get_line): Renamed from getline to avoid GNU libc conflict.
Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* Version 1.2.
* nl.c: Support multiple files and "-" for stdin.
(main): Check for read and write errors.
(nl_file): New function.
Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* tr.c (main): -t option was called -b in getopt spec.
(validate): Don't warn that set1 is longer than set2.
* tr.c: Rename --sysv-string2-truncate to --truncate-string1.
Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* nl.c: New program from bin-src.
* nl.c (main): Use a struct linebuffer for line_buf.
(process_file): Use readline instead of fgets, to preserve NULs.
(check_section): Use memcmp instead of strncmp.
(proc_text): Print line_buf with fwrite instead of printf.
* nl.c (main): Usage message if too many args given. Check
for error in closing input file. Lengths of section delimiter
strings were 1 too large. Take separator_str into account in
length of print_no_line_fmt.
(build_print_fmt): Allocate space for print_fmt, in case
separator_str is long.
(proc_text): A blank line is one that contains nothing, not
even nonprinting characters.
Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* All programs: Document `--' instead of `+' to introduce
long-named options, in usage messages.
* sum.c (bsd_sum_file): Renamed from sum_file.
(sysv_sum_file): New function.
(main): Recognize an option to select between the algorithms.
Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
* pr.c (close_file, print_page): Fixed bug that had the command
yes |head |pr -t printing "yyyyyyyyyy".
* (print_page): Fixed bug that had pr -3 -a printing two too few
trailer lines per page.
* (main): Added restriction that -a and -m are incompatible.
Although the POSIX spec doesn't explicitly say they shouldn't
be used together, it says -a modifies the -column option and
that -column shouldn't be used with -m.
Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
* nl.c: Include regex.h after, not before, sys/types.h.
Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu)
* sort.c (fillbuf) return bytes buffered instead of bytes read.
Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu)
* sort.c (LINEALLOC): New #define.
(struct lines): New field ``limit''.
(initlines): Set it from new arg ``limit''.
(sort, mergefps, checkfp): Pass new arg to initlines().
(findlines): Don't realloc past lines->limit.
Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
HAVE_UNISTD_H and _POSIX_VERSION.
* xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat)
* tr.c: Fixed an inaccurate comment on posix_pedantic.
Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal)
* tr.c: Changed underscores to hyphens in long option name
"sysv_string2_truncate".
Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* tac.c (main): Set obscure_syntax to tell re_search to
allocate memory for the group registers.
Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of
signal, which POSIX doesn't have.
* sort.c: Replace inthandler and huphandler with sighandler.
* csplit.c (main): Only handle signals if they were not being
ignored.
* tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat)
* tr.c (unquote): Reformat code so it doesn't go beyond column 80.
* tr.c (squeeze_filter): Comment a little on why it's better
to step through the input by two.
* tr.c (set_initialize): Write a comment describing the function.
* tr.c: Eliminated the variable `portability_warnings' and replaced
references to it by references to `!posix_pedantic'. One of the
uses of portability_warnings had been wrong.
Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* tr.c: New program.
Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* linebuffer.[ch] (freebuffer): New function (used by cron).
Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* system.h, configure, Makefile.in: Don't include memory.h if
STDC_HEADERS, removing need for MEMORY_H_MISSING.
Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat)
* pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
Somehow, part of my patch didn't make it last time.
Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
* tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
* cmp.c (cmp): Print EOF message to stderr, not stdout, for
POSIX 1003.2.11.2.
* sort.c (xfwrite): fwrite never returns < 0, so check if
number written is number we asked to write.
(fillbuf, main): fread never returns < 0, so check ferror instead.
From Rainer Orth.
Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy)
* pr.c (print_page): Really fixed `extra newline at EOF' problem.
* (store_columns): Fixed bug that caused `pr -b -2' to coredump
on files of certain lengths.
Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy)
* pr.c (print_page): Fixed to not add single spurious newline
at EOF when using -t.
Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies)
* pr.c (print_page): Don't pad the page if -t given.
* csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
* Version 1.1.
* configure, system.h: Include memory.h if it works.
* split.c: Allow `b' unit as well as `k' and `m'.
* head.c, tail.c: Replace -b +blocks option with specifying
units (b, k, or m) after the number.
(parse_unit): New function.
* fold.c (main): Check that -w arg is a number.
* cut.c: +delimiter takes an arg.
Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
* pr.c (close_file): Don't close an already closed file.
Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* memchr.c: New file.
* configure: Check if it's needed.
* csplit.c, gcsplit.1: New program.
* pr.c (cleanup): Only free buffers if they were allocated.
* sort.c [!USG && !STDC_HEADERS]: Declare memchr.
Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy)
* pr.c: The following 3 bugs appeared (at least) when printing
a single file with the options `-3 -f'.
* (print_white_space): Single spaces were being replaced
with tabs.
* (print_page): Some lines were getting too much white space
at the beginning because spaces_not_printed wasn't being reset
to 0.
* (read_line): The single space between a truncated column
on its left and the column on its right was omitted. Fixed
so that previous value of input_position is restored before
returning FALSE.
Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* configure: Only remove /etc from PATH when it's not part of
a larger name.
Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies)
* linebuffer.c (readline): Fix incorrect recalculation of `end'.
* head.c, tail.c: Replace `mode' variables and bitmasks with
separate variables for each option.
Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies)
* wc.c: New program.
Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies)
* fold.c (fold_file): Read in an int, not a char, for EOF
comparison.
* configure: Check whether st_blksize is missing.
* tac.c (save_stdin): Put copy of pipe input in TMPDIR if
defined, instead of /tmp.
Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* xwrite.c [POSIX]: unistd.h might require sys/types.h.
Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* paste.c (main): Consider -d "" to be like -d "\0",
for POSIX (if I read it right).
* sort.c, join.c: New programs.
* cut.c (set_field): Allow blanks as well as commas to
separate numbers in ranges.
Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies)
* pr.c: Failure to open an input file is no longer a fatal error.
A message is printed for each failed open. When printing
in parallel, each failed open results in one fewer output column.
Added POSIX -r option to suppress the message.
* pr.c: Added variables: failed_opens, ignore_failed_opens.
These changes were based in part on work by David MacKenzie.
Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo)
* pr.c: Complain if user gives both -m and -[0-9]+ options.
Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies)
* Version 1.0.
Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* expand.c: Rename some variables.
(expand): Don't access value off end of array.
* unexpand.c: Rename some variables.
(unexpand): Don't access value off end of array.
Instead of copying tabs verbatim and flushing pending spaces
when one is reached, count them as the proper number of
pending spaces. Instead of changing tabs to single spaces if
the tabstop list is exhausted, print the rest of the line
unchanged (for POSIX).
Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* cut.c (cut_file), paste.c (paste_parallel, paste_serial):
Clear EOF and error conditions on stdin so it can be reused.
* expand.c, unexpand.c (parse_tabstops): Allow blanks as well
as commas to separate tabstops, for POSIX.
* expand.c (expand), unexpand.c (unexpand): Don't line-buffer
the output; send it directly to stdout.
* unexpand.c (main): Make -t stupidly imply -a for POSIX.
(unexpand): If a tab stop list was given and we move past its end,
copy the rest of the line verbatim.
* split.c (convint): New function to allow 'm' and 'k' after
byte counts.
(main): Use it. Change -c option to -b for POSIX.
Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* pr.c: Protect isdigit with isascii, if required.
Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex)
Most of the following is from Paul Eggert:
* cat.c (main): If stdin is read, check close at end.
* cmp.c (main): Check for stdin being closed.
Check for close errors on stdin and stdout.
(cmp): Return a value instead of exiting.
* cut.c (cut_file): New function, from code in main.
Check for read errors.
(main): Check for close errors.
* expand.c, unexpand.c (main): Check for close errors.
(next_file): Go to next file if one can't be opened.
Check for close errors.
* head.c (main), tail.c (main): If stdin was read, check for
close errors.
* head.c (head_file), tail.c (tail_file): Check for close errors.
* paste.c (main, paste_parallel, paste_serial), tac.c (main):
Check for close errors. Close stdin if it was read.
* split.c (main): Check for close errors.
* configure, Makefile.in's: Support +srcdir option.
Make config.status. Fix up clean targets.
Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal)
* linebuffer.h (struct linebuffer): Add a field to indicate
the number of valid chars in the line.
* linebuffer.c (initbuffer, readline): Fill it in.
* uniq.c, comm.c: Use it.
* pr.c (main): Check stdin and stdout fclose for errors.
(init_parameters): If there's no room for header and footer,
omit them rather than dying (for POSIX).
(init_header): Take a file descriptor as additional arg.
(init_fps): Change callers. Note when stdin is read.
(open_file): For filename "-" use stdin.
(close_file): Don't close stdin. Check close for errors.
(print_char, char_to_clump): Use isprint instead of explicit
comparisons.
* memcmp.c: New file (needed for comm).
* bcopy.c: New file (needed for fold).
* system.h: Don't define bcopy as memcpy.
* configure: Check for bcopy and memcmp.
* uniq.c (main): Use "-" instead of NULL to mean stdin or
stdout.
(check_file): Use "-" instead of NULL to mean stdin or stdout.
Check readline return instead of for NUL character to
detect eof.
Check fclose for errors.
(find_field): Use linebuffer length, not NULs, to detect end
of line.
(different): New function, replaces compare. Uses memcmp
instead of strncmp.
(writeline): Use fwrite instead of fputs so NULs are preserved.
* comm.c (compare_files): Return an error indication.
Don't take a filename of NULL to mean stdin.
Use memcmp instead of strcmp to allow for NULs.
Check fclose for errors.
(writeline): Use fwrite instead of fputs so NULs are preserved.
* sum.c (sum_file): Take an arg indicating whether to print
the filename, and don't take NULL meaning stdin. Set a flag
when we read stdin. Check fclose return for errors.
(main): If stdin was read, check fclose return for errors.
Use filename of "-" if no args given.
Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* fold.c: Rewritten from scratch for POSIX.
Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* split.c (line_bytes_split): Use xmalloc instead of alloca.
* system.h: Don't declare alloca.
* tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
* system.h: Define SEEK_ macros if not defined.
* pr.c: Rename variable `truncate' to avoid library function conflict.
Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* linebuffer.c, linebuffer.h: New files.
* comm.c, uniq.c (initbuffer, readline): Functions
removed (use versions in linebuffer.c).
Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* sum.c (sumfile): Always print 5 digits for second number, too.
Interpret "-" to mean stdin.
Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
* uniq.c: Use isblank instead of isspace, to support POSIX.2.
* comm.c, pr.c, uniq.c (concat, fatal, error,
pfatal_with_name, xmalloc, xrealloc): Functions removed.
Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* nl.c: Add long-named options. Doc fixes.
Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
* xwrite.c [POSIX]: Include unistd.h.
[STDC_HEADERS]: Don't declare errno.
Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* uniq.c: Add long-named options. Remove marginally useful -z
option (zero padded repeat counts).
Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
(cwrite), head.c (head_file), cat.c (main): Check close return
value for delayed error report due to NFS.
Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* cat.c: Replace "uchar" with "unsigned char", to avoid
problems with various systems' typedefs.
Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
operation is unsupported, for HP-UX 7.0.
Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu)
* sum.c: Always print five digits for first number.
Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
* cat.c, cmp.c: Don't use fileno(); not needed.
Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
* tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
* cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
outbufp global.
(enlarge_line): Adjust inbufp and outbufp.
Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cat.c: Declare free returning void, not int, so it
doesn't bomb on Xenix.
Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
* tac.c: Print error messages before calling cleanup, not after.
Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* tac.c (cleanup): Return SIGTYPE, not int.
Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
* cut.c (main, usage): Add -b and -n options for POSIX.
(set_fields): Don't allow SPC or TAB as number separators.
* paste.c (paste_parallel): If open of any file fails, quit
(for POSIX).
Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies)
* pr.c: Add POSIX -F option (same as -f).
* uniq.c (check_file): Allow '-' to mean stdin or stdout.
Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* head.c, tail.c: Change `chars' to `bytes' globally.
(main, usage): Use POSIX.2 draft 10 option syntax.
Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* cat.c (main): Don't delay error messages, so they appear
where expected.
(main, simple_cat, cat): Make errors in input files nonfatal.
Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* cat.c: Remove -c option added for POSIX draft 9, since POSIX
draft 10 removed it.
* tac.c (tac_stdin): Use fstat instead of lseek to determine
whether stdin is seekable, because lseek silently fails on
some special files, like tty's.
tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
don't turn off -f for non-regular files (assume the user knows
what he's doing; it might work for fifo's and sockets).
* paste.c (main): If no files given, use stdin.
Don't let collapse_escapes write on string constant (delim default).
(paste_parallel): Don't close stdin.
* cut.c (main): Use standard input for filename of "-".
* comm.c (compare_files): Allow '-' to mean stdin.
Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* cut.c (enlarge_line): Take an arg giving the required amount
of space. Change callers.
(main): Don't allow -t'<TAB>' without -f.
Make `delim' unsigned to fix sign extension problem in comparison.
Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
* pr.c Deleted excess whitespace from ends of lines.
Modified to work with current version of getopt, which
returns 1 instead of 0 for non-options.
Reversed the meaning of the -f option, to be compatable
with real pr.
Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
* cmp.c (main, usage): Rename -L option to -c and don't have
it imply -l.
(printc): Take an arg to specify number of chars to pad to,
for column alignment.
(cmp): Respect flag_print_chars in default output format.
Align columns for cmp -cl.
Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies)
* cmp.c: For +show-chars, have getopt return 'L' so
`flag_print_chars' gets set.
Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies)
* tac.c (main): Initialize fastmap and translate fields of
regex before compiling it.
Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* tac.c: Change +regexp to +regex for consistency with GNU find.
Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cat.c (cat): If FIONREAD is available, only use it if it is
supported by the filesystem that the file is on.
Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cat.c (main): Add a variable to control whether the check
for input file == output file is made, because no values of
st_dev and st_ino should be assumed to be available for this
purpose. Only do the check for regular files.
* tac.c: Use bcopy instead of memcpy.
Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
* head.c: Use longs instead of ints for file offsets, for 16
bit machines.
Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cmp.c: Change some ints to longs for 16 bit machines.
(bcmp_cnt): Make char-pointer counting slightly simpler.
Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cat.c (main): Allow input file to be output file for devices
(ttys, etc.). Check whether input file is output file when
reading standard input. Print any error messages for standard
input.
* cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
machines as well as 32 bit ones.
* cmp.c, tail.c: Use longs instead of ints for file offsets.
Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cmp.c: Fix some exit statuses for POSIX.
Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss)
* tac.c: Use regular expressions as the record boundaries.
Give better error messages.
Reformat code and make it more readable.
(main): Use getopt_long to parse options.
(tac_stdin): Do not make a temporary file if standard input
is a file.
(tac_file): New function.
(tac): Take an open file desc as an arg.
(output): Rewrite to use its own efficient buffering.
(xmalloc, xrealloc, xwrite): New functions.
Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* head.c, tail.c: Use `error' instead of `fatal_perror' and
`nonfatal_perror'. Remove some unnecessary info from messages.
Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* comm.c (main): Pass the list of files to compare_files as a
char ** instead of a char *.
(compare_files): Make arg a char **.
* uniq.c: Declare some functions as void.
Change global vars `countmode' and `mode' from ints to enums.
(main): Use getopt to parse options and support POSIX options.
Don't use integer_arg to parse numbers, since `-#' can't be
parsed that way using getopt.
(find_field): Use isspace for finding fields boundaries.
Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* comm.c (main): Call usage if given bad option or wrong
number of args. Exit with 0 status normally.
(usage): New function.
Declare some other functions as void.
Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
* cmp.c (main, cmp, usage): Replace -q +quick option with -L
+show-chars option to add ASCII representation of bytes to -l format.
Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
* cmp.c (cmp): Change EOF message for POSIX compatibility.
For -l format, clear bits > FF.
Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* tail.c: Move global `errors' into main instead of having
nonfatal_perror set it.
(tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
Return an error status.
(file_lines, start_chars, start_lines): Reverse the meaning of
the return value.
(tail_lines, tail_chars): Account for that reversal.
Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* head.c: Move global `errors' into main and have the various
functions return an error status instead of setting it in
nonfatal_perror.
Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
* cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
options specified), to compare the two blocks and count
newlines simultaneously.
* cmp.c New function: bcmp_cnt.
* cmp.c (main): Test if output is redirected to /dev/null, and
assume `-s' if this is so.
Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cat.c: Change `argbad' from a char to a short, so it will
work on machines with unsigned chars.
Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
Remove unneccessary variable `c1'. If -l was given, increase
`char_number' by the number of bytes read, after producing output,
rather than by the offset of the first differing bytes, before
producing output.
Replace if-else-if constructions with case statements for clarity.
(bcmp2): Rename `n' to `nread'.
Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
* nl.c (proc_text): Use re_search instead of re_match.
Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
* nl.c: Indent. Un-nest statements. Use GNU regexp functions
instead of System V ones. Move function declarations together.
(quit): Remove useless function.
(program_name): New variable for error messages.
(main): Use perror in error message.
(xmalloc): New function to replace myalloc.
(myalloc): Function removed.
Global: use program_name and xmalloc.
Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
* uniq.c: Declare some functions.
(main): Initialize infile and outfile. Call usage if given
invalid args. Normally exit with 0 status instead of garbage.
(usage): New function to print usage message and exit.
(check_file): Remove unused variable.
(readline): Compare against EOF, not < 0.
(xmalloc, xrealloc): Return char *, not int.
Ok to return 0 if 0 bytes requested.
(lb1, lb2): Remove unused global vars.
(concat): Remove unused function.
Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
* comm.c: Remove unused global variables lb1, lb2.
(main): Remove unneeded variable.
(compare_files): Remove unused arg.
(readline): un-nest assignment. Test against EOF instead of < 0.
(error): Print to stderr, not stdout.
(xmalloc, xrealloc): Return char * instead of int.
Returning 0 is ok if 0 bytes requested (ANSI C).
Local Variables:
version-control: never
End:
|