mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
903 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85da146bd2 | ||
|
|
ae8ee650ea | ||
|
|
4a11d01711 | ||
|
|
f76a4b618e | ||
|
|
c8c91b5e20 | ||
|
|
70155d8013 | ||
|
|
af14a04c19 | ||
|
|
6e62afaaed | ||
|
|
9190f77006 | ||
|
|
5d845a1678 | ||
|
|
f6c32178c7 | ||
|
|
ff5cd3f6a3 | ||
|
|
b3d8117527 | ||
|
|
103713c42b | ||
|
|
c84fb64144 | ||
|
|
8e02fb10ab | ||
|
|
1b47ed2714 | ||
|
|
dcd02c8008 | ||
|
|
a80c49322b | ||
|
|
3982e9cdf8 | ||
|
|
a5b6fae599 | ||
|
|
b660d78cf5 | ||
|
|
c86883a62a | ||
|
|
e36197cd8f | ||
|
|
2185c1f3d8 | ||
|
|
48a76e855c | ||
|
|
19b5a4f761 | ||
|
|
9dbd283b1e | ||
|
|
4376f9f2ce | ||
|
|
37fea371b7 | ||
|
|
bb02f48670 | ||
|
|
64cd458e0a | ||
|
|
bc9aded4b9 | ||
|
|
a611c6cbf6 | ||
|
|
68c33eea03 | ||
|
|
fec6a430da | ||
|
|
1266fc26ee | ||
|
|
41a41dd48e | ||
|
|
e59e2e803c | ||
|
|
52c7e3147e | ||
|
|
8829551700 | ||
|
|
e95fe088e1 | ||
|
|
e13281014a | ||
|
|
aac56cabe4 | ||
|
|
df5f33a5bf | ||
|
|
0799786a33 | ||
|
|
6621f0a9a9 | ||
|
|
d5b9b29ac6 | ||
|
|
022a19b21f | ||
|
|
12133d7f01 | ||
|
|
58dfd6b442 | ||
|
|
5fc47138b1 | ||
|
|
4a2b289e7c | ||
|
|
bab072f3aa | ||
|
|
8679e372cd | ||
|
|
b0690ba414 | ||
|
|
ed354b6490 | ||
|
|
81d1fa5cb6 | ||
|
|
421e75544b | ||
|
|
7466f41075 | ||
|
|
1e7d4b9c70 | ||
|
|
6a13b75511 | ||
|
|
ebefd435aa | ||
|
|
b3335ab809 | ||
|
|
d293e5f03c | ||
|
|
0a470f01de | ||
|
|
b181d31372 | ||
|
|
b3a49ee8d0 | ||
|
|
35b886ad7b | ||
|
|
cecde31171 | ||
|
|
ae6c43a3ab | ||
|
|
17432bd066 | ||
|
|
c835f92a61 | ||
|
|
89b765e32c | ||
|
|
3752e13942 | ||
|
|
858afc04d2 | ||
|
|
5fecd9e4d5 | ||
|
|
ae5ee331f1 | ||
|
|
954c7bc4cc | ||
|
|
625dc74361 | ||
|
|
b26beb4996 | ||
|
|
0b3d661480 | ||
|
|
33448d128a | ||
|
|
b3ef6f599d | ||
|
|
72f95044eb | ||
|
|
859f8587f8 | ||
|
|
24e15328df | ||
|
|
357c53621f | ||
|
|
fd688bcc5f | ||
|
|
e8c6c8175b | ||
|
|
561e4c139e | ||
|
|
507288d2c7 | ||
|
|
6c47524481 | ||
|
|
300c151b8b | ||
|
|
3c7e9fec08 | ||
|
|
7235fb47cc | ||
|
|
8ef2abf7e9 | ||
|
|
5e55e49972 | ||
|
|
48a255beb0 | ||
|
|
17a2ec94a8 | ||
|
|
e7f8503138 | ||
|
|
f789ddbdda | ||
|
|
1f1bd53b86 | ||
|
|
3a2afe3311 | ||
|
|
20b960db10 | ||
|
|
8fd3e8664b | ||
|
|
1b25f1c2cd | ||
|
|
8569e32ec8 | ||
|
|
1321f30e73 | ||
|
|
290ee99712 | ||
|
|
3008ad90f4 | ||
|
|
8c5b30bc1e | ||
|
|
f0fa287b4f | ||
|
|
4ecb3b28f1 | ||
|
|
ea93e0b7ad | ||
|
|
7603401c86 | ||
|
|
90d97b9703 | ||
|
|
4091022393 | ||
|
|
338061e307 | ||
|
|
6a99b4cc40 | ||
|
|
86d6c36d09 | ||
|
|
a7f5043de8 | ||
|
|
5110583f3e | ||
|
|
813c8e8bb6 | ||
|
|
7d72c942bb | ||
|
|
f17cc2e29c | ||
|
|
4f4111709c | ||
|
|
beed39a03c | ||
|
|
d5f09a0fd1 | ||
|
|
3692f57123 | ||
|
|
d3d5565035 | ||
|
|
3e39947b49 | ||
|
|
c8a3fc9bed | ||
|
|
d43b4dcaf8 | ||
|
|
54f9b87874 | ||
|
|
1c28626053 | ||
|
|
6c674869b3 | ||
|
|
888a5250a5 | ||
|
|
d468c227b0 | ||
|
|
52314f2cd8 | ||
|
|
8d2b4f9786 | ||
|
|
b44299cfd7 | ||
|
|
5ea5ea9d2c | ||
|
|
7d21f2f4d0 | ||
|
|
73db5c12b9 | ||
|
|
53ac4c028b | ||
|
|
916a46a980 | ||
|
|
8b59538e69 | ||
|
|
eb34cbfc13 | ||
|
|
4360d0f52d | ||
|
|
e74a22ebb7 | ||
|
|
fcc65666b5 | ||
|
|
a16b0a142f | ||
|
|
5c39a3b65b | ||
|
|
4885753994 | ||
|
|
156de2ae7a | ||
|
|
40f8a7ad2b | ||
|
|
8f477a9072 | ||
|
|
d5ce3b1c3c | ||
|
|
54d0c0bb5a | ||
|
|
09c73133aa | ||
|
|
17fe725ebb | ||
|
|
c02f8ed500 | ||
|
|
90b901cd1c | ||
|
|
73c7efa3ee | ||
|
|
e155f4bf01 | ||
|
|
1d3c57118b | ||
|
|
195b5ebbe7 | ||
|
|
ba788477a8 | ||
|
|
6846ffa9d9 | ||
|
|
4fb3a6f765 | ||
|
|
5460d4a9c8 | ||
|
|
7f5d303c61 | ||
|
|
a65bae921e | ||
|
|
89cf1fc2cf | ||
|
|
a13947a7a3 | ||
|
|
ddc2531899 | ||
|
|
80729c5841 | ||
|
|
83ada8596c | ||
|
|
2a1d6f9b5f | ||
|
|
f2ac53d4ea | ||
|
|
f31b9b9fee | ||
|
|
acc8601b65 | ||
|
|
8dd5415e02 | ||
|
|
8a4da0e3ff | ||
|
|
95f9b268e9 | ||
|
|
d2ad9d8cf4 | ||
|
|
0ccd71dd94 | ||
|
|
1c7be9d1bb | ||
|
|
c9893d18e3 | ||
|
|
fb1f09c76e | ||
|
|
b1cc662215 | ||
|
|
f86a3c16d3 | ||
|
|
6d244887aa | ||
|
|
f86df3250c | ||
|
|
65a915647c | ||
|
|
2882d4477d | ||
|
|
2793223907 | ||
|
|
a5937bbc71 | ||
|
|
d0cac59c72 | ||
|
|
ed0923a11c | ||
|
|
42096600e3 | ||
|
|
523fb680f6 | ||
|
|
3f36b30756 | ||
|
|
4a1512e4b2 | ||
|
|
ad44ac84c8 | ||
|
|
c7975ba578 | ||
|
|
62a92dec57 | ||
|
|
a37e7e6b78 | ||
|
|
d5718682cc | ||
|
|
81e3dc9283 | ||
|
|
daa3f22091 | ||
|
|
b87899c834 | ||
|
|
4accfeb4e0 | ||
|
|
377b0c7942 | ||
|
|
4331f5f978 | ||
|
|
fb19eec511 | ||
|
|
b712dcba25 | ||
|
|
caad57f5d0 | ||
|
|
807b8b05c2 | ||
|
|
5f3fa7a284 | ||
|
|
c1032f08e5 | ||
|
|
0aa0b007b0 | ||
|
|
c6973beeec | ||
|
|
d99d106c55 | ||
|
|
61f8fa059c | ||
|
|
9279ffdf29 | ||
|
|
0682a5efe9 | ||
|
|
dc68073b21 | ||
|
|
78c6df8fb8 | ||
|
|
f03282e857 | ||
|
|
7e9e29f392 | ||
|
|
28f8f53bb6 | ||
|
|
ab8182fa71 | ||
|
|
d740a98d4a | ||
|
|
40e0727bed | ||
|
|
a387531246 | ||
|
|
be44044a29 | ||
|
|
ae9d905134 | ||
|
|
bcb8610977 | ||
|
|
ac66871c65 | ||
|
|
3fa102417e | ||
|
|
59b58a58f6 | ||
|
|
f46bcc918b | ||
|
|
784928401d | ||
|
|
1a62ae1a5c | ||
|
|
952a4436eb | ||
|
|
a098f5b9b6 | ||
|
|
5d691b7b74 | ||
|
|
84ee79c745 | ||
|
|
4b091b8a14 | ||
|
|
c51d0a5a9b | ||
|
|
29ea1d5db9 | ||
|
|
b910477e63 | ||
|
|
2f74178b8b | ||
|
|
fe171f7d8f | ||
|
|
b0244698f9 | ||
|
|
7c0ec3e569 | ||
|
|
4677a7e42f | ||
|
|
520f4efee9 | ||
|
|
0d43bad18e | ||
|
|
0dd914edd1 | ||
|
|
161db26bd1 | ||
|
|
a992c841ae | ||
|
|
9299cf1e78 | ||
|
|
970083559f | ||
|
|
459453639e | ||
|
|
0e0ae2b348 | ||
|
|
cb7fcc32ff | ||
|
|
d7e8ccb6f3 | ||
|
|
a811674834 | ||
|
|
fa9f16326a | ||
|
|
c13ff9b8bc | ||
|
|
bded355394 | ||
|
|
f43bd3fafc | ||
|
|
e298f1f300 | ||
|
|
8102404465 | ||
|
|
bef51e36a4 | ||
|
|
5425625fb3 | ||
|
|
94d1ea4fa9 | ||
|
|
9645d076db | ||
|
|
b683d9194f | ||
|
|
38da840313 | ||
|
|
b36e061e8a | ||
|
|
0d3f6a6665 | ||
|
|
aa00ea2e88 | ||
|
|
aad274a82b | ||
|
|
fc949b713e | ||
|
|
fbc246ca8f | ||
|
|
789a8aa03a | ||
|
|
179a2c3034 | ||
|
|
a27d168615 | ||
|
|
29fa517ae4 | ||
|
|
4b7c7e9d33 | ||
|
|
daf9bddd16 | ||
|
|
9b3733bd9a | ||
|
|
a4f0dde547 | ||
|
|
e604ed756f | ||
|
|
1cf3018183 | ||
|
|
138d155fb8 | ||
|
|
4d091498a4 | ||
|
|
1e3de0b6d9 | ||
|
|
25a9b70b2e | ||
|
|
45bf8ec9d0 | ||
|
|
4a253e5be0 | ||
|
|
71a04268b5 | ||
|
|
6c6ea1a14d | ||
|
|
9691c2050b | ||
|
|
2876587b55 | ||
|
|
1eb3a8c9ba | ||
|
|
39fd156a8e | ||
|
|
f137758903 | ||
|
|
895c2213db | ||
|
|
50720fb367 | ||
|
|
f6516b6dd3 | ||
|
|
564001a9e7 | ||
|
|
25abc2a9b4 | ||
|
|
70196747af | ||
|
|
04e102f64f | ||
|
|
432ebf7912 | ||
|
|
84b3a78396 | ||
|
|
9eb9f31c3a | ||
|
|
7f82c56f15 | ||
|
|
5582e6dad3 | ||
|
|
2e55854100 | ||
|
|
8114f3fcdb | ||
|
|
45c541daa1 | ||
|
|
17c0c658f1 | ||
|
|
b8e689dc67 | ||
|
|
87b19e8a11 | ||
|
|
a1c6ed64c0 | ||
|
|
f2c14100c3 | ||
|
|
1a58046071 | ||
|
|
b3b3cf98c6 | ||
|
|
30bf49ce02 | ||
|
|
a5ecd84c1f | ||
|
|
9b29731f08 | ||
|
|
a140942848 | ||
|
|
1291b1652a | ||
|
|
1b5b75d13e | ||
|
|
f1af346ad5 | ||
|
|
431bbb9c57 | ||
|
|
7d62b5ce1c | ||
|
|
a345a56001 | ||
|
|
b5f8cdecfb | ||
|
|
fa53b43c97 | ||
|
|
23bce5b115 | ||
|
|
da952f6227 | ||
|
|
31926f3a37 | ||
|
|
a71e22991b | ||
|
|
d74d789bea | ||
|
|
950325ee23 | ||
|
|
c941e1742d | ||
|
|
0bd1289ad1 | ||
|
|
febf70b73f | ||
|
|
b5a71af82a | ||
|
|
876c63c92f | ||
|
|
b3ca6696cd | ||
|
|
24e88142ba | ||
|
|
f9cd2cf6e2 | ||
|
|
0a1ac00ad6 | ||
|
|
e5947e883e | ||
|
|
679918ec84 | ||
|
|
a9b6fe5c83 | ||
|
|
8619a0d598 | ||
|
|
d34e6897d8 | ||
|
|
55681891e5 | ||
|
|
3772a9e885 | ||
|
|
1220685f78 | ||
|
|
f3129d9b19 | ||
|
|
b0fd7c9185 | ||
|
|
7d70c26629 | ||
|
|
ac96de6db4 | ||
|
|
1f49981a1f | ||
|
|
d09ffcb711 | ||
|
|
33b2a8a1ae | ||
|
|
32969f8571 | ||
|
|
4abe75d3b1 | ||
|
|
e623bf9a03 | ||
|
|
0815914f28 | ||
|
|
70cf07775b | ||
|
|
06382a007d | ||
|
|
d7749da3e9 | ||
|
|
84b8cf9fcf | ||
|
|
c673119b0b | ||
|
|
45d223328e | ||
|
|
b8ad9be908 | ||
|
|
2be918d5cd | ||
|
|
db69dbe9ab | ||
|
|
4215f6b53a | ||
|
|
e1298617bf | ||
|
|
720341312b | ||
|
|
ed44302c4a | ||
|
|
c3b3d48cd4 | ||
|
|
a73047bde4 | ||
|
|
20862d675d | ||
|
|
17e8314c79 | ||
|
|
ee791d8ca1 | ||
|
|
0c410767ab | ||
|
|
3896da90cc | ||
|
|
0ed25421c6 | ||
|
|
194f3d7f5a | ||
|
|
e028e025df | ||
|
|
8978c64869 | ||
|
|
0fd3107ec7 | ||
|
|
0416bd8ed0 | ||
|
|
d63a1efe26 | ||
|
|
43294523f4 | ||
|
|
625354dd9e | ||
|
|
dc14f81457 | ||
|
|
32f42e0a34 | ||
|
|
263773a385 | ||
|
|
6afff604a4 | ||
|
|
7b4f54f83f | ||
|
|
24b532175e | ||
|
|
543f479cc8 | ||
|
|
4b1e41570b | ||
|
|
d0fa9d9689 | ||
|
|
4516e9ec55 | ||
|
|
d15f56325a | ||
|
|
1dde8333c1 | ||
|
|
ac22b4589d | ||
|
|
2f03e544e1 | ||
|
|
412cc2f3fc | ||
|
|
3cbc95de84 | ||
|
|
b3d2d7745e | ||
|
|
66d52e0b28 | ||
|
|
5ba02801bd | ||
|
|
03c0cd6569 | ||
|
|
c12be5c1d8 | ||
|
|
d565995d9b | ||
|
|
9fd1b85231 | ||
|
|
350690112e | ||
|
|
d0acd7bfa5 | ||
|
|
4ba06c4102 | ||
|
|
cb84de4217 | ||
|
|
7111d93669 | ||
|
|
97f0f916a2 | ||
|
|
42e52b5017 | ||
|
|
8ce9769e2f | ||
|
|
7d969dab50 | ||
|
|
d7074bc0e4 | ||
|
|
e24c0713be | ||
|
|
9b3498acb2 | ||
|
|
ffc5c802c4 | ||
|
|
12b4578595 | ||
|
|
e98991ee51 | ||
|
|
10076ae36a | ||
|
|
c96ca77338 | ||
|
|
e82e83086c | ||
|
|
70ef71caf5 | ||
|
|
56d2307664 | ||
|
|
e98dee7cdd | ||
|
|
f3701815f7 | ||
|
|
cf3c9c6a11 | ||
|
|
beb67dc954 | ||
|
|
242f2fa2e1 | ||
|
|
3d91b69385 | ||
|
|
41dfaf296a | ||
|
|
bc2d814543 | ||
|
|
8cb23387cb | ||
|
|
82fa812558 | ||
|
|
1487a7da95 | ||
|
|
1751c454c2 | ||
|
|
da59dde0bb | ||
|
|
6099958eda | ||
|
|
ffd5a79535 | ||
|
|
320268ae6d | ||
|
|
e45d62703e | ||
|
|
6ed9fd4b58 | ||
|
|
d0909b6911 | ||
|
|
a64289005d | ||
|
|
e42dca4684 | ||
|
|
51293cdf6f | ||
|
|
4d0af9ead4 | ||
|
|
eed23c25dc | ||
|
|
8204d34b97 | ||
|
|
d80da392e0 | ||
|
|
4c53aee40c | ||
|
|
3d35ef8670 | ||
|
|
5921df05c5 | ||
|
|
1a7260cada | ||
|
|
969950e526 | ||
|
|
fb9ee923ba | ||
|
|
8af03634e6 | ||
|
|
e5e9f3ee5d | ||
|
|
62ae6ccc22 | ||
|
|
c3830e800f | ||
|
|
7200c7fd2e | ||
|
|
d16bea8f84 | ||
|
|
ae0dc43e79 | ||
|
|
c6500ed364 | ||
|
|
2a5b5534ab | ||
|
|
2dc3ad1a76 | ||
|
|
1e2d02ace5 | ||
|
|
fde482ef0e | ||
|
|
9de1f7a589 | ||
|
|
983e0032e0 | ||
|
|
60cb394696 | ||
|
|
c5c0528abe | ||
|
|
fecbdd9ab1 | ||
|
|
5b2210ce71 | ||
|
|
3df36d5e2f | ||
|
|
a49fa29fed | ||
|
|
bb3ecf85bc | ||
|
|
b5a2377dc2 | ||
|
|
46b5894b8f | ||
|
|
1a68844645 | ||
|
|
dc522f984c | ||
|
|
8573fc6ac9 | ||
|
|
d4cf394f30 | ||
|
|
79f3064bfa | ||
|
|
900e16e5d5 | ||
|
|
dfc9fc2202 | ||
|
|
1b5b3bf6e2 | ||
|
|
cb806c0218 | ||
|
|
0e6d3d87e4 | ||
|
|
4b08923fe8 | ||
|
|
2edcf647de | ||
|
|
0a713ad019 | ||
|
|
7026c59810 | ||
|
|
4c4eb1ab6c | ||
|
|
638d6e19f0 | ||
|
|
27d2263af1 | ||
|
|
320b9cc697 | ||
|
|
28e0bda43b | ||
|
|
04af619ed2 | ||
|
|
255931762f | ||
|
|
f98969cf69 | ||
|
|
7c17502e74 | ||
|
|
4a2eda04aa | ||
|
|
ed43629995 | ||
|
|
c177b96b17 | ||
|
|
c5de1e3532 | ||
|
|
148ec1ad9c | ||
|
|
a13e04ed9d | ||
|
|
98564790bd | ||
|
|
f04044ed86 | ||
|
|
09711894fe | ||
|
|
4f28f318d8 | ||
|
|
e22c80dcf0 | ||
|
|
b350b74916 | ||
|
|
3400ffe3f2 | ||
|
|
fdd16fdb62 | ||
|
|
6f67177fae | ||
|
|
2c035a7cfd | ||
|
|
be4153d2a8 | ||
|
|
630b771f1b | ||
|
|
de05a873ec | ||
|
|
3361bd2bca | ||
|
|
1c6698b17d | ||
|
|
a3edb3f940 | ||
|
|
9b34a4a7c6 | ||
|
|
56c8b44ec6 | ||
|
|
50c823be8a | ||
|
|
4909374105 | ||
|
|
2a91869144 | ||
|
|
41bf50ecb3 | ||
|
|
349c3796be | ||
|
|
717429e4bc | ||
|
|
6c81b98e46 | ||
|
|
cf64a504d8 | ||
|
|
ec693397f0 | ||
|
|
04838c31ce | ||
|
|
fa3bbe8eb2 | ||
|
|
39c406f18a | ||
|
|
d7f77ef1cf | ||
|
|
31053908a0 | ||
|
|
0c7040607d | ||
|
|
d81cbf71b4 | ||
|
|
b339cb8d84 | ||
|
|
d8880083a6 | ||
|
|
96cdeb978e | ||
|
|
b2cc136736 | ||
|
|
b394529747 | ||
|
|
edfafcd7b7 | ||
|
|
1c75eb6a98 | ||
|
|
814dc35407 | ||
|
|
99fe905035 | ||
|
|
ccf556a616 | ||
|
|
d96a2d9e14 | ||
|
|
8e11d5dfae | ||
|
|
f64f586fdc | ||
|
|
6f8e1b2134 | ||
|
|
8888bceb65 | ||
|
|
78315499ba | ||
|
|
e666e3459e | ||
|
|
6a9d144a66 | ||
|
|
f34578f297 | ||
|
|
1dc643390a | ||
|
|
ea3702aa6d | ||
|
|
59b9296742 | ||
|
|
bf3b759a61 | ||
|
|
bc24ebbed0 | ||
|
|
10ac9ed1ba | ||
|
|
f28de0cbe3 | ||
|
|
d7477dbf0c | ||
|
|
b4062862f6 | ||
|
|
4ddff14202 | ||
|
|
c98881bb59 | ||
|
|
9016aac157 | ||
|
|
8c5a8ba959 | ||
|
|
62a6b18a77 | ||
|
|
0f39512ec6 | ||
|
|
77becb06e1 | ||
|
|
2ff0c1870c | ||
|
|
9438eff8ec | ||
|
|
4097b92a07 | ||
|
|
7c695a0e5a | ||
|
|
85cddd3119 | ||
|
|
3661c96081 | ||
|
|
d4368d4802 | ||
|
|
34c992c065 | ||
|
|
e904744174 | ||
|
|
47e8713900 | ||
|
|
5637dfa191 | ||
|
|
ce5730d5c2 | ||
|
|
f1a405c1e9 | ||
|
|
7f88c2b896 | ||
|
|
eaa41b023f | ||
|
|
0867d4efd3 | ||
|
|
b12923594b | ||
|
|
4f208e731c | ||
|
|
26b61d5962 | ||
|
|
955f5eb1f4 | ||
|
|
0e02a64c99 | ||
|
|
545c237530 | ||
|
|
3cc1863ab3 | ||
|
|
815261aefc | ||
|
|
f599541be9 | ||
|
|
c62a6dbaa9 | ||
|
|
74388abca3 | ||
|
|
e044081627 | ||
|
|
d1320b7277 | ||
|
|
6ac49bdf47 | ||
|
|
c74ae79fd9 | ||
|
|
4b29186f72 | ||
|
|
94435a6401 | ||
|
|
1e26d4455a | ||
|
|
3683b0b3ef | ||
|
|
2d30458a75 | ||
|
|
9cde1990ab | ||
|
|
3fc07d456b | ||
|
|
73ca459085 | ||
|
|
85219ddf0f | ||
|
|
f471847cac | ||
|
|
edbc415595 | ||
|
|
e4c1c5efca | ||
|
|
c830d53afb | ||
|
|
4526777121 | ||
|
|
97df7b0013 | ||
|
|
9c28acb705 | ||
|
|
7b9e7765ee | ||
|
|
14c6c66b64 | ||
|
|
58b136578a | ||
|
|
139408f867 | ||
|
|
d2c6e7cba9 | ||
|
|
62e0054a8d | ||
|
|
a5be9924f2 | ||
|
|
f709048a82 | ||
|
|
d1f996b486 | ||
|
|
d3900b79bc | ||
|
|
34d871d67d | ||
|
|
71066e34b9 | ||
|
|
4be8ee6d75 | ||
|
|
63a48d0278 | ||
|
|
b8d66b1704 | ||
|
|
d64ae4c1be | ||
|
|
1a9771061b | ||
|
|
5c8eaa8139 | ||
|
|
4cfd024d37 | ||
|
|
5e053a624b | ||
|
|
e3625e3032 | ||
|
|
4c9586c01b | ||
|
|
d9be56f638 | ||
|
|
57592bb00e | ||
|
|
d4fc1b970c | ||
|
|
c609fd3e0a | ||
|
|
e9d17da073 | ||
|
|
82e99127d2 | ||
|
|
c609ba2d13 | ||
|
|
6a52479e0a | ||
|
|
1cd5fb882c | ||
|
|
27586e4d1b | ||
|
|
bfe2a56ac6 | ||
|
|
c9fff51897 | ||
|
|
7e294bac78 | ||
|
|
3d672b27ca | ||
|
|
8726a1e79e | ||
|
|
7aea26b817 | ||
|
|
a8676a3282 | ||
|
|
e8f7310474 | ||
|
|
3e1ecd65dd | ||
|
|
b0ed797534 | ||
|
|
3329d17b3e | ||
|
|
41e757beb6 | ||
|
|
efe35c166d | ||
|
|
2f70dd59c6 | ||
|
|
d57a5cc166 | ||
|
|
7216f62cad | ||
|
|
f2be7b3cc4 | ||
|
|
5c0b9744ab | ||
|
|
b0a21fce4c | ||
|
|
3649121dff | ||
|
|
383690a5f2 | ||
|
|
90ce25327c | ||
|
|
840c73b381 | ||
|
|
7ec03a4414 | ||
|
|
0ba429223d | ||
|
|
7d234bb98e | ||
|
|
a0d34ce173 | ||
|
|
1a6ee7a625 | ||
|
|
34ac19cd34 | ||
|
|
a79e4f054a | ||
|
|
ad1a0015be | ||
|
|
2592c30822 | ||
|
|
5e6706b750 | ||
|
|
77f32e0b49 | ||
|
|
a0810c6cae | ||
|
|
a023f4519e | ||
|
|
0055d0a4cc | ||
|
|
416715cf93 | ||
|
|
730ec4650a | ||
|
|
98b9e6e30b | ||
|
|
9d76e7ffbb | ||
|
|
d9f30fc643 | ||
|
|
597e0b2a8e | ||
|
|
56cd9b9a02 | ||
|
|
12d30b5cd0 | ||
|
|
c64c32d89e | ||
|
|
7d490ad462 | ||
|
|
0347f76632 | ||
|
|
b012712ff5 | ||
|
|
6f1a0acdbd | ||
|
|
b32398d02c | ||
|
|
ea15a1e0e5 | ||
|
|
c7066e8caa | ||
|
|
fa674d651c | ||
|
|
5220e9a46b | ||
|
|
afddedbd9f | ||
|
|
b98971b7a0 | ||
|
|
9cccef82ce | ||
|
|
f6d73bdb80 | ||
|
|
91c0d0de6a | ||
|
|
283b1a297d | ||
|
|
26259134ee | ||
|
|
39cf848828 | ||
|
|
8dd548d895 | ||
|
|
daa3462c64 | ||
|
|
b7bf84fd73 | ||
|
|
a62273dca5 | ||
|
|
32f7fc5503 | ||
|
|
99708d72f6 | ||
|
|
ec4159d6f6 | ||
|
|
3c39169751 | ||
|
|
1a68c9ac75 | ||
|
|
e7a59c2594 | ||
|
|
1ddf714c24 | ||
|
|
69a2d6bce1 | ||
|
|
408cfc09b2 | ||
|
|
eebe6a6c0c | ||
|
|
abd282bf34 | ||
|
|
441ebad5cc | ||
|
|
26a8544c83 | ||
|
|
4fd0132dfc | ||
|
|
bd3627904b | ||
|
|
a1ab7fb789 | ||
|
|
0e4f0390ef | ||
|
|
b741c592c5 | ||
|
|
81d574033a | ||
|
|
aa49f63378 | ||
|
|
1a038cb55e | ||
|
|
1c892790d9 | ||
|
|
bd51f25754 | ||
|
|
406c6613bb | ||
|
|
c5449cea5a | ||
|
|
7cc00778d1 | ||
|
|
1dc1d2996a | ||
|
|
3cf0da722f | ||
|
|
7532e57941 | ||
|
|
5b8cad3534 | ||
|
|
e1df5e7167 | ||
|
|
1d8ed38329 | ||
|
|
c87d06546a | ||
|
|
afe669874a | ||
|
|
ee2e84bb6f | ||
|
|
d5aa78b540 | ||
|
|
2a5f4c45e1 | ||
|
|
0fa3eb4d22 | ||
|
|
b10f778bf5 | ||
|
|
e9ed1c0601 | ||
|
|
729bd79cb8 | ||
|
|
402b4612f8 | ||
|
|
a044608569 | ||
|
|
d660831c5a | ||
|
|
9ba877cf28 | ||
|
|
e22b1e56e6 | ||
|
|
cd2e2180d9 | ||
|
|
6932ade12e | ||
|
|
c49c9a04e1 | ||
|
|
b294dd43a1 | ||
|
|
7ce576ff06 | ||
|
|
733c16465d | ||
|
|
981f5ba012 | ||
|
|
0e180c8f19 | ||
|
|
005ed75540 | ||
|
|
52211041ad | ||
|
|
304295c24c | ||
|
|
a56da10982 | ||
|
|
1089f9b929 | ||
|
|
ccd0e2e27a | ||
|
|
96a39fa3f6 | ||
|
|
08ffff5615 | ||
|
|
16efa02b77 | ||
|
|
7f26c2724a | ||
|
|
81b7ecbc14 | ||
|
|
bd6aa3080a | ||
|
|
7f1cf81aba | ||
|
|
3af4a12ae3 | ||
|
|
deee2015f3 | ||
|
|
9d06a0075d | ||
|
|
1d791a1487 | ||
|
|
998e5ad1c0 | ||
|
|
67c2366944 | ||
|
|
bb952869e7 | ||
|
|
35b1d6a948 | ||
|
|
63dece38a1 | ||
|
|
3904fb599e | ||
|
|
7b7b289e2d | ||
|
|
f8939357a3 | ||
|
|
5f79c9e91b | ||
|
|
16c56c7d73 | ||
|
|
8c074a6577 | ||
|
|
2feeeb5972 | ||
|
|
89495b81dd | ||
|
|
a5c67e1c05 | ||
|
|
b288e0f8f5 | ||
|
|
5d3af013b0 | ||
|
|
b734adb860 | ||
|
|
88db35dd77 | ||
|
|
6efc03fd41 | ||
|
|
befcaa08e8 | ||
|
|
59834c2c06 | ||
|
|
ed48dc8cae | ||
|
|
f3bcc28b21 | ||
|
|
e549af7279 | ||
|
|
e5c3e23ec4 | ||
|
|
03cc8c8ca3 | ||
|
|
dc84f5c5c9 | ||
|
|
e0ac832842 | ||
|
|
ff1fc50954 | ||
|
|
9e10989282 | ||
|
|
4bca95c431 | ||
|
|
f60dafdac2 | ||
|
|
ee9cf50a0f | ||
|
|
e023911555 | ||
|
|
b19da298ac | ||
|
|
7efa2ba5c4 | ||
|
|
19bff1c02d | ||
|
|
fd984b9655 | ||
|
|
6014da9e30 | ||
|
|
e5e6e34ead | ||
|
|
e8b07e3796 | ||
|
|
1b5bb5c05a | ||
|
|
1df37f767c | ||
|
|
77973edc33 | ||
|
|
48e4b51e96 | ||
|
|
9c53920ae6 | ||
|
|
993b49a693 | ||
|
|
bf72a5728f | ||
|
|
48209ca1ba | ||
|
|
7cb6a4e2f1 | ||
|
|
7d026dd508 | ||
|
|
178f23fbb7 | ||
|
|
75b93231ca | ||
|
|
23684f8383 | ||
|
|
4b8b59894b | ||
|
|
ade337e1a8 | ||
|
|
d38f60e27c | ||
|
|
bf75b72e46 | ||
|
|
dbd0c33f24 | ||
|
|
4d7a57cf34 | ||
|
|
1c2c9330d9 | ||
|
|
836935c5e6 | ||
|
|
2e789ea9b2 | ||
|
|
a4a64560c0 | ||
|
|
65f957107e | ||
|
|
e9d60dc000 | ||
|
|
c58cd08bf9 | ||
|
|
900a826cf8 | ||
|
|
7fe510422e | ||
|
|
1ba9563160 | ||
|
|
4bef2ec5f7 | ||
|
|
c98ea50c21 | ||
|
|
78697777d7 | ||
|
|
83696460f0 | ||
|
|
bb8acb3640 | ||
|
|
4f29f1aeb2 | ||
|
|
36a4ba8ba3 | ||
|
|
aaafa60129 | ||
|
|
866e778210 | ||
|
|
805484b693 | ||
|
|
a10e992cbc |
54
ABOUT-NLS
54
ABOUT-NLS
@@ -134,7 +134,7 @@ Each translation team has its own mailing list, courtesy of Linux
|
||||
International. You may reach your translation team at the address
|
||||
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
|
||||
language. Language codes are *not* the same as the country codes given
|
||||
in ISO 3166. The following translation teams exist, as of May 1996:
|
||||
in ISO 3166. The following translation teams exist, as of October 1996:
|
||||
|
||||
Arabic `ar', Chinese `zh', Czech `cs', Danish `da', Dutch `nl',
|
||||
English `en', Esperanto `eo', Finnish `fi', French `fr', German
|
||||
@@ -172,39 +172,41 @@ Available Packages
|
||||
|
||||
Languages are not equally supported in all GNU packages. The
|
||||
following matrix shows the current state of GNU internationalization,
|
||||
as of May 1996. The matrix shows, in regard of each package, for which
|
||||
languages PO files have been submitted to translation coordination.
|
||||
as of October 1996. The matrix shows, in regard of each package, for
|
||||
which languages PO files have been submitted to translation
|
||||
coordination.
|
||||
|
||||
cs de en es fi fr ja ko nl no pl pt sl sv
|
||||
.-------------------------------------------.
|
||||
bash | [] | 1
|
||||
bison | [] | 1
|
||||
bash | [] [] | 2
|
||||
bison | [] [] [] | 3
|
||||
clisp | [] [] [] | 3
|
||||
cpio | [] | 1
|
||||
diffutils | [] [] [] | 3
|
||||
enscript | [] [] [] [] | 4
|
||||
fileutils | [] [] [] [] | 4
|
||||
findutils | [] [] | 2
|
||||
cpio | [] [] [] [] | 4
|
||||
diffutils | [] [] [] [] | 4
|
||||
enscript | [] [] [] [] [] | 5
|
||||
fileutils | [] [] [] [] [] [] [] [] | 8
|
||||
findutils | [] [] [] [] [] [] | 6
|
||||
flex | [] | 1
|
||||
gcal | [] | 1
|
||||
gettext | [] [] [] [] [] [] [] [] | 9
|
||||
glibc | [] [] [] | 3
|
||||
grep | [] [] [] [] [] [] | 6
|
||||
hello | [] [] [] [] [] [] | 6
|
||||
m4 | [] [] [] [] | 4
|
||||
make | | 0
|
||||
mkid | [] [] | 2
|
||||
gcal | [] [] [] | 3
|
||||
gettext | [] [] [] [] [] [] [] [] [] [] | 11
|
||||
grep | [] [] [] [] [] [] [] [] | 8
|
||||
hello | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
id-utils | [] [] | 2
|
||||
libc | [] [] [] [] [] [] | 6
|
||||
m4 | [] [] [] [] [] | 5
|
||||
make | [] [] [] [] | 4
|
||||
music | [] | 1
|
||||
ptx | [] [] [] | 3
|
||||
recode | [] [] [] [] [] | 5
|
||||
sh-utils | [] [] | 2
|
||||
ptx | [] [] [] [] [] [] [] | 7
|
||||
recode | [] [] [] [] [] [] [] | 7
|
||||
sh-utils | [] [] [] [] [] | 5
|
||||
sharutils | [] [] [] [] | 4
|
||||
tar | [] [] [] [] [] [] [] | 7
|
||||
textutils | [] [] [] [] | 4
|
||||
wdiff | [] [] [] [] | 4
|
||||
tar | [] [] [] [] [] [] [] [] [] | 9
|
||||
texinfo | | 0
|
||||
textutils | [] [] [] [] [] [] | 6
|
||||
wdiff | [] [] [] [] [] [] [] [] | 8
|
||||
`-------------------------------------------'
|
||||
cs de en es fi fr ja ko nl no pl pt sl sv
|
||||
1 17 1 3 1 22 1 6 3 3 4 3 6 10 81
|
||||
1 20 1 9 1 24 1 8 20 7 14 6 7 13 132
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
@@ -217,6 +219,6 @@ distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
GNU distribution.
|
||||
|
||||
If May 1996 seems to be old, you may fetch a more recent copy of
|
||||
If October 1996 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites.
|
||||
|
||||
|
||||
16
THANKS
Normal file
16
THANKS
Normal file
@@ -0,0 +1,16 @@
|
||||
This is just a start at listing e-mail addresses of contributors.
|
||||
The rest of the addresses are still in the ChangeLog.
|
||||
|
||||
Bauke Jan Douma: bjdouma@xs4all.nl
|
||||
Charles Karney: karney@pppl.gov
|
||||
Emile LeBlanc: leblanc@math.toronto.edu
|
||||
James Antill: jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
Jesse Thilo: jgt2@eecs.lehigh.edu
|
||||
Joakim Rosqvist: dvljrt@cs.umu.se
|
||||
Marcus Daniels: marcus@sysc.pdx.edu
|
||||
Mark A. Thomas: thommark@access.digex.net
|
||||
Miles Bader: miles@gnu.ai.mit.edu
|
||||
Peter Eriksson: peter@ifm.liu.se
|
||||
Santiago Vila Doncel: sanvila@ctv.es
|
||||
Thomas Bushnell, n/BSG: thomas@gnu.ai.mit.edu
|
||||
Tony Leneis: tony@plaza.ds.adp.com
|
||||
@@ -4,3 +4,9 @@ info_TEXINFOS = fileutils.texi
|
||||
# FIXME: remove texinfo.tex when automake has been fixed to include it
|
||||
# automatically
|
||||
EXTRA_DIST = perm.texi getdate.texi texinfo.tex
|
||||
|
||||
# Tell makeinfo to put everything in a single info file: sh-utils.info.
|
||||
# Otherwise, it would also generate files with names like sh-utils.info-[123],
|
||||
# and those names all map to one 14-byte name (sh-utils.info-) on some crufty
|
||||
# old systems.
|
||||
MAKEINFO = makeinfo --no-split
|
||||
|
||||
147
doc/Makefile.in
147
doc/Makefile.in
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated automatically by automake 1.0 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.1l from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
@@ -37,42 +37,56 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
YACC = @YACC@
|
||||
GENCAT = @GENCAT@
|
||||
PERL = @PERL@
|
||||
MV = @MV@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
CC = @CC@
|
||||
RANLIB = @RANLIB@
|
||||
LN = @LN@
|
||||
RM = @RM@
|
||||
|
||||
info_TEXINFOS = fileutils.texi
|
||||
|
||||
# FIXME: remove texinfo.tex when automake has been fixed to include it
|
||||
# automatically
|
||||
EXTRA_DIST = perm.texi getdate.texi texinfo.tex
|
||||
mkinstalldirs = $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
|
||||
MAKEINFO = makeinfo
|
||||
# Tell makeinfo to put everything in a single info file: sh-utils.info.
|
||||
# Otherwise, it would also generate files with names like sh-utils.info-[123],
|
||||
# and those names all map to one 14-byte name (sh-utils.info-) on some crufty
|
||||
# old systems.
|
||||
MAKEINFO = makeinfo --no-split
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
TEXI2DVI = texi2dvi
|
||||
INFOS = fileutils.info*
|
||||
INFO_DEPS = fileutils.info
|
||||
DVIS = fileutils.dvi
|
||||
TEXINFOS = fileutils.texi
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti version.texi
|
||||
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
|
||||
version.texi
|
||||
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
|
||||
$(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA)
|
||||
DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
|
||||
$(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
|
||||
$(TEXINFOS) $(MANS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
default: all
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .texi .texinfo .info .dvi .ps
|
||||
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL)
|
||||
cd $(top_srcdir) && automake --gnu doc/Makefile
|
||||
|
||||
$(srcdir)/Makefile.in: @MAINT@Makefile.am $(top_srcdir)/configure.in
|
||||
cd $(top_srcdir) && automake $(subdir)/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
Makefile: $(top_builddir)/config.status Makefile.in
|
||||
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
|
||||
|
||||
version.texi: @MAINT@stamp-vti
|
||||
|
||||
@@ -81,11 +95,8 @@ stamp-vti: fileutils.texi $(top_srcdir)/configure.in
|
||||
&& $(SHELL) ./mdate-sh fileutils.texi`" > vti.tmp
|
||||
echo "@set EDITION $(VERSION)" >> vti.tmp
|
||||
echo "@set VERSION $(VERSION)" >> vti.tmp
|
||||
if cmp -s vti.tmp $(srcdir)/version.texi; then \
|
||||
rm vti.tmp; \
|
||||
else \
|
||||
mv vti.tmp $(srcdir)/version.texi; \
|
||||
fi
|
||||
cmp -s vti.tmp $(srcdir)/version.texi || cp vti.tmp $(srcdir)/version.texi
|
||||
rm vti.tmp
|
||||
echo timestamp > $(srcdir)/stamp-vti
|
||||
|
||||
mostlyclean-vti:
|
||||
@@ -99,25 +110,64 @@ maintainer-clean-vti:
|
||||
@MAINT@rm -f stamp-vti version.texi
|
||||
|
||||
fileutils.info: fileutils.texi version.texi
|
||||
fileutils.dvi: fileutils.texi version.texi
|
||||
|
||||
|
||||
DVIPS = dvips
|
||||
|
||||
.texi.info:
|
||||
$(MAKEINFO) -I$(srcdir) $< -o $(srcdir)/$@
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
install-info: $(INFO_DEPS)
|
||||
.texinfo.info:
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo.dvi:
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
|
||||
.dvi.ps:
|
||||
$(DVIPS) $< -o $@
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(infodir)
|
||||
for file in $(INFO_DEPS); do \
|
||||
for ifile in `cd $(srcdir) && echo $$file*`; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
|
||||
done; \
|
||||
@for file in $(INFO_DEPS); do \
|
||||
for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
if test -f $(srcdir)/$$ifile; then \
|
||||
echo "$(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
$(POST_INSTALL)
|
||||
@if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
||||
for file in $(INFO_DEPS); do \
|
||||
echo "install-info --info-dir=$(infodir) $(infodir)/$$file";\
|
||||
install-info --info-dir=$(infodir) $(infodir)/$$file; :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
|
||||
uninstall-info:
|
||||
cd $(srcdir) && for file in *.info*; do \
|
||||
rm -f $(infodir)/$$file; \
|
||||
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
||||
ii=yes; \
|
||||
else ii=; fi; \
|
||||
for file in $(INFO_DEPS); do \
|
||||
(cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
|
||||
test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
for base in $(INFO_DEPS); do \
|
||||
d=$(srcdir); \
|
||||
for file in `cd $$d && eval echo $$base*`; do \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-info:
|
||||
@@ -131,30 +181,32 @@ clean-info:
|
||||
distclean-info:
|
||||
|
||||
maintainer-clean-info:
|
||||
rm -f $(INFOS)
|
||||
for i in $(INFO_DEPS); do rm -f `eval echo $$i*`; done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
subdir = doc
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
distdir: $(DEP_DISTFILES)
|
||||
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
|
||||
|
||||
subdir = doc
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
$(MAKE) distdir="$(distdir)" dist-info
|
||||
info: $(INFO_DEPS)
|
||||
|
||||
dvi: $(DVIS)
|
||||
|
||||
check: all
|
||||
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
|
||||
install-exec:
|
||||
$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-info
|
||||
install-data: install-info-am
|
||||
$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
@@ -177,32 +229,31 @@ clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
rm -f Makefile $(DISTCLEANFILES)
|
||||
rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
|
||||
rm -f config.cache config.log stamp-h
|
||||
test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-vti mostlyclean-info mostlyclean-generic
|
||||
|
||||
clean: clean-vti clean-info clean-generic mostlyclean
|
||||
clean: clean-vti clean-info clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-vti distclean-info distclean-generic clean
|
||||
distclean: distclean-vti distclean-info distclean-generic clean
|
||||
rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-vti maintainer-clean-info \
|
||||
maintainer-clean-generic distclean
|
||||
maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
.PHONY: default mostlyclean-vti distclean-vti clean-vti \
|
||||
maintainer-clean-vti install-info uninstall-info mostlyclean-info \
|
||||
maintainer-clean-vti install-info-am uninstall-info mostlyclean-info \
|
||||
distclean-info clean-info maintainer-clean-info tags distdir info dvi \
|
||||
check installcheck install-exec install-data install uninstall all \
|
||||
installcheck install-exec install-data install uninstall all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .texi .info .dvi
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
||||
@@ -1,16 +1,33 @@
|
||||
@ifinfo
|
||||
@set Francois Franc,ois
|
||||
@end ifinfo
|
||||
@tex
|
||||
@set Francois Fran\noexpand\ptexc cois
|
||||
@end tex
|
||||
|
||||
@node Date input formats
|
||||
@chapter Date input formats
|
||||
|
||||
@cindex date input formats
|
||||
@findex getdate
|
||||
|
||||
@quotation
|
||||
Our units of temporal measurement, from seconds on up to months, are so
|
||||
complicated, asymmetrical and disjunctive so as to make coherent mental
|
||||
reckoning in time all but impossible. Indeed, had some tyrannical god
|
||||
contrived to enslave our minds to time, to make it all but impossible
|
||||
for us to escape subjection to sodden routines and unpleasant surprises,
|
||||
he could hardly have done better than handing down our present system.
|
||||
It is like a set of trapezoidal building blocks, with no vertical or
|
||||
horizontal surfaces, like a language in which the simplest thought
|
||||
demands ornate constructions, useless particles and lengthy
|
||||
circumlocutions. Unlike the more successful patterns of language and
|
||||
science, which enable us to face experience boldly or at least
|
||||
level-headedly, our system of temporal calculation silently and
|
||||
persistently encourages our terror of time.
|
||||
|
||||
@dots{} It is as though architects had to measure length in feet, width
|
||||
in meters and height in ells; as though basic instruction manuals
|
||||
demanded a knowledge of five different languages. It is no wonder then
|
||||
that we often look into our own immediate past or future, last Tuesday
|
||||
or a week from Sunday, with feelings of helpless confusion. @dots{}
|
||||
|
||||
--- Robert Grudin, @cite{Time and the Art of Living}.
|
||||
@end quotation
|
||||
|
||||
This section describes the textual date representations that GNU
|
||||
programs accept. These are the strings you, as a user, can supply as
|
||||
arguments to the various programs. The C interface (via the
|
||||
@@ -53,7 +70,7 @@ many flavors of items:
|
||||
@item time zone items
|
||||
@item day of the week items
|
||||
@item relative items
|
||||
@item pure numbers.
|
||||
@item pure numbers.
|
||||
@end itemize
|
||||
|
||||
@noindent We describe each of these item types in turn, below.
|
||||
@@ -89,7 +106,7 @@ zeros on numbers are ignored.
|
||||
|
||||
@cindex calendar date item
|
||||
|
||||
A @dfn{calendar date item} specifies a day of the year. It is
|
||||
A @dfn{calendar date item} specifies a day of the year. It is
|
||||
specified differently, depending on whether the month is specified
|
||||
numerically or literally. All these strings specify the same calendar date:
|
||||
|
||||
@@ -479,6 +496,6 @@ and others.
|
||||
|
||||
@cindex Pinard, F.
|
||||
@cindex Berry, K.
|
||||
This chapter was originally produced by @value{Francois} Pinard
|
||||
This chapter was originally produced by Fran@,{c}ois Pinard
|
||||
(@samp{pinard@@iro.umontreal.ca}) from the @file{getdate.y} source code,
|
||||
and then edited by K.@: Berry (@samp{kb@@cs.umb.edu}).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# mdate-sh - get modification time of a file and pretty-print it
|
||||
# Copyright (C) 1995 Software Foundation, Inc.
|
||||
# mdate-sh - get modification time of a file and pretty-print it.
|
||||
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
# Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -79,12 +79,11 @@ case $3 in
|
||||
Dec) nummonthtod=12;;
|
||||
esac
|
||||
# For the first six month of the year the time notation can also
|
||||
# be used for file modified in the last year.
|
||||
# be used for files modified in the last year.
|
||||
if (expr $nummonth \> $nummonthtod) > /dev/null;
|
||||
then
|
||||
year=`expr $year - 1`
|
||||
fi
|
||||
;;
|
||||
fi;;
|
||||
*) year=$3;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -18,12 +18,7 @@
|
||||
@syncodeindex pg cp
|
||||
@syncodeindex vr cp
|
||||
|
||||
@ifinfo
|
||||
@set Francois Franc,ois
|
||||
@end ifinfo
|
||||
@tex
|
||||
@set Francois Fran\noexpand\ptexc cois
|
||||
@end tex
|
||||
@set Francois Fran@,{c}ois
|
||||
|
||||
@ifinfo
|
||||
@format
|
||||
@@ -172,7 +167,7 @@ The GNU shell utilities are mostly compatible with the POSIX.2 standard.
|
||||
@c This paragraph appears in all of fileutils.texi, textutils.texi, and
|
||||
@c sh-utils.texi too -- so be sure to keep them consistent.
|
||||
@cindex bugs, reporting
|
||||
Please report bugs to @samp{bug-gnu-utils@@prep.ai.mit.edu}. Remember
|
||||
Please report bugs to @samp{sh-utils-bugs@@gnu.ai.mit.edu}. Remember
|
||||
to include the version number, machine architecture, input files, and
|
||||
any other information needed to reproduce the bug: your input, what you
|
||||
expected, what you got, and why it is wrong. Diffs are welcome, but
|
||||
@@ -184,7 +179,7 @@ sometimes difficult to infer. @xref{Bugs, , , gcc, GNU CC}.
|
||||
@cindex Meyering, Jim
|
||||
@c Sorry, but the @value trick doesn't work with TeX in indexing
|
||||
@c commands, and I don't want to fix it right now. --karl.
|
||||
@cindex Pinard, Francois
|
||||
@cindex Pinard, @value{Francois}
|
||||
@cindex Berry, Karl
|
||||
@cindex Stallman, Richard
|
||||
This manual is based on the Unix man pages in the distribution, which
|
||||
@@ -724,7 +719,7 @@ Exit status:
|
||||
@menu
|
||||
* Relations for expr:: | & < <= = == != >= >
|
||||
* Numeric expressions:: + - * / %
|
||||
* String expressions:: : match substr index length
|
||||
* String expressions:: <colon> match substr index length
|
||||
* Examples of expr:: Examples.
|
||||
@end menu
|
||||
|
||||
@@ -1280,7 +1275,7 @@ Translate carriage return to newline. May be negated.
|
||||
@opindex ixon
|
||||
@kindex C-s/C-q flow control
|
||||
@cindex XON/XOFF flow control
|
||||
Enable XON/XOFF flow control (that is, @key{CTRL-s}/@key{CTRL-Q}). May
|
||||
Enable XON/XOFF flow control (that is, @kbd{CTRL-S}/@kbd{CTRL-Q}). May
|
||||
be negated.
|
||||
|
||||
@item ixoff
|
||||
@@ -1602,7 +1597,7 @@ For GNU stty, giving a value of @code{^-} or @code{undef} disables that
|
||||
special character. (This is incompatible with Ultrix @code{stty},
|
||||
which uses a value of @samp{u} to disable a special character. GNU
|
||||
@code{stty} treats a value @samp{u} like any other, namely to set that
|
||||
special character to @key{u}.)
|
||||
special character to @key{U}.)
|
||||
|
||||
@table @samp
|
||||
|
||||
@@ -1768,8 +1763,8 @@ Exit status:
|
||||
@cindex print terminal file name
|
||||
@cindex terminal file name, printing
|
||||
|
||||
@code{tty} prints the file name of the tty connected to its standard
|
||||
input. It prints @samp{not a tty} if standard input is not a tty.
|
||||
@code{tty} prints the file name of the terminal connected to its standard
|
||||
input. It prints @samp{not a tty} if standard input is not a terminal.
|
||||
Synopsis:
|
||||
|
||||
@example
|
||||
@@ -1794,8 +1789,8 @@ Print nothing; only return an exit status.
|
||||
Exit status:
|
||||
|
||||
@display
|
||||
0 if standard input is a tty
|
||||
1 if standard input is not a tty
|
||||
0 if standard input is a terminal
|
||||
1 if standard input is not a terminal
|
||||
2 if given incorrect arguments
|
||||
3 if a write error occurs
|
||||
@end display
|
||||
@@ -2203,7 +2198,7 @@ standard.)
|
||||
day of week (0@dots{}6) with 0 corresponding to Sunday
|
||||
@item %W
|
||||
week number of year with Monday as first day of week (00@dots{}53).
|
||||
Days in a new year preceding the first Sunday are in week zero.
|
||||
Days in a new year preceding the first Monday are in week zero.
|
||||
@item %x
|
||||
locale's date representation (mm/dd/yy)
|
||||
@item %y
|
||||
@@ -2504,6 +2499,13 @@ Print the machine (hardware) type.
|
||||
@cindex network node name
|
||||
Print the machine's network node hostname.
|
||||
|
||||
@item -p
|
||||
@itemx --processor
|
||||
@opindex -p
|
||||
@opindex --processor
|
||||
@cindex host processor type
|
||||
Print the machine's processor type
|
||||
|
||||
@item -r
|
||||
@itemx --release
|
||||
@opindex -r
|
||||
@@ -2714,7 +2716,7 @@ nohup @var{command} [@var{arg}]@dots{}
|
||||
|
||||
@flindex nohup.out
|
||||
@code{nohup} increases the scheduling priority of @var{command} by 5, so
|
||||
it has a slightly smaller change to run. If standard output is a tty,
|
||||
it has a slightly smaller change to run. If standard output is a terminal,
|
||||
it and standard error are redirected so that they are appended to the
|
||||
file @file{nohup.out}; if that cannot be written to, they are appended
|
||||
to the file @file{$HOME/nohup.out}. If that cannot be written to, the
|
||||
|
||||
814
doc/texinfo.tex
814
doc/texinfo.tex
File diff suppressed because it is too large
Load Diff
@@ -16,13 +16,6 @@
|
||||
@syncodeindex pg cp
|
||||
@syncodeindex vr cp
|
||||
|
||||
@ifinfo
|
||||
@set Francois Franc,ois
|
||||
@end ifinfo
|
||||
@tex
|
||||
@set Francois Fran\noexpand\ptexc cois
|
||||
@end tex
|
||||
|
||||
@ifinfo
|
||||
@format
|
||||
START-INFO-DIR-ENTRY
|
||||
@@ -150,7 +143,7 @@ The GNU text utilities are mostly compatible with the @sc{POSIX.2} standard.
|
||||
@c This paragraph appears in all of fileutils.texi, textutils.texi, and
|
||||
@c sh-utils.texi too -- so be sure to keep them consistent.
|
||||
@cindex bugs, reporting
|
||||
Please report bugs to @samp{bug-gnu-utils@@prep.ai.mit.edu}. Remember
|
||||
Please report bugs to @samp{textutils-bugs@@gnu.ai.mit.edu}. Remember
|
||||
to include the version number, machine architecture, input files, and
|
||||
any other information needed to reproduce the bug: your input, what you
|
||||
expected, what you got, and why it is wrong. Diffs are welcome, but
|
||||
@@ -160,7 +153,7 @@ sometimes difficult to infer. @xref{Bugs, , , gcc, GNU CC}.
|
||||
This manual is based on the Unix man pages in the distribution, which
|
||||
were originally written by David MacKenzie and updated by Jim Meyering.
|
||||
The original @code{fmt} man page was written by Ross Paterson.
|
||||
@value{Francois} Pinard did the initial conversion to Texinfo format.
|
||||
Fran@,{c}ois Pinard did the initial conversion to Texinfo format.
|
||||
Karl Berry did the indexing, some reorganization, and editing of the results.
|
||||
Richard Stallman contributed his usual invaluable insights to the
|
||||
overall process.
|
||||
@@ -841,10 +834,12 @@ leaving the code unchanged.
|
||||
@pindex pr
|
||||
@cindex printing, preparing files for
|
||||
@cindex multicolumn output, generating
|
||||
@cindex merging files in parallel
|
||||
|
||||
@code{pr} writes each @var{file} (@samp{-} means standard input), or
|
||||
standard input if none are given, to standard output, paginating and
|
||||
optionally outputting in multicolumn format. Synopsis:
|
||||
optionally outputting in multicolumn format; optionally merges all
|
||||
@var{file}s, printing all in parallel, one per column. Synopsis:
|
||||
|
||||
@example
|
||||
pr [@var{option}]@dots{} [@var{file}]@dots{}
|
||||
@@ -852,33 +847,50 @@ pr [@var{option}]@dots{} [@var{file}]@dots{}
|
||||
|
||||
By default, a 5-line header is printed: two blank lines; a line with the
|
||||
date, the file name, and the page count; and two more blank lines. A
|
||||
five line footer (entirely) is also printed.
|
||||
footer of five blank lines is also printed. With the @samp{-f} option, a
|
||||
3-line header is printed: the leading two blank lines are omitted; no
|
||||
footer used. The default @var{page_length} in both cases is 66 lines.
|
||||
The text line of the header takes up the full @var{page_width} in the
|
||||
form @samp{yy-mm-dd HH:MM string Page nnnn}. String is a centered
|
||||
string.
|
||||
|
||||
Form feeds in the input cause page breaks in the output.
|
||||
Form feeds in the input cause page breaks in the output. Multiple form
|
||||
feeds produce empty pages.
|
||||
|
||||
Columns have equal width, separated by an optional string (default
|
||||
space). Lines will always be truncated to line width (default 72),
|
||||
unless you use the @samp{-j} option. For single column output no line
|
||||
truncation occurs by default. Use @samp{-w} option to truncate lines
|
||||
in that case.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item +@var{page}
|
||||
Begin printing with page @var{page}.
|
||||
|
||||
@item +@var{first_page}[@var{:last_page}]
|
||||
@opindex +@var{first_page}[@var{:last_page}]
|
||||
Begin printing with page @var{first_page} and stop with
|
||||
@var{last_page}. Missing @samp{:LAST_PAGE} implies end of file. While
|
||||
estimating the number of skipped pages each form feed in the input file
|
||||
results in a new page. Page counting with and without
|
||||
@samp{+@var{first_page}} is identical. By default, it starts with the
|
||||
first page of input file (not first page printed). Page numbering may be
|
||||
altered by @samp{-N} option.
|
||||
|
||||
@item -@var{column}
|
||||
@opindex -@var{column}
|
||||
Produce @var{column}-column output and print columns down. The column
|
||||
width is automatically decreased as @var{column} increases; unless you
|
||||
use the @samp{-w} option to increase the page width as well, this option
|
||||
might well cause some input to be truncated.
|
||||
@cindex down columns
|
||||
With each single @var{file}, produce @var{column}-column output and
|
||||
print columns down. The column width is automatically estimated from
|
||||
@var{page_width}. This option might well cause some columns to be
|
||||
truncated. The number of lines in the columns on each page will be
|
||||
balanced. @samp{-@var{column}} may not be used with @samp{-m} option.
|
||||
|
||||
@item -a
|
||||
@opindex -a
|
||||
@cindex across columns
|
||||
Print columns across rather than down.
|
||||
|
||||
@item -b
|
||||
@opindex -b
|
||||
@cindex balancing columns
|
||||
Balance columns on the last page.
|
||||
With each single @var{file}, print columns across rather than down.
|
||||
@var{column} must be greater than one.
|
||||
|
||||
@item -c
|
||||
@opindex -c
|
||||
@@ -903,11 +915,19 @@ is 8).
|
||||
@itemx -F
|
||||
@opindex -F
|
||||
@opindex -f
|
||||
Use a formfeed instead of newlines to separate output pages.
|
||||
Use a form feed instead of newlines to separate output pages. Default
|
||||
page length of 66 lines is not altered. But the number of lines of text
|
||||
per page changes from 56 to 63 lines.
|
||||
|
||||
|
||||
@item -h @var{header}
|
||||
@item -h @var{HEADER}
|
||||
@opindex -h
|
||||
Replace the file name in the header with the string @var{header}.
|
||||
Replace the file name in the header with the centered string
|
||||
@var{header}. Left-hand-side truncation (marked by a @samp{*}) may occur
|
||||
if the total header line @samp{yy-mm-dd HH:MM HEADER Page nnnn}
|
||||
becomes larger than @var{page_width}. @samp{-h ""} prints a blank line
|
||||
header. Don't use @samp{-h""}. A space between the -h option and the
|
||||
argument is always peremptory.
|
||||
|
||||
@item -i[@var{out-tabchar}[@var{out-tabwidth}]]
|
||||
@opindex -i
|
||||
@@ -917,30 +937,54 @@ is the output tab character (default is @key{TAB}). Second optional
|
||||
argument @var{out-tabwidth} is the output tab character's width (default
|
||||
is 8).
|
||||
|
||||
@item -l @var{n}
|
||||
@item -j
|
||||
@opindex -j
|
||||
Merge lines of full length. Used together with the column options
|
||||
@samp{-@var{column}}, @samp{-a -@var{column}} or @samp{-m}. Turns off
|
||||
@samp{-w} line truncation; no column alignment used; may be used with
|
||||
@samp{-s[@var{separator}]}.
|
||||
|
||||
|
||||
@item -l @var{page_length}
|
||||
@opindex -l
|
||||
Set the page length to @var{n} (default 66) lines. If @var{n} is less
|
||||
than 10, the headers and footers are omitted, as if the @samp{-t} option
|
||||
had been given.
|
||||
Set the page length to @var{page_length} (default 66) lines. If
|
||||
@var{page_length} is less than or equal 10 (and <= 3 with @samp{-f}),
|
||||
the headers and footers are omitted, and all form feeds set in input
|
||||
files are eliminated, as if the @samp{-T} option had been given.
|
||||
|
||||
@item -m
|
||||
@opindex -m
|
||||
Print all files in parallel, one in each column.
|
||||
Merge and print all @var{file}s in parallel, one in each column. If a
|
||||
line is too long to fit in a column, it is truncated (but see
|
||||
@samp{-j}). @samp{-s[@var{separator}]} may be used. Empty pages in some
|
||||
@var{file}s (form feeds set) produce empty columns, still marked by
|
||||
@var{separator}. Completely empty common pages show no separators or
|
||||
line numbers. The default header becomes
|
||||
@samp{yy-mm-dd HH:MM <blanks> Page nnnn}; may be used with
|
||||
@samp{-h @var{header}} to fill up the middle part.
|
||||
|
||||
|
||||
@item -n[@var{number-separator}[@var{digits}]]
|
||||
@opindex -n
|
||||
Precede each column with a line number; with parallel files (@samp{-m}),
|
||||
precede each line with a line number. Optional argument
|
||||
Precede each column with a line number; with parallel @var{file}s
|
||||
(@samp{-m}), precede only each line with a line number. Optional argument
|
||||
@var{number-separator} is the character to print after each number
|
||||
(default is @key{TAB}). Optional argument @var{digits} is the number of
|
||||
digits per line number (default is 5).
|
||||
digits per line number (default is 5). Default line counting starts with
|
||||
first line of the input file (not with the first line printed, see
|
||||
@samp{-N}).
|
||||
|
||||
@item -N @var{line_number}
|
||||
@opindex -N
|
||||
Start line counting with no. @var{line_number} at first line of first
|
||||
page printed.
|
||||
|
||||
@item -o @var{n}
|
||||
@opindex -o
|
||||
@cindex indenting lines
|
||||
@cindex left margin
|
||||
Indent each line with @var{n} (default is zero) spaces wide, i.e., set
|
||||
the left margin. The total page width is @samp{n} plus the width set
|
||||
the left margin. The total page width is @var{n} plus the width set
|
||||
with the @samp{-w} option.
|
||||
|
||||
@item -r
|
||||
@@ -948,25 +992,44 @@ with the @samp{-w} option.
|
||||
Do not print a warning message when an argument @var{file} cannot be
|
||||
opened. (The exit status will still be nonzero, however.)
|
||||
|
||||
@item -s[@var{c}]
|
||||
@item -s[@var{separator}]
|
||||
@opindex -s
|
||||
Separate columns by the single character @var{c}. If @var{c} is
|
||||
omitted, the default is space; if this option is omitted altogether, the
|
||||
default is @key{TAB}.
|
||||
Separate columns by a string @var{separator}. Don't use
|
||||
@samp{-s @var{separator}}, no space between flag and argument. If this
|
||||
option is omitted altogether, the default is a space, same as
|
||||
@samp{-s" "}. With @samp{-s} only, no separator is used, same as
|
||||
@samp{-s""}. @samp{-s} does not affect line truncation or column
|
||||
alignment.
|
||||
|
||||
@item -t
|
||||
@opindex -t
|
||||
Do not print the usual 5-line header and the 5-line footer on each page,
|
||||
and do not fill out the bottoms of pages (with blank lines or
|
||||
formfeeds).
|
||||
Do not print the usual header [and footer] on each page, and do not fill
|
||||
out the bottoms of pages (with blank lines or a form feed). No page
|
||||
structure is produced, but retain form feeds set in the input files. The
|
||||
predefined page layout is not changed. @samp{-t} or @samp{-T} may be
|
||||
useful together with other options; e.g.: @samp{-t -e4}, expand
|
||||
@key{TAB} in the input file to 4 spaces but do not do any other changes.
|
||||
Use of @samp{-t} overrides @samp{-h}.
|
||||
|
||||
@item -T
|
||||
@opindex -T
|
||||
Do not print header [and footer]. In addition eliminate all form feeds
|
||||
set in the input files.
|
||||
|
||||
@item -v
|
||||
@opindex -v
|
||||
Print unprintable characters in octal backslash notation.
|
||||
|
||||
@item -w @var{n}
|
||||
@item -w @var{page_width}
|
||||
@opindex -w
|
||||
Set the page width to @var{n} (default is 72) columns.
|
||||
Set the page width to @var{page_width} (default 72) characters.
|
||||
With/without @samp{-w}, header lines are always truncated to
|
||||
@var{page_width} characters. With @samp{-w}, text lines are truncated,
|
||||
unless @samp{-j} is used. Without @samp{-w} together with one of the
|
||||
column options @samp{-@var{column}}, @samp{-a -@var{column}} or
|
||||
@samp{-m}, default truncation of text lines to 72 characters is used.
|
||||
Without @samp{-w} and without any of the column options, no line
|
||||
truncation is used. That's equivalent to @samp{-w 72 -j}.
|
||||
|
||||
@end table
|
||||
|
||||
@@ -1572,7 +1635,6 @@ consistent. Synopsis:
|
||||
@example
|
||||
md5sum [@var{option}]@dots{} [@var{file}]@dots{}
|
||||
md5sum [@var{option}]@dots{} --check [@var{file}]
|
||||
md5sum [@var{option}]@dots{} --string=@var{string} @dots{}
|
||||
@end example
|
||||
|
||||
For each @var{file}, @samp{md5sum} outputs the MD5 checksum, a flag
|
||||
@@ -1629,11 +1691,6 @@ If all listed files are readable and are consistent with the associated
|
||||
MD5 checksums, exit successfully. Otherwise exit with a status code
|
||||
indicating there was a failure.
|
||||
|
||||
@itemx --string=@var{string}
|
||||
@opindex --string
|
||||
Compute the message digest for @var{string}, instead of for a file. The
|
||||
result is the same as for a file that contains exactly @var{string}.
|
||||
|
||||
@item -t
|
||||
@itemx --text
|
||||
@opindex -t
|
||||
@@ -1904,11 +1961,8 @@ appended to it, in which case the global ordering options are not used
|
||||
for that particular field. The @samp{-b} option may be independently
|
||||
attached to either or both of the @samp{+@var{pos}} and
|
||||
@samp{-@var{pos}} parts of a field specification, and if it is inherited
|
||||
from the global options it will be attached to both. If a @samp{-n} or
|
||||
@samp{-M} option is used, thus implying a @samp{-b} option, the
|
||||
@samp{-b} option is taken to apply to both the @samp{+@var{pos}} and the
|
||||
@samp{-@var{pos}} parts of a key specification. Keys may span multiple
|
||||
fields.
|
||||
from the global options it will be attached to both.
|
||||
Keys may span multiple fields.
|
||||
|
||||
Here are some examples to illustrate various combinations of options.
|
||||
In them, the @sc{POSIX} @samp{-k} option is used to specify sort keys rather
|
||||
|
||||
@@ -1,43 +1,25 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
noinst_LIBRARIES = fu
|
||||
noinst_LIBRARIES = libfu.a
|
||||
|
||||
EXTRA_DIST = alloca.c basename.c euidaccess.c fnmatch.c fsusage.c \
|
||||
ftruncate.c getdate.y getopt.c getopt1.c group-member.c \
|
||||
memcmp.c memcpy.c memset.c \
|
||||
mkdir.c mktime.c mountlist.c posixtm.y rename.c rmdir.c \
|
||||
stpcpy.c strcasecmp.c strdup.c strndup.c strstr.c strtol.c strtoul.c
|
||||
## FIXME: Remove mvdir.c, and rmdir.c when
|
||||
## automake is fixed -- probably for 1.1g
|
||||
EXTRA_DIST = mkdir.c rmdir.c getline.c mktime.c strftime.c
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir)
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
fu_SOURCES = getdate.c getline.c posixtm.c argmatch.c backupfile.c \
|
||||
dirname.c error.c fileblocks.c filemode.c \
|
||||
libfu_a_SOURCES = getdate.y posixtm.y getopt.c getopt1.c \
|
||||
argmatch.c backupfile.c dirname.c filemode.c \
|
||||
full-write.c getversion.c idcache.c \
|
||||
isdir.c long-options.c makepath.c modechange.c obstack.c \
|
||||
isdir.c long-options.c makepath.c modechange.c path-concat.c \
|
||||
safe-read.c save-cwd.c savedir.c stripslash.c userspec.c xgetcwd.c \
|
||||
xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
|
||||
|
||||
fu_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = argmatch.h backupfile.h error.h fnmatch.h fsusage.h \
|
||||
getline.h getopt.h group-member.h long-options.h makepath.h modechange.h \
|
||||
mountlist.h obstack.h pathmax.h save-cwd.h xstrtol.h xstrtoul.h
|
||||
mountlist.h path-concat.h pathmax.h \
|
||||
save-cwd.h xstrtol.h xstrtoul.h
|
||||
|
||||
BUILT_SOURCES = getdate.c posixtm.c
|
||||
|
||||
# Since this directory contains two parsers, we have to be careful to avoid
|
||||
# running two $(YACC)s during parallel makes. See below.
|
||||
getdate.c: @MAINT@getdate.y
|
||||
@echo expect 10 shift/reduce conflicts
|
||||
$(YACC) $(srcdir)/getdate.y
|
||||
mv y.tab.c getdate.c
|
||||
|
||||
# Make the rename atomic, in case sed is interrupted and later rerun.
|
||||
# The artificial dependency on getdate.c keeps the two parsers from being
|
||||
# built in parallel. Enforcing this little bit of sequentiality lets
|
||||
# everyone (even those without bison) still run mostly parallel builds.
|
||||
posixtm.c: @MAINT@posixtm.y getdate.c
|
||||
$(YACC) $(srcdir)/posixtm.y
|
||||
mv y.tab.c posixtm.tab.c
|
||||
sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c
|
||||
mv tposixtm.c posixtm.c
|
||||
rm -f posixtm.tab.c
|
||||
|
||||
250
lib/Makefile.in
250
lib/Makefile.in
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated automatically by automake 1.0 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.1l from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
@@ -37,113 +37,117 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
YACC = @YACC@
|
||||
GENCAT = @GENCAT@
|
||||
PERL = @PERL@
|
||||
MV = @MV@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
CC = @CC@
|
||||
RANLIB = @RANLIB@
|
||||
LN = @LN@
|
||||
RM = @RM@
|
||||
|
||||
noinst_LIBRARIES = fu
|
||||
noinst_LIBRARIES = libfu.a
|
||||
|
||||
EXTRA_DIST = alloca.c basename.c euidaccess.c fnmatch.c fsusage.c \
|
||||
ftruncate.c getdate.y getopt.c getopt1.c group-member.c \
|
||||
memcmp.c memcpy.c memset.c \
|
||||
mkdir.c mktime.c mountlist.c posixtm.y rename.c rmdir.c \
|
||||
stpcpy.c strcasecmp.c strdup.c strndup.c strstr.c strtol.c strtoul.c
|
||||
EXTRA_DIST = mkdir.c rmdir.c getline.c mktime.c strftime.c
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir)
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
fu_SOURCES = getdate.c getline.c posixtm.c argmatch.c backupfile.c \
|
||||
dirname.c error.c fileblocks.c filemode.c \
|
||||
libfu_a_SOURCES = getdate.y posixtm.y getopt.c getopt1.c \
|
||||
argmatch.c backupfile.c dirname.c filemode.c \
|
||||
full-write.c getversion.c idcache.c \
|
||||
isdir.c long-options.c makepath.c modechange.c obstack.c \
|
||||
isdir.c long-options.c makepath.c modechange.c path-concat.c \
|
||||
safe-read.c save-cwd.c savedir.c stripslash.c userspec.c xgetcwd.c \
|
||||
xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
|
||||
|
||||
fu_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = argmatch.h backupfile.h error.h fnmatch.h fsusage.h \
|
||||
getline.h getopt.h group-member.h long-options.h makepath.h modechange.h \
|
||||
mountlist.h obstack.h pathmax.h save-cwd.h xstrtol.h xstrtoul.h
|
||||
mountlist.h path-concat.h pathmax.h \
|
||||
save-cwd.h xstrtol.h xstrtoul.h
|
||||
|
||||
BUILT_SOURCES = getdate.c posixtm.c
|
||||
mkinstalldirs = $(top_srcdir)/mkinstalldirs
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
noinst_LIBFILES = libfu.a
|
||||
|
||||
CC = @CC@
|
||||
LEX = @LEX@
|
||||
YACC = @YACC@
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(LDFLAGS) -o $@
|
||||
fu_OBJECTS = getdate.o getline.o posixtm.o argmatch.o backupfile.o \
|
||||
dirname.o error.o fileblocks.o filemode.o full-write.o getversion.o \
|
||||
idcache.o isdir.o long-options.o makepath.o modechange.o obstack.o \
|
||||
libfu_a_OBJECTS = getdate.o posixtm.o getopt.o getopt1.o argmatch.o \
|
||||
backupfile.o dirname.o filemode.o full-write.o getversion.o idcache.o \
|
||||
isdir.o long-options.o makepath.o modechange.o path-concat.o \
|
||||
safe-read.o save-cwd.o savedir.o stripslash.o userspec.o xgetcwd.o \
|
||||
xmalloc.o xstrdup.o xstrtol.o xstrtoul.o yesno.o
|
||||
EXTRA_fu_SOURCES =
|
||||
LIBFILES = libfu.a
|
||||
AR = ar
|
||||
RANLIB = @RANLIB@
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
INTERLOCK = ./interlock
|
||||
YLWRAP = ./ylwrap
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(LDFLAGS) -o $@
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
DIST_COMMON = Makefile.am Makefile.in alloca.c basename.c error.c \
|
||||
error.h euidaccess.c fileblocks.c fnmatch.c fsusage.c ftruncate.c \
|
||||
getdate.c getline.c group-member.c interlock memcmp.c memcpy.c memset.c \
|
||||
mkdir.c mktime.c mountlist.c obstack.c obstack.h posixtm.c regex.c \
|
||||
regex.h rename.c rmdir.c rpmatch.c rx.c rx.h stpcpy.c strcasecmp.c \
|
||||
strdup.c strndup.c strstr.c strtol.c strtoul.c ylwrap
|
||||
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
|
||||
$(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA)
|
||||
DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
|
||||
$(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
|
||||
$(TEXINFOS) $(MANS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
DEP_FILES = $(srcdir)/.deps/alloca.P $(srcdir)/.deps/argmatch.P \
|
||||
$(srcdir)/.deps/backupfile.P $(srcdir)/.deps/dirname.P \
|
||||
$(srcdir)/.deps/error.P $(srcdir)/.deps/fileblocks.P \
|
||||
$(srcdir)/.deps/filemode.P $(srcdir)/.deps/fnmatch.P \
|
||||
$(srcdir)/.deps/fsusage.P $(srcdir)/.deps/ftruncate.P \
|
||||
$(srcdir)/.deps/full-write.P $(srcdir)/.deps/getdate.P \
|
||||
$(srcdir)/.deps/getline.P $(srcdir)/.deps/getopt.P \
|
||||
$(srcdir)/.deps/getopt1.P $(srcdir)/.deps/getversion.P \
|
||||
$(srcdir)/.deps/idcache.P $(srcdir)/.deps/isdir.P \
|
||||
$(srcdir)/.deps/long-options.P $(srcdir)/.deps/makepath.P \
|
||||
$(srcdir)/.deps/modechange.P $(srcdir)/.deps/mountlist.P \
|
||||
$(srcdir)/.deps/obstack.P $(srcdir)/.deps/posixtm.P \
|
||||
$(srcdir)/.deps/safe-read.P $(srcdir)/.deps/save-cwd.P \
|
||||
$(srcdir)/.deps/savedir.P $(srcdir)/.deps/stripslash.P \
|
||||
$(srcdir)/.deps/userspec.P $(srcdir)/.deps/xgetcwd.P \
|
||||
$(srcdir)/.deps/xmalloc.P $(srcdir)/.deps/xstrdup.P \
|
||||
$(srcdir)/.deps/xstrtol.P $(srcdir)/.deps/xstrtoul.P \
|
||||
$(srcdir)/.deps/yesno.P
|
||||
SOURCES = $(fu_SOURCES)
|
||||
OBJECTS = $(fu_OBJECTS)
|
||||
DEP_FILES = .deps/alloca.P .deps/argmatch.P .deps/backupfile.P \
|
||||
.deps/basename.P .deps/dirname.P .deps/error.P .deps/euidaccess.P \
|
||||
.deps/fileblocks.P .deps/filemode.P .deps/fnmatch.P .deps/fsusage.P \
|
||||
.deps/ftruncate.P .deps/full-write.P .deps/getdate.P .deps/getline.P \
|
||||
.deps/getopt.P .deps/getopt1.P .deps/getversion.P .deps/group-member.P \
|
||||
.deps/idcache.P .deps/isdir.P .deps/long-options.P .deps/makepath.P \
|
||||
.deps/memcmp.P .deps/memcpy.P .deps/memset.P .deps/mkdir.P \
|
||||
.deps/mktime.P .deps/modechange.P .deps/mountlist.P .deps/obstack.P \
|
||||
.deps/path-concat.P .deps/posixtm.P .deps/regex.P .deps/rename.P \
|
||||
.deps/rmdir.P .deps/rpmatch.P .deps/rx.P .deps/safe-read.P \
|
||||
.deps/save-cwd.P .deps/savedir.P .deps/stpcpy.P .deps/strcasecmp.P \
|
||||
.deps/strdup.P .deps/stripslash.P .deps/strndup.P .deps/strstr.P \
|
||||
.deps/strtol.P .deps/strtoul.P .deps/userspec.P .deps/xgetcwd.P \
|
||||
.deps/xmalloc.P .deps/xstrdup.P .deps/xstrtol.P .deps/xstrtoul.P \
|
||||
.deps/yesno.P
|
||||
SOURCES = $(libfu_a_SOURCES)
|
||||
OBJECTS = $(libfu_a_OBJECTS)
|
||||
|
||||
default: all
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .y
|
||||
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL)
|
||||
cd $(top_srcdir) && automake --gnu lib/Makefile
|
||||
|
||||
$(srcdir)/Makefile.in: @MAINT@Makefile.am $(top_srcdir)/configure.in
|
||||
cd $(top_srcdir) && automake $(subdir)/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
Makefile: $(top_builddir)/config.status Makefile.in
|
||||
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
|
||||
|
||||
mostlyclean-noinstLIBRARIES:
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
rm -f $(noinst_LIBFILES)
|
||||
test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
rm -f *.o core
|
||||
@@ -154,20 +158,28 @@ distclean-compile:
|
||||
rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
$(fu_OBJECTS): ../config.h
|
||||
$(libfu_a_OBJECTS): ../config.h
|
||||
|
||||
libfu.a: $(fu_OBJECTS) $(fu_LIBADD)
|
||||
libfu.a: $(libfu_a_OBJECTS) $(libfu_a_DEPENDENCIES)
|
||||
rm -f libfu.a
|
||||
$(AR) cru libfu.a $(fu_OBJECTS) $(fu_LIBADD)
|
||||
$(AR) cru libfu.a $(libfu_a_OBJECTS) $(libfu_a_LIBADD)
|
||||
$(RANLIB) libfu.a
|
||||
.y.c:
|
||||
$(SHELL) $(INTERLOCK) =yacclockdir $(YLWRAP) "$(YACC)" y.tab.c $*.c y.tab.h $*.h -- $(YFLAGS) $<
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES)
|
||||
here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
|
||||
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES)
|
||||
here=`pwd` && cd $(srcdir) && etags $(ETAGS_ARGS) $(SOURCES) $(HEADERS) -o $$here/TAGS
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list="$(SUBDIRS)"; for subdir in $$list; do \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
done; \
|
||||
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$$tags" \
|
||||
|| cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) -o $$here/TAGS
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
@@ -178,59 +190,58 @@ distclean-tags:
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
subdir = lib
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
distdir: $(DEP_DISTFILES)
|
||||
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
|
||||
|
||||
subdir = lib
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
|
||||
# This fragment is probably only useful for maintainers. It relies on
|
||||
# GNU make and gcc. It is only included in the generated Makefile.in
|
||||
# if `automake' is not passed the `--include-deps' flag.
|
||||
MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
MKDEP = gcc -MM $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
-include $(srcdir)/.deps/.P
|
||||
$(srcdir)/.deps/.P: $(BUILT_SOURCES)
|
||||
cd $(srcdir) && test -d .deps || mkdir .deps
|
||||
-include .deps/.P
|
||||
.deps/.P:
|
||||
test -d .deps || mkdir .deps
|
||||
echo > $@
|
||||
|
||||
-include $(DEP_FILES)
|
||||
$(DEP_FILES): $(srcdir)/.deps/.P
|
||||
$(DEP_FILES): .deps/.P
|
||||
|
||||
$(srcdir)/.deps/%.P: $(srcdir)/%.c
|
||||
@echo "mkdeps $< > $@"
|
||||
@re=`echo 's,^$(srcdir)//*,,g;s, $(srcdir)//*, ,g' | sed 's,\.,\\\\.,g'`; \
|
||||
$(MKDEP) $< | sed "$$re" > $@-tmp
|
||||
@if test -n "$o"; then \
|
||||
sed 's/\.o:/$$o:/' $@-tmp > $@; \
|
||||
rm $@-tmp; \
|
||||
else \
|
||||
mv $@-tmp $@; \
|
||||
fi
|
||||
mostlyclean-depend:
|
||||
|
||||
# End of maintainer-only section
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
|
||||
maintainer-clean-depend:
|
||||
rm -rf .deps
|
||||
|
||||
.deps/%.P: $(srcdir)/%.c
|
||||
@echo "Computing dependencies for $<..."
|
||||
@o='o'; \
|
||||
test -n "$o" && o='$$o'; \
|
||||
$(MKDEP) $< | sed "s/^\(.*\)\.o:/\1.$$o \1.l$$o:/" > $@
|
||||
info:
|
||||
|
||||
dvi:
|
||||
|
||||
check: all
|
||||
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
|
||||
install-exec:
|
||||
$(NORMAL_INSTALL)
|
||||
|
||||
install-data:
|
||||
$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall:
|
||||
|
||||
all: $(LIBFILES) $(HEADERS) Makefile
|
||||
all: $(LIBRARIES) $(BUILT_SOURCES) $(HEADERS) Makefile
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
|
||||
@@ -245,24 +256,26 @@ clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
rm -f Makefile $(DISTCLEANFILES)
|
||||
rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
|
||||
rm -f config.cache config.log stamp-h
|
||||
test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
|
||||
mostlyclean
|
||||
clean: clean-noinstLIBRARIES clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
|
||||
distclean-generic clean
|
||||
distclean-depend distclean-generic clean
|
||||
rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-noinstLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
@@ -270,32 +283,13 @@ maintainer-clean: maintainer-clean-noinstLIBRARIES \
|
||||
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info dvi check installcheck \
|
||||
install-exec install-data install uninstall all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
|
||||
distclean-depend clean-depend maintainer-clean-depend info dvi \
|
||||
installcheck install-exec install-data install uninstall all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Since this directory contains two parsers, we have to be careful to avoid
|
||||
# running two $(YACC)s during parallel makes. See below.
|
||||
getdate.c: @MAINT@getdate.y
|
||||
@echo expect 10 shift/reduce conflicts
|
||||
$(YACC) $(srcdir)/getdate.y
|
||||
mv y.tab.c getdate.c
|
||||
|
||||
# Make the rename atomic, in case sed is interrupted and later rerun.
|
||||
# The artificial dependency on getdate.c keeps the two parsers from being
|
||||
# built in parallel. Enforcing this little bit of sequentiality lets
|
||||
# everyone (even those without bison) still run mostly parallel builds.
|
||||
posixtm.c: @MAINT@posixtm.y getdate.c
|
||||
$(YACC) $(srcdir)/posixtm.y
|
||||
mv y.tab.c posixtm.tab.c
|
||||
sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c
|
||||
mv tposixtm.c posixtm.c
|
||||
rm -f posixtm.tab.c
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
496
lib/alloca.c
496
lib/alloca.c
@@ -1,37 +1,42 @@
|
||||
/*
|
||||
alloca -- (mostly) portable public-domain implementation -- D A Gwyn
|
||||
/* alloca.c -- allocate automatically reclaimed memory
|
||||
(Mostly) portable public-domain implementation -- D A Gwyn
|
||||
|
||||
last edit: 86/05/30 rms
|
||||
include config.h, since on VMS it renames some symbols.
|
||||
Use xmalloc instead of malloc.
|
||||
This implementation of the PWB library alloca function,
|
||||
which is used to allocate space off the run-time stack so
|
||||
that it is automatically reclaimed upon procedure exit,
|
||||
was inspired by discussions with J. Q. Johnson of Cornell.
|
||||
J.Otto Tennant <jot@cray.com> contributed the Cray support.
|
||||
|
||||
This implementation of the PWB library alloca() function,
|
||||
which is used to allocate space off the run-time stack so
|
||||
that it is automatically reclaimed upon procedure exit,
|
||||
was inspired by discussions with J. Q. Johnson of Cornell.
|
||||
There are some preprocessor constants that can
|
||||
be defined when compiling for your specific system, for
|
||||
improved efficiency; however, the defaults should be okay.
|
||||
|
||||
It should work under any C implementation that uses an
|
||||
actual procedure stack (as opposed to a linked list of
|
||||
frames). There are some preprocessor constants that can
|
||||
be defined when compiling for your specific system, for
|
||||
improved efficiency; however, the defaults should be okay.
|
||||
The general concept of this implementation is to keep
|
||||
track of all alloca-allocated blocks, and reclaim any
|
||||
that are found to be deeper in the stack than the current
|
||||
invocation. This heuristic does not reclaim storage as
|
||||
soon as it becomes invalid, but it will do so eventually.
|
||||
|
||||
The general concept of this implementation is to keep
|
||||
track of all alloca()-allocated blocks, and reclaim any
|
||||
that are found to be deeper in the stack than the current
|
||||
invocation. This heuristic does not reclaim storage as
|
||||
soon as it becomes invalid, but it will do so eventually.
|
||||
As a special case, alloca(0) reclaims storage without
|
||||
allocating any. It is a good idea to use alloca(0) in
|
||||
your main control loop, etc. to force garbage collection. */
|
||||
|
||||
As a special case, alloca(0) reclaims storage without
|
||||
allocating any. It is a good idea to use alloca(0) in
|
||||
your main control loop, etc. to force garbage collection.
|
||||
*/
|
||||
#ifndef lint
|
||||
static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef emacs
|
||||
#include "config.h"
|
||||
#include "blockinput.h"
|
||||
#endif
|
||||
|
||||
/* If compiling with GCC 2, this file's not needed. */
|
||||
#if !defined (__GNUC__) || __GNUC__ < 2
|
||||
|
||||
/* If someone has defined alloca as a macro,
|
||||
there must be some other way alloca is supposed to work. */
|
||||
#ifndef alloca
|
||||
|
||||
#ifdef emacs
|
||||
#ifdef static
|
||||
/* actually, only want this if static is defined as ""
|
||||
-- this is for usg, in which emacs must undefine static
|
||||
@@ -45,72 +50,90 @@ lose
|
||||
#endif /* static */
|
||||
#endif /* emacs */
|
||||
|
||||
#ifndef alloca /* If compiling with GCC, this file's not needed. */
|
||||
/* If your stack is a linked list of frames, you have to
|
||||
provide an "address metric" ADDRESS_FUNCTION macro. */
|
||||
|
||||
#ifdef __STDC__
|
||||
typedef void *pointer; /* generic pointer type */
|
||||
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
long i00afunc ();
|
||||
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
|
||||
#else
|
||||
typedef char *pointer; /* generic pointer type */
|
||||
#define ADDRESS_FUNCTION(arg) &(arg)
|
||||
#endif
|
||||
|
||||
#define NULL 0 /* null pointer constant */
|
||||
#if __STDC__
|
||||
typedef void *pointer;
|
||||
#else
|
||||
typedef char *pointer;
|
||||
#endif
|
||||
|
||||
extern void free();
|
||||
extern pointer xmalloc();
|
||||
#define NULL 0
|
||||
|
||||
/*
|
||||
Define STACK_DIRECTION if you know the direction of stack
|
||||
growth for your system; otherwise it will be automatically
|
||||
deduced at run-time.
|
||||
/* Different portions of Emacs need to call different versions of
|
||||
malloc. The Emacs executable needs alloca to call xmalloc, because
|
||||
ordinary malloc isn't protected from input signals. On the other
|
||||
hand, the utilities in lib-src need alloca to call malloc; some of
|
||||
them are very simple, and don't have an xmalloc routine.
|
||||
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
Non-Emacs programs expect this to call xmalloc.
|
||||
|
||||
Callers below should use malloc. */
|
||||
|
||||
#ifndef emacs
|
||||
#define malloc xmalloc
|
||||
#endif
|
||||
extern pointer malloc ();
|
||||
|
||||
/* Define STACK_DIRECTION if you know the direction of stack
|
||||
growth for your system; otherwise it will be automatically
|
||||
deduced at run-time.
|
||||
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
|
||||
#ifndef STACK_DIRECTION
|
||||
#define STACK_DIRECTION 0 /* direction unknown */
|
||||
#define STACK_DIRECTION 0 /* Direction unknown. */
|
||||
#endif
|
||||
|
||||
#if STACK_DIRECTION != 0
|
||||
|
||||
#define STACK_DIR STACK_DIRECTION /* known at compile-time */
|
||||
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
|
||||
|
||||
#else /* STACK_DIRECTION == 0; need run-time code */
|
||||
#else /* STACK_DIRECTION == 0; need run-time code. */
|
||||
|
||||
static int stack_dir; /* 1 or -1 once known */
|
||||
static int stack_dir; /* 1 or -1 once known. */
|
||||
#define STACK_DIR stack_dir
|
||||
|
||||
static void
|
||||
find_stack_direction (/* void */)
|
||||
find_stack_direction ()
|
||||
{
|
||||
static char *addr = NULL; /* address of first
|
||||
`dummy', once known */
|
||||
auto char dummy; /* to get stack address */
|
||||
static char *addr = NULL; /* Address of first `dummy', once known. */
|
||||
auto char dummy; /* To get stack address. */
|
||||
|
||||
if (addr == NULL)
|
||||
{ /* initial entry */
|
||||
addr = &dummy;
|
||||
{ /* Initial entry. */
|
||||
addr = ADDRESS_FUNCTION (dummy);
|
||||
|
||||
find_stack_direction (); /* recurse once */
|
||||
find_stack_direction (); /* Recurse once. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Second entry. */
|
||||
if (ADDRESS_FUNCTION (dummy) > addr)
|
||||
stack_dir = 1; /* Stack grew upward. */
|
||||
else
|
||||
stack_dir = -1; /* Stack grew downward. */
|
||||
}
|
||||
else /* second entry */
|
||||
if (&dummy > addr)
|
||||
stack_dir = 1; /* stack grew upward */
|
||||
else
|
||||
stack_dir = -1; /* stack grew downward */
|
||||
}
|
||||
|
||||
#endif /* STACK_DIRECTION == 0 */
|
||||
#endif /* STACK_DIRECTION == 0 */
|
||||
|
||||
/*
|
||||
An "alloca header" is used to:
|
||||
(a) chain together all alloca()ed blocks;
|
||||
(b) keep track of stack depth.
|
||||
/* An "alloca header" is used to:
|
||||
(a) chain together all alloca'ed blocks;
|
||||
(b) keep track of stack depth.
|
||||
|
||||
It is very important that sizeof(header) agree with malloc()
|
||||
alignment chunk size. The following default should work okay.
|
||||
*/
|
||||
It is very important that sizeof(header) agree with malloc
|
||||
alignment chunk size. The following default should work okay. */
|
||||
|
||||
#ifndef ALIGN_SIZE
|
||||
#define ALIGN_SIZE sizeof(double)
|
||||
@@ -118,77 +141,352 @@ find_stack_direction (/* void */)
|
||||
|
||||
typedef union hdr
|
||||
{
|
||||
char align[ALIGN_SIZE]; /* to force sizeof(header) */
|
||||
char align[ALIGN_SIZE]; /* To force sizeof(header). */
|
||||
struct
|
||||
{
|
||||
union hdr *next; /* for chaining headers */
|
||||
char *deep; /* for stack depth measure */
|
||||
union hdr *next; /* For chaining headers. */
|
||||
char *deep; /* For stack depth measure. */
|
||||
} h;
|
||||
} header;
|
||||
|
||||
/*
|
||||
alloca( size ) returns a pointer to at least `size' bytes of
|
||||
storage which will be automatically reclaimed upon exit from
|
||||
the procedure that called alloca(). Originally, this space
|
||||
was supposed to be taken from the current stack frame of the
|
||||
caller, but that method cannot be made to work for some
|
||||
implementations of C, for example under Gould's UTX/32.
|
||||
*/
|
||||
static header *last_alloca_header = NULL; /* -> last alloca header. */
|
||||
|
||||
static header *last_alloca_header = NULL; /* -> last alloca header */
|
||||
/* Return a pointer to at least SIZE bytes of storage,
|
||||
which will be automatically reclaimed upon exit from
|
||||
the procedure that called alloca. Originally, this space
|
||||
was supposed to be taken from the current stack frame of the
|
||||
caller, but that method cannot be made to work for some
|
||||
implementations of C, for example under Gould's UTX/32. */
|
||||
|
||||
pointer
|
||||
alloca (size) /* returns pointer to storage */
|
||||
unsigned size; /* # bytes to allocate */
|
||||
alloca (size)
|
||||
unsigned size;
|
||||
{
|
||||
auto char probe; /* probes stack depth: */
|
||||
register char *depth = &probe;
|
||||
auto char probe; /* Probes stack depth: */
|
||||
register char *depth = ADDRESS_FUNCTION (probe);
|
||||
|
||||
#if STACK_DIRECTION == 0
|
||||
if (STACK_DIR == 0) /* unknown growth direction */
|
||||
if (STACK_DIR == 0) /* Unknown growth direction. */
|
||||
find_stack_direction ();
|
||||
#endif
|
||||
|
||||
/* Reclaim garbage, defined as all alloca()ed storage that
|
||||
was allocated from deeper in the stack than currently. */
|
||||
/* Reclaim garbage, defined as all alloca'd storage that
|
||||
was allocated from deeper in the stack than currently. */
|
||||
|
||||
{
|
||||
register header *hp; /* traverses linked list */
|
||||
register header *hp; /* Traverses linked list. */
|
||||
|
||||
#ifdef emacs
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
for (hp = last_alloca_header; hp != NULL;)
|
||||
if ((STACK_DIR > 0 && hp->h.deep > depth)
|
||||
|| (STACK_DIR < 0 && hp->h.deep < depth))
|
||||
{
|
||||
register header *np = hp->h.next;
|
||||
register header *np = hp->h.next;
|
||||
|
||||
free ((pointer) hp); /* collect garbage */
|
||||
free ((pointer) hp); /* Collect garbage. */
|
||||
|
||||
hp = np; /* -> next header */
|
||||
hp = np; /* -> next header. */
|
||||
}
|
||||
else
|
||||
break; /* rest are not deeper */
|
||||
break; /* Rest are not deeper. */
|
||||
|
||||
last_alloca_header = hp; /* -> last valid storage */
|
||||
last_alloca_header = hp; /* -> last valid storage. */
|
||||
|
||||
#ifdef emacs
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (size == 0)
|
||||
return NULL; /* no allocation required */
|
||||
return NULL; /* No allocation required. */
|
||||
|
||||
/* Allocate combined header + user data storage. */
|
||||
/* Allocate combined header + user data storage. */
|
||||
|
||||
{
|
||||
register pointer new = xmalloc (sizeof (header) + size);
|
||||
/* address of header */
|
||||
register pointer new = malloc (sizeof (header) + size);
|
||||
/* Address of header. */
|
||||
|
||||
((header *)new)->h.next = last_alloca_header;
|
||||
((header *)new)->h.deep = depth;
|
||||
((header *) new)->h.next = last_alloca_header;
|
||||
((header *) new)->h.deep = depth;
|
||||
|
||||
last_alloca_header = (header *)new;
|
||||
last_alloca_header = (header *) new;
|
||||
|
||||
/* User storage begins just after header. */
|
||||
/* User storage begins just after header. */
|
||||
|
||||
return (pointer)((char *)new + sizeof(header));
|
||||
return (pointer) ((char *) new + sizeof (header));
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifndef CRAY_STACK
|
||||
#define CRAY_STACK
|
||||
#ifndef CRAY2
|
||||
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
|
||||
struct stack_control_header
|
||||
{
|
||||
long shgrow:32; /* Number of times stack has grown. */
|
||||
long shaseg:32; /* Size of increments to stack. */
|
||||
long shhwm:32; /* High water mark of stack. */
|
||||
long shsize:32; /* Current size of stack (all segments). */
|
||||
};
|
||||
|
||||
/* The stack segment linkage control information occurs at
|
||||
the high-address end of a stack segment. (The stack
|
||||
grows from low addresses to high addresses.) The initial
|
||||
part of the stack segment linkage control information is
|
||||
0200 (octal) words. This provides for register storage
|
||||
for the routine which overflows the stack. */
|
||||
|
||||
struct stack_segment_linkage
|
||||
{
|
||||
long ss[0200]; /* 0200 overflow words. */
|
||||
long sssize:32; /* Number of words in this segment. */
|
||||
long ssbase:32; /* Offset to stack base. */
|
||||
long:32;
|
||||
long sspseg:32; /* Offset to linkage control of previous
|
||||
segment of stack. */
|
||||
long:32;
|
||||
long sstcpt:32; /* Pointer to task common address block. */
|
||||
long sscsnm; /* Private control structure number for
|
||||
microtasking. */
|
||||
long ssusr1; /* Reserved for user. */
|
||||
long ssusr2; /* Reserved for user. */
|
||||
long sstpid; /* Process ID for pid based multi-tasking. */
|
||||
long ssgvup; /* Pointer to multitasking thread giveup. */
|
||||
long sscray[7]; /* Reserved for Cray Research. */
|
||||
long ssa0;
|
||||
long ssa1;
|
||||
long ssa2;
|
||||
long ssa3;
|
||||
long ssa4;
|
||||
long ssa5;
|
||||
long ssa6;
|
||||
long ssa7;
|
||||
long sss0;
|
||||
long sss1;
|
||||
long sss2;
|
||||
long sss3;
|
||||
long sss4;
|
||||
long sss5;
|
||||
long sss6;
|
||||
long sss7;
|
||||
};
|
||||
|
||||
#else /* CRAY2 */
|
||||
/* The following structure defines the vector of words
|
||||
returned by the STKSTAT library routine. */
|
||||
struct stk_stat
|
||||
{
|
||||
long now; /* Current total stack size. */
|
||||
long maxc; /* Amount of contiguous space which would
|
||||
be required to satisfy the maximum
|
||||
stack demand to date. */
|
||||
long high_water; /* Stack high-water mark. */
|
||||
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
|
||||
long hits; /* Number of internal buffer hits. */
|
||||
long extends; /* Number of block extensions. */
|
||||
long stko_mallocs; /* Block allocations by $STKOFEN. */
|
||||
long underflows; /* Number of stack underflow calls ($STKRETN). */
|
||||
long stko_free; /* Number of deallocations by $STKRETN. */
|
||||
long stkm_free; /* Number of deallocations by $STKMRET. */
|
||||
long segments; /* Current number of stack segments. */
|
||||
long maxs; /* Maximum number of stack segments so far. */
|
||||
long pad_size; /* Stack pad size. */
|
||||
long current_address; /* Current stack segment address. */
|
||||
long current_size; /* Current stack segment size. This
|
||||
number is actually corrupted by STKSTAT to
|
||||
include the fifteen word trailer area. */
|
||||
long initial_address; /* Address of initial segment. */
|
||||
long initial_size; /* Size of initial segment. */
|
||||
};
|
||||
|
||||
/* The following structure describes the data structure which trails
|
||||
any stack segment. I think that the description in 'asdef' is
|
||||
out of date. I only describe the parts that I am sure about. */
|
||||
|
||||
struct stk_trailer
|
||||
{
|
||||
long this_address; /* Address of this block. */
|
||||
long this_size; /* Size of this block (does not include
|
||||
this trailer). */
|
||||
long unknown2;
|
||||
long unknown3;
|
||||
long link; /* Address of trailer block of previous
|
||||
segment. */
|
||||
long unknown5;
|
||||
long unknown6;
|
||||
long unknown7;
|
||||
long unknown8;
|
||||
long unknown9;
|
||||
long unknown10;
|
||||
long unknown11;
|
||||
long unknown12;
|
||||
long unknown13;
|
||||
long unknown14;
|
||||
};
|
||||
|
||||
#endif /* CRAY2 */
|
||||
#endif /* not CRAY_STACK */
|
||||
|
||||
#ifdef CRAY2
|
||||
/* Determine a "stack measure" for an arbitrary ADDRESS.
|
||||
I doubt that "lint" will like this much. */
|
||||
|
||||
static long
|
||||
i00afunc (long *address)
|
||||
{
|
||||
struct stk_stat status;
|
||||
struct stk_trailer *trailer;
|
||||
long *block, size;
|
||||
long result = 0;
|
||||
|
||||
/* We want to iterate through all of the segments. The first
|
||||
step is to get the stack status structure. We could do this
|
||||
more quickly and more directly, perhaps, by referencing the
|
||||
$LM00 common block, but I know that this works. */
|
||||
|
||||
STKSTAT (&status);
|
||||
|
||||
/* Set up the iteration. */
|
||||
|
||||
trailer = (struct stk_trailer *) (status.current_address
|
||||
+ status.current_size
|
||||
- 15);
|
||||
|
||||
/* There must be at least one stack segment. Therefore it is
|
||||
a fatal error if "trailer" is null. */
|
||||
|
||||
if (trailer == 0)
|
||||
abort ();
|
||||
|
||||
/* Discard segments that do not contain our argument address. */
|
||||
|
||||
while (trailer != 0)
|
||||
{
|
||||
block = (long *) trailer->this_address;
|
||||
size = trailer->this_size;
|
||||
if (block == 0 || size == 0)
|
||||
abort ();
|
||||
trailer = (struct stk_trailer *) trailer->link;
|
||||
if ((block <= address) && (address < (block + size)))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set the result to the offset in this segment and add the sizes
|
||||
of all predecessor segments. */
|
||||
|
||||
result = address - block;
|
||||
|
||||
if (trailer == 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (trailer->this_size <= 0)
|
||||
abort ();
|
||||
result += trailer->this_size;
|
||||
trailer = (struct stk_trailer *) trailer->link;
|
||||
}
|
||||
while (trailer != 0);
|
||||
|
||||
/* We are done. Note that if you present a bogus address (one
|
||||
not in any segment), you will get a different number back, formed
|
||||
from subtracting the address of the first block. This is probably
|
||||
not what you want. */
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
#else /* not CRAY2 */
|
||||
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
|
||||
Determine the number of the cell within the stack,
|
||||
given the address of the cell. The purpose of this
|
||||
routine is to linearize, in some sense, stack addresses
|
||||
for alloca. */
|
||||
|
||||
static long
|
||||
i00afunc (long address)
|
||||
{
|
||||
long stkl = 0;
|
||||
|
||||
long size, pseg, this_segment, stack;
|
||||
long result = 0;
|
||||
|
||||
struct stack_segment_linkage *ssptr;
|
||||
|
||||
/* Register B67 contains the address of the end of the
|
||||
current stack segment. If you (as a subprogram) store
|
||||
your registers on the stack and find that you are past
|
||||
the contents of B67, you have overflowed the segment.
|
||||
|
||||
B67 also points to the stack segment linkage control
|
||||
area, which is what we are really interested in. */
|
||||
|
||||
stkl = CRAY_STACKSEG_END ();
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
|
||||
/* If one subtracts 'size' from the end of the segment,
|
||||
one has the address of the first word of the segment.
|
||||
|
||||
If this is not the first segment, 'pseg' will be
|
||||
nonzero. */
|
||||
|
||||
pseg = ssptr->sspseg;
|
||||
size = ssptr->sssize;
|
||||
|
||||
this_segment = stkl - size;
|
||||
|
||||
/* It is possible that calling this routine itself caused
|
||||
a stack overflow. Discard stack segments which do not
|
||||
contain the target address. */
|
||||
|
||||
while (!(this_segment <= address && address <= stkl))
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
|
||||
#endif
|
||||
if (pseg == 0)
|
||||
break;
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
pseg = ssptr->sspseg;
|
||||
this_segment = stkl - size;
|
||||
}
|
||||
|
||||
result = address - this_segment;
|
||||
|
||||
/* If you subtract pseg from the current end of the stack,
|
||||
you get the address of the previous stack segment's end.
|
||||
This seems a little convoluted to me, but I'll bet you save
|
||||
a cycle somewhere. */
|
||||
|
||||
while (pseg != 0)
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o\n", pseg, size);
|
||||
#endif
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
pseg = ssptr->sspseg;
|
||||
result += size;
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
#endif /* not CRAY2 */
|
||||
#endif /* CRAY */
|
||||
|
||||
#endif /* no alloca */
|
||||
#endif /* not GCC version 2 */
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie <djm@ai.mit.edu> */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef STDC_HEADERS
|
||||
#include <string.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
extern char *program_name;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* David MacKenzie <djm@gnu.ai.mit.edu>.
|
||||
Some algorithms adapted from GNU Emacs. */
|
||||
@@ -68,8 +68,17 @@ char *malloc ();
|
||||
# define IN_CTYPE_DOMAIN(c) isascii(c)
|
||||
#endif
|
||||
|
||||
#define ISDIGIT(c) (IN_CTYPE_DOMAIN ((unsigned char) (c)) \
|
||||
&& isdigit ((unsigned char) (c)))
|
||||
#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
|
||||
|
||||
/* ISDIGIT differs from ISDIGIT_LOCALE, as follows:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to ISDIGIT_LOCALE unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to Posix. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* When to make backup files. */
|
||||
enum backup_type
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Return NAME with any leading path stripped off.
|
||||
|
||||
@@ -15,31 +15,32 @@
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
/* Returns the canonical hostname associated with HOST (allocated in a static
|
||||
@@ -53,24 +54,24 @@ canon_host (host)
|
||||
|
||||
if (he)
|
||||
{
|
||||
#ifdef HAVE_GETHOSTBYADDR
|
||||
# ifdef HAVE_GETHOSTBYADDR
|
||||
char *addr = 0;
|
||||
|
||||
/* Try and get an ascii version of the numeric host address. */
|
||||
switch (he->h_addrtype)
|
||||
{
|
||||
#ifdef HAVE_INET_NTOA
|
||||
# ifdef HAVE_INET_NTOA
|
||||
case AF_INET:
|
||||
addr = inet_ntoa (*(struct in_addr *) he->h_addr);
|
||||
break;
|
||||
#endif /* HAVE_INET_NTOA */
|
||||
# endif /* HAVE_INET_NTOA */
|
||||
}
|
||||
|
||||
if (addr && strcmp (he->h_name, addr) == 0)
|
||||
/* gethostbyname() cheated! Lookup the host name via the address
|
||||
this time to get the actual host name. */
|
||||
he = gethostbyaddr (he->h_addr, he->h_length, he->h_addrtype);
|
||||
#endif /* HAVE_GETHOSTBYADDR */
|
||||
# endif /* HAVE_GETHOSTBYADDR */
|
||||
|
||||
if (he)
|
||||
return (char *) (he->h_name);
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
|
||||
31
lib/error.c
31
lib/error.c
@@ -1,23 +1,23 @@
|
||||
/* error.c -- error handler for noninteractive utilities
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
@@ -47,6 +47,9 @@ void exit ();
|
||||
# define _(String) String
|
||||
#endif
|
||||
|
||||
/* Get prototypes for the functions defined here. */
|
||||
#include <error.h>
|
||||
|
||||
/* If NULL, error will flush stdout, then print on stderr the program
|
||||
name, a colon and a space. Otherwise, error will call this
|
||||
function without parameters instead. */
|
||||
@@ -65,7 +68,7 @@ unsigned int error_message_count;
|
||||
# define program_name program_invocation_name
|
||||
# include <errno.h>
|
||||
|
||||
#else
|
||||
#else /* not _LIBC */
|
||||
|
||||
/* The calling program should define program_name and set it to the
|
||||
name of the executing program. */
|
||||
@@ -89,7 +92,7 @@ private_strerror (errnum)
|
||||
}
|
||||
# define strerror private_strerror
|
||||
# endif /* HAVE_STRERROR */
|
||||
#endif /* _LIBC */
|
||||
#endif /* not _LIBC */
|
||||
|
||||
/* Print the program name and error message MESSAGE, which is a printf-style
|
||||
format string with optional args.
|
||||
|
||||
50
lib/error.h
50
lib/error.h
@@ -1,37 +1,37 @@
|
||||
/* error.h -- declaration for error-reporting function
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _error_h_
|
||||
#define _error_h_
|
||||
#ifndef ERROR_H_
|
||||
# define ERROR_H_
|
||||
|
||||
#ifndef __attribute__
|
||||
# ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined (__STDC__) && __STDC__
|
||||
|
||||
/* Print a message with `fprintf (stderr, FORMAT, ...)';
|
||||
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
|
||||
@@ -49,11 +49,11 @@ extern void error_at_line (int status, int errnum, const char *fname,
|
||||
function without parameters instead. */
|
||||
extern void (*error_print_progname) (void);
|
||||
|
||||
#else
|
||||
# else
|
||||
void error ();
|
||||
void error_at_line ();
|
||||
extern void (*error_print_progname) ();
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* This variable is incremented each time `error' is called. */
|
||||
extern unsigned int error_message_count;
|
||||
@@ -62,4 +62,4 @@ extern unsigned int error_message_count;
|
||||
variable controls whether this mode is selected or not. */
|
||||
extern int error_one_per_line;
|
||||
|
||||
#endif /* _error_h_ */
|
||||
#endif /* not ERROR_H_ */
|
||||
|
||||
@@ -15,8 +15,8 @@ Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place -
|
||||
Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie and Torbjorn Granlund.
|
||||
Adapted for GNU C library by Roland McGrath. */
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Brian L. Matthews, blm@6sceng.UUCP. */
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@@ -198,6 +198,17 @@ ftypelet (bits)
|
||||
if (S_ISNWK (bits))
|
||||
return 'n';
|
||||
#endif
|
||||
|
||||
#ifdef S_ISOFD
|
||||
/* Cray migrated dmf file. */
|
||||
if (S_ISOFD (bits))
|
||||
return 'M';
|
||||
#endif
|
||||
#ifdef S_ISOFL
|
||||
/* Cray migrated dmf file. */
|
||||
if (S_ISOFL (bits))
|
||||
return 'M';
|
||||
#endif
|
||||
return '?';
|
||||
}
|
||||
|
||||
|
||||
@@ -1,30 +1,38 @@
|
||||
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C
|
||||
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <fnmatch.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined (STDC_HEADERS) || !defined (isascii)
|
||||
# define ISASCII(c) 1
|
||||
#else
|
||||
# define ISASCII(c) isascii(c)
|
||||
#endif
|
||||
|
||||
#define ISUPPER(c) (ISASCII (c) && isupper (c))
|
||||
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||
actually compiling the library itself. This code is part of the GNU C
|
||||
@@ -37,9 +45,9 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
|
||||
|
||||
|
||||
#ifndef errno
|
||||
# ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Match STRING against the filename pattern PATTERN, returning zero if
|
||||
it matches, nonzero if not. */
|
||||
@@ -53,7 +61,7 @@ fnmatch (pattern, string, flags)
|
||||
register char c;
|
||||
|
||||
/* Note that this evalutes C many times. */
|
||||
#define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c))
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
|
||||
|
||||
while ((c = *p++) != '\0')
|
||||
{
|
||||
@@ -197,6 +205,8 @@ fnmatch (pattern, string, flags)
|
||||
return 0;
|
||||
|
||||
return FNM_NOMATCH;
|
||||
|
||||
# undef FOLD
|
||||
}
|
||||
|
||||
#endif /* _LIBC or not __GNU_LIBRARY__. */
|
||||
|
||||
@@ -1,48 +1,57 @@
|
||||
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _FNMATCH_H
|
||||
|
||||
#define _FNMATCH_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
||||
#undef __P
|
||||
#define __P(args) args
|
||||
#define __P(protos) protos
|
||||
#else /* Not C++ or ANSI C. */
|
||||
#undef __P
|
||||
#define __P(args) ()
|
||||
#undef const
|
||||
#define const
|
||||
#define __P(protos) ()
|
||||
/* We can get away without defining `const' here only because in this file
|
||||
it is used only inside the prototype for `fnmatch', which is elided in
|
||||
non-ANSI C where `const' is problematical. */
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
/* Bits set in the FLAGS argument to `fnmatch'. */
|
||||
#define FNM_PATHNAME (1 << 0)/* No wildcard can ever match `/'. */
|
||||
#define FNM_NOESCAPE (1 << 1)/* Backslashes don't quote special chars. */
|
||||
#define FNM_PERIOD (1 << 2)/* Leading `.' is matched only explicitly. */
|
||||
#define FNM_TARPATH (1 << 4)/* Ignore `/...' after a match. */
|
||||
#define __FNM_FLAGS (FNM_PATHNAME|FNM_NOESCAPE|FNM_PERIOD|FNM_TARPATH)
|
||||
|
||||
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE)
|
||||
#define FNM_FILE_NAME FNM_PATHNAME
|
||||
/* We #undef these before defining them because some losing systems
|
||||
(HP-UX A.08.07 for example) define these in <unistd.h>. */
|
||||
#undef FNM_PATHNAME
|
||||
#undef FNM_NOESCAPE
|
||||
#undef FNM_PERIOD
|
||||
|
||||
/* Bits set in the FLAGS argument to `fnmatch'. */
|
||||
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
|
||||
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
||||
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
||||
|
||||
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
|
||||
#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
||||
#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
||||
#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
||||
#endif
|
||||
|
||||
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
||||
@@ -50,12 +59,11 @@ extern "C"
|
||||
|
||||
/* Match STRING against the filename pattern PATTERN,
|
||||
returning zero if it matches, FNM_NOMATCH if not. */
|
||||
extern int fnmatch __P ((const char *__pattern, const char *__string,
|
||||
int __flags));
|
||||
extern int fnmatch __P ((const char *__pattern, const char *__string,
|
||||
int __flags));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* fnmatch.h */
|
||||
|
||||
159
lib/fsusage.c
159
lib/fsusage.c
@@ -1,5 +1,5 @@
|
||||
/* fsusage.c -- return space usage of mounted filesystems
|
||||
Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -12,11 +12,11 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -25,36 +25,40 @@
|
||||
|
||||
int statfs ();
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#if HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_MOUNT_H
|
||||
#include <sys/mount.h>
|
||||
#if HAVE_SYS_MOUNT_H
|
||||
# include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_VFS_H
|
||||
#include <sys/vfs.h>
|
||||
#if HAVE_SYS_VFS_H
|
||||
# include <sys/vfs.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_FILSYS_H) && !defined(_CRAY)
|
||||
#include <sys/filsys.h> /* SVR2. */
|
||||
#if HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */
|
||||
# include <sys/fs/s5param.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY)
|
||||
# include <sys/filsys.h> /* SVR2 */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_STATFS_H
|
||||
#include <sys/statfs.h>
|
||||
#if HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DUSTAT_H /* AIX PS/2. */
|
||||
#include <sys/dustat.h>
|
||||
#if HAVE_SYS_STATFS_H
|
||||
# include <sys/statfs.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_STATVFS_H /* SVR4. */
|
||||
#include <sys/statvfs.h>
|
||||
#if HAVE_DUSTAT_H /* AIX PS/2 */
|
||||
# include <sys/dustat.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_STATVFS_H /* SVR4 */
|
||||
# include <sys/statvfs.h>
|
||||
int statvfs ();
|
||||
#endif
|
||||
|
||||
@@ -74,11 +78,11 @@ adjust_blocks (blocks, fromsize, tosize)
|
||||
if (fromsize <= 0)
|
||||
return -1;
|
||||
|
||||
if (fromsize == tosize) /* E.g., from 512 to 512. */
|
||||
if (fromsize == tosize) /* e.g., from 512 to 512 */
|
||||
return blocks;
|
||||
else if (fromsize > tosize) /* E.g., from 2048 to 512. */
|
||||
else if (fromsize > tosize) /* e.g., from 2048 to 512 */
|
||||
return blocks * (fromsize / tosize);
|
||||
else /* E.g., from 256 to 512. */
|
||||
else /* e.g., from 256 to 512 */
|
||||
return (blocks + (blocks < 0 ? -1 : 1)) / (tosize / fromsize);
|
||||
}
|
||||
|
||||
@@ -86,42 +90,56 @@ adjust_blocks (blocks, fromsize, tosize)
|
||||
the filesystem on which PATH resides.
|
||||
DISK is the device on which PATH is mounted, for space-getting
|
||||
methods that need to know it.
|
||||
Return 0 if successful, -1 if not. */
|
||||
|
||||
Return 0 if successful, -1 if not. When returning -1, ensure that
|
||||
ERRNO is either a system error value, or zero if DISK is NULL
|
||||
on a system that requires a non-NULL value. */
|
||||
int
|
||||
get_fs_usage (path, disk, fsp)
|
||||
const char *path;
|
||||
const char *disk;
|
||||
struct fs_usage *fsp;
|
||||
{
|
||||
#if defined (STAT_STATFS3_OSF1)
|
||||
#ifdef STAT_STATFS3_OSF1
|
||||
# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_fsize, 512)
|
||||
|
||||
struct statfs fsd;
|
||||
|
||||
if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
|
||||
return -1;
|
||||
#define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_fsize, 512)
|
||||
|
||||
#endif /* STAT_STATFS3_OSF1 */
|
||||
|
||||
#ifdef STAT_STATFS2_FS_DATA /* Ultrix. */
|
||||
#ifdef STAT_STATFS2_FS_DATA /* Ultrix */
|
||||
# define CONVERT_BLOCKS(B) adjust_blocks ((B), 1024, 512)
|
||||
|
||||
struct fs_data fsd;
|
||||
|
||||
if (statfs (path, &fsd) != 1)
|
||||
return -1;
|
||||
#define CONVERT_BLOCKS(b) adjust_blocks ((b), 1024, 512)
|
||||
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.fd_req.btot);
|
||||
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.fd_req.bfree);
|
||||
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.fd_req.bfreen);
|
||||
fsp->fsu_files = fsd.fd_req.gtot;
|
||||
fsp->fsu_ffree = fsd.fd_req.gfree;
|
||||
#endif
|
||||
|
||||
#ifdef STAT_READ_FILSYS /* SVR2. */
|
||||
#ifndef SUPERBOFF
|
||||
#define SUPERBOFF (SUPERB * 512)
|
||||
#endif
|
||||
#endif /* STAT_STATFS2_FS_DATA */
|
||||
|
||||
#ifdef STAT_READ_FILSYS /* SVR2 */
|
||||
# ifndef SUPERBOFF
|
||||
# define SUPERBOFF (SUPERB * 512)
|
||||
# endif
|
||||
# define CONVERT_BLOCKS(B) \
|
||||
adjust_blocks ((B), (fsd.s_type == Fs2b ? 1024 : 512), 512)
|
||||
|
||||
struct filsys fsd;
|
||||
int fd;
|
||||
|
||||
if (! disk)
|
||||
{
|
||||
errno = 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
fd = open (disk, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
@@ -132,21 +150,24 @@ get_fs_usage (path, disk, fsp)
|
||||
return -1;
|
||||
}
|
||||
close (fd);
|
||||
#define CONVERT_BLOCKS(b) adjust_blocks ((b), (fsd.s_type == Fs2b ? 1024 : 512), 512)
|
||||
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.s_fsize);
|
||||
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.s_tfree);
|
||||
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.s_tfree);
|
||||
fsp->fsu_files = (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1);
|
||||
fsp->fsu_ffree = fsd.s_tinode;
|
||||
#endif
|
||||
|
||||
#ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX. */
|
||||
#endif /* STAT_READ_FILSYS */
|
||||
|
||||
#ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */
|
||||
# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_bsize, 512)
|
||||
|
||||
struct statfs fsd;
|
||||
|
||||
if (statfs (path, &fsd) < 0)
|
||||
return -1;
|
||||
|
||||
#ifdef STATFS_TRUNCATES_BLOCK_COUNTS
|
||||
# ifdef STATFS_TRUNCATES_BLOCK_COUNTS
|
||||
|
||||
/* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the
|
||||
struct statfs are truncated to 2GB. These conditions detect that
|
||||
truncation, presumably without botching the 4.1.1 case, in which
|
||||
@@ -158,20 +179,35 @@ get_fs_usage (path, disk, fsp)
|
||||
fsd.f_bfree = fsd.f_spare[1];
|
||||
fsd.f_bavail = fsd.f_spare[2];
|
||||
}
|
||||
#endif /* STATFS_TRUNCATES_BLOCK_COUNTS */
|
||||
# endif /* STATFS_TRUNCATES_BLOCK_COUNTS */
|
||||
|
||||
#define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_bsize, 512)
|
||||
#endif
|
||||
#endif /* STAT_STATFS2_BSIZE */
|
||||
|
||||
#ifdef STAT_STATFS2_FSIZE /* 4.4BSD */
|
||||
# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_fsize, 512)
|
||||
|
||||
#ifdef STAT_STATFS2_FSIZE /* 4.4BSD. */
|
||||
struct statfs fsd;
|
||||
|
||||
if (statfs (path, &fsd) < 0)
|
||||
return -1;
|
||||
#define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_fsize, 512)
|
||||
#endif
|
||||
|
||||
#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX. */
|
||||
#endif /* STAT_STATFS2_FSIZE */
|
||||
|
||||
#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */
|
||||
# if _AIX || defined(_CRAY)
|
||||
# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_bsize, 512)
|
||||
# ifdef _CRAY
|
||||
# define f_bavail f_bfree
|
||||
# endif
|
||||
# else
|
||||
# define CONVERT_BLOCKS(B) (B)
|
||||
# ifndef _SEQUENT_ /* _SEQUENT_ is DYNIX/ptx */
|
||||
# ifndef DOLPHIN /* DOLPHIN 3.8.alfa/7.18 has f_bavail */
|
||||
# define f_bavail f_bfree
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
struct statfs fsd;
|
||||
|
||||
if (statfs (path, &fsd, sizeof fsd, 0) < 0)
|
||||
@@ -179,35 +215,31 @@ get_fs_usage (path, disk, fsp)
|
||||
/* Empirically, the block counts on most SVR3 and SVR3-derived
|
||||
systems seem to always be in terms of 512-byte blocks,
|
||||
no matter what value f_bsize has. */
|
||||
# if _AIX
|
||||
# define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_bsize, 512)
|
||||
# else
|
||||
# define CONVERT_BLOCKS(b) (b)
|
||||
# ifndef _SEQUENT_ /* _SEQUENT_ is DYNIX/ptx. */
|
||||
# ifndef DOLPHIN /* DOLPHIN 3.8.alfa/7.18 has f_bavail */
|
||||
# define f_bavail f_bfree
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef STAT_STATVFS /* SVR4. */
|
||||
#endif /* STAT_STATFS4 */
|
||||
|
||||
#ifdef STAT_STATVFS /* SVR4 */
|
||||
# define CONVERT_BLOCKS(B) \
|
||||
adjust_blocks ((B), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512)
|
||||
|
||||
struct statvfs fsd;
|
||||
|
||||
if (statvfs (path, &fsd) < 0)
|
||||
return -1;
|
||||
/* f_frsize isn't guaranteed to be supported. */
|
||||
#define CONVERT_BLOCKS(b) \
|
||||
adjust_blocks ((b), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512)
|
||||
#endif
|
||||
|
||||
#if !defined(STAT_STATFS2_FS_DATA) && !defined(STAT_READ_FILSYS) /* !Ultrix && !SVR2. */
|
||||
#endif /* STAT_STATVFS */
|
||||
|
||||
#if !defined(STAT_STATFS2_FS_DATA) && !defined(STAT_READ_FILSYS)
|
||||
/* !Ultrix && !SVR2 */
|
||||
|
||||
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.f_blocks);
|
||||
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.f_bfree);
|
||||
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.f_bavail);
|
||||
fsp->fsu_files = fsd.f_files;
|
||||
fsp->fsu_ffree = fsd.f_ffree;
|
||||
#endif
|
||||
|
||||
#endif /* not STAT_STATFS2_FS_DATA && not STAT_READ_FILSYS */
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -238,4 +270,5 @@ statfs (path, fsb)
|
||||
fsb->f_fsid.val[1] = fsd.du_pckno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* _AIX && _I386 */
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Space usage statistics for a filesystem. Blocks are 512-byte. */
|
||||
struct fs_usage
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
Copied largely from GNU C's cccp.c.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
107
lib/getdate.y
107
lib/getdate.y
@@ -34,6 +34,27 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
# define IN_CTYPE_DOMAIN(c) 1
|
||||
#else
|
||||
# define IN_CTYPE_DOMAIN(c) isascii(c)
|
||||
#endif
|
||||
|
||||
#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
|
||||
#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
|
||||
#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c))
|
||||
#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
|
||||
|
||||
/* ISDIGIT differs from ISDIGIT_LOCALE, as follows:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to ISDIGIT_LOCALE unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to Posix. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
#if defined (vms)
|
||||
#include <types.h>
|
||||
#include <time.h>
|
||||
@@ -86,9 +107,52 @@ struct timeb
|
||||
extern struct tm *gmtime ();
|
||||
extern struct tm *localtime ();
|
||||
|
||||
#define yyparse getdate_yyparse
|
||||
#define yylex getdate_yylex
|
||||
#define yyerror getdate_yyerror
|
||||
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
|
||||
as well as gratuitiously global symbol names, so we can have multiple
|
||||
yacc generated parsers in the same program. Note that these are only
|
||||
the variables produced by yacc. If other parser generators (bison,
|
||||
byacc, etc) produce additional global names that conflict at link time,
|
||||
then those parser generators need to be fixed instead of adding those
|
||||
names to this list. */
|
||||
|
||||
#define yymaxdepth gd_maxdepth
|
||||
#define yyparse gd_parse
|
||||
#define yylex gd_lex
|
||||
#define yyerror gd_error
|
||||
#define yylval gd_lval
|
||||
#define yychar gd_char
|
||||
#define yydebug gd_debug
|
||||
#define yypact gd_pact
|
||||
#define yyr1 gd_r1
|
||||
#define yyr2 gd_r2
|
||||
#define yydef gd_def
|
||||
#define yychk gd_chk
|
||||
#define yypgo gd_pgo
|
||||
#define yyact gd_act
|
||||
#define yyexca gd_exca
|
||||
#define yyerrflag gd_errflag
|
||||
#define yynerrs gd_nerrs
|
||||
#define yyps gd_ps
|
||||
#define yypv gd_pv
|
||||
#define yys gd_s
|
||||
#define yy_yys gd_yys
|
||||
#define yystate gd_state
|
||||
#define yytmp gd_tmp
|
||||
#define yyv gd_v
|
||||
#define yy_yyv gd_yyv
|
||||
#define yyval gd_val
|
||||
#define yylloc gd_lloc
|
||||
#define yyreds gd_reds /* With YYDEBUG defined */
|
||||
#define yytoks gd_toks /* With YYDEBUG defined */
|
||||
#define yylhs gd_yylhs
|
||||
#define yylen gd_yylen
|
||||
#define yydefred gd_yydefred
|
||||
#define yydgoto gd_yydgoto
|
||||
#define yysindex gd_yysindex
|
||||
#define yyrindex gd_yyrindex
|
||||
#define yygindex gd_yygindex
|
||||
#define yytable gd_yytable
|
||||
#define yycheck gd_yycheck
|
||||
|
||||
static int yylex ();
|
||||
static int yyerror ();
|
||||
@@ -258,9 +322,22 @@ date : tUNUMBER '/' tUNUMBER {
|
||||
yyDay = $3;
|
||||
}
|
||||
| tUNUMBER '/' tUNUMBER '/' tUNUMBER {
|
||||
yyMonth = $1;
|
||||
yyDay = $3;
|
||||
yyYear = $5;
|
||||
/* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY.
|
||||
The goal in recognizing YYYY/MM/DD is solely to support legacy
|
||||
machine-generated dates like those in an RCS log listing. If
|
||||
you want portability, use the ISO 8601 format. */
|
||||
if ($1 >= 1000)
|
||||
{
|
||||
yyYear = $1;
|
||||
yyMonth = $3;
|
||||
yyDay = $5;
|
||||
}
|
||||
else
|
||||
{
|
||||
yyMonth = $1;
|
||||
yyDay = $3;
|
||||
yyYear = $5;
|
||||
}
|
||||
}
|
||||
| tUNUMBER tSNUMBER tSNUMBER {
|
||||
/* ISO 8601 format. yyyy-mm-dd. */
|
||||
@@ -623,7 +700,7 @@ Convert (Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode)
|
||||
Year += 1900;
|
||||
DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0)
|
||||
? 29 : 28;
|
||||
if (Year < EPOCH || Year >= DOOMSDAY
|
||||
if (Year < EPOCH || Year > DOOMSDAY
|
||||
|| Month < 1 || Month > 12
|
||||
/* Lint fluff: "conversion from long may lose accuracy" */
|
||||
|| Day < 1 || Day > DaysInMonth[(int)--Month])
|
||||
@@ -710,7 +787,7 @@ LookupWord (buff)
|
||||
|
||||
/* Make it lowercase. */
|
||||
for (p = buff; *p; p++)
|
||||
if (isupper (*p))
|
||||
if (ISUPPER (*p))
|
||||
*p = tolower (*p);
|
||||
|
||||
if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0) {
|
||||
@@ -779,7 +856,7 @@ LookupWord (buff)
|
||||
}
|
||||
|
||||
/* Military timezones. */
|
||||
if (buff[1] == '\0' && isalpha (*buff)) {
|
||||
if (buff[1] == '\0' && ISALPHA (*buff)) {
|
||||
for (tp = MilitaryTable; tp->name; tp++)
|
||||
if (strcmp (buff, tp->name) == 0) {
|
||||
yylval.Number = tp->value;
|
||||
@@ -815,27 +892,27 @@ yylex ()
|
||||
int sign;
|
||||
|
||||
for ( ; ; ) {
|
||||
while (isspace (*yyInput))
|
||||
while (ISSPACE (*yyInput))
|
||||
yyInput++;
|
||||
|
||||
if (isdigit (c = *yyInput) || c == '-' || c == '+') {
|
||||
if (ISDIGIT (c = *yyInput) || c == '-' || c == '+') {
|
||||
if (c == '-' || c == '+') {
|
||||
sign = c == '-' ? -1 : 1;
|
||||
if (!isdigit (*++yyInput))
|
||||
if (!ISDIGIT (*++yyInput))
|
||||
/* skip the '-' sign */
|
||||
continue;
|
||||
}
|
||||
else
|
||||
sign = 0;
|
||||
for (yylval.Number = 0; isdigit (c = *yyInput++); )
|
||||
for (yylval.Number = 0; ISDIGIT (c = *yyInput++); )
|
||||
yylval.Number = 10 * yylval.Number + c - '0';
|
||||
yyInput--;
|
||||
if (sign < 0)
|
||||
yylval.Number = -yylval.Number;
|
||||
return sign ? tSNUMBER : tUNUMBER;
|
||||
}
|
||||
if (isalpha (c)) {
|
||||
for (p = buff; isalpha (c = *yyInput++) || c == '.'; )
|
||||
if (ISALPHA (c)) {
|
||||
for (p = buff; (c = *yyInput++, ISALPHA (c)) || c == '.'; )
|
||||
if (p < &buff[sizeof buff - 1])
|
||||
*p++ = c;
|
||||
*p = '\0';
|
||||
|
||||
57
lib/getgroups.c
Normal file
57
lib/getgroups.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/* provide consistent interface to getgroups for systems that don't allow N==0
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* written by Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
char *xmalloc ();
|
||||
|
||||
/* On Ultrix 4.3, getgroups (0, 0) always fails.
|
||||
This function handles that special case and lets the system-
|
||||
provided function handle all others. */
|
||||
|
||||
int
|
||||
getgroups (n, group)
|
||||
size_t n;
|
||||
GETGROUPS_T *group;
|
||||
{
|
||||
int ng;
|
||||
GETGROUPS_T *gbuf;
|
||||
|
||||
#undef getgroups
|
||||
|
||||
if (n != 0)
|
||||
return getgroups (n, group);
|
||||
|
||||
n = 20;
|
||||
gbuf = NULL;
|
||||
while (1)
|
||||
{
|
||||
gbuf = (GETGROUPS_T *) xrealloc (gbuf, n * sizeof (GETGROUPS_T));
|
||||
ng = getgroups (n, gbuf);
|
||||
if (ng < n)
|
||||
break;
|
||||
n += 10;
|
||||
}
|
||||
|
||||
free (gbuf);
|
||||
|
||||
return ng;
|
||||
}
|
||||
@@ -12,13 +12,17 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* David MacKenzie <djm@gnu.ai.mit.edu> */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNAME
|
||||
#include <sys/utsname.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
/* Put up to LEN chars of the host name into NAME.
|
||||
|
||||
@@ -18,17 +18,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* The `getdelim' function is only declared if there following symbol
|
||||
/* The `getdelim' function is only declared if the following symbol
|
||||
is defined. */
|
||||
#define _GNU_SOURCE 1
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined __GNU_LIBRARY__ && defined HAVE_GETDELIM
|
||||
#if defined __GNU_LIBRARY__ && HAVE_GETDELIM
|
||||
|
||||
int
|
||||
getline (lineptr, n, stream)
|
||||
@@ -42,17 +42,17 @@ getline (lineptr, n, stream)
|
||||
|
||||
#else /* ! have getdelim */
|
||||
|
||||
#define NDEBUG
|
||||
#include <assert.h>
|
||||
# define NDEBUG
|
||||
# include <assert.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
# if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# else
|
||||
char *malloc (), *realloc ();
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Always add at least this many bytes when extending the buffer. */
|
||||
#define MIN_CHUNK 64
|
||||
# define MIN_CHUNK 64
|
||||
|
||||
/* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR
|
||||
+ OFFSET (and null-terminate it). *LINEPTR is a pointer returned from
|
||||
|
||||
@@ -14,18 +14,18 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _getline_h_
|
||||
#define _getline_h_ 1
|
||||
#ifndef GETLINE_H_
|
||||
# define GETLINE_H_ 1
|
||||
|
||||
#include <stdio.h>
|
||||
# include <stdio.h>
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined (__GNUC__) || __STDC__
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
# endif /* GCC. */
|
||||
#endif /* Not PARAMS. */
|
||||
# ifndef PARAMS
|
||||
# if defined (__GNUC__) || __STDC__
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int
|
||||
getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
|
||||
@@ -33,4 +33,4 @@ getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
|
||||
int
|
||||
getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
|
||||
|
||||
#endif
|
||||
#endif /* not GETLINE_H_ */
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
DGUX
|
||||
eunice UNIX emulator under VMS.
|
||||
hpux
|
||||
MSDOS No-op for MSDOS.
|
||||
NeXT
|
||||
sgi
|
||||
sequent Sequent Dynix 3.x.x (BSD)
|
||||
@@ -51,6 +52,7 @@
|
||||
UMAX
|
||||
UMAX4_3
|
||||
VMS
|
||||
WIN32 No-op for Windows95/NT.
|
||||
__linux__ Linux: assumes /proc filesystem mounted.
|
||||
Support from Michael K. Johnson.
|
||||
__NetBSD__ NetBSD: assumes /kern filesystem mounted.
|
||||
@@ -131,6 +133,14 @@ extern int errno;
|
||||
#define hpux
|
||||
#endif
|
||||
|
||||
#if defined (__hpux) && !defined (hpux)
|
||||
#define hpux
|
||||
#endif
|
||||
|
||||
#if defined (__sun) && !defined (sun)
|
||||
#define sun
|
||||
#endif
|
||||
|
||||
#if defined(hp300) && !defined(hpux)
|
||||
#define MORE_BSD
|
||||
#endif
|
||||
@@ -139,7 +149,11 @@ extern int errno;
|
||||
#define decstation
|
||||
#endif
|
||||
|
||||
#if (defined(sun) || defined(__sun)) && defined(SVR4)
|
||||
#if defined (__SVR4) && !defined (SVR4)
|
||||
#define SVR4
|
||||
#endif
|
||||
|
||||
#if (defined(sun) && defined(SVR4)) || defined (SOLARIS2)
|
||||
#define SUNOS_5
|
||||
#endif
|
||||
|
||||
@@ -168,7 +182,7 @@ extern int errno;
|
||||
#define LOAD_AVE_TYPE long
|
||||
#endif
|
||||
|
||||
#if defined(sun) || defined(__sun)
|
||||
#ifdef sun
|
||||
#define LOAD_AVE_TYPE long
|
||||
#endif
|
||||
|
||||
@@ -284,7 +298,7 @@ extern int errno;
|
||||
#define NLIST_STRUCT
|
||||
#endif
|
||||
|
||||
#if defined(sun) || defined(__sun)
|
||||
#ifdef sun
|
||||
#define NLIST_STRUCT
|
||||
#endif
|
||||
|
||||
@@ -352,7 +366,7 @@ extern int errno;
|
||||
#define KERNEL_FILE "/hp-ux"
|
||||
#endif
|
||||
|
||||
#if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || defined(SVR4) || (defined (ardent) && defined (titan)))
|
||||
#if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || (defined (ardent) && defined (titan)))
|
||||
#define KERNEL_FILE "/unix"
|
||||
#endif
|
||||
|
||||
@@ -380,6 +394,7 @@ extern int errno;
|
||||
#ifdef LOAD_AVE_TYPE
|
||||
|
||||
#ifndef VMS
|
||||
#ifndef __linux__
|
||||
#ifndef NLIST_STRUCT
|
||||
#include <a.out.h>
|
||||
#else /* NLIST_STRUCT */
|
||||
@@ -389,6 +404,7 @@ extern int errno;
|
||||
#ifdef SUNOS_5
|
||||
#include <fcntl.h>
|
||||
#include <kvm.h>
|
||||
#include <kstat.h>
|
||||
#endif
|
||||
|
||||
#ifndef KERNEL_FILE
|
||||
@@ -398,6 +414,7 @@ extern int errno;
|
||||
#ifndef LDAV_SYMBOL
|
||||
#define LDAV_SYMBOL "_avenrun"
|
||||
#endif /* LDAV_SYMBOL */
|
||||
#endif /* __linux__ */
|
||||
|
||||
#else /* VMS */
|
||||
|
||||
@@ -484,7 +501,7 @@ static int getloadavg_initialized;
|
||||
/* Offset in kmem to seek to read load average, or 0 means invalid. */
|
||||
static long offset;
|
||||
|
||||
#if !defined(VMS) && !defined(sgi)
|
||||
#if !defined(VMS) && !defined(sgi) && !defined(__linux__)
|
||||
static struct nlist nl[2];
|
||||
#endif /* Not VMS or sgi */
|
||||
|
||||
@@ -514,6 +531,50 @@ getloadavg (loadavg, nelem)
|
||||
elem = -1;
|
||||
#endif
|
||||
|
||||
#if !defined (LDAV_DONE) && defined (SUNOS_5)
|
||||
/* Use libkstat because we don't have to be root. */
|
||||
#define LDAV_DONE
|
||||
kstat_ctl_t *kc;
|
||||
kstat_t *ksp;
|
||||
kstat_named_t *kn;
|
||||
|
||||
kc = kstat_open ();
|
||||
if (kc == 0) return -1;
|
||||
ksp = kstat_lookup (kc, "unix", 0, "system_misc");
|
||||
if (ksp == 0 ) return -1;
|
||||
if (kstat_read (kc, ksp, 0) == -1) return -1;
|
||||
|
||||
|
||||
kn = kstat_data_lookup (ksp, "avenrun_1min");
|
||||
if (kn == 0)
|
||||
{
|
||||
/* Return -1 if no load average information is available. */
|
||||
nelem = 0;
|
||||
elem = -1;
|
||||
}
|
||||
|
||||
if (nelem >= 1)
|
||||
loadavg[elem++] = (double) kn->value.ul/FSCALE;
|
||||
|
||||
if (nelem >= 2)
|
||||
{
|
||||
kn = kstat_data_lookup (ksp, "avenrun_5min");
|
||||
if (kn != 0)
|
||||
{
|
||||
loadavg[elem++] = (double) kn->value.ul/FSCALE;
|
||||
|
||||
if (nelem >= 3)
|
||||
{
|
||||
kn = kstat_data_lookup (ksp, "avenrun_15min");
|
||||
if (kn != 0)
|
||||
loadavg[elem++] = (double) kn->value.ul/FSCALE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kstat_close (kc);
|
||||
#endif /* SUNOS_5 */
|
||||
|
||||
#if !defined (LDAV_DONE) && defined (__linux__)
|
||||
#define LDAV_DONE
|
||||
#undef LOAD_AVE_TYPE
|
||||
@@ -733,11 +794,11 @@ getloadavg (loadavg, nelem)
|
||||
: (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale));
|
||||
#endif /* OSF_MIPS */
|
||||
|
||||
#if !defined (LDAV_DONE) && defined(MSDOS)
|
||||
#if !defined (LDAV_DONE) && (defined (MSDOS) || defined (WIN32))
|
||||
#define LDAV_DONE
|
||||
|
||||
/* A faithful emulation is going to have to be saved for a rainy day. */
|
||||
for ( ; elem < nelem; elem++)
|
||||
for ( ; elem < nelem; elem++)
|
||||
{
|
||||
loadavg[elem] = 0.0;
|
||||
}
|
||||
@@ -866,7 +927,7 @@ getloadavg (loadavg, nelem)
|
||||
/* We pass 0 for the kernel, corefile, and swapfile names
|
||||
to use the currently running kernel. */
|
||||
kd = kvm_open (0, 0, 0, O_RDONLY, 0);
|
||||
if (kd != 0)
|
||||
if (kd != 0)
|
||||
{
|
||||
/* nlist the currently running kernel. */
|
||||
kvm_nlist (kd, nl);
|
||||
|
||||
111
lib/getopt.c
111
lib/getopt.c
@@ -3,7 +3,7 @@
|
||||
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
|
||||
before changing it!
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1996
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
@@ -53,12 +53,28 @@
|
||||
|
||||
/* This needs to come after some library #include
|
||||
to get __GNU_LIBRARY__ defined. */
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* Don't include stdlib.h for non-GNU C libraries because some of them
|
||||
contain conflicting prototypes for getopt. */
|
||||
#include <stdlib.h>
|
||||
#if defined (_LIBC) || defined (HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif /* GNU C library. */
|
||||
|
||||
#ifdef VMS
|
||||
#include <unixlib.h>
|
||||
#if HAVE_STRING_H - 0
|
||||
#include <string.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
/* It's not Unix, really. See? Capital letters. */
|
||||
#include <windows.h>
|
||||
#define getpid() GetCurrentProcessId()
|
||||
#endif
|
||||
|
||||
#ifndef _
|
||||
/* This is for other GNU distributions with internationalized messages.
|
||||
When compiling libc, the _ macro is predefined. */
|
||||
@@ -166,7 +182,7 @@ static enum
|
||||
/* Value of POSIXLY_CORRECT environment variable. */
|
||||
static char *posixly_correct;
|
||||
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* We want to avoid inclusion of string.h with non-GNU libraries
|
||||
because there are many ways it can cause trouble.
|
||||
On some systems, it contains special magic macros that don't work
|
||||
@@ -217,6 +233,12 @@ extern int strlen (const char *);
|
||||
static int first_nonopt;
|
||||
static int last_nonopt;
|
||||
|
||||
/* Bash 2.0 gives us an environment variable containing flags
|
||||
indicating ARGV elements that should not be considered arguments. */
|
||||
|
||||
static const char *nonoption_flags;
|
||||
static int nonoption_flags_len;
|
||||
|
||||
/* Exchange two adjacent subsequences of ARGV.
|
||||
One subsequence is elements [first_nonopt,last_nonopt)
|
||||
which contains all the non-options that have been skipped so far.
|
||||
@@ -226,6 +248,10 @@ static int last_nonopt;
|
||||
`first_nonopt' and `last_nonopt' are relocated so that they describe
|
||||
the new indices of the non-options in ARGV after they are moved. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
static void exchange (char **);
|
||||
#endif
|
||||
|
||||
static void
|
||||
exchange (argv)
|
||||
char **argv;
|
||||
@@ -284,6 +310,9 @@ exchange (argv)
|
||||
|
||||
/* Initialize the internal data when the first call is made. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
static const char *_getopt_initialize (const char *);
|
||||
#endif
|
||||
static const char *
|
||||
_getopt_initialize (optstring)
|
||||
const char *optstring;
|
||||
@@ -315,6 +344,21 @@ _getopt_initialize (optstring)
|
||||
else
|
||||
ordering = PERMUTE;
|
||||
|
||||
if (posixly_correct == NULL)
|
||||
{
|
||||
/* Bash 2.0 puts a special variable in the environment for each
|
||||
command it runs, specifying which ARGV elements are the results of
|
||||
file name wildcard expansion and therefore should not be
|
||||
considered as options. */
|
||||
char var[100];
|
||||
sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ());
|
||||
nonoption_flags = getenv (var);
|
||||
if (nonoption_flags == NULL)
|
||||
nonoption_flags_len = 0;
|
||||
else
|
||||
nonoption_flags_len = strlen (nonoption_flags);
|
||||
}
|
||||
|
||||
return optstring;
|
||||
}
|
||||
|
||||
@@ -391,10 +435,24 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optind = 1; /* Don't scan ARGV[0], the program name. */
|
||||
}
|
||||
|
||||
/* Test whether ARGV[optind] points to a non-option argument.
|
||||
Either it does not have option syntax, or there is an environment flag
|
||||
from the shell indicating it is not an option. */
|
||||
#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|
||||
|| (optind < nonoption_flags_len \
|
||||
&& nonoption_flags[optind] == '1'))
|
||||
|
||||
if (nextchar == NULL || *nextchar == '\0')
|
||||
{
|
||||
/* Advance to the next ARGV-element. */
|
||||
|
||||
/* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
|
||||
moved back by the user (who may also have changed the arguments). */
|
||||
if (last_nonopt > optind)
|
||||
last_nonopt = optind;
|
||||
if (first_nonopt > optind)
|
||||
first_nonopt = optind;
|
||||
|
||||
if (ordering == PERMUTE)
|
||||
{
|
||||
/* If we have just processed some options following some non-options,
|
||||
@@ -408,8 +466,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
/* Skip any additional non-options
|
||||
and extend the range of non-options previously skipped. */
|
||||
|
||||
while (optind < argc
|
||||
&& (argv[optind][0] != '-' || argv[optind][1] == '\0'))
|
||||
while (optind < argc && NONOPTION_P)
|
||||
optind++;
|
||||
last_nonopt = optind;
|
||||
}
|
||||
@@ -447,7 +504,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
/* If we have come to a non-option and did not permute it,
|
||||
either stop the scan or describe it to the caller and pass it by. */
|
||||
|
||||
if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
|
||||
if (NONOPTION_P)
|
||||
{
|
||||
if (ordering == REQUIRE_ORDER)
|
||||
return EOF;
|
||||
@@ -479,8 +536,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
|
||||
if (longopts != NULL
|
||||
&& (argv[optind][1] == '-'
|
||||
|| (long_only && (argv[optind][2]
|
||||
|| !my_index (optstring, argv[optind][1])))))
|
||||
|| (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
|
||||
{
|
||||
char *nameend;
|
||||
const struct option *p;
|
||||
@@ -493,8 +549,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
|
||||
/* Do nothing. */ ;
|
||||
|
||||
#ifdef lint
|
||||
indfound = 0; /* Avoid spurious compiler warning. */
|
||||
#ifdef lint /* Suppress `used before initialized' warning. */
|
||||
indfound = 0;
|
||||
#endif
|
||||
|
||||
/* Test all long options for either exact match
|
||||
@@ -528,6 +584,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
optind++;
|
||||
optopt = 0;
|
||||
return '?';
|
||||
}
|
||||
|
||||
@@ -544,18 +601,20 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `--%s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
else
|
||||
/* +option or -option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `--%s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
else
|
||||
/* +option or -option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
|
||||
nextchar += strlen (nextchar);
|
||||
|
||||
optopt = pfound->val;
|
||||
return '?';
|
||||
}
|
||||
}
|
||||
@@ -567,9 +626,10 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
{
|
||||
if (opterr)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
nextchar += strlen (nextchar);
|
||||
optopt = pfound->val;
|
||||
return optstring[0] == ':' ? ':' : '?';
|
||||
}
|
||||
}
|
||||
@@ -604,6 +664,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
nextchar = (char *) "";
|
||||
optind++;
|
||||
optopt = 0;
|
||||
return '?';
|
||||
}
|
||||
}
|
||||
@@ -663,8 +724,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
{
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr,
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
}
|
||||
optopt = c;
|
||||
if (optstring[0] == ':')
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
#define _GETOPT_H 1
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <grp.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* setgrent, getgrent, and endgrent are not specified by POSIX.1,
|
||||
@@ -36,9 +36,9 @@
|
||||
struct group *getgrent ();
|
||||
|
||||
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
|
||||
#include <string.h>
|
||||
# include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
/* Like `getgroups', but for user USERNAME instead of for
|
||||
|
||||
@@ -12,25 +12,25 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef SHELLS_FILE
|
||||
/* File containing a list of nonrestricted shells, one per line. */
|
||||
#define SHELLS_FILE "/etc/shells"
|
||||
# define SHELLS_FILE "/etc/shells"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
char *realloc ();
|
||||
@@ -177,7 +177,7 @@ readname (name, size, stream)
|
||||
/* Skip blank space. */
|
||||
while ((c = getc (stream)) != EOF && isspace (c))
|
||||
/* Do nothing. */ ;
|
||||
|
||||
|
||||
while (c != EOF && !isspace (c))
|
||||
{
|
||||
(*name)[name_index++] = c;
|
||||
|
||||
@@ -12,15 +12,19 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "backupfile.h"
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
int argmatch ();
|
||||
@@ -28,12 +32,12 @@ void invalid_arg ();
|
||||
|
||||
extern char *program_name;
|
||||
|
||||
static char *backup_args[] =
|
||||
static const char *const backup_args[] =
|
||||
{
|
||||
"never", "simple", "nil", "existing", "t", "numbered", 0
|
||||
};
|
||||
|
||||
static enum backup_type backup_types[] =
|
||||
static const enum backup_type backup_types[] =
|
||||
{
|
||||
simple, simple, numbered_existing, numbered_existing, numbered, numbered
|
||||
};
|
||||
|
||||
@@ -12,22 +12,22 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "group-member.h"
|
||||
@@ -120,7 +120,7 @@ group_member (gid)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
free_group_info (gi);
|
||||
|
||||
return found;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _group_member_h_
|
||||
#define _group_member_h_ 1
|
||||
#ifndef GROUP_MEMBER_H_
|
||||
# define GROUP_MEMBER_H_ 1
|
||||
|
||||
int
|
||||
group_member ();
|
||||
|
||||
#endif /* _group_member_h_ */
|
||||
#endif /* GROUP_MEMBER_H_ */
|
||||
|
||||
@@ -12,15 +12,19 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
#if defined(USG) || defined(STDC_HEADERS)
|
||||
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
@@ -199,7 +203,7 @@ getgidbyname (group)
|
||||
group_alist = tail;
|
||||
return &tail->id.g;
|
||||
}
|
||||
|
||||
|
||||
tail->next = nogroup_alist;
|
||||
nogroup_alist = tail;
|
||||
return 0;
|
||||
|
||||
46
lib/interlock
Executable file
46
lib/interlock
Executable file
@@ -0,0 +1,46 @@
|
||||
#! /bin/sh
|
||||
|
||||
# interlock - wrap program invocation in lock to allow
|
||||
# parallel builds to work.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>, Aug 10 1996
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Usage:
|
||||
# interlock lock-dir-name program args-to-program...
|
||||
|
||||
dirname="$1"
|
||||
program="$2"
|
||||
|
||||
shift
|
||||
shift
|
||||
|
||||
while (mkdir $dirname > /dev/null 2>&1 && exit 1 || exit 0); do
|
||||
# Wait a bit.
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Race condition here: if interrupted after the loop but before this
|
||||
# trap, the lock can be left around.
|
||||
trap "rmdir $dirname > /dev/null 2>&1" 1 2 3 15
|
||||
|
||||
# We have the lock, so run the program.
|
||||
$program ${1+"$@"}
|
||||
ret=$?
|
||||
|
||||
# Release the lock.
|
||||
rmdir $dirname > /dev/null 2>&1
|
||||
|
||||
exit $ret
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* A `struct linebuffer' holds a line of text. */
|
||||
|
||||
@@ -24,20 +24,21 @@ struct linebuffer
|
||||
char *buffer;
|
||||
};
|
||||
|
||||
#undef __P
|
||||
#undef PARAMS
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define __P(x) x
|
||||
# define PARAMS(Args) Args
|
||||
#else
|
||||
#define __P(x) ()
|
||||
# define PARAMS(Args) ()
|
||||
#endif
|
||||
|
||||
/* Initialize linebuffer LINEBUFFER for use. */
|
||||
void initbuffer __P ((struct linebuffer *linebuffer));
|
||||
void initbuffer PARAMS ((struct linebuffer *linebuffer));
|
||||
|
||||
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
|
||||
Remove any newline. Does not null terminate.
|
||||
Return LINEBUFFER, except at end of file return 0. */
|
||||
struct linebuffer *readline __P ((struct linebuffer *linebuffer, FILE *stream));
|
||||
struct linebuffer *readline PARAMS ((struct linebuffer *linebuffer,
|
||||
FILE *stream));
|
||||
|
||||
/* Free linebuffer LINEBUFFER and its data, all allocated with malloc. */
|
||||
void freebuffer __P ((struct linebuffer *));
|
||||
void freebuffer PARAMS ((struct linebuffer *));
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Jim Meyering (meyering@comco.com) */
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@@ -36,11 +36,12 @@ static struct option const long_options[] =
|
||||
Be careful not to gobble up `--'. */
|
||||
|
||||
void
|
||||
parse_long_options (argc, argv, command_name, version_string, usage)
|
||||
parse_long_options (argc, argv, command_name, package, version, usage)
|
||||
int argc;
|
||||
char **argv;
|
||||
const char *command_name;
|
||||
const char *version_string;
|
||||
const char *package;
|
||||
const char *version;
|
||||
void (*usage)();
|
||||
{
|
||||
int c;
|
||||
@@ -62,7 +63,7 @@ parse_long_options (argc, argv, command_name, version_string, usage)
|
||||
(*usage) (0);
|
||||
|
||||
case 'v':
|
||||
printf ("%s - %s\n", command_name, version_string);
|
||||
printf ("%s (%s) %s\n", command_name, package, version);
|
||||
exit (0);
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,10 +1,31 @@
|
||||
#undef __P
|
||||
/* long-options.h -- declaration for --help- and --version-handling function.
|
||||
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
#undef PARAMS
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define __P(args) args
|
||||
# define PARAMS(Args) Args
|
||||
#else
|
||||
#define __P(args) ()
|
||||
# define PARAMS(Args) ()
|
||||
#endif
|
||||
|
||||
void
|
||||
parse_long_options __P ((int _argc, char **_argv, const char *_command_name,
|
||||
const char *_version_string, void (*_usage) (int)));
|
||||
parse_long_options PARAMS ((int _argc, char **_argv,
|
||||
const char *_command_name,
|
||||
const char *_package,
|
||||
const char *_version, void (*_usage) (int)));
|
||||
|
||||
@@ -12,58 +12,57 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> and
|
||||
Jim Meyering <meyering@cs.utexas.edu>. */
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> and Jim Meyering. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#if __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
#else
|
||||
#ifdef HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#else
|
||||
#ifdef _AIX
|
||||
# if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
#else
|
||||
# else
|
||||
char *alloca ();
|
||||
#endif
|
||||
#endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
#undef S_ISDIR
|
||||
#endif /* STAT_MACROS_BROKEN. */
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
#if !defined(S_ISDIR) && defined(S_IFDIR)
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#if HAVE_ERRNO_H
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# undef __P
|
||||
#if __STDC__
|
||||
#undef __P
|
||||
#define __P(args) args
|
||||
# define __P(Args) Args
|
||||
#else
|
||||
#define __P(args) ()
|
||||
# define __P(Args) ()
|
||||
#endif
|
||||
|
||||
int
|
||||
make_path __P ((const char *_argpath,
|
||||
int _mode,
|
||||
int _parent_mode,
|
||||
uid_t _owner,
|
||||
gid_t _group,
|
||||
int _preserve_existing,
|
||||
const char *_verbose_fmt_string));
|
||||
make_path __P ((const char *_argpath,
|
||||
int _mode,
|
||||
int _parent_mode,
|
||||
uid_t _owner,
|
||||
gid_t _group,
|
||||
int _preserve_existing,
|
||||
const char *_verbose_fmt_string));
|
||||
|
||||
187
lib/md5.c
187
lib/md5.c
@@ -1,11 +1,13 @@
|
||||
/* md5.c - Functions to compute MD5 message digest of files or memory blocks
|
||||
according to the definition of MD5 in RFC 1321 from April 1992.
|
||||
Copyright (C) 1995 Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C
|
||||
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@@ -13,10 +15,10 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>. */
|
||||
/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@@ -24,7 +26,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
#if STDC_HEADERS || defined _LIBC
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#else
|
||||
@@ -35,6 +37,13 @@
|
||||
|
||||
#include "md5.h"
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <endian.h>
|
||||
# if __BYTE_ORDER == __BIG_ENDIAN
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define SWAP(n) \
|
||||
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
|
||||
@@ -58,10 +67,16 @@ md5_init_ctx (ctx)
|
||||
ctx->B = 0xefcdab89;
|
||||
ctx->C = 0x98badcfe;
|
||||
ctx->D = 0x10325476;
|
||||
|
||||
ctx->total[0] = ctx->total[1] = 0;
|
||||
ctx->buflen = 0;
|
||||
}
|
||||
|
||||
/* Put result from CTX in first 16 bytes following RESBUF. The result must
|
||||
be in little endian byte order. */
|
||||
/* Put result from CTX in first 16 bytes following RESBUF. The result
|
||||
must be in little endian byte order.
|
||||
|
||||
IMPORTANT: On some systems it is required that RESBUF is correctly
|
||||
aligned for a 32 bits value. */
|
||||
void *
|
||||
md5_read_ctx (ctx, resbuf)
|
||||
const struct md5_ctx *ctx;
|
||||
@@ -75,6 +90,39 @@ md5_read_ctx (ctx, resbuf)
|
||||
return resbuf;
|
||||
}
|
||||
|
||||
/* Process the remaining bytes in the internal buffer and the usual
|
||||
prolog according to the standard and write the result to RESBUF.
|
||||
|
||||
IMPORTANT: On some systems it is required that RESBUF is correctly
|
||||
aligned for a 32 bits value. */
|
||||
void *
|
||||
md5_finish_ctx (ctx, resbuf)
|
||||
struct md5_ctx *ctx;
|
||||
void *resbuf;
|
||||
{
|
||||
/* Take yet unprocessed bytes into account. */
|
||||
md5_uint32 bytes = ctx->buflen;
|
||||
size_t pad;
|
||||
|
||||
/* Now count remaining bytes. */
|
||||
ctx->total[0] += bytes;
|
||||
if (ctx->total[0] < bytes)
|
||||
++ctx->total[1];
|
||||
|
||||
pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
|
||||
memcpy (&ctx->buffer[bytes], fillbuf, pad);
|
||||
|
||||
/* Put the 64-bit file length in *bits* at the end of the buffer. */
|
||||
*(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
|
||||
*(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
|
||||
(ctx->total[0] >> 29));
|
||||
|
||||
/* Process last bytes. */
|
||||
md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
|
||||
|
||||
return md5_read_ctx (ctx, resbuf);
|
||||
}
|
||||
|
||||
/* Compute MD5 message digest for bytes read from STREAM. The
|
||||
resulting message digest number will be written into the 16 bytes
|
||||
beginning at RESBLOCK. */
|
||||
@@ -86,16 +134,12 @@ md5_stream (stream, resblock)
|
||||
/* Important: BLOCKSIZE must be a multiple of 64. */
|
||||
#define BLOCKSIZE 4096
|
||||
struct md5_ctx ctx;
|
||||
md5_uint32 len[2];
|
||||
char buffer[BLOCKSIZE + 72];
|
||||
size_t pad, sum;
|
||||
size_t sum;
|
||||
|
||||
/* Initialize the computation context. */
|
||||
md5_init_ctx (&ctx);
|
||||
|
||||
len[0] = 0;
|
||||
len[1] = 0;
|
||||
|
||||
/* Iterate over full file contents. */
|
||||
while (1)
|
||||
{
|
||||
@@ -108,7 +152,7 @@ md5_stream (stream, resblock)
|
||||
/* Read block. Take care for partial reads. */
|
||||
do
|
||||
{
|
||||
n = fread (buffer, 1, BLOCKSIZE - sum, stream);
|
||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||
|
||||
sum += n;
|
||||
}
|
||||
@@ -116,13 +160,6 @@ md5_stream (stream, resblock)
|
||||
if (n == 0 && ferror (stream))
|
||||
return 1;
|
||||
|
||||
/* RFC 1321 specifies the possible length of the file up to 2^64 bits.
|
||||
Here we only compute the number of bytes. Do a double word
|
||||
increment. */
|
||||
len[0] += sum;
|
||||
if (len[0] < sum)
|
||||
++len[1];
|
||||
|
||||
/* If end of file is reached, end the loop. */
|
||||
if (n == 0)
|
||||
break;
|
||||
@@ -133,27 +170,12 @@ md5_stream (stream, resblock)
|
||||
md5_process_block (buffer, BLOCKSIZE, &ctx);
|
||||
}
|
||||
|
||||
/* We can copy 64 byte because the buffer is always big enough. FILLBUF
|
||||
contains the needed bits. */
|
||||
memcpy (&buffer[sum], fillbuf, 64);
|
||||
|
||||
/* Compute amount of padding bytes needed. Alignment is done to
|
||||
(N + PAD) % 64 == 56
|
||||
There is always at least one byte padded. I.e. even the alignment
|
||||
is correctly aligned 64 padding bytes are added. */
|
||||
pad = sum & 63;
|
||||
pad = pad >= 56 ? 64 + 56 - pad : 56 - pad;
|
||||
|
||||
/* Put the 64-bit file length in *bits* at the end of the buffer. */
|
||||
*(md5_uint32 *) &buffer[sum + pad] = SWAP (len[0] << 3);
|
||||
*(md5_uint32 *) &buffer[sum + pad + 4] = SWAP ((len[1] << 3)
|
||||
| (len[0] >> 29));
|
||||
|
||||
/* Process last bytes. */
|
||||
md5_process_block (buffer, sum + pad + 8, &ctx);
|
||||
/* Add the last bytes if necessary. */
|
||||
if (sum > 0)
|
||||
md5_process_bytes (buffer, sum, &ctx);
|
||||
|
||||
/* Construct result in desired memory. */
|
||||
md5_read_ctx (&ctx, resblock);
|
||||
md5_finish_ctx (&ctx, resblock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -168,37 +190,61 @@ md5_buffer (buffer, len, resblock)
|
||||
void *resblock;
|
||||
{
|
||||
struct md5_ctx ctx;
|
||||
char restbuf[64 + 72];
|
||||
size_t blocks = len & ~63;
|
||||
size_t pad, rest;
|
||||
|
||||
/* Initialize the computation context. */
|
||||
md5_init_ctx (&ctx);
|
||||
|
||||
/* Process whole buffer but last len % 64 bytes. */
|
||||
md5_process_block (buffer, blocks, &ctx);
|
||||
|
||||
/* REST bytes are not processed yet. */
|
||||
rest = len - blocks;
|
||||
/* Copy to own buffer. */
|
||||
memcpy (restbuf, &buffer[blocks], rest);
|
||||
/* Append needed fill bytes at end of buffer. We can copy 64 byte
|
||||
because the buffer is always big enough. */
|
||||
memcpy (&restbuf[rest], fillbuf, 64);
|
||||
|
||||
/* PAD bytes are used for padding to correct alignment. Note that
|
||||
always at least one byte is padded. */
|
||||
pad = rest >= 56 ? 64 + 56 - rest : 56 - rest;
|
||||
|
||||
/* Put length of buffer in *bits* in last eight bytes. */
|
||||
*(md5_uint32 *) &restbuf[rest + pad] = (md5_uint32) SWAP (len << 3);
|
||||
*(md5_uint32 *) &restbuf[rest + pad + 4] = (md5_uint32) SWAP (len >> 29);
|
||||
|
||||
/* Process last bytes. */
|
||||
md5_process_block (restbuf, rest + pad + 8, &ctx);
|
||||
md5_process_bytes (buffer, len, &ctx);
|
||||
|
||||
/* Put result in desired memory area. */
|
||||
return md5_read_ctx (&ctx, resblock);
|
||||
return md5_finish_ctx (&ctx, resblock);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
md5_process_bytes (buffer, len, ctx)
|
||||
const void *buffer;
|
||||
size_t len;
|
||||
struct md5_ctx *ctx;
|
||||
{
|
||||
/* When we already have some bits in our internal buffer concatenate
|
||||
both inputs first. */
|
||||
if (ctx->buflen != 0)
|
||||
{
|
||||
size_t left_over = ctx->buflen;
|
||||
size_t add = 128 - left_over > len ? len : 128 - left_over;
|
||||
|
||||
memcpy (&ctx->buffer[left_over], buffer, add);
|
||||
ctx->buflen += add;
|
||||
|
||||
if (left_over + add > 64)
|
||||
{
|
||||
md5_process_block (ctx->buffer, (left_over + add) & ~63, ctx);
|
||||
/* The regions in the following copy operation cannot overlap. */
|
||||
memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63],
|
||||
(left_over + add) & 63);
|
||||
ctx->buflen = (left_over + add) & 63;
|
||||
}
|
||||
|
||||
buffer = (const char *) buffer + add;
|
||||
len -= add;
|
||||
}
|
||||
|
||||
/* Process available complete blocks. */
|
||||
if (len > 64)
|
||||
{
|
||||
md5_process_block (buffer, len & ~63, ctx);
|
||||
buffer = (const char *) buffer + (len & ~63);
|
||||
len &= 63;
|
||||
}
|
||||
|
||||
/* Move remaining bytes in internal buffer. */
|
||||
if (len > 0)
|
||||
{
|
||||
memcpy (ctx->buffer, buffer, len);
|
||||
ctx->buflen = len;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -229,6 +275,13 @@ md5_process_block (buffer, len, ctx)
|
||||
md5_uint32 C = ctx->C;
|
||||
md5_uint32 D = ctx->D;
|
||||
|
||||
/* First increment the byte count. RFC 1321 specifies the possible
|
||||
length of the file up to 2^64 bits. Here we only compute the
|
||||
number of bytes. Do a double word increment. */
|
||||
ctx->total[0] += len;
|
||||
if (ctx->total[0] < len)
|
||||
++ctx->total[1];
|
||||
|
||||
/* Process all bytes in the buffer with 64 bytes in each round of
|
||||
the loop. */
|
||||
while (words < endp)
|
||||
|
||||
107
lib/md5.h
107
lib/md5.h
@@ -1,23 +1,25 @@
|
||||
/* md5.h - Declaration of functions and data types used for MD5 sum
|
||||
computing library functions.
|
||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C
|
||||
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _MD5_H
|
||||
#define _MD5_H
|
||||
#define _MD5_H 1
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -32,33 +34,38 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
the resulting executable. Locally running cross-compiled executables
|
||||
is usually not possible. */
|
||||
|
||||
#if defined __STDC__ && __STDC__
|
||||
# define UINT_MAX_32_BITS 4294967295U
|
||||
#ifdef _LIBC
|
||||
# include <sys/types.h>
|
||||
typedef u_int32_t md5_uint32;
|
||||
#else
|
||||
# define UINT_MAX_32_BITS 0xFFFFFFFF
|
||||
#endif
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define UINT_MAX_32_BITS 4294967295U
|
||||
# else
|
||||
# define UINT_MAX_32_BITS 0xFFFFFFFF
|
||||
# endif
|
||||
|
||||
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
|
||||
This should be valid for all systems GNU cares about because
|
||||
that doesn't include 16-bit systems, and only modern systems
|
||||
(that certainly have <limits.h>) have 64+-bit integral types. */
|
||||
|
||||
#ifndef UINT_MAX
|
||||
# define UINT_MAX UINT_MAX_32_BITS
|
||||
#endif
|
||||
# ifndef UINT_MAX
|
||||
# define UINT_MAX UINT_MAX_32_BITS
|
||||
# endif
|
||||
|
||||
#if UINT_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned int md5_uint32;
|
||||
#else
|
||||
# if USHRT_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned short md5_uint32;
|
||||
# if UINT_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned int md5_uint32;
|
||||
# else
|
||||
# if ULONG_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned long md5_uint32;
|
||||
# if USHRT_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned short md5_uint32;
|
||||
# else
|
||||
/* The following line is intended to evoke an error.
|
||||
Using #error is not portable enough. */
|
||||
"Cannot determine unsigned 32-bit data type."
|
||||
# if ULONG_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned long md5_uint32;
|
||||
# else
|
||||
/* The following line is intended to evoke an error.
|
||||
Using #error is not portable enough. */
|
||||
"Cannot determine unsigned 32-bit data type."
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
@@ -77,6 +84,10 @@ struct md5_ctx
|
||||
md5_uint32 B;
|
||||
md5_uint32 C;
|
||||
md5_uint32 D;
|
||||
|
||||
md5_uint32 total[2];
|
||||
md5_uint32 buflen;
|
||||
char buffer[128];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -86,30 +97,50 @@ struct md5_ctx
|
||||
|
||||
/* Initialize structure containing state of computation.
|
||||
(RFC 1321, 3.3: Step 3) */
|
||||
void md5_init_ctx __P ((struct md5_ctx *ctx));
|
||||
extern void md5_init_ctx __P ((struct md5_ctx *ctx));
|
||||
|
||||
/* Starting with the result of former calls of this function (or the
|
||||
initialzation function update the context for the next LEN bytes
|
||||
initialization function update the context for the next LEN bytes
|
||||
starting at BUFFER.
|
||||
It is necessary that LEN is a multiple of 64!!! */
|
||||
void md5_process_block __P ((const void *buffer, size_t len,
|
||||
struct md5_ctx *ctx));
|
||||
extern void md5_process_block __P ((const void *buffer, size_t len,
|
||||
struct md5_ctx *ctx));
|
||||
|
||||
/* Starting with the result of former calls of this function (or the
|
||||
initialization function update the context for the next LEN bytes
|
||||
starting at BUFFER.
|
||||
It is NOT required that LEN is a multiple of 64. */
|
||||
extern void md5_process_bytes __P ((const void *buffer, size_t len,
|
||||
struct md5_ctx *ctx));
|
||||
|
||||
/* Process the remaining bytes in the buffer and put result from CTX
|
||||
in first 16 bytes following RESBUF. The result is always in little
|
||||
endian byte order, so that a byte-wise output yields to the wanted
|
||||
ASCII representation of the message digest.
|
||||
|
||||
IMPORTANT: On some systems it is required that RESBUF is correctly
|
||||
aligned for a 32 bits value. */
|
||||
extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
|
||||
|
||||
|
||||
/* Put result from CTX in first 16 bytes following RESBUF. The result is
|
||||
always in little endian byte order, so that a byte-wise output yields
|
||||
to the wanted ASCII representation of the message digest. */
|
||||
void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
|
||||
to the wanted ASCII representation of the message digest.
|
||||
|
||||
IMPORTANT: On some systems it is required that RESBUF is correctly
|
||||
aligned for a 32 bits value. */
|
||||
extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
|
||||
|
||||
|
||||
/* Compute MD5 message digest for bytes read from STREAM. The
|
||||
resulting message digest number will be written into the 16 bytes
|
||||
beginning at RESBLOCK. */
|
||||
int md5_stream __P ((FILE *stream, void *resblock));
|
||||
extern int md5_stream __P ((FILE *stream, void *resblock));
|
||||
|
||||
/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
|
||||
result is always in little endian byte order, so that a byte-wise
|
||||
output yields to the wanted ASCII representation of the message
|
||||
digest. */
|
||||
void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
|
||||
extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Jim Meyering (meyering@na-net.ornl.gov) */
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#undef __P
|
||||
#undef PARAMS
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# define __P(args) args
|
||||
# define PARAMS(Args) Args
|
||||
#else
|
||||
# define __P(args) ()
|
||||
# define PARAMS(Args) ()
|
||||
#endif
|
||||
|
||||
int
|
||||
memcasecmp __P((const void *vs1, const void *vs2, size_t n));
|
||||
memcasecmp PARAMS ((const void *vs1, const void *vs2, size_t n));
|
||||
|
||||
@@ -20,7 +20,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
|
||||
13
lib/memcmp.c
13
lib/memcmp.c
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
|
||||
Contributed by Torbjorn Granlund (tege@sics.se).
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
@@ -15,8 +15,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
@@ -364,3 +364,10 @@ memcmp (s1, s2, len)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef weak_alias
|
||||
#undef bcmp
|
||||
weak_alias (memcmp, bcmp)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
if the source overlaps with the destination.
|
||||
Return DESTADDR. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
char *
|
||||
memcpy (destaddr, srcaddr, len)
|
||||
char *destaddr;
|
||||
|
||||
@@ -3,22 +3,26 @@
|
||||
In the public domain.
|
||||
By David MacKenzie <djm@gnu.ai.mit.edu>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
void
|
||||
void *
|
||||
memmove (dest, source, length)
|
||||
char *dest;
|
||||
const char *source;
|
||||
unsigned length;
|
||||
{
|
||||
char *d0 = dest;
|
||||
if (source < dest)
|
||||
/* Moving from low mem to hi mem; start at end. */
|
||||
for (source += length, dest += length; length; --length)
|
||||
*--dest = *--source;
|
||||
else if (source != dest)
|
||||
/* Moving from hi mem to low mem; start at beginning. */
|
||||
for (; length; --length)
|
||||
*dest++ = *source++;
|
||||
{
|
||||
/* Moving from hi mem to low mem; start at beginning. */
|
||||
for (; length; --length)
|
||||
*dest++ = *source++;
|
||||
}
|
||||
return (void *) d0;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
char *
|
||||
memset (str, c, len)
|
||||
|
||||
16
lib/mkdir.c
16
lib/mkdir.c
@@ -1,4 +1,4 @@
|
||||
/* mkdir.c -- BSD compatible make directory function for System V
|
||||
/* BSD compatible make directory function for System V
|
||||
Copyright (C) 1988, 1990 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -12,11 +12,11 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -26,12 +26,12 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
#undef S_ISDIR
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
#if !defined(S_ISDIR) && defined(S_IFDIR)
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
/* mkdir adapted from GNU tar. */
|
||||
|
||||
26
lib/mktime.c
26
lib/mktime.c
@@ -1,22 +1,22 @@
|
||||
/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
Contributed by Paul Eggert (eggert@twinsun.com).
|
||||
|
||||
This file is part of the GNU C Library.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C
|
||||
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Define this to have a standalone program to test this implementation of
|
||||
mktime. */
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie <djm@ai.mit.edu> */
|
||||
|
||||
@@ -24,30 +24,30 @@
|
||||
changing the mode of many files, this probably results in a
|
||||
performance gain. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "modechange.h"
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
# define NULL 0
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
#undef S_ISDIR
|
||||
#endif /* STAT_MACROS_BROKEN. */
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
#if !defined(S_ISDIR) && defined(S_IFDIR)
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
/* Return newly allocated memory to hold one element of type TYPE. */
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Masks for the `flags' field in a `struct mode_change'. */
|
||||
|
||||
@@ -45,12 +45,12 @@ struct mode_change
|
||||
#define MODE_MEMORY_EXHAUSTED (struct mode_change *) 1
|
||||
|
||||
#ifndef __P
|
||||
#if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
|
||||
#define __P(args) args
|
||||
#else
|
||||
#define __P(args) ()
|
||||
#endif /* GCC. */
|
||||
#endif /* Not __P. */
|
||||
# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
|
||||
# define __P(Args) Args
|
||||
# else
|
||||
# define __P(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct mode_change *mode_compile __P ((const char *, unsigned));
|
||||
unsigned short mode_adjust __P ((unsigned, const struct mode_change *));
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@@ -134,10 +134,6 @@ fstype_to_string (t)
|
||||
{
|
||||
switch (t)
|
||||
{
|
||||
case MOUNT_UFS:
|
||||
return "ufs";
|
||||
case MOUNT_NFS:
|
||||
return "nfs";
|
||||
#ifdef MOUNT_PC
|
||||
case MOUNT_PC:
|
||||
return "pc";
|
||||
@@ -157,6 +153,70 @@ fstype_to_string (t)
|
||||
#ifdef MOUNT_TMP
|
||||
case MOUNT_TMP:
|
||||
return "tmp";
|
||||
#endif
|
||||
#ifdef MOUNT_UFS
|
||||
case MOUNT_UFS:
|
||||
return "ufs" ;
|
||||
#endif
|
||||
#ifdef MOUNT_NFS
|
||||
case MOUNT_NFS:
|
||||
return "nfs" ;
|
||||
#endif
|
||||
#ifdef MOUNT_MSDOS
|
||||
case MOUNT_MSDOS:
|
||||
return "msdos" ;
|
||||
#endif
|
||||
#ifdef MOUNT_LFS
|
||||
case MOUNT_LFS:
|
||||
return "lfs" ;
|
||||
#endif
|
||||
#ifdef MOUNT_LOFS
|
||||
case MOUNT_LOFS:
|
||||
return "lofs" ;
|
||||
#endif
|
||||
#ifdef MOUNT_FDESC
|
||||
case MOUNT_FDESC:
|
||||
return "fdesc" ;
|
||||
#endif
|
||||
#ifdef MOUNT_PORTAL
|
||||
case MOUNT_PORTAL:
|
||||
return "portal" ;
|
||||
#endif
|
||||
#ifdef MOUNT_NULL
|
||||
case MOUNT_NULL:
|
||||
return "null" ;
|
||||
#endif
|
||||
#ifdef MOUNT_UMAP
|
||||
case MOUNT_UMAP:
|
||||
return "umap" ;
|
||||
#endif
|
||||
#ifdef MOUNT_KERNFS
|
||||
case MOUNT_KERNFS:
|
||||
return "kernfs" ;
|
||||
#endif
|
||||
#ifdef MOUNT_PROCFS
|
||||
case MOUNT_PROCFS:
|
||||
return "procfs" ;
|
||||
#endif
|
||||
#ifdef MOUNT_AFS
|
||||
case MOUNT_AFS:
|
||||
return "afs" ;
|
||||
#endif
|
||||
#ifdef MOUNT_CD9660
|
||||
case MOUNT_CD9660:
|
||||
return "cd9660" ;
|
||||
#endif
|
||||
#ifdef MOUNT_UNION
|
||||
case MOUNT_UNION:
|
||||
return "union" ;
|
||||
#endif
|
||||
#ifdef MOUNT_DEVFS
|
||||
case MOUNT_DEVFS:
|
||||
return "devfs" ;
|
||||
#endif
|
||||
#ifdef MOUNT_EXT2FS
|
||||
case MOUNT_EXT2FS:
|
||||
return "ext2fs" ;
|
||||
#endif
|
||||
default:
|
||||
return "?";
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* A mount table entry. */
|
||||
struct mount_entry
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* obstack.c - subroutines used implicitly by object stack macros
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988,89,90,91,92,93,94,96 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@@ -13,25 +13,37 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "obstack.h"
|
||||
|
||||
/* This is just to get __GNU_LIBRARY__ defined. */
|
||||
#include <stdio.h>
|
||||
/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
|
||||
incremented whenever callers compiled using an old obstack.h can no
|
||||
longer properly call the functions in this obstack.c. */
|
||||
#define OBSTACK_INTERFACE_VERSION 1
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||
actually compiling the library itself. This code is part of the GNU C
|
||||
Library, but also included in many other GNU distributions. Compiling
|
||||
actually compiling the library itself, and the installed library
|
||||
supports the same library interface we do. This code is part of the GNU
|
||||
C Library, but also included in many other GNU distributions. Compiling
|
||||
and linking in this code is a waste when using the GNU C library
|
||||
(especially if it is a shared library). Rather than having every GNU
|
||||
program understand `configure --with-gnu-libc' and omit the object files,
|
||||
it is simpler to just do this in the source for each such file. */
|
||||
program understand `configure --with-gnu-libc' and omit the object
|
||||
files, it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
|
||||
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
|
||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||
#include <gnu-versions.h>
|
||||
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
||||
#define ELIDE_CODE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __STDC__
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define POINTER void *
|
||||
#else
|
||||
#define POINTER char *
|
||||
@@ -69,14 +81,14 @@ struct obstack *_obstack;
|
||||
#define CALL_CHUNKFUN(h, size) \
|
||||
(((h) -> use_extra_arg) \
|
||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||
: (*(h)->chunkfun) ((size)))
|
||||
: (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
|
||||
|
||||
#define CALL_FREEFUN(h, old_chunk) \
|
||||
do { \
|
||||
if ((h) -> use_extra_arg) \
|
||||
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
||||
else \
|
||||
(*(h)->freefun) ((old_chunk)); \
|
||||
(*(void (*) ()) (h)->freefun) ((old_chunk)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -267,7 +279,7 @@ _obstack_newchunk (h, length)
|
||||
This is here for debugging.
|
||||
If you use it in a program, you are probably losing. */
|
||||
|
||||
#ifdef __STDC__
|
||||
#if defined (__STDC__) && __STDC__
|
||||
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
|
||||
obstack.h because it is just for debugging. */
|
||||
int _obstack_allocated_p (struct obstack *h, POINTER obj);
|
||||
@@ -374,7 +386,7 @@ obstack_free (h, obj)
|
||||
/* Now define the functional versions of the obstack macros.
|
||||
Define them to simply use the corresponding macros to do the job. */
|
||||
|
||||
#ifdef __STDC__
|
||||
#if defined (__STDC__) && __STDC__
|
||||
/* These function definitions do not work with non-ANSI preprocessors;
|
||||
they won't pass through the macro names in parentheses. */
|
||||
|
||||
@@ -482,4 +494,4 @@ POINTER (obstack_copy0) (obstack, pointer, length)
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
#endif /* _LIBC or not __GNU_LIBRARY__. */
|
||||
#endif /* !ELIDE_CODE */
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* obstack.h - object stack macros
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988,89,90,91,92,93,94,96 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@@ -13,7 +13,7 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Summary:
|
||||
|
||||
@@ -102,11 +102,16 @@ Summary:
|
||||
|
||||
#ifndef __OBSTACK_H__
|
||||
#define __OBSTACK_H__
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
|
||||
# define bcopy(from, to, len) memcpy ((to), (from), (len))
|
||||
#endif
|
||||
|
||||
|
||||
/* We use subtraction of (char *)0 instead of casting to int
|
||||
because on word-addressable machines a simple cast to int
|
||||
may ignore the byte-within-word field of the pointer. */
|
||||
@@ -136,21 +141,18 @@ Summary:
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef HAVE_PTRDIFF_T
|
||||
# define ptrdiff_t off_t
|
||||
#endif
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define PTR_INT_TYPE ptrdiff_t
|
||||
#else
|
||||
#define PTR_INT_TYPE long
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H || STDC_HEADERS
|
||||
# include <string.h>
|
||||
# ifndef bcopy
|
||||
# define bcopy(s, d, n) memcpy ((d), (s), (n))
|
||||
# endif
|
||||
#else /* HAVE_STRING_H || STDC_HEADERS */
|
||||
# include <strings.h>
|
||||
#endif /* not (HAVE_STRING_H || STDC_HEADERS) */
|
||||
|
||||
struct _obstack_chunk /* Lives at front of each chunk. */
|
||||
{
|
||||
char *limit; /* 1 past end of this chunk */
|
||||
@@ -167,9 +169,18 @@ struct obstack /* control current object in current chunk */
|
||||
char *chunk_limit; /* address of char after current chunk */
|
||||
PTR_INT_TYPE temp; /* Temporary for some macros. */
|
||||
int alignment_mask; /* Mask of alignment for each object. */
|
||||
#if defined (__STDC__) && __STDC__
|
||||
/* These prototypes vary based on `use_extra_arg', and we use
|
||||
casts to the prototypeless function type in all assignments,
|
||||
but having prototypes here quiets -Wstrict-prototypes. */
|
||||
struct _obstack_chunk *(*chunkfun) (void *, long);
|
||||
void (*freefun) (void *, struct _obstack_chunk *);
|
||||
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
|
||||
#else
|
||||
struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
|
||||
void (*freefun) (); /* User's function to free a chunk. */
|
||||
char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
|
||||
#endif
|
||||
unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
|
||||
unsigned maybe_empty_object:1;/* There is a possibility that the current
|
||||
chunk contains a zero-length object. This
|
||||
@@ -184,9 +195,10 @@ struct obstack /* control current object in current chunk */
|
||||
extern void _obstack_newchunk (struct obstack *, int);
|
||||
extern void _obstack_free (struct obstack *, void *);
|
||||
extern int _obstack_begin (struct obstack *, int, int,
|
||||
void *(*) (), void (*) ());
|
||||
void *(*) (long), void (*) (void *));
|
||||
extern int _obstack_begin_1 (struct obstack *, int, int,
|
||||
void *(*) (), void (*) (), void *);
|
||||
void *(*) (void *, long),
|
||||
void (*) (void *, void *), void *);
|
||||
#else
|
||||
extern void _obstack_newchunk ();
|
||||
extern void _obstack_free ();
|
||||
@@ -255,6 +267,34 @@ int obstack_chunk_size (struct obstack *obstack);
|
||||
|
||||
#define obstack_alignment_mask(h) ((h)->alignment_mask)
|
||||
|
||||
/* To prevent prototype warnings provide complete argument list in
|
||||
standard C version. */
|
||||
#if defined (__STDC__) && __STDC__
|
||||
|
||||
#define obstack_init(h) \
|
||||
_obstack_begin ((h), 0, 0, \
|
||||
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
|
||||
|
||||
#define obstack_begin(h, size) \
|
||||
_obstack_begin ((h), (size), 0, \
|
||||
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
|
||||
|
||||
#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
|
||||
_obstack_begin ((h), (size), (alignment), \
|
||||
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
|
||||
|
||||
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||
_obstack_begin_1 ((h), (size), (alignment), \
|
||||
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun), (arg))
|
||||
|
||||
#define obstack_chunkfun(h, newchunkfun) \
|
||||
((h) -> chunkfun = (struct _obstack_chunk *(*)(long)) (newchunkfun))
|
||||
|
||||
#define obstack_freefun(h, newfreefun) \
|
||||
((h) -> freefun = (void (*)(void *)) (newfreefun))
|
||||
|
||||
#else
|
||||
|
||||
#define obstack_init(h) \
|
||||
_obstack_begin ((h), 0, 0, \
|
||||
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
|
||||
@@ -277,11 +317,13 @@ int obstack_chunk_size (struct obstack *obstack);
|
||||
#define obstack_freefun(h, newfreefun) \
|
||||
((h) -> freefun = (void (*)()) (newfreefun))
|
||||
|
||||
#endif
|
||||
|
||||
#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
|
||||
|
||||
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
|
||||
|
||||
#if defined (__GNUC__) && defined (__STDC__)
|
||||
#if defined (__GNUC__) && defined (__STDC__) && __STDC__
|
||||
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
|
||||
does not implement __extension__. But that compiler doesn't define
|
||||
__GNUC_MINOR__. */
|
||||
|
||||
61
lib/path-concat.c
Normal file
61
lib/path-concat.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/* path-concat.c -- concatenate two arbitrary pathnames
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
char *malloc ();
|
||||
char *stpcpy ();
|
||||
|
||||
/* Concatenate two pathname components, DIR and BASE, in newly-allocated
|
||||
storage and return the result. Return 0 if out of memory. Add a slash
|
||||
between DIR and BASE in the result if neither would contribute one.
|
||||
If each would contribute at least one, elide one from the end of DIR.
|
||||
Otherwise, simply concatenate DIR and BASE. In any case, if
|
||||
BASE_IN_RESULT is non-NULL, set *BASE_IN_RESULT to point to the copy of
|
||||
BASE in the returned concatenation. */
|
||||
|
||||
char *
|
||||
path_concat (dir, base, base_in_result)
|
||||
const char *dir;
|
||||
const char *base;
|
||||
char **base_in_result;
|
||||
{
|
||||
char *p;
|
||||
char *p_concat;
|
||||
|
||||
p_concat = malloc (strlen (dir) + strlen (base) + 2);
|
||||
if (!p_concat)
|
||||
return 0;
|
||||
|
||||
p = stpcpy (p_concat, dir);
|
||||
|
||||
if (*(p - 1) == '/' && *base == '/')
|
||||
--p;
|
||||
else if (*(p - 1) != '/' && *base != '/')
|
||||
p = stpcpy (p, "/");
|
||||
|
||||
if (base_in_result)
|
||||
*base_in_result = p;
|
||||
|
||||
stpcpy (p, base);
|
||||
|
||||
return p_concat;
|
||||
}
|
||||
9
lib/path-concat.h
Normal file
9
lib/path-concat.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#if __STDC__
|
||||
# undef __P
|
||||
# define __P(args) args
|
||||
#else
|
||||
# define __P(args) ()
|
||||
#endif
|
||||
|
||||
char *
|
||||
path_concat __P ((const char *dir, const char *base, char **base_in_result));
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _PATHMAX_H
|
||||
#define _PATHMAX_H
|
||||
|
||||
@@ -12,28 +12,50 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Jim Kingdon and David MacKenzie. */
|
||||
%{
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
/* The following block of alloca-related preprocessor directives is here
|
||||
solely to allow compilation by non GNU-C compilers of the C parser
|
||||
produced from this file by old versions of bison. Newer versions of
|
||||
bison include a block similar to this one in bison.simple. */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#else
|
||||
#ifdef sparc
|
||||
#ifdef HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#else
|
||||
#ifdef _AIX
|
||||
#pragma alloca
|
||||
#else
|
||||
char *alloca ();
|
||||
void *alloca ();
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef TM_IN_SYS_TIME
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/* Some old versions of bison generate parsers that use bcopy.
|
||||
That loses on systems that don't provide the function, so we have
|
||||
to redefine it here. */
|
||||
#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
|
||||
#define bcopy(from, to, len) memcpy ((to), (from), (len))
|
||||
#endif
|
||||
|
||||
#define YYDEBUG 1
|
||||
|
||||
@@ -45,9 +67,56 @@ static struct tm t;
|
||||
|
||||
time_t mktime ();
|
||||
|
||||
#define yyparse posixtime_yyparse
|
||||
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
|
||||
as well as gratuitiously global symbol names, so we can have multiple
|
||||
yacc generated parsers in the same program. Note that these are only
|
||||
the variables produced by yacc. If other parser generators (bison,
|
||||
byacc, etc) produce additional global names that conflict at link time,
|
||||
then those parser generators need to be fixed instead of adding those
|
||||
names to this list. */
|
||||
|
||||
#define yymaxdepth pt_maxdepth
|
||||
#define yyparse pt_parse
|
||||
#define yylex pt_lex
|
||||
#define yyerror pt_error
|
||||
#define yylval pt_lval
|
||||
#define yychar pt_char
|
||||
#define yydebug pt_debug
|
||||
#define yypact pt_pact
|
||||
#define yyr1 pt_r1
|
||||
#define yyr2 pt_r2
|
||||
#define yydef pt_def
|
||||
#define yychk pt_chk
|
||||
#define yypgo pt_pgo
|
||||
#define yyact pt_act
|
||||
#define yyexca pt_exca
|
||||
#define yyerrflag pt_errflag
|
||||
#define yynerrs pt_nerrs
|
||||
#define yyps pt_ps
|
||||
#define yypv pt_pv
|
||||
#define yys pt_s
|
||||
#define yy_yys pt_yys
|
||||
#define yystate pt_state
|
||||
#define yytmp pt_tmp
|
||||
#define yyv pt_v
|
||||
#define yy_yyv pt_yyv
|
||||
#define yyval pt_val
|
||||
#define yylloc pt_lloc
|
||||
#define yyreds pt_reds /* With YYDEBUG defined */
|
||||
#define yytoks pt_toks /* With YYDEBUG defined */
|
||||
#define yylhs pt_yylhs
|
||||
#define yylen pt_yylen
|
||||
#define yydefred pt_yydefred
|
||||
#define yydgoto pt_yydgoto
|
||||
#define yysindex pt_yysindex
|
||||
#define yyrindex pt_yyrindex
|
||||
#define yygindex pt_yygindex
|
||||
#define yytable pt_yytable
|
||||
#define yycheck pt_yycheck
|
||||
|
||||
static int yylex ();
|
||||
static int yyerror ();
|
||||
|
||||
%}
|
||||
|
||||
%token DIGIT
|
||||
|
||||
18
lib/putenv.c
18
lib/putenv.c
@@ -15,13 +15,13 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Define-away any (possibly conflicting) prototype of putenv.
|
||||
@@ -29,26 +29,26 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
#define putenv _sys_putenv
|
||||
|
||||
#if defined (__GNU_LIBRARY__) || defined (HAVE_STDLIB_H)
|
||||
#include <stdlib.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#if defined (__GNU_LIBRARY__) || defined (HAVE_STRING_H)
|
||||
#include <string.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
#if defined (__GNU_LIBRARY__) || defined (HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#undef putenv
|
||||
|
||||
#if !defined (__GNU_LIBRARY__) && !defined (HAVE_STRCHR)
|
||||
#define strchr index
|
||||
# define strchr index
|
||||
#endif
|
||||
#if !defined (__GNU_LIBRARY__) && !defined (HAVE_MEMCPY)
|
||||
#define memcpy(d,s,n) bcopy ((s), (d), (n))
|
||||
# define memcpy(d,s,n) bcopy ((s), (d), (n))
|
||||
#endif
|
||||
|
||||
#if HAVE_GNU_LD
|
||||
#define environ __environ
|
||||
# define environ __environ
|
||||
#else
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
Written by Jim Meyering. */
|
||||
|
||||
@@ -28,23 +28,23 @@
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if defined (STDC_HEADERS) || defined(HAVE_STRING_H)
|
||||
#include <string.h>
|
||||
# include <string.h>
|
||||
/* An ANSI string.h and pre-ANSI memory.h might conflict. */
|
||||
#if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
|
||||
#include <memory.h>
|
||||
#endif /* not STDC_HEADERS and HAVE_MEMORY_H */
|
||||
# if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
|
||||
# include <memory.h>
|
||||
# endif /* not STDC_HEADERS and HAVE_MEMORY_H */
|
||||
#else /* not STDC_HEADERS and not HAVE_STRING_H */
|
||||
#include <strings.h>
|
||||
# include <strings.h>
|
||||
/* memory.h and strings.h conflict on some systems. */
|
||||
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#ifndef H_READTOKENS_H
|
||||
#define H_READTOKENS_H
|
||||
# define H_READTOKENS_H
|
||||
|
||||
#ifndef INITIAL_TOKEN_LENGTH
|
||||
#define INITIAL_TOKEN_LENGTH 20
|
||||
#endif
|
||||
# ifndef INITIAL_TOKEN_LENGTH
|
||||
# define INITIAL_TOKEN_LENGTH 20
|
||||
# endif
|
||||
|
||||
#ifndef TOKENBUFFER_DEFINED
|
||||
#define TOKENBUFFER_DEFINED
|
||||
# ifndef TOKENBUFFER_DEFINED
|
||||
# define TOKENBUFFER_DEFINED
|
||||
struct tokenbuffer
|
||||
{
|
||||
long size;
|
||||
@@ -14,14 +14,14 @@ struct tokenbuffer
|
||||
};
|
||||
typedef struct tokenbuffer token_buffer;
|
||||
|
||||
#endif /* not TOKENBUFFER_DEFINED */
|
||||
# endif /* not TOKENBUFFER_DEFINED */
|
||||
|
||||
#undef __P
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define __P(x) x
|
||||
#else
|
||||
#define __P(x) ()
|
||||
#endif
|
||||
# undef __P
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
|
||||
void init_tokenbuffer __P ((token_buffer *tokenbuffer));
|
||||
|
||||
|
||||
3619
lib/regex.c
3619
lib/regex.c
File diff suppressed because it is too large
Load Diff
30
lib/regex.h
30
lib/regex.h
@@ -14,8 +14,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef __REGEXP_LIBRARY_H__
|
||||
#define __REGEXP_LIBRARY_H__
|
||||
@@ -42,7 +42,7 @@ typedef unsigned reg_syntax_t;
|
||||
#define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
|
||||
|
||||
/* If this bit is not set, then + and ? are operators, and \+ and \? are
|
||||
literals.
|
||||
literals.
|
||||
If set, then \+ and \? are operators and + and ? are literals. */
|
||||
#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
|
||||
|
||||
@@ -58,7 +58,7 @@ typedef unsigned reg_syntax_t;
|
||||
^ is an anchor if it is at the beginning of a regular
|
||||
expression or after an open-group or an alternation operator;
|
||||
$ is an anchor if it is at the end of a regular expression, or
|
||||
before a close-group or an alternation operator.
|
||||
before a close-group or an alternation operator.
|
||||
|
||||
This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
|
||||
POSIX draft 11.2 says that * etc. in leading positions is undefined.
|
||||
@@ -69,7 +69,7 @@ typedef unsigned reg_syntax_t;
|
||||
/* If this bit is set, then special characters are always special
|
||||
regardless of where they are in the pattern.
|
||||
If this bit is not set, then special characters are special only in
|
||||
some contexts; otherwise they are ordinary. Specifically,
|
||||
some contexts; otherwise they are ordinary. Specifically,
|
||||
* + ? and intervals are only special when not after the beginning,
|
||||
open-group, or alternation operator. */
|
||||
#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
|
||||
@@ -91,7 +91,7 @@ typedef unsigned reg_syntax_t;
|
||||
#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
|
||||
|
||||
/* If this bit is set, either \{...\} or {...} defines an
|
||||
interval, depending on RE_NO_BK_BRACES.
|
||||
interval, depending on RE_NO_BK_BRACES.
|
||||
If not set, \{, \}, {, and } are literals. */
|
||||
#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
|
||||
|
||||
@@ -116,7 +116,7 @@ typedef unsigned reg_syntax_t;
|
||||
If not set, then \<digit> is a back-reference. */
|
||||
#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
|
||||
|
||||
/* If this bit is set, then | is an alternation operator, and \| is literal.
|
||||
/* If this bit is set, then | is an alternation operator, and \| is literal.
|
||||
If not set, then \| is an alternation operator, and | is literal. */
|
||||
#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
|
||||
|
||||
@@ -142,7 +142,7 @@ extern reg_syntax_t re_syntax_options;
|
||||
|
||||
/* Define combinations of the above bits for the standard possibilities.
|
||||
(The [[[ comments delimit what gets put into the Texinfo file, so
|
||||
don't delete them!) */
|
||||
don't delete them!) */
|
||||
/* [[[begin syntaxes]]] */
|
||||
#define RE_SYNTAX_EMACS 0
|
||||
|
||||
@@ -209,7 +209,7 @@ extern reg_syntax_t re_syntax_options;
|
||||
#ifdef RE_DUP_MAX
|
||||
#undef RE_DUP_MAX
|
||||
#endif
|
||||
#define RE_DUP_MAX ((1 << 15) - 1)
|
||||
#define RE_DUP_MAX ((1 << 15) - 1)
|
||||
|
||||
|
||||
/* POSIX `cflags' bits (i.e., information for `regcomp'). */
|
||||
@@ -221,7 +221,7 @@ extern reg_syntax_t re_syntax_options;
|
||||
/* If this bit is set, then ignore case when matching.
|
||||
If not set, then case is significant. */
|
||||
#define REG_ICASE (REG_EXTENDED << 1)
|
||||
|
||||
|
||||
/* If this bit is set, then anchors do not match at newline
|
||||
characters in the string.
|
||||
If not set, then anchors do match at newlines. */
|
||||
@@ -260,7 +260,7 @@ typedef enum
|
||||
REG_EESCAPE, /* Trailing backslash. */
|
||||
REG_ESUBREG, /* Invalid back reference. */
|
||||
REG_EBRACK, /* Unmatched left bracket. */
|
||||
REG_EPAREN, /* Parenthesis imbalance. */
|
||||
REG_EPAREN, /* Parenthesis imbalance. */
|
||||
REG_EBRACE, /* Unmatched \{. */
|
||||
REG_BADBR, /* Invalid contents of \{\}. */
|
||||
REG_ERANGE, /* Invalid range end. */
|
||||
@@ -279,7 +279,7 @@ typedef enum
|
||||
compiled, the `re_nsub' field is available. All other fields are
|
||||
private to the regex routines. */
|
||||
|
||||
#ifndef RE_TRANSLATE_TYPE
|
||||
#ifndef RE_TRANSLATE_TYPE
|
||||
#define RE_TRANSLATE_TYPE char *
|
||||
#endif
|
||||
|
||||
@@ -295,7 +295,7 @@ struct re_pattern_buffer
|
||||
unsigned long allocated;
|
||||
|
||||
/* Number of bytes actually used in `buffer'. */
|
||||
unsigned long used;
|
||||
unsigned long used;
|
||||
|
||||
/* Syntax setting with which the pattern was compiled. */
|
||||
reg_syntax_t syntax;
|
||||
@@ -339,7 +339,7 @@ struct re_pattern_buffer
|
||||
unsigned no_sub : 1;
|
||||
|
||||
/* If set, a beginning-of-line anchor doesn't match at the
|
||||
beginning of the string. */
|
||||
beginning of the string. */
|
||||
unsigned not_bol : 1;
|
||||
|
||||
/* Similarly for an end-of-line anchor. */
|
||||
@@ -446,7 +446,7 @@ extern int re_match
|
||||
|
||||
|
||||
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
|
||||
extern int re_match_2
|
||||
extern int re_match_2
|
||||
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
|
||||
int length1, const char *string2, int length2,
|
||||
int start, struct re_registers *regs, int stop));
|
||||
|
||||
27
lib/rename.c
27
lib/rename.c
@@ -1,4 +1,4 @@
|
||||
/* rename.c -- BSD compatible directory function for System V
|
||||
/* BSD compatible rename and directory rename function for System V.
|
||||
Copyright (C) 1988, 1990 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -12,11 +12,11 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -26,12 +26,12 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
#undef S_ISDIR
|
||||
#endif /* STAT_MACROS_BROKEN. */
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
#if !defined(S_ISDIR) && defined(S_IFDIR)
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
/* Rename file FROM to file TO.
|
||||
@@ -67,6 +67,12 @@ rename (from, to)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef MVDIR
|
||||
|
||||
/* If MVDIR is defined, it should be the full filename of a setuid root
|
||||
program able to link and unlink directories. If MVDIR is not defined,
|
||||
then the capability of renaming directories may be missing. */
|
||||
|
||||
if (S_ISDIR (from_stats.st_mode))
|
||||
{
|
||||
/* Need a setuid root process to link and unlink directories. */
|
||||
@@ -90,6 +96,9 @@ rename (from, to)
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
#endif /* MVDIR */
|
||||
|
||||
{
|
||||
if (link (from, to))
|
||||
return -1;
|
||||
|
||||
16
lib/rmdir.c
16
lib/rmdir.c
@@ -1,4 +1,4 @@
|
||||
/* rmdir.c -- BSD compatible remove directory function for System V
|
||||
/* BSD compatible remove directory function for System V
|
||||
Copyright (C) 1988, 1990 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -12,11 +12,11 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -27,12 +27,12 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
#undef S_ISDIR
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
#if !defined(S_ISDIR) && defined(S_IFDIR)
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
/* rmdir adapted from GNU tar. */
|
||||
|
||||
91
lib/rpmatch.c
Normal file
91
lib/rpmatch.c
Normal file
@@ -0,0 +1,91 @@
|
||||
/* rpmatch - determine whether string value is affirmation or negative
|
||||
response according to current locale's data
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS || _LIBC
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
# ifndef NULL
|
||||
# define NULL 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef WITH_REGEX
|
||||
# include <regex.h>
|
||||
#else
|
||||
# include <rx.h>
|
||||
#endif
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
|
||||
static int
|
||||
try (response, pattern, match, nomatch, lastp, re)
|
||||
const char *response;
|
||||
const char *pattern;
|
||||
const int match;
|
||||
const int nomatch;
|
||||
const char **lastp;
|
||||
regex_t *re;
|
||||
{
|
||||
if (pattern != *lastp)
|
||||
{
|
||||
/* The pattern has changed. */
|
||||
if (*lastp)
|
||||
{
|
||||
/* Free the old compiled pattern. */
|
||||
regfree (re);
|
||||
*lastp = NULL;
|
||||
}
|
||||
/* Compile the pattern and cache it for future runs. */
|
||||
if (regcomp (re, pattern, REG_EXTENDED) != 0)
|
||||
return -1;
|
||||
*lastp = pattern;
|
||||
}
|
||||
|
||||
/* See if the regular expression matches RESPONSE. */
|
||||
return regexec (re, response, 0, NULL, 0) == 0 ? match : nomatch;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
rpmatch (response)
|
||||
const char *response;
|
||||
{
|
||||
/* Match against one of the response patterns, compiling the pattern
|
||||
first if necessary. */
|
||||
|
||||
/* We cache the response patterns and compiled regexps here. */
|
||||
static const char *yesexpr, *noexpr;
|
||||
static regex_t yesre, nore;
|
||||
int result;
|
||||
|
||||
return ((result = try (response, _("^[yY]"), 1, 0,
|
||||
&yesexpr, &yesre))
|
||||
? result
|
||||
: try (response, _("^[nN]"), 0, -1, &noexpr, &nore));
|
||||
}
|
||||
@@ -12,18 +12,18 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Jim Meyering <meyering@na-net.ornl.gov>. */
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
|
||||
|
||||
|
||||
10
lib/setenv.c
10
lib/setenv.c
@@ -19,23 +19,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#if _LIBC || HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#if _LIBC || HAVE_STRING_H
|
||||
#include <string.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
#if _LIBC || HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GNU_LD
|
||||
#define __environ environ
|
||||
# define __environ environ
|
||||
#endif
|
||||
|
||||
int
|
||||
|
||||
14
lib/setenv.h
14
lib/setenv.h
@@ -1,12 +1,12 @@
|
||||
#ifndef SETENV_H
|
||||
#define SETENV_H 1
|
||||
# define SETENV_H 1
|
||||
|
||||
#undef __P
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define __P(x) x
|
||||
#else
|
||||
#define __P(x) ()
|
||||
#endif
|
||||
# undef __P
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
|
||||
int
|
||||
setenv __P ((const char *name, const char *value, int replace));
|
||||
|
||||
@@ -12,11 +12,15 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* David MacKenzie <djm@ai.mit.edu> */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
|
||||
|
||||
@@ -11,20 +11,20 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
# include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
#ifndef strchr
|
||||
#define strchr index
|
||||
#endif
|
||||
# include <strings.h>
|
||||
# ifndef strchr
|
||||
# define strchr index
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Return the length of the maximum inital segment of S
|
||||
|
||||
12
lib/strdup.c
12
lib/strdup.c
@@ -12,8 +12,12 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <string.h>
|
||||
@@ -23,10 +27,6 @@ char *malloc ();
|
||||
char *strcpy ();
|
||||
#endif
|
||||
|
||||
#if !__STDC__
|
||||
#define const
|
||||
#endif
|
||||
|
||||
/* Return a newly allocated copy of STR,
|
||||
or 0 if out of memory. */
|
||||
|
||||
|
||||
952
lib/strftime.c
952
lib/strftime.c
File diff suppressed because it is too large
Load Diff
@@ -12,13 +12,17 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if defined(STDC_HEADERS) || defined(USG)
|
||||
#include <string.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
|
||||
# include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
/* Remove trailing slashes from PATH.
|
||||
|
||||
@@ -14,8 +14,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
|
||||
139
lib/strstr.c
139
lib/strstr.c
@@ -1,49 +1,116 @@
|
||||
/* strstr.c -- return the offset of one string within another
|
||||
Copyright (C) 1989, 1990 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Author:
|
||||
Mike Rendell Department of Computer Science
|
||||
michael@garfield.mun.edu Memorial University of Newfoundland
|
||||
..!uunet!garfield!michael St. John's, Nfld., Canada
|
||||
(709) 737-4550 A1C 5S7
|
||||
*/
|
||||
/*
|
||||
* My personal strstr() implementation that beats most other algorithms.
|
||||
* Until someone tells me otherwise, I assume that this is the
|
||||
* fastest implementation of strstr() in C.
|
||||
* I deliberately chose not to comment it. You should have at least
|
||||
* as much fun trying to understand it, as I had to write it :-).
|
||||
*
|
||||
* Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */
|
||||
|
||||
/* Return the starting address of string S2 in S1;
|
||||
return 0 if it is not found. */
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef unsigned chartype;
|
||||
|
||||
char *
|
||||
strstr (s1, s2)
|
||||
char *s1;
|
||||
char *s2;
|
||||
strstr (phaystack, pneedle)
|
||||
const char *phaystack;
|
||||
const char *pneedle;
|
||||
{
|
||||
int i;
|
||||
char *p1;
|
||||
char *p2;
|
||||
char *s = s1;
|
||||
register const unsigned char *haystack, *needle;
|
||||
register chartype b, c;
|
||||
|
||||
for (p2 = s2, i = 0; *s; p2 = s2, i++, s++)
|
||||
haystack = (const unsigned char *) phaystack;
|
||||
needle = (const unsigned char *) pneedle;
|
||||
|
||||
b = *needle;
|
||||
if (b != '\0')
|
||||
{
|
||||
for (p1 = s; *p1 && *p2 && *p1 == *p2; p1++, p2++)
|
||||
;
|
||||
if (!*p2)
|
||||
break;
|
||||
}
|
||||
if (!*p2)
|
||||
return s1 + i;
|
||||
haystack--; /* possible ANSI violation */
|
||||
do
|
||||
{
|
||||
c = *++haystack;
|
||||
if (c == '\0')
|
||||
goto ret0;
|
||||
}
|
||||
while (c != b);
|
||||
|
||||
c = *++needle;
|
||||
if (c == '\0')
|
||||
goto foundneedle;
|
||||
++needle;
|
||||
goto jin;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
register chartype a;
|
||||
register const unsigned char *rhaystack, *rneedle;
|
||||
|
||||
do
|
||||
{
|
||||
a = *++haystack;
|
||||
if (a == '\0')
|
||||
goto ret0;
|
||||
if (a == b)
|
||||
break;
|
||||
a = *++haystack;
|
||||
if (a == '\0')
|
||||
goto ret0;
|
||||
shloop: }
|
||||
while (a != b);
|
||||
|
||||
jin: a = *++haystack;
|
||||
if (a == '\0')
|
||||
goto ret0;
|
||||
|
||||
if (a != c)
|
||||
goto shloop;
|
||||
|
||||
rhaystack = haystack-- + 1;
|
||||
rneedle = needle;
|
||||
a = *rneedle;
|
||||
|
||||
if (*rhaystack == a)
|
||||
do
|
||||
{
|
||||
if (a == '\0')
|
||||
goto foundneedle;
|
||||
++rhaystack;
|
||||
a = *++needle;
|
||||
if (*rhaystack != a)
|
||||
break;
|
||||
if (a == '\0')
|
||||
goto foundneedle;
|
||||
++rhaystack;
|
||||
a = *++needle;
|
||||
}
|
||||
while (*rhaystack == a);
|
||||
|
||||
needle = rneedle; /* took the register-poor aproach */
|
||||
|
||||
if (a == '\0')
|
||||
break;
|
||||
}
|
||||
}
|
||||
foundneedle:
|
||||
return (char*) haystack;
|
||||
ret0:
|
||||
return 0;
|
||||
}
|
||||
|
||||
28
lib/strtod.c
28
lib/strtod.c
@@ -11,11 +11,11 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
@@ -26,21 +26,21 @@ extern int errno;
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef HAVE_FLOAT_H
|
||||
#include <float.h>
|
||||
#if HAVE_FLOAT_H
|
||||
# include <float.h>
|
||||
#else
|
||||
#define DBL_MAX 1.7976931348623159e+308
|
||||
#define DBL_MIN 2.2250738585072010e-308
|
||||
# define DBL_MAX 1.7976931348623159e+308
|
||||
# define DBL_MIN 2.2250738585072010e-308
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#else
|
||||
#define NULL 0
|
||||
#ifndef HUGE_VAL
|
||||
#define HUGE_VAL HUGE
|
||||
#endif
|
||||
# define NULL 0
|
||||
# ifndef HUGE_VAL
|
||||
# define HUGE_VAL HUGE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the
|
||||
|
||||
94
lib/strtol.c
94
lib/strtol.c
@@ -1,24 +1,23 @@
|
||||
/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
|
||||
/* strtol - Convert string representation of a number into an integer value.
|
||||
Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C
|
||||
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
@@ -33,6 +32,9 @@ USA. */
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
#ifndef __set_errno
|
||||
# define __set_errno(Val) errno = (Val)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
@@ -41,6 +43,7 @@ extern int errno;
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#else
|
||||
# ifndef NULL
|
||||
# define NULL 0
|
||||
@@ -119,29 +122,27 @@ extern int errno;
|
||||
#ifdef USE_WIDE_CHAR
|
||||
# include <wchar.h>
|
||||
# include <wctype.h>
|
||||
# define L_(ch) L##ch
|
||||
# define L_(Ch) L##Ch
|
||||
# define UCHAR_TYPE wint_t
|
||||
# define STRING_TYPE wchar_t
|
||||
# define ISSPACE(ch) iswspace (ch)
|
||||
# define ISALPHA(ch) iswalpha (ch)
|
||||
# define TOUPPER(ch) towupper (ch)
|
||||
# define ISSPACE(Ch) iswspace (Ch)
|
||||
# define ISALPHA(Ch) iswalpha (Ch)
|
||||
# define TOUPPER(Ch) towupper (Ch)
|
||||
#else
|
||||
# define L_(ch) ch
|
||||
# define L_(Ch) Ch
|
||||
# define UCHAR_TYPE unsigned char
|
||||
# define STRING_TYPE char
|
||||
# define ISSPACE(ch) isspace (ch)
|
||||
# define ISALPHA(ch) isalpha (ch)
|
||||
# define TOUPPER(ch) toupper (ch)
|
||||
# define ISSPACE(Ch) isspace (Ch)
|
||||
# define ISALPHA(Ch) isalpha (Ch)
|
||||
# define TOUPPER(Ch) toupper (Ch)
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
# define INTERNAL(x) INTERNAL1(x)
|
||||
# define INTERNAL1(x) __##x##_internal
|
||||
# define WEAKNAME(x) WEAKNAME1(x)
|
||||
# define WEAKNAME1(x) __##x
|
||||
# define INTERNAL(X) INTERNAL1(X)
|
||||
# define INTERNAL1(X) __##X##_internal
|
||||
# define WEAKNAME(X) WEAKNAME1(X)
|
||||
#else
|
||||
# define INTERNAL(x) __/**/x/**/_internal
|
||||
# define WEAKNAME(x) __/**/x
|
||||
# define INTERNAL(X) __/**/X/**/_internal
|
||||
#endif
|
||||
|
||||
#ifdef USE_NUMBER_GROUPING
|
||||
@@ -251,8 +252,9 @@ INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
/* Find the end of the digit string and check its grouping. */
|
||||
end = s;
|
||||
for (c = *end; c != L_('\0'); c = *++end)
|
||||
if (c != thousands && (c < L_('0') || c > L_('9'))
|
||||
&& (!ISALPHA (c) || TOUPPER (c) - L_('A') + 10 >= base))
|
||||
if ((wchar_t) c != thousands
|
||||
&& ((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
|
||||
&& (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base))
|
||||
break;
|
||||
if (*s == thousands)
|
||||
end = s;
|
||||
@@ -278,7 +280,7 @@ INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
c = TOUPPER (c) - L_('A') + 10;
|
||||
else
|
||||
break;
|
||||
if (c >= base)
|
||||
if ((int) c >= base)
|
||||
break;
|
||||
/* Check for overflow. */
|
||||
if (i > cutoff || (i == cutoff && c > cutlim))
|
||||
@@ -311,7 +313,7 @@ INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
|
||||
if (overflow)
|
||||
{
|
||||
errno = ERANGE;
|
||||
__set_errno (ERANGE);
|
||||
#if UNSIGNED
|
||||
return ULONG_MAX;
|
||||
#else
|
||||
@@ -324,7 +326,7 @@ INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
|
||||
noconv:
|
||||
/* We must handle a special case here: the base is 0 or 16 and the
|
||||
first two characters and '0' and 'x', but the rest are no
|
||||
first two characters are '0' and 'x', but the rest are no
|
||||
hexadecimal digits. This is no error case. We return 0 and
|
||||
ENDPTR points to the `x`. */
|
||||
if (endptr != NULL)
|
||||
@@ -340,19 +342,23 @@ noconv:
|
||||
|
||||
/* External user entry point. */
|
||||
|
||||
#undef __P
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define __P(args) args
|
||||
#else
|
||||
#define __P(args) ()
|
||||
#endif
|
||||
#if _LIBC - 0 == 0
|
||||
# undef PARAMS
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
|
||||
/* Prototype. */
|
||||
INT strtol __P ((const STRING_TYPE *nptr, STRING_TYPE **endptr,
|
||||
int base));
|
||||
INT strtol PARAMS ((const STRING_TYPE *nptr, STRING_TYPE **endptr, int base));
|
||||
#endif
|
||||
|
||||
|
||||
INT
|
||||
#ifdef weak_function
|
||||
weak_function
|
||||
#endif
|
||||
strtol (nptr, endptr, base)
|
||||
const STRING_TYPE *nptr;
|
||||
STRING_TYPE **endptr;
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
/* Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define UNSIGNED 1
|
||||
|
||||
#include "strtol.c"
|
||||
#include <strtol.c>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* xgetcwd.c -- return current directory with unlimited length
|
||||
Copyright (C) 1992 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -12,20 +12,13 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by David MacKenzie, djm@gnu.ai.mit.edu. */
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if defined (CONFIG_BROKETS)
|
||||
/* We use <config.h> instead of "config.h" so that a compilation
|
||||
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
|
||||
(which it would do because it found this file in $srcdir). */
|
||||
#include <config.h>
|
||||
#else
|
||||
#include "config.h"
|
||||
#endif
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -33,14 +26,15 @@
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "pathmax.h"
|
||||
|
||||
#if !defined(_POSIX_VERSION) && !defined(HAVE_GETCWD)
|
||||
char *getwd ();
|
||||
#define getcwd(buf, max) getwd (buf)
|
||||
#else
|
||||
#if HAVE_GETCWD
|
||||
char *getcwd ();
|
||||
#else
|
||||
char *getwd ();
|
||||
# define getcwd(Buf, Max) getwd (Buf)
|
||||
#endif
|
||||
|
||||
/* Amount to increase buffer size by in each try. */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user