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
|
2006-12-22 Bruno Haible <bruno@clisp.org>
* sed/utils.c: Include pathmax.
* sed/mbcs.c: Use local_charset.
* sed/execute.c: Copy with padding after the mbstate_t member.
2006-12-21 Paolo Bonzini <bonzini@gnu.org>
* sed/mbcs.c: Include string.h (reported by Henning Nielsen Lund).
* sed/fmt.c: Likewise.
* sed/regexp.c: Likewise.
2006-12-18 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (closedown): Remove dead code.
2006-12-17 Paolo Bonzini <bonzini@gnu.org>
* sed/utils.c: Include limits.h.
2006-12-16 Paolo Bonzini <bonzini@gnu.org>
* doc/sed-in.texi: Document --follow-symlinks.
2006-12-15 Paolo Bonzini <bonzini@gnu.org>
* sed/regexp.c: Disable all extensions on --posix.
2006-09-24 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c: Support ACLs.
* lib/utils.c: Move...
* sed/utils.c: ... here, and remove xmalloc.
2006-08-21 Paolo Bonzini <bonzini@gnu.org>
* sed/regexp.c: Accept NUL bytes for `.'. Accept 'a\(b' in
POSIXLY_CORRECT/POSIXLY_BASIC posixicity.
2006-08-03 Paolo Bonzini <bonzini@gnu.org>
Revert this part of the previous change:
2006-08-03 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (get_openfile): Change second argument to char
and turn it into a string within the function. Adjust callers.
2006-08-03 Paolo Bonzini <bonzini@gnu.org>
Corinna Vinschen <vinschen@redhat.com>
* lib/getline.c (getline): Remove Windows special casing.
* lib/utils.c (register_open_file, ck_fdopen): New.
(ck_fopen, ck_mkstemp): Use register_open_file.
* lib/utils.h (ck_fdopen): New.
* sed/execute.c (open_next_file): Reopen stdin.
* sed/sed.h (read_mode): New.
* sed/sed.c (read_mode): New.
(main): Set it on --binary.
(usage): Document --binary.
* sed/compile.c (get_openfile): Change second argument to char
and turn it into a string within the function. Adjust callers.
* sed/execute.c (dump_append_queue, open_next_file): Use it
as mode for ck_fopen.
2006-08-03 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (str_append): Use is_utf8 to skip useless work.
* sed/mbcs.c (initialize_mbcs): Look for a UTF-8 locale.
(is_utf8): New.
* sed/sed.h (is_utf8): New.
2006-07-13 Paolo Bonzini <bonzini@gnu.org>
* bootstrap.sh.in: Add a few autoconfy tests.
* Makefile.am: Update distributed bootstrap.sh.
2006-05-15 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
* sed/basicdefs.h (OB_MALLOC): Turn VCAST into void * cast.
2006-02-03 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (compile_program) <case 'y'>: Pass false to match_slash.
2005-09-07 Paolo Bonzini <bonzini@gnu.org>
* lib/regcomp.c: Update from upstream.
* lib/regex.c: Update from upstream.
* lib/regex_.h: Update from upstream.
* lib/regex_internal.c: Update from upstream.
* lib/regex_internal.h: Update from upstream.
* lib/regexec.c: Update from upstream.
2005-08-30 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (reset_addresses): Never activate ADDR_IS_NUM_MOD
addresses.
* testsuite/modulo.good, testsuite/modulo.inp, testsuite/modulo.sed:
New.
* testsuite/Makefile.tests: Add new testcase.
* testsuite/Makefile.am: Add new testcase.
* testsuite/Makefile.in: Regenerate.
2005-05-18 Maciej W. Rozycki <macro@linux-mips.org>
* configure.ac: Use a cache variable for the libcP test.
* configure: Regenerate.
2005-05-16 Eero Hakkinen <eero17@bigfoot.com>
* sed/compile.c (snarf_char_class): Fix handling of
[^]xyz].
2005-04-04 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (process_files): Do not add a default
command-line in in-place editing mode.
2005-02-10 Paolo Bonzini <bonzini@gnu.org>
* testsuite/Makefile.tests: Add new testcase.
* testsuite/Makefile.am: Add new testcase.
* testsuite/Makefile.in: Regenerate.
* testsuite/appquit.good, testsuite/appquit.inp,
testsuite/appquit.sed: New testcase.
* testsuite/readin.sed: Quit after the last r command.
* testsuite/readin.good: Adjust.
* sed/execute.c (execute_program): Dump the results of the
a/r/R commands just before quitting.
2005-02-10 Paolo Bonzini <bonzini@gnu.org>
* sed/regexp.c: Fix off-by-one error in the "invalid reference
to subexpression" message. Debian bug 294339.
2005-02-08 Paolo Bonzini <bonzini@gnu.org>
* lib/obstack.h: include config.h.
2005-02-01 Paolo Bonzini <bonzini@gnu.org>
* doc/Makefile.am: Don't enable MAKEINFO_HTML and TEXI2HTML_HTML
rules unless BUILD_HTML.
2005-01-25 Paolo Bonzini <bonzini@gnu.org>
* sed/regexp.c: Fix building on GCC 2.95 and earlier.
2004-12-26 Paolo Bonzini <bonzini@gnu.org>
Do not use leftmost-longest matching for addresses.
* NEWS: Add a note about this.
* testsuite/recall2.good, testsuite/recall2.inp,
testsuite/recall2.sed: New test.
* testsuite/Makefile.am, testsuite/Makefile.tests: Add the
recall2 test.
* sed/sed.h (struct regex): New.
(struct addr, struct subst, compile_regex, match_regex,
release_regex): Use it instead of regex_t.
* sed/compile.c (compile_program): Update for new meaning of
the third parameter of compile_regex.
* sed/execute.c (do_subst): Pass less conservative value to
the regsize parameter of match_regex.
* sed/regexp.c (compile_regex_1): New, extracted out of
compile_regex. The third parameter, needed_sub, now includes
\0 (so 10 means that \0 .. \9 are needed). Pass RE_NO_SUB
if needed_sub is zero.
(compile_regex): Accept a struct regex instead of a regex_t.
Save the regular expression's text.
(match_regex): Accept a struct regex instead of a regex_t.
Recompile the pattern if it was compiled with RE_NO_SUB.
(release_regex): Accept a struct regex instead of a regex_t.
* doc/Makefile.am: Generate sed.texi correctly when
building outside srcdir.
2004-12-26 Paolo Bonzini <bonzini@gnu.org>
* BUGS: Add section about [a-z] matching uppercase characters,
and other locale issues.
* doc/sed-in.texi [!PERL]: Likewise.
2004-11-15 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (str_append_modified): Copy the first character
when using \l or \u in a multi-byte configuration. Use
WCRTOMB instead of wcrtomb.
* sed/sed.h (WCRTOMB): New.
2004-11-11 Paolo Bonzini <bonzini@gnu.org>
* tst-rxspecer.c: Do not mix instructions and
declarations.
* basicdefs.h: Include locale.h before #defining
gettext, to avoid breakage under Solaris.
* sed/sed.c: do not include locale.h.
2004-11-03 Paolo Bonzini <bonzini@gnu.org>
* bug-regex11.c: Improve portability.
* bug-regex12.c: Improve portability.
* bug-regex13.c: Improve portability.
* bug-regex14.c: Improve portability.
* bug-regex21.c: Improve portability.
* bug-regex9.c: Improve portability.
* tst-boost.c: Improve portability.
* tst-pcre.c: Improve portability.
* tst-regex.c: Improve portability.
* tst-rxspencer.c: Improve portability.
2004-10-08 Paolo Bonzini <bonzini@gnu.org>
* lib/utils.c (utils_id_s): Renamed to open_files.
(struct id): Renamed to struct open_file.
2004-10-08 Jakub Jelinek <jakub@redhat.com>
* testsuite/Makefile.tests (bug-regex*, run-tests,
run-ptests): Use $(SED).
(version): Likewise; prepend $(SED) invocation with $(SEDENV).
2004-08-16 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.1.2 released.
2004-08-06 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (bad_command): Fix off-by-one error.
(snarf_char_class): Fix problem with [.....[] (i.e.
last char in class is a bracket.
2004-06-30 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.1.1 released.
2004-06-29 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (mark_subst_opts): Return int.
* sed/execute.c (open_next_file): Fix uninitialized
variable.
2004-06-10 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.1 released.
2004-03-25 Paolo Bonzini <bonzini@gnu.org>
* lib/obstack.h: Get current version.
2004-03-13 Paolo Bonzini <bonzini@gnu.org>
Exit as soon as possible on an I/O error, and with
a better error message.
* lib/utils.c (ck_mkstemp, ck_rename, ck_getline): New
functions. Save temporary files into utils_id_s.
(struct id): Add a field named temp.
(ck_fopen): Init the new temp field of struct id.
(panic): Unlink temporary files before exiting.
* sed/execute.c (read_file_line): Use ck_getline.
(closedown): Use ck_rename.
(open_next_file): Use ck_mkstemp.
2004-01-20 Paolo Bonzini <bonzini@gnu.org>
* sed/sed.h (enum addr_state): New definition.
(enum addr_type): Remove ADDR_IS_NUM2.
(struct sed_cmd): Replace a1_matched with range_state.
* sed/compile.c (next_cmd_entry): Use range_state.
(compile_program): Death to ADDR_IS_NUM2. Compile
N,Mp as Np if N>=M.
* sed/execute.c (match_address_p): Rewritten. Handle
ADDR_IS_NUM here.
(match_an_address_p): Suit to new match_address_p.
(execute_program): Adjust to use range_state in `c'.
Handle addr_bang here.
(reset_addresses): Use range_state.
(struct input): New field "reset_at_next_file".
(read_pattern_space): Use it instead of "separate_files".
(process_files): Initialize it.
2004-01-17 Paolo Bonzini <bonzini@gnu.org>
* sed/sed.h: Do not include wchar.h and wctype.h, and do
not include the alloca stuff.
* basicdefs.h: Move all that here.
2004-01-15 Paolo Bonzini <bonzini@gnu.org>
* sed/regexp.c [REG_PERL]: Use REG_STARTEND instead of regexec2.
2004-01-09 Paul Eggert <eggert@twinsun.com>
Paolo Bonzini <bonzini@gnu.org>
* sed/sed.h (posixicity): New variable, replaces POSIXLY_CORRECT.
* sed/sed.c (main): Set it.
* sed/compile.c: Use it instead of POSIXLY_CORRECT.
* sed/execute.c: Use it instead of POSIXLY_CORRECT.
* doc/sed-in.texi: Document it and --posix.
2004-01-05 Paul Eggert <eggert@twinsun.com>
Paolo Bonzini <bonzini@gnu.org>
* NEWS: Fix [\n] to match either backslash or n in POSIXLY_CORRECT mode.
* doc/sed-in.texi: Document this. Also, document regular expressions
a bit better overall, using terminology that's more similar to POSIX.
* sed/sed.h (enum text_types): New definition.
* sed/compile.c (normalize_text): Replace final parameter with one of
type normalize_text. If TEXT_REGEX and in POSIXLY_CORRECT mode,
grok character classes without replacing \n inside them.
2004-01-03 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (execute_program): print final line
after executing N, if not POSIXLY_CORRECT.
2003-12-28 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c: fix "\\\n" in RHS of s command.
Reported by Mike Castle.
* testsuite/bkslashes.inp, testsuite/bkslashes.good,
testsuite/bkslashes.sed: New files.
* testsuite/Makefile.am, testsuite/Makefile.tests: Add
the bkslashes test.
2003-12-16 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0b released.
* sed/mbcs.c: New file.
* sed/sed.h: Declare macros for mbcs.c.
* sed/compile.c: Use them.
(brlen): Moved to mbcs.c.
* sed/execute.c: Use them.
* sed/sed.c: call initialize_mbcs ().
2003-12-14 Paolo Bonzini <bonzini@gnu.org>
* sed/regex.c (match_regex): fix memory leak.
2003-11-27 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (reset_addresses): leave addresses 0
and 0~STEP enabled.
2003-11-15 Jakub Jelinek <jakub@redhat.com>
* sed/regex.c: Use fastmap.
2003-09-21 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0a released.
* sed/execute.c (struct line): Add mbstate field.
(str_append): Keep mbstate up to date.
(str_append_modified): Likewise, and use towupper/towlower.
(line_init): Initialize mbstate.
(line_copy): Copy mbstate.
(line_append): Copy mbstate.
2003-07-15 Stepan Kasal <kasal@ucw.cz>
Paolo Bonzini <bonzini@fnu.org>
Change the way we treat lines which are not terminated by a newline.
Such lines are printed without the terminating newline (as before)
but as soon as more text is sent to the same output stream, the
missing newline is printed, so that the two lines don't concatenate.
* sed/execute.c (output_file): Is now struct output; users adjusted
to access the fp field, call output_missing_newline before, and
call flush_output afterwards.
(read_file_line): Set line.chomped FALSE each time we encounter a
line without the newline terminator, no matter whether this is the
last input file or not, and no matter whether we are in
POSIXLY_CORRECT mode or not.
(output_missing_newline): New function which prints the suppressed
newline, if necessary.
(flush_output): New function for a common pattern.
(output_line): Use struct output, set its flag accordingly.
(dump_append_queue): Use `ck_fwrite' instead of output_line.
(do_list): Flush the output stream at the end.
(closedown): The code ``if(separate_files) rewind_read_files();''
(read_pattern_space): ... has been moved here.
(process_files): Don't do the default `p' at the end, ...
(execute_program): ... as this function is now responsible for it;
add the code to the end of the function and to the command `q';
the commands `d', `D' and `Q' thus no longer have to forge an empty
line.
(execute_program): Commands `c' and `i' no longer call the
function output_line with chomped==FALSE; instead, they chomp
the text and call the function with chomped==TRUE.
(execute_program): Command `e' no longer uses output_line; it
calls ck_fwrite directly. Commands `e', `L' and `=' flush
the output stream at the end.
* sed/compile.c (special_files): Use `struct output' instead of the
file name.
(get_openfile): ... special files are no longer copied to file_read
or file_write.
(fp_list): Move to sed.h (users adjusted) and rename as...
* sed/sed.h (struct output): ...this. New flag missing_newline
associated to the output stream.
(struct sed_cmd, struct subst): Use `struct output *' instead of mere
`FILE *'; adjust compile.c and execute.c.
* testsuite/noeolw.sed, testsuite/noeolw.good, testsuite/noeolw.1good,
testsuite/noeolw.2good: New tests
2003-07-15 Stepan Kasal <kasal@ucw.cz>
* lib/utils.h, sed/sed.h: #include "basicdefs.h",
don't include it from various *.c files.
* sed/regex.c: Don't include regex.h as it's included via sed.h.
2003-06-11 Paolo Bonzini <bonzini@gnu.org>
* lib/getline.c: Don't realloc with first param = NULL.
2003-05-07 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c: Make treatment of ADDR_IS_NUM_MOD
simpler, and fix bugs in 0~5,+1
* sed/compile.c: Complain about addresses like 0
and 0,3 which are sources of misunderstandings.
Reported by Akim Demaille <akim@epita.fr>
2003-03-25 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0.7 released
* sed/execute.c (append_replacement): Extract from
do_subst
(do_subst): Don't update count when a match was
skipped.
* testsuite/xbxcx3.good, testsuite/xbxcx3.sed,
testsuite/xbxcx3.inp: Regression tests
2003-03-23 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (do_subst): Fix several bugs with
numbered matches
* testsuite/numsub2.good, testsuite/numsub2.inp,
testsuite/numsub2.sed, testsuite/numsub3.good,
testsuite/numsub3.inp, testsuite/numsub3.sed,
testsuite/numsub4.good, testsuite/numsub4.inp,
testsuite/numsub4.sed, testsuite/numsub5.good,
testsuite/numsub5.inp, testsuite/numsub5.sed:
regression tests for the bugs
2003-03-15 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0.6 released
* lib/mkstemp.c: Include sys/file.h if available for the
benefit of Ultrix
2003-03-14 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c: Replace flagT with bool
* sed/execute.c: Replace flagT with bool
* sed/fmt.c: Replace flagT with bool
* sed/sed.c: Replace flagT with bool
* sed/regex.c: Replace flagT with bool
2003-03-13 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (compile_program): Understand parameter
of `v'.
* sed/sed.c (usage): Split help message into multiple
strings
(main): Don't understand -h and -V
2003-03-12 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (match_slash, snarf_char_class): More
multibyte character support
(brlen): New function
* testsuite/classes.good, testsuite/classes.inp,
testsuite/classes.sed: New files
2003-03-10 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (match_slash): Strip the \ in front of
slashes (so that the matcher sees x/ for s/x\///). Don't
match / and [ unless at the start of a character.
2003-02-18 Paolo Bonzini <bonzini@gnu.org>
* sed/regex.c (compile_regex): // matches the last regular
expression even in POSIXLY_CORRECT mode.
* sed/compile.c (normalize_text): Treat multibyte character
sets correctly
(read_text): Don't swallow backslash sequences, run text
through normalize_text
(compile_program): Ditto for y command
* sed/compile.c (normalize_text): Add parameter that says
whether the text will be processed further to remove more
backslash escapes. Callers adjusted
(match_slash): Remove same parameter from here. Callers adjusted.
2003-02-15 Paolo Bonzini <bonzini@gnu.org>
* sed/sed.h: Fix prototype for match_regex, declare re_registers
if REG_PERL
* sed/execute.c (do_subst): Use re_registers
* sed/regex.c (copy_regs): New function
[REG_PERL]: Use re_registers
[!REG_PERL]: Avoid using internal entry points, support pre-glibc
2.3 regex for the sake of --without-included-regex.
2003-01-04 Paolo Bonzini <bonzini@gnu.org>
* sed/sed.h: Move some stuff from here...
* sed/basicdefs.h: ...to here
* lib/utils.c (ck_fopen): Add FAIL parameter
* lib/utils.h: Adjust parameter
* sed/compile.c, sed/execute.c, sed/sed.c: Adjust callers
* sed/basicdefs.h: Add TRUE/FALSE
* sed/compile.c, sed/execute.c, sed/sed.c: Use them
* sed/fmt.c: Do not redefine them
2003-01-02 Paolo Bonzini <bonzini@gnu.org>
* sed/sed.c: Bump copyright year
2002-12-24 Paolo Bonzini <bonzini@gnu.org>
* sed/sed.c: Use bindtextdomain
* sed/basicdefs.h [__EMX__]: Define initialize_main
* lib/getline.c [__EMX__]: Strip trailing CR
* sed/regex.c: Don't use N_ on the lines that define
error messages, some compilers complain.
2002-12-18 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0.5 released
* sed/compile.c: Don't use N_ on the lines that define
error messages, some compilers complain.
2002-12-16 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c: Improvements to some error messages;
`a', `i', `l', `L', `r' accept two addresses except in
POSIXLY_CORRECT mode.
2002-12-14 Paolo Bonzini <bonzini@gnu.org>
* lib/regex_internal.c: Fix problem on non-glibc
systems, from Jakub Jelinek
* lib/regex.c (RE_ENABLE_I18N): Conditionalize on
HAVE_MBRTOWC and HAVE_WCRTOMB.
* lib/getline.c: Fix compilation on non-glibc system
* lib/snprintf.c: Fix compilation on non-glibc system
* lib/basicdefs.h [P_]: Make more portable
2002-12-12 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0.4 released
2002-11-21 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0.3 released
2002-11-19 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0.2 released
2002-11-05 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0.1 released
2002-10-23 Paolo Bonzini <bonzini@gnu.org>
*** Version 4.0 released
2002-10-28 Paolo Bonzini <bonzini@gnu.org>
* lib/utils.c: Don't fail for EBADF in fflush
* src/sed.c: the_program is now a global
2002-10-19 Paolo Bonzini <bonzini@gnu.org>
* src/sed.c: Print GNU sed in --version for GNU sed,
and super-sed for super-sed (thanks to Bruno Haible)
2002-10-17 Paolo Bonzini <bonzini@gnu.org>
*** Version 3.96 released
2002-10-16 Isamu Hasegawa <isamu@yamato.ibm.com>
* src/execute.c (execute_program): Multibyte 'y'
* src/compile.c (compile_program): Likewise
* src/sed.h: Likewise
2002-10-08 Paolo Bonzini <bonzini@gnu.org>
*** Version 3.95 released
2002-07-15 Paolo Bonzini <bonzini@gnu.org>
* src/sed.h: rfile --> fname, wfile --> fp
* src/compile.c (compile_command): Parse 'R' like 'w', use
separate lists for file read and file write
* src/compile.c (get_openfile): New name of get_writefile
* src/compile.c (rewind_read_files): New function
* src/sed.h: Declared here
* src/execute.c (closedown): And called here
* src/execute.c (append_queue): Added 'free' field
* src/execute.c (execute_program): Implement 'R'
2002-06-09 Paolo Bonzini <bonzini@gnu.org>
* src/execute.c (do_subst): Replaced flag was set on every
regexp match, while the first matches should not set it
for s///N.
2002-06-08 Paolo Bonzini <bonzini@gnu.org>
* src/compile.c (compile_file): Open the script in text mode
* lib/utils.c (utils_fp_name): Shorten the output
* lib/utils.c (ck_fread, ck_fwrite, ck_fflush): Clearerr
after printing an error.
* lib/utils.c (ck_fclose): Work on stdout as well if stream == NULL
and flush before closing to check for errors
2002-05-30 Paolo Bonzini <bonzini@gnu.org>
* src/compile.c (compile_program): Implement W
* src/execute.c (execute_program): Likewise
2002-04-23 Paolo Bonzini <bonzini@gnu.org>
* src/sed.c (usage, main): Parse -s
* src/sed.h (separate_files): New variable
* src/execute.c (separate_files): New variable
* src/execute.c (reset_addresses): New function to make range
addresses work separately on each file when using in-place
editing
* src/execute.c (execute_program): The `n' and `N' use test_eof
so that the script restarts at end of file, not at end of input
* src/execute.c (test_dollar_EOF): Make $ work separately
on each file when using -s; renamed to test_eof
2002-02-28 Paolo Bonzini <bonzini@gnu.org>
* src/sed.h (struct sed_cmd): exit_status -> int_arg
* src/compile.c: Likewise
* src/execute.c: Likewise
* src/compile.c (compile_command): Parse `l' like
`q' and `Q'; default for int_arg is -1
* src/execute.c (do_list): New argument, used instead
of lcmd_out_line_len
(execute_program): Interpret int_arg for the `l' command;
return 0 for `q' and `Q' if int_arg is -1
* src/fmt.c: New file, looted from GNU textutils
* src/compile.c: Parse `L'
* src/execute.c: Execute `L'
2002-02-14 Paolo Bonzini <bonzini@gnu.org>
* src/execute.c (str_append_modified): Fixed a stupid
bug (stop condition was *start == *end, meant to be
start == end)
2002-02-05 Paolo Bonzini <bonzini@gnu.org>
* lib/utils.c: Added directory parameter to
temp_file_template
* lib/utils.h: Adjusted
* src/execute.c: Adjusted
2002-01-29 Paolo Bonzini <bonzini@gnu.org>
* src/compile.c (mark_subst_opts): Signal an error if
there are multiple g or p options
* src/compile.c (compile_program): Raise appropriate
error if second string in y command is longer than
first (used to be "excess junk after command")
2001-12-31 Paolo Bonzini <bonzini@gnu.org>
* lib/getline.c: Strip the terminating \r under Windows
or MS-DOS.
* testsuite/xemacs.sed, testsuite/xemacs.inp,
testsuite/xemacs.good: Submitted by John Fremlin
(john@fremlin.de)
2001-12-27 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (do_subst): Flags in optimized s/^xx/
commands were discarded (see the change below)
2001-12-19 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (resize_line): Limit inactive space to two
thirds of a buffer
* sed/execute.c (line_init): Initialize buf->active
* sed/execute.c (str_append, str_append_modified, line_copy,
do_list, do_subst, execute_program, process_files): Operate
on active space
* sed/execute.c (do_subst): Optimize s/^xx// by making a part
of the buffer inactive and s/xx$// by truncating it.
* sed/execute.c (execute_program): Optimize D by making a part
of the buffer inactive
* testsuite/uniq.sed, testsuite/uniq.inp, testsuite/uniq.good:
added to test P and D commands.
* testsuite/fasts.sed, testsuite/fasts.inp, testsuite/fasts.good:
added to test the new optimization done on the `s' command.
2001-12-17 Paolo Bonzini <bonzini@gnu.org>
* testsuite/dc.inp: Also compute Easter of 2002 :-)
* sed/execute.c [!HAVE_FCHMOD]: Don't chmod the output file
if working in-place
2001-11-12 Paolo Bonzini <bonzini@gnu.org>
* sed/sed.h (struct sed_cmd): a1 is a pointer too
* sed/compile.c: Likewise
* sed/execute.c: Likewise
* sed/compile.c: Use obstacks
* sed/execute.c: Likewise
2001-11-09 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (mark_subst_opts): Parse option `e',
preserve two occurrences of the `e' and `p' options.
* sed/execute.c (do_subst) [HAVE_POPEN]: Interpret option
`e' (evaluate, like Perl's but uses Bourne shell).
* sed/sed.h (struct subst): Add an `eval' flag.
* sed/compile.c (compile_program): Compile command `e'
like `c'.
* sed/execute.c (execute_program): Execute command `e'.
2001-09-25 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (get_writefile) [!POSIXLY_CORRECT]:
support /dev/stdout
* sed/execute.c (open_next_file, closedown): Support
in-place editing
* sed/execute.c (backup_file_name): New function to
support in-place editing
* sed/main.c (usage, main): Parse -i.
* sed/utils.c: Moved to lib directory
* lib/utils.c (temp_file_template): New function.
* sed/utils.h: Declared temp_file_template.
2001-09-05 Paolo Bonzini <bonzini@gnu.org>
* sed/execute.c (do_subst): `baaac', if passed through
s/a*/x/g, gave `xbxxcx' rather than `xbxcx' (because an
empty string matched before the `c'. Fixed.
* sed/execute.c: Removed mmap support, I/O is done using
getline (slower but more bug-proof).
* sed/utils.c: Likewise.
* lib/getline.c: New file
2001-03-22 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (normalize_text) [POSIXLY_CORRECT]: Enable
escapes in modes other than BRE.
2001-03-21 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (normalize_text): Support \XXX in Perl mode,
\oXXX in non-Perl mode.
2001-03-18 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (compile_program): Fixed missing break when
compiling 'q' and 'Q'.
* sed/compile.c (check_final_program): Removed now spurious
call to compile_regex
* sed/regex.c (compile_regex): Don't track the last compiled
regex
* sed/regex.c (execute_regex): Track here the last compiled
regex
2001-03-02 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (setup_replacement): Support \[lLuUE] like
Perl and vi.
* sed/compile.c (new_replacement): Accept new parameter
to support \[lLUuE].
* sed/sed.h (enum replacement_types): New declaration
* sed/execute.c (do_subst): Use new function str_append_modified
to apply the changes required via \[lLUuE].
* sed/execute.c (str_append_modified): New function
2001-03-02 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (setup_replacement): Count the number of backreferences
that the RHS needs
* sed/regex.c (compile_regex): Check if there is a sufficient number
of backreferences (new argument needed_sub replaces nosub)
* sed/compile.c (compile_address, compile_program,
check_final_program): Callers adjusted
2001-02-08 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (compile_program): Added `Q' (quit without output)
* sed/execute.c (execute_program): Ditto
* sed/compile.c (compile_program): Fill in exit_status for `q' and `Q'
* sed/execute.c (execute_program): Return -1 for `go on', 0..255
to set the exit status
* sed/execute.c (process_files): Interpret new convention for
execute_program, return sed's exit code
* sed/sed.c (main): Return process_files's exit code
* sed/sed.h (struct sed_cmd): Declare exit_status
2001-01-07 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (compile_program): Added `T' (branch if failed)
* sed/execute.c (shrink_program, execute_program): Ditto
2001-01-04 Paolo Bonzini <bonzini@gnu.org>
* testsuite/Makefile.am: Use automake's implementation
of `make check'. Removed the test targets
* testsuite/Makefile.tests: Moved the test targets here
(new file).
* testsuite/runtest: New file
* testsuite/Makefile.tests: `khadafy' test uses EREs.
* testsuite/spencer.inp: Removed the ^* test
* testsuite/spencer.sh: Don't rely on awk; more comments too
2001-01-03 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c(snarf_char_class) [REG_PERL]: Don't parse
`\n' specially
* sed/compile.c(match_slash) [REG_PERL]: Ditto
* sed/compile.c(read_text) [REG_PERL]: Support [xX] modifiers
* sed/compile.c(mark_subst_opts) [REG_PERL]: Ditto
2000-12-21 Paolo Bonzini <bonzini@gnu.org>
* lib/snprintf.c [BOOTSTRAP]: Don't include stdio.h
* lib/strerror.c [BOOTSTRAP]: Don't include stdio.h
* sed/execute.c [!HAVE_ISATTY]: Don't buffer stdin
2000-12-11 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c(mark_subst_opts): Support [mMsS] flags
* sed/compile.c(read_text): Support [MS] flags for
addresses
* sed/regex.c(compile_regex): Support arbitrary flags for
regncomp.
* sed/regex.c(compile_regex) [REG_PERL]: Don't call
normalize_text.
2000-12-08 Paolo Bonzini <bonzini@gnu.org>
* basicdefs.h: Moved here from the `sed' subdirectory.
* configure.in: Removed crap to pick a regex engine.
Added snprintf to the AC_REPLACE_FUNCS call.
* lib/snprintf.c: New file.
* sed/regex.c(compile_regex): Use regncomp
* sed/regex.c(match_regex): Use regexec2
* sed/compile.c(compile_program): Implemented the `v' command.
* sed/sed.c(main): Implemented the `r' and `R' options
* sed/sed.h: Replaced use_extended_syntax_t with
extended_regexp_flags to support Perl regular expressions.
* sed/execute.c(open_next_file): Don't mmap stdin (because
we cannot seek into it, so a redirected stdin's contents
would not be "eaten" by sed)
Mon Aug 30 23:40:08 PDT 1999 Ken Pizzini <ken@gnu.org>
*** Version 3.02.80 released
* sed/execute.c(do_subst): lib/regex.c(re_search_2) seems to
want one extra backreference register; humor it.
* sed/regex.c(compile_regex): work around some odd assumptions
that lib/regex.c(re_compile_pattern) makes about our desired
RE syntax.
* configure.in: tweaked version to 3.02.80; added new entries
to the ALL_LINGUAS definition.
* doc/sed.1, doc/sed.texi, BUGS: explicitly request the output
of sed --version in bug-reporting instructions.
* doc/sed.texi: the old "informal seders list" is dead; document
the new sed-users mailing list instead (under Other Resources).
Thu Aug 19 23:27:54 PDT 1999 Ken Pizzini <ken@gnu.org>
* sed/sed.h: Add explicit #include of "regex-sed.h" (rather
than relying on parent file doing so); change the "cmd_regex"
member of sed_cmd: make it a pointer (instead of a struct),
and change its name to cmd_subst; add prototypes for newly
exported functions bad_prog(), normalize_text(), compile_regex(),
match_regex(), and release_regex(); drop rx_testing variable.
* sed/compile.c: move the compile_regex() function to regex.c;
export bad_prog() and normalize_text() functions; eliminate the
rx_testing debris; rename the NOLEAKS symbol to more descriptive
DEBUG_LEAKS; make cmd_regex to cmd_subst fixes (see above);
make use of newly abstracted release_regex() function.
* sed/execute.c: abstract out the regex matching to
regex.c:match_regex(); NOLEAKS to DEBUG_LEAKS change;
cmd_regex to cmd_subst structure member name change.
* sed/execute.c(do_subst): use re_registers/regoff_t instead of
regmatch_t to hold the backreference registers, make "offset"
always be relative to the beginning of the string (rather than
a delta from "start"), defer some matching bookkeeping (e.g.,
not_bol_p) to match_regex().
* sed/sed.c(main): loose rx_testing variable; NOLEAKS
(aka DEBUG_LEAKS) code attempting to release
_nl_current_default_domain is problematic, so omit it.
* sed/regex.c: new file --- abstracts out the interface to the
regex engine so that less conditional code is required in
compile.c and execute.c, and so as to make a change of engine
easier; implements compile_regex() (which looks an awful lot
like the one that used to live in compile.c), match_regex(),
and (if DEBUG_LEAKS is set) release_regex().
Sun Apr 18 04:40:46 PDT 1999 Ken Pizzini <ken@gnu.org>
* sed/sed.c(main): conditionalize calls to setlocale() and
textdomain() to only occur if their support is needed/wanted.
Sun Apr 18 03:01:46 PDT 1999 Ken Pizzini <ken@gnu.org>
* bootstrap.sh: "foo || bar && baz" was not grouping like I
expected ("foo || (bar && baz)") under at least one shell,
so change the test for a pre-existing config.h file to an
if statement.
* bootstrap.sh: added -DUSE_REGEX_GNU_H option to the
compiler invocation, to ensure that we get a usable
regex library included.
Sun Apr 18 02:59:42 PDT 1999 Ken Pizzini <ken@gnu.org>
* sed/sed.h, sed/utils.c: conditionalized inclusion of <libintl.h>
to occur only if ENABLE_NLS is defined.
Sun Apr 18 01:48:45 PDT 1999 Ken Pizzini <ken@gnu.org>
* sed/compile.c(xofa,normalize_text,convert_number): change
name of xofa() function to convert_number(); change semantics
to do all of the work of the text->number conversion.
* sed/compile.c(normalize_text): add new \dDDD decimal
and \oOOO octal escapes.
Sun Mar 28 21:05:07 PST 1999 Ken Pizzini <ken@gnu.org>
* sed/sed.c(main): if NOLEAKS is set, free up a word that
the call to textdomain() allocated.
* sed/execute.c(read_file_line): plug up (minor) memory leak:
if buffer.alloc==0 we may have malloc()'d 1 byte anyway,
so be sure to FREE(buffer.text) before calling line_init();
Fri Mar 26 16:52:10 PST 1999 Ken Pizzini <ken@gnu.org>
* sed/compile.c(match_slash): somewhere between 3.02
and 3.02a we lost the ability to use a newline as
the s/// delimiter; restore this ability.
* sed/compile.c(compile_regex): forget about trying
to cache the compiled form of the last RE --- it
causes more problems than its worth. We now only
cache the source form.
* testsuite/help.good: update to reflect output containing
new options.
Sun Dec 6 00:51:23 PST 1998 Ken Pizzini <ken@gnu.org>
* sed/utils.c(ck_fwrite): fix i18n bug of using a printf
fragment of "item%s" to handle plural text.
Mon Nov 23 11:03:40 PST 1998 Ken Pizzini <ken@gnu.org>
* doc/sed.1, doc/sed.texi: ran ispell over these
files to catch the more obvious typos...
Sun Nov 1 00:09:07 PST 1998 Ken Pizzini <ken@gnu.org>
* sed/execute.c(do_list): make a `lcmd_out_line_len'
(--line-length) of zero mean "infinite length",
i.e., "never wrap".
Sat Oct 31 23:06:50 PST 1998 Ken Pizzini <ken@gnu.org>
* execute.c(match_an_address_p,process_files),
compile.c(compile_program): back out the "zero-address"
changes of 1998-09-27. It was a neat idea, but there are
too many dark corners which don't work well. The
special code for handling line ranges starting at
address zero (from 1998-08-31) are still there though:
this seems to work fine with no surprises.
Sat Oct 31 22:18:59 PST 1998 Ken Pizzini <ken@gnu.org>
* sed/sed.c, sed/sed.h, sed/execute.c: added new
`lcmd_out_line_len' variable. (Idea suggested by
Carlos J. G. Duarte <l38076@alfa.ist.utl.pt>.)
Also added ATOI macro (which uses strtoul() if available,
with fall-back to atoi()).
* sed/sed.c(main): attempt to use COLS environment variable
to set a reasonable `lcmd_out_line_len'; added -l/--line-length
command-line options to set the new `lcmd_out_line_len' flag.
* sed/sed.c(usage): documented new -l/--line-length options.
* sed/execute.c(do_list): use `lcmd_out_line_len' variable
instead of `LCMD_OUT_LINE_LEN'.
* sed/execute.c: deleted now obsolete LCMD_OUT_LINE_LEN define.
* configure.in: added strtoul to the AC_CHECK_FUNCS call.
Sat Oct 31 21:37:17 PST 1998 Ken Pizzini <ken@gnu.org>
* sed/sed.c, sed/sed.h, sed/execute.c: added new `force_unbuffered'
flag. (Idea suggested by Frank Strauss <strauss@escape.de>.)
* sed/sed.c(main): added -u/--unbuffered command-line options
to set the new `force_unbuffered' flag.
* sed/sed.c(usage): documented new -u/--unbuffered options.
* sed/execute.c: changed the name of the `is_tty' flag in struct
input to a more generic `no_buffering'; also removed HAVE_ISATTY
conditional on this member.
* sed/execute.c(slow_getline): removed HAVE_ISATTY conditonal
compilation of this function.
* sed/execute.c(output_line): if force_unbuffered is set,
then force a fflush() even if writing to stdout.
* sed/execute.c(open_next_file): added handling of the
new `force_unbuffered' flag so that slow_getline()
will always be used for input.
* sed/execute.c(read_file_line): changed the (conditionally
compiled) test of `input->is_tty' to (unconditionally)
use the new spelling `input->no_buffering'.
Thu Oct 15 12:08:09 PDT 1998 Ken Pizzini <ken@gnu.org>
* configure.in: deleted AC_ARG_PROGRAM call; this is already
done for us by AM_INIT_AUTOMAKE, and we were winding up
with a doubled-transform.
Sun Sep 27 01:42:42 PDT 1998 Ken Pizzini <ken@gnu.org>
* compile.c(compile_program): remove special-case code for matching
address range with a `0' beginning.
* compile.c(compile_address): change default addr_number to
be a pragmatically impossible countT value, instead of zero.
* execute.c: spell macro REGNEXEC() unconditionally instead of
playing with conditional definition of regnexec() macro.
* execute.c(match_an_address_p): added third argument (and changed
callers in match_address_p). Added special code to ignore
non-numeric matches when processing "line zero".
* execute.c(process_files): added a "line zero" pass through the
commands script.
Sun Sep 27 00:20:53 PDT 1998 Ken Pizzini <ken@gnu.org>
* compile.c(xofa,normalize_text): new functions.
* compile.c(compile_regex): cache last_compiled_re (with its
associated flags); add POSIXLY_CORRECT behavior for empty RE.
Make use of the new normalize_text() function.
* compile.c(setup_replacement): Make use of the new normalize_text()
function.
Sat Sep 26 22:59:13 PDT 1998 Ken Pizzini <ken@gnu.org>
* lib/regex-gnu.h: added missing prototype for regncomp().
Mon Sep 14 20:47:23 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/sed.c(main): use EXIT_SUCCESS instead of 0, in case
we are built on a system (such as VMS) where EXIT_SUCCESS
is distinct from 0.
Wed Sep 9 22:17:28 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/Makefile.am: added -I../intl the INCLUDES line; if we are
building in a directory outside the source tree and the system
we are building on does not have a <libintl.h> header, then
the build was failing, because libintl.h is a build-time
constructed source file.
* configure.in: tweaked version to be 3.02b.
Wed Sep 9 19:28:14 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.02a released
* sed/compile.c(mark_subst_opts,read_label,compile_program):
wherever we accept a ; as a command terminator, also allow a } or
a # to appear. (This allows for less cluttered-looking scripts,
such as: sed '/foo/{x;G}' (instead of: sed '/foo/{x;G;}').)
Wed Sep 9 18:17:07 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c(compile_regex): use regncomp() instead
of regcomp(), so that a script with NULs in its REs
will work in the expected manner.
* sed/compile.c(ADDNUL,REGNCOMP): added support macros
for above.
* lib/regex.c(regncomp,regcomp): added regncomp() and
made regcomp() a simple wrapper function.
Mon Aug 31 21:48:30 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/sed.c(compile_program): if the first address of
a range is the number 0 (or a 0~N sequence), start
out in the "a1_matched" state. This allows one
to match an initial chunk of a file without undue
convolutions for handling the case where the match
for the end of the sequence happens to be the first
line.
Sun Aug 16 03:34:25 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c(snarf_char_class,match_slash): simplify
handling of "premature newline" error. Also, get the
line number right in the error message if we encounter
a "premature newline" during char-class snarfing.
Sun Aug 16 02:59:20 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c: added N_() markers and corresponding gettext()
(er, _()) calls.
* Merged in i18n contribution from Erick Branderhorst
<Erick.Branderhorst@asml.nl>. His ChangeLog entry
for the changes I've incorporated so far:
1998-07-24 Erick Branderhorst <Erick.Branderhorst@asml.nl>
* configure.in (ALL_LINGUAS, AM_GNU_GETTEXT): nl
* sed/{sed.h,utils.c}: #include <libintl.h> #define _(String)
gettext (String)
* sed/sed.c: #include <locale.h>
* po/POTFILES.in: sed/{compile,execute,sed,utils}.c
* run gettextize -f
* acconfig.h: #undef LOCALEDIR ENABLE_NLS HAVE_CATGETS
HAVE_GETTEXT HAVE_LC_MESSAGES HAVE_STPCPY
Fri Aug 14 13:52:57 PDT 1998 Ken Pizzini <ken@gnu.org>
* Merged code from 3.02 with a branched development
tree from late May; the following (out-of-order)
changelog entry is from the branched tree.
Sat May 30 12:23:16 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c, sed/execute.c: added (conditional on NOLEAKS macro)
code to free all dynamically allocated memory.
* sed/sed.c, sed/compile.c, sed/execute.c: much shuffling
of code --- ordered functions such that no forward
declarations are necessary, and placed all static prototypes
immediately before the actual function definition.
This accomplished two things: first, I find the new ordering
a more natural way to read the code than the previous
ordering, and second, the new ordering give the compiler
a better opportunity to discover inlining possibilities.
(The odd "prototype declaration+old-style definition"
style is used because I feel it is the least ugly way
of supporting K&R1 C while still getting the benefit of
prototypes when they are available.)
* sed/basicdefs.h: added MEMCPY() macro to hide the VCAST()s
that ought to be used with memcpy().
* sed/execute.c: Change calls to memcpy() to go through the
new MEMCPY() macro. Various prototypes: elide variable name
if it does not add any human-useful documentary information
to the bare type.
* sed/sed.c(main): Updated calls to compile_string() to add third
(length) argument. Changed call to obsolete close_all_files()
to a call to the new finish_program().
* sed/sed.c(map_file): Attempt to clean-up how "size" gets
cast and tested; remove spurious S_ISREG test (just let
mmap() fail if it doesn't support the underlying file type).
* sed/sed.c: Deleted old RX library stub declarations.
* sed/sed.c(map_file,unmap_file): added VCAST()s to the
mmap()/munmap() calls.
* sed/utils.c(ck_fclose): added support for ANSI C
functionality where passing a NULL argument means
to fclose() _all_ open streams. (Well, almost.
Only closes streams which were previously ck_fopen()ed,
as I don't care to figure out how to autoconf-detect
whether fclose(NULL) is properly supported on a given
platform.)
* sed/sed.h: Renamed `struct text_buf' member `text_len'
to `text_length'. Abstracted out `enum addr_types'
from `struct addr'; added new enum types num2,step,step_mod;
renamed mod to num_mod. De-unionized the regex,number,
{modulo-offset/step} components of `struct addr', in
anticipation of new features. Changed type of `a2' member
of `struct sed_cmd': now a pointer to save space.
Abstracted out `struct replacement' from `struct subst'.
Cleaned up declaration of `x' union of `struct addr'.
Fixed prototype for compile_string(). Replaced prototype
for old close_all_files() with one for new finish_program().
* sed/sed.h, sed/compile.c, sed/execute.c: changed to
simplify the data structures used for branches and
command blocks: simplified `struct vector'; made
`struct label' local to compile.c; `struct sed_cmd'
was modified to support a simpler design for branches
and blocks.
* sed/execute.c: Conditionally added ADDNUL() macro so that
the function call overhead is only incurred if nul_append()
_must_ be called. Made some commentary edits, including
typo fixes.
* sed/execute.c(resize_line): changed semantics of "len" argument
from "additional length" to "target length"; made
INITIAL_BUFFER_SIZE a minimum allocation length.
* sed/execute.c(str_append): adjusted to new resize_line()
semantics.
* sed/execute.c(line_copy): use FREE()+MALLOC() instead of
REALLOC() to avoid unnecessary copying of old text; add the
"try doubling first" allocation heuristic (just like
resize_line() does).
* sed/execute.c(line_exchange): new function.
* sed/execute.c(nul_append): make whole function (not just its
body) conditional on HAVE_REGNEXEC macro; adjust to new
resize_line() semantics.
* sed/execute.c(read_mem_line): use str_append() instead if
custom in-line code; compensate for new default of
"line.chomped = 0" in read_pattern_space() by setting
"line.chomped = 1" where appropriate.
* sed/execute.c(read_file_line): use different trigger to
determine that "buffer" is uninitialized, and do a full
initialization if required; use str_append() instead of custom
in-line code in two places; compensate for new default of
"line.chomped = 0" in read_pattern_space() by setting
"line.chomped = 1" where appropriate.
* sed/execute.c(output_line): don't bother calling ck_fwrite()
if length==0.
* sed/execute.c(release_append_queue): new function.
* sed/execute.c(dump_append_queue): use release_append_queue()
instead of in-line equivalent.
* sed/execute.c(read_pattern_space): conditionalize call to
dump_append_queue() for alleged performance reasons; changed
default "line.chomped" value to more common "1", and added an
assignment of "0" where this made a difference.
* sed/execute.c(match_an_address_p): deleted "is_addr2_p"
argument; reorder cases to match order in enum declaration; add
cases for new "addr_is_num2", "addr_is_step", and
"addr_is_step_mod" address types; alter nul_append() call to be
through ADDNUL() macro; fix to new struct member and enum
spellings in (formerly addr_is_mod); addr_is_num_mod case.
* sed/execute.c(match_address_p): remove oblsolete third argument
to calls to match_address_p(); alter references to sed_cmd
member a2 to reflect new pointer status; add new support for
a2->addr_type addr_is_step and addr_is_step_mod cases.
* sed/execute.c(do_subst): add NOLEAKS support logic; use
ADDNUL() wrapper to nul_append(); simplify replacement
expansion by using the new "struct replacement" data structure;
use line_exchange() function instead of custom in-line code.
* sed/execute.c(process_files): added NOLEAKS code.
* sed/execute.c(execute_program): updated implementations
of the `{', `}', `:', `b', and `t' commands; modified
`c' command gratuituosly; fixed potential memory
overrun in `D' command. Simplified how nonstandard
`loop increments' work. Use line_exchange() instead of
custom in-line code in 'x' case.
* sed/execute.c[EXPERIMENTAL_DASH_N_OPTIMIZATION conditional
code]: various modifications intended to keep this
code in sync with the new changes, but the code still
retains its previous bugs.
* sed/compile.c: use "exit(EXIT_FAILURE) instead of "exit(1)",
just in case we get compiled under VMS.
* sed/compile.c: Change type of prog_info.base to decrease needs
for casting; then elimiated the casts in question ;-).
* sed/compile.c: Added struct sed_label (moved from sed.h, then
modified).
* sed/compile.c: Removed "readit_p" flag from struct fp_list.
* sed/compile.c: Added module-global "blocks" variable.
* sed/compile.c: Extracted more error-message constant strings
to named variables.
* sed/compile.c(check_final_program): updated to
reflect new data structures and use new fucntions.
Added call to compile_regex() to release unneeded
memory.
* sed/compile.c: deleted obsolete new_vector() function;
abstracted new read_label() function; abstracted new
release_label() function; added new `blocks' module-static
variable.
* sed/compile.c(compile_program): updated implementations
of the `{', `}', `:', `b', and `t' commands; modified
initialization from NULL vector.
* sed/compile.c(compile_regex): added mechanism to
release memory consumed by the cached `last' RE.
* sed/compile.c(setup_jump,setup_label): updated
name (from setup_jump to setup_label) and prototype;
changed body to reflect data structure changes.
* sed/compile.c: Add OPEN_BRACE and CLOSE_BRACE macros for better
"vi" editing behavior.
* sed/compile.c(compile_filename,read_filename,get_writefile):
Replaced function compile_filename() with more orthogonal functions
read_filename(), get_writefile().
* sed/compile.c(compile_regex): Added ability to free the remembered
"last RE" in compile_regex (for benifit of "NOLEAKS" code).
* Made adjustments dictated by the change to struct sed_cmd which made
the a2 member a pointer-to-addr instead of an addr.
* sed/compile.c(setup_jump,read_label,setup_label,release_label):
Added functions read_label(), setup_label(), release_label(); deleted
function setup_jump().
* sed/compile.c(new_replacement,setup_replacement,release_replacement):
new functions.
* sed/compile.c: Adjusted to new spelling of text_buf member
("text_length" instead of "text_len").
* sed/compile.c(new_vector): deleted function. (Due to new handling
of blocks, only one instance remained, and that one was just as
clear in-lined.)
* sed/compile.c(compile_string): Added third argument; it now
takes a counted string instead of a NUL-terminated string.
* sed/compile.c(compile_file): added variable "map_base" to
compensate for new type of prog_info.base.
* sed/compile.c(check_final_program): reflect new style of
handling blocks and struct sed_label.
* sed/compile.c(close_all_files,finish_program): replaced function
close_all_files() with more generic finish_program().
* sed/compile.c(read_text): added new feature: if first non-blank
character after the {a,i,c} command character is not "\", then
use the trailing text on that line as the (first) line of text.
Also added code conditional on NO_INPUT_INDENT to support the
"feature" of stripping leading blanks from each input line; I
do not read POSIX as permitting this behavior, nor do I think
it is a good idea, so it is disabled by default, but some have
argued that this blank-stripping is the "correct" behavior, so
I offer them the option of building their sed that way.
* sed/compile.c(compile_address): added xxx,+n and xxx,~n addressing;
simplified code.
* sed/compile.c(compile_program): added BAD_PLUS error detection;
adjusted to new cur_cmd->a2 pointer status; added addr_is_num2
detection; deleted pointless "a2->addr_number < a1.addr_number"
check (addr_is_num2 semantics handle this just fine); updated
code for '{', '}', ':', 'b', and 't' to reflect new design
of branch handling, including making use of new functions
related to the new design); added support for feature already
mentioned in read_text() where {a,i,c} commands are able to have
their text start on the same line as the command; changed some
error messages (hopefully for the better); localized variables
specific to individual commands (particularly 's' and 'y');
made use of new setup_replacement() function in 's' command.
Mon Aug 10 19:58:49 PDT 1998 Ken Pizzini <ken@gnu.org>
* doc/sed.texi, doc/sed.1: sedtut10.txt is apparently dead.
Deleted references to it and added a pointer to
http://seders.icheme.org/tutorials/. (Pointed out by
Joerg Heitkoetter <joerg@de.uu.net>.)
Sat Aug 8 18:11:57 PDT 1998 Ken Pizzini <ken@gnu.org>
* djgpp/config.btm: per request by Michel de Ruiter
<mdruiter@cs.vu.nl>, added "%1" to "%9" parameters.
Mon Aug 3 11:44:55 PDT 1998 Ken Pizzini <ken@gnu.org>
* doc/sed.texi: fix a couple of typos. (Submitted by
Alan Modra <alan@spri.levels.unisa.edu.au>.)
Sat Aug 01 17:49:06 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.02 released
* configure.in: Because of code change in 3.01a, bump the
minor revision number for the release (now 3.02).
Sun Jul 26 16:07:55 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01a released
* sed/compile.c(snarf_char_class): the POSIX char-class
recognition loop forgot to update its concept of "prev"
as the loop progressed.
* testsuite/Makefile.am: The dependency of version.good
on [testsuite/]Makefile introduced in the previous
release was botched -- it referred to "Makefile"
as "$(srcdir)/Makefile, which of course doesn't work
if you aren't building in the source tree.
* djgpp/Makefile.am: add forgotten "config.btm" EXTRA_DIST
member.
* configure.in: update version.
Tue Jul 21 06:04:42 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01 released
* configure.in: mark as release version!
* Makefile.am: add BUGS and THANKS to the EXTRA_DIST target.
* testsuite/Makefile.am: add dependency of version.good
on [testsuite/]Makefile.
Mon Jul 20 12:38:10 PDT 1998 Ken Pizzini <ken@gnu.org>
* djgpp/config.btm: New file to support the 4DOS alternative
to command.com. (Sumitted by Eli Zaretskii on behalf of
an anonymous 4DOS user.)
Fri Jul 17 00:36:34 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta18 released
* djgpp/config.sed: my "tweak" in beta17 was too
hastily considered. Back it out.
* configure.in: update to beta18.
Wed Jul 15 01:02:15 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta17 released
* djgpp/config.sed: tweak/simplify s,,, commands at end.
* configure.in: update to beta17.
1998-07-14 Eli Zaretskii <eliz@is.elta.co.il>
* djgpp/config.sed: Edit all the occurences of = in the context of
--option=value, including in the help messages, into
--option:value, but leave DOS-style d:/foo/bar file names intact.
* djgpp/config.bat: Use --srcdir:foo instead of --srcdir=foo.
* testsuite/Makefile.am (help, version): Remove temporary files
explicitly, don't use shell wildcards, so it works under DOS 8+3
limits.
Thu Jul 9 13:06:00 PDT 1998 16:51:43 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta16 released
* djgpp/config.sed: tweak the configure script to use :
instead of = for --with-foo=bar option parsing, to
work around problems with how command.com handles =s.
Wed Jul 8 16:51:43 PDT 1998 Ken Pizzini <ken@gnu.org>
* djgpp/config.bat: correct inappropriate behavior that I
introduced in the beta13 changes (if first argument is
a directory, it needs to be handled as the --srcdir).
* testsuite/version.gin, testsuite/version.good, testsuite/Makefile.am:
Add target to automake to automatically update version.good
from (new file) version.gin, instead of hand-editing the version
number each release.
* testsuite/Makefile.am: miscellaneous gratuitious tweakage --
mainly adding $(RM) commands just because I didn't like
leaving the tmp* files from successful runs laying about.
Also some editorial comments.
* configure.in: update to beta16. Added and commented out
experiment with AC_OUTPUT() for testsuite/version.good.
Added code to properly handle bare (without =xxx)
"--with-regex" option.
Sun Jul 5 21:02:16 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta15 released
* sed/utils.c(ck_fflush), sed/utils.h, sed/execute.c(output_line):
add and use new ck_fflush() function.
Sun Jul 5 15:23:47 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c(bad_prog): add more detail to error
messages about -e strings.
Sun Jul 5 14:29:45 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c(mark_subst_opts), sed/execute.c(do_subst):
Define better semantics for interaction of the `g' flag
with a numeric flag to the s/// command. It used to
be that the `g' command siezed control; now the first
(number-1) matches are skipped and then `g' gets control
after that. (It is not clear whether this is a feature
sneaking in during late beta, or a bug fix; the changes
involved were trivial, so I decided to treat it as a bug
fix.)
* configure.in, testsuite/version.good: update to beta15.
Sat Jul 4 09:54:45 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta14 released
* sed/basicdefs.h, sed/compile.c, sed/execute.c:
per report by "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>,
copied the ISXXX macros from lib/regex.c so that
silly machines which require isascii() to be true
before the other isXXX() macros are valid will
still work.
* configure.in, testsuite/version.good: update to beta14.
Thu Jul 2 23:46:13 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta13 released
* configure.in, acconfig.h: set USE_REGEX_GNU_H symbol if we
are going to be using lib/regex.c.
* lib/Makefile.am, lib/regex.h, lib/regex-gnu.h, lib/regex.c:
rename lib/regex.h to lib/regex-gnu.h, so that those who
choose to use a different regex implementation will not
pick-up lib/regex.h when doing "#include <regex.h>".
* sed/regex-sed.h, sed/Makefile.am, sed/compile.c, sed/execute.c,
sed/sed.c: create sed/regex-sed.h which acts as a switch
to choose either lib/regex.h or the user-supplied <regex.h>,
depending on the value passed to configure's --with-regex=
option.
Thu Jul 2 17:22:31 PDT 1998 Ken Pizzini <ken@gnu.org>
* configure.in: if an alternative --with-regex= is given,
do an AC_CHECK_FUNCS(regnexec regexec) to ensure that
at least one of these functions is available. Also,
parallel changes for the default case.
* sed/execute.c, acconfig.h: retire use of the WITH_REGNEXEC
test macro in favor of HAVE_REGNEXEC test macro created
by above change.
* djgpp/config.bat: Play games to handle "install-sh",
DOS filename restrictions, GNU makefile default rules,
and getting a correct run of "configure" (contributed
by Eli Zaretskii <eliz@is.elta.co.il>).
* djgpp/Makefile.am, testsuite/Makefile.am, testsuite/Makefile.in,
Makefile.am, configure.in: Various automake targets
(such as distcheck) failed with old configuration.
The simplest solution was to just add these .am
files. (The testsuite/Makefile.in was just renamed to
testsuite/Makefile.am, then various redundant defines and
targets were deleted.) (Reported by Erick Branderhorst
<Erick.Branderhorst@asml.nl>.)
* testsuite/dc.good, testsuite/dc.inp: per suggestion from
Greg Ubben <gsu@romulus.ncsc.mil>, use base 16 output to
exercise even more of the dc.sed script.
* configure.in, testsuite/version.good: update to beta13.
Sun Jun 28 16:21:02 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta12 released
* doc/sed.texi: Avoid mixing @code and @samp markups together:
they look ugly in Info. Use @url and @email instead of @example.
Add indexes. (Basis of changes contributed by Eli Zaretskii.)
* djgpp/*, Makefile.am: add support for the DJGPP compiler,
contributed by Eli Zaretskii <eliz@is.elta.co.il>.
* dc.sed, testsuite/Makefile.in, testsuite/dc.inp, testsuite/dc.good:
added this remarkable script, written and contributed
by Greg Ubben <gsu@romulus.ncsc.mil>, both as a work of
art for general admiration, and also for use in regression
testing.
* configure.in, lib/Makefile.am: add --with-regex=regexlib
option, which overrides the use of lib/regex.c.
* configure.in, testsuite/version.good: update to beta12.
Fri Jun 12 16:41:48 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta11 released
* sed/compile.c: add module-static variables first_script
(for #n change below) and pending_text (for a/c/i change
below).
* sed/compile.c(compile_file), sed/compile.c(compile_program):
Instead of having #n trigger the -n option in *any file*,
have #n trigger the -n option only if they are the first
two bytes of the first script or script-file.
* sed/compile.c(compile_string), sed/compile.c(compile_file):
clear the first_script variable at end of these functions.
* sed/sed.h: tease out the struct text_buf declaration from
struct sed_cmd, so that a pointer to such can be passed
to new sed/compile.c(read_text) function.
* sed/compile.c(compile_program), sed/compile.c(read_text):
Tease out handling of text to a/c/i commands to new
read_text() function. Handle (via aid of pending_text
variable) texts which span more than one script/script-file
option. In particular, restore the ability to have this
work: sed -e '1i\' -e 'foo'
* sed/compile.c(check_final_program): close off any dangling
pending_text allocation.
Thu Jun 11 11:17:46 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/execute.c(do_subst): fixed two bugs: s/ */X/g was failing
to match the final empty string after the end of the pattern
space; and /^foo$/s/o/x/3p was printing, despite the failure
to do a substition.
Fri Jun 5 04:40:24 PDT 1998 Ken Pizzini <ken@gnu.org>
* configure.in: change the AC_ARG_WITH(regnexec, ...)
to be the more appropriate AC_ARG_ENABLE(regnexec, ...).
* configure.in, testsuite/version.good: update to beta11.
Fri Jun 5 00:54:25 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta10 released
* sed/execute.c: forgot to P_() the prototype and
old-style the declaration for bootstrap_memchr()!
Thu Jun 4 18:42:30 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c(snarf_char_class): added code to
recognize \n or \<newline> sequence within a
char-class as the newline character.
Tue Jun 2 11:56:02 PDT 1998 Ken Pizzini <ken@gnu.org>
* configure.in: added check for <sys/types.h> and
a AC_ARG_WITH(regnexec,...) check, to simplify use
of other regex libraries which have regexec() but
not regnexec(), with the corresponding loss of
functionality (regexps will not work right against
input lines which contain NULs).
* sed/execute.c: add nul_append() function, a #define
for a regnexec() -> regexec() macro (conditional on
the lack of the WITH_REGNEXEC symbol), and a couple
of calls to nul_append() (in match_an_address_p()
and do_subst()) to permit the use of the POSIX standard
regexec() function call instead of the suggested
regnexec() call.
* sed/compile.c, sed/execute.c, sed/sed.c: check for
<sys/types.h> and include it (before "regex.h") if
available. This makes it simpler to use the system's
regex library instead of the one in lib/regex.c, should
that be desired.
Tue Jun 2 08:41:05 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/basicdefs.h: define VCAST macros to allow sed to
compile on systems which predate the definition
of "void *", and yet still get feedback about
stupid programming errors from systems which *do*
know about "void *"s. Also define MALLOC, REALLOC,
MEMDUP, and FREE macros to keep under control the
degree of code ugliness which would otherwise be
introduced in making use of the VCAST macro.
* sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c:
pervasively use the new VCAST, MALLOC, REALLOC, MEMDUP,
and FREE macros wherever appropriate.
* sed/utils.c, sed/utils.h: correct type of first arguments
to ck_fread() and ck_fwrite() to be [const] VOID *.
* sed/basicdefs.h, sed/execute.c: protect against
the rumored systems which stupidly #define __STDC__ 0.
* testsuite/help.good, testsuite/Makefile.in: make
the ``help'' test insensitive to the spelling of
the executable's name. Also, enhanced `make clean'
target.
* doc/sed.texi, doc/sed.1: correct documentation of `q'
command; fix typos.
* configure, testsuite/version.good: update to beta10.
Sat May 30 17:28:00 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta9 released
* Makefile.am: make testsuite a normal SUBDIR.
* configure.in: discontinue using AC_ISC_POSIX --
check for -lcposix library instead; added
testsuite/Makefile to AC_OUTPUT list.
* lib/memmove.c(memmove): fixed wrong sense used
for HAVE_BCOPY test.
* sed/execute.c: checked more specifically for a version
of gcc which supports __attribute__ (i.e., >= 2.7).
* testsuite/*: renamed files to fit 14 char limit.
* testsuite/Makefile, testsuite/Makefile.in: Makefile
renamed to Makefile.in and then modified so that
"make -j check" from top directory will work.
* testsuite/subwrite.sed, testsuite/writeout.sed: changed
file name of the "w" command to be consistent with the
new naming used in testsuite/Makefile.in.
* doc/sed.1, doc/sed.texi: fixed some typos, formatting
glitches, and poor wordings.
Sat May 30 04:02:29 PDT 1998 Ken Pizzini <ken@gnu.org>
* configure.in: specify that config.h is to be derived
from config_h.in in order to avoid the braindead
DOS filesystem limitations.
Fri May 29 21:56:30 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c(compile_address), doc/sed.texi: gave
a better definition to the meaning of N~0 address
forms -- N~M addresses now mean that lines match
when there exists a non-negative x such that
lineno == N+x*M.
Fri May 29 12:07:38 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c(compile_address),
sed/execute.c(match_an_address_p): update semantics of
N~M address form: now N is the first line which will
match and M is the step between succeeding matches.
If N<M this works out to the same as before, but the
new behavior for N>=M seems more useful.
* doc/sed.1, doc/sed.texi: update documentation of N~M
address form; added "Other Resources" node to sed.texi;
minor formatting changes to some items in sed.1 with
an eye to improving clarity.
* configure.in, testsuite/version.good: update to beta9.
Sat May 23 20:04:31 HST 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta8 released
* sed/compile.c(compile_regex): forgot to make last_re be
a *copy* of the buffered text in today's earlier fix.
* sed/execute.c(read_file_line): EOF check was wrong --
it forgot to allow for the possibility that we were
appending to the end of the ``line'' (instead of merely
reading a fresh line).
Sat May 23 18:07:18 HST 1998 Ken Pizzini <ken@gnu.org>
* sed/compile.c(compile_regex): don't track compiled version
of regex -- the modifiers may change. Track the regex
source instead. (For "last regex" (aka //) notation.)
* configure.in, testsuite/version.good: update to beta8.
Sat May 23 16:07:09 HST 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta7 released
* sed/execute.c: #undef'd EXPERIMENTAL_DASH_N_OPTIMIZATION
because its code is buggy.
Tue May 19 17:03:52 HST 1998 Ken Pizzini <ken@gnu.org>
* sed/sed.c: label rx library code as such with #ifdefs
(instead of just #if 0).
* sed/compile.c(compile_program): make incremental
improvement to the "Unknown command" error message.
Sat May 16 23:16:26 HST 1998 Ken Pizzini <ken@gnu.org>
* testsuite/Makefile: simplify: get rid of automatic run
against system's sed; don't time by default; allow for
alternative comparison command.
* configure.in, testsuite/version.good: update to beta7.
Wed May 13 21:44:28 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta6 released
* lib/Makefile.am: fix spelling of libsed_a_LIBADD in
libsed_a_DEPENDENCIES.
* configure.in, testsuite/version.good: update to beta6.
Wed May 13 14:38:08 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta5 released
* sed/execute.c(do_subst): added not_bol_p variable to track when
we have iterated past the beginning of the pattern.
[Thanks to Jim Meyering <meyering@ascend.com> for the bug report.]
Wed May 13 13:54:04 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/execute.c(bootstrap_memchr): new function. When
bootstrapping we don't know if we are on a 64-bit machine,
so lib/memchr.c breaks. Supply this (slow) implementation
just to get us bootstrapped.
* bootstrap.sh: add a #define BOOTSTRAP symbol; add -I.
for emphasis for the compiles in sed/; be explicit
about what files we're bothering to compile.
* configure.in, testsuite/version.good: update version
to beta5.
Wed May 13 06:39:06 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta4 released
* rename writeout.good? to wrtout?.good and subwrite.good? to
subwrt?.good to comply with DOS 8+3 file name restrictions.
[Eli Zaretskii <eliz@is.elta.co.il> suggested this to
simplify DJGPP ports, and it was easy.]
* testsuite/Makefile: reflect above name changes.
Wed May 12 21:09:32 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/sed.c(usage): fix non-portable omission of \n\ at end of
lines within long string.
* sed/sed.c(main): remove spurious argument to fprintf() in the
'V'ersion output.
* sed/execute.c(line_append): embed newline between the two
text fragments unconditionally.
* sed/execute.c(do_subst): change structure assignment to memcpy()
(for portability reasons).
* README.bootstrap: suggest using -w option.
Tue May 12 10:02:37 PDT 1998 Ken Pizzini <ken@gnu.org>
* configure.in: use AC_REPLACE_FUNCS where appropriate.
* lib/Makefile.am: updated to reflect AC_REPLACE_FUNCS change in
configure.in.
* lib/memchr.c lib/memcmp.c: revert to standard GNU versions.
* lib/alloca.c: added this missing file.
* testsuite/version.good: updated for new version identifier.
Mon May 11 18:50:56 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta3 released
* sed/Makefile.am: fix INCLUDES to work right with VPATH.
[Thanks to Jim Meyering <meyering@ascend.com> for the bug report.]
* sed/sed.c(usage): make --help output more user-friendly?
* sed/execute.c(execute_program): fix bug in 'x' command introduced
in the alleged portability fix of May 9.
* configure.in: update version to 3.01-beta3.
* testsuite/version.good, testsuite/help.good: freshen with
latest output.
Sat May 9 22:35:45 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta2 released
* sed/sed.c: add #include <sys/types.h> in HAVE_MMAP
block (needed on some machines).
* lib/memmove.c: #include <memory.h>, if HAVE_MEMORY_H.
Sat May 9 21:29:00 PDT 1998 Ken Pizzini <ken@gnu.org>
* configure.in: remove dangling references to rx library;
added HEADER and FUNC checks for items used by source in
lib/.
* lib/ansidecl.h, lib/memcopy.h, lib/pagecopy.h, lib/string.h
lib/memcpy.c, lib/memmove.c: deletes these files. There
are still pieces of glibc missing to support these, and
it isn't worth the headache right now.
* lib/memmove.c: de novo, simpler version. Uses bcopy()
if available, and slow-but-simple code if not.
* lib/Makefile.am: remove references to deleted files.
Added forgotten reference to memcpy.c. Re-ordered
SOURCE entries to reflect dependencies for systems
which lack ranlib.
* sed/basicdefs.h: updated to reflect above changes to lib/,
and experience with non-STDC compilers.
* lib/regex.c: made regerror() function publicly visible.
* lib/strerror.c: use old-style function declaration.
* sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c,
sed/sed.h, sed/utils.h: ensure that private definitions of
some symbols do not cause problems when #include'ing system
headers (mainly by re-ordering the #include directives).
(This is particularly an issue for bootstrap.sh runs.)
* sed/execute.c (execute_program): use memcpy() instead of
structure assingment ('x' command), for portablility to
old compilers.
* sed/execute.c (slow_getline): use old-style function
declaration, with a P_ prototype.
* sed/sed.c: change the type of the fallback MAP_FAILED
definition to work on archaic systems. (Modern systems
should be defining it themselves, so the change from
void * shouldn't be a problem.)
* bootstrap.sh, README.bootstrap: actual testing of bootstrap
code revealed that I was too optimistic. Redesigned and
replaced implementation.
* testsuite/Makefile: ignore errors from reference-implementation
seds that aren't up to snuff.
* testsuite/help.good, testsuite/version.good: update to
current version's output.
Fri May 8 15:08:28 PDT 1998 Ken Pizzini <ken@gnu.org>
*** Version 3.01-beta1 released
* sed/sed.c (main, usage): once again tweak the --help and
--version output to bettery comply with GNU coding standards.
* testsuite/help.good, testsuite/version.good: update to
reflect above change.
* doc/sed.texi: fix "Invoking" node's spelling to comply
with GNU standards.
Fri May 8 11:43:10 PDT 1998 Ken Pizzini <ken@gnu.org>
* doc/sed.1, doc/Makefile.am: wrote (very basic) man page.
Thu May 7 20:40:21 PDT 1998 Ken Pizzini <ken@gnu.org>
* lib/Makefile.am, lib/memmove.c, lib/memchr.c, lib/regex.c,
lib/memcpy.c, lib/regex.h, lib/memcopy.h, lib/string.h,
lib/pagecopy.h, lib/ansidecl.h: grab yet-another-version
from gnu.org for baseline and/or edit copyright boilerplate
using official lgpl2gpl.sed script. Take care not to
loose regnexec() interface or special conditional-compilation
code.
Wed May 6 23:35:12 PDT 1998 Ken Pizzini <ken@gnu.org>
* lib/regex.c, lib/regex.h: take from grep-2.1 distribution,
then trivially added the regnexec() interface.
* sed/sed.c, sed/compile.c, sed/execute.c: made modifications
to work with regex instead of rx.
* rx/*: deleted directory; the code is just too slow.
I think it will be easier to extend regex to fully
support POSIX.2 than to tune rx to be reasonable.
Even if this supposition is wrong, I'd rather make
the 3.01 release with the slightly deficient regex.
* Makefile.am lib/Makefile.am, sed/Makefile.am: made changes
related to the substitution of regex for rx.
* lib/Makefile.am, sed/Makefile.am: since regex is not a
``compatability'' module, changed name of library to
``libsed.a''.
* lib/memchr.c, lib/memcpy.c, lib/memmove.c: add conditional
compilation code to leave zero-sized .o file if system
already supports the implemented function.
* testsuite/help.good, testsuite/version.good: brought
up-to-date (once again).
* NEWS, ANNOUNCE: changes to reflect this batch of changes.
Wed May 6 18:40:47 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/execute.c: discovered awful bug in '}' handling:
it could read past the end of vec (because `n' was
being decremented below zero)! Needed to "continue"
instead of "break".
Tue May 5 14:34:38 PDT 1998 Ken Pizzini <ken@gnu.org>
* doc/sed.texi, doc/version.texi: wrote some rudimentary
texinfo documentation.
* ANNOUNCE, NEWS, README, README.rx, Makefile.am:
more updates for the upcoming beta-release.
* sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c,
sed/sed.h, lib/strerror.c: update copyright notice text.
Fri May 1 15:41:37 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed/execute.c (match_an_address_p, match_address_p): if
the second element of an address range is a line number,
and that line number is *less than* (or equal to) the
current line number, we only match the one line (per
POSIX.2, section 4.55.7.1). [Bug discovered as reported
in the seders mailing list FAQ.]
* AUTHORS, NEWS, acconfig.h, configure.in, doc/Makefile.am,
lib/Makefile.am, sed/Makefile.am, lib/README,
testsuite/help.good, testsuite/version.good:
Updated in anticipation of the 3.01-beta1 release.
Reorganized development source tree to make creation
of a distribution simpler. Most notable changes were
to the various Makefile.am files and configure.in, but
some minor edits (such as deleting or changing #include
directives) have been made in many other source files.
* bootstrap.sh, README.bootstrap: created a mechanism for
creating sed on a system which lacks a working sed.
Thu Apr 16 23:52:11 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed.h, sed.c, execute.c, compile.c: did a spell-check on
the comments; fixed several typos.
Thu Apr 16 13:43:01 PDT 1998 Ken Pizzini <ken@gnu.org>
* execute.c (do_subst): fixed bug where the "replaced" flag
was being set to one inappropriately when at least one
but fewer than sub->numb matches of the regexp were found.
(Thanks to Simon Taylor <staylor@hermes.iaccess.com.au>
for the bug report.)
Wed Apr 15 11:35:31 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed.h, sed.c, compile.c, execute.c: having a concern that
a cast was being done inappropriately, and realizing that
there is no quick way to locate all casts in a program, I
went through and marked all casts with a simple macro.
Now it is a simple matter to locate the casts, and it is
also a simple matter to turn of casts for a lint session
(if it should be desired).
Wed Apr 15 10:29:21 PDT 1998 Ken Pizzini <ken@gnu.org>
* compile.c, sed.c: redo compile phase so that brace
expressions can be spread across multiple files.
For example:
printf '{' >a; printf 'l;d' >b; printf '}' >c
sed -f a -f b -f c foo
will now compile (and work), instead of complaining
about an unmatched '{'. The mess created in compile.c
allowed a little simplification to the command-line
processing of "-e" options in sed.c.
sed.h: added (opaque) err_info member to struct vector;
added comments to the members of struct vector.
Wed Apr 14 23:50:50 PDT 1998 Ken Pizzini <ken@gnu.org>
* sed.h, sed.c, compile.c, execute.c: added types countT and
flagT in order to clarify what various "int"s were doing.
Also makes it easy to change the type used for counts
(for example, to "unsigned long long") if desired, although
there are still some gotchas (such as the printf() format
for the '=' command).
Tue Apr 14 17:34:54 PDT 1998 Ken Pizzini <ken@gnu.org>
* execute.c (execute_program, process_files, count_branches,
shrink_program): Added a first attempt at program optimization.
We now can quit early if we are running with the "-n"
and all of the commands are known to be valid only for
lines less than the current line. Thus the "sed" in
"foo | sed -n 1,2p" will print read three lines, printint
the first two, and then quit, regardless of how much longer
"foo" might run or output. This optimization does not buy
much in most cases (it sometimes even costs a little),
but when it does help it can help big. The code is
all conditionally compiled based on the
EXPERIMENTAL_DASH_N_OPTIMIZATION symbol being #defined,
so it can be easily omitted if it causes problems.
Tue Apr 14 12:25:06 PDT 1998 Ken Pizzini <ken@gnu.org>
* execute.c (test_dollar_EOF, last_file_with_data_p):
test_dollar_EOF() was incorrectly returning a false (0)
when there were unprocessed files, none of which had any
data (either unopenable or zero-length). Created
last_file_with_data_p() to detect this situation, and
modified test_dollar_EOF() to make use of it.
Thu Apr 2 23:02:18 PST 1998 Ken Pizzini <ken@gnu.org>
* compile.c (match_slash): match_slash() did not handle
[.coll.], [=equiv=], and [:class:] sequences within a
character class. Added snarf_char_class() [which is a
remote derivative of parse_char_class() from GNU ed-0.2]
to deal with the details, and altered match_slash()
to make use of it. Also created the trivial
add_then_next() to avoid clutter in snarf_char_class().
Thu Apr 2 20:34:42 PST 1998 Ken Pizzini <ken@gnu.org>
* execute.c, sed.c, sed.h: There was a severe bug in
how the code handled "sed 5n a b" when "a" consists
of exactly five lines -- it behaved like "sed 5q a b"!
Rearranged where files get opened -- large scale
changes primarily involving main(), process_files(),
and read_pattern_space(), but also touching on several
other parts of execute.c. The read_pattern_space()
function became unwieldly and parts were split into
open_next_file(), closedown(), read_always_fail(),
read_mem_line(), and read_file_line(). The
at_end_of_file_p() function became obsolete and was
eliminated; test_dollar_EOF_p() was updated. A few
global and module-static variables were elminated, and
"struct line" was extended; comments were added to the
"struct line" declartation to document some important
dependencies in it.
I undertook the reorganization with dread, but I
feel that the new organization is an improvement
well beyond just fixing the bug that inspired it.
Thu Apr 2 01:16:25 PST 1998 Ken Pizzini <ken@gnu.org>
* execute.c (read_file_line, slow_getline): the fread()
buffering code gives insufficient feedback to a user
running sed with a tty input device, so I created
slow_getline() for reading from a tty device.
Additionally, EOF detection has been made a little more
sensitive to avoid requiring multiple EOFs to be entered
from a tty.
* configure.in: added isatty() check.
Wed Apr 1 11:04:30 PST 1998 Ken Pizzini <ken@gnu.org>
* configure.in (CPPFLAGS, LDFLAGS, LIBS):
Set to appropriate values if large file support needs
explicit enabling. Code fragment taken from a 1997-10-25
patch to gawk by Paul Eggert <eggert@twinsun.com>
Thu Aug 14 17:43:27 PDT 1997 Ken Pizzini <ken@gnu.org>
* utils.c (ck_fclose): modified to ignore NULL parameter.
Thu Aug 14 12:08:45 PDT 1997 Ken Pizzini <ken@gnu.org>
* execute.c: tweaked execute_program() to eliminate
gratuitous "goto" usage.
Thu Aug 14 11:30:04 PDT 1997 Ken Pizzini <ken@gnu.org>
* compile.c: added case-insensitive modifier ('I') to
address and s/// regexps. The s/// case also accepts
the more popular 'i' modifier. (The address regexp
cannot use 'i' as a modifier, as that conflicts with
the use of the 'i'nsert command.)
Thu Aug 14 09:29:06 PDT 1997 Ken Pizzini <ken@gnu.org>
* compile.c: abstracted out match_slash() from the s///, y///,
and address-regexp special-case codes.
* execute.c: made dump_append_queue() use ck_fread() instead
of hand-rolled error checking.
Mon Jul 28 10:50:41 PDT 1997 Ken Pizzini <ken@gnu.org>
* sed.c, sed.h, execute.c: POSIX.2, section 4.55.7, says that
a newline must end *every* output line. But I think that
it is useful (when seding a binary file) to omit a trailing
newline if the input lacks one. Thus the addition of
POSIXLY_CORRECT behavior.
* execute.c: however, when seding multiple files my feeling
is that it makes sense to have each file but the last
behave as-if it ended in a newline. Modified read_pattern_space()
accordingly.
* utils.c: realized that add1_buffer(), for performance reasons,
shouldn't be calling memcpy() (indirectly via add_buffer()),
so rewrote it.
Sat Jul 26 23:08:28 PDT 1997 Ken Pizzini <ken@gnu.org>
* execute.c: attempted to make read_pattern_space more
efficient for the the non-mmap() case.
* utils.c, utils.h, execute.c: new function ck_fread()
created and used.
Sat Jul 26 20:22:14 PDT 1997 Ken Pizzini <ken@gnu.org>
* execute.c, compile.c, sed.c: abstracted the mmap()
interface into map_file()/unmap_file() [sed.c], and
changed the ad-hoc code in compile_file() [compile.c]
and process_file() [execute.c] to make use of the new
interface.
Sat Jul 26 19:45:46 PDT 1997 Ken Pizzini <ken@gnu.org>
* execute.c, compile.c, configure.in: Check to see if mmap()
is available; if so make use of it on regular files.
* compile.c: compile_file() now closes the input file
when it is through!
Sun Jul 20 23:57:02 PDT 1997 Ken Pizzini <ken@gnu.org>
* compile.c: modified parsing to permit whitespace in more
places where it makes sense;
added backslash escaping to the y/// command, per POSIX.
* execute.c: Merged append_pattern_space() into read_pattern_space();
moved body of 's' command to new function do_subst();
moved body of 'l' command to new function do_list();
changed output of 'l' command to conform to POSIX.2;
made line handling conform to POSIX; added output_line() function;
redesigned append-space algorithm; added append_queue structure and
the next_append_slot() and dump_append_queue() functions.
* sed.h: moved the definition of what is now struct subst
outside of the definition of struct sed_cmd.
Sat Jul 19 16:29:09 PDT 1997 Ken Pizzini <ken@gnu.org>
* sed.c, execute.c, sed.h, Makefile.am: Separated out the
pieces dealing with executing the program from the top-level
parameter parsing and control.
Sat Jul 19 01:16:35 PDT 1997 Ken Pizzini <ken@gnu.org>
* sed.c, compile.c, sed.h, Makefile.am: separate out the
pieces dealing with compiling the program from the pieces
dealing with interpreting the result.
* compile.c: add functions in_nonblank() and in_integer(),
and change interface to compile_address() with an eye
to making code clearer.
Fri Jul 18 13:35:50 PDT 1997 Ken Pizzini <ken@gnu.org>
* utils.c: attempt at a quasi-unification of the
STDC and traditional C approaches to panic().
* sed.c: eliminate some gratuitous bit twiddling.
(Using flag bits can be a useful technique, but
this code is cleaner without them.)
* sed.c: place mutually exclusive members of struct addr
within a union, mainly to document the exclusivity;
eliminate unused structure members from struct fp_list;
eliminate unnecessary module-global variables;
remove some #if 0 code that is too odd to keep;
allegedly simplified the 'l' case of execute_program();
allegedly simplified inchar();
localized some static variables;
renamed some variables to better document their purpose;
removed some goto-s rendered obsolete by other changes.
Thu Jul 17 15:30:44 PDT 1997 Ken Pizzini <ken@gnu.org>
* utils.c, utils.h, sed.c: added and made use of
ck_free() function.
* utils.c, utils.h, sed.c: changed all the *_buffer()
functions to take/return an incomplete type
"struct buffer *" instead of using VOID *.
* utils.c, utils.h, sed.c: renamed "finish_buffer()"
to "free_buffer()", on the premise that the new
name better describes the function's purpose.
Wed Jul 16 13:52:14 PDT 1997 Ken Pizzini <ken@gnu.org>
* utils.c, utils.h, sed.c: added and made use of
ck_memdup() function.
* sed.c: protected a call to add1_buffer() in
compile_program() which could have tried to
push an EOF if a a/i/c command ended with
a '\', EOF sequence.
* utils.c: added sanity check to add1_buffer() so that
EOF will not be added to the buffer.
Wed Jul 16 03:56:26 PDT 1997 Ken Pizzini <ken@gnu.org>
* configure.in, compat.h, compat.c: added memchr.
* sed.c: got rid of arbitrary NUM_FPS limit;
made global functions and variables "static" where appropriate;
make various cosmetic changes, hopefully improving readability;
simplified some redundant predicates;
simplified some code, but nothing fundamental (yet?).
Wed Jul 16 00:24:54 PDT 1997 Ken Pizzini <ken@gnu.org>
* alloca.c, getopt.c, getopt.h, getopt1.c: updated from
versions in textutils-1.22.
* Makefile.in, Makefile.am, configure.in: put in automake support.
* basicdefs.h, compat.h, compat.c [, sed.c, utils.c]: took out
some very ugly compatibility #ifdefs and packaged into one
place.
* sed.c, utils.c: some gratuitous formatting changes.
* utils.c: changed datatype of utils_id_s in order to
eliminate arbitrary array size.
Sun Jul 13 17:00:26 PDT 1997 Ken Pizzini <ken@gnu.org>
* sed.c, utils.c, utils.h: de-linting oriented cleanup.
Sun Jul 13 00:46:48 PDT 1997 Ken Pizzini <ken@gnu.org>
* sed.c: fixed bug which caused SEGV for files missing a
final newline. Corrected calls to regnexec to pass the
proper parameters, in the proper order.
Sat Dec 30 20:16:59 1995 Tom Lord <lord@beehive>
*** Version 3.00 released
* sed.c: Use posix entry points to regexp functions.
Fix enough bugs to pass the test-suite.
....... Jason Molenda <crash@cygnus.com>
* testsuite/: trippy test suite.
Wed May 11 07:46:24 1994 Chip Salzenberg (chip@fin.uucp)
*** Version 2.05 released
* sed.c (compile_address): Recognize numeric addresses.
Fixes typo made during installation of "~" feature.
Sat Apr 30 17:17:38 1994 Tom Lord (lord@x1.cygnus.com)
*** Version 2.04 released
* sed.c: applied a patch from
From: kap1@tao.cpe.uchicago.edu (Dietrich Kappe)
Dietrich writes:
As my contribution to the creeping feature creature in sed,
here is a new type of address. The address has form n~m,
which means "the line number is equal to n modulo m." The
modifications to sed are trivial, and the general
usefulness of this address should be obvious. If m is 0 or
missing, 1 is used in its place (could be a bug or a
feature :-).
Sat Apr 30 17:17:38 1994 Tom Lord (lord@x1.cygnus.com)
* rx.c (solve_destination): protect `solution' more carefully.
This is a cleanup of a patch from Kevin Buettner
(kev@cujo.geg.mot.com).
Sat Apr 30 17:17:38 1994 Tom Lord (lord@x1.cygnus.com)
* rx.c: make translation tables unsigned chars
* sed.c (main): Compile accumulated -e commands as
soon as a -f command comes along. This ensures that
the commands are executed in the right order.
Mon Oct 25 14:41:47 1993 Tom Lord (lord@rtl.cygnus.com)
* sed.c (execute_program): 'w' flushes the buffer after it
writes -- diagnosed by doug@research.att.com. 'r' and 'w' to
the same file is now supported -- hopefully even in a way that
satisfies Posix (it now behaves differently from some
/bin/sed's and the spec is hard to read so i'm not sure).
Also, 'r' of a non-existent file is now permitted.
Mon Oct 11 21:06:10 1993 Tom Lord (lord@cygnus.com)
* sed.c (execute_program): remember that 'b' and 't' are more
like longjmp than goto. Patch from tom@basil.icce.rug.nl (Tom
R.Hageman)
* rx.c: patch from From: fin!chip@rutgers.edu (Chip
Salzenberg) to get rid of compiler warnings.
Sat Aug 7 01:04:59 1993 Tom Lord (lord@unix7.andrew.cmu.edu)
*** Version 2.03 released
* sed.c (compile_regex): report error messages for bogus
regexps.
SEE ALSO: ChangeLog.rx
Wed Jul 21 00:28:03 1993 Tom Lord (lord@unix8.andrew.cmu.edu)
* alloca.c: upgraded to a more recent version
* rx.c (re_search_2): prefer matches with longer
subexpressions to those with shorter ones, giving precedence
to low numbered subexpressions.
* rx.c (re_compile): don't free `params' if its null.
Fri Jul 16 01:12:08 1993 Tom Lord (lord@unix8.andrew.cmu.edu)
* rx.[ch], sed.c: rx replaces regex.
Thu May 27 11:13:03 1993 Tom Lord (lord@unix3.andrew.cmu.edu)
* sed.c (execute_program, match_addr): caught more cases
that need to be sensitive to a missing \n at EOF.
Fri May 21 00:39:22 1993 Tom Lord (lord@unix8.andrew.cmu.edu)
* sed.c (execute_program): apply gaumondp's patch
to fix '\xabcxs/foo/bar/'.
* sed.c (execute_program):
If a second address is a regexp, never match it on the
same line as the first address.
* sed.c (compile_regexp):
Numeric ranges x,y s.t. y < x are now treated as x,x.
There was a bug in that they were being handled like x,x+1.
* sed.c (execute_program, read_pattern_space,
append_pattern_space) don't add newlines to lines
that don't have them.
Wed May 19 13:34:45 1993 Tom Lord (lord@unix9.andrew.cmu.edu)
* sed.c (compile_program): grok \\n in comments.
Mon May 17 16:34:50 1993 Tom Lord (lord@unix9.andrew.cmu.edu)
* alloca.c: new (standard) file
* configure.in: AC_CONSTified
* sed.c (compile_program): properly diagnose the error of
a missing command (e.g. sed /x/). (thanks gaumondp)
* sed.c (compile_regexp): handle character classes correctly.
Thanks gaumondp@ERE.UMontreal.CA
and schwab@issan.informatik.uni-dortmund.de.
Thu May 6 12:37:18 1993 Tom Lord (lord@unix10.andrew.cmu.edu)
* sed.c (compile_filename, execute_program): don't use
`access' or `/dev/null'.
* sed.c (execute_program): 'N' at EOF should delete the pat buf.
* sed.c (compile_filename): truncate, don't append files
being openned for `w' or `s///w'
* sed.c (execute_program): -n switch shouldn't effect `i' or `c'.
* sed.c (compile_program): don't compile unescaped newlines
into the substitution string of an `s' command (they are an error).
* sed.c (compile_regex): correctly skip over character
sets that contain `]'.
* sed.c (execute_program): patch from gaumondp
Correctly handle empty-string matches in the case of an `s'
command with a repeat count.
* sed.c (compile_program): patch from gaumondp@ere.UMontreal.ca.
Don't consume characters after the label of a `b', `t' or `:' command.
* sed.c (compile_program): unmatched open braces are an error.
* sed.c (compile_file): when consuming an initial comment,
count lines correctly.
Wed Nov 18 02:10:58 1992 Tom Lord (lord@unix2.andrew.cmu.edu)
* sed.c (execute_program): Made s///p print even if -n was
specified.
* sed.c (compile_string): Changed the type of this function to
fix a compile warning.
Wed Nov 4 17:15:34 1992 Tom Lord (lord@unix7.andrew.cmu.edu)
* sed.c (main): Initialize the hold area to contain "\n"
instead of "". In execute_program, all lines are expected
to be newline terminated. Also, if H is the first command
in the script, the result is a pattern buffer that begins
with a blank line. Thanks to pinard@iro.umontreal.ca
(Francois Pinard) for pointing out this and many other bugs.
* sed.c (execute_program): Fixed a case of `D' command.
Thanks Chris Weber <weber@bucknell.edu>
* sed.c: added new tests of no_default_output to make -n work.
Thanks Andrew Herbert <andrew@werple.apana.org.au>
* sed.c, configure.in,Makefile.in: autoconfed bcopy and const.
Thanks "J.T. Conklin" <jtc@gain.com>
* sed.c: made prog_cur, prog_start, and prog_end unsigned so
that users could write `sed -e s/ÿ/foo/g'.
Tue Oct 13 00:04:05 1992 Tom Lord (lord@unix3.andrew.cmu.edu)
* sed.c (execute_program): fixed the cycling behavior of 'D'
* sed.c: integrated patch that closes files
* sed.c: changed regexp syntax
Fri May 22 15:11:12 1992 Tom Lord (lord at moriarty.bh.andrew.cmu.edu)
* regex.c: this is not my change, but a pointer to the fact
that karl@gnu fixed some regexp bugs that were plaguing sed.
Thu Apr 30 13:02:21 1992 Tom Lord (lord at unix3.andrew.cmu.edu)
* sed.c (compile_program, execute_program)
subprograms are now compiled with an explicit continuation ;)
return_v and return_i in struct vector. execute_program
no longer recurses to execute subprograms (case '{') and now
understands a return instruction (case '{').
Tue Apr 28 17:13:04 1992 Tom Lord (lord at unix7.andrew.cmu.edu)
* sed.c (compile_address) added \?regexp? syntax for addresses.
* sed.c (main) added {} intervals to the obscure regexp
syntax.
* sed.c (compile_program) after calling compile_address,
normalize numeric addresses (make a2.addr_number > a1.addr_number).
This is necessary because line numbers must match exactly,
but sed does not try to match a2 until after a1 has matched,
yet a1,a2 where a2 <= a1 is defined to be equivelent to
a1,a1+1
Sat Feb 29 10:55:54 1992 David J. MacKenzie (djm@nutrimat)
* sed.c (usage): Document long options as starting with `--'.
Mon Dec 9 23:56:40 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* sed.c: Include sys/types.h, for new regex.h.
Tue Nov 5 02:16:01 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* utils.c: Change NO_VFPRINTF to VPRINTF_MISSING, for
compatibility with autoconf.
Mon Sep 2 22:02:40 1991 David J. MacKenzie (djm at apple-gunkies)
* sed.c (compile_regex): Treat \ as a normal character when in
a char class.
Thu Aug 8 00:15:33 1991 David J. MacKenzie (djm at bleen)
* Version 1.08.
* sed.c (compile_filename): If reading a file fails, read
/dev/null instead. It's what Unix and POSIX do, effectively.
* sed.c (compile_regex): The 'slash' character doesn't
terminate the regex if it's in a character class.
* sed.c (main): If given no args, or bad option, print usage
message.
(usage): New function.
* sed.c (execute_program): Amount written for 'P' command was
wrong. From stephend@ksr.com (Stephen Davis).
Wed Aug 7 16:51:14 1991 David J. MacKenzie (djm at apple-gunkies)
* sed.c (append_pattern_space): Check for buffer full before
instead of after writing to buffer. Don't need to test for
EOF initially anymore, due to the next change.
(execute_program): For 'n' and 'N' commands, if eof is reached
in input, quit the script like Unix sed does.
Fix memory allocation problems for 'a' and 'r' commands.
(compile_program): Fix off by one error in processing comments.
All of the above are from Tapani Tarvainen, tarvaine@tukki.jyu.fi.
* sed.c (setup_jump): Use isblank instead of testing for ' '
or '\t', for POSIX locales.
* utils.c (ck_strdup): Renamed from strdup.
* sed.c: Change callers.
* sed.c, utils.c: Clean up declarations and includes to get
rid of compiler warnings.
* sed.c (main): Add long-named options. Don't complain if -n
is given twice.
Fri Aug 2 12:33:16 1991 David J. MacKenzie (djm at apple-gunkies)
* configure: Support +srcdir arg. Create config.status and
remove it and Makefile if interrupted while creating them.
* Makefile.in: Change DESTDIR to prefix.
Mon Jul 15 13:07:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
* sed.c (main): Add -V option to print version number.
(USAGE): Mention -V.
Mon Jul 8 01:42:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
* sed.c: Define bcopy in terms of memcpy if STDC_HEADERS as
well as if USG.
(compile_filename): Don't glob filename (for 'r' and 'w'
commands). Unix sed doesn't do it and it's not very useful,
since it can only match 0 or 1 files.
(execute_program): Change '\a' to 007 since some compilers
don't recognize \a.
* utils.c: New file; code moved from sed.c.
* Replace Makefile with Makefile.in and configure.
Update README.
Tue Mar 26 13:00:48 EST 1991 Jay Fenlason (hack@gnu.ai.mit.edu)
* sed.c (match_address) Added a trivial cast for portability.
Mon Feb 25 13:23:29 EST 1991 Jay Fenlason (hack@ai.mit.edu)
* sed.c Changed 's' command to work with latest version of regex()
routines, which mysteriously changed somewhere in there. . .
A one-line patch from David Eckelkamp (eckelkamp@mcc.com).
Initialize the fastmap in the hopes that it'll make sed faster.
Thu Feb 21 13:42:27 EST 1991 Jay Fenlason (hack@ai.mti.edu)
* sed.c Change panic to compile with other __STDC__ compilers.
Wed Jan 30 10:46:38 EST 1991 Jay Fenlason (hack@ai.mit.edu)
* sed.c Changed version number. Made new release.
Tue Nov 27 15:34:51 EST 1990 Jay Fenlason (hack@ai.mit.edu)
* sed.c (setup_jump) Don't blow chunks if there isn't a label
after a b or t command.
(main) Don't panic if it a branch command doesn't have
a label to branch to.
(main) Collect all the -e arguments together and parse them
all at once. This way, -e { -e mumble -e } will work.
All these small patches from David Schmidt (davids@isc-br.isc-br.com)
Tue Sep 11 12:51:37 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
* sed.c Changed some function forward declarations to use VOID *
instead of char *
Mon Jul 16 11:12:54 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
* sed.c (ck_malloc) Use malloc(1) instead of malloc(0) if given
a request for zero bytes.
Tue Jun 5 02:05:37 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* sed.c: Remove excess newlines from calls to panic.
Reformat some comments to fit in 79 columns.
Base whether to use void * on __STDC__, not __GNU__.
(main): Add missing arg when printing usage message.
Print usage if given invalid arg.
(panic) [__STDC__]: Add missing ", ...".
(compile_filename): Print correct error message if glob_filename
returns NULL.
Thu Apr 5 21:41:12 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
* sed.c (execute_program, case 'r'): When need to realloc append.text,
multiply append.alloc by 2 instead of adding
cur_cmd->x.cmd_txt.text_len.
Tue Mar 6 15:55:35 EST 1990 Jay Fenlason (hack@ai.mit.edu)
* sed.c (compile_regex) Allocate 10 bytes extra space needed by
re_compile_pattern.
Sun Feb 25 16:32:10 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
* sed.c (execute_program, case 'l'): Print \00 instead of \0.
Print backslash as \\ not \.
Print \xx instead of /xx.
Thu Feb 1 14:02:28 EST 1990 hack@wookumz
* sed.c (memchr) Use () inside inner loop so it will work correctly.
A two character patch from Robert A Bruce (rab@allspice.berkeley.edu)
Wed Sep 27 18:47:39 EDT 1989 hack@ai.mit.edu
* sed.c (compile_regex) New function. When compiling regex,
turn ^ into \` and $ into \' so that they won't match on embedded
newlines. UN*X pattern matching is a crock.
(compile_program, compile_address) call compile_regex.
Mon Sep 18 10:15:32 EDT 1989 hack@ai.mit.edu
* sed.c (compile_program): define translate as unsigned char * so
that y command will work on non-ascii characters.
Changed version number to 1.06.
Thu Sep 14 15:57:08 EDT 1989 hack@ai.mit.edu
* sed.c (compile_program) Let programs use ; to terminate } as
well as newline.
(read_file) Print an error msg to stderr if it can't open an
input file.
Thu Mar 23 18:04:46 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu)
* Makefile, sed.c: Added new copyright notice.
* Makefile: Make distributions which follow the symlinks.
hack@ai.mit.edu
1.05 Fixed error in 'r' (now does things in the right order)
1.04 Fixed s/re/rep/[number]
1.03 Fixes from Mike Haertel for regexps that match the
empty string, and for Ritchie stdio (non-sticky EOF)
1.02 Fixed 't', 'b', ':' to trim leading spaces and tabs
Fixed \\ in replacement of 's' command
Added comments
1.01 Added s/re/rep/[digits]
added #n as first line of script
added filename globbing
added 'l' command
All in the name of POSIX
1.00 Began (thinking about) distributing this file
Local Variables:
mode: indented-text
left-margin: 8
version-control: never
End:
|