1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
|
Thu Nov 28 00:31:11 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:24:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4: Update with macros from gettext-0.10.25.
Sun Nov 24 22:43:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acconfig.h (mktime): Add undef for my enhanced (beyond automake's
1.1g version of) AM_FUNC_MKTIME.
* acinclude.m4 (AM_FUNC_GETLINE): Use am_, not su_ prefix for
local/cache variables.
Sat Nov 23 16:11:59 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Add getline.c now that getline
isn't mentioned in AC_REPLACE_FUNCS.
* lib/Makefile.am (EXTRA_DIST):
* chgrp.c (usage): Alphabetize option descriptions the way
sort -f would.
* chown.c (usage): Likewise.
* cp-aux.c (usage): Likewise.
* df.c (usage): Likewise.
* install.c (usage): Likewise.
* ln.c (usage): Likewise.
* ls.c (usage): Likewise.
* mkdir.c (usage): Likewise.
* mv.c (usage): Likewise.
* rm.c (usage): Likewise.
From Karl Berry.
Fri Nov 22 22:14:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_REPLACE_FUNCS): Don't try to replace getline this
way. AM_FUNC_GETLINE does it now.
(AM_FUNC_GETLINE): Use it here.
* src/cp.c (copy): With -i and not -f, prompt for any type of
(non-directory) source file before overwriting an existing target.
Reported by Mark A. Thomas and Emile LeBlanc.
Tue Nov 19 23:10:32 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
has this built-in.
(AC_FUNC_FNMATCH): Use this macro (new with autoconf-2.11) instead
of open-coding it.
Sun Nov 17 20:53:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/touch.c: Remove unused declaration of mktime. From Tony Leneis.
Mon Nov 4 23:18:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (test for group_member): Handle it separately
so I can keep the hyphen (not the underscore) in the filename.
* lib/rename.c: New version from François Pinard.
Sat Nov 2 07:05:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ls.c (gobble_file): Set linkok for non-orphaned symlinks.
From Bauke Jan Douma.
(gobble_file): Initialize linkok.
With these two changes, ls --color should display orphaned symlinks
as blinking text on terminals that support it.
* configure.in (ALL_LINGUAS): Add Spanish (es).
* 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.
Tue Oct 29 06:49:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ls.c (decode_switches): Make -A set really_all_files to zero
as well as setting all_files to 1. With this change, ls -f -A prints
everything but . and .., unsorted. Before, the -A was effectively
ignored. From Karl Berry.
Tue Oct 22 07:00:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (dircolors.h): Depend on dcgen only in maintainer
mode.
Mon Oct 21 16:52:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Remove group-member.c.
Add (temporary hack to work around bug in automake-1.1f) mvdir.c and
rmdir.c.
* configure.in: Remove hack that created link from group_member.c
to group-member.c.
* lib/group_member.c: New file. Renamed from group-member.c.
* lib/group-member.c: Delete.
* src/dircolors.hin: Comment out DOS-style suffixes.
Sun Oct 20 13:49:25 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.
Sun Oct 13 14:02:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ls.c (print_long_format): Use strftime of localtime
(not ctime) to produce the date/time in long listings.
From Rafal Maszkowski.
Sat Oct 12 18:20:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/mountlist.c (fstype_to_string): Handle fstypes of freebsd.
From Arne Henrik Juul.
Thu Oct 10 23:47:34 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Remove posixtm.y and getdate.y.
(fu_SOURCES): Put them here instead.
Remove rules for building getdate.c and posixtm.c; now automake
generates those rules.
* lib/ylwrap: New file.
* lib/interlock: New file.
Wed Oct 9 06:51:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ls.c (usage): Improve brief descriptions of --sort and --time.
From François Pinard.
* lib/rpmatch.c [!WITH_REGEX]: Include rx.h.
From Andreas Schwab.
Mon Oct 7 23:31:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Remove names of several files
that automake adds automatically.
(fu_SOURCES): Likewise.
(fu_DEPENDENCIES): Depend on fu_LIBADD.
* src/chown.c (usage): Improve usage message.
* src/cp-aux.c (usage): Likewise.
* src/ls.c (usage): Likewise.
* src/install.c (strip): Improve diagnostic.
From Ulisses Alonso.
* src/Makefile.am (noinst_HEADERS): Add dircolors.h.
(dircolors.h): Always depend on dcgen.
Sat Oct 5 08:07:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (AM_FUNC_ERROR_AT_LINE): New macro.
(AM_FUNC_OBSTACK): New macro.
* configure.in (AM_FUNC_ERROR_AT_LINE): Use this instead of
open-coding it.
(AM_FUNC_OBSTACK): Likewise.
* lib/filemode.c (ftypelet) [HAVE_ST_DM_MODE]: Add support for
Cray's migrated dmf files.
* src/ls.c (print_long_format) [HAVE_ST_DM_MODE]: Likewise.
* acconfig.h [HAVE_ST_DM_MODE]: New macro.
From Johan Danielsson.
* acinclude.m4 (AC_HEADER_SYS_TIME_H): New macro.
(AM_FUNC_MKTIME): Require AC_HEADER_SYS_TIME_H so that configure's
checking... messages don't get nested.
* configure.in (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove it.
* acconfig.h (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove now-unused variable.
* src/*.c: Update --version output to conform to the coding standard.
Wed Oct 2 21:44:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (usage): Deprecate --print-data-base even though
that's the way GNU make writes it. `database' is one word.
Add description of FILE argument.
Tue Oct 1 12:56:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (fu_SOURCES): Remove getline.c.
(EXTRA_DIST): Add getline.c.
Reported by François Pinard.
Mon Sep 30 20:08:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (dircolors.h): Don't depend on anything unless
in maintainer-mode. Reported by Marcus Daniels.
* lib/path-concat.c (path_concat): Use K&R style function definition.
Sun Sep 29 22:00:44 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (ALL_LINGUAS): Add slovenian (sl).
* src/cp-aux.c (usage): Take only one argument -- like all the other
usage functions.
* src/cp.c (do_copy): Give better error message when copying multiple
files and the last one is not a directory. From Karl Berry.
Call error (0, 0, ... then usage (1) -- instead of calling usage
with two arguments.
Sat Sep 28 13:16:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/getversion.c (backup_types): Declare const.
(backup_args): Likewise.
Sat Sep 21 10:22:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (xstrndup): Use message that's the same as the one
you get from e.g., xmalloc. Reported by Santiago Vila.
Thu Sep 19 22:13:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (fu_SOURCES): Remove regex.c and rx.c.
(EXTRA_DIST): Put them here instead.
* configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
* lib/Makefile.am (fu_SOURCES): Move getopt.c and getopt1.c back to
here fro EXTRA_DIST.
* configure.in (AC_REPLACE_GNU_GETOPT): Remove it -- it's not
necessary.
* acinclude.m4 (AM_SANITY_CHECK_CC, AC_SYS_POSIX_TERMIOS,
AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Remove definitions.
Now automake's aclocal includes them.
Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.am (EXTRA_DIST): Remove acinclude.m4.
Mon Sep 9 21:39:49 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/cp.c (do_copy): Describe in a little more detail the code
that makes `cp non-directory file/' (eventually) fail.
Sun Sep 8 12:54:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (usage): Refer to LS_COLORS, not LS_COLOR.
From Santiago Vila Doncel.
* src/cp.c (do_copy): Set backup_type to `none' only *after*
calling to find_backup_file_name. Reported by Eli Zaretskii.
Sat Sep 7 12:25:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/regex.c, lib/regex.h: New files.
* lib/rx.c, lib/rx.h: New files.
* lib/Makefile.am (INCLUDES): Add -I../intl so compiler will find
libintl.h for rpmatch.c.
* src/system.h: Add comments justifying IS* versions of ctype.h macros.
Thu Sep 5 18:12:44 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/chmod.c (main): Don't set verbose flag for --changes.
(change_file_mode): If chmod succeeds and --changes was given,
give a diagnostic describing the new permissions.
Reported by Philippe Schnoebelen (phs@fing.edu.uy).
* src/cp.c (do_copy): When concatenating DEST (with a trailing `/')
and the basename part of non-directory SOURCE, don't add a slash
between them.
Wed Sep 4 21:42:32 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/rpmatch.c: Make sure NULL is defined by including stddef.h
(if STDC_HEADERS || _LIBC) or simply defining it (otherwise).
Include sys/types.h for definition of size_t needed by regex.h.
* lib/Makefile.am (fu_SOURCES): Add regex.c and rx.c.
(noinst_HEADERS): Add regex.h and rx.h.
* configure.in (AM_SANITY_CHECK_CC): Use it.
(AM_WITH_REGEX): Use it.
* acconfig.h (WITH_REGEX): Add it.
Tue Sep 3 08:13:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/rpmatch.c (rpmatch): Set yesexpr to "^[yY]" and noexpr to
"^[nN]"; this conforms to POSIX.2. From Paul Eggert
<eggert@twinsun.com>.
Mon Sep 2 10:59:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
* POTFILES.in: Add lib/rpmatch.c.
* lib/rpmatch.c (ENABLE_NLS): Include libintl.h and define _ to
gettext.
* src/*.c (usage): Tell where to report bugs.
Sat Aug 31 18:48:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/touch.c (utime_now): Protoize.
Reported by David S. Miller (davem@caip.rutgers.edu).
Sun Aug 25 22:43:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (AM_FUNC_MKTIME): New macro.
* configure.in (AM_FUNC_MKTIME): Use it.
(AC_REPLACE_FUNCS): Remove mktime.
Wed Aug 21 23:17:04 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 18 09:52:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (jm_MAINTAINER_MODE, fp_C_PROTOTYPES): Rename with
AM_ prefix for latest automake/aclocal.
* lib/Makefile.am (noinst_HEADERS): Add path-concat.h.
(fu_SOURCES): Add path-concat.c.
* src/mv.c: Include path-concat.h.
(movefile): Use path_concat instead of open-coding its functionality.
Declare pointer parameters const as appropriate.
* src/cp.c: Include path-concat.h.
(do_copy): Check path_concat return value.
(path_concat): Remove function.
* lib/path-concat.h: New file.
* lib/path-concat.c (path_concat): New file. Just like the function
from cp.c except the stand-alone version uses malloc instead of
xmalloc.
* configure.in (ALL_LINGUAS): Add Dutch (nl).
Fri Aug 16 21:59:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/chgrp.c (parse_group): Don't abort when given a group number
larger than INT_MAX. Fix bug whereby root could run
`chgrp INVALID-GROUP FILE' and it wouldn't fail, but rather would
change FILE's group to some indeterminate value. This problem
was reported as Debian Bug#4119 via Erick Branderhorst
(branderh@IAEhv.nl).
Declare pointer parameters const as appropriate.
Thu Aug 1 22:12:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/system.h (ST_NBLOCKS) [_CRAY]: Special case for Cray.
* lib/fsusage.c (get_fs_usage) [STAT_STATFS4] [_CRAY]: Define
f_bavail to f_bfree.
From Johan Danielsson.
Wed Jul 31 23:39:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ln.c [LINK_TYPE]: Remove macro. NLS messages aren't
extracted from macros. Reported by Santiago Vila.
(link_type_string): New global variable to be used instead of
LINK_TYPE.
(main): Set it here.
(do_link): Use it (instead of macro) here.
Tue Jul 30 23:24:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_CHECK_HEADERS): Add sys/fs/s5param.h.
* lib/fsusage.c [HAVE_SYS_FS_S5PARAM_H]: Include sys/fs/s5param.h
to work around bug in sys/filsys.h of Fujitsu UXP/V.
From by Johan Danielsson.
* src/cp.c (DO_CHOWN): New macro -- derived from code in copy.
(copy): Use DO_CHOWN to assure that any newly-created symbolic
links have proper owner and group.
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 21:10:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/chgrp.c (main): Fix typo in getopt_long string: s/n/h/.
Reported by Ken Pizzini.
Wed Jul 24 22:24:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (usage): Remove -h. It is not an option.
Reported by Ulrich Drepper.
Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_CHECK_HEADERS): Add sys/timeb.h for lib/getdate.y.
This was a problem for SCO OSR5. From Bela Lubkin <belal@sco.com>.
(statvfs test): Arrange for this test to fail (as it should) for
SCO OSR5. Suggestion from Bela Lubkin.
* src/Makefile.am (BUILT_SOURCES): Remove @MAINT@.
(dircolors.h): Remove @MAINT@. These prevented `make distcheck'
from working sometimes.
* lib/yesno.c (yesno) [!HAVE_RPMATCH]: Remove function since we'll
always use the rpmatch-based version.
Declare rpmatch.
* lib/rpmatch.c [STDC_HEADERS]: Guard inclusion of stdlib.h.
(_) [!_]: Define it.
(try): Add RESPONSE parameter.
(rpmatch): Update caller.
Anchor regular expressions to beginning of string.
* configure.in (AC_CHECK_FUNCS): Don't check rpmatch.
* acconfig.h (HAVE_OBSTACK): Undef it.
The following is from Ulrich Drepper.
* configure.in (AC_REPLACE_FUNCS): Add rpmatch.
* lib/Makefile.am (EXTRA_DIST): Add rpmatch.c.
* lib/rpmatch.c: New file.
* lib/yesno.c (yesno): New rpmatch-based version of the function.
* config.h.in (HAVE_RPMATCH): Undef it.
* lib/Makefile.am (EXTRA_DIST): Put error.c and obstack.c here...
(fu_SOURCES): Instead of here.
* configure.in (AC_CHECK_FUNCS): Add rpmatch.
Add checks for error_at_line and obstacks so systems with GNU libc
don't compile and link with distributed error.c and obstack.c.
* configure.in (AC_REPLACE_FUNCS): Replace getline.c.
Add related check for the getdelim function. As done in gettext.
Sat Jul 20 17:01:56 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (fu_SOURCES): Remove error.c, and obstack.c.
(EXTRA_DIST): Add error.c, and obstack.c.
* configure.in (PACKAGE_VERSION): Use space instead of hyphen to
separate PACKAGE and VERSION.
Fri Jul 19 23:28:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/cp.c (path_concat): Rewrite to return new parameter.
(do_copy): Update uses of path_concat to use new parameter.
Use that new pointer to compute correct offset for make_path_private.
Before, cp --recursive --parents SRC DEST failed when SRC was
an absolute file name. E.g.,
% cd /tmp; rm -rf d f; mkdir d; touch f; cp -PR /tmp/f d
cp: tmp: No such file or directory
Reported by Horst von Brand vonbrand@sleipnir.valparaiso.cl.
Thu Jul 18 21:58:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/install.c [_AIX]: Add #pragma alloca.
From Bernd Leibing <bernd.leibing@rz.uni-ulm.de>.
* src/chgrp.c (main): Initialize for internationalized message support:
call setlocale, bindtextdomain, and textdomain. Reported by
Michel Robitaille <robitail@IRO.UMontreal.CA>.
Wed Jul 17 22:37:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (ALL_LINGUAS): Add polish (pl).
Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Many files: Update FSF address.
Sun Jul 14 07:53:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/du.c (usage): Sort option descriptions in dictionary order.
Sat Jul 13 07:34:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (long_options): Add missing last line of NULL
entries. From Ralph Loader <loader@maths.ox.ac.uk>.
Thu Jul 11 21:50:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 3.13.
* dircolors.1: New file -- but just a pointer to texinfo docs.
* man/Makefile.am (man_MANS): Add dircolors.1.
* configure.in (VERSION): Bump to 3.13.
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 20:19:44 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (usage): Improve --help message. From Karl Berry.
(long_options): Add print-data-base and print-database.
* src/dircolors.c (dc_parse_stream): Don't give `unrecognized keyword'
message unless we've processed a matching TERM directive. Reported
by Karl Berry and François Pinard.
* src/install.c (UID_T_MAX): Use `(unsigned long)1' rather than
`(uid_t)1' to avoid problems on systems where uid_t is signed.
(GID_T_MAX): Likewise for gid_t.
From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
Sun Jul 7 22:40:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ls.c: Change initial colors for `color_indicator' to match
those currently in dircolors.hin. From Joshua Cowan.
* src/dircolors.hin: Recognize more filename extensions.
From Joshua Cowan.
* src/Makefile.am (CLEANFILES): Add dcgen. From Joshua Cowan
<jcowan@jcowan.reslife.okstate.edu>.
* src/Makefile.am (MAINTAINERCLEANFILES): Add dircolors.h.
* configure.in (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use it.
* acconfig.h [GWINSZ_IN_SYS_IOCTL]: Add #undef.
* src/ls.c: Include termios.h.
Guard inclusion of sys/ioctl.h with #ifdef GWINSZ_IN_SYS_IOCTL,
rather than HAVE_SYS_IOCTL_H. Modelled after sh-utils' stty.c
at suggestion from Chip Bennett <BennettC@j64.stratcom.af.mil>
to make ls adjust its idea of screen width upon window resize
on systems (SunOS, Solaris) where TIOCGWINSZ is defined in
termios.h, and not sys/ioctl.h.
* aclocal.m4 (AM_SYS_POSIX_TERMIOS): New macro, derived from test
in the configure.in from sh-utils.
(AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
Sat Jul 6 12:46:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/cp-aux.c (usage): Factor out backup-related text into
separate string/printf statement so translators deal with only
one corresponding string in .pot file.
* src/install.c (usage): Likewise.
* src/ln.c (usage): Likewise.
* src/mv.c (usage): Likewise.
Suggestion from Santiago Vila Doncel.
* configure.in (AC_REPLACE_FUNCS): Add group_member.
(AC_LINK_FILES): Create link lib/group_member.c to lib/group-member.c.
* lib/Makefile.am (fu_SOURCES): Remove group-member.c.
(EXTRA_DIST): Add group-member.c here.
Fri Jul 5 22:16:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c [!STDC_HEADERS]: Declare free.
From Marcus Daniels.
Thu Jul 4 12:34:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dd.c (usage): Remove space before newline in usage message.
* src/mknod.c (usage): Likewise.
* src/mv.c (usage): Likewise.
* src/Makefile.am (libexec_PROGRAMS): Regenerate using patched
automake-1.0 to work around rm -f bug on Solaris2.4.
Reported by Kaveh Ghazi.
* src/ls.c: Make `dir --version' and `vdir --version' print their
names, not `ls'.
Reported by Ulrich Drepper.
Wed Jul 3 17:41:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c: Include sys/types.h before system.h.
From Jim Blandy (jimb@cyclic.com).
* src/chgrp.c [!MAXUID]: Define after inclusion of system.h to avoid
warning about redefinition on SunOS4, Solaris2.4 and SGI-irix5.3.
From Kaveh Ghazi. Also, Santiago Vila Doncel reported that defining
MAXUID before including system.h caused a compilation failure on some
ConvexOS system.
Tue Jul 2 22:56:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (VERSION): Bump to 3.12q.
* src/system.h [!EXIT_SUCCESS]: Define it.
[!EXIT_FAILURE]: Define it.
* lib/strndup.c (strndup): Include stdio.h and sys/types.h to
get definition of NULL and size_t on SunOS4.1.3.
Mon Jul 1 23:47:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ln.c (do_link): Update messages to ease translation.
Suggestion from Santiago Vila.
Sun Jun 30 16:41:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/install.c (usage): Fix typo, 3nd->3rd, in usage message.
From Santiago Vila Doncel.
Sat Jun 29 00:33:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (PACKAGE_VERSION): Add `GNU ' prefix so we see
it in the output of --version. Reported by RMS.
* src/Makefile.am (BUILT_SOURCES): Guard dependency on dircolors.h
with @MAINT@ so it won't be removed with a casual disctlean.
(EXTRA_DIST): Add dcgen.pl and dircolors.hin.
Fri Jun 28 22:56:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (dc_parse_stream): Move `enum states' dcl into
this function.
* src/ln.c (do_link): Allow `ln -sf --backup k k' to succeed in
creating the self-referential symlink, since doing so doesn't
remove the source but merely renames it.
Wed Jun 26 06:58:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
* ln.c (same_name): New function.
(do_link): Use it to test reliably whether A and B (from
ln --force A B) are hard links to the same file.
From Andreas Schwab.
Tue Jun 25 00:03:43 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/getline.c: New file.
* lib/getline.h: New file.
* lib/Makefile.am (fu_SOURCES): Add getline.c.
(noinst_HEADERS): Add getline.h.
Mon Jun 24 22:39:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_REPLACE_FUNCS): Add strndup.
(AC_PATH_PROG): Check for perl.
* ls.c (decode_switches): Allow 0 as argument to --tabsize (-T) option.
Interpret as a directive to use no TAB characters to separate columns.
(indent): Handle TABSIZE == 0.
* dircolors.c (dc_parse_stream): Remove spurious newline in
error message.
(dc_parse_stream): Give `unrecognized keyword' diagnostic for
misspelled `TERM' keyword as well as for others.
Sun Jun 23 12:58:32 1996 Jim Meyering <meyering@na-net.ornl.gov>
* dircolors.hin: New file.
* dcgen.pl: New file.
* src/Makefile.am (dircolors.h): Add a rule to create this file.
(dcgen): Likewise.
* dircolors.c (parse_line): Rewrite to avoid modifying LINE.
Put LINE first in parameter list.
Adjust caller.
(dc_parse_stream): Free KEYWD and ARG.
(main): Give diagnostic for unreasonable combinations of
options/arguments.
* lib/Makefile.am (EXTRA_DIST): Add strndup.c.
* configure.in (AC_REPLACE_FUNCS): Add strndup.
* strndup.c: New file. From id-utils-3.0k.
(strndup): Deansify.
[!STDC_HEADERS]: Include string.h and stdlib.h.
Sat Jun 22 16:57:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
* dircolors.c: Major overhaul. No longer read from /etc/DIR_COLORS
or from ~/.dircolors. Defaults are now compiled in. If you specify
a file on the command line, it is used instead of the compiled-in
defaults.
(main): New option --print-database (-p).
Detect write failure.
Add --bourne-shell and --c-shell aliases for --sh and --csh resp.
Tue Jun 18 20:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
* cp.c (copy_reg): Cast both sides of comparison to size_t
to avoid a warning about `comparison between signed and unsigned'
from gcc -Wall.
Declare pointer parameters const as appropriate.
* ln.c (do_link): Refine last change so we don't disallow commands
like `ln --force A B' when A and B are hard links to the same file.
See comments in the source. Reported by Erik Naggum <erik@naggum.no>
and Andreas Schwab.
* ls.c (decode_switches): Correct typo in error messages:
enironment -> environment. From Santiago Vila Doncel
<sanvila@unex.es>.
* aclocal.m4: Update from gettext-0.10.20.
* ABOUT-NLS: Likewise.
* intl/*: Likewise.
* cp.c (do_copy): Change message from `missing file argument' to
more precise `missing destination file'. From Karl Berry.
* ln.c (STREQ): Remove macro definition
* system.h (STREQ): Add it here instead.
* cp.c (do_copy): Use STREQ here instead of strcmp(...) == 0.
* ls.c (parse_ls_color): Likewise.
* df.c (selected_fstype, excluded_fstype, show_disk, main): Likewise.
* cp.c (do_copy): When the force and backup options have been
specified and the source and destination are the same name for an
existing, regular file, convert the user's command, e.g.
`cp --force --backup foo foo' to `cp --force foo fooSUFFIX'
where SUFFIX is determined by any version control options used.
(usage): Update --help message.
At urging of (most recently) Karl Berry.
Sun Jun 16 13:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
* doc/Makefile.am (EXTRA_DIST): Add texinfo.tex.
* Makefile.am (cvs-dist): Use -c option in cvs tag command.
Sat Jun 15 22:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (ALL_LINGUAS): Add pt.
(AC_REPLACE_FUNCS): Add basename.
* Makefile.am (EXTRA_DIST): Add basename.c.
(fu_SOURCES): Remove basename.c.
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.
Sat Jun 1 12:44:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
* ls.c: Rename options and internal variables to reflect change to
--color=WHEN where WHEN is never, always, or auto (for consistency
with e.g. cp --sparse=WHEN. For at least a while, the original
slackware-supported arguments `none', `force', `yes', etc will be
supported but deprecated by lack of documentation.
(decode_switches): Use STDOUT_FILENO instead of `1' in isatty test.
(usage): Update/add description of the --color option.
* ls.c: Declare pointer parameters const as appropriate.
Tue May 28 18:39:49 1996 Jim Meyering <meyering@na-net.ornl.gov>
* dd.c (print_stats): Don't mark "%u %s" as a translatable string.
* mv.c (main): Don't mark "%s" as a translatable string.
From Göran Uddeborg.
Thu May 23 07:50:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
* ls.c (usage): Make --literal (-N) description clearer.
* acconfig.h (MOUNTED_LISTMNTENT): Add it.
* fsusage [_CRAY]: Don't include sys/filsys.h because although
Unicos-9 has it, it's not needed and would cause other problems
because it requires inclusion of other, non-standard headers.
* mountlist.c (read_filesystem_list) [MOUNTED_LISTMNTENT]: New
function.
From Johan Danielsson (joda@pdc.kth.se).
* configure.in (AC_CHECK_FUNCS): Add listmntent for Unicos-9.
Define MOUNTED_LISTMNTENT #ifdef _CRAY and HAVE_GETMNTENT.
With an initial patch from Johan Danielsson.
Wed May 22 18:58:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (LINGUAS): Add sv.
Tue May 21 07:06:30 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/euidaccess.c (euidaccess) [!S_IROTH]: Define.
[!S_IWOTH]: Define.
[!S_IXOTH]: Define.
Marcus Daniels <marcus@sysc.pdx.edu> reported that m68k NEXTSTEP 3.2
doesn't define S_IROTH or S_IWOTH unless some posix compile option
is used and associated symbols defined.
Sun May 19 09:32:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
* chown.c: New option: --no-dereference (-h). Solaris 5.4's chown
provides -h.
(change_file_owner): Use lchown if --no-dereference (-h) was given.
(usage): Update.
(main): Fail if user requests --no-dereference on a system that
doesn't have support for it.
* chgrp.c: New option: --no-dereference (-h).
[!MAXUID]: Define to INT_MAX.
(change_file_group): Use lchown if --no-dereference (-h) was given.
(usage): Update.
(main): Fail if user requests --no-dereference on a system that
doesn't have support for it.
Wed May 15 22:54:31 1996 Jim Meyering (meyering@na-net.ornl.gov)
* fsusage.c (get_fs_usage): Declare parameter PATH to be const.
* fsusage.h: Update prototype to match.
* chmod.c (describe_change): Declare pointer parameters to be const.
(change_file_mode): Likewise.
(change_dir_mode): Likewise.
* ln.c (do_link): Declare pointer parameters to be const.
* df.c (main): Fail with a diagnostic if both --human-readable and
--portability are used.
Likewise if --megabytes and --portability are used.
Rearrange function definitions to precede respective uses to obviate
all forward dcls. Remove forward dcls.
Declare parameters const as appropriate.
* modechange.c (mode_compile): Declare parameter MODE_STRING const.
Remove register attribute.
(mode_adjust): Likewise for CHANGES.
* modechange.h: Reflect above changes in prototypes.
* lib/Makefile.am (getdate.c): Disable dependencies that can
require rerunning YACC when not in maintainer mode.
(posixtm.c): Likewise.
Tue May 14 23:36:54 1996 Jim Meyering (meyering@na-net.ornl.gov)
* dd.c (print_stats): Restructure pluralization of error message
so it's easier to translate. Reported by Göran Uddeborg
<gvran@uddeborg.pp.se>.
* mv.c (main): Likewise.
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.
Sun May 5 20:27:47 1996 Jim Meyering (meyering@na-net.ornl.gov)
* src/Makefile.am (bin_PROGRAMS): Add dircolors.
(DEFS): Add -DSHAREDIR=\"$(datadir)\".
(GNUVER): Remove definition of unused variable.
Sat May 4 20:54:32 1996 Jim Meyering (meyering@na-net.ornl.gov)
* system.h [IN_CTYPE_DOMAIN]: Rename from ISASCII.
* backupfile.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
* dircolors.c: Make enumerated constants upper case.
(main): Don't use ANSI-style string concatenation.
Add `static' and/or `const' to some file scope variables.
Wed May 1 00:20:00 1996 Jim Meyering (meyering@na-net.ornl.gov)
* lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c.
* configure.in (AC_REPLACE_FUNCS): Add strcasecmp.
* ls.c (parse_ls_color, usage): Remove support for alternate spellings:
--colours and LS_COLOURS.
(parse_ls_color): Reverse sense of test for LS_COLORS environment
variable and return -- save a level of indentation on a 100+-line
block.
Mon Apr 29 22:07:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
* POTFILES.in: Add chgrp.c. From François Pinard.
Add dircolors.c.
* dircolors.c: New file. Written by H. Peter Anvin.
Sun Apr 28 16:32:38 1996 Jim Meyering (meyering@na-net.ornl.gov)
* ls.c: Apply color ls changes by Peter Anvin <Peter.Anvin@linux.org>
and Dennis Flaherty <dennisf@denix.elk.miles.com> based on original
patches by Greg Lee <lee@uhunix.uhcc.hawaii.edu>. And on top of all
that, a few changes from Ulrich Drepper.
* ls.c (parse_ls_color): Use strcpy to initialize 3-character array.
Automatic aggregate initialization isn't portable.
Remove all ^L's.
(get_funky_string): Declare static and move to precede single
caller: parse_ls_color.
Make some globals `static' and/or `const'.
(LEN_STR_PAIR): New macro.
(color_indicator): Use it in this declaration.
(parse_ls_color): Use error, not fprintf.
(decode_switches): Add a comment.
(print_name_with_quoting): Add braces around inner if-else
statement to clarify.
* configure.in: Add a comment that fp_C_PROTOTYPES must 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.
* fileblocks.c [HAVE_ST_BLOCKS || _POSIX_VERSION]: Add extern dcl
of unused variable so that after preprocessing, the file will never
be empty. Otherwise, some compilers in ANSI mode (among them, the
Dec Alpha OSF 2.0 C compiler) reject empty files. From Kaveh Ghazi.
Indent CPP conditionals.
Fri Apr 26 05:52:03 1996 Karl Eichwalder <ke@ke.Central.DE>
* ls.c (usage): Add newline at end of printf format string.
Wed Apr 24 21:33:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
* ln.c (do_link): Remove duplicate `if (lstat(...' block.
* ln.c (do_link): With --force, don't remove DEST when it's
the same as SOURCE. Before, `ln -f FILE FILE' would remove FILE.
Reported by Bruno Haible (haible@ilog.fr).
* mkdir.c (main): Use verbose_fmt_string, not string literal in
call to make_path for --parents. Reported by Ulrich Drepper.
* doc/mdate-sh: Get year as last rather than 6th field in output
of date. Otherwise, people with 2-word TZ (like `MET DST') lost.
From Andreas Schwab.
Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
* src/*.c, src/*.h: Update Copyright years to include 1996.
* aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
* configure.in: Use it.
* lib/Makefile.am (fu_SOURCES): Remove getopt.c and getopt1.c.
(EXTRA_DIST): Add getopt.c and getopt1.c
* configure.in (AC_CHECK_FUNCS): Add lchown.
* chgrp.c [HAVE_LCHOWN]: Define chown to lchown.
* chown.c [HAVE_LCHOWN]: Likewise.
* cp.c [HAVE_LCHOWN]: Likewise.
* mv.c [HAVE_LCHOWN]: Likewise.
Suggested by François Pinard.
* backupfile.c (find_backup_file_name, max_backup_version,
make_version_name, version_number, concat): Const-ify decls of
formal parameters.
* backupfile.h: Likewise.
* du.c (usage): The long-named arg is --human-readable, not --human.
* df.c: Be consistent. Accept --human-readable, not just --human.
(usage): Reflect the change.
From Karl Berry.
Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
* df.c (usage): Reflect that now --no-sync is the default.
* Makefile.am (LDADD): Put @INTLLIBS@ before package library.
Sat Apr 20 22:48:59 1996 Jim Meyering (meyering@na-net.ornl.gov)
* ls.c: Include xstrtol.h.
(decode_switches): Use xstrtol, not atoi.
Detect and ignore invalid value for COLUMNS environment variable.
In error about invalid TABSIZE, don't reference optarg!
[!POSIXLY_CORRECT]: Don't consider TABSIZE environment variable.
* install.c: Include xstrtol.h.
[HAVE_VALUES_H]: Include <values.h>.
[!BITSPERBYTE]: Define.
[!UID_T_MAX]: Define.
[!GID_T_MAX]: Define.
(get_ids): Use xstrtol, not atoi.
(is_number): Remove now-unused function.
* configure.in (AC_CHECK_HEADERS): Add values.h.
Fri Apr 19 00:06:02 1996 Jim Meyering (meyering@na-net.ornl.gov)
* Makefile.am (cvs-dist): New rule. Based on the one from
Tom Tromey's automake.
* df.c: No longer call sync by default.
* cp.c (copy_reg): Rearrange arithmetic in conditional to avoid
integer overflow with large files.
Fri Apr 12 21:40:44 1996 Jim Meyering (meyering@na-net.ornl.gov)
* mkdir.c (main): Add new option: --verbose.
Remove long-deprecated and nowhere-documented --path, a synonym
for --parents. It was confusing to get an error about `--p'
being ambiguous.
Thu Apr 4 21:28:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
* configure.in (LINGUAS): Add de.
* po/de.po: New file.
* src/Makefile.am (EXTRAdir): Set to $(bindir).
Wed Apr 3 06:12:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
* cp.c (copy_reg): Use `ST_NBLOCKS (sb) * 512', not `sb.st_blocks *
DEV_BSIZE.' From H.J. Lu (hjl@lucon.org).
* mvdir.c: Protoize.
Include save-cwd.h.
(fullpath): Rewrite to use save_cwd, xgetcwd, and restore_cwd
rather than explicit chdir/getcwd calls.
* src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
when srcdir != builddir. From Kaveh Ghazi.
Mon Apr 1 23:50:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
* cp.c: Include assert.h (disabled).
(path_concat): New function.
(do_copy): Use path_concat instead of open-coding part of its
functionality in two places. This has the additional benefit
of avoiding forming destination names like `D//file' when the
destination directory D includes a trailing slash -- as would
happen when cp is used like this:
mkdir D; touch file D/file; cp -i file D/
Reported by François Pinard.
Sun Mar 31 11:18:09 1996 Jim Meyering (meyering@na-net.ornl.gov)
* ls.c (quote_filename): Use ISGRAPH and ISPRINT in place of
ASCII-centric tests against literals.
(length_of_file_name_and_frills): Likewise.
Thu Mar 21 16:43:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
* src/*.c (main): Declare to be of type int, not void.
Sat Mar 16 10:46:23 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.
* chgrp.c chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c
ls.c mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c
touch.c: Don't include version.h.
(main): Use PACKAGE_VERSION instead of version_string.
Sun Mar 10 22:36:11 1996 Jim Meyering (meyering@na-net.ornl.gov)
* backupfile.c (max_backup_version): Declare file_name_length to
be of type size_t. This avoids a warning from gcc -Wall.
* chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c ls.c
mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c
touch.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.
(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.
Thu Mar 7 20:26:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
* df.c (main): Tell read_filesystem_list that it should determine
file system type when the user specifies --print-type or -T.
From Michael Rendell <michael@cs.mun.ca>.
Tue Feb 27 23:13:46 1996 Jim Meyering (meyering@na-net.ornl.gov)
* src/Makefile.am: Adapt for automake-0.30.
(noinst_HEADERS): Rename from HEADERS.
(EXTRA_PROGRAMS): Set to `df mvdir'.
(PROGRAMS): Remove definition.
(bin_PROGRAMS): Remove hard-coded df. Use @DF_PROG@ instead.
(libexec_PROGRAMS): Remove hard-coded mvdir. Use @MVDIR_PROG@ instead.
* lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
* configure.in (DF_PROG, MVDIR_PROG): Use these instead of bundling
both into PROGS.
Mon Feb 26 21:23:58 1996 Jim Meyering (meyering@na-net.ornl.gov)
* dd.c (copy): Remove bogus (now that we're using full_write)
increment of w_partial.
Change sense of the tests (though they're equivalent) that check
the value returned by full_write. making it clearer where errno
is valid. full_write always writes the full amount or fails.
Thu Feb 15 23:08:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
* cp.c (copy): Detect (and fail) when creating backup file would
destroy the source file. Before, running the commands
cd /tmp; rm -f a a~; : > a; echo A > a~; cp -b -V simple a~ a
would leave two zero-length files: a and a~.
Reported by Martin C. Martin <mcm@cs.cmu.edu>.
Mon Feb 12 23:23:25 1996 Jim Meyering (meyering@na-net.ornl.gov)
* configure.in (LIBOBJS): Split assignment into two statements to
accomodate automake-0.29 buglet.
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.
Wed Jan 31 21:50:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
* dd.c (skip): Change type of parameter #5 from char* to
unsigned char* to match type of argument.
(copy): Cast first arg in memset call to char* to avoid warnings
from SunOS's acc.
(copy_simple): Likewise.
* du.c: Remove comma after last item in enum.
* df.c: Remove block of usage comments at beginning of file.
* df.c (main): New options --human-readable (-h) and --megabytes (-m).
(human_readable_1k_blocks): New function.
(print_header): Honor new options.
(show_dev): Honor new options.
Add ifdef'd-out code to avoid printing lines for mount points that
match ^/auto/.* and ^/tmp_mnt.*. Rather than hard-coding those
two prefixes, the code should allow the user to specify a regular
expression. From Larry McVoy (lm@sgi.com).
* du.c (human_readable): Fix off-by-one error that converted
1024*1024 to 1024K rather than 1G. Describe the function.
* df.c (human_readable_1k_blocks): Likewise
(usage): Update usage message to reflect additions.
Sat Jan 20 06:00:09 1996 Jim Meyering (meyering@na-net.ornl.gov)
* cp-aux.c (usage): Fix description of --archive. From Andreas Schwab.
* install.c (copy_files): Accept backup/suffix options just as cp,
ln, and mv do. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
* src/Makefile.am (DISTCLEANFILES): Set to stamp-v version.c.
(version.c): Update with rules from textutils.
(transform): Add `s/ginstall/install/;' prefix.
* lib/Makefile.am (BUILT_SOURCES): Set to posixtm.c getdate.c so
autodependencies work after `make maintainer-clean.'
* du.c (main): New options --human-readable (-h) and --megabytes (-m).
(human_readable): New function.
From Larry McVoy (lm@sgi.com).
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.
Sat Dec 23 11:33:19 1995 Jim Meyering (meyering@comco.com)
* ls.c (decode_switches): Make -o a synonym for -lG for compatibility
with most other versions of ls. Reported by Karl Berry.
(usage): Update.
Fri Dec 22 00:48:01 1995 Jim Meyering (meyering@comco.com)
* dd.c (cleanup): New function -- broken out from quit.
(interrupt_handler): Rewrite to reset default signal handler,
call cleanup, then repost caught signal.
Thu Dec 21 23:15:06 1995 Jim Meyering (meyering@comco.com)
* argmatch.h: New file.
* lib/Makefile.am (HEADERS): Add argmatch.h.
* argmatch.c: (argmatch): Add const attribute to parameters.
(invalid_arg): Add const attribute to parameters.
* cp.c: Include argmatch.h.
* ls.c: Likewise.
* touch.c: Likewise.
* cp.c (main): Accept new option, --sparse={never,auto,always},
to control creation of sparse files.
(copy_reg): Set local, make_holes, from global flag_sparse.
* cp-aux (usage): Describe new option.
Mon Dec 18 22:29:49 1995 Jim Meyering (meyering@comco.com)
* ln.c: [SYMBOLIC_SPACE_STRING]: New macro.
(do_link): Use SYMBOLIC_SPACE_STRING instead of open-coded #ifdef.
For --verbose, output `create [symbolic ]link DEST to SRC' instead
of ambiguous (or inconsistent with cp -v and mv -v) `SRC -> DEST.'
Tue Dec 5 17:38:11 1995 Jim Meyering (meyering@comco.com)
* rm.c (rm): Work around SunOS 4 bug whereby lstat doesn't fail
when given a zero-length file name argument. Reported by
Mark Calabretta <mcalabre@atnf.csiro.au>.
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.
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>.
Fri Nov 10 23:31:46 1995 Jim Meyering (meyering@comco.com)
* src/Makefile.in (.c._o, ._c._o): Remove temporary source files.
(.c._c): Don't redirect directly to $@.
* src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
(clean): Remove temp files generated by ansi2knr rules.
(ansi2knr): New rule.
Add suffixes, dependencies, and rules to convert ANSI source to K&R
when required.
($(OBJECTS)): Depend on $(ANSI2KNR)
* configure.in: Add fp_C_PROTOTYPES.
* Makefile.in (DISTFILES): Add aclocal.m4.
(configure): Depend on aclocal.m4.
(stamp.h.in): Depend on aclocal.m4 and acconfig.h.
* acconfig.h: Add PROTOTYPES.
* cp.h: Remove declaration of error. Include error.h instead.
Protoize forward dcls of functions in cp-hash.c and cp-aux.c
* cp-aux.c: Protoize and add const attribute to parameters.
* cp-hash.c: Likewise.
Thu Nov 9 23:27:05 1995 Jim Meyering (meyering@comco.com)
* system.h [__P]: Define it.
* src/*.c: Protoize.
* ls.c (enum filetype): Move dcl to precede prototypes.
(struct fileinfo): Likewise.
Add const attribute to some parameters.
* rm.c (struct pathstack): Move dcl to precede prototypes.
* dd.c (translate_charset): Make parameter `const'.
* ln.c (main): Move to the end.
Remove most fwd dcls.
* chmod.c: Likewise.
* chown.c: Likewise.
* chgrp.c: Likewise.
* mkdir.c: Likewise.
* mkfifo.c: Likewise.
* mknod.c: Likewise.
* mvdir.c: Likewise.
* touch.c: Likewise.
* mv.c: Rearrange functions to obviate forward dcls.
Remove forward dcls.
* cp.c: Protect prototyped forward dcls with __P.
* dd.c: Likewise.
* df.c: Likewise.
* du.c: Likewise.
* install.c: Likewise.
* ls.c: Likewise.
* rm.c: Likewise.
Wed Nov 1 23:11:05 1995 Jim Meyering (meyering@comco.com)
* cp.c (copy): Use euidaccess instead of euidaccess_stat.
* mv.c (do_move): Likewise.
* rm.c (remove_file, remove_dir): Likewise.
Sun Oct 29 06:06:13 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.
Add line that (--with-autodeps) will include mkdep-Makefile.
(distclean): Remove .deps.
* src/Makefile.in: Likewise.
* src/Makefile.in (test.o): Remove special rule.
* mkdep-Makefile: New file.
* Makefile.in (DISTFILES): Add mkdep-Makefile.
* doc/Makefile.in (mostlyclean): Remove *.info.
* touch.c: Change long option name `--file' to `--reference'.
Leave --file as an alias, for now. It will be removed later.
(usage): Reflect option name change. From Franc,ois Pinard.
Wed Oct 18 23:09:55 1995 Jim Meyering (meyering@comco.com)
* configure.in (AC_CHECK_HEADERS): Add sys/wait.h and sys/ioctl.h.
(AC_CHECK_FUNCS): Add endpwent.
* fileblocks.c: Use _POSIX_VERSION, not _POSIX_SOURCE.
* userspec.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
[endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
* chgrp.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
* chown.c [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
[endgrent]: Remove unused definition.
* df.c (main): Fail if the same file system type was both selected
and excluded. Reported by Paul Close pdc@lunch.engr.sgi.com.
* rm.c (duplicate_entry): Always return 0 if !D_INO_IN_DIRENT,
rather than if _POSIX_SOURCE.
* install.c: Use HAVE_SYS_WAIT_H, not _POSIX_VERSION in conditional
inclusion of sys/wait.h.
[endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
[endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
* ls.c Use HAVE_SYS_IOCTL_H, rather than !_POSIX_SOURCE || _AIX.
Thu Oct 5 21:49:34 1995 Jim Meyering (meyering@comco.com)
* configure.in (HAVE_STRUCT_UTIMBUF): Add new test. Testing for
the existence of <utime.h> is insufficient on some Next systems.
* acconfig.h (HAVE_STRUCT_UTIMBUF): Add it.
* system.h [!HAVE_UTIME_H]: Don't declare struct utimbuf here.
[!HAVE_STRUCT_UTIMBUF]: Declare struct utimbuf here instead.
* chgrp.c: Include limits.h.
[!INT_MAX]: Define it.
* df.c (show_point): Cast -2 to dev_t before assignment.
* mountlist.c (read_filesystem_list): Cast -1 to dev_t before
assignment.
Sun Oct 1 13:22:36 1995 Jim Meyering (meyering@comco.com)
* configure.in (AC_REPLACE_FUNCS): Add strtoul.
* strtoul.c: New file.
* lib/Makefile.in (SOURCES): Add strtoul.c.
* acconfig.h (STATFS_TRUNCATES_BLOCK_COUNTS): Add it.
* configure.in (STATFS_TRUNCATES_BLOCK_COUNTS): New check to enable
workaround for SunOS statfs brokenness. Block counts in struct
statfs for partitions 2GB and larger are truncated, but correct
values are stored in f_spare array member.
* fsusage.c (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Copy
untruncated block counts from f_spare array into proper members
of struct statfs. From Eirik Fuller (eirik@netapp.com);
* ls.c (dired_dump_obstack): Don't generate any output if the
obstack is empty.
(main): Always initialize and dump subdired_obstack, not just if -R.
`ls -lDR dir dir2' was using uninitialized subdired_obstack.
Reported by Samuli K{rkk{inen <hskarkka@snakemail.hut.fi>.
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.
Mon Sep 25 23:12:37 1995 Jim Meyering <meyering@gremlin.comco.com>
* src/df.c (show_point): Ignore mtab entries with either
nonexistent mount points or with inconsistent device number.
From Eirik Fuller <eirik@synopsys.com>.
Wed Aug 9 00:33:05 1995 Jim Meyering (meyering@comco.com)
* mknod.c (my_strtol): Remove function.
(main): Use xstrtol instead.
Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
* Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
From Franc,ois.
Fri Aug 4 22:11:06 1995 Jim Meyering (meyering@comco.com)
* install.c (isnumber): Rename to is_number to avoid conflict with
FreeBSD 2.0.5 macro definition. Reported by David O'Brien
(obrien@sea.legent.com).
* lib/save-cwd.c: New file.
* lib/save-cwd.h: New file.
* lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files.
* configure.in: (AC_REPLACE_FUNCS): Remove fnmatch.
Add check for working fnmatch functions so that
systems providing it don't incur the space overhead of linking
with the version in lib. Cross compiling builds always use the
version in lib.
* ls.c (decode_switches): Set SORT_TYPE. Before, ls -c was sorting
by name, rather than change time. Reported by Ken Estes
(m-ke0082@sparky.cs.nyu.edu).
* du.c: (save_cwd, restore_cwd, free_cwd): Remove functions.
New versions have been broken out into save-cwd.c.
(du_files): Adapt to handle status code returned by new versions
of save_cwd and restore_cwd.
(count_entry): Likewise.
* all programs (main): Include program name in --version output.
* src/Makefile.in (cp.o): Depend on ../lib/obstack.h.
* xstrtol.c, xstrtol.h: New files.
* xstrtoul.c, xstrtoul.h: New files.
* lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files.
* chgrp.c (parse_group): Use xstrtoul instead of isnumber; the
latter would silently overflow, accepting a group id larger
than INT_MAX.
(isnumber): Remove now-unused static function.
(change_file_group) [MAXUID]: Give a more descriptive message
when numeric group id is larger than MAXUID.
Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
* system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
Without this, SunOS doesn't get type for memchr.
Reported by Kaveh Ghazi.
Sun May 21 07:20:55 1995 Jim Meyering (meyering@comco.com)
* all source files (usage): Include one- or two-line synopsis
in --help output. From Karl Berry.
* Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
* All Makefile.in (install-exec, install-exec): New targets.
From Karl Berry.
* all Makefile.in (maintainer-clean): Renamed from realclean
per GNU Standards.
* euidaccess.c: No longer include safe-l?stat.h.
* fsusage.c: Likewise.
* isdir.c: Likewise.
* makepath.c: Likewise.
* mkdir.c: Likewise.
* rename.c : Likewise.
* rmdir.c: Likewise.
Sat May 13 07:47:44 1995 Jim Meyering (meyering@comco.com)
* lib/Makefile.in: Remove safe-l?stat.[ch]in and related rules.
(maintainer-clean): Rename from realclean.
(.PHONY): New dependencies.
[.c.o]: Remove -I. since safe-l?stat.h are no longer used.
* argmatch.c (argmatch): Include sys/types.h and declare length
argument with type size_t.
* backupfile.c: Remove unnecessary definitions for r?index.
Update definitions for ISDIGIT.
* basename.c (basename): Make argument const.
* euidaccess.c (eaccess_stat): Make statp and path arguments const.
(euidaccess): Make statp argument const. Use stat, not safe_stat.
* fsusage.c (statfs): Use stat, not safe_stat.
* isdir.c (isdir): Likewise.
* mkdir.c (mkdir): Likewise.
* rename.c (rename): Likewise.
* rmdir.c (rmdir): Likewise.
* userspec.c (parse_user_spec): Use strchr, not index.
[!HAVE_STRING_H]: Define strchr in terms of index, not the
other way around.
* makepath.c: (make_path): Use stat, not SAFE_STAT.
Use strchr, not index. Adjust defines accordingly.
* makepath.h: Undef __P before defining.
Guard definition with simpler `#if __STDC__'.
* chgrp.c: Use stat (lstat), not safe_stat (safe_lstat).
* chmod.c: Likewise.
* chown.c: Likewise.
* cp-hash.c: Likewise.
* cp.c: Likewise.
* df.c: Likewise.
* du.c: Likewise.
* install.c: Likewise.
* ln.c: Likewise.
* ls.c: Likewise.
* mv.c: Likewise.
* mvdir.c: Likewise.
* rm.c: Likewise.
* touch.c: Likewise.
Fri May 12 21:21:23 1995 Jim Meyering (meyering@comco.com)
* mv.c (movefile): Remove a single trailing slash from destdir
before concatenating with `/' and filename for `ok to overwrite...'
message. Reported by Franc,ois Pinard.
Mon May 1 23:03:30 1995 Jim Meyering (meyering@comco.com)
* ls.c (quote_filename): Never return NULL when quoting filenames
as C-strings. --quote-name was quoting only strings containing
at least one C-quotable character. Reported by David J. MacKenzie.
Mon Mar 20 21:44:40 1995 Jim Meyering (meyering@comco.com)
* rename.c (rename): Compare src and dest inode numbers rather
than src inode and dest dev when determining whether they refer
to the same file. From marc@math.cornell.edu (Marc Parmet).
* df.c (usage): Add ellipsis after `[OPTION]'. Use FILE,
not deprecated PATH in text of help message. From Karl Berry.
Fri Mar 10 21:13:23 1995 Jim Meyering (meyering@comco.com)
* src/*.c: Update Copyright dates.
* src/Makefile.in (uninstall): Handle case in which LIBPROGS is empty.
Reported by Peter Smidt <smidt@cd.chalmers.se>.
Thu Feb 23 22:29:11 1995 Jim Meyering (meyering@comco.com)
* du.c (save_cwd) [!HAVE_FCHDIR]: Always initialize cwd->desc.
(restore_cwd) [!HAVE_FCHDIR]: Remove unnecessary redefinition
of fchdir. Both from Bruno Haible.
Mon Feb 20 22:54:39 1995 Jim Meyering (meyering@comco.com)
* du.c (save_cwd, restore_cwd): New functions.
(main): Use them instead of open coded versions.
(count_entry): Use them here instead of relying on chdir ("..") --
but only when necessary. Before, with --dereference (-L),
traversing a symlink caused failure because chdir ("..") didn't
work as expected. Reported by Bruno Haible.
Sat Feb 11 07:52:01 1995 Jim Meyering (meyering@comco.com)
* configure.in (AC_REPLACE_FUNCS): Add memcmp, memcpy, and memset.
(AC_CHECK_FUNCS): Add strchr and strrchr.
* lib/Makefile.in (SOURCES): Add memcmp.c, memcpy.c, and memset.c.
* system.h: Remove index/rindex and bcmp/bcopy/bzero references.
Separate errno declaration from STDC_HEADERS.
* dd.c (copy): Use memset, not bzero.
(copy_simple): Use memcpy, not bcopy.
* fsusage.c (get_fs_usage, statfs): Use safe_read, and safe_stat
rather than bare read and stat. From Bruno Haible.
* lib/Makefile.in (DISTFILES): Add error.h.
* chgrp.c, chmod.c, chown.c, cp-hash.c, cp.c, df.c, du.c, install.c,
ln.c, ls.c, mv.c, mvdir.c, rm.c, touch.c: Rename SAFE_STAT and
SAFE_LSTAT to safe_stat and safe_lstat.
* basename.c (basename): Use strrchr, not rindex.
[!STDC_HEADERS && !HAVE_STRING_H]: Define strrchr to rindex.
Tue Dec 27 07:07:53 1994 Jim Meyering (meyering@comco.com)
* src/*.c: Include "error.h" rather than simply declaring
`void error ();'.
* src/Makefile.in (OBJECTS): Depend on ../lib/error.h.
* sync.c (main): Make error message accurate.
* dd.c (skip): Use safe_read instead of read.
(copy): Use full_write instead of write.
From Bruno Haible.
Sat Dec 10 00:02:09 1994 Jim Meyering (meyering@comco.com)
* Makefile.in (install): Install `install' first as transformed
`ginstall,' then remove the target (transformed `install')
and move GNU install into its place. Before, the installation
process failed on systems (e.g. HPUX) that can't overwrite the
executable associated with a running process.
* system.h [!HAVE_STRING_H]: Define strchr to index and strrchr to
rindex instead of the other way around.
* rmdir.c (remove_parents): Use strr?chr instead of r?index.
* mvdir.c (main): Likewise.
* dd.c (parse_conversion, scan_args): Likewise.
* cp.c (copy, make_path_private): Likewise.
* system.h: Include <ctype.h> and define IS* macros.
* touch.c: No longer include <ctype.h>.
* chown.c: Likewise.
* install.c: Likewise.
[isascii, ISDIGIT]: Remove definitions.
* chgrp.c: Likewise.
* dd.c: Likewise.
Sun Dec 4 14:53:12 1994 Jim Meyering (meyering@comco.com)
* doc/Makefile.in (DISTFILES): Add getdate.texi.
Fri Nov 11 11:15:20 1994 Jim Meyering (meyering@comco.com)
* mknod.c (my_strtol): New function.
(main): Use it instead of atoi to convert argument strings to
major and minor device numbers. Now, mknod diagnoses invalid
device numbers and accepts octal and hexadecimal as well as
decimal string arguments. Ralf Lammers
<rlammers@physik.uni-osnabrueck.de> suggested that mknod accept
hex device numbers for compatibility with HPUX's mknod program.
* configure.in (AC_REPLACE_FUNCS): Add strtol.
* lib/Makefile.in (SOURCES): Add strtol.c.
Sun Nov 06 00:18:56 1994 Jim Meyering (meyering@comco.com)
* Version 3.12.
Sat Nov 05 15:20:07 1994 Jim Meyering (meyering@comco.com)
* group-member.c: Use up-to-date version.
* group-member.h: New file.
* lib/Makefile.in (DISTFILES): Add group-member.h.
(group-member.o): Depend on group-member.h.
* Version 3.11.
* src/Makefile.in (obstack.o): Depend on obstack.h.
* makepath.c (makepath) [__STDC__]: Add an ANSI-style prototype.
From Kaveh Ghazi.
Fri Nov 04 17:27:55 1994 Jim Meyering (meyering@comco.com)
* Version 3.10.
Thu Nov 03 12:59:34 1994 Jim Meyering (meyering@comco.com)
* makepath.h: New file.
* makepath.c: Include it.
Add an argument: PRESERVE_EXISTING.
Declare char* arguments const.
* install.c, mkdir.c: Update callers. Set it in mkdir.c so
that `mkdir -p' ignores existing directories as POSIX mandates.
Before, it would try to change owner and/or permissions of such
directories. Christopher S. Arthur <csa@halcyon.com> reported
the mkdir -p failure.
* lib/Makefile.in (DISTFILES): Add it.
(makepath.o): Depend on makepath.h.
* src/Makefile.in (install.o, mkdir.o): Depend on makepath.h.
* cp.c (make_path_private): Rename function from make_path to
avoid confusion.
(do_copy): Update caller.
* ls.c: Include <limits.h> before system.h because limits.h on
some systems undefines PATH_MAX, whereas system.h includes pathmax.h
which sets PATH_MAX. From Kaveh Ghazi.
* euidaccess.c: Define S_IXUSR, S_IXGRP, and S_IXOTH in terms of
S_IEXEC if they're not already defined. Reported by Kaveh Ghazi
and Daniel Hagerty <hag@gnu.ai.mit.edu>.
Tue Nov 01 06:18:20 1994 Jim Meyering (meyering@comco.com)
* eaccess.c (euidaccess): Rename from eaccess to avoid conflict
with like-named, different function in some C libraries.
* euidaccess.c: Renamed from eaccess.c
* lib/Makefile.in (SOURCES): Rename eaccess.c.
Update dependency, too.
* configure.in (AC_REPLACE_FUNCS): Check for euidaccess
Mon Oct 31 08:02:31 1994 Jim Meyering (meyering@comco.com)
* ls.c (dired_dump_obstack): Cast obstack_finish for non-ANSI
compilers. Kaveh Ghazi reported the problem.
Sat Oct 29 00:42:18 1994 Jim Meyering (meyering@comco.com)
* fsusage.c (get_fs_usage) [STAT_STATFS4]: Define CONVERT_BLOCKS
to adjust_blocks for _AIX. Was getting off-by-8x numbers.
* df.c: Make --sync the default.
Add new option: --no-sync.
Remove short option alias for --sync.
(usage): Update.
* ls.c [!STDC_HEADERS]: Declare free.
(dired_dump_obstack): Cast pos[i] (of type size_t) to int so it
matches %d in printf.
(quote_filename): Fix typo in stpcpy call.
Thu Oct 27 00:02:45 1994 Jim Meyering (meyering@comco.com)
* fsusage.c: Include <sys/stat.h> before safe-stat.h.
* cp.c (make_path): Don't change protections on existing directory.
Reported by Andreas Schwab.
* df.c: New option: --sync. No longer perform sync by default.
Do it only when this option is used. Invoking sync can be very
expensive, and it's not clear that doing so yields more up to date
results. With encouragement/prodding from Paolo Zeppegno
(paolo@to.sem.it), Nick Holloway, and Kaveh Ghazi.
Thu Oct 20 00:52:59 1994 Jim Meyering (meyering@comco.com)
* system.h [!S_IEXEC]: Define as S_IXUSR.
* cp.h [S_IEXEC]: Remove definition. cp.c doesn't use it.
* ls.c [!INT_MAX]: Define to 2^31 - 1 so subsequent #if test works.
[S_IEXEC]: Remove definition. It's in system.h now.
(usage): Sort options, but without segregating upper and lower case.
* ls.c: Support for new option: --dired (-D).
(dired, dired_pos, dired_obstack, subdired_obstack): Global variables.
[PUTCHAR, FPUTS, FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS]: New macros
(dired_dump_obstack, quote_filename): New functions.
(main): Initialize obstacks.
(decode_switches): Recognize -D.
(print_dir): Make arguments `const.'
Record directory name indices in obstack.
(print_dir, print_long_format, print_type_indicator): Use macros
FPUTS, FPUTS_LITERAL, PUTCHAR for output.
(print_long_format): Record file name indices in obstack.
(print_name_with_quoting): Just call quote_filename and output the
result.
Mon Oct 17 23:56:36 1994 Jim Meyering (meyering@comco.com)
* savedir.c: Indent CPP conditionals. Change some #ifdefs to #ifs.
From Franc,ois Pinard.
Mon Oct 17 10:27:26 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu)
* lib/dirname.c: Use strrchr, not rindex.
Sun Oct 16 07:53:27 1994 Jim Meyering (meyering@comco.com)
* system.h (S_IXUSR, S_IXGRP, S_IXOTH): Define these in terms of
S_IEXEC if they're not already defined. From Kaveh Ghazi.
* eaccess.c (eaccess_stat): Don't use NULL in comparison.
Some systems don't define it except in stdio.h -- and including
(yes, just including) stdio.h has been known to significantly
increase object code size (though admittedly, that probably
happens only on old systems). Kaveh Ghazi reported the problem.
* src/Makfile.in lib/Makfile.in (DEFS): Remove -Dlint.
It causes problems on broken pyramid system.
From Kaveh Ghazi.
Sat Oct 08 10:39:32 1994 Jim Meyering (meyering@comco.com)
* mountlist.c: Always include <sys/param.h> if it exists.
(fstype_to_string) [__NetBSD__]: Don't define this function.
(read_filesystem_list) [__NetBSD__]: Use fsp's f_fstypename field,
rather than fstype_to_string (f_type). With suggestions from
Greg Hudson (ghudson@mit.edu).
* lib/Makefile.in (OBJECTS): Remove eaccess.o.
* configure.in (AC_REPLACE_FUNCS): Add `eaccess' here instead.
The Hurd and Linux will have it.
Fri Oct 07 20:27:48 1994 Jim Meyering (meyering@comco.com)
* (doc): New subdirectory with texinfo documentation.
* fileutils.texi: Thanks to Franc,ois Pinard and Karl Berry!
* 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.
* Makefile.in (install, uninstall): Prepend ginstall->install
mapping to standard $(transform) sed mapping.
* chgrp.c, chmod.c, chown.c, install.c, mkdir.c, mkfifo.c, mknod.c,
rm.c, rmdir.c (main): Diagnose wrong number of argument -- usually
too few -- instead of just referring the user to the --help option.
* mknod.c (main): Give diagnostics explaining specific problems
instead of just the usage message. Reported by Karl Berry.
* configure.in: Overhaul tests that determine how to get filesystem
usage statistics. Now, most use AC_TRY_RUN and test for the precise
feature that will be used. I know that that will make configuring a
little harder for the people who cross compile, but if one of them
is annoyed enough (or complains loudly enough :-) maybe someone will
find the time to add tests to be used solely when cross compiling.
* acconfig.h (STAT_READ): Rename to STAT_READ_FILSYS.
* fsusage.c: Reorganize accordingly.
Tue Oct 04 20:38:12 1994 Jim Meyering (meyering@comco.com)
* chmod.c (main): Remove trailing slashes from file name arguments.
Otherwise, `chmod 600 foo/; chmod 700 foo/' failed with the error
`chmod: foo/: Permission denied' under Linux 1.1.51. Reported by
Thomas Koenig (ig25@fg70.rz.uni-karlsruhe.de).
* chown.c (main): Likewise.
Thu Oct 2 23:03:32 1994 Jim Meyering (meyering@comco.com)
* configure.in: Replace obsolete AC_DIR_HEADER with AC_HEADER_DIRENT
and AC_FUNC_CLOSEDIR_VOID.
* configure.in: Remove AC_SIZEOF_TYPE(int).
ls.c: Instead of comparing SIZEOF_INT == 2, compare INT_MAX to 2^16.
Suggestion from Roland McGrath.
Sat Oct 01 21:23:27 1994 Jim Meyering (meyering@comco.com)
* src/*.c: Remove CONFIG_BROKETS conditional.
* {*/,}Makefile.in: Revamp to look much like those in sh-utils.
* acconfig.h (HAVE_FTRUNCATE): Remove it.
(ino_t, D_INO_IN_DIRENT): Add these.
* configure.in: Convert for autoconf-2.0.
* backupfile.c: Likewise.
* savedir.c: Likewise.
* mkdir.c, rmdir.c: Split the two functions from old mkdir.c into
separate files.
* chgrp.c [_POSIX_VERSION]: Test this instead of _POSIX_SOURCE.
* ls.c: Don't use SIZEOF_INT because it would require configure
to run a program -- then cross compilers would lose. Instead,
compare INT_MAX to 64k-1 since all we need to know is whether
an int is 2 bytes or larger.
* rm.c [D_INO]: Use D_INO_IN_DIRENT rather than _POSIX_SOURCE in the
test for how to define this macro.
* system.h: Use HAVE_SYS_PARAM_H (not _POSIX_SOURCE) in test
for whether to include <sys/param.h>.
Likewise for <utime.h>.
Update for DIRENT->HAVE_DIRENT_H etc. autoconf-2.0 changes.
Ditto for VOID_CLOSEDIR->CLOSEDIR_VOID.
* xgetcwd.c [!_POSIX_VERSION && !HAVE_GETCWD]: Remove
!defined (_POSIX_VERSION) conjunct. From Kaveh Ghazi.
Mon Sep 26 17:47:17 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* lib/*.c: Remove CONFIG_BROKETS conditional.
* lib/Makefile.in src/Makefile.in: Don't define it.
Sun Sep 25 12:20:52 1994 Jim Meyering (meyering@comco.com)
* ln.c (do_link): Give a diagnostic when trying to make a hard
link to a nonexistent source file. Before, running the command
`ln -i no-such-file existing-file' and responding `yes' to the
prompt would both remove `existing-file' and fail to make a link.
Karl Berry reported the problem.
Sat Sep 10 04:34:34 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* src/rm.c (remove_dir): Pass pathname to eaccess_stat.
Fri Sep 2 13:54:13 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
* lib/Makefile.in (safe-lstat.c, safe-lstat.h, safe-stat.c,
safe-stat.h): Use $(srcdir) to find source files.
(.c.o): Use -I. to get safe-lstat.h and safe-stat.h from the
build directory.
* src/Makefile.in (incl): Add -I../lib to get lib/safe-lstat.h and
lib/safe-stat.h from the build directory.
Sat Aug 27 16:33:04 1994 Jim Meyering (meyering@comco.com)
* ln.c (main): Accept new option --no-dereference (-n).
(do_link): If the destination command line argument is a symlink
to a directory and --no-dereference is given, use that as the
destination instead of the file in the directory.
* ln.1: Document this.
* system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
From Francois Pinard.
* isdir.c, makepath.c, rename.c [STAT_MACRO_BROKEN]: Remove
spurious #ifdef's.
Thu Aug 25 00:12:20 1994 Jim Meyering (meyering@comco.com)
* dd.c (copy): Clean up and fix off-by-one error when freeing
the input buffer.
Thu Aug 18 11:41:16 1994 Jim Meyering (meyering@comco.com)
* du.c (du_files) [HAVE_FCHDIR]: Use open (".", ...) and fchdir
instead of xgetcwd and chdir. Otherwise, running du in a subdirectory
of an unreadable directory would fail because xgetcwd fails.
* configure.in (AC_HAVE_FUNCS): Add fchdir. AIX-2.3 (for one)
doesn't have it.
* lib/Makefile.in (DISTFILES): Include getdate.c and posixtim.c
so one doesn't need $(YACC).
Add dependencies on safe-stat.h.
Sat Jul 30 08:08:02 1994 Jim Meyering (meyering@comco.com)
* du.c (main): Don't initialize automatic array CWD_ONLY in declaration.
Some compilers don't allow that.
* backupfile.c [DIRENT]: Remove spurious `|| defined(_POSIX_VERSION)'.
* savedir.c: Ditto.
* safe-xstat.c.in, safe-xstat.h.in: New files.
* lib/Makefile.in: Add rules and dependencies for building safe-stat.c,
safe-stat.h, safe-lstat.c, and safe-lstat.h from them.
* eaccess.c (eaccess): Use SAFE_STAT instead of stat
(and/or SAFE_LSTAT instead of lstat) to avoid unnecessary failure
on systems for which stat (lstat) can return EINTR.
* fsusage.c (statfs): Ditto.
* isdir.c (isdir): Ditto.
* makepath.c (make_path): Ditto.
* rename.c (rename): Ditto.
* chgrp.c (change_file_group): Ditto.
* chmod.c (change_file_mode): Ditto.
* chown.c (change_file_owner): Ditto.
* cp-hash.c (remember_created): Ditto.
* cp.c (main, do_copy): Ditto.
* df.c (main, show_point): Ditto.
* du.c (main, du_files, count_entry): Ditto.
* install.c (copy_file): Ditto.
* ln.c (main, do_link): Ditto.
* ls.c (gobble_file): Ditto.
* mv.c (is_real_dir, do_move): Ditto.
* mvdir.c (main): Ditto.
* rm.c (rm): Ditto.
* touch.c (main, touch): Ditto.
* Makefile.in (install): Tell GNU make that this target is .PHONY
so it doesn't unnecessarily build ./install from install.sh.
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.
Sun Jul 03 08:44:00 1994 Jim Meyering (meyering@comco.com)
* configure.in [AC_HAVE_HEADERS]: Add sys/param.h, for definition
of HAVE_SYS_PARAM_H, now tested in pathmax.h.
* makepath.c (make_path): Avoid spurious failure for file names
that contain `/.' or `/..'. From Andreas Schwab
<schwab@issan.informatik.uni-dortmund.de>.
* dd.c (main): Handle SIGPIPE like other interrupts.
From Scott L. Burson <gyro@zeta-soft.com>.
* df.c (main, show_dev, usage): New option --print-type=fstype.
From Arne Henrik Juul.
* df.1: Update.
Thu Jun 30 10:28:32 1994 Jim Meyering (meyering@comco.com)
* ls.c (longdiff) [SIZEOF_INT == 2]: Choose which version of this
macro to use based on SIZEOF_INT rather than obsolete INT_16_BITS.
[INODE_DIGITS]: New macro.
(print_long_format): Use it.
(print_file_name_and_frills): Ditto.
(length_of_file_name_and_frills): Ditto.
(print_long_format): Add a couple casts to unsigned types.
* ls.c: Change type name from `struct file' to `struct fileinfo'.
David J. Mackenzie reported a name conflict on HPUX with the former.
* dd.c (copy): Allocate an extra byte so I/O buffer begins on an
even address. This because the ITOS 3000WS running SEIUX 3.1
(a descendant of MIPS RISC/OS 4.x) has SCSI device drivers that
require the I/O buffer begin on an even address. From
Tilman Schmidt <tilman@gb1.sema.de>.
Mon Jun 20 23:45:34 1994 Jim Meyering (meyering@comco.com)
* configure.in: Use AC_PROGRAM_PATH to get values for LN, MV, RM.
(AC_HAVE_FUNCS): Add getgroups.
(AC_OUTPUT): Remove touch command.
* eaccess.c (in_group): Remove static function. Use group_member
instead.
(eaccess_stat, eaccess): Change calling sequence to take filename.
Save UID and GID and use access if they are the same as effective IDs.
(main) [TEST]: Test driver.
* cp.c (copy): Update callers.
* mv.c (do_move): Ditto.
* rm.c (remove_file): Ditto.
* cp.c (copy): With --preserve (-p) for non-root users, don't even
try to preserve file ownership in chown call. Otherwise, on systems
with the mis-feature allowing non-root users to change file ownership,
the subsequent chmod would fail.
* userspec.c (parse_user_spec): Rewrite. Be careful to free all
allocated memory upon error.
(main) [TEST]: Test driver.
* src/Makefile.in (uninstall): Delete $(LIBPROGS) one at a time
instead of like `rm -f $(libdir)/$(LIBPROGS)'. The old way loses
when LIBPROGS is empty and $(libdir) is a non-directory, and would
lose if LIBPROGS could ever have more than one word.
* (RM, LN, MV, INSTALL): Use values determined by ./configure instead
of the newly built binaries so people can build with a cross
compiler and still run `make (un)install.'
* chgrp.c (change_file_group): Give a better error message when
failing because the invoking user does not belong to the requested
group. This affects systems on which chown sets errno to EPERM
for both `inaccessible file' and `user not a member of the specified
group' errors. Before, `chgrp bin file-I-own' would give the
misleading and incorrect diagnostic `chgrp: file-I-own: Not owner'.
Now it reports `you are not a member of group `bin''.
Thomas A Peterson (tap@src.honeywell.com) reported this weakness.
* long-options.c: Move from src/ to lib/.
* long-options.h: Ditto.
* src/Makefile.in: Remove references to long-options.[ch].
* lib/Makefile.in (SOURCES, OBJECTS): Add long-options.[co].
Sat Jun 18 15:45:34 1994 Jim Meyering (meyering@comco.com)
* du.c (count_entry): Print "/" instead of zero-length string.
From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
Sun May 29 13:43:50 1994 Jim Meyering (meyering@comco.com)
* group-member.c: New file.
* lib/Makefile.in (SOURCES, OBJECTS): Add group-member.[co].
* sync.c: New file.
* Makefile.in (PROGS): Add sync.
(SOURCES): Add sync.c
* src/Makefile.in: Add rules and dependencies for sync.
* configure.in: Use AC_SET_MAKE and AC_PROG_INSTALL.
If AC_FUNC_CHECK doesn't find getgroups, add -lbsd if possible.
This was reported by Tilman Schmidt <ts@gb1.sema.de>
to be necessary on an ITOS 3000WS running SEIUX 3.1.
* Makefile.in: Edit MAKE assignments into @SET_MAKE@.
(Makefile): Remove dependencies on */Makefile.in.
Change the rule so running config.status creates only Makefile.
(stamp-config): Have config.status generate only config.h.
* {lib,man,src}/Makefile.in (Makefile): Add single dependency on
Makefile.in and rule to make config.status create only Makefile.
* system.h: Move from lib to src.
* src/Makefile.in (DISTFILES): Add system.h.
* lib/Makefile.in (DISTFILES): Remove system.h.
Mon Apr 18 19:54:24 1994 Jim Meyering (meyering@comco.com)
* documentation: Change uses of `pathname' and `path' as per
GNU standards.
Fri Apr 15 20:41:15 1994 Jim Meyering (meyering@comco.com)
* mv.c (main): Give a reason for failure when given fewer than
two non-option arguments, rather than just the pointer to --help.
* ln.c (main): Ditto, but for no non-option arguments.
* configure.in: Update for autoconf-1.8.
Use AC_CHECKING instead of echo.
Use AC_SIZEOF_TYPE instead of obsolete AC_INT_16_BITS.
Wed Apr 13 11:18:19 1994 Jim Meyering (meyering@comco.com)
* cp.c (copy_reg): Correct off-by-DEV_BSIZE error in test for
whether a file has holes. From Michael Bushnell <mib@gnu.ai.mit.edu>.
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 14 11:01:09 1994 Jim Meyering (meyering@comco.com)
* fsusage.c (adjust_blocks): Return -1 when FROMSIZE is non-positive.
Suggestion from Andries.Brouwer@cwi.nl. He reported that df failed
with divide by zero when trying to process an entry for an nfs file
system mounted over a SLIP line after the SLIP connection had been
broken.
[convert_blocks]: Rename macro to CONVERT_BLOCKS.
Sat Jan 29 13:24:07 1994 Jim Meyering (meyering@comco.com)
* du.c (main): Call du_files (with ".") when there are no
non-option arguments rather than treating that as a special case.
(du_files): Ignore return value from count_entry.
(count_entry): Accumulate file sizes into new global sum used for
the -c option; the return value is unchanged and is still used
by recursive calls. Now, using -S and -c together works.
Add parentheses to clarify precedence.
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.
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).
Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
* man/Makefile.in (manprefix): Use binprefix as the default.
Thu Dec 30 23:11:10 1993 Jim Meyering (meyering@comco.com)
* The following changes are necessary to avoid spurious failures
when a read or write system call is interrupted (e.g. by SIGTSTP).
A POSIX implementation of those system calls may either return
-1 and set errno to EINTR or return a positive value indicating
that a partial read or write has completed successfully. On Linux
0.99.14, interrupted read and write system calls return -1/EINTR.
Thanks to Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de>
for pointing this out.
* full-write.c, safe-read.c: New files.
* cp.c (copy_reg): Use full_write instead of write. Handle
errno == EINTR (instead of failing) after read system call.
* dd.c (skip): Handle errno == EINTR (instead of failing) after
read system call.
(copy): Use safe_read instead of read.
* install.c (copy_file): Use safe_read and full_write instead of
read and write system calls.
* mv.c (copy_reg): Ditto.
* touch.c (utime_now): Ditto.
Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
* install.sh: New file.
Makefile.in [DISTFILES]: Add it.
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 Nov 18 00:03:24 1993 Jim Meyering (meyering@comco.com)
* configure.in [STAT_STATFS2_FSIZE]: Fix test (that had obsolete
and now-broken use of AC_HEADER_EGREP) so that this flag is set
for NetBSD 0.9.
Mon Oct 25 20:27:00 1993 Jim Meyering (meyering@comco.com)
* cp-aux.c, df.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c,
mknod.c, mv.c, touch.c: Use the preferred `--longopt=arg'
syntax in --help message rather than `--longopt arg'.
From Francois Pinard.
Tue Oct 19 07:02:18 1993 Jim Meyering (meyering@comco.com)
* Version 3.9.
Mon Oct 18 00:13:40 1993 Jim Meyering (meyering@comco.com)
* src/*.c (usage): Now the usage message is simply
"Try `%s --help' for more information. From Francois Pinard.
* src/Makefile.in [LIBPROGS]: Depend on ../lib/libfu.a and
version.o. From Francois Pinard.
* src/*.c (usage): Remove blank line before "Try `%s --help..."
in usage message.
Sun Oct 17 00:19:58 1993 Jim Meyering (meyering@comco.com)
* fileblocks.c [!NINDIR]: Define BSIZE only if it's not already
defined.
* ls.c (print_long_format): Cast printf args major and minor
so they'll have types matching %u format even on systems
where those macros have signed type.
Sat Oct 16 00:25:42 1993 Jim Meyering (meyering@comco.com)
* chmod.c (change_file_mode): Reapply Oct 6 change for symlinks.
Somehow it got removed from working sources.
* lib/Makefile.in [OBJECTS]: Change dependency to ../config.h so
it works when building in a subdirectory. From Rick Sladkey
(jrs@world.std.com).
Wed Oct 13 19:43:47 1993 Jim Meyering (meyering@comco.com)
* cp.c (copy), ls.c (get_link_name): Complete Aug 27 change so
that we use PATH_MAX + 1 rather than sizeof(char*) as size of
buffer in readlink call. This was causing spurious errors.
* cp.c (copy), mv.c (do_move), rm.c (remove_file, remove_dir):
Cast to `unsigned int' stat->st_mode printf arguments corresponding
to %o formats to avoid warnings.
* lib/Makefile.in [DEFS]: Remove -DMVDIR. Add -DCONFIG_BROKETS.
(rename.o): Add a specific rule. Use -DMVDIR=... here instead.
* src/Makefile.in [DEFS]: Add -DCONFIG_BROKETS.
(distclean): Don't delete dir.c and vdir.c; they aren't
created anymore.
* lib/Makefile.in: Make all .o files depend on $(srcdir)/../config.h.
* src/Makefile.in: Ditto.
Sun Oct 10 13:38:54 1993 Jim Meyering (meyering@comco.com)
* src/Makefile.in (dist): Depend on $(DISTFILES).
* src/Makefile.in [libdir, LIBPROGS]: Define them.
From Francois Pinard.
* posixtm.y: [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
or "config.h". From Francois Pinard.
* makepath.c: [HAVE_CONFIG_H, CONFIG_BROKETS]: Remove the duplicate
#ifdef block following the alloca #ifdefs. From Francois Pinard.
* df.c: Remove unnecessary dcl of strstr.
Sat Oct 9 13:30:28 1993 Jim Meyering (meyering@comco.com)
* configure.in [STATFS_OSF1]: Change name to STAT_STATFS3_OSF1
to be consistent with names of the other STAT_* macros.
* acconfig.h: Ditto.
* fsusage.c: Ditto.
* acconfig.h: Add comments.
* Makefile.in: Remove comments about -D flags that could be added
to DEFS; now (using autoheader) those comments end up in config.h.
* Makefile.in (configure, config.h.in): Warn that they may not be
up to date. Don't touch them.
* ls.c (usage): Split long usage string between two fprintf
statements to avoid default limit of SGI's cc on string length.
* Makefile.in, src/Makefile.in [PROGS]: Alphabetize.
* configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
Thu Oct 07 12:57:10 1993 Jim Meyering (meyering@comco.com)
* chgrp.c, chmod.c, chown.c, cp-aux.c, cp.c, dd.c, df.c, du.c,
install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c, mv.c, mvdir.c,
rm.c, rmdir.c, touch.c (usage): Using --help gets long well-
formatted help. Now --help writes to stdout and exits successfully.
From Francois Pinard <pinard@iro.umontreal.ca>.
* lib/Makefile.in [libdir]: Make sure it's defined.
* posixtm.y [!__GNUC__ && !HAVE_ALLOCA_H]: Declare alloca as void*
rather than char*. The latter conflicts with a dcl from bison.simple.
Wed Oct 06 18:22:00 1993 Jim Meyering (meyering@comco.com)
* chmod.c (change_file_mode): Add an argument to control how symbolic
links are treated.
(main, change_dir_mode): Reflect changed calling sequence.
Now symlinks listed on the command line are processed (they
were ignored before); the permissions of the dereferenced files are
changed. Symlinks encountered in recursive traversals are still
ignored. This makes GNU chmod act more like e.g. Sun's.
From Nick Holloway <alfie@dcs.warwick.ac.uk>.
* chmod.1: Document it.
Tue Oct 05 14:52:02 1993 Jim Meyering (meyering@comco.com)
* configure.in: Add AC_STAT_MACROS_BROKEN.
* isdir.c, makepath.c, rename.c, system.h [STAT_MACROS_BROKEN]:
Test this.
* install.c (install_file_in_dir): Use stpcpy instead of slow sprintf.
* argmatch.c, backupfile.c, basename.c, dirname.c, eaccess.c,
fileblocks.c, fsusage.c, getversion.c, idcache.c, isdir.c,
makepath.c, mountlist.c, rename.c, savedir.c, stripslash.c,
userspec.c, xgetcwd.c, xstrdup.c, yesno.c, [HAVE_CONFIG_H,
CONFIG_BROKETS]: Include <config.h> or "config.h".
* lib/Makefile.in, src/Makefile.in [.c.o]: Put -I.. before
-I$(srcdir) so <config.h> will get the right file.
* chgrp.c, chmod.c, chown.c, cp-aux.c, cp-hash.c, cp.c, dd.c,
df.c, du.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c,
mv.c, mvdir.c, rm.c, rmdir.c, touch.c, version.c [HAVE_CONFIG_H,
CONFIG_BROKETS]: Include <config.h> or "config.h".
* configure.in [AC_CONFIG_HEADER]: Use it.
* configure.in (rename.o) [MVDIR definition]: Remove it.
* lib/Makefile.in [DEFS]: Put it here instead.
* config.h.in, acconfig.h: New files
* Makefile [DISTFILES]: Add them.
(config.h.in): Add a rule to warn if it may need to be rebuilt.
* lib/Makefile [YACC]: Get definition from @YACC@.
* system.h: Include <unistd.h>. This is needed for the definition
of _POSIX_VERSION.
Thu Sep 9 08:52:10 1993 Jim Meyering (meyering@comco.com)
* src/*.c: Print version on standard output, not stderr.
Fri Aug 27 23:53:50 1993 Jim Meyering (meyering@comco.com)
* cp.c (copy), ls.c (get_link_name): Don't use PATH_MAX as array
length in declarations because on some systems it gets defined
to the function pathconf. Use dynamic allocation instead.
* fsusage.c (adjust_blocks): Use `1' instead of `+1'. Many
compilers don't parse the latter. From Kaveh R. Ghazi.
Thu Aug 26 22:26:09 1993 Jim Meyering (meyering@comco.com)
* ls.c (print_long_format, print_file_name_and_frills): Cast inode
number to unsigned long and print it with %lu to avoid warnings from
gcc -Wformat because the size and type of ino_t are system dependent.
* cp.c (do_copy): Plug a memory leak with --parents.
* ln.c (main): Like mv and cp, convert `ln x y/' to ln x y/x
when a is not a directory.
[PATH_BASENAME_CONCAT]: New macro.
(do_link): Use it here, too.
* ls.c (sort_files): Add `default: abort();' clause to switch stmts.
* cp.c (do_copy): Don't remove trailing slashes from source.
Wed Aug 25 21:40:00 1993 Jim Meyering (meyering@comco.com)
* cp.c: Add --parents as synonym for --path. Change --path to
--parents in comments. --path is deprecated.
* rm.c (clear_directory): Fix incorrect test for determining when
to reallocate buffer. Thanks to Ric Anderson <ric@CS.Arizona.EDU>.
Fri Aug 13 17:19:52 1993 Jim Meyering (meyering@comco.com)
* fsusage (adjust_blocks): Round away from zero -- this matters
when computing the negative free-block count for disks that are
more than 100% full.
* mv.c (movefile): Use nested calls to stpcpy instead of sprintf.
(is_real_dir): New function.
(movefile): In addition to when dest is a directory, if dest has
a trailing `/' and source is not a directory, presume the target
is dest/`basename source`. This converts `mv x y/' to `mv x y/x'
when x is not a directory. This change means that the command
`mv any file/' will now fail rather than performing the move.
* cp.c (do_copy): Similarly, convert `cp x y/' to cp x y/x when
x is not a directory.
Wed Aug 4 17:43:18 1993 Jim Meyering (meyering@comco.com)
* ls.c (get_link_name): Don't ever use the stat field st_size as a
buffer size. Too many systems don't set it properly for mount points.
Instead, use a fixed-length buffer. From Michael Joosten
<joost@ori.CAdlab.DE>.
* cp.c (copy): Ditto.
Mon Jul 19 17:39:01 1993 Jim Meyering (meyering@comco.com)
* backupfile.c (concat): Temporary STR1_LENGTH should have type `int'
instead of `char.'
Fri Jul 16 22:00:16 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* dd.c (print_stats): Change message from "truncated blocks"
to "truncated records" for final POSIX.2 spec.
Fri Jun 25 17:18:15 1993 Jim Meyering (meyering@comco.com)
* mkdir.c, rmdir.c: Change --path long option to --parents to avoid
confusion with search-path semantics of --path as an option to other
programs. --path will still work, but is no longer documented.
Tue Jun 8 00:46:26 1993 Jim Meyering (meyering@comco.com)
* dd.c (parse_integer): Also accept `c' multiplier for consistency
with find's -size option.
Thu May 27 00:03:51 1993 Jim Meyering (meyering@comco.com)
* Version 3.8.
* configure.in (STAT_OSF1): Reference the statfs f_fsize member
so that configure defines STAT_OSF1 only if there is such a member.
Without such a reference, a Pyramid MIServer running OSx 5.1
improperly defined STAT_OSF1 instead of the one it needed:
STAT_STATFS2_BSIZE.
Wed May 26 00:57:46 1993 Jim Meyering (meyering@comco.com)
* ls.h, ls-ls.c ls-dir.c, ls-vdir.c: New files that define or
simply set the new global variable ls_mode. ls_mode defines whether
the executable built from ls.o should act like ls, dir, or vdir.
* ls.c (decode_switches): Use the variable instead of #ifdefs.
This is modelled after the approach used in GNU binutils 2.x for
ar and ranlib. Here we avoid two redundant compilations.
* install.c (change_attributes, copy_file, install_file_in_file):
Don't call chown if we can efficiently determine that doing so is
unnecessary. On some systems, calls to chown (even with your own
uid and gid) fail unless made by root. On such systems install
got spurious failures.
Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
* Version 3.6.
Fri May 21 18:42:27 1993 Jim Meyering (meyering@comco.com)
* rename.c (rename): Be careful not to unlink `from' if it happens
to be equal to `to' or (on filesystems that silently truncate
filenames after 14 characters) if `from' and `to' share the
significant characters. From Bruno Haible
<haible@ma2s2.mathematik.uni-karlsruhe.de>.
* mountlist.c, fsusage.c: Make these work under m88k DolphinOS.
From Kjetil Wiekhorst J|rgensen <jorgens@pvv.unit.no>.
Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
* mkinstalldirs: New file.
* Makefile.in (installdirs): Use it.
Sat May 15 01:20:26 1993 Jim Meyering (meyering@comco.com)
* ln.c (do_link): Make `ln -s dir_pathname .' work when the
pathname has a trailing slash.
Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
* all source: With --version, print version and exit immediately.
Wed May 12 20:48:55 1993 Jim Meyering (meyering@comco.com)
* configure.in: Add check for the -ldgc library that is required
for getmntent on m88k DGUX-5.4 systems.
* Makefile.in (installdirs): New rules for creating installation
directories. (install): Depend on it.
Sat May 8 11:31:14 1993 Jim Meyering (meyering@comco.com)
* lib/Makefile.in (dist): Use `cp -p' instead of just `cp'
if linking fails.
Thu May 6 22:45:25 1993 Jim Meyering (meyering@comco.com)
* makepath.c: Use explicit dcl of errno only if !STDC_HEADERS.
Some systems have <errno.h> but don't declare errno.
From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
* getdate.y: Test TIME_WITH_SYS_TIME, not TIME_AND_SYS_TIME.
Wed May 5 00:21:12 1993 Jim Meyering (meyering@comco.com)
* configure.in: Add AC_TIME_WITH_SYS_TIME.
* getdate.y: Use it (this is a version local to fileutils).
Tue May 4 20:25:41 1993 Jim Meyering (meyering@comco.com)
* du.c (count_entry): Give an error and exit if chdir ("..") fails.
From Bruce Evans <bde@runx.oz.AU>.
* eaccess (eaccess_stat): Cast NGROUPS_MAX to appropriate types.
From Bruce Evans <bde@runx.oz.AU>.
Mon May 3 22:09:24 1993 Jim Meyering (meyering@comco.com)
* configure.in: Add AC_GETGROUPS_T.
* eaccess.c: Don't define GETGROUPS_T. Now configure does it.
Sun May 2 09:18:53 1993 Jim Meyering (meyering@comco.com)
* configure.in: Check for libypsec.a on Dolphin M88K machines.
This can result in significant speedup for programs that access
YP information. From Kjetil Wiekhorst J{\o}rgensen
<jorgens@pvv.unit.no>.
Fri Apr 30 02:21:48 1993 Jim Meyering (meyering@comco.com)
* ls.c (main): Make `-f' work like on standard Unix ls, instead
of as a short equivalent of --full-time.
* ls.1: Document it.
Thu Apr 29 00:46:46 1993 Jim Meyering (meyering@comco.com)
* src/Makefile.in [dir.o, vdir.o]: Make ordering of CFLAGS etc
in compilation rules consistent with that in .c.o rule.
* Makefile.in (dist): Depend on Makefile so that changes to
Makefile.in (like adding new files to DISTRIB) are reflected
in the new distribution.
Tue Apr 27 21:35:11 1993 Jim Meyering (meyering@comco.com)
* configure.in: Remove unnecessary AC_PROG_INSTALL.
Fri Apr 23 23:39:16 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.
* lib/mktime.c: Use new version from glibc instead of one from
libc-subst. `touch' built with the latter didn't set proper
time unless given a specific --date option.
Thu Apr 22 00:22:25 1993 Jim Meyering (meyering@comco.com)
* makepath.c: Decouple inclusion of errno.h from definition of
STDC_HEADERS; many systems have errno.h, yet shouldn't define
STDC_HEADERS.
* makepath.c (make_path): Add EPERM clause only if both AFS and
EPERM are defined.
* configure.in: Test for errno.h header file.
Mon Apr 19 11:21:14 1993 Jim Meyering (meyering@comco.com)
* Version 3.5.
* ls.c, touch.c: Don't include time.h explicitly -- it's included
by system.h. From Franc,ois Pinard.
* posixtm.y: Use TM_IN_SYS_TIME.
* backupfile.c [index, rindex]: Don't redefine them.
* system.h [alloca]: Don't redefine it.
* configure.in: Check for sys/time.h; getdate.y needs it for
structs timeval and timezone on some systems.
Sun Apr 18 22:40:19 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
* ls.c: Include fnmatch.h after system.h, so we get our
definitions of FNM_*, not those from unistd.h.
* mountlist.c [MOUNTED_GETMNTINFO]: Add #ifdef around MOUNT_PC.
* configure.in: Fix test for 4.4BSD statfs to not grep for a
macro in cpp output.
Sun Apr 18 02:35:36 1993 Jim Meyering (meyering@comco.com)
* configure.in: Check for gettimeofday.
Check for `struct tm'.
Change MVDIR definition so it works with new AC_DEFINE.
* system.h: Remove last vestiges of USG; instead, use specific
test for TM_IN_SYS_TIME to determine whether to include time.h
or sys/time.h.
* src/Makefile.in (install): Rewrite the test for whether to install
mvdir so that it doesn't cause gratuitous failures with broken shells.
Split long rule so the pieces fit in 80-column lines.
Thu Apr 15 23:44:01 1993 Jim Meyering (meyering@comco.com)
* lib/Makefile.in (posixtm.c): Add dependency on getdate.c to enforce
sequential invocations of YACC.
* (posixtm.c, getdate.c): Remove use of `bison -o' and associated
conditional rename commands -- not needed since the parser generators
won't be run in parallel; now bison (when used) is always invoked
with -y.
Tue Apr 13 09:18:18 1993 Jim Meyering (meyering@comco.com)
* configure.in: Find a parser generator.
* Makefile.in [MDEFINES]: Add YACC to the list of variables passed to
sub-makes.
* lib/Makefile.in (posixtm.c, getdate.c): Try first to build with
`bison -o' -- for parallel makes. If that fails, use $(YACC).
* posixtm.y [HAVE_MEMCPY && !HAVE_BCOPY]: Define bcopy in terms
of memcpy for old versions of bison that generate parsers that
use bcopy.
* configure.in: Add tests for memcpy and bcopy.
Mon Apr 12 23:02:14 1993 Jim Meyering (meyering@comco.com)
* configure.in (mounted, space): Add filesystem checks for DEC Alpha
running OSF/1 to complement new code in mountlist.c and fsusage.c.
* lib/mountlist.c (read_filesystem_list) [MOUNTED_GETFSSTAT]: Add code
to do it the OSF/1 way on a DEC alpha.
From Brian Fox (bfox@tinker.crseo.ucsb.edu).
* lib/fsusage.c (get_fs_usage) [STATFS_OSF1]: Add code to call OSF/1's
variant of statfs. From Brian Fox (bfox@tinker.crseo.ucsb.edu).
Sun Apr 11 20:29:31 1993 Jim Meyering (meyering@comco.com)
* df.c (main, show_dev): Don't list dummy (automounter) filesystems
unless they're explicitly listed on the command line or if the -a
option is given.
Fri Apr 9 11:40:48 1993 Jim Meyering (meyering@comco.com)
* src/Makefile.in [.c.o]: Put CFLAGS after include directives.
Wed Apr 7 23:54:48 1993 Jim Meyering (meyering@comco.com)
* eaccess.c: Undefine NGROUPS_MAX before redefining it.
From ghazi@caip.rutgers.edu (Kaveh R. Ghazi).
Mon Apr 5 20:14:17 1993 Jim Meyering (meyering@comco.com)
* chgrp.c, chmod.c, chown.c, install.c, ls.c, mkfifo.c, mknod.c,
touch.c: Add `case 0: break;' for long-only options help and version.
Sun Apr 4 09:38:00 1993 Jim Meyering (meyering@comco.com)
* src/*.c (usage): Mention --help and --version.
(main): Handle flag_help and flag_version before checking for
invocation errors.
* cp.c (copy): Declare to be static.
* cp.c (copy, make_path, re_protect): Explicitly cast alloca return
value to (char *).
* ln.c (do_link): Ditto
* mv.c (do_move): Ditto
* makepath.c (make_path): Ditto
* lib/eaccess.c (eaccess_stat): Cast to unsigned the value to
be right-shifted to avoid ANSI vs K&R semantic ambiguity.
* src/Makefile.in (incl): New variable.
* chown.c (main): Explicitly cast -1 to [ug]id_t to avoid compiler
warnings.
* cp.h: Remove unneeded extern dcl of exit_status.
* basename.c [rindex]: Don't redefine it.
* system.h [rindex, incl, bcopy, bzero]: Ditto.
* userspec.c [index]: Ditto.
* Makefile.in [CFLAGS, LDFLAGS]: Don't hard-code these; get their
definitions from configure.
* configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
Sat Apr 3 18:17:23 1993 Jim Meyering (meyering@comco.com)
* 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.
[info, install-info, dvi, check, installcheck]: New targets but no
rules; comply with standards.
* src/Makefile.in [.c.o, dir.o, vdir.o]: Put CFLAGS after DEFS and
CPPFLAGS per standards.texi.
Use automatically generated dependencies.
* mvdir.c (main): Remove dcl of unused variable.
Thu Apr 1 18:05:48 1993 Jim Meyering (meyering@comco.com)
* install.c, chgrp.c, dd.c [isascii]: Undefine before redefining.
* ls.c: Move some dcls so they appear before first function.
* all programs: Add --help and --version options.
* version.c: Remove `Version: ' and newlines from version string.
* dd.c: Convert usage to take no arguments.
* lib/Makefile.in [DISTFILES]: Add version.h.
Wed Mar 31 22:03:28 1993 Jim Meyering (meyering@comco.com)
* configure.in [MVDIR]: Don't quote right hand side.
* backupfile.c, chgrp.c, install.c: Define isascii macro to be 1
also if STDC_HEADERS.
Tue Mar 30 17:42:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* ls.c: Add -G,--no-group option to inhibit display of group
information.
* ls.1: Document it.
Mon Mar 29 22:22:40 1993 Jim Meyering (meyering@comco.com)
* system.h [ST_NBLOCKS]: Check also for __hpux. From Henrik B}kman
<Henrik.Bakman@csd.uu.se>.
Sun Mar 28 21:22:30 1993 Jim Meyering (meyering@comco.com)
* Makefile.in (dist): Use cp when hard link fails.
Use tar-1.11.2's -z option instead of -Z.
* makepath.c [index]: Don't redefine.
Fri Mar 26 00:32:39 1993 Jim Meyering (meyering@comco.com)
* df.c (add_excluded_fs_type, excluded_fs_type): New functions adding
support for --exclude-type option. Derived from Kaveh R. Ghazi
<ghazi@caip.rutgers.edu>.
* ls.c (decode_switches, print_long_format): New option: --full-time.
From K. Richard Pixley (rich@rtl.cygnus.com)
Thu Mar 25 21:02:36 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* dirname.c [rindex]: Don't redefine.
Tue Mar 23 23:13:33 1993 Jim Meyering (meyering@comco.com)
* ls.c (gobble_file): Don't stat symlinks unless we need to.
From Mike Rendell <michael@mercury.cs.mun.ca>.
* dd.c (copy, copy_with_block, copy_with_block): Decrement
pending_spaces only if it's > 0. The following command didn't
terminate:
perl -e 'print "a a\n";'| dd of=/dev/null ibs=1 cbs=3 conv=unblock
With suggestions from Chris Weber <weber@bucknell.edu>,
Marlys.A.Nelson@uwrf.edu, and Albert-Lunde@nwu.edu.
Fri Mar 05 00:02:53 1993 Jim Meyering (meyering@comco.com)
* chmod.c: Add long-named options.
Mon Feb 15 23:34:55 1993 Jim Meyering (meyering@comco.com)
* rm.c (remove_file): Don't ask about overriding a mode if the
target is a symbolic link -- some systems (like SGI's Irix 4.0)
zero the permissions fields of symbolic links.
From Arne Henrik Juul (arnej@imf.unit.no).
Fri Dec 11 16:46:50 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
* rm.c (main): If -f is given, don't complain if no file args
are given.
Tue Dec 8 21:09:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
* posixtm.y: Include alloca.h if HAVE_ALLOCA_H, not if sparc.
Mon Dec 7 20:09:59 1992 Jim Meyering (meyering@idefix.comco.com)
* install.c (isnumber), chgrp.c (change_file_group): Define ISDIGIT
and use it instead of isdigit.
* dd.c: Define ISLOWER and ISUPPER independent of STDC_HEADERS.
Define ISDIGIT and use it instead of isdigit.
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 Nov 24 07:54:45 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* system.h: Use HAVE_FCNTL_H instead of USG.
* xgetcwd.c: Use HAVE_GETCWD instead of USG.
* backupfile.c, basename.c, dirname.c, idcache.c, makepath.c,
mountlist.c, stripslash.c, userspec.c, xstrdup.c, system.h:
Use HAVE_STRING_H instead of USG.
* system.h: Use SYSDIR and NDIR instead of USG.
Define direct as dirent, not vice-versa.
* ls.c, rm.c, backupfile.c, savedir.c: Use `struct dirent',
not `struct direct'.
Thu Nov 12 23:10:56 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* system.h: If dirent is #defined, don't define direct as dirent;
for Sinix. Derived from Heinfried Korn (korn@med-in.uni-sb.de).
Mon Nov 9 14:13:57 1992 Jim Meyering (meyering@idefix.comco.com)
* fsusage.c (adjust_blocks): Reverse Oct 31 change --
the function is more readable than the macro.
* All files in src: Make all functions and extern variables static.
Make all longopts arrays const as well as static.
Make a couple statically initialized aggregates `const.'
Sat Oct 31 16:32:17 1992 Jim Meyering (meyering@idefix.comco.com)
* fsusage.c (adjust_blocks): Convert to a macro. The static
function wasn't always used.
* makepath.c, cp.c, ls.c: Add parentheses to expressions
like (c = *p++) as per suggestion from gcc -Wall.
* dd.c (swab_buffer): Fix typo that incremented pointer instead
of counter. Add braces around static struct initializers.
Fri Oct 30 11:40:58 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
* ln.c, cp.c (main): Make -s on systems without symlinks an
error, not a warning.
Thu Oct 29 14:57:21 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
* Version 3.4.
* cp.c (copy, re_protect), mv.c (copy_reg): Do utime and chown
before chmod, so set[ug]id bits don't get nuked.
Don't use fchmod.
Wed Oct 28 16:13:18 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
* cp.c, mv.c, ln.c: Rename some variables to use consistent
terminology: source and destination.
* ln.c, mkdir.c, mkfifo.c, mknod.c: Don't strip trailing slashes.
* install.c: Don't strip slashes from dest. dirs.
Mon Aug 24 12:49:14 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* xgetcwd.c: Make path_max unsigned, not long. From Bruce Evans.
Sun Aug 23 03:06:04 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* idcache.c: Use a union for uid_t and gid_t. From
bde@runx.oz.au (Bruce Evans).
* eaccess.c: Use NGROUPS_MAX if it's defined. 386BSD is like sun.
Sat Aug 22 02:36:49 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* makepath.c: Use uid_t and gid_t.
* system.h, makepath.c: Use HAVE_ALLOCA_H, not sparc.
* cp.c (make_path, re_protect): Allocate room for terminating NULs.
Fri Aug 21 21:12:18 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* fsusage.c [STAT_STATVFS]: Use f_bsize if f_frsize is 0.
From Paul M Reilly <pmr@rock.concert.net>.
* xgetcwd.c [!errno]: Declare errno. From Karl Berry.
* chown.c (main, change_file_owner, change_dir_owner): Use
uid_t and gid_t. From Rob McMahon <cudcv@csv.warwick.ac.uk>
and glaze@cs.mu.oz.au (Glaze).
Thu Jul 23 14:29:17 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* Version 3.3.
Sat Jul 18 20:12:56 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* idcache.c: Use uid_t and gid_t.
(getuidbyname, getgidbyname): New functions, for cpio.
* userspec.c: New file, from code in chown.c.
* chown.c: Use it.
Fri Jul 17 00:43:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* system.h: Protect from getopt prototype in stdlib.h.
* ls.c [_AIX]: Include sys/ioctl.h.
* fsusage.c: Include sys/vfs.h if AIX PS/2, but not if RS6000.
From tranle@intellicorp.com (Minh Tran-Le).
* mvdir.c: Declare getcwd. From Francois Pinard.
* chown.c, chgrp.c, install.c [_POSIX_SOURCE]: Define endpwent
and endgrent as empty.
* makepath.c (make_path): Add cast to alloca call.
From Jim Meyering.
* cp.c (copy, re_protect), mv.c (copy_reg): Notify root of
EPERM errors from chown.
* makepath.c, install.c [AFS]: Ignore EPERM from chown.
* system.h (ST_NBLOCKS) [_AIX && _I386]: st_blocks is in 4K units.
* fsusage.c (statfs) [_AIX && _I386]: Supply this function.
From tranle@intellicorp.com (Minh Tran-Le).
Thu Jul 16 23:08:39 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* df.c (print_header, show_dev): In inode format, print the
total number of inodes as well.
* fsusage.[ch], df.c (show_dev): Count internally using
512-byte blocks, not 1024-byte, to avoid rounding errors.
Mon Jul 6 20:03:54 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* rename.c: Use S_ISDIR instead of S_IFDIR.
Fri Jul 3 14:36:34 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* fileblocks.c, system.h, cp.c, dd.c, mv.c, touch.c: Change
FOO_MISSING to HAVE_FOO.
Wed Jun 3 19:28:04 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* xgetcwd.c (xgetcwd): Accept errno==EINVAL as nonfatal.
Wed May 20 00:05:52 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* system.h: If we include a header file specifically to get
major et al., assume we have them.
Mon May 11 20:04:10 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* chgrp.c, chown.c: --show-changes -> --changes.
Sat May 9 18:39:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* system.h: Define DEV_BSIZE if not defined.
Thu Apr 30 13:55:37 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* du.c (count_entry): Remove the trailing "/" before printing.
Wed Apr 29 11:34:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* rename.c (rename): If removing `from' fails, remove `to' to
clean up. From Matthew Farwell <dylan@ibmpcug.co.uk>.
Thu Apr 23 21:14:16 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* ls.c (gobble_file): Only read the link contents if -l or the
file was named on the command line.
Wed Apr 22 02:16:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
* fsusage.c (get_fs_usage) [STAT_STATFS4 and _SEQUENT_]: Has f_bavail.
From Donn Cave <donn@carson.u.washington.edu>.
* getversion.c (get_version): If given invalid arg, exit.
* cp.c (copy): Fix mode with chmod if copying as a regular file.
* system.h, dd.c: SIGTYPE -> RETSIGTYPE.
Sat Apr 18 00:18:41 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* fsusage.[ch] (get_fs_usage): Take another arg, the device name.
* fsusage.c (get_fs_usage) [STAT_READ]: Fix number of inodes
calculation. Use the device name. From Brian Matthews.
* df.c (show_dev): Pass the device name.
Fri Apr 17 11:25:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* fsusage.c: Special-case AIX.
* mountlist.c [MOUNTED_VMOUNT]: New code for AIX, from
Garrett A. Wollman (wollman@uvm.edu).
* ls.c (gobble_file): Use stat, not lstat, on symlinked-to
file, for Unix compat. From ian@airs.com (Ian Lance Taylor).
Mon Apr 6 14:16:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* xgetcwd.c: Include stdio.h to get NULL.
Thu Apr 2 14:41:18 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* df.c: Call sync only once, instead of once per filesystem.
Wed Apr 1 16:00:08 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* Version 3.2.
Tue Mar 31 13:39:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* df.c (main): stat all arg pathnames before getting
list of mounted filesystems.
(show_entry, show_point): Take a struct stat * as another arg,
to avoid repeatedly statting files.
Mon Mar 30 12:21:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* install.c (main): Allow symbolic modes for -m.
(atoo): Function removed.
* mkdir.c (main): Include invalid -m arg in error message.
* fsusage.c (get_fs_usage) [STAT_STATFS4]: Go back to using
512 instead of f_bsize. Empirically, it gives the right answer.
* mvdir.c (main): Don't deref NULL pointer on last iteration
of loop.
* fsusage.c (adjust_blocks): New function.
(get_fs_usage): Call it.
* mvdir.c (main): Don't possibly try to use ".." entry of new dir
before creating it.
* fsusage.c (get_fs_usage) [STAT_STATFS4]: Use f_bsize member
of struct statfs.
Sat Mar 28 00:36:57 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* dd.c (copy_simple, copy_with_block, copy_with_unblock,
translate_buffer, swab_buffer): New functions, mostly made
from code taken from copy. Incorporate some optimizations due
to Stuart Kemp: For each type of conversion, only check
whether to do it once per buffer read, instead of once per character.
(copy): If conv=block and the input didn't end with a newline,
pad the final block with spaces.
Wed Mar 25 14:35:17 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* system.h: Don't use BSIZE for calculating ST_BLKSIZE if it
isn't defined.
* mountlist.c [MOUNTED_FREAD], fsusage.c [STAT_READ]: New code
for SVR2, from archive@ideahb.sublink.org (Lele Gaifax).
Tue Mar 24 14:53:19 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* mvdir.c: Use getcwd, not getwd.
* system.h, xgetcwd.c: Redo how PATH_MAX is figured out, to
work on SVR3.
* fsusage.c, mountlist.c: New files split from fsinfo.c.
Revise conditionals to make the two files independent of each other.
* fsusage.h, mountlist.h: New files split from fsinfo.h.
* df.c: Use them.
Mon Mar 23 13:01:07 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* fsinfo.c (read_filesystem_list): Take another arg, all_fs.
[FS_MNTENT]: Ignore type "auto" (from amd) as well as "ignore"
(from automounter), if not all_fs.
* df.c (main): Pass the new arg.
* fsinfo.h: Add function decls.
* chown.c, chgrp.c, chmod.c: Remove -L option. Didn't handle
changing symlinks correctly and wasn't very useful.
Sat Mar 14 17:38:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* dirname.c (dirname): Don't use strdup.
Fri Mar 13 14:56:15 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
* rm.c (remove_file, remove_dir, clear_directory): If -f was
given, don't complain about ENOENT when removing.
Mon Mar 9 00:09:48 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* install.c (main): Allow making multiple dirs with -d.
(usage): Document it.
* makepath.c (make_path): Clear umask while working and
restore it when done. chmod dirs that should have
set[ug]id or sticky bits set, if we're chowning them.
Make chown failure nonfatal. Do chmod after chown, not before.
* du.c (count_entry): Set exit_status on nonfatal error.
(main): Use it.
Sun Mar 8 22:07:50 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* du.c (du_files): New function, from code in main.
Use xgetcwd instead of getcwd or getwd.
* system.h: Don't declare getcwd or getwd.
* xgetcwd.c: New file.
* ls.c (main): Exit with `exit_status' instead of 0.
(print_dir, gobble_file, get_link_name): Set exit_status on error.
* ls.c (print_long_format): Allow a slop factor for deciding
what is in the future.
* All programs: Change usage messages and documentation for
long options to use -- instead of +.
* df.c (main, usage): Add -v option for SysV compat.
Tue Feb 4 12:45:09 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* fileblocks.c [!NINDIR]: Try to fake indirect block info for
systems that don't define it.
Thu Jan 16 01:04:16 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* df.c (print_header): Capitalize some header words for
POSIX.2a draft 8.
Sat Jan 4 01:19:25 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* posixtm.y: Capitalize token name.
Tue Dec 24 01:05:44 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* system.h, makepath.c, idcache.c, eaccess.c, backupfile.c,
install.c, dd.c, chown.c, chgrp.c: Change POSIX ifdefs to
HAVE_UNISTD_H.
Wed Dec 18 16:42:00 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* system.h: To get major, minor and makedev, don't check for
_POSIX_SOURCE and USG; use MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS.
Mon Dec 16 18:16:42 1991 David J. MacKenzie (djm at wombat.gnu.ai.mit.edu)
* dd.c (skip): Fix typos in arg name.
(output_char): Fix off by one error in check.
Sun Dec 8 19:55:06 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* system.h: Only define major et al. if not already defined.
Fri Dec 6 18:26:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* dd.c (main) [POSIX]: Use sigaction instead of signal, which
POSIX doesn't have.
* df.c, du.c, ls.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
Wed Dec 4 14:30:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* dd.c: Cleanups, mostly from Stuart Kemp:
(output_char): New macro, from code in copy.
(write_output): New function, used by output_char, from code
in copy.
(skip): New function, from code in copy.
(copy): Use output_char and skip.
Simplify test for quitting before main loop.
Zero buffer using bzero for speed.
Sun Nov 17 19:39:04 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* fsinfo.c (get_fs_usage) [FS_MNTENT]: Take blocksize into account.
(read_filesystem_list) [FS_MNTENT]: Ignore filesystems of type
"ignore" (automounter dummy entries).
* install.c (change_attributes): Do chmod even if chown fails.
Thu Oct 24 23:50:46 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* chown.c (change_file_owner), chgrp.c (change_file_group):
don't skip symlinks, since the chown system call works on them.
Fri 18 Oct 1991 23:29:24 Jim Meyering (meyering at wombat)
* configure: fixed test to detect sequent's strange interpretation
of utime(file, NULL).
Fri Oct 18 00:30:42 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* eaccess.c: GID_T -> GETGROUPS_T, for clarity.
Sat Oct 12 12:25:55 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
* configure: Define uid_t and gid_t as int if they're not
defined in sys/types.h. That's probably right for old Unixes
and avoids trying to find the C preprocessor.
* df.c: Don't declare sync, to avoid conflict with Minix (and
maybe others) unistd.h.
(show_point): Cast -1 to dev_t before comparing, in case dev_t
is unsigned. From Rainer Orth.
* chown.c [!POSIX]: Declare getgrgid.
Fri Sep 13 14:55:41 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
* eaccess.c [POSIX]: Always use sysconf to get NGROUPS_MAX.
Thu Sep 5 23:40:39 1991 David J. MacKenzie (djm at apple-gunkies)
* system.h: Instead of defining getwd in terms of getcwd with
PATH_MAX as an arg (which might be -1 on POSIX), define getcwd
in terms of getwd.
* du.c (main): Call getcwd with path_max as an arg.
* install.c (change_attributes): Do chown before chmod, so
chown doesn't remove set[ug]id bits.
Wed Aug 28 20:53:50 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* Version 3.1.
Mon Aug 26 15:44:16 1991 David J. MacKenzie (djm at pogo.gnu.ai.mit.edu)
* du.c (main): If pathconf fails, use 1024 for PATH_MAX. This
happens if "/" is NFS-mounted.
Sun Aug 25 00:56:11 1991 David J. MacKenzie (djm at apple-gunkies)
* df.c, fsinfo.c, fsinfo.h: New program.
* configure: Check for various ways of getting info on mounted
filesystems.
Thu Aug 22 10:53:23 1991 David J. MacKenzie (djm at apple-gunkies)
* src/Makefile.in: Workaround #10006 for C compilers that are
too dumb to allow -c and -o together. Copy the source files.
* system.h: Moved from src to lib to avoid having to add yet
more -I options to CFLAGS.
* du.c, ls.c: If POSIX_ME_HARDER is set in environment, use
512-byte blocks by default.
Wed Aug 21 13:03:14 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* Version 3.0.
* du.c, ls.c: Make 1K blocks the default size, and -k a no-op.
Down with dumb standards!
* system.h, backupfile.c, savedir.c [VOID_CLOSEDIR]: Fake a
return value for closedir, which returns void on some systems,
like Sequents.
* configure: Check sys/dir.h for 'void closedir'.
Tue Aug 20 22:22:47 1991 Jim Meyering (meyering at nutrimat)
* mvdir.c (main): Clean up loop to stat component
directories -- as in makepath and pathchk.
Tue Aug 20 22:10:47 1991 Jim Meyering (meyering at nutrimat)
* dirname.c (dirname): Allocate exact amount of space
needed for result.
Tue Aug 20 02:13:40 1991 David J. MacKenzie (djm at apple-gunkies)
* savedir.c (savedir): Try to open directory before allocating
buffer. From Jim Meyering.
Mon Aug 19 01:14:13 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* Many files: indent '#pragma alloca' so non-ANSI compilers
don't choke on it.
* backupfile.c (max_backup_version): Check closedir return
value (though it might not do any good).
Tue Aug 6 20:50:56 1991 David J. MacKenzie (djm at wheat-chex)
* configure, Makefile.in's: Support +srcdir option, using VPATH.
Don't check for bison, just try it and if it fails use yacc.
Create config.status. Fix up clean targets.
* posixtm.y (posixtm): New function.
Most of the following is from Paul Eggert:
* savedir.c (savedir), ls.c (print_dir), rm.c
(clear_directory): Check closedir return for errors.
* dd.c (main): Check for stdin or stdout being closed.
* dd.c (quit), install.c (copy_file): Check for close errors.
* mv.c (copy): Was missing a close.
Sat Aug 3 02:05:51 1991 David J. MacKenzie (djm at apple-gunkies)
* ln.c: Declare link() unconditionally (SCO UNIX needs it).
Tue Jul 30 00:23:19 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* configure: NEED_TZSET has become FTIME_MISSING.
* configure: Define uid_t and gid_t if sys/types.h doesn't.
Sat Jul 27 00:55:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* configure: Only compile fileblocks.c if st_blocks is missing.
* cp.c (copy): Make directories with initial mode of source
permissions minus umask, plus 0700. For POSIX and John Gilmore.
* system.h: Include errno.h and, if STDC_HEADERS, stdlib.h.
* All programs: Remove includes of those files.
* ftruncate.c: New file.
* configure: Use it if needed.
Wed Jul 24 02:09:45 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* ls.c (get_name_link), cp.c (copy) [_AIX]: Allocate extra
space for the buffer, since st_size is wrong.
* system.h: Don't declare alloca for AIX.
* makepath.c, posixtm.y, cp.c, du.c, ln.c, ls.c, mv.c:
Declare alloca first (AIX needs it).
* cp.c, dd.c, touch.c: Use SEEK_ instead of L_.
* system.h: Define SEEK_ if not defined.
Tue Jul 23 15:02:20 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* eaccess.c: GID_T is int if ultrix as well as if sun.
Mon Jul 22 11:39:31 1991 David J. MacKenzie (djm at bleen)
* install.c: Use uid_t and gid_t.
* eaccess.c: Support POSIX method of getting multiple groups.
Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
* Move cat cmp cut expand head paste split tac tail unexpand
to textutils.
* system.h [MKFIFO_MISSING]: Define mkfifo macro.
* cp.c, mkfifo.c: Don't define it.
* mknod.c, gmknod.1: New files.
Fri Jul 19 13:43:01 1991 David J. MacKenzie (djm at apple-gunkies)
* version.c: New file.
* All C programs: Link with it, to get version number in the
binary where at least `strings -' and GNU grep can find it.
Mon Jul 15 13:46:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* configure: Also look in sys/signal.h for signal decl.
Sun Jul 14 22:43:57 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* Rename touchtm.y back to posixtm.y, as the date command will
use it too.
Mon Jul 8 22:56:36 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* Replace lib/Makefile with lib/Makefile.in.
* configure: For some library functions that might be missing,
conditionally add the .o files to lib/Makefile instead of
defining func_MISSING.
* lib/mkdir.c: Renamed from lib/mkrmdir.c.
Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* xstrdup.c [STDC_HEADERS]: Include string.h.
* stripslash.h: Include string header file.
* configure: Add to DEFS if Minix.
* system.h [_POSIX_SOURCE]: Make ST_BLKSIZE 1024 instead of
512, for better performance.
* system.h, configure: If sys/mkdev.h exists, use it instead
of sys/sysmacros.h.
* configure: echo messages to stdout, not stderr.
Use test programs to see if alloca needs -lPW and if chars are
unsigned.
Tue Jul 2 03:16:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* chown.c, chgrp.c [!POSIX]: Declare pwd.h and grp.h functions.
Sat Jun 29 16:46:12 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* cp.h: Don't declare `open', to avoid conflict with varargs
prototypes.
* chown.c, chgrp.c: Include sys/types.h before, not after,
pwd.h and grp.h, to get uid_t and gid_t if necessary.
Fri Jun 28 01:12:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* ls.c: Use time_t instead of long, where appropriate.
Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* touchtm.y: Renamed from posixtime.y for SysV systems with Bison.
* configure: No longer need to pass bison the -y option.
Now lib/Makefile should allow a parallel make with bison.
* cp.c (copy_reg), cat.c (main),
touch.c (touch, utime_now), mv.c (copy): Check close return
value for delayed error report due to NFS.
Thu Jun 20 01:33:06 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* configure: Include $DEFS when compiling test programs.
* configure: Use test programs instead of grep to check for
USG, POSIX, and ANSI C headers, in case symbols are defined in
header files included by the standard ones. Check for BSD
memory functions (bcopy et al.) as well as string functions.
Add notice to top of generated Makefile saying that it's
automatically generated.
Thu Jun 13 00:50:18 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* Version 2.1.
* configure: If rename is missing, define MVDIR.
Use , instead of / as sed substitution separator so variables'
values can contain slashes.
* du.c (main): Use alloca to allocate `wd' instead of making
it an auto array, since PATH_MAX might be a call to pathconf.
Wed Jun 12 19:56:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* cp-aux.c (usage), install.c (usage), ln.c (usage), mv.c
(usage): Combine the option lists for the multiple usage forms.
Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* idcache.c: pwd.h and grp.h might need sys/types.h.
* configure: Create Makefile from Makefile.in instead of
makefile from makefile.skel, to more closely follow the new
GNU coding standards.
* ls.c (file_interesting): Use POSIX.2 fnmatch instead of glob_match.
* configure: If $RANDOM is implemented (ksh, bash or zsh), use
the `type' builtin to determine if gcc, bison, ranlib are
available. ksh writes "fubar: command not found" to stderr,
foiling the test -n "`command 2>&1`" method.
Remove makefile on signal.
* system.h: Include sys/param.h if not _POSIX_SOURCE instead
of if not POSIX, to get DEV_BSIZE.
* makepath.c, posixtime.y, system.h: Add _AIX case to alloca decl.
Sun Jun 9 01:26:27 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* Version 2.0.
* basename.c, dirname.c: Use str[r]chr and string.h if
STDC_HEADERS as well as if USG.
* touch.c (utime_now): Created from code in touch ().
Sat Jun 8 11:02:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* backupfile.c: Use POSIX instead of _POSIX_SOURCE to
determine whether to check whether readdir returned a valid
entry.
Fri Jun 7 21:44:51 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* fileblocks.c (st_blocks), system.h (ST_NBLOCKS): Always
return number of 512 byte blocks, not DEV_BSIZE blocks.
(convert_blocks): Always expect 512-byte blocks.
Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* system.h [POSIX]: If PATH_MAX not defined, use pathconf.
Remove NAME_MAX stuff; not used.
* system.h: Make #include <strings.h> depend on not (USG or
STDC_HEADERS) instead of not (USG or POSIX).
* configure: New shell script to aid compilation.
Mon Jun 3 16:42:41 1991 David J. MacKenzie (djm at wheat-chex)
* cp.h: Remove some decls of functions returning int that
conflict with prototypes on HPUX.
* cp.c (make_path, re_protect): New functions from Jim
Meyering. Changes to other functions as well, to add +path,
+link, +symbolic-link options.
Sun Jun 2 15:45:24 1991 David J. MacKenzie (djm at wheat-chex)
* most files: use GPL version 2.
Sat Jun 1 20:17:35 1991 David J. MacKenzie (djm at wheat-chex)
* rm.c, backupfile.c: If _POSIX_SOURCE, don't refer to d_ino.
Sun May 19 18:42:09 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
* touch.c: Renamed getdate to get_date to avoid SVR4 conflict.
Thu May 16 23:12:01 1991 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
* cp.c, mv.c, ln.c: Use alloca and strcpy directly instead of
in a macro for generating backup filename. The latter
sometimes coredumps for some reason.
Sat Apr 20 00:03:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* dd.c: Add conv=notrunc and truncate output file by default,
for POSIX.
* rm.c (rm): Refuse to remove path/. and path/.., as well as `.'
and `..', for POSIX.
* chown.c: Allow `:' as well as `.' to separate group from
user, for POSIX.2 draft 11.
* Many programs: Don't bother to get the long-option index
value from getopt_long, since we ignore it.
* Many programs: Separate long-option option names from their
args with `=' instead of ` ' in usage messages.
* touch.c (touch): Don't refuse to touch non-regular files.
Wed Apr 10 12:19:30 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
* cp.c, cp-aux.c: Add -a +archive option, an easier to
remember synonym for -dpR.
Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
* mv.c (copy): Try to preserve file ownership in
cross-filesystem copies.
* backupfile.c, rm.c: Go back to using d_ino instead of
d_fileno. POSIX.1 specifies neither, and d_ino is more
common, perhaps ubiquitous.
* chown.c (describe_change): Don't print the group name if it
didn't change (thus is a null pointer).
(main): Initialize group name to null.
Mon Feb 25 11:44:14 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
* dd.c (copy): Only seek if not seeking to start of file, so
"dd >> foo" works with Minix shell that doesn't open foo in
append mode.
Thu Feb 21 11:59:39 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
* ln.c (do_link), mv.c (do_move), cp.c (copy): Store backup
filename using alloca so we don't have to free it every place
we return. From Jim Meyering.
Thu Feb 14 00:41:43 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
* cp.c (copy_reg): Only make holes when copying a regular file
onto a regular file.
Fri Jan 18 06:31:59 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
* ls.c: Move defn. of S_IEXEC to after header files are included.
* cp.h: Always declare stat and lstat.
Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.h: Only declare some system calls if not POSIX.
* eaccess.c, idcache.c, dd.c, install.c, ln.c, system.h:
Change _POSIX_SOURCE to POSIX.
* fileblocks.c, system.h: Change STBLOCKS_MISSING to
ST_BLOCKS_MISSING (was already that way in cp.c).
Fri Dec 28 18:40:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* chmod.c, chown.c, chgrp.c, du.c: Rename -d option to -L for
similarity to ls and cpio.
Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
* rm.c (clear_directory): Keep looking for files to remove
until we don't find any, so that any .nfs* files created by
removing other files are also removed, eventually.
* install.c (main): Strip trailing slashes on all args.
* mv.c (copy): Open target file with mode 0600, not 0777.
[FCHMOD_MISSING]: Perform chmod after closing files, not
before, for MS-DOS.
* cp.c (do_copy): Don't append `..' to target dir name.
* du.c (main, count_entry, usage): Add -D +dereference-args
and -d +dereference options.
Wed Dec 26 03:39:18 1990 David J. MacKenzie (djm at egypt)
* dirname.c, xstrdup.c: Get decls from standard files, if available.
Thu Dec 20 23:10:22 1990 David J. MacKenzie (djm at egypt)
* makepath.c: New file, adapted from code in mkdir.c,
install.c, and cpio util.c by Jim Meyering.
* mkdir.c, install.c: Use make_path.
Sun Dec 16 00:56:54 1990 David J. MacKenzie (djm at egypt)
* chown.c, chgrp.c: New files.
Sat Dec 15 20:42:32 1990 David J. MacKenzie (djm at egypt)
* cp.h: Declare POSIX functions always -- _POSIX_SOURCE
doesn't imply STDC declarations.
* system.h: Define S_ISTYPE macros not defined by sys/stat.h.
* Many files: Use S_ISTYPE macros.
* backupfile.c, rm.c: Use name d_fileno for member of struct
dirent instead of d_ino, for POSIX.
Wed Dec 12 23:38:22 1990 David J. MacKenzie (djm at egypt)
* ls.c: Declare time() as time_t instead of long, to prevent
conflict with standard header files.
* cp.c (copy_reg): Instead of using NO_SPARSE_FILES, use
st_blocks to determine whether the original file contains any
sparse blocks, and only create them if so. On systems without
st_blocks, to be safe, never create sparse blocks.
Thu Nov 8 12:16:27 1990 David J. MacKenzie (djm at apple-gunkies)
* idcache.c: If _POSIX_SOURCE not defined, declare getpw and
getgr functions (not an optimal solution, but I hate to add
yet another configuration macro).
* Makefile: Define AR and RANLIB and pass to child makes.
lib/Makefile: Use them.
Tue Nov 6 23:18:06 1990 David J. MacKenzie (djm at mole.ai.mit.edu)
* idcache.c: New file from code in ls.c.
Fri Nov 2 14:34:40 1990 David J. MacKenzie (djm at apple-gunkies)
* Move files into src and lib directories, split out library
functions into separate files in lib, and rewrite Makefiles.
Mon Oct 29 01:20:46 1990 David J. MacKenzie (djm at apple-gunkies)
* mv.c (do_move), rm.c (remove_file, remove_dir): If stdin is
a tty and file is unwritable, prompt before overwriting.
* cp.c (copy_reg): Only make sparse files if
NO_SPARSE_FILES is undefined, to accommodate dumb kernels.
* du.c (count_entry): Remove misinformed HPUX kludge that
doesn't really fix the problem.
* rm.c (rm): Check for textual equality with '.' and '..', not
dev/inode equality.
Sat Oct 27 23:38:55 1990 David J. MacKenzie (djm at apple-gunkies)
* rm.c (check_stack): If not interactive, don't prompt when
corruption is found, just quit.
(remove_file, remove_dir): Delete leading spaces in verbose
output.
* cp.c (copy), rm.c (remove_dir): If we think the dest. file
is unwritable, warn the user in the interactive prompt instead
of automatically skipping the file. Because of race
conditions and other protection mechanisms we might not know
about, and POSIX.
Mon Oct 8 18:51:25 1990 David J. MacKenzie (djm at apple-gunkies)
* du.c (main, usage, count_entry): Add +separate-dirs -S option.
* dd.c (main): Don't trap SIGINT if it was being ignored.
Tue Sep 25 16:40:43 1990 David J. MacKenzie (djm at apple-gunkies)
* install.c (copy_file, install_file_in_file): Change
attributes after stripping, to guard against strip programs
that clear setuid bits, etc.
Fri Sep 21 22:31:43 1990 David J. MacKenzie (djm at apple-gunkies)
* cp.c (copy_reg): Put back ftruncate way of making holes
because the other way can't make a hole at the end of a file.
Tue Sep 18 03:47:45 1990 David J. MacKenzie (djm at apple-gunkies)
* install.c (change_attributes): Don't ignore EPERM for chown,
since the default uid is now the current uid.
Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Version 1.4.
* cp.h: Declare free returning void, not int, so it
doesn't bomb on Xenix.
Fri Sep 7 04:35:35 1990 David J. MacKenzie (djm at apple-gunkies)
* system.h, backupfile.c, savedir.c [DIRENT]: if direct is
defined (as on Ultrix 4.0), undefine it before redefining it.
Tue Sep 4 03:10:24 1990 David J. MacKenzie (djm at apple-gunkies)
* dd.c (apply_translations, translate_charset): Code moved
from parse_conversion.
(apply_translations): Convert from EBCDIC to ASCII before
converting case.
* mvdir.c (fullpath): Return a value.
* dd.c (copy): Increment count of truncated records once
per record, not once per character that overflows.
Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
* dd.c (swab_array): Function removed.
(copy): Rewrite conv=swab to work when odd number of bytes
are read.
(scanargs): Die if invalid numeric value is given.
(parse_integer): Return -1 if invalid arg.
(bit_count): Faster version from Jim Meyering.
* cp.c, mkfifo.c [MKFIFO_MISSING]: Define mkfifo.
Thu Aug 30 00:17:02 1990 David J. MacKenzie (djm at apple-gunkies)
* mvdir.c (main): Make sure `from' is not a parent of any part
of `to', not just the explicitly given part.
(fullpath): New function.
Wed Aug 29 19:50:05 1990 David J. MacKenzie (djm at apple-gunkies)
* mvdir.c: Renamed from mv_dir.c, for consistency with mkdir and rmdir.
* dirlib.c: Caller changed.
Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* touch.c (main): Don't interpret first non-option arg as a
time if `--' is given (POSIX-required kludge).
* touch.c: Add long-named options.
* Many files: Include <getopt.h> instead of "getopt.h" since
getopt.h will be in the GNU /usr/include.
* install.c: Declare some functions.
* touch.c, getdate.y, posixtime.y, mktime.c: New files, from bin-src.
* posixtime.y: Move year from before time to after it (but
before the seconds), for 1003.2 draft 10.
Mon Aug 27 03:25:36 1990 David J. MacKenzie (djm at apple-gunkies)
* touch.c (main): If no time is given and first arg is a valid
timespec, use it as one.
Sat Aug 25 01:36:16 1990 David J. MacKenzie (djm at apple-gunkies)
* posixtime.y: Enclose YYABORT in braces in case some yacc's
need it.
* touch.c: Remove -i option. Change some error messages.
(readname): Function removed.
Thu Aug 23 12:56:33 1990 David J. MacKenzie (djm at apple-gunkies)
* cp.c (copy): Only restore dir mode if it was changed.
Wed Aug 22 01:45:54 1990 David J. MacKenzie (djm at apple-gunkies)
* cp.c (copy): Don't only backup files when -f is given.
* ls.c: Add -X +sort=extension option. Rename
+kilobyte-file-size to +kilobytes.
* du.c: Rename -f option to -x, for POSIX. Rename
+kilobyte-file-size to +kilobytes. Add -b, +bytes option for
POSIX.
* cp-aux.c (usage): Change -o to -x.
(stpcpy): Renamed from str_cpy. Change callers in cp.c.
* cp.c: New variable, `flag_copy_as_regular'.
(main): For -R, unset `flag_copy_as_regular'.
Rename -o to -x for consistency with du.
(copy): Only unlink destination files when -f is given.
Only prompt when -i given and copying as a regular file.
Move check for previous link after other checks, reducing
duplicate code.
Create directories with mode 0700 initially, for POSIX.
Mon Aug 20 03:29:08 1990 David J. MacKenzie (djm at apple-gunkies)
* dd.c (copy): Swap input bytes instead of output bytes.
(swab_array): New function.
* dd.c (copy): If sync and noerror, zero the buffer before the
read instead of after so that any data read before an error
occurred are preserved.
On read error, print stats and seek past the bad block if noerror.
noerror doesn't affect write errors, for POSIX.
(scanargs): Use two buffers if no buffer sizes given.
Do not block or unblock if cbs not given.
(print_stats): New function.
(quit): Call it.
Mon Aug 13 23:30:03 1990 David J. MacKenzie (djm at apple-gunkies)
* cp.c (copy): If dest. exists and is unwritable, skip the file.
* rm.c, mv.c, cp.c, ln.c (main): Respect the last -f or -i given,
for POSIX.
* rm.c (remove_file): Only prompt if -i is given.
(main, usage): Remove -o +override-mode option, obsolete if
POSIX accepts our objection about prompting.
* mv.c (do_move): Only prompt if -i is given.
* ln.c (do_link): If dest. file exists and -i and -f not
given, skip the file.
Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
* dd.c (main): If seek= given, don't truncate output file.
(copy): Use `read' to skip output blocks if not regular file.
Sync with NUL instead of SPC.
Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* rm.c: Rename `ignore_errors' to `ignore_missing_files', and
have it only suppress messages about nonexisting files.
(main): Get dev and ino of `.' and `..'.
(rm): If file is the same as `.' or `..', return with error.
(remove_file): Remove the file rather than skipping it if
unwritable, no -i, and stdin not tty.
(remove_dir): Return an error if directory is nonwritable,
rather than nonreadable or nonsearchable, for POSIX.2 draft 10.
* chmod.c (main): Use fixed error checking to make sure that
options aren't mixed together in the same args as mode specifiers.
Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* chmod.c (main): Use umask for '-' op.
Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* mkfifo.c: Remove -p +path option, no longer specified by POSIX.
Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* mkdir.c, mkfifo.c, create.c (main): Don't tell mode_compile to
respect the umask for certain operations, since the umask is 0 anyway.
* install.c (get_ids): Use getuid and getgid to get defaults,
instead of -1.
Fri Jul 27 14:32:40 1990 David J. MacKenzie (djm at apple-gunkies)
* backupfile.c (dirname): Always replace frontmost slash with a null.
Thu Jul 26 00:20:35 1990 David J. MacKenzie (djm at apple-gunkies)
* cp.h: Declare umask as unsigned short.
* eaccess.c: Make uid and gid unsigned short, and group array unsigned.
Wed Jul 25 18:38:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* rm.c (remove_file, remove_dir): Print verbose message right
before actually trying to remove the file, after the prompting.
* ls.c (getuser, getgroup): Make uid and gid unsigned short, not int.
Tue Jul 24 03:39:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.c (copy), ln.c (do_link), mv.c (do_move): For +verbose,
print the file names just before actually attempting the
copy/link/move, to produce a list of the files that they
actually try to copy/link/move, omitting skipped files.
Remove leading spaces from +verbose output.
Mon Jul 23 16:57:44 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.c (copy): Make +update operate silently, like +one-file-system.
* ln.c: Add -F as synonym for -d, for SunOS compatibility.
Sun Jul 15 23:23:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.c (copy): Go back to using xstat on dest.
Wed Jul 11 12:10:33 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.c (copy): Make directories with desired mode plus u+wx so
if the copy is interrupted, the dir is closer to the desired mode.
Don't backup directories.
Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
* rm.c (main, usage): Add new option -d, +directory.
(rm): If -d given, use remove_file instead of remove_dir for
directories.
(remove_file): If directory, print "remove directory `foo'?"
for interactive instead of "remove `foo'?".
* ln.c (main): If -s given, print warning message if symlinks
are not available.
* mkfifo.c (main): If fifo's are not available, print message
and exit.
Fri Jul 6 02:02:49 1990 David J. MacKenzie (djm at apple-gunkies)
* install.c (main): Use the current user and group ID for the
default owner and group.
* mv.c (main): New option -u, +update.
(do_move): Don't move nondirectories if -u and there is an existing
destination that has the same or newer mtime.
(usage): Document -u, +update.
* cp.c (main): New option -u, +update.
(copy): Don't copy nondirectories if -u and there is an existing
destination that has the same or newer mtime.
* cp-aux.c (usage): Document -u ,+update.
Thu Jul 5 10:04:12 1990 David J. MacKenzie (djm at apple-gunkies)
* ln.c (do_link): Don't check whether OLD exists before trying
to make link.
Tue Jul 3 01:51:55 1990 David J. MacKenzie (djm at apple-gunkies)
* ls.c: Allow "+time=atime" and "+time=ctime" for C hackers.
* chmod.c (main): Don't check whether multiple mode arguments
are given, because optind has a different value depending on
whether or not the option is the last character in the
ARGV-element.
Sat Jun 30 12:32:51 1990 David J. MacKenzie (djm at apple-gunkies)
* cp.c (copy): Use lstat on dest. file, not *xstat.
Mon Jun 25 18:07:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ls.c (print_long_format): Truncate user and group names to 8
chars to preserve column alignment.
(length_of_file_name_and_frills): Don't assume type indicator
will be printed for unknown file types that some os's have.
* install.c: Declare getgrnam for systems where grp.h doesn't.
Sat Jun 23 00:06:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Version 1.3.
* du.c (count_entry) [HPUX_NFS_BUG]: If the size of the file
according to the number of blocks reported is twice or more than
the size of the file according to the number of bytes
reported, halve the number of blocks.
Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.c (copy_dir): Initialize 'ret' to 0.
* cp.c (main), ln.c (main), mv.c (main), rm.c (main):
Make -i override -f and -o, to be conservative about
removing peoples' files.
* mkdir.c (make_path), mkfifo.c (make_path): Don't try to stat
"" or "/".
* rm.c, rmdir.c, mkdir.c, mkfifo.c: Move code to remove
slashes at the end of an arg from main to
strip_trailing_slashes.
* install.c (strip): Print error message if the `strip'
program can't be run.
* system.h (convert_blocks): Macro moved from du.c and ls.c.
Take a second parameter indicating whether to convert to
kilobytes or 512 byte blocks.
* ls.c, du.c: Pass second parameter to convert_blocks.
Thu Jun 21 01:19:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ls.c (print_long_format): Use mode_string instead of filemodestring.
* ls.c (print_long_format): Compare times as longs, not ints.
(longdiff): Macro to compare two longs efficiently if sizeof
int == sizeof long and less efficiently but correctly if they
are different sizes.
(compare_ctime, etc.): Use longdiff.
* ls.c (decode_switches): Make -k not imply -s, to allow the
summary directory size printed by -l to be in 1k blocks
without having the size of each file printed as well.
(convert_blocks): Provide for systems with a blocksize that is
other than 512 or 1024 bytes.
* du.c (main): Exit with status 0 normally.
(convert_blocks): Provide for systems with a blocksize that is
other than 512 or 1024 bytes.
Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ln.c (do_link): Take out code to give an error if source and
dest are the same file. The dubious usefulness of the special
case to prevent 'ln x x' from removing 'x' (ln -i can be used
instead) is not worth preventing 'ln x y' from failing the
second time in a row, and appears to contradict POSIX anyway.
Mon Jun 18 02:48:17 1990 David J. MacKenzie (djm at apple-gunkies)
* ls.c (print_file_name_and_frills):
(length_of_file_name_and_frills, print_long_format):
Allow 6 digits for i-number, not 5.
Sun Jun 17 00:09:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* install.c (install_dir): Don't check whether "" or the root
directory exists (the former fails on some systems).
* system.h: Make inclusion of sys/file.h conditional on USG
and _POSIX_SOURCE, not DIRENT.
* chmod.c (change_dir_mode): Use xrealloc instead of free and
xmalloc in case malloc already left extra room.
(xrealloc): New function.
* rm.c (clear_directory): Prevent buffer overruns.
More efficient string handling. Don't skip rest of directory
if continuing after finding circular inode.
(xrealloc): New function.
Sat Jun 16 01:45:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* argmatch.c (invalid_arg): Change order in which the items
are printed.
* ls.c: Add +tabsize (-T) option.
Fri Jun 15 23:40:55 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* dd.c (scanargs): For ibs and obs, set C_HARDWAY.
(copy): Use different buffers only if C_HARDWAY, not if
blocksizes are the same, to ensure constant output block sizes.
Wed Jun 13 23:56:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* savedir.c: New file from code in chmod.c, modified to
prevent buffer overruns.
* chmod.c (change_dir_mode), cp.c (copy_dir), du.c
(count_entry): Use savedir.
Thu Jun 7 03:52:02 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* system.h (ST_BLKSIZE) [!STBLOCKS_MISSING]: If st_blksize is
0 (as on pipe reads on some systems), use BSIZE instead.
Define BSIZE as DEV_BSIZE if necessary.
* Makefile, system.h, fileblocks.c: Use STBLOCKS_MISSING to
control whether st_blksize and st_blocks are used.
* Makefile, system.h, backupfile.c: Use DIRENT to control
whether <dirent.h> is used.
Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
* fileblocks.c: New file.
* du.c (blocks_to_kb): Replace with convert_blocks macro.
(main): Recognize new -k option.
(usage): Document it.
* ls.c (nblocks): Replace with convert_blocks macro.
* system.h (ST_BLKSIZE) [USG]: Use BSIZE from sys/param.h instead of
having the user define BLKSIZE.
(ST_NBLOCKS) [USG]: Use st_blocks from fileblocks.c.
Wed May 23 00:40:39 1990 David J. MacKenzie (djm at apple-gunkies)
* argmatch.c: New file, taken from ls.c.
* getversion.c (get_version): Use argmatch, to allow
abbreviations. Default backup type is existing_numbered.
* mv.c (main), ln.c (main), cp.c (main): Only make backups if
-b (+backup) is given. If envar SIMPLE_BACKUP_SUFFIX is set,
use it as a default instead of `~'.
* mv.c (usage), ln.c (usage), cp-aux.c (usage): Update messages.
Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* install.c: New file (from ../bin-src).
* dd.c (copy): Don't count completely failed writes as partial
writes. Make buffers unsigned. If blocking or unblocking,
pad final partial buffer if necessary.
* getversion.c: New file.
* mv.c (main), cp.c (main), ln.c (main): Control backup types
with getenv ("VERSION_CONTROL") and +version-control or -V.
* cp.c (yesno), mv.c (yesno), ln.c (yesno): Stop reading if
EOF reached as well as at newline.
* backupfile.[ch]: Rename var `version_control' to `backup_type'.
Sat May 19 23:38:46 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* touch.c: Change some error messages. Include "getopt.h".
Sat May 19 00:16:50 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* mv.c (main), ln.c (main), cp.c (main): Revise
backup-creation options.
* mv.c (usage), ln.c (usage), cp-aux.c (usage): Revise messages.
* chmod.c (describe_change): Use mode_string instead of
filemodestring.
* cp.c (main): Recognize new options for making backups.
* cp.c (copy): Make backups if requested. Fix typo.
* cp-aux.c (usage): Update message.
* mv.c, cp.c: Remove code to conditionally use utimes instead
of utime, since the extra resolution of utimes was not being
used, the emulation overhead is probably insignificant,
and utime is a standard function.
* cp-hash.c: Fix up comments.
Fri May 18 23:06:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* mv.c (do_move): Only make backup if dest file exists.
Don't continue moving file if dest can't be backed up.
* ln.c (do_link): Don't try to unlink dest if it was backed up.
Don't continue moving file if dest can't be backed up.
* system.h: Make SIGTYPE default to void if not defined.
* modechange.[ch]: Rename struct and external functions to start
with 'mode_'.
* modechange.c (oatoi): Make static.
(mode_compile): Take an additional arg indicating which
symbolic operators should be affected by the umask.
* modechange.h: Add defines for mode_compile arg mask.
If __STDC__, use prototypes.
* chmod.c, mkdir.c, mkfifo.c, create.c: Account for above changes.
Tue May 15 16:17:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* dd.c (copy): Quit with nonzero status if final write fails.
Mon May 14 14:34:10 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* dd.c: Make translation tables unsigned.
(main): Give `input_file' and `output_file' nonzero values for
stdin and stdout.
(parse_conversion): Set new global vars 'space_character' and
'newline_character' to correct values when translating to EBCDIC
(either flavor).
(copy): Use 'space_character' and 'newline_character' instead
of hardcoded ASCII values. Ignore attempts to seek on output pipe,
socket, or fifo. If possible, seek instead of reading to skip
initial input records. Sync with `space_character' instead of
nulls, for POSIX.
* cp.c (copy_reg): Compare lseek values as longs, not ints.
Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp-hash (remember_created): Return error status instead of
fatal error.
* cp.c (copy): Change caller.
(do_copy, copy_reg): Return error status instead of fatal error.
* Move rename emulation from mv.c to dirlib.c so other
programs can use it.
* mv.c, ln.c (main): Recognize new options for making backups.
* mv.c (do_move), ln.c (do_link): Make backups if requested.
* mv.c, ln.c (usage): Update message.
* backupfile.c, backupfile.h: New files.
* cp.h: Ifdef out decl of umask because of SunOS 4.1 (POSIX) conflict.
* Define all `main' functions as returning void.
Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ln.c, mv.c, rm.c, rmdir.c, create.c, chmod.c: Change some
error messages.
* du.c, cp-aux.c (error): Function removed.
Change callers to use error.c version.
* cp.c (copy, do_copy, copy_dir): Return an error status.
* ls.c (error, fatal, perror_with_name): Functions removed.
Change callers to use error.c.
Sat May 5 23:46:48 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ln.c (do_link): Don't allow trying to link a file to itself,
because the source file would be removed if they are the same
directory entry, and also for consistency with mv and cp.
Fri May 4 13:42:53 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.c (copy_reg): Only write a null to the end of the file if
the end of the file was sparse.
* ls.c (print_name_with_quoting): Make the char to print
unsigned to prevent sign extension problems with -b.
Fri Apr 20 13:52:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Version 1.2 released.
Wed Apr 18 14:36:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Makefile: Use chsize for ftruncate on Xenix.
* cp.c (copy): Remove broken code that attempted to
substitute for ftruncate on systems missing it.
Mon Apr 16 13:58:01 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp-aux.c (usage): Fix mistake in message.
* Version 1.1 released.
Sat Apr 14 17:23:11 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ls.c (main): Don't remove leading path from program_name.
(basename): Function removed.
(length_of_file_name_and_frills): Don't add 1 for type indicator
for block and character special files.
Thu Apr 12 19:50:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Makefile: Suggest using -DBLKSIZE=512 instead of 1024 for USG.
* dd.c (copy): Print copying statistics when exiting because
of a read or seek error.
(interrupt_handler): New function.
(main): Trap SIGINT to run interrupt_handler, for POSIX.
Tue Apr 10 01:09:38 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* chmod.c (change_file_mode): Don't change the mode of
symbolic links.
Mon Apr 9 13:30:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* modechange.c (compile_mode): Return an error if an octal
number argument is too large.
Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* dd.c: Use `error' instead of `fatal' and `pfatal_with_name',
for greater control of the message format.
* head.c, tail.c: Use `error' instead of `fatal_perror' and
`nonfatal_perror'. Remove some unnecessary info from messages.
* chmod.c, create.c, ln.c, mkdir.c, mkfifo.c, mv.c, mv_dir.c,
rm.c, rmdir.c: Remove definition of `error'.
* error.c: New file created from code in mv.c.
* Makefile: Link the above programs with error.o.
* ln.c (do_link): Use eaccess_stat to determine writability.
* mv.c (do_move): Ditto.
* rm.c (remove_file): Ditto.
(remove_dir): Use eaccess_stat to determine readability and
searchability. Move initial interactive query here from
clear_directory.
* Makefile: Link ln, mv, and rm with eaccess.o.
Sat Apr 7 11:47:52 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Makefile: Link cp with eaccess.o.
* eaccess.c: New file adapted from code in cp.c and cp-aux.c.
* cp.c (copy): Use eaccess_stat to determine writability.
Consider a file unwritable by root if it has no permissions.
(main): Remove groups initialization code.
* cp-aux.c (member): Function deleted.
* cp.c (copy): Temporarily change the mode of directories if
necessary to overwrite them when running recursively.
Consider a directory to be non-overwritable if it lacks write
permission as well as if it lacks execute permission.
* rm.c, mv.c, mv_dir.c, chmod.c, create.c, ln.c: Remove some
irrelevant or redundant information from error messages.
Fri Apr 6 15:20:45 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.c (copy): Only change mode of regular files and directories;
others are already correct.
Thu Apr 5 04:31:56 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* dd.c: Remove the vars that are set by command line options
from a useless struct and give them more meaningful names.
Mon Apr 2 02:58:34 1990 David J. MacKenzie (djm at spike.ai.mit.edu)
* cp.c (main): Use NGROUPS from sys/param.h to determine
whether BSD multiple groups are supported and how large to
make the array.
* Makefile: Remove references to GETGROUPS_MISSING.
Sun Apr 1 18:53:57 1990 David J. MacKenzie (djm at spike.ai.mit.edu)
* cp.c (main): Always initialize group info.
Sat Mar 31 22:29:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* mv.c [RENAME_MISSING] (rename): To rename directories, run
setuid root mv_dir program.
Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
* touch.c: Remove POSIX_COMPAT ifdef since there is no reason
to disable the GNU extensions.
(main): Set new global var `program_name'.
(error): Replace with more versatile version.
Global: Change calls to fprintf and error to use the new error.
(main): Initialize global variables. Don't bother making
temporary copy of arg to -d. Don't ignore any files named on
the command line if -i is given.
(usage): Don't take an arg. Use `program_name' instead of
hardcoded name.
(touch): In utime emulation for BSD, ftruncate the file to its
original size so empty files stay empty after being touched.
Sun Mar 18 01:02:39 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ln.c (strip_trailing_slashes): New function.
(main, do_link): Call it.
* cp-aux.c (strip_trailing_slashes): New function.
* cp.c (do_copy): Call it.
* cp.h: Declare it.
* mv.c (strip_trailing_slashes): New function.
(main, movefile): Call it.
Sat Mar 17 21:45:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp-aux.c, cp.h: Rename user_confirm_overwriting to yesno and
don't have it print a prompt, so it can be used in several
places.
* cp.c (do_copy): Change an error message to resemble mv's.
Remove all trailing slashes from all non-option args.
(main): Set new global var `stdin_not_tty'.
(copy): Use POSIX method of handling file overwriting and
prompting.
* dirlib.c (mkdir): Use chmod to set the directory mode after
successful creation, so set[ug]id and sticky bits are set
correctly.
Thu Mar 15 12:33:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Makefile: Add commented out definitions for SCO Xenix.
* ls.c (print_type_indicator): Don't print a '*' next to
executable block or character special files.
* chmod.c (error): New function, replacing nonfatal_perror,
memory_out, and invalid_mode.
Global: Call error instead of the above functions.
(change_dir_mode): Make the new size of the path twice the
size of the name that was too long, rather than twice its old
size.
* rm.c: Move interactive query about whether to remove a
directory from remove_dir to clear_directory; only query for
directories that are not empty.
Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
* system.h [USG]: Define X_OK.
* rm.c (main): Set new global var `stdin_not_tty'.
(rm): Most of code moved to two new functions, remove_file and
remove_dir.
(remove_file): Use POSIX method of determining whether to remove
non-directories.
(remove_dir): Use POSIX method of determining whether to
remove directories, almost.
(perror_with_name): Function removed.
(error): Simple version replaced with more powerful version.
Global: Change calls to fprintf, perror_with_name, and old
error to calls to new error.
* ln.c (main): Set new global var `stdin_not_tty'.
If force, turn off interactive.
(do_link): By default, don't allow hard links to symbolic links to
directories. Use POSIX method of determining whether to
overwrite destination.
(yesno): Function renamed from confirm, and arg removed.
(lisdir): Function removed.
* mv.c (main): Set new global var `stdin_not_tty'.
(yesno): Function renamed from yes.
(do_move): Use POSIX method of determining whether to
overwrite destination.
* Makefile: Make executables depend on .o files, not .c files,
to allow for parallel compilation.
Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
* rm.c (main): Disallow removal of paths that have '..' as the
final element.
(basename): New function.
* ls.c (print_type_indicator): Mark FIFOs with '|' and sockets
with '='.
(print_long_format): Print numbers as unsigned and add extra
space for POSIX flag.
* dd.c: Make the record counts unsigned.
(quit): Print them as unsigned.
* modechange.c (compile_mode): Only get umask value when needed.
If users are not given or are `a', affect set?id and sticky bits.
If memory is exhausted while allocating a new list element,
free the old elements before returning.
* Makefile (CC): Add comment noting that either fixincludes or
-traditional needs to be used for gcc to compile ioctl calls
correctly.
Mon Mar 12 16:25:23 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
* touch.c [UTIME_OF_NULL_MISSING]: Call lseek() before write().
* posixtime.y [__GNUC__]: Use __builtin_alloca.
Fri Mar 9 10:25:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* chmod.c (main): Recognize "a,+-=" as valid options.
* mv.c: Move the code to copy files across filesystems from
do_move to a new function, copy, which will eventually be
replaced with modules from cp and rm (POSIX requires mv to
move directories recursively across filesystems).
(do_move): Don't query about overriding a mode that prohibits
writing if interactive. Remove unneeded variable.
(copy): Unlink target if copy fails partway through.
Thu Mar 8 10:56:16 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.c (copy): Don't remove a destination file of a different
type unless +force is given.
* ls.c (decode_switches, usage): Add -U (for "unsorted") as an
equivalent to +sort=none.
Mon Mar 5 16:31:14 1990 Torbj|rn Granlund (tege at echnaton)
* cp.c (copy): Test for temporarily modified permission mode
after the other test, so that `-p' work for files whose mode
needed a temporary mode change.
* cp.c (copy): Don't waste time calling unlink if we already
know that the destination doesn't exists.
* cp.c (comment before do_copy): Correct.
* cp.c (comment before copy): Describe all params.
* cp.c (copy): Only change permission mode for regular files
and directories.
* cp.c (copy): Unlink the destination file if its type is
different from the source. If the destination is a
directory, error.
Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* chmod.c (nonfatal_perror): Don't check for force_silent.
(change_file_mode, change_dir_mode): If force_silent, don't
print error messages.
* mv.c (main): If force, turn off interactive.
(do_move): Simplify check for query. Rename `stb' to
`to_stats' and `stbf' to `from_stats'.
Return error condition if original file could not be renamed or
unlinked.
* rm.c: Rename global `force_flag' to `ignore_errors' and change its
meaning so that it does not overlap with `override_mode'.
(main): Have -f +force set override_mode. If override_mode is
set, turn off interactive.
(rm): Simplify checks for whether to query the user, based on
the new relationship between override_mode and interactive.
Sun Mar 4 23:39:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ln.c (main): Reword an error message to be more like mv's.
* rmdir.c: Move global `errors' into main instead of having
error set it.
* mkdir.c: Move global `errors' into main and have make_path
return an error status instead of having error set it.
* chmod.c: Move global `errors' into main and have
change_file_mode and change_dir_mode return an error status
instead of setting it in nonfatal_perror.
Sat Mar 3 13:59:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ln.c (main): Don't strip leading dirs from argv[0].
* ln.c (confirm), mv.c (yes, do_move),
cp-aux.c (user_confirm_overwriting), rm.c (rm, yesno, check_stack):
Print query messages to stderr instead of stdout, for POSIX.
Include program name in messages.
Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
* cp.c (copy): Don't unlink directories with flag_force
(`-f'). Also avoid using force when not necessary.
Always copy fifo's and symbolic links as themselves.
* cp.c (copy_reg): Make int scan first, char scan then, to
find first non-zero byte. This to avoid false hole
creation.
Sat Mar 3 10:22:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* mv.c: Rename `pgm' to `program_name'. Move global `errors'
into main. Have do_move and movefile return an error status
instead having error set it. Remove global vars `args'
and `args_left'.
(main): Rename `ac' and `av' to `argc' and `argv' and use them
and `optind' instead of `args' and `args_left'.
* cp.c (copy): Don't ignore errors other than EPERM from chown.
Fri Mar 2 16:20:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* rm.c (main, usage): Allow -R as a synonym for -r, for POSIX.
* cp.c (copy): If flag_preserve, preserve the owner and group
if possible, as well as mode.
(main): Allow -R as a synonym for -r option, for POSIX.
* cp-aux.c (usage): Mention -R.
Tue Feb 27 11:49:04 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* cp.c (copy): If not recursive, copy special files and
symlinks like regular files and omit fifos.
Mon Feb 26 19:55:24 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
* ls.c (print_long_format): If time is in the future, print the year.
Make the cutoff for old files 6 months not 300 days.
Mon Feb 26 13:31:07 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
* touch.c, Makefile: Use getdate.y instead of unctime.y.
* touch.c: Remove posixtime.
(main): Check for error from posixtime.
posixtime.y: New file.
* touch.c: Change a few cryptic error messages.
Include <errno.h> not <sys/errno.h>.
(just_set_amtime): New variable.
(touch): Add if (just_set_amtime) code.
Mon Feb 26 15:03:29 1990 Torbj|rn Granlund (tege at echnaton)
* cp.c (copy): Test for recursive copy in DIR alternative in
the switch statement, so all file types are copied correctly
even in a non-recursive copy.
* cp.c (copy): Return after having created a symlink, since
chmod and utimes dereference, and would affect the symlink
target. Remove test for symlinks after switch.
Sun Feb 25 18:31:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Makefile: Compile ls after vdir so systems with a cc that
can't do -c -o don't have to compile ls.c twice for ls.
* dd.c (usage): Add braces around alternatives.
* ls.c (print_long_format): Always print the group, for POSIX.
(decode_switches): Make -g option a no-op for BSD users.
(usage): Remove +group option.
Wed Feb 21 11:13:26 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ln.c (error): New function.
(main, do_link): Call error instead of fprintf and exit.
(main): Recognize new -d +directory option to allow superuser to
make hard links to dirs, like the BSD ln -f option.
(do_link): Don't allow hard links to dirs (they are hard to
get rid of -- rmdir and unlink don't do it), unless -d was given.
(usage): Mention -d +directory option.
* rmdir.c (main): Remove trailing slashes from args (added by
shell file completion but the rmdir syscall can't handle them).
* mkdir.c (main): Remove trailing slashes from args, for
uniformity with rmdir (you can't do file completion on dirs
that haven't been made yet . . .).
* mv.c: Rename global var `nargs' to `args_left' to avoid
conflict with undocumented BSD libc function (the new name is
clearer, anyway).
Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* dd.c: Use new global var `program_name' in error messages
instead of hardcoded "dd".
(main): Set program_name from argv[0].
* chmod.c, head.c, tail.c (main): Don't strip leading dirs
from argv[0].
(basename): Function removed.
* rm.c (main): Don't strip leading dirs from argv[0].
Mon Feb 19 14:34:18 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* rm.c (main): Strip trailing slashes from each arg.
Thu Feb 15 13:23:52 1990 David J. MacKenzie (djm at rice-chex)
* Makefile [HPUX CFLAGS]: Add -DUTIMES_MISSING.
Wed Feb 14 15:01:18 1990 David J. MacKenzie (djm at rice-chex)
* Makefile (dist): Don't make a non-compressed tar file.
* mv.c (do_move): Refuse to copy non-regular files across filesystems.
Tue Feb 13 15:06:18 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
* touch.c (getname): New function.
(main): Use it.
Mon Feb 12 11:30:45 1990 David J. MacKenzie (djm at rice-chex)
* ln.c (do_link): Check error return from unlink.
Include errno.h.
* du.c (main): Check error return from stat.
(str_copyc, str_concatc): Don't return a value, since it is
ignored.
* cp.c (copy): Check error return from unlink and chmod. Fix
typo in call to error.
* mv.c (do_move): Check error return of fchmod/chmod and utime[s].
(rename): Check error return of unlink.
* Makefile Definitions of preprocessor macros moved from
cp.c and mv.c. HAVE_FTRUNCATE changed to FTRUNCATE_MISSING.
* Makefile, dirlib.c: NEED_MKDIR changed to MKDIR_MISSING.
* mv.c, cp.c: Change USG ifdefs to UTIMES_MISSING.
Sun Feb 11 17:50:29 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* chmod.c (usage): Add yet another ellipsis.
Sun Feb 11 16:41:30 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
* cp.c (copy_reg): Use HAVE_FTRUNCATE to decide whether to
use ftruncate().
(main): Use GETGROUPS_MISSING to decide whether to use getgroups().
[hpux || !USG]: Define HAVE_FTRUNCATE.
[USG && !hpux]: Define GETGROUPS_MISSING.
mv.c (rename): Put in #ifdef RENAME_MISSING not #ifdef USG.
(do_move): Use FCHMOD_MISSING to decide whether to use fchmod().
[USG && !hpux]: Define FCHMOD_MISSING and RENAME_MISSING.
Fri Feb 9 10:25:03 1990 David J. MacKenzie (djm at rice-chex)
* mv.c (movefile): Remove trailing slashes from FROM (some
filename completion systems add them for dirs, and they cause
the rename syscall to fail).
Thu Feb 8 22:50:12 1990 Torbj|rn Granlund (tege at sics.se)
* cp.c (copy_reg): Change error handling after lseek, since
this is a fatal error. Also change error message to
something more generally understood.
* Handle files that end in a zero block on USG systems.
* cp-aux.c (error): Use FATAL to recog fatal errs.
Thu Feb 8 21:25:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ln.c: Remove incorrect comment.
* cp.c, cp-aux.c (usage): Change +dereference option to
+no-dereference, since dereferencing is done by default and
the option turns it off.
Mon Feb 5 17:29:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Version 1.0 released.
Local Variables:
mode: indented-text
left-margin: 8
version-control: never
End:
|