mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
1553 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cec3ce1bd | ||
|
|
0924e6fa60 | ||
|
|
608b7ce3ba | ||
|
|
b15c6a222b | ||
|
|
722b47ca02 | ||
|
|
67632ea61f | ||
|
|
6766af1902 | ||
|
|
fd59122b41 | ||
|
|
90ed4c7d26 | ||
|
|
072b27d4d2 | ||
|
|
27fc27695b | ||
|
|
44fc00b79c | ||
|
|
b78de3e724 | ||
|
|
faf0e1a16e | ||
|
|
909dc8c01d | ||
|
|
6f468fedb4 | ||
|
|
a5f1ced62a | ||
|
|
2e55f17398 | ||
|
|
4d13e6fa55 | ||
|
|
e38b3095cb | ||
|
|
c759590c03 | ||
|
|
647185eda4 | ||
|
|
0764c7eb69 | ||
|
|
3856e7a1c1 | ||
|
|
669102ec61 | ||
|
|
a2e185c904 | ||
|
|
039ff08371 | ||
|
|
507e4c7e69 | ||
|
|
8529df5a59 | ||
|
|
52be7173c0 | ||
|
|
746246f20f | ||
|
|
8faf6cb717 | ||
|
|
e093b77bfb | ||
|
|
25170852d7 | ||
|
|
7a0fd15ee7 | ||
|
|
31bfafc32e | ||
|
|
554f8ec02f | ||
|
|
3364b4a289 | ||
|
|
988d9b05dd | ||
|
|
c531932fd2 | ||
|
|
c5ad355677 | ||
|
|
42ad428793 | ||
|
|
8cd4321b8b | ||
|
|
6b5ddbc2c9 | ||
|
|
6f1ebf7e68 | ||
|
|
2bcf0bd3f3 | ||
|
|
7b94e62e37 | ||
|
|
94bdbcb500 | ||
|
|
3723d62e4f | ||
|
|
fe8cf19c6b | ||
|
|
cf9b64e697 | ||
|
|
c36eeadd49 | ||
|
|
a76c54f4c1 | ||
|
|
cc76ce042c | ||
|
|
5d0c6e59ac | ||
|
|
d62d8770a6 | ||
|
|
84d2cd2820 | ||
|
|
a4f4371389 | ||
|
|
4c7e4c094e | ||
|
|
52b883ffc0 | ||
|
|
df6f3a4998 | ||
|
|
23b0d345e9 | ||
|
|
d3caacdc49 | ||
|
|
63821aae49 | ||
|
|
500578e250 | ||
|
|
bc0c927da9 | ||
|
|
0fdba7fb2a | ||
|
|
81ca387201 | ||
|
|
2afb97d4f4 | ||
|
|
a71d24334e | ||
|
|
0ea919d2da | ||
|
|
c2a79f9f5f | ||
|
|
1b6f16a2d0 | ||
|
|
05128c2c79 | ||
|
|
711933ad30 | ||
|
|
2ce61398ce | ||
|
|
2e9825b4e7 | ||
|
|
c89f42f5b7 | ||
|
|
9c9354c36d | ||
|
|
16aa74d9d2 | ||
|
|
c59588ce72 | ||
|
|
cf6f431bce | ||
|
|
bbaec810c7 | ||
|
|
b1c9ecbff6 | ||
|
|
6e8beadc83 | ||
|
|
79bca6482d | ||
|
|
d43f88070c | ||
|
|
c1c76161dc | ||
|
|
88d2464bd8 | ||
|
|
a10a5f3a93 | ||
|
|
3e94e8645c | ||
|
|
bd9d31c3f0 | ||
|
|
13d08934ba | ||
|
|
b150c16ebc | ||
|
|
76f8ced07d | ||
|
|
fd09326a94 | ||
|
|
3eb2a22131 | ||
|
|
1edeae648d | ||
|
|
940fd633a2 | ||
|
|
d577c22aa6 | ||
|
|
476382ce9d | ||
|
|
5814c8c46b | ||
|
|
4796fb9f3a | ||
|
|
fe9777a0bd | ||
|
|
649d8f321e | ||
|
|
6dc7d3dea2 | ||
|
|
e7389b6a8f | ||
|
|
2130b49220 | ||
|
|
387827ac90 | ||
|
|
c322ce4c4f | ||
|
|
9c8f7eb9b7 | ||
|
|
e7d469d663 | ||
|
|
3fad422ee5 | ||
|
|
8379824202 | ||
|
|
8b67554aec | ||
|
|
edd66bd294 | ||
|
|
db29cde02a | ||
|
|
306433db58 | ||
|
|
a94c64bcad | ||
|
|
389d9bc4e0 | ||
|
|
9a628d3908 | ||
|
|
513813de35 | ||
|
|
63c90500f0 | ||
|
|
1f3e04f05c | ||
|
|
8cbf0850d9 | ||
|
|
0c583dd647 | ||
|
|
5579ee544c | ||
|
|
30690e6b57 | ||
|
|
2b22830114 | ||
|
|
6e05a8291b | ||
|
|
53d9bb54c7 | ||
|
|
69b3ea263d | ||
|
|
b890a03963 | ||
|
|
86bb482007 | ||
|
|
436f7c405a | ||
|
|
52f24baacc | ||
|
|
6b16d2e1fe | ||
|
|
f409a8a021 | ||
|
|
dae7a9d7f4 | ||
|
|
4bdaed5ff4 | ||
|
|
f7eb4c8913 | ||
|
|
c0fca1bce9 | ||
|
|
d9b0ac1791 | ||
|
|
4696d3dabf | ||
|
|
fa3228b72d | ||
|
|
507b8890a4 | ||
|
|
70654669d5 | ||
|
|
14c6978cc5 | ||
|
|
997fd16b2d | ||
|
|
2cf349d10e | ||
|
|
99ec01ea67 | ||
|
|
051550c21b | ||
|
|
2753d47434 | ||
|
|
b94d49e397 | ||
|
|
b57a53520b | ||
|
|
5ffa85be43 | ||
|
|
03132c06be | ||
|
|
18cdfb06b1 | ||
|
|
7cbc9c5c4d | ||
|
|
2fc820ac2b | ||
|
|
7d24fad90d | ||
|
|
1f7d9dacf4 | ||
|
|
2237d0c5d1 | ||
|
|
2bf54d98be | ||
|
|
cfcf052439 | ||
|
|
04b6320338 | ||
|
|
06e70ddab4 | ||
|
|
70246cdb71 | ||
|
|
ceae44d812 | ||
|
|
503372a035 | ||
|
|
db7b7871a3 | ||
|
|
dd971baefb | ||
|
|
6af87f1ac6 | ||
|
|
aa4d86195c | ||
|
|
6f59cd3b32 | ||
|
|
51ce2f8e5f | ||
|
|
a1d32600e6 | ||
|
|
fca7f39b74 | ||
|
|
d62b389816 | ||
|
|
1c87370738 | ||
|
|
8f751a33c3 | ||
|
|
e5b0e0f712 | ||
|
|
3fb9cf6101 | ||
|
|
ffd066b0f4 | ||
|
|
ae7dbaf035 | ||
|
|
4bba632820 | ||
|
|
7d9ec7823a | ||
|
|
5e1d777314 | ||
|
|
2d5f1727df | ||
|
|
8bfb607ef8 | ||
|
|
25c00a2209 | ||
|
|
330a67148c | ||
|
|
8689db3bd6 | ||
|
|
4aaedfa9d2 | ||
|
|
9f05072b09 | ||
|
|
005e766386 | ||
|
|
64d9604079 | ||
|
|
5bf497f604 | ||
|
|
74942a8e91 | ||
|
|
2f39ab1832 | ||
|
|
3e0f9951dd | ||
|
|
ff4121e50e | ||
|
|
4155657f6f | ||
|
|
7d6e8efb15 | ||
|
|
a490e3f68b | ||
|
|
467828f261 | ||
|
|
d5f0bac1aa | ||
|
|
2678e964e6 | ||
|
|
2ad3aaaca2 | ||
|
|
3eba873029 | ||
|
|
5a6c247bcb | ||
|
|
c2a328bb30 | ||
|
|
af1d1e7d3d | ||
|
|
968b78491b | ||
|
|
7e1e127680 | ||
|
|
4f2e8e8b2b | ||
|
|
ef991b4aa3 | ||
|
|
dbc3f75efa | ||
|
|
8cb947f707 | ||
|
|
361446c55b | ||
|
|
93b4e4074f | ||
|
|
f1bafaa237 | ||
|
|
1941ce9f42 | ||
|
|
7b8da9264b | ||
|
|
07d71b97ce | ||
|
|
c07abd1655 | ||
|
|
71e6aca3b2 | ||
|
|
81679a0c34 | ||
|
|
3e06bb8549 | ||
|
|
a427fa83f6 | ||
|
|
594350107d | ||
|
|
d73c55e449 | ||
|
|
f8b38d358b | ||
|
|
6fa5979ccb | ||
|
|
866d4b9e59 | ||
|
|
24e2617917 | ||
|
|
533999f0fe | ||
|
|
eaa95f208b | ||
|
|
9d874c09f6 | ||
|
|
b701bf8a30 | ||
|
|
7c102d03c7 | ||
|
|
0c0ad8da77 | ||
|
|
8d503b5362 | ||
|
|
274003219b | ||
|
|
0bba57ce8c | ||
|
|
afd8381b51 | ||
|
|
76ffae0660 | ||
|
|
74b63f68dd | ||
|
|
85431d93ed | ||
|
|
186af758eb | ||
|
|
c4dbc53ec4 | ||
|
|
00fc6c9262 | ||
|
|
9e2756872d | ||
|
|
c1c9a579e3 | ||
|
|
e3f8ccf486 | ||
|
|
3eeda5b2bf | ||
|
|
09edea7381 | ||
|
|
02da289e42 | ||
|
|
6d81e0f580 | ||
|
|
1c7b8f6e85 | ||
|
|
af6ce0f12c | ||
|
|
904404bfd2 | ||
|
|
a4d1bdafd6 | ||
|
|
e922107a25 | ||
|
|
8e763221fd | ||
|
|
df5b9c4dc3 | ||
|
|
cda8d2a9af | ||
|
|
58b5f108f2 | ||
|
|
93a207af8d | ||
|
|
fd77bc4a78 | ||
|
|
1e2d216c9e | ||
|
|
df1b3c4948 | ||
|
|
0b765fd547 | ||
|
|
8229e0dbef | ||
|
|
05c446084e | ||
|
|
e28263f673 | ||
|
|
b96c3e6a5d | ||
|
|
ddd7e2a0b8 | ||
|
|
b7bf622acb | ||
|
|
48cab72bd1 | ||
|
|
e735c8f6e0 | ||
|
|
7436273688 | ||
|
|
79e188a2ec | ||
|
|
17232a74f2 | ||
|
|
7af1f21709 | ||
|
|
b9bda3c30d | ||
|
|
bd0070c191 | ||
|
|
a43c0607ac | ||
|
|
2a1279c26d | ||
|
|
9ff208503c | ||
|
|
c73398fa51 | ||
|
|
25839c6c48 | ||
|
|
9d8ec0121c | ||
|
|
9c0e765d5a | ||
|
|
8f67d26ec0 | ||
|
|
b96446bf59 | ||
|
|
7d6185f0f5 | ||
|
|
ad2abcb447 | ||
|
|
df8f50e9bc | ||
|
|
b5501a398e | ||
|
|
baef38bda1 | ||
|
|
dc421733a1 | ||
|
|
968956b998 | ||
|
|
8458d3c376 | ||
|
|
7cdce2075e | ||
|
|
891d094b56 | ||
|
|
c8445f75e0 | ||
|
|
8afe15dd9b | ||
|
|
5cfcfdc5c7 | ||
|
|
9a40ef44fb | ||
|
|
54a8b24b6e | ||
|
|
f2d0d9bda9 | ||
|
|
30b904e1f3 | ||
|
|
8a385c1588 | ||
|
|
493d1adca1 | ||
|
|
6a03579aa4 | ||
|
|
b564762ef5 | ||
|
|
a7870f9997 | ||
|
|
37af708d04 | ||
|
|
279d3ae95e | ||
|
|
321db91227 | ||
|
|
99a1b10d2e | ||
|
|
39f15c676a | ||
|
|
af51884dac | ||
|
|
e3eb136b93 | ||
|
|
a810608d0d | ||
|
|
d78d5d448f | ||
|
|
8f28cc8708 | ||
|
|
0dc71387d4 | ||
|
|
ed759a47cb | ||
|
|
a5f6a3dc40 | ||
|
|
8429ee57dd | ||
|
|
95cc4c0984 | ||
|
|
ef549ef73e | ||
|
|
6d334f8f62 | ||
|
|
da73a665f0 | ||
|
|
72695161da | ||
|
|
66372e29eb | ||
|
|
b604e6b1f1 | ||
|
|
039d440f50 | ||
|
|
f40532072e | ||
|
|
b9f3b0ed92 | ||
|
|
35e2136e59 | ||
|
|
209557e03a | ||
|
|
d225261a77 | ||
|
|
0f14bad291 | ||
|
|
f4e8ba6beb | ||
|
|
1afc458839 | ||
|
|
629576ece4 | ||
|
|
b729ec75ca | ||
|
|
4d390a18ba | ||
|
|
fc3429bc45 | ||
|
|
06ab933220 | ||
|
|
61b95dac69 | ||
|
|
3cff443b59 | ||
|
|
38e11fdc5d | ||
|
|
94eb7340ec | ||
|
|
79476921ef | ||
|
|
d34280f171 | ||
|
|
c8987dca56 | ||
|
|
ccdb1b0215 | ||
|
|
bf0b70f10d | ||
|
|
adac7cd0e3 | ||
|
|
de879011f3 | ||
|
|
f275d7ae99 | ||
|
|
f5b2352264 | ||
|
|
110190e4d9 | ||
|
|
e1b81c9b74 | ||
|
|
3dfa4910e2 | ||
|
|
706a45c0b8 | ||
|
|
7bdd841fd2 | ||
|
|
6d64ac8442 | ||
|
|
175e677c82 | ||
|
|
8b856a3132 | ||
|
|
a97b7f61ff | ||
|
|
0b9c7cac74 | ||
|
|
32852d9825 | ||
|
|
63b6a548e1 | ||
|
|
f27c09a303 | ||
|
|
fb4a9133ed | ||
|
|
11691bf911 | ||
|
|
034781fc4f | ||
|
|
2fa9e8e2d9 | ||
|
|
565b41ed31 | ||
|
|
2570759aa0 | ||
|
|
eb04599224 | ||
|
|
83e51f160b | ||
|
|
3bf61e47d8 | ||
|
|
1c670cbcd2 | ||
|
|
82f70b1ed9 | ||
|
|
56a2795f38 | ||
|
|
dd39ed6e81 | ||
|
|
726b66072a | ||
|
|
7bf6b048be | ||
|
|
10a482fd41 | ||
|
|
16de496c5d | ||
|
|
33e8cff715 | ||
|
|
23eb5e1acd | ||
|
|
900acbdbcb | ||
|
|
45d6772cfe | ||
|
|
fa805211ac | ||
|
|
eca1e2d890 | ||
|
|
6027bfa668 | ||
|
|
679295f1de | ||
|
|
beee918e72 | ||
|
|
9d0fbdaf36 | ||
|
|
e60f34c475 | ||
|
|
1f987f7eed | ||
|
|
5dffc8a83c | ||
|
|
c9b0d2415a | ||
|
|
9893f72169 | ||
|
|
9a8547bc45 | ||
|
|
173be61cad | ||
|
|
855fc65068 | ||
|
|
4f16f7f014 | ||
|
|
909593073d | ||
|
|
b2f1dc2045 | ||
|
|
0cf127ff5c | ||
|
|
7316ccbb5f | ||
|
|
50ab0a78e0 | ||
|
|
ea59c2ae6d | ||
|
|
8cd9be5598 | ||
|
|
dc374320b8 | ||
|
|
5f97defa02 | ||
|
|
8910e98330 | ||
|
|
a11576bb59 | ||
|
|
de7d4fdb5f | ||
|
|
ddbaad372e | ||
|
|
70729acb60 | ||
|
|
5b60bebabb | ||
|
|
29f888398d | ||
|
|
e2365ea11e | ||
|
|
681607ae07 | ||
|
|
c82b876b6f | ||
|
|
ec6cab66bf | ||
|
|
08575c4bce | ||
|
|
caa5ba0ca2 | ||
|
|
7682c7ed4b | ||
|
|
41033e8bd0 | ||
|
|
c4d9b90a58 | ||
|
|
9c1108fdea | ||
|
|
1ee0ec3463 | ||
|
|
26ebb5b5de | ||
|
|
d9ab98a19f | ||
|
|
44a8a34725 | ||
|
|
b310d2131d | ||
|
|
0f16f7e6b2 | ||
|
|
d454296098 | ||
|
|
ad094a6c52 | ||
|
|
98a0f8c36e | ||
|
|
28ecf065f8 | ||
|
|
61c83b3d22 | ||
|
|
5e7630f24f | ||
|
|
4bccf0b322 | ||
|
|
0439c570ab | ||
|
|
78d4dc2ea3 | ||
|
|
7dc3d4d8f8 | ||
|
|
cdd85ee367 | ||
|
|
9ffb6b8bb6 | ||
|
|
ee32712334 | ||
|
|
b4c4729c8f | ||
|
|
f4ab08b5ca | ||
|
|
4cedb82f6e | ||
|
|
9917b0be5a | ||
|
|
363a391db4 | ||
|
|
0d784f664b | ||
|
|
0265852ab2 | ||
|
|
d377c5bd7f | ||
|
|
77678307a5 | ||
|
|
b7b37133ac | ||
|
|
f13c461cf7 | ||
|
|
2d1b13b6d0 | ||
|
|
556a834d33 | ||
|
|
cbed45a540 | ||
|
|
bfcb6bacf8 | ||
|
|
9e82f23de4 | ||
|
|
20925d812d | ||
|
|
e8d79c1502 | ||
|
|
8d45c22c3c | ||
|
|
16aef05416 | ||
|
|
8000bd993e | ||
|
|
8751c5fc27 | ||
|
|
29955c54b8 | ||
|
|
5d461b6c45 | ||
|
|
62471a036d | ||
|
|
0ed1711755 | ||
|
|
3939790637 | ||
|
|
483977a347 | ||
|
|
b5fd786410 | ||
|
|
95ce12946b | ||
|
|
0ec82af940 | ||
|
|
c2f01a209e | ||
|
|
7b9a35951b | ||
|
|
b6baea64d1 | ||
|
|
447637fb37 | ||
|
|
2b21f12d85 | ||
|
|
5a0dcd18c4 | ||
|
|
f3eff573fc | ||
|
|
18b2abbf6c | ||
|
|
7a33a02755 | ||
|
|
3aafbfb626 | ||
|
|
0283d73512 | ||
|
|
ebc79b0b6d | ||
|
|
b6f0933da1 | ||
|
|
d6e1aff5e6 | ||
|
|
81c488fe62 | ||
|
|
b6e61f0f18 | ||
|
|
f04d7b8252 | ||
|
|
c3a2a9a1cf | ||
|
|
83ab129925 | ||
|
|
fc172101b7 | ||
|
|
22e8070d31 | ||
|
|
fb84cd1881 | ||
|
|
5b2989b22a | ||
|
|
96c32a549f | ||
|
|
4b44b870de | ||
|
|
de8600a83e | ||
|
|
c0e0779f61 | ||
|
|
989527ca9e | ||
|
|
a73c5cdedd | ||
|
|
6732d5e87e | ||
|
|
d8eba2c4de | ||
|
|
dd5500c678 | ||
|
|
e105aad760 | ||
|
|
f886ecfdcf | ||
|
|
674500658f | ||
|
|
0b0b0c10b9 | ||
|
|
74ab294e6f | ||
|
|
32317fa2be | ||
|
|
17eefced98 | ||
|
|
4d87cd7f5c | ||
|
|
1b86315413 | ||
|
|
5f5eb0cb24 | ||
|
|
00c25e46b5 | ||
|
|
28ae3f3e55 | ||
|
|
02e4c447fb | ||
|
|
fc98e3b53b | ||
|
|
6d87de19d3 | ||
|
|
8686ed3e79 | ||
|
|
ecd73385f0 | ||
|
|
c0aad8bb11 | ||
|
|
4c8c36c325 | ||
|
|
db111e12ae | ||
|
|
7161f22f6d | ||
|
|
7088e9294e | ||
|
|
e1e9b12ead | ||
|
|
7471db2e0d | ||
|
|
e1e70abfab | ||
|
|
cb40817c27 | ||
|
|
a9b3766804 | ||
|
|
6b6a9cd8c4 | ||
|
|
d929a883fc | ||
|
|
8ddf9aa30c | ||
|
|
2b87d03f50 | ||
|
|
836ab0b6f7 | ||
|
|
08e983d3df | ||
|
|
222d08dc72 | ||
|
|
099fd9e8f0 | ||
|
|
52d78f0558 | ||
|
|
72dadf240e | ||
|
|
917893f4d3 | ||
|
|
63a52bbb4c | ||
|
|
ea7b78f868 | ||
|
|
707be37f35 | ||
|
|
7ef999a43f | ||
|
|
73a5c3b847 | ||
|
|
37991cf4a9 | ||
|
|
940b6777c0 | ||
|
|
e440740bd9 | ||
|
|
8a6d80dda1 | ||
|
|
388c1a6104 | ||
|
|
484ce2d8de | ||
|
|
caa75371a8 | ||
|
|
78c5e7b7ba | ||
|
|
414207ccc7 | ||
|
|
58eeea1ac8 | ||
|
|
5ae09a5d3d | ||
|
|
8deb67d1db | ||
|
|
99eb99dc7d | ||
|
|
5d1daca135 | ||
|
|
1a282c62b7 | ||
|
|
4d6b3bb492 | ||
|
|
55a0417174 | ||
|
|
326aa5c043 | ||
|
|
ca01db1efe | ||
|
|
14c3068647 | ||
|
|
deef029135 | ||
|
|
c21b31a36f | ||
|
|
aaeb7a61c4 | ||
|
|
3a6d52861d | ||
|
|
3737902524 | ||
|
|
09026d5413 | ||
|
|
c01a38db4d | ||
|
|
1e50f47812 | ||
|
|
87261b73b3 | ||
|
|
121f936e4f | ||
|
|
a5261150bb | ||
|
|
d4cc62de24 | ||
|
|
28526f7763 | ||
|
|
beb34bac0a | ||
|
|
6ea18cc152 | ||
|
|
5aa9a43b0c | ||
|
|
f839ec4d47 | ||
|
|
279c73a725 | ||
|
|
fb18828c2c | ||
|
|
b2b3e046e7 | ||
|
|
f5d7ab79b8 | ||
|
|
c9488ff0e1 | ||
|
|
8df5a2474c | ||
|
|
cb2a0f5e50 | ||
|
|
9525a77c98 | ||
|
|
dbb27d4a36 | ||
|
|
4da3051ac3 | ||
|
|
da313bea2d | ||
|
|
0604854c16 | ||
|
|
f5a12e3c11 | ||
|
|
ae60bce16e | ||
|
|
dabc92dc12 | ||
|
|
ee5c9da57b | ||
|
|
cf346c4179 | ||
|
|
f89de05989 | ||
|
|
5a3b6381c2 | ||
|
|
cb5a1ce84b | ||
|
|
c976fc9de2 | ||
|
|
fb3d344a5b | ||
|
|
93a2f57576 | ||
|
|
4fdadc2de6 | ||
|
|
701b698712 | ||
|
|
2a36dfaa48 | ||
|
|
7d70c84f7d | ||
|
|
cd8327ce2d | ||
|
|
79a41c2f8b | ||
|
|
60d1eabd0c | ||
|
|
be53392f0a | ||
|
|
d9025b763b | ||
|
|
fadaa762b5 | ||
|
|
5c46e766b0 | ||
|
|
678bbca816 | ||
|
|
fa207c2942 | ||
|
|
9e2ed8d97a | ||
|
|
4c419b468b | ||
|
|
31555f918c | ||
|
|
1d9ccbf010 | ||
|
|
1db0824586 | ||
|
|
4d9bd13285 | ||
|
|
6fd75407f4 | ||
|
|
1d07c58db8 | ||
|
|
847d1c0da7 | ||
|
|
414d5f13be | ||
|
|
985cae59cb | ||
|
|
72ee797c44 | ||
|
|
73caa61683 | ||
|
|
ee65e66c6c | ||
|
|
48f3734b37 | ||
|
|
df08b15a80 | ||
|
|
8d10649023 | ||
|
|
c346a4e4cf | ||
|
|
9b27320468 | ||
|
|
d25d599163 | ||
|
|
5dc16bf67a | ||
|
|
dea4390e10 | ||
|
|
d77adba2d7 | ||
|
|
b6c2910a61 | ||
|
|
023c594b9b | ||
|
|
d50c8903f9 | ||
|
|
b51a19058f | ||
|
|
c1845ef979 | ||
|
|
ed3076c1e3 | ||
|
|
436ab156b1 | ||
|
|
ca9bd98b2a | ||
|
|
b20df0057f | ||
|
|
d7c291117c | ||
|
|
56478b94ae | ||
|
|
3b7a24cc92 | ||
|
|
2c63fed0e8 | ||
|
|
fab23e172d | ||
|
|
45f197087d | ||
|
|
2fb1f177d9 | ||
|
|
dc1f8d9a16 | ||
|
|
2adb484d90 | ||
|
|
46abc467c6 | ||
|
|
b1828eec81 | ||
|
|
a6ad856b3b | ||
|
|
8a7b2f0191 | ||
|
|
06392556ec | ||
|
|
222973731a | ||
|
|
30cc300814 | ||
|
|
722e2f0957 | ||
|
|
4f982cb6f5 | ||
|
|
3f25540d1e | ||
|
|
7de89daf4d | ||
|
|
4337731793 | ||
|
|
04b726d04d | ||
|
|
16dc8023ae | ||
|
|
c8ef0d4bbe | ||
|
|
aee944ad9b | ||
|
|
63f570d12b | ||
|
|
109d7b4386 | ||
|
|
34db7168de | ||
|
|
b62d5afd3f | ||
|
|
ab0bba9958 | ||
|
|
e4676fbb20 | ||
|
|
fd90d8dbf8 | ||
|
|
edbe4553a8 | ||
|
|
0e18bbb519 | ||
|
|
473f37a6c9 | ||
|
|
90525ea340 | ||
|
|
083a5e420b | ||
|
|
0f165cf273 | ||
|
|
3b57acb098 | ||
|
|
8a1213f73f | ||
|
|
9ac5676264 | ||
|
|
da05e6a690 | ||
|
|
5dcf4f2419 | ||
|
|
aa69564e94 | ||
|
|
73dc52f0b9 | ||
|
|
ae6c9955fb | ||
|
|
dd494192a1 | ||
|
|
fa9fc61ee6 | ||
|
|
7faf69c42d | ||
|
|
61e5152b36 | ||
|
|
301cc00d3b | ||
|
|
1bd2ed97b2 | ||
|
|
3a9d91bb57 | ||
|
|
a26e5e37b8 | ||
|
|
a2e87ae6d1 | ||
|
|
482dc4ee3c | ||
|
|
e698bc0929 | ||
|
|
d64218ea47 | ||
|
|
afb733429b | ||
|
|
9e24c8b0b8 | ||
|
|
f86ac0a31d | ||
|
|
989a7519d5 | ||
|
|
f811e82ad5 | ||
|
|
52928277c2 | ||
|
|
a4b249905e | ||
|
|
de8c144109 | ||
|
|
86c5732f05 | ||
|
|
4a7159dc6c | ||
|
|
7fe7b5d7e2 | ||
|
|
84f5f8528f | ||
|
|
a28d74d2d2 | ||
|
|
2f25926b52 | ||
|
|
4b0c5ec1e9 | ||
|
|
b3e98fa251 | ||
|
|
ed1dca3b40 | ||
|
|
a27a05e698 | ||
|
|
585aa5fac9 | ||
|
|
a5a086c06e | ||
|
|
ee356181ed | ||
|
|
114c6c6af1 | ||
|
|
96096e769d | ||
|
|
b8d9cea40a | ||
|
|
f9a905424f | ||
|
|
10d29bac27 | ||
|
|
9a3433a769 | ||
|
|
b2dfbca4f7 | ||
|
|
a25c404a31 | ||
|
|
1463ff6353 | ||
|
|
c8cde25280 | ||
|
|
b3d09e5532 | ||
|
|
c764daeac9 | ||
|
|
8e17181225 | ||
|
|
cd66abd80a | ||
|
|
0603231e16 | ||
|
|
e73f197706 | ||
|
|
71409500a9 | ||
|
|
83485ba28d | ||
|
|
598382f216 | ||
|
|
ba2900b4aa | ||
|
|
1774bc1d78 | ||
|
|
b27c41df41 | ||
|
|
a1ec1c4af3 | ||
|
|
666c84f948 | ||
|
|
c1471b042b | ||
|
|
7bd952c2a8 | ||
|
|
18005e1153 | ||
|
|
a2057e286e | ||
|
|
74f084382d | ||
|
|
59d2dceb2c | ||
|
|
b087829d9b | ||
|
|
a6cac026c6 | ||
|
|
81cb734910 | ||
|
|
90790efabe | ||
|
|
8e092dca08 | ||
|
|
fa10fa9e64 | ||
|
|
9c2368bab8 | ||
|
|
815dafff5a | ||
|
|
5f6b9742d1 | ||
|
|
b64b2719bc | ||
|
|
3fcc2c725f | ||
|
|
8126042cb4 | ||
|
|
30d2217876 | ||
|
|
c8de90386d | ||
|
|
1553648f54 | ||
|
|
aef02ded49 | ||
|
|
4bc8b66e3a | ||
|
|
e0f3ba1a46 | ||
|
|
1683c6c470 | ||
|
|
24b279f642 | ||
|
|
e82e2278a2 | ||
|
|
f623b9cc48 | ||
|
|
7808919ea4 | ||
|
|
9ee54a9b3a | ||
|
|
c0b3a3636c | ||
|
|
74c1d7d5f4 | ||
|
|
dd08ddd29d | ||
|
|
2169593a4f | ||
|
|
bf009adc4e | ||
|
|
2dce4a36d9 | ||
|
|
69683b305d | ||
|
|
f459045c8c | ||
|
|
1806cb5075 | ||
|
|
2764048933 | ||
|
|
7012d1083e | ||
|
|
406ddda49f | ||
|
|
1c9af0041d | ||
|
|
9402bfd9ef | ||
|
|
a39a7f8ada | ||
|
|
95143d669f | ||
|
|
5061ab5f05 | ||
|
|
92b78195a1 | ||
|
|
bc70df09bb | ||
|
|
2f327c7f34 | ||
|
|
7650a9d9e4 | ||
|
|
b87d62b760 | ||
|
|
c6c2071280 | ||
|
|
28b012a9cc | ||
|
|
821add521e | ||
|
|
1443d5fffa | ||
|
|
24844c6332 | ||
|
|
a26140a98f | ||
|
|
456b0e7bca | ||
|
|
a1a34e0a9b | ||
|
|
955a34ed82 | ||
|
|
6eb493e1db | ||
|
|
50f3294545 | ||
|
|
1a6915b4d8 | ||
|
|
4bc8a7b528 | ||
|
|
9940a771e1 | ||
|
|
88e4ad1d36 | ||
|
|
3e08e11574 | ||
|
|
215ba7757e | ||
|
|
54041560f5 | ||
|
|
dd553cb9e4 | ||
|
|
1dabc37a3a | ||
|
|
34a52b7574 | ||
|
|
99d96a6ba3 | ||
|
|
b87e838b05 | ||
|
|
652303d907 | ||
|
|
4ebfbeef6d | ||
|
|
27b35f3dcc | ||
|
|
48c448a356 | ||
|
|
af123efc85 | ||
|
|
166a16089f | ||
|
|
e02dc25a9e | ||
|
|
0285f77feb | ||
|
|
bf03365731 | ||
|
|
727433f0db | ||
|
|
1e4a6cbe1c | ||
|
|
543be22259 | ||
|
|
6195ec1bc7 | ||
|
|
f5342d557b | ||
|
|
43a6f9d2d8 | ||
|
|
33795311ba | ||
|
|
60a8a47a86 | ||
|
|
269f95aef7 | ||
|
|
23b6d0adbe | ||
|
|
a70f409dee | ||
|
|
41a201e991 | ||
|
|
4c83ec781b | ||
|
|
63cf4a9893 | ||
|
|
57241aed6a | ||
|
|
fb9e0e1b1a | ||
|
|
fdb24f917f | ||
|
|
2e91541147 | ||
|
|
ebb48992c0 | ||
|
|
3b21e822ac | ||
|
|
66c2f3a08a | ||
|
|
c1c7368372 | ||
|
|
7fda17ac4f | ||
|
|
242256b45d | ||
|
|
79dbd85e74 | ||
|
|
8982646a63 | ||
|
|
fbf9eeb8d7 | ||
|
|
4911e67aa8 | ||
|
|
66d5a12094 | ||
|
|
4d94665d3d | ||
|
|
e3b1f10354 | ||
|
|
d971214e89 | ||
|
|
94fe1350f4 | ||
|
|
494f552020 | ||
|
|
0b219591dd | ||
|
|
28154116c4 | ||
|
|
4488d9300d | ||
|
|
bdf06b6060 | ||
|
|
105f262769 | ||
|
|
1f295ae62d | ||
|
|
7c80315d48 | ||
|
|
93696dfa49 | ||
|
|
2238faa8fd | ||
|
|
5bd7048dfe | ||
|
|
43f4c1dfd6 | ||
|
|
2634943070 | ||
|
|
73db00ea87 | ||
|
|
a9066ef619 | ||
|
|
3e4950247e | ||
|
|
7292e5031b | ||
|
|
98950444e6 | ||
|
|
1249a88daf | ||
|
|
1d3ea9cba8 | ||
|
|
c04d364e49 | ||
|
|
e5e8774bc5 | ||
|
|
1a52475baa | ||
|
|
eac67711b5 | ||
|
|
7ad9855775 | ||
|
|
bffeb8c5aa | ||
|
|
97dcae2fb6 | ||
|
|
4e27c7372b | ||
|
|
67ba4ac017 | ||
|
|
b84a28d9dd | ||
|
|
0d1d166269 | ||
|
|
62dbf128a5 | ||
|
|
6258f69c2c | ||
|
|
fb3d202184 | ||
|
|
ea9d247693 | ||
|
|
65cb579ccc | ||
|
|
ebde935587 | ||
|
|
01f160092e | ||
|
|
053a9d88ee | ||
|
|
742dc8804a | ||
|
|
11b02c5e13 | ||
|
|
0324f0f18b | ||
|
|
35559dd156 | ||
|
|
07e4a0df24 | ||
|
|
eab8963d92 | ||
|
|
8e81a3f7a5 | ||
|
|
294df06bed | ||
|
|
f0801eeaad | ||
|
|
79209163af | ||
|
|
9ae6099323 | ||
|
|
273c2c5fbc | ||
|
|
8e47db95c6 | ||
|
|
87d796becc | ||
|
|
09bf17f365 | ||
|
|
34c138f62a | ||
|
|
0e6ddcffef | ||
|
|
a5fe0f8417 | ||
|
|
c00db580d2 | ||
|
|
4c625eb0d6 | ||
|
|
0e158f1b05 | ||
|
|
3ff5583bb6 | ||
|
|
aecb3ebe6f | ||
|
|
0017571134 | ||
|
|
752fb79cac | ||
|
|
465a0e3b5e | ||
|
|
a0921ba770 | ||
|
|
927ab782d4 | ||
|
|
06f3a96515 | ||
|
|
847f8d0124 | ||
|
|
da8058b5dc | ||
|
|
2029c3f7c4 | ||
|
|
4ed098d64f | ||
|
|
3c652fbccb | ||
|
|
31d84d08e1 | ||
|
|
98185c3285 | ||
|
|
b225f0052c | ||
|
|
7ff05dde60 | ||
|
|
f2e4930801 | ||
|
|
697d5aade0 | ||
|
|
9eba0a5500 | ||
|
|
e302d9c571 | ||
|
|
4475c1fb99 | ||
|
|
ba05e365f0 | ||
|
|
227da5e6ce | ||
|
|
44acfea13a | ||
|
|
e34a8a5084 | ||
|
|
472b34493d | ||
|
|
506a9218f4 | ||
|
|
86b6fbd90c | ||
|
|
da026ebe10 | ||
|
|
b0e6b6a062 | ||
|
|
b4f1cf7143 | ||
|
|
24950c329b | ||
|
|
c3db551fd7 | ||
|
|
70d3f1e772 | ||
|
|
2b3aab956d | ||
|
|
35f7a62c1c | ||
|
|
525eedaf38 | ||
|
|
982d395b6a | ||
|
|
11cfdfba16 | ||
|
|
3cc73c9659 | ||
|
|
82f4ea062b | ||
|
|
8bdaac168a | ||
|
|
5f19438017 | ||
|
|
cedd6e358d | ||
|
|
d010bd778c | ||
|
|
264546ddf1 | ||
|
|
773ad92533 | ||
|
|
876fe14529 | ||
|
|
9a8b88f974 | ||
|
|
f1a6dd3dcc | ||
|
|
0e4b6ae724 | ||
|
|
a034129a21 | ||
|
|
30ae7570c6 | ||
|
|
293e33d6b4 | ||
|
|
75b89617fb | ||
|
|
b1eedbaa0a | ||
|
|
038cd9b6ac | ||
|
|
62ef54223a | ||
|
|
a129fd7d2f | ||
|
|
e519cc9571 | ||
|
|
8fadcd2d9e | ||
|
|
049759fe01 | ||
|
|
d2cb2639f0 | ||
|
|
d9076f5a87 | ||
|
|
89bef497fd | ||
|
|
9af2cc052b | ||
|
|
8927e79a05 | ||
|
|
876acbccf4 | ||
|
|
ad44c41742 | ||
|
|
c6d89f346a | ||
|
|
7fe83a7a35 | ||
|
|
6bcf3fe4e4 | ||
|
|
1226c8ad6f | ||
|
|
26e8855760 | ||
|
|
6683b38ce1 | ||
|
|
ae0e62acab | ||
|
|
5152182db3 | ||
|
|
a780d450bc | ||
|
|
a18f65b1d3 | ||
|
|
aef2dad707 | ||
|
|
39b654069a | ||
|
|
5a3ec90c81 | ||
|
|
3e55e5756f | ||
|
|
293fbc2d0a | ||
|
|
f7383741d3 | ||
|
|
cd88376b05 | ||
|
|
40277bdae4 | ||
|
|
168d3387ef | ||
|
|
736a31a3fc | ||
|
|
e919024c70 | ||
|
|
917646ccb0 | ||
|
|
30eb0e4ed0 | ||
|
|
6efc19263f | ||
|
|
6fcc39f7e0 | ||
|
|
f5ad53838f | ||
|
|
50a600c47f | ||
|
|
c784ec50bb | ||
|
|
2ddbd39163 | ||
|
|
4b4de06dbc | ||
|
|
30398caa8f | ||
|
|
75660e5da7 | ||
|
|
da4170a71f | ||
|
|
01c0d9e91c | ||
|
|
0c8eed4f57 | ||
|
|
dea75949e0 | ||
|
|
f6a97a1483 | ||
|
|
45d73bae97 | ||
|
|
8d948d3ae7 | ||
|
|
8c9c61851e | ||
|
|
cfda7b7224 | ||
|
|
0dfd4b7782 | ||
|
|
8d4c961d53 | ||
|
|
23d0e1c18e | ||
|
|
f1bc30be6f | ||
|
|
6560a8c784 | ||
|
|
a39efe1575 | ||
|
|
98d2a14011 | ||
|
|
88a10b132b | ||
|
|
1be4401ecb | ||
|
|
d18b37d719 | ||
|
|
3384735e06 | ||
|
|
62e0b734d6 | ||
|
|
c31e4314d8 | ||
|
|
2beac10424 | ||
|
|
7c976d9485 | ||
|
|
961f6fb0c9 | ||
|
|
e41436072c | ||
|
|
d72341c0c8 | ||
|
|
31867cf5cb | ||
|
|
5d896be5dc | ||
|
|
0e94296ac1 | ||
|
|
a99fb13160 | ||
|
|
8b4468d407 | ||
|
|
c8f712ac70 | ||
|
|
a3c3e5dc3b | ||
|
|
bce3cdb26f | ||
|
|
adb94428ac | ||
|
|
1b7ca0aeb7 | ||
|
|
8025ccf64d | ||
|
|
c52ca035b1 | ||
|
|
7d6896c0d9 | ||
|
|
0473003f8a | ||
|
|
756e2026fc | ||
|
|
38a7b45e0e | ||
|
|
2ccc189bd6 | ||
|
|
774376d731 | ||
|
|
418c24dd7e | ||
|
|
908a517100 | ||
|
|
97606853e8 | ||
|
|
8636b9323e | ||
|
|
574916aa9f | ||
|
|
61e7341926 | ||
|
|
b0b1bd5ae2 | ||
|
|
d736fb1b2c | ||
|
|
4893d6c53b | ||
|
|
c025720350 | ||
|
|
ee7bb8de6e | ||
|
|
5bb5ceb5a2 | ||
|
|
3cbc678ef0 | ||
|
|
6f960a3224 | ||
|
|
1053d6cc80 | ||
|
|
0352337f1e | ||
|
|
d87fc7bc94 | ||
|
|
ca7fc5d683 | ||
|
|
e204540061 | ||
|
|
692f81b371 | ||
|
|
8e1897a33b | ||
|
|
2c3988dbca | ||
|
|
760d4e6f3a | ||
|
|
52ba9d8815 | ||
|
|
49d1716c11 | ||
|
|
02095a6616 | ||
|
|
1926146ed5 | ||
|
|
017ada27dd | ||
|
|
f7b3fa35e6 | ||
|
|
c9277ec2a9 | ||
|
|
8b7078eada | ||
|
|
a917db5ab2 | ||
|
|
8033ceb4ae | ||
|
|
79bb16b328 | ||
|
|
ee5f88a66f | ||
|
|
b85edfac45 | ||
|
|
67785d9d82 | ||
|
|
4b532bfa2f | ||
|
|
175fa8ef06 | ||
|
|
5f64ac353e | ||
|
|
df80cbe561 | ||
|
|
c04dab58ad | ||
|
|
62c7564165 | ||
|
|
f251729f7a | ||
|
|
c08d959056 | ||
|
|
1f0fb076ba | ||
|
|
352912e2b2 | ||
|
|
43624d4052 | ||
|
|
43614bef5f | ||
|
|
cfb5f2d82a | ||
|
|
85601384c9 | ||
|
|
16b0a807af | ||
|
|
22732cd352 | ||
|
|
12fb893bba | ||
|
|
025550c34d | ||
|
|
04c04ad4e9 | ||
|
|
c397b531b7 | ||
|
|
7a9eebbc9c | ||
|
|
cd470239ae | ||
|
|
531822b168 | ||
|
|
f1c7411a97 | ||
|
|
786d944b5e | ||
|
|
8f0403a90f | ||
|
|
bd510c7b11 | ||
|
|
345f20440e | ||
|
|
9e879e9c09 | ||
|
|
3b6ddee01e | ||
|
|
c2fc3f28dd | ||
|
|
f7eab80b3c | ||
|
|
a8219ddccd | ||
|
|
b8b5b82220 | ||
|
|
8cc6b069b6 | ||
|
|
a5bd412ed0 | ||
|
|
dad1592217 | ||
|
|
2f7d346fb1 | ||
|
|
1650fcd3f7 | ||
|
|
cf3a6f7638 | ||
|
|
f4456619fa | ||
|
|
b1cb63869d | ||
|
|
8bd003b434 | ||
|
|
331635b016 | ||
|
|
271a090daa | ||
|
|
9426be56f5 | ||
|
|
ed582f5612 | ||
|
|
e364b0d6b8 | ||
|
|
2227cb6a07 | ||
|
|
04a872f0d3 | ||
|
|
992b068bd2 | ||
|
|
d8535172f6 | ||
|
|
b6678c419b | ||
|
|
8989b5b65c | ||
|
|
dbe66b162b | ||
|
|
f6e82b7dea | ||
|
|
1450c855b6 | ||
|
|
3c9e00c4fd | ||
|
|
e149a84b32 | ||
|
|
521f5344c8 | ||
|
|
4b8000742f | ||
|
|
9ce2d23774 | ||
|
|
d45e530c21 | ||
|
|
1fecbd7863 | ||
|
|
bef1bc6137 | ||
|
|
daa8b2b1a3 | ||
|
|
37f9f5ed29 | ||
|
|
b4c2f799ec | ||
|
|
98e643ab3b | ||
|
|
b2604c5d12 | ||
|
|
b489ba12d8 | ||
|
|
966d1cd6e6 | ||
|
|
99fa315bf8 | ||
|
|
7ed10357bc | ||
|
|
4a94a06aa6 | ||
|
|
c29cb48a98 | ||
|
|
2034cba6f7 | ||
|
|
8e3f835a46 | ||
|
|
b338208678 | ||
|
|
ba94ef5b1b | ||
|
|
1af93e3d71 | ||
|
|
5848516f26 | ||
|
|
a46bcc4636 | ||
|
|
e8256c3c7c | ||
|
|
22f4434076 | ||
|
|
500f90eab5 | ||
|
|
902a2a5d7a | ||
|
|
677cb6c6a9 | ||
|
|
c08bfa1060 | ||
|
|
f49ad025e6 | ||
|
|
e57fb62f7f | ||
|
|
0246568205 | ||
|
|
71477a1aa8 | ||
|
|
45cb2385d5 | ||
|
|
dd4aedd1d3 | ||
|
|
1bb999e519 | ||
|
|
78c7e1f60b | ||
|
|
30aa344399 | ||
|
|
90ce79ff92 | ||
|
|
b5063eb63b | ||
|
|
e67563e822 | ||
|
|
56a458164e | ||
|
|
fb87a6052f | ||
|
|
204c08e9fa | ||
|
|
69d4a38c4e | ||
|
|
246d5a99d3 | ||
|
|
49313f9a74 | ||
|
|
29e3c2e97f | ||
|
|
e2003b82ff | ||
|
|
047056d4fb | ||
|
|
bbcf9c36cf | ||
|
|
c8de6584bb | ||
|
|
d463885c24 | ||
|
|
e54944039a | ||
|
|
6b647033ce | ||
|
|
c8576c4f8c | ||
|
|
56ee0fa636 | ||
|
|
b8926b07cc | ||
|
|
41971a1eaa | ||
|
|
6438d68006 | ||
|
|
1efb4218a7 | ||
|
|
0af0ad2493 | ||
|
|
d2e9866f3c | ||
|
|
23cc993dad | ||
|
|
bf0d2aac15 | ||
|
|
cc3ea7c99f | ||
|
|
2afd912ce5 | ||
|
|
a8737499b5 | ||
|
|
5d133efc26 | ||
|
|
fae5972a38 | ||
|
|
b17fce4fa4 | ||
|
|
c582df59bf | ||
|
|
4451bd8a9f | ||
|
|
493d736f7d | ||
|
|
782f4e9842 | ||
|
|
8fb784af90 | ||
|
|
fa9d5f6445 | ||
|
|
e55708d43c | ||
|
|
b628469832 | ||
|
|
e222fda574 | ||
|
|
2e1f0f43f0 | ||
|
|
d9a0e2c715 | ||
|
|
7394867950 | ||
|
|
f27f72bd6d | ||
|
|
2fb7f1e3c1 | ||
|
|
b9a9796da6 | ||
|
|
519b707b4e | ||
|
|
2d0f3f2e74 | ||
|
|
f553273be8 | ||
|
|
096c85ad5f | ||
|
|
1743aa2657 | ||
|
|
24e7d36a6a | ||
|
|
9404b5a3fb | ||
|
|
f6a99b1551 | ||
|
|
5f8d1a3d0b | ||
|
|
957b608418 | ||
|
|
2fca663e2f | ||
|
|
8c65bdf194 | ||
|
|
9c52203523 | ||
|
|
7f9d95c41d | ||
|
|
9074a69e21 | ||
|
|
2768c3dfc4 | ||
|
|
500ac13ddf | ||
|
|
e1e14bdb38 | ||
|
|
9ea67a3c6f | ||
|
|
30b3f9a1c1 | ||
|
|
48456d1d61 | ||
|
|
45c6397848 | ||
|
|
50d41186a4 | ||
|
|
4b9aaf267e | ||
|
|
9d3cbe12bd | ||
|
|
868e467701 | ||
|
|
dfbabfe758 | ||
|
|
21049673a0 | ||
|
|
3de0ead1ef | ||
|
|
66b1f79fb0 | ||
|
|
f9b3e59ae5 | ||
|
|
b7cd544ce5 | ||
|
|
8e94dcc2c6 | ||
|
|
c73e54a8ad | ||
|
|
5bd7ca3781 | ||
|
|
f164f70523 | ||
|
|
b22ba791cb | ||
|
|
4435f69035 | ||
|
|
46e9ed6beb | ||
|
|
3c0e576c6d | ||
|
|
e1aa041f5e | ||
|
|
924bbfab87 | ||
|
|
f9b5d8621a | ||
|
|
7982727372 | ||
|
|
29a8fa8694 | ||
|
|
d8f340e664 | ||
|
|
bda130b531 | ||
|
|
8fae90bd5b | ||
|
|
bec0525334 | ||
|
|
ca2b5b72fd | ||
|
|
e2b4a506f6 | ||
|
|
c9cab79e76 | ||
|
|
b34fc0c6fc | ||
|
|
3d1bf08703 | ||
|
|
3aab98bf96 | ||
|
|
0e06c2e22e | ||
|
|
6f634593ab | ||
|
|
52e8da0bc2 | ||
|
|
46c7196039 | ||
|
|
b73e91b1d4 | ||
|
|
c7007e30a5 | ||
|
|
94713349b1 | ||
|
|
236b06bc29 | ||
|
|
426d1b07d1 | ||
|
|
6b8cfeea5b | ||
|
|
1c0ab47708 | ||
|
|
b9154ca314 | ||
|
|
543d2fa8ec | ||
|
|
69df1f32a9 | ||
|
|
10a6b91082 | ||
|
|
d6a685271c | ||
|
|
c5e168c034 | ||
|
|
f12de0bcd8 | ||
|
|
b8f309cf14 | ||
|
|
19f9ab1fdb | ||
|
|
726edc8172 | ||
|
|
7847d32de2 | ||
|
|
24c9a6c7cd | ||
|
|
9f9610d983 | ||
|
|
1499642b50 | ||
|
|
ca0659ab9a | ||
|
|
6fa00f67da | ||
|
|
285c128eab | ||
|
|
06d3fd68cd | ||
|
|
be36cc026f | ||
|
|
79b030e317 | ||
|
|
0a0306d149 | ||
|
|
fdc624ee8c | ||
|
|
75b98a1845 | ||
|
|
46703b2bc4 | ||
|
|
e72d2e5729 | ||
|
|
b983106f60 | ||
|
|
945ef37057 | ||
|
|
7164873b95 | ||
|
|
a5d6ae87e0 | ||
|
|
1341235a1c | ||
|
|
35e76078e7 | ||
|
|
4d44d31bd9 | ||
|
|
be696e072e | ||
|
|
8da0422f17 | ||
|
|
48440e9d01 | ||
|
|
6a6ca8f365 | ||
|
|
5fface8d3a | ||
|
|
7eaaae4ec0 | ||
|
|
811ade5514 | ||
|
|
593d17ffe4 | ||
|
|
25a9e171a2 | ||
|
|
86c5a50e86 | ||
|
|
abb5c4e845 | ||
|
|
445de17323 | ||
|
|
861405b462 | ||
|
|
025b70bbb3 | ||
|
|
08ca0e9233 | ||
|
|
71110e3f87 | ||
|
|
a11890b981 | ||
|
|
c9fc879e89 | ||
|
|
7cb4c9284d | ||
|
|
d998775909 | ||
|
|
1a728b8b0d | ||
|
|
97bfe9b9dd | ||
|
|
a40c539ad1 | ||
|
|
5100b0b05f | ||
|
|
30bc289991 | ||
|
|
a68a480194 | ||
|
|
c17e423533 | ||
|
|
e489a18ead | ||
|
|
7ee6f9593d | ||
|
|
49648de23c | ||
|
|
43fa809135 | ||
|
|
a3dc365194 | ||
|
|
9f2dcee21a | ||
|
|
325df18179 | ||
|
|
27177c023a | ||
|
|
7f07e4b250 | ||
|
|
65c50ce72b | ||
|
|
53d1eedb1b | ||
|
|
00ef90d13b | ||
|
|
5b0132826f | ||
|
|
197061600e | ||
|
|
c21430123d | ||
|
|
c19b40fd68 | ||
|
|
115c65d3f4 | ||
|
|
3bb36380c3 | ||
|
|
c2390af52f | ||
|
|
6d28b40fce | ||
|
|
e7dfa263f2 | ||
|
|
6bbc8a8fef | ||
|
|
458d1c2ee2 | ||
|
|
4813ddbf6b | ||
|
|
358d534284 | ||
|
|
d325a6bac2 | ||
|
|
721691651f | ||
|
|
fa653c0720 | ||
|
|
ee7490797e | ||
|
|
8625974643 | ||
|
|
be6df5151f | ||
|
|
d3aefd7569 | ||
|
|
70855c0876 | ||
|
|
6d99caa5ee | ||
|
|
35c215bbba | ||
|
|
410e28bd78 | ||
|
|
8233ef4ca8 | ||
|
|
91b9ff7935 | ||
|
|
61829f0638 | ||
|
|
5d34d8c327 | ||
|
|
57658678dd | ||
|
|
eb64d4a73b | ||
|
|
62eab23e81 | ||
|
|
4518931c29 | ||
|
|
cac9a29ad8 | ||
|
|
f10bbe70a9 | ||
|
|
3c1f856059 | ||
|
|
5514c4792b | ||
|
|
25f95ca91e | ||
|
|
cfd53be2c8 | ||
|
|
e3093d28d9 | ||
|
|
e0689425b8 | ||
|
|
68de994bf1 | ||
|
|
b11665966d | ||
|
|
01b7b402a3 | ||
|
|
03285f9da5 | ||
|
|
334ae8d83d | ||
|
|
871b2ea818 | ||
|
|
2679dfb639 | ||
|
|
3a960cb7e4 | ||
|
|
f5cf8b6039 | ||
|
|
675a66a029 | ||
|
|
ffd0a44de4 | ||
|
|
2a9477bd95 | ||
|
|
5f001b35ed | ||
|
|
241297f40e | ||
|
|
df373089ee | ||
|
|
2a08e10112 | ||
|
|
d015986221 | ||
|
|
4fda5e9381 | ||
|
|
6f1ffe444c | ||
|
|
9f0b79a1ba | ||
|
|
cf4686a06a | ||
|
|
ccbe301659 | ||
|
|
6af107568c | ||
|
|
890e2a5a58 | ||
|
|
56bcd15a9c | ||
|
|
05c801ff0c | ||
|
|
c74553f398 | ||
|
|
d4142ec88e | ||
|
|
80016947b7 | ||
|
|
5af9b0048f | ||
|
|
9758a4d87a | ||
|
|
3e593e8a31 | ||
|
|
b0abc5579f | ||
|
|
55d155dbbe | ||
|
|
9de8c30c25 | ||
|
|
e4db8d3b54 | ||
|
|
ba74efc7c6 | ||
|
|
2307570c3e | ||
|
|
e9fd7152ff | ||
|
|
be9f2f6ef6 | ||
|
|
320475d619 | ||
|
|
025068df27 | ||
|
|
b7f166b3fd | ||
|
|
57e7dc4cda | ||
|
|
325680aae4 | ||
|
|
7446097d1a | ||
|
|
96bbda7216 | ||
|
|
7f77515e02 | ||
|
|
2714dd0ed2 | ||
|
|
7dfaaf5bf1 | ||
|
|
4d30007986 | ||
|
|
d07a45be2b | ||
|
|
438636be9b | ||
|
|
ff7797f6e2 | ||
|
|
d81e0e6f97 | ||
|
|
787a2cf49f | ||
|
|
9676083a22 | ||
|
|
8d509a79da | ||
|
|
1de5de8401 | ||
|
|
e7a4ab5efa | ||
|
|
c2223ba418 | ||
|
|
5bc2860579 | ||
|
|
0c2cd33ac8 | ||
|
|
198a0609cf | ||
|
|
8270c52b6b | ||
|
|
5d223fd617 | ||
|
|
a256689440 | ||
|
|
557c8b8ae8 | ||
|
|
22bdd77f67 | ||
|
|
fba069f78c | ||
|
|
2f4ff2ce9f | ||
|
|
ad177f456c | ||
|
|
1f7a13e62e | ||
|
|
78d17132eb | ||
|
|
2a1afebeb4 | ||
|
|
8ec9cd1836 | ||
|
|
11038c572e | ||
|
|
e3a56266dd | ||
|
|
78e5a1082a | ||
|
|
3ede7fb763 | ||
|
|
0048e2bb67 | ||
|
|
09221df9c6 | ||
|
|
5044873647 | ||
|
|
4bcbd9c6aa | ||
|
|
98c5eb08be | ||
|
|
9db34852ce | ||
|
|
cd5ba13ce2 | ||
|
|
ecf425de69 | ||
|
|
e94c44b8f0 | ||
|
|
9cdff96426 | ||
|
|
f77dc12f7f | ||
|
|
37c3f113f5 | ||
|
|
88287082b0 | ||
|
|
787421de85 | ||
|
|
47e01313ad |
300
ABOUT-NLS
300
ABOUT-NLS
@@ -8,7 +8,7 @@ A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do *not*
|
||||
itself available at your nearest GNU archive site. But you do _not_
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
@@ -22,8 +22,8 @@ related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
One advise in advance
|
||||
=====================
|
||||
Quick configuration advice
|
||||
==========================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
@@ -34,13 +34,14 @@ to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias or message inheritance) as the
|
||||
implementation here. It is also not possible to offer this additional
|
||||
functionality on top of a `catgets' implementation. Future versions of
|
||||
GNU `gettext' will very likely convey even more functionality. So it
|
||||
might be a good idea to change to GNU `gettext' as soon as possible.
|
||||
many features (such as locale alias, message inheritance, automatic
|
||||
charset conversion or plural form handling) as the implementation here.
|
||||
It is also not possible to offer this additional functionality on top
|
||||
of a `catgets' implementation. Future versions of GNU `gettext' will
|
||||
very likely convey even more functionality. So it might be a good idea
|
||||
to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need not provide this option if you are using GNU libc 2 or
|
||||
So you need _not_ provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
@@ -53,23 +54,20 @@ Most such packages use GNU `gettext'. Other packages have their own
|
||||
ways to internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system provides
|
||||
usable `catgets' (if using this is selected by the installer) or
|
||||
`gettext' functions. If neither is available, the GNU `gettext' own
|
||||
messages. It will automatically detect whether the system already
|
||||
provides the GNU `gettext' functions. If not, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is *not* required. Installers may use
|
||||
the GNU `gettext' package is _not_ required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --with-catgets
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `catgets' or `gettext' to use
|
||||
the internationalizing routines provided within this package, enable
|
||||
the use of the `catgets' functions (if found on the locale system), or
|
||||
else, *totally* disable translation of messages.
|
||||
will respectively bypass any pre-existing `gettext' to use the
|
||||
internationalizing routines provided within this package, or else,
|
||||
_totally_ disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
@@ -83,18 +81,10 @@ package is more recent, you should use
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
By default the configuration process will not test for the `catgets'
|
||||
function and therefore they will not be used. The reasons are already
|
||||
given above: the emulation on top of `catgets' cannot provide all the
|
||||
extensions provided by the GNU `gettext' library. If you nevertheless
|
||||
want to use the `catgets' functions use
|
||||
|
||||
./configure --with-catgets
|
||||
|
||||
to enable the test for `catgets' (this causes no harm if `catgets' is
|
||||
not available on your system). If you really select this option we
|
||||
would like to hear about the reasons because we cannot think of any
|
||||
good one ourself.
|
||||
The configuration process will not test for the `catgets' function
|
||||
and therefore it will not be used. The reason is that even an
|
||||
emulation of `gettext' on top of `catgets' could not provide all the
|
||||
extensions of the GNU `gettext' library.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
@@ -110,22 +100,35 @@ Using This Package
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
ISO 639 `LL' two-letter code prior to using the programs in the
|
||||
package. For example, let's suppose that you speak German. At the
|
||||
shell prompt, merely execute `setenv LANG de' (in `csh'),
|
||||
`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
|
||||
can be done from your `.login' or `.profile' file, once and for all.
|
||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
||||
suppose that you speak German and live in Germany. At the shell
|
||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
||||
This can be done from your `.login' or `.profile' file, once and for
|
||||
all.
|
||||
|
||||
An operating system might already offer message localization for
|
||||
many of its programs, while other programs have been installed locally
|
||||
with the full capabilities of GNU `gettext'. Just using `gettext'
|
||||
extended syntax for `LANG' would break proper localization of already
|
||||
available operating system programs. In this case, users should set
|
||||
both `LANGUAGE' and `LANG' variables in their environment, as programs
|
||||
using GNU `gettext' give preference to `LANGUAGE'. For example, some
|
||||
Swedish users would rather read translations in German than English for
|
||||
when Swedish is not available. This is easily accomplished by setting
|
||||
`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
|
||||
You might think that the country code specification is redundant.
|
||||
But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
This is done through a different environment variable, called
|
||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
||||
for the purpose of message handling, but you still need to have `LANG'
|
||||
set to the primary language; this is required by other parts of the
|
||||
system libraries. For example, some Swedish users who would rather
|
||||
read translations in German than English for when Swedish is not
|
||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
||||
|
||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
||||
to denote the language's main dialect. For example, `de' is equivalent
|
||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
||||
(Portuguese as spoken in Portugal) in this context.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
@@ -133,33 +136,21 @@ Translating Teams
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
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 December
|
||||
1997:
|
||||
Each translation team has its own mailing list. The up-to-date list of
|
||||
teams can be found at the Free Translation Project's homepage,
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
||||
area.
|
||||
|
||||
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
|
||||
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
|
||||
`hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
|
||||
Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
|
||||
`pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
|
||||
Swedish `sv', and Turkish `tr'.
|
||||
|
||||
For example, you may reach the Chinese translation team by writing to
|
||||
`zh@li.org'.
|
||||
|
||||
If you'd like to volunteer to *work* at translating messages, you
|
||||
If you'd like to volunteer to _work_ at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is *not* the same as the list itself, it has
|
||||
The subscribing address is _not_ the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
*actively* in translations, or at solving translational difficulties,
|
||||
_actively_ in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
@@ -173,42 +164,128 @@ Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of December
|
||||
1997. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination.
|
||||
matrix shows the current state of internationalization, as of September
|
||||
2001. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv
|
||||
.----------------------------------------------------.
|
||||
bash | [] [] [] | 3
|
||||
bison | [] [] [] | 3
|
||||
clisp | [] [] [] [] | 4
|
||||
cpio | [] [] [] [] [] [] | 6
|
||||
diffutils | [] [] [] [] [] | 5
|
||||
enscript | [] [] [] [] [] [] | 6
|
||||
fileutils | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
findutils | [] [] [] [] [] [] [] [] [] | 9
|
||||
flex | [] [] [] [] | 4
|
||||
gcal | [] [] [] [] [] | 5
|
||||
gettext | [] [] [] [] [] [] [] [] [] [] [] | 12
|
||||
grep | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 11
|
||||
id-utils | [] [] [] | 3
|
||||
indent | [] [] [] [] [] | 5
|
||||
libc | [] [] [] [] [] [] [] | 7
|
||||
m4 | [] [] [] [] [] [] | 6
|
||||
make | [] [] [] [] [] [] | 6
|
||||
music | [] [] | 2
|
||||
ptx | [] [] [] [] [] [] [] [] | 8
|
||||
recode | [] [] [] [] [] [] [] [] [] | 9
|
||||
sh-utils | [] [] [] [] [] [] [] [] | 8
|
||||
sharutils | [] [] [] [] [] [] | 6
|
||||
tar | [] [] [] [] [] [] [] [] [] [] [] | 11
|
||||
texinfo | [] [] [] | 3
|
||||
textutils | [] [] [] [] [] [] [] [] [] | 9
|
||||
wdiff | [] [] [] [] [] [] [] [] | 8
|
||||
`----------------------------------------------------'
|
||||
17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv
|
||||
27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179
|
||||
Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja
|
||||
+----------------------------------------------------+
|
||||
a2ps | [] [] [] |
|
||||
bash | [] [] [] [] |
|
||||
bfd | |
|
||||
binutils | [] |
|
||||
bison | [] [] [] [] [] |
|
||||
clisp | [] [] [] [] |
|
||||
cpio | [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] |
|
||||
fetchmail | |
|
||||
fileutils | [] [] [] [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] [] |
|
||||
flex | [] [] [] |
|
||||
freetype | |
|
||||
gas | |
|
||||
gawk | [] [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext | [] [] [] [] [] [] [] [] [] [] |
|
||||
gnupg | [] [] [] [] [] [] [] |
|
||||
gprof | |
|
||||
grep | [] [] [] [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] [] |
|
||||
jpilot | [] |
|
||||
kbd | |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] [] [] [] |
|
||||
lilypond | [] |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] [] [] [] [] |
|
||||
make | [] [] [] [] [] [] |
|
||||
mysecretdiary | [] |
|
||||
nano | [] [] [] |
|
||||
opcodes | |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] [] [] |
|
||||
sketch | |
|
||||
soundtracker | [] [] [] |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] [] [] |
|
||||
textutils | [] [] [] [] [] [] [] [] |
|
||||
util-linux | [] [] |
|
||||
wdiff | [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] [] [] |
|
||||
+----------------------------------------------------+
|
||||
bg cs da de el en eo es et fi fr gl he hr id it ja
|
||||
0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18
|
||||
|
||||
ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
+----------------------------------------------------+
|
||||
a2ps | [] [] [] | 6
|
||||
bash | | 4
|
||||
bfd | | 0
|
||||
binutils | | 1
|
||||
bison | [] | 6
|
||||
clisp | [] | 5
|
||||
cpio | [] [] [] [] [] | 10
|
||||
diffutils | [] [] [] [] | 11
|
||||
enscript | [] [] [] | 5
|
||||
error | [] [] | 4
|
||||
fetchmail | | 0
|
||||
fileutils | [] [] [] [] [] [] [] [] [] | 17
|
||||
findutils | [] [] [] [] [] [] [] [] | 16
|
||||
flex | [] [] [] | 6
|
||||
freetype | | 0
|
||||
gas | | 0
|
||||
gawk | [] | 3
|
||||
gcal | | 0
|
||||
gcc | | 0
|
||||
gettext | [] [] [] [] [] [] [] [] | 18
|
||||
gnupg | [] [] [] | 10
|
||||
gprof | | 0
|
||||
grep | [] [] [] [] | 12
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 22
|
||||
id-utils | [] [] [] | 6
|
||||
indent | [] [] [] [] [] [] [] | 12
|
||||
jpilot | | 1
|
||||
kbd | [] | 1
|
||||
ld | | 1
|
||||
libc | [] [] [] [] [] [] [] [] | 16
|
||||
lilypond | [] [] | 3
|
||||
lynx | [] [] [] [] | 8
|
||||
m4 | [] [] [] [] | 12
|
||||
make | [] [] [] [] [] [] | 12
|
||||
mysecretdiary | | 1
|
||||
nano | [] | 4
|
||||
opcodes | [] | 1
|
||||
parted | [] [] | 5
|
||||
ptx | [] [] [] [] [] [] [] [] | 15
|
||||
python | | 0
|
||||
recode | [] [] [] [] | 13
|
||||
sed | [] [] [] [] [] [] [] | 19
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21
|
||||
sharutils | [] [] [] | 11
|
||||
sketch | | 0
|
||||
soundtracker | | 3
|
||||
sp | | 0
|
||||
tar | [] [] [] [] [] [] [] | 15
|
||||
texinfo | [] | 7
|
||||
textutils | [] [] [] [] [] [] [] [] | 16
|
||||
util-linux | [] [] | 4
|
||||
wdiff | [] [] [] [] | 7
|
||||
wget | [] [] [] [] [] [] [] | 17
|
||||
+----------------------------------------------------+
|
||||
33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387
|
||||
|
||||
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
|
||||
@@ -221,6 +298,27 @@ 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
|
||||
distribution.
|
||||
|
||||
If December 1997 seems to be old, you may fetch a more recent copy
|
||||
of this `ABOUT-NLS' file on most GNU archive sites.
|
||||
If September 2001 seems to be old, you may fetch a more recent copy
|
||||
of this `ABOUT-NLS' file on most GNU archive sites. The most
|
||||
up-to-date matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
Using `gettext' in new packages
|
||||
===============================
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
to use of `gettext' the only thing missing are the translations. The
|
||||
Free Translation Project is also available for packages which are not
|
||||
developed inside the GNU project. Therefore the information given above
|
||||
applies also for every other Free Software Project. Contact
|
||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
||||
the translation teams.
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ have-Makefile := $(shell test -f Makefile && echo yes)
|
||||
ifeq ($(have-Makefile),yes)
|
||||
|
||||
include Makefile
|
||||
include $(srcdir)/Makefile.cfg
|
||||
include $(srcdir)/Makefile.maint
|
||||
|
||||
else
|
||||
|
||||
116
INSTALL
116
INSTALL
@@ -8,20 +8,27 @@ various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
@@ -55,14 +62,15 @@ Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
You can give `configure' initial values for variables by setting
|
||||
them in the environment. You can do that on the command line like this:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Environment Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
@@ -75,7 +83,7 @@ directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
@@ -122,22 +130,36 @@ you can use the `configure' options `--x-includes=DIR' and
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
a message saying it cannot guess the host type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the host
|
||||
platform (i.e., that on which the generated programs will eventually be
|
||||
run) with `--host=TYPE'. In this case, you should also specify the
|
||||
build platform with `--build=TYPE', because, in this case, it may not
|
||||
be possible to guess the build platform (it sometimes involves
|
||||
compiling and running simple test programs, and this can't be done if
|
||||
the compiler is a cross compiler).
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
@@ -150,20 +172,44 @@ default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
Environment Variables
|
||||
=====================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to configure. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
@@ -175,8 +221,6 @@ operates.
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
||||
45
Makefile.cfg
Normal file
45
Makefile.cfg
Normal file
@@ -0,0 +1,45 @@
|
||||
# -*- makefile -*-
|
||||
## Customize Makefile.maint.
|
||||
|
||||
# List the hosts to which test releases are copied.
|
||||
# `a' and `b' are merely placeholders, and correspond to the
|
||||
# `a_' and `b_' prefixes of the following variables.
|
||||
hosts = a b
|
||||
a_host = alpha.gnu.org
|
||||
b_host = freefriends.org
|
||||
|
||||
alpha_subdir = gnu/fetish
|
||||
a_url_dir = $(alpha_subdir)
|
||||
b_url_dir = $(alpha_subdir)
|
||||
|
||||
# Files that `make wget-update' should update.
|
||||
wget_files = \
|
||||
$(srcdir)/config.guess \
|
||||
$(srcdir)/config.sub \
|
||||
$(srcdir)/doc/texinfo.tex \
|
||||
$(srcdir)/src/ansi2knr.c
|
||||
|
||||
###############################################
|
||||
|
||||
# FIXME: CAUTION this list is a duplicate of one in lib/Makefile.am.
|
||||
io_functions = \
|
||||
clearerr feof ferror fflush fgets fputc fputs \
|
||||
fread fwrite getc getchar putc putchar
|
||||
unlocked_io_functions = $(patsubst %,%_unlocked,$(io_functions))
|
||||
|
||||
comma_separated = $(shell echo $(unlocked_io_functions)|tr -s ' ' ,)
|
||||
|
||||
# This temp file may not be e.g., $@t, since that may be in a read-only
|
||||
# directory. Instead, use a file in the current directory.
|
||||
t_io = $(notdir $@)t
|
||||
|
||||
# This rule requires GNU make.
|
||||
$(srcdir)/m4/jm-glibc-io.m4: $(srcdir)/m4/jm-glibc-io.m4n Makefile.cfg
|
||||
echo dnl This file is automatically generated from $(notdir $<). \
|
||||
> $(t_io)
|
||||
echo >> $(t_io)
|
||||
sed \
|
||||
-e 's/@space_separated@/$(unlocked_io_functions)/g' \
|
||||
-e 's/@comma_separated@/$(comma_separated)/g' \
|
||||
$< >> $(t_io)
|
||||
mv $(t_io) $@
|
||||
299
Makefile.maint
299
Makefile.maint
@@ -1,49 +1,147 @@
|
||||
# -*-Makefile-*-
|
||||
# This Makefile fragment is shared between fileutils, sh-utils, textutils.
|
||||
# This Makefile fragment is shared between fileutils, sh-utils, textutils,
|
||||
# CPPI, Bison, and Autoconf.
|
||||
|
||||
maintainer-check:
|
||||
if head ChangeLog| grep 'Version $(VERSION)' > /dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "$(VERSION) not in ChangeLog; not tagging" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(MAKE) distcheck
|
||||
$(MAKE) my-distcheck
|
||||
## Copyright 2001 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.
|
||||
|
||||
prev_version_file = .prev-version
|
||||
# Do not save the original name or timestamp in the .tar.gz file.
|
||||
GZIP_ENV = '--no-name --best'
|
||||
|
||||
# Automake 1.4 does not define AMTAR.
|
||||
AMTAR ?= $(TAR)
|
||||
|
||||
CVS = cvs
|
||||
|
||||
prev_version_file ?= .prev-version
|
||||
|
||||
THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
|
||||
PREV_VERSION := $(shell cat $(prev_version_file))
|
||||
PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
|
||||
|
||||
tag-package = $(shell echo "$(PACKAGE)" | tr a-z A-Z)
|
||||
tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
|
||||
tag-this-version = $(subst .,_,$(VERSION))
|
||||
tag-prev-version = $(subst .,_,$(PREV_VERSION))
|
||||
this-cvs-tag = $(tag-package)-$(tag-this-version)
|
||||
prev-cvs-tag = $(tag-package)-$(tag-prev-version)
|
||||
my_distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
# Old releases are stored here.
|
||||
# Used for diffs and xdeltas.
|
||||
release_archive_dir ?= ../release
|
||||
|
||||
|
||||
|
||||
## --------------- ##
|
||||
## Sanity checks. ##
|
||||
## --------------- ##
|
||||
|
||||
# Checks that don't require cvs.
|
||||
# Run `changelog-check' last, as previous test may reveal problems requiring
|
||||
# new ChangeLog entries.
|
||||
local-check: po-check copyright-check writable-files \
|
||||
m4-check author_mark_check \
|
||||
changelog-check
|
||||
|
||||
changelog-check:
|
||||
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
m4-check:
|
||||
@grep 'AC_DEFUN([^[]' m4/*.m4 \
|
||||
&& { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||
po-check:
|
||||
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1
|
||||
grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2
|
||||
diff -u $@-1 $@-2
|
||||
rm -f $@-1 $@-2
|
||||
if test -f po/POTFILES.in; then \
|
||||
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
|
||||
grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2; \
|
||||
diff -u $@-1 $@-2 || exit 1; \
|
||||
rm -f $@-1 $@-2; \
|
||||
fi
|
||||
|
||||
# In a definition of #define AUTHORS "... and ..." where the RHS contains
|
||||
# the English word `and', the string must be marked with `N_ (...)' so that
|
||||
# gettext recognizes it as a string requiring translation.
|
||||
author_mark_check:
|
||||
@grep '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
|
||||
{ echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Check that `make alpha' will not fail at the end of the process.
|
||||
writable-files:
|
||||
if test -d $(release_archive_dir); then :; else \
|
||||
mkdir $(release_archive_dir); \
|
||||
fi
|
||||
for file in $(distdir).tar.gz $(xd-delta) \
|
||||
$(release_archive_dir)/$(distdir).tar.gz \
|
||||
$(release_archive_dir)/$(xd-delta); do \
|
||||
test -e $$file || continue; \
|
||||
test -w $$file \
|
||||
|| { echo ERROR: $$file is not writable; fail=1; }; \
|
||||
done; \
|
||||
test "$$fail" && exit 1 || :
|
||||
|
||||
v_etc_file = lib/version-etc.c
|
||||
# Make sure that the copyright date in $(v_etc_file) is up to date.
|
||||
copyright-check:
|
||||
@if test -f $(v_etc_file); then \
|
||||
grep '"Copyright (C) $(shell date +%Y) Free' $(v_etc_file) \
|
||||
>/dev/null \
|
||||
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
|
||||
exit 1; }; \
|
||||
fi
|
||||
|
||||
|
||||
# Sanity checks with the CVS repository.
|
||||
cvs-tag-check:
|
||||
echo $(this-cvs-tag); \
|
||||
if $(CVS) -n log -h README | grep -e $(this-cvs-tag): >/dev/null; then \
|
||||
echo "$(this-cvs-tag) as already been used; not tagging" 1>&2; \
|
||||
exit 1; \
|
||||
else :; fi
|
||||
|
||||
cvs-diff-check:
|
||||
if $(CVS) diff >cvs-diffs; then \
|
||||
rm cvs-diffs; \
|
||||
else \
|
||||
echo "Some files are locally modified:" 1>&2; \
|
||||
cat cvs-diffs; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
cvs-check: cvs-diff-check cvs-tag-check
|
||||
|
||||
maintainer-distcheck: changelog-check
|
||||
$(MAKE) distcheck
|
||||
$(MAKE) my-distcheck
|
||||
|
||||
# Do not save the original name or timestamp in the .tar.gz file.
|
||||
GZIP_ENV = --no-name
|
||||
|
||||
# Tag before making distribution. Also, don't make a distribution if
|
||||
# checks fail. Also, make sure the NEWS file is up-to-date.
|
||||
# FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
|
||||
cvs-dist: maintainer-check
|
||||
echo $(this-cvs-tag); \
|
||||
if cvs -n log -h README| grep -e $(this-cvs-tag): > /dev/null; then \
|
||||
echo "VERSION not new; not tagging" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
cvs update po; \
|
||||
cvs tag -c $(this-cvs-tag)
|
||||
cvs-dist: local-check cvs-check maintainer-distcheck
|
||||
$(CVS) update po
|
||||
$(CVS) tag -c $(this-cvs-tag)
|
||||
$(MAKE) dist
|
||||
|
||||
# Use this to make sure we don't run these programs when building
|
||||
@@ -55,21 +153,22 @@ null_AM_MAKEFLAGS = \
|
||||
AUTOHEADER=false \
|
||||
MAKEINFO=false
|
||||
|
||||
# Detect format-string/arg-list mismatches that would normally be obscured
|
||||
# by the use of _(). The --disable-nls effectively defines away that macro,
|
||||
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be
|
||||
# treated as a failure.
|
||||
t=./=test
|
||||
my-distcheck: writable-files po-check
|
||||
my-distcheck: local-check
|
||||
-rm -rf $(t)
|
||||
mkdir $(t)
|
||||
GZIP=$(GZIP) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
# Removing $(DEPDIR) like this is a gross kludge to work around a bug
|
||||
# in automake. Remove that line once it's fixed.
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
cd $(t)/$(distdir) \
|
||||
&& ./configure --disable-nls \
|
||||
&& $(MAKE) CFLAGS='-Wformat -Werror' \
|
||||
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(MAKE) check \
|
||||
&& $(MAKE) distclean \
|
||||
&& rm -rf $(DEPDIR)
|
||||
&& $(MAKE) distclean
|
||||
cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(AMTAR) -zxf ../$(distdir).tar.gz
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
@@ -78,21 +177,19 @@ my-distcheck: writable-files po-check
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
|
||||
a_host = fencepost.gnu.org
|
||||
b_host = freefriends.org
|
||||
|
||||
alpha_subdir = gnu/fetish
|
||||
a_url_dir = $(alpha_subdir)
|
||||
b_url_dir = $(alpha_subdir)
|
||||
|
||||
# This must be the same name on both hosts.
|
||||
# Make it a symlink that points to the right place.
|
||||
real_dir = fetish-ftp
|
||||
|
||||
url_dir_list = $(foreach x,a b,ftp://$($(x)_host)/$($(x)_url_dir))
|
||||
url_dir_list = $(foreach x,$(hosts),ftp://$($(x)_host)/$($(x)_url_dir))
|
||||
|
||||
md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
|
||||
sha1 = $(shell sha1sum < $(distdir).tar.gz|sed 's/ -//')
|
||||
tgz-md5 = $(shell md5sum < $(my_distdir).tar.gz|sed 's/ -//')
|
||||
tgz-sha1 = $(shell sha1sum < $(my_distdir).tar.gz|sed 's/ -//')
|
||||
bz2-md5 = $(shell md5sum < $(my_distdir).tar.bz2|sed 's/ -//')
|
||||
bz2-sha1 = $(shell sha1sum < $(my_distdir).tar.bz2|sed 's/ -//')
|
||||
tgz-size = $(shell du --human $(my_distdir).tar.gz|sed 's/\([Mk]\).*/ \1B/')
|
||||
bz2-size = $(shell du --human $(my_distdir).tar.bz2|sed 's/\([Mk]\).*/ \1B/')
|
||||
xd-size = $(shell du --human $(xd-delta)|sed 's/\([Mk]\).*/ \1B/')
|
||||
|
||||
rel-check:
|
||||
tarz=/tmp/rel-check-tarz-$$$$; \
|
||||
@@ -103,79 +200,115 @@ rel-check:
|
||||
echo "$(md5) -" > $$md5_tmp; \
|
||||
md5sum -c $$md5_tmp < $$tarz
|
||||
|
||||
release-archive-dir = ../release
|
||||
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
|
||||
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
|
||||
|
||||
announcement: NEWS ChangeLog $(distdir).tar.gz
|
||||
GZIP = gzip
|
||||
BZIP2 = bzip2
|
||||
$(my_distdir).tar.bz2: $(my_distdir).tar.gz
|
||||
$(GZIP) -dc $< > $(my_distdir).tar
|
||||
rm -f $@
|
||||
$(BZIP2) -9 $(my_distdir).tar
|
||||
|
||||
rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz
|
||||
announcement: NEWS ChangeLog $(rel-files)
|
||||
@( \
|
||||
echo Subject: $(distdir) released; \
|
||||
echo Subject: $(my_distdir) released; \
|
||||
echo; \
|
||||
echo FIXME: put comments here; \
|
||||
echo; \
|
||||
for url in $(url_dir_list); do \
|
||||
echo " $$url/$(distdir).tar.gz"; \
|
||||
echo " $$url/$(my_distdir).tar.gz ($(tgz-size))"; \
|
||||
echo " $$url/$(my_distdir).tar.bz2 ($(bz2-size))"; \
|
||||
done; \
|
||||
echo; \
|
||||
echo And here are xdelta-style diffs; \
|
||||
echo; \
|
||||
for url in $(url_dir_list); do \
|
||||
echo " $$url/$(xd-delta)"; \
|
||||
echo " $$url/$(xd-delta) ($(xd-size))"; \
|
||||
done; \
|
||||
echo; \
|
||||
echo "Here are the MD5 and SHA1 signatures for the .tar.gz file"; \
|
||||
echo "Here are the MD5 and SHA1 signatures for the compressed tar files:"; \
|
||||
echo; \
|
||||
echo "$(md5) $(distdir).tar.gz"; \
|
||||
echo "$(sha1) $(distdir).tar.gz"; \
|
||||
echo "$(tgz-md5) $(my_distdir).tar.gz"; \
|
||||
echo "$(bz2-md5) $(my_distdir).tar.bz2"; \
|
||||
echo "$(tgz-sha1) $(my_distdir).tar.gz"; \
|
||||
echo "$(bz2-sha1) $(my_distdir).tar.bz2"; \
|
||||
echo; \
|
||||
echo NEWS:; \
|
||||
sed -n "/$(THIS_VERSION_REGEXP)/,/^\[$(PREV_VERSION_REGEXP)/p" NEWS \
|
||||
sed -n "/$(THIS_VERSION_REGEXP)[]:]/,/$(PREV_VERSION_REGEXP)[]:]/p" NEWS \
|
||||
| grep -v '^\['; \
|
||||
echo; \
|
||||
echo ChangeLog entries:; \
|
||||
find . -name ChangeLog -maxdepth 2 \
|
||||
| xargs cvs diff -up -r$(prev-cvs-tag) -rHEAD \
|
||||
| xargs $(CVS) diff -up -r$(prev-cvs-tag) -rHEAD \
|
||||
| sed -n 's/^+//p' \
|
||||
| perl -ne 'm!^\+\+ (\./)?! or print,next;' \
|
||||
-e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
|
||||
)
|
||||
|
||||
writable-files:
|
||||
for file in $(distdir).tar.gz $(xd-delta) \
|
||||
../release/$(distdir).tar.gz ../release/$(xd-delta); do \
|
||||
test -e $$file || continue; \
|
||||
test -w $$file \
|
||||
|| { echo ERROR: $$file is not writable; fail=1; }; \
|
||||
done; \
|
||||
test "$$fail" && exit 1 || :
|
||||
|
||||
WGET = wget
|
||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||
|
||||
# Use mv, if you don't have/want move-if-change.
|
||||
move_if_change ?= move-if-change
|
||||
|
||||
# The following pseudo table associates a local directory and a URL
|
||||
# with each of the files that belongs to some other package and is
|
||||
# regularly updated from the specified URL.
|
||||
wget_files ?= $(srcdir)/config.guess $(srcdir)/config.sub \
|
||||
$(srcdir)/src/ansi2knr.c \
|
||||
$(srcdir)/doc/texinfo.tex
|
||||
get-targets = $(patsubst %, get-%, $(wget_files))
|
||||
|
||||
config.guess-url_prefix = $(ftp-gnu)/config/
|
||||
config.sub-url_prefix = $(ftp-gnu)/config/
|
||||
|
||||
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
|
||||
|
||||
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
|
||||
|
||||
standards.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
||||
make-stds.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
||||
|
||||
target = $(patsubst get-%, %, $@)
|
||||
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
|
||||
|
||||
.PHONY: $(get-targets)
|
||||
$(get-targets):
|
||||
$(WGET) $(url) -O $(target).t \
|
||||
&& $(move_if_change) $(target).t $(target)
|
||||
|
||||
automake_repo=:pserver:anoncvs@anoncvs.cygnus.com:/cvs/automake
|
||||
.PHONY: wget-update
|
||||
wget-update:
|
||||
$(WGET) $(ftp-gnu)/texinfo/texinfo.tex -O $(srcdir)/doc/texinfo.tex
|
||||
$(WGET) $(ftp-gnu)/config/config.guess -O $(srcdir)/config.guess
|
||||
$(WGET) $(ftp-gnu)/config/config.sub -O $(srcdir)/config.sub
|
||||
cvs -d $(automake_repo) co -p automake/depcomp > depcomp
|
||||
wget-update: $(get-targets)
|
||||
for f in depcomp missing mkinstalldirs; do \
|
||||
test -f $$f || continue; \
|
||||
echo checking out $$f...; \
|
||||
$(CVS) -d $(automake_repo) co -p automake/lib/$$f > $$f.t \
|
||||
&& $(move_if_change) $$f.t $$f; \
|
||||
done
|
||||
|
||||
alpha: writable-files po-check
|
||||
define emit-rsync-commands
|
||||
echo =====================================
|
||||
echo =====================================
|
||||
echo 'for host in $(a_host) $(b_host); do \'
|
||||
echo ' rsync -e ssh --pro -av $(xd-delta) $(my_distdir).tar.bz2 \'
|
||||
echo ' $(my_distdir).tar.gz $$host:$(real_dir); done'
|
||||
echo '# send the /tmp/announcement e-mail'
|
||||
echo =====================================
|
||||
echo =====================================
|
||||
endef
|
||||
|
||||
$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
|
||||
xdelta delta -9 $^ $@ || :
|
||||
|
||||
alpha: local-check
|
||||
$(MAKE) cvs-dist
|
||||
$(MAKE) -s announcement > /tmp/announce-$(distdir)
|
||||
ln $(distdir).tar.gz ../release
|
||||
chmod a-w $(distdir).tar.gz
|
||||
cd $(release-archive-dir) \
|
||||
&& xdelta delta -9 $(prev-tgz) $(distdir).tar.gz $(xd-delta) || :
|
||||
ln $(release-archive-dir)/$(xd-delta) .
|
||||
chmod a-w $(release-archive-dir)/$(xd-delta)
|
||||
$(MAKE) $(xd-delta)
|
||||
$(MAKE) -s announcement > /tmp/announce-$(my_distdir)
|
||||
ln $(rel-files) $(release_archive_dir)
|
||||
chmod a-w $(rel-files)
|
||||
echo $(VERSION) > $(prev_version_file)
|
||||
cvs ci -m. $(prev_version_file)
|
||||
@echo =====================================
|
||||
@echo =====================================
|
||||
@echo 'for host in $(a_host) $(b_host); do \'
|
||||
@echo ' rsync -e ssh --pro -av $(xd-delta) $(distdir).tar.gz \'
|
||||
@echo ' $(b_host):$(b_real_dir); done'
|
||||
@echo '# send the /tmp/announcement e-mail'
|
||||
@echo =====================================
|
||||
@echo =====================================
|
||||
$(CVS) ci -m. $(prev_version_file)
|
||||
@$(emit-rsync-commands)
|
||||
|
||||
32
THANKS
32
THANKS
@@ -11,6 +11,7 @@ Adam Klein aklein@debian.org
|
||||
Akim Demaille demaille@inf.enst.fr
|
||||
Alain Magloire alain@qnx.com
|
||||
Alan Iwi iwi@atm.ox.ac.uk
|
||||
Albert Hopkins ahopkins@dynacare.com
|
||||
Alberto Accomazzi alberto@cfa0.harvard.edu
|
||||
aldomel aldomel@ix.netcom.com
|
||||
Alen Muzinic zveki@fly.cc.fer.hr
|
||||
@@ -25,6 +26,7 @@ Andreas Stolcke stolcke@ICSI.Berkeley.EDU
|
||||
Andres Soolo andres@soolo.matti.ee
|
||||
Andrew Burgess aab@cichlid.com
|
||||
Andrew Dalke dalke@bioreason.com
|
||||
Andrew Pham andpha@us.ibm.com
|
||||
Andrew Tridgell tridge@samba.org
|
||||
Andries Brouwer Andries.Brouwer@cwi.nl
|
||||
Andy Longton alongton@metamark.com
|
||||
@@ -38,6 +40,7 @@ Axel Kittenberger Anshil@gmx.net
|
||||
Bauke Jan Douma bjdouma@xs4all.nl
|
||||
Bengt Martensson bengt@mathematik.uni-Bremen.de
|
||||
Bernd Leibing bernd.leibing@rz.uni-ulm.de
|
||||
Bernhard Baehr bernhard.baehr@gmx.de
|
||||
Bernhard Rosenkraenzer bero@redhat.de
|
||||
Bill Peters peters@gaffel.as.arizona.edu
|
||||
Bjorn Helgaas helgaas@rsn.hp.com
|
||||
@@ -54,6 +57,7 @@ Carlos Canau Carlos.Canau@relay.puug.pt
|
||||
Charles Karney karney@pppl.gov
|
||||
Charles Randall crandall@matchlogic.com
|
||||
Chip Salzenberg chip@valinux.com
|
||||
Chris Faylor cgf@cygnus.com
|
||||
Chris Sylvain csylvain@umm.edu
|
||||
Chris Yeo cyeo@biking.org
|
||||
Christi Alice Scarborough christi@chiark.greenend.org.uk
|
||||
@@ -63,7 +67,9 @@ Christian von Roques roques@pond.sub.org
|
||||
Chuck Hedrick hedrick@klinzhai.rutgers.edu
|
||||
Clark Morgan cmorgan@aracnet.com
|
||||
Colin Plumb colin@nyx.net
|
||||
Colin Watson cjw44@riva.ucam.org
|
||||
Collin Rogowski collin@rogowski.de
|
||||
Dale Scheetz dwarf@polaris.net
|
||||
Dan Hagerty hag@gnu.ai.it.edu
|
||||
Dan Pascu dan@services.iiruc.ro
|
||||
Daniel Bergstrom noa@melody.se
|
||||
@@ -76,6 +82,7 @@ Derek Clegg dclegg@next.com
|
||||
Dick Streefland dick_streefland@tasking.com
|
||||
Dirk Lattermann dlatt@t-online.de
|
||||
Dirk-Jan Faber djfaber@snow.nl
|
||||
Dan Jacobson http://www.geocities.com/jidani
|
||||
Don Parsons dparsons@synapse.kent.edu
|
||||
Donni Erpel donald@appc11.gsi.de
|
||||
Doug McLaren dougmc@comco.com
|
||||
@@ -88,6 +95,8 @@ Eli Zaretskii eliz@is.elta.co.il
|
||||
Emile LeBlanc leblanc@math.toronto.edu
|
||||
Eric Backus ericb@lsid.hp.com
|
||||
Eric G. Miller egm2@jps.net
|
||||
Eric Pemente pemente@northpark.edu
|
||||
Eric S. Raymond esr@snark.thyrsus.com
|
||||
Erik Bennett bennett@cvo.oneworld.com
|
||||
Erik Corry erik@kroete2.freinet.de
|
||||
Felix Lee flee@teleport.com
|
||||
@@ -97,12 +106,15 @@ Frank Adler fadler@allesklar.de
|
||||
Frank T Lofaro ftlofaro@snooks.Egr.UNLV.EDU
|
||||
François Pinard pinard@iro.umontreal.ca
|
||||
Fred Fish fnf@ninemoons.com
|
||||
Frederik Eaton frederik@caltech.edu
|
||||
Frédéric L. W. Meunier 0@pervalidus.net
|
||||
Gabor Z. Papp gzp@gzp.org.hu
|
||||
Galen Hazelwood galenh@micron.net
|
||||
Gary Anderson ganderson@clark.net
|
||||
Gaël Quéri gqueri@mail.dotcom.fr
|
||||
Geoff Kuenning geoff@cs.hmc.edu
|
||||
Geoff Odhner geoff@franklin.com
|
||||
Geoff Whale geoffw@cse.unsw.EDU.AU
|
||||
Gerhard Poul gpoul@gnu.org
|
||||
Germano Leichsenring germano@jedi.cs.kobe-u.ac.jp
|
||||
GOTO Masanori gotom@debian.or.jp
|
||||
@@ -117,7 +129,9 @@ Hans Verkuil hans@wyst.hobby.nl
|
||||
Harry Liu rliu@lek.ugcs.caltech.edu
|
||||
Herbert Xu herbert@gondor.apana.org.au
|
||||
Holger Berger hberger@ess.nec.de
|
||||
Hon-Yin Kok hkok@yoda.unl.edu
|
||||
Hugh Daniel hugh@xanadu.com
|
||||
Ian Bruce ian.bruce@myrealbox.com
|
||||
Ian Jackson ijackson@chiark.greenend.org.uk
|
||||
Ian Lance Taylor ian@cygnus.com
|
||||
Ian Turner vectro@pipeline.com
|
||||
@@ -156,6 +170,7 @@ John Summerfield summer@OS2.ami.com.au
|
||||
Joost van Baal joostvb@xs4all.nl
|
||||
Jorge Stolfi stolfi@ic.unicamp.br
|
||||
Joseph S. Myers jsm28@cam.ac.uk
|
||||
Juan F. Codagnone juam@arnet.com.ar
|
||||
Jungshik Shin jshin@pantheon.yale.edu
|
||||
Jürgen Fluk louis@dachau.marco.de
|
||||
jvogel jvogel@linkny.com
|
||||
@@ -169,9 +184,11 @@ Karl-Michael Schneider schneide@phil.uni-passau.de
|
||||
Karsten Thygesen karthy@kom.auc.dk
|
||||
Kaveh R. Ghazi ghazi@caip.rutgers.edu
|
||||
Keith Owens kaos@audio.apana.org.au
|
||||
Keith Thompson kst@sdsc.edu
|
||||
Ken Pizzini kenp@halcyon.com
|
||||
Kjetil Torgrim Homme kjetilho@ifi.uio.no
|
||||
Kristoffer Rose kris@diku.dk
|
||||
??? kytek@cybercomm.net
|
||||
Larry McVoy lm@sgi.com
|
||||
Lars Hecking lhecking@nmrc.ucc.ie
|
||||
Lehti Rami rammer@cs.tut.fi
|
||||
@@ -189,6 +206,7 @@ Mark A. Thomas thommark@access.digex.net
|
||||
Mark D. Roth roth@uiuc.edu
|
||||
Mark Harris mark@monitor.designacc.com
|
||||
Mark Hewitt mhewitt@armature.com
|
||||
Mark Hounschell markh@compro.net
|
||||
Mark Kettenis kettenis@phys.uva.nl
|
||||
Mark Nudelman marknu@flash.net
|
||||
Mark W. Eichin eichin@cygnus.com
|
||||
@@ -203,9 +221,11 @@ Masami Takikawa takikawm@CS.ORST.EDU
|
||||
Mate Wierdl mw@moni.msci.memphis.edu
|
||||
Matej Vela mvela@public.srce.hr
|
||||
Matt Perry matt@primefactor.com
|
||||
Matt Schalit mschalit@pacbell.net
|
||||
Matthew Braun matthew@ans.net
|
||||
Matthew Clarke Matthew_Clarke@mindlink.bc.ca
|
||||
Matthew S. Levine mslevine@theory.lcs.mit.edu
|
||||
Matthew Smith matts@bluesguitar.org
|
||||
Matthew Swift swift@alum.mit.edu
|
||||
Mattias Wadenstein maswan@acc.umu.se
|
||||
Matthias Urlichs smurf@noris.de
|
||||
@@ -224,11 +244,14 @@ Michiel Bacchiani bacchian@raven.bu.edu
|
||||
Miles Bader miles@gnu.ai.mit.edu
|
||||
Minh Tran-Le tranle@intellicorp.com
|
||||
Morten Welinder terra@diku.dk
|
||||
Neal H Walfield neal@cs.uml.edu
|
||||
Nelson H. F. Beebe beebe@math.utah.edu
|
||||
Nick Lawes nlawes@silverplatter.com
|
||||
Niklas Edmundsson nikke@acc.umu.se
|
||||
Noah Friedman friedman@splode.com
|
||||
Noel Cragg noel@red-bean.com
|
||||
Olav Morkrid olav@funcom.com
|
||||
Ole Laursen olau@hardworking.dk
|
||||
Oskar Liljeblad osk@hem.passagen.se
|
||||
Ørn E. Hansen oehansen@daimi.aau.dk
|
||||
Paul Eggert eggert@twinsun.com
|
||||
@@ -241,6 +264,8 @@ Peter Eriksson peter@ifm.liu.se
|
||||
Peter Moulder reiter@netspace.net.au
|
||||
Peter Samuelson psamuels@sampo.creighton.edu
|
||||
Peter Seebach seebs@taniemarie.solon.com
|
||||
Petter Reinholdtsen pere@hungry.com
|
||||
Phelippe Neveu pneveu@pcigeomatics.com
|
||||
Phil Richards phil.richards@vf.vodafone.co.uk
|
||||
Philippe De Muyter phdm@macqel.be
|
||||
Philippe Schnoebelen Philippe.Schnoebelen@imag.fr
|
||||
@@ -252,6 +277,7 @@ Ralf W. Stephan stephan@tmt.de
|
||||
Ralph Loader loader@maths.ox.ac.uk
|
||||
Raul Miller moth@magenta.com
|
||||
Richard Braakman dark@xs4all.nl
|
||||
Richard Dawe richdawe@bigfoot.com
|
||||
Richard J. Rauenzahn rrauenza@hairball.cup.hp.com
|
||||
Richard Sharman rsharman@magmacom.com
|
||||
Rick Sladkey jrs@world.std.com
|
||||
@@ -259,6 +285,7 @@ Rik Faith faith@cs.unc.edu
|
||||
Risto Kankkunen kankkune@lingsoft.fi
|
||||
Robert H. de Vries robert@and.nl
|
||||
Rogier Wolff R.E.Wolff@BitWizard.nl
|
||||
Roland Huebner ro-huebner@gmx.de
|
||||
Ronald F. Guilmette rfg@netcom.com
|
||||
Ross Alexander r.alexander@auckland.ac.nz
|
||||
Ross Paterson rap@doc.ic.ac.uk
|
||||
@@ -269,7 +296,10 @@ Sander van Malssen svm@kozmix.ow.nl
|
||||
Santiago Vila Doncel sanvila@unex.es
|
||||
Savochkin Andrey Vladimirovich saw@msu.ru
|
||||
Scott Lurndal slurn@griffin.engr.sgi.com
|
||||
Stephen Gildea gildea@x.org
|
||||
Soeren Sonnenburg sonnenburg@informatik.hu-berlin.de
|
||||
Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr
|
||||
Stephen Eglen eglen@pcg.wustl.edu
|
||||
Stephen Gildea gildea@stop.mail-abuse.org
|
||||
Stephen Smoogen ??????????
|
||||
Steve McConnel steve@acadcomp.sil.org
|
||||
Stuart Kemp skemp@peter.bmc.com
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
Makefile
|
||||
fileutils.aux
|
||||
fileutils.cm
|
||||
fileutils.cp
|
||||
fileutils.cps
|
||||
fileutils.dvi
|
||||
fileutils.fl
|
||||
fileutils.fn
|
||||
fileutils.info
|
||||
fileutils.info*
|
||||
fileutils.ky
|
||||
fileutils.log
|
||||
fileutils.op
|
||||
fileutils.pg
|
||||
fileutils.toc
|
||||
fileutils.tp
|
||||
fileutils.vr
|
||||
coreutils.aux
|
||||
coreutils.cm
|
||||
coreutils.cp
|
||||
coreutils.cps
|
||||
coreutils.dvi
|
||||
coreutils.fl
|
||||
coreutils.fn
|
||||
coreutils.info
|
||||
coreutils.info*
|
||||
coreutils.ky
|
||||
coreutils.log
|
||||
coreutils.op
|
||||
coreutils.pg
|
||||
coreutils.toc
|
||||
coreutils.tp
|
||||
coreutils.vr
|
||||
stamp-vti
|
||||
version.texi
|
||||
|
||||
116
doc/ChangeLog
Normal file
116
doc/ChangeLog
Normal file
@@ -0,0 +1,116 @@
|
||||
2001-11-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (Date directives): Document %u.
|
||||
|
||||
2001-11-07 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (paste invocation): Give examples.
|
||||
Thanks to Dan Jacobson for suggesting the examples.
|
||||
|
||||
2001-11-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (sort invocation): Recommend setting LC_ALL=C,
|
||||
not LC_COLLATE=C. Explain how the latter can cause problems.
|
||||
Based on a message from Paul Eggert.
|
||||
(ls invocation): Recommend setting LC_ALL=C, not LC_COLLATE=C.
|
||||
|
||||
2001-10-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (cp invocation): Describe --reply=...
|
||||
|
||||
2001-10-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (cp invocation): `cp --no-dereference' is
|
||||
no longer equivalent to `cp -d'.
|
||||
`cp -d' is equivalent to `--no-dereference --preserve=links'.
|
||||
cp's -P option means --no-dereference, not --parents.
|
||||
Describe new optional argument to --preserve.
|
||||
Describe new option: --no-preserve=ATTRIBUTE_LIST.
|
||||
|
||||
2001-09-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (check-texinfo): Redirect stderr of `grep -w' to
|
||||
/dev/null, so people with old versions of grep don't see the failure.
|
||||
|
||||
2001-09-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (mv invocation): Describe new option:
|
||||
--reply={yes,no,query}. Fix a few typos.
|
||||
|
||||
2001-09-15 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (uniq invocation): The input need not
|
||||
be sorted. Try to clarify -d versus -D versus -u.
|
||||
|
||||
2001-09-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (tail invocation): Document new option: -F.
|
||||
From Herbert Xu.
|
||||
|
||||
2001-09-04 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (join invocation): Describe the GNU
|
||||
extension to join, which does not require sorted input when
|
||||
the input contains no unpairable lines.
|
||||
|
||||
2001-09-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi:
|
||||
New 'uname' options -i or --hardware-platform,
|
||||
and -o or --operating-system.
|
||||
'uname -a' now outputs -i and -o information at the end.
|
||||
New uname option --kernel-version is an alias for -v.
|
||||
Uname option --release has been renamed to --kernel-release,
|
||||
and --sysname has been renamed to --kernel-name;
|
||||
the old options will work for a while, but are no longer documented.
|
||||
|
||||
2001-08-24 Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
* coreutils.texi (cut invocation): Document how cut treats lines
|
||||
with no separators.
|
||||
|
||||
2001-06-19 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi: expr now uses LC_COLLATE for string comparison,
|
||||
as per POSIX.
|
||||
|
||||
2001-08-25 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi: Use @option, rather than @samp everywhere.
|
||||
|
||||
2001-06-21 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi: 'expr' now requires '+' rather than 'quote'
|
||||
to quote tokens.
|
||||
|
||||
2001-07-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (cp invocation): Reflect 2001-07-08 change to
|
||||
cp (via copy.c).
|
||||
|
||||
2001-06-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (info_TEXINFOS): Reflect renaming: s/omni-/core/.
|
||||
* coreutils.texi: Likewise.
|
||||
|
||||
* coreutils.texi: New, renamed from omni-utils.texi.
|
||||
* omni-utils.texi: Removed, renamed to coreutils.texi.
|
||||
|
||||
* omni-utils.texi (ls invocation): Mention the effect of locale.
|
||||
Reported by Keith Thompson.
|
||||
|
||||
2001-05-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* texinfo.tex: Update from master source.
|
||||
|
||||
* omni-utils.texi (ls invocation): Document more clearly what ls
|
||||
does when given no arguments.
|
||||
|
||||
2001-05-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* textutils.texi: Remove file.
|
||||
|
||||
* Makefile.am ($(DVIS), $(INFO_DEPS)): Depend on $(EXTRA_DIST).
|
||||
(DISABLED_constants.texi): New rule -- disabled for now.
|
||||
|
||||
This directory is now shared by fileutils, textutils, and sh-utils.
|
||||
@@ -1,7 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
info_TEXINFOS = fileutils.texi
|
||||
info_TEXINFOS = coreutils.texi
|
||||
|
||||
EXTRA_DIST = perm.texi getdate.texi
|
||||
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
|
||||
# The following is necessary if the package name is 8 characters or longer.
|
||||
# If the info documentation would be split into 10 or more separate files,
|
||||
@@ -12,3 +12,25 @@ EXTRA_DIST = perm.texi getdate.texi
|
||||
# and those names all map to one 14-byte name (<package>.info-) on some crufty
|
||||
# old systems.
|
||||
MAKEINFO = makeinfo --no-split
|
||||
|
||||
# Remove `DISABLED_' when fileutils, textutils, and sh-utils have
|
||||
# all been merged into one package.
|
||||
DISABLED_constants.texi: $(top_srcdir)/src/tail.c
|
||||
LC_ALL=C \
|
||||
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
|
||||
$(top_srcdir)/src/tail.c > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
# Uncomment this when fileutils, textutils, and sh-utils have
|
||||
# all been merged into one package.
|
||||
# MAINTAINERCLEANFILES = constants.texi
|
||||
|
||||
$(DVIS): $(EXTRA_DIST)
|
||||
$(INFO_DEPS): $(EXTRA_DIST)
|
||||
|
||||
# List words/regexps here that should not appear in the texinfo documentation.
|
||||
check-texinfo:
|
||||
grep timezone $(srcdir)/*.texi && exit 1 || :
|
||||
grep -w POSIX $(srcdir)/*.texi 2> /dev/null && exit 1 || :
|
||||
|
||||
check: check-texinfo
|
||||
|
||||
341
doc/Makefile.in
341
doc/Makefile.in
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.4b from Makefile.am
|
||||
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -11,6 +12,8 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -31,11 +34,9 @@ infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
@@ -43,32 +44,33 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_FLAG =
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
@@ -79,16 +81,15 @@ GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
GT_NO = @GT_NO@
|
||||
GT_YES = @GT_YES@
|
||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLDEPS = @INTLDEPS@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
LIB_NANOSLEEP = @LIB_NANOSLEEP@
|
||||
@@ -102,7 +103,6 @@ PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
POW_LIBM = @POW_LIBM@
|
||||
RANLIB = @RANLIB@
|
||||
SEQ_LIBM = @SEQ_LIBM@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
@@ -111,13 +111,13 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
info_TEXINFOS = coreutils.texi
|
||||
|
||||
info_TEXINFOS = fileutils.texi
|
||||
|
||||
EXTRA_DIST = perm.texi getdate.texi
|
||||
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
|
||||
# The following is necessary if the package name is 8 characters or longer.
|
||||
# If the info documentation would be split into 10 or more separate files,
|
||||
@@ -130,36 +130,28 @@ EXTRA_DIST = perm.texi getdate.texi
|
||||
MAKEINFO = makeinfo --no-split
|
||||
subdir = doc
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
TEXI2DVI = texi2dvi
|
||||
INFO_DEPS = fileutils.info
|
||||
DVIS = fileutils.dvi
|
||||
TEXINFOS = fileutils.texi
|
||||
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
|
||||
version.texi
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
INFO_DEPS = coreutils.info
|
||||
DVIS = coreutils.dvi
|
||||
TEXINFOS = coreutils.texi
|
||||
DIST_COMMON = ChangeLog Makefile.am Makefile.in mdate-sh stamp-vti \
|
||||
texinfo.tex version.texi
|
||||
all: all-am
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits doc/Makefile
|
||||
.SUFFIXES: .dvi .info .ps .texi
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||
@:
|
||||
|
||||
$(srcdir)/stamp-vti: fileutils.texi $(top_srcdir)/configure.in
|
||||
@(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/fileutils.texi`; \
|
||||
$(srcdir)/stamp-vti: coreutils.texi $(top_srcdir)/configure.ac
|
||||
@(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/coreutils.texi`; \
|
||||
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||
echo "@set EDITION $(VERSION)"; \
|
||||
@@ -173,88 +165,37 @@ $(srcdir)/stamp-vti: fileutils.texi $(top_srcdir)/configure.in
|
||||
mostlyclean-vti:
|
||||
-rm -f vti.tmp
|
||||
|
||||
clean-vti:
|
||||
|
||||
distclean-vti:
|
||||
|
||||
maintainer-clean-vti:
|
||||
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
|
||||
|
||||
fileutils.info: fileutils.texi $(srcdir)/version.texi
|
||||
fileutils.dvi: fileutils.texi $(srcdir)/version.texi
|
||||
|
||||
|
||||
DVIPS = dvips
|
||||
coreutils.info: coreutils.texi $(srcdir)/version.texi
|
||||
coreutils.dvi: coreutils.texi $(srcdir)/version.texi
|
||||
|
||||
.texi.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
TEXINPUTS="$(srcdir)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
.texi:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo.dvi:
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.txi.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.txi.dvi:
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.txi:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
TEXI2DVI = texi2dvi
|
||||
DVIPS = dvips
|
||||
.dvi.ps:
|
||||
$(DVIPS) $< -o $@
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
if test -f $$d/$$ifile; then \
|
||||
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
|
||||
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
|
||||
uninstall-info:
|
||||
uninstall-info-am:
|
||||
$(PRE_UNINSTALL)
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
|
||||
@@ -274,26 +215,22 @@ dist-info: $(INFO_DEPS)
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
for file in $$d/$$base*; do \
|
||||
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||
test -f $(distdir)/$$relfile || \
|
||||
cp -p $$file $(distdir)/$$relfile; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -f fileutils.aux fileutils.cp fileutils.cps fileutils.dvi \
|
||||
fileutils.fn fileutils.fns fileutils.pgs fileutils.ky \
|
||||
fileutils.kys fileutils.ps fileutils.log fileutils.pg \
|
||||
fileutils.toc fileutils.tp fileutils.tps fileutils.vr \
|
||||
fileutils.vrs fileutils.op fileutils.tr fileutils.cv \
|
||||
fileutils.cn fileutils.cm fileutils.ov
|
||||
|
||||
clean-aminfo:
|
||||
|
||||
distclean-aminfo:
|
||||
-rm -f coreutils.aux coreutils.cp coreutils.cps coreutils.dvi coreutils.fl \
|
||||
coreutils.fn coreutils.ky coreutils.log coreutils.op \
|
||||
coreutils.pg coreutils.ps coreutils.toc coreutils.tp \
|
||||
coreutils.vr
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
cd $(srcdir) && for i in $(INFO_DEPS); do \
|
||||
cd $(srcdir) && \
|
||||
for i in $(INFO_DEPS); do \
|
||||
rm -f $$i; \
|
||||
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
|
||||
rm -f $$i-[0-9]*; \
|
||||
@@ -302,12 +239,18 @@ maintainer-clean-aminfo:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
@@ -317,73 +260,131 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||
info-am: $(INFO_DEPS)
|
||||
info: info-am
|
||||
dvi-am: $(DVIS)
|
||||
dvi: dvi-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="${top_distdir}" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
all-am: Makefile $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-info
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(INFO_DEPS)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-rm -f Makefile.in
|
||||
mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-vti clean-aminfo clean-generic mostlyclean-am
|
||||
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-vti distclean-aminfo distclean-generic clean-am
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-vti maintainer-clean-aminfo \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for ifile in echo $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \
|
||||
if test -f $$ifile; then \
|
||||
relfile=`expr "$$ifile" : "$$d/\(.*\)"`; \
|
||||
echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \
|
||||
$(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
|
||||
install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \
|
||||
clean-aminfo maintainer-clean-aminfo tags distdir info-am info dvi-am \
|
||||
dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all install-strip \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic dist-info \
|
||||
distclean distclean-generic distdir dvi dvi-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti mostlyclean \
|
||||
mostlyclean-aminfo mostlyclean-generic mostlyclean-vti \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
# Remove `DISABLED_' when fileutils, textutils, and sh-utils have
|
||||
# all been merged into one package.
|
||||
DISABLED_constants.texi: $(top_srcdir)/src/tail.c
|
||||
LC_ALL=C \
|
||||
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
|
||||
$(top_srcdir)/src/tail.c > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
# Uncomment this when fileutils, textutils, and sh-utils have
|
||||
# all been merged into one package.
|
||||
# MAINTAINERCLEANFILES = constants.texi
|
||||
|
||||
$(DVIS): $(EXTRA_DIST)
|
||||
$(INFO_DEPS): $(EXTRA_DIST)
|
||||
|
||||
# List words/regexps here that should not appear in the texinfo documentation.
|
||||
check-texinfo:
|
||||
grep timezone $(srcdir)/*.texi && exit 1 || :
|
||||
grep -w POSIX $(srcdir)/*.texi 2> /dev/null && exit 1 || :
|
||||
|
||||
check: check-texinfo
|
||||
# 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:
|
||||
|
||||
2
doc/constants.texi
Normal file
2
doc/constants.texi
Normal file
@@ -0,0 +1,2 @@
|
||||
@set DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS 5
|
||||
@set DEFAULT_MAX_N_CONSECUTIVE_SIZE_CHANGES 200
|
||||
11461
doc/coreutils.texi
Normal file
11461
doc/coreutils.texi
Normal file
File diff suppressed because it is too large
Load Diff
395
doc/doclicense.texi
Normal file
395
doc/doclicense.texi
Normal file
@@ -0,0 +1,395 @@
|
||||
@c -*-texinfo-*-
|
||||
@node GNU Free Documentation License
|
||||
@appendix GNU Free Documentation License
|
||||
@center Version 1.1, March 2000
|
||||
@ifnottex
|
||||
@menu
|
||||
* How to use this License for your documents::
|
||||
@end menu
|
||||
@end ifnottex
|
||||
@display
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@end display
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@enumerate 0
|
||||
@item
|
||||
PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
written document ``free'' in the sense of freedom: to assure everyone
|
||||
the effective freedom to copy and redistribute it, with or without
|
||||
modifying it, either commercially or noncommercially. Secondarily,
|
||||
this License preserves for the author and publisher a way to get
|
||||
credit for their work, while not being considered responsible for
|
||||
modifications made by others.
|
||||
|
||||
This License is a kind of ``copyleft'', which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work that contains a
|
||||
notice placed by the copyright holder saying it can be distributed
|
||||
under the terms of this License. The ``Document'', below, refers to any
|
||||
such manual or work. Any member of the public is a licensee, and is
|
||||
addressed as ``you''.
|
||||
|
||||
A ``Modified Version'' of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A ``Secondary Section'' is a named appendix or a front-matter section of
|
||||
the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall subject
|
||||
(or to related matters) and contains nothing that could fall directly
|
||||
within that overall subject. (For example, if the Document is in part a
|
||||
textbook of mathematics, a Secondary Section may not explain any
|
||||
mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License.
|
||||
|
||||
The ``Cover Texts'' are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License.
|
||||
|
||||
A ``Transparent'' copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, whose contents can be viewed and edited directly and
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup has been designed to thwart or discourage
|
||||
subsequent modification by readers is not Transparent. A copy that is
|
||||
not ``Transparent'' is called ``Opaque''.
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||
or XML using a publicly available DTD, and standard-conforming simple
|
||||
HTML designed for human modification. Opaque formats include
|
||||
PostScript, PDF, proprietary formats that can be read and edited only
|
||||
by proprietary word processors, SGML or XML for which the DTD and/or
|
||||
processing tools are not generally available, and the
|
||||
machine-generated HTML produced by some word processors for output
|
||||
purposes only.
|
||||
|
||||
The ``Title Page'' means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, ``Title Page'' means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies of the Document numbering more than 100,
|
||||
and the Document's license notice requires Cover Texts, you must enclose
|
||||
the copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a publicly-accessible computer-network location containing a complete
|
||||
Transparent copy of the Document, free of added material, which the
|
||||
general network-using public has access to download anonymously at no
|
||||
charge using public-standard network protocols. If you use the latter
|
||||
option, you must take reasonably prudent steps, when you begin
|
||||
distribution of Opaque copies in quantity, to ensure that this
|
||||
Transparent copy will remain thus accessible at the stated location
|
||||
until at least one year after the last time you distribute an Opaque
|
||||
copy (directly or through your agents or retailers) of that edition to
|
||||
the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.@*
|
||||
B. List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has less than five).@*
|
||||
C. State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.@*
|
||||
D. Preserve all the copyright notices of the Document.@*
|
||||
E. Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.@*
|
||||
F. Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.@*
|
||||
G. Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.@*
|
||||
H. Include an unaltered copy of this License.@*
|
||||
I. Preserve the section entitled ``History'', and its title, and add to
|
||||
it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section entitled ``History'' in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.@*
|
||||
J. Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the ``History'' section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.@*
|
||||
K. In any section entitled ``Acknowledgements'' or ``Dedications'',
|
||||
preserve the section's title, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements
|
||||
and/or dedications given therein.@*
|
||||
L. Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.@*
|
||||
M. Delete any section entitled ``Endorsements''. Such a section
|
||||
may not be included in the Modified Version.@*
|
||||
N. Do not retitle any existing section as ``Endorsements''
|
||||
or to conflict in title with any Invariant Section.@*
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section entitled ``Endorsements'', provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties--for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections entitled ``History''
|
||||
in the various original documents, forming one section entitled
|
||||
``History''; likewise combine any sections entitled ``Acknowledgements'',
|
||||
and any sections entitled ``Dedications''. You must delete all sections
|
||||
entitled ``Endorsements.''
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, does not as a whole count as a Modified Version
|
||||
of the Document, provided no compilation copyright is claimed for the
|
||||
compilation. Such a compilation is called an ``aggregate'', and this
|
||||
License does not apply to the other self-contained works thus compiled
|
||||
with the Document, on account of their being thus compiled, if they
|
||||
are not themselves derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one quarter
|
||||
of the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that surround only the Document within the aggregate.
|
||||
Otherwise they must appear on covers around the whole aggregate.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License provided that you also include the
|
||||
original English version of this License. In case of a disagreement
|
||||
between the translation and the original English version of this
|
||||
License, the original English version will prevail.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
http://www.gnu.org/copyleft/.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@node How to use this License for your documents
|
||||
@unnumberedsec ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
|
||||
Copyright (C) @var{year} @var{your name}.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with the Invariant Sections being @var{list their titles}, with the
|
||||
Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
|
||||
A copy of the license is included in the section entitled ``GNU
|
||||
Free Documentation License''.
|
||||
@end group
|
||||
@end smallexample
|
||||
If you have no Invariant Sections, write ``with no Invariant Sections''
|
||||
instead of saying which ones are invariant. If you have no
|
||||
Front-Cover Texts, write ``no Front-Cover Texts'' instead of
|
||||
``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
@@ -100,6 +100,34 @@ When a month is written this way, it is still considered to be written
|
||||
numerically, instead of being ``spelled in full''; this changes the
|
||||
allowed strings.
|
||||
|
||||
@cindex language, in dates
|
||||
In the current implementation, only English is supported for words and
|
||||
abbreviations like @samp{AM}, @samp{DST}, @samp{EST}, @samp{first},
|
||||
@samp{January}, @samp{Sunday}, @samp{tomorrow}, and @samp{year}.
|
||||
|
||||
@cindex language, in dates
|
||||
@cindex time zone item
|
||||
The output of @command{date} is not always acceptable as a date string,
|
||||
not only because of the language problem, but also because there is no
|
||||
standard meaning for time zone items like @samp{IST}. When using
|
||||
@command{date} to generate a date string intended to be parsed later,
|
||||
specify a date format that is independent of language and that does not
|
||||
use time zone items other than @samp{UTC} and @samp{Z}. Here are some
|
||||
ways to do this:
|
||||
|
||||
@example
|
||||
$ LC_ALL=C TZ=UTC0 date
|
||||
Fri Dec 15 19:48:05 UTC 2000
|
||||
$ TZ=UTC0 date +"%Y-%m-%d %H:%M:%SZ"
|
||||
2000-12-15 19:48:05Z
|
||||
$ date --iso-8601=seconds # a GNU extension
|
||||
2000-12-15T11:48:05-0800
|
||||
$ date --rfc-822 # a GNU extension
|
||||
Fri, 15 Dec 2000 11:48:05 -0800
|
||||
$ date +"%Y-%m-%d %H:%M:%S %z" # %z is a GNU extension.
|
||||
2000-12-15 11:48:05 -0800
|
||||
@end example
|
||||
|
||||
@cindex case, ignored in dates
|
||||
@cindex comments, in dates
|
||||
Alphabetic case is completely ignored in dates. Comments may be introduced
|
||||
@@ -238,13 +266,15 @@ but not both.
|
||||
@cindex time zone item
|
||||
|
||||
A @dfn{time zone item} specifies an international time zone, indicated
|
||||
by a small set of letters, e.g., @samp{UTC} for Coordinated Universal
|
||||
by a small set of letters, e.g., @samp{UTC} or @samp{Z}
|
||||
for Coordinated Universal
|
||||
Time. Any included periods are ignored. By following a
|
||||
non-daylight-saving time zone by the string @samp{DST} in a separate
|
||||
word (that is, separated by some white space), the corresponding
|
||||
daylight saving time zone may be specified.
|
||||
|
||||
Time zone items are obsolescent and are not recommended, because they
|
||||
Time zone items other than @samp{UTC} and @samp{Z}
|
||||
are obsolescent and are not recommended, because they
|
||||
are ambiguous; for example, @samp{EST} has a different meaning in
|
||||
Australia than in the United States. Instead, it's better to use
|
||||
unambiguous numeric time zone corrections like @samp{-0500}, as
|
||||
|
||||
@@ -74,7 +74,7 @@ save the program's text image on the swap device so it will load more
|
||||
quickly when run (called the @dfn{sticky bit}). For directories on some
|
||||
systems, prevent users from removing or renaming a file in a directory
|
||||
unless they own the file or the directory; this is called the
|
||||
@dfn{restriction deletion flag} for the directory.
|
||||
@dfn{restricted deletion flag} for the directory.
|
||||
@end enumerate
|
||||
|
||||
@node Symbolic Modes
|
||||
|
||||
3373
doc/sh-utils.texi
3373
doc/sh-utils.texi
File diff suppressed because it is too large
Load Diff
252
doc/texinfo.tex
252
doc/texinfo.tex
@@ -3,10 +3,10 @@
|
||||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2000-12-11.07}
|
||||
\def\texinfoversion{2001-07-25.07}
|
||||
%
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
|
||||
% Free Software Foundation, Inc.
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
|
||||
% 2000, 01 Free Software Foundation, Inc.
|
||||
%
|
||||
% This texinfo.tex file is free software; you can redistribute it and/or
|
||||
% modify it under the terms of the GNU General Public License as
|
||||
@@ -170,6 +170,16 @@
|
||||
}%
|
||||
\fi
|
||||
|
||||
% add check for \lastpenalty to plain's definitions. If the last thing
|
||||
% we did was a \nobreak, we don't want to insert more space.
|
||||
%
|
||||
\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
|
||||
\removelastskip\penalty-50\smallskip\fi\fi}
|
||||
\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
|
||||
\removelastskip\penalty-100\medskip\fi\fi}
|
||||
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
|
||||
\removelastskip\penalty-200\bigskip\fi\fi}
|
||||
|
||||
% For @cropmarks command.
|
||||
% Do @cropmarks to get crop marks.
|
||||
%
|
||||
@@ -431,7 +441,7 @@
|
||||
% environments. --karl, 6may93
|
||||
%{\advance \baselineskip by -\singlespaceskip
|
||||
%\kern \baselineskip}%
|
||||
\setleading \singlespaceskip
|
||||
\setleading\singlespaceskip
|
||||
}
|
||||
|
||||
%% Simple single-character @ commands
|
||||
@@ -730,9 +740,9 @@ where each line of input produces a line of output.}
|
||||
\fi
|
||||
%
|
||||
\ifodd\pageno
|
||||
\def\temp{\inleftmargin\lefttext}%
|
||||
\def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
|
||||
\else
|
||||
\def\temp{\inrightmargin\righttext}%
|
||||
\def\temp{\inleftmargin\lefttext}%
|
||||
\fi
|
||||
\temp
|
||||
}
|
||||
@@ -924,11 +934,15 @@ where each line of input produces a line of output.}
|
||||
\fi
|
||||
\ifx\empty\imagewidth\else width \imagewidth \fi
|
||||
\ifx\empty\imageheight\else height \imageheight \fi
|
||||
{#1.pdf}%
|
||||
\ifnum\pdftexversion<13
|
||||
#1.pdf%
|
||||
\else
|
||||
{#1.pdf}%
|
||||
\fi
|
||||
\ifnum\pdftexversion < 14 \else
|
||||
\pdfrefximage \pdflastximage
|
||||
\fi}
|
||||
\def\pdfmkdest#1{\pdfdest name{#1@} xyz}
|
||||
\def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
|
||||
\def\pdfmkpgn#1{#1@}
|
||||
\let\linkcolor = \Blue % was Cyan, but that seems light?
|
||||
\def\endlink{\Black\pdfendlink}
|
||||
@@ -1026,6 +1040,7 @@ where each line of input produces a line of output.}
|
||||
\def\pdfurl#1{%
|
||||
\begingroup
|
||||
\normalturnoffactive\def\@{@}%
|
||||
\let\value=\expandablevalue
|
||||
\leavevmode\Red
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
|
||||
@@ -1053,9 +1068,8 @@ where each line of input produces a line of output.}
|
||||
\def\makelink{\addtokens{\toksB}%
|
||||
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
|
||||
\def\pdflink#1{%
|
||||
\startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}}
|
||||
\startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
|
||||
\linkcolor #1\endlink}
|
||||
\def\mkpgn#1{#1@}
|
||||
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
|
||||
\fi % \ifx\pdfoutput
|
||||
|
||||
@@ -1072,9 +1086,29 @@ where each line of input produces a line of output.}
|
||||
% We don't need math for this one.
|
||||
\def\ttsl{\tenttsl}
|
||||
|
||||
% Default leading.
|
||||
\newdimen\textleading \textleading = 13.2pt
|
||||
|
||||
% Set the baselineskip to #1, and the lineskip and strut size
|
||||
% correspondingly. There is no deep meaning behind these magic numbers
|
||||
% used as factors; they just match (closely enough) what Knuth defined.
|
||||
%
|
||||
\def\lineskipfactor{.08333}
|
||||
\def\strutheightpercent{.70833}
|
||||
\def\strutdepthpercent {.29167}
|
||||
%
|
||||
\def\setleading#1{%
|
||||
\normalbaselineskip = #1\relax
|
||||
\normallineskip = \lineskipfactor\normalbaselineskip
|
||||
\normalbaselines
|
||||
\setbox\strutbox =\hbox{%
|
||||
\vrule width0pt height\strutheightpercent\baselineskip
|
||||
depth \strutdepthpercent \baselineskip
|
||||
}%
|
||||
}
|
||||
|
||||
% Use Computer Modern fonts at \magstephalf (11pt).
|
||||
\newcount\mainmagstep
|
||||
\mainmagstep=\magstephalf
|
||||
\newcount\mainmagstep \mainmagstep=\magstephalf
|
||||
|
||||
% Set the font macro #1 to the font named #2, adding on the
|
||||
% specified font prefix (normally `cm').
|
||||
@@ -1141,6 +1175,18 @@ where each line of input produces a line of output.}
|
||||
\font\smalli=cmmi9
|
||||
\font\smallsy=cmsy9
|
||||
|
||||
% Fonts for small examples (8pt).
|
||||
\setfont\smallerrm\rmshape{8}{1000}
|
||||
\setfont\smallertt\ttshape{8}{1000}
|
||||
\setfont\smallerbf\bfshape{10}{800}
|
||||
\setfont\smallerit\itshape{8}{1000}
|
||||
\setfont\smallersl\slshape{8}{1000}
|
||||
\setfont\smallersf\sfshape{8}{1000}
|
||||
\setfont\smallersc\scshape{10}{800}
|
||||
\setfont\smallerttsl\ttslshape{10}{800}
|
||||
\font\smalleri=cmmi8
|
||||
\font\smallersy=cmsy8
|
||||
|
||||
% Fonts for title page:
|
||||
\setfont\titlerm\rmbshape{12}{\magstep3}
|
||||
\setfont\titleit\itbshape{10}{\magstep4}
|
||||
@@ -1229,7 +1275,7 @@ where each line of input produces a line of output.}
|
||||
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
|
||||
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
|
||||
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
|
||||
\resetmathfonts}
|
||||
\resetmathfonts \setleading{\textleading}}
|
||||
\def\titlefonts{%
|
||||
\let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
|
||||
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
|
||||
@@ -1258,7 +1304,14 @@ where each line of input produces a line of output.}
|
||||
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
|
||||
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
|
||||
\let\tenttsl=\smallttsl
|
||||
\resetmathfonts \setleading{11pt}}
|
||||
\resetmathfonts \setleading{10.5pt}}
|
||||
\def\smallerfonts{%
|
||||
\let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
|
||||
\let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
|
||||
\let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
|
||||
\let\tenttsl=\smallerttsl
|
||||
\resetmathfonts \setleading{9.5pt}}
|
||||
\let\smallexamplefonts = \smallerfonts
|
||||
|
||||
% Set up the default fonts, so we can use them for creating boxes.
|
||||
%
|
||||
@@ -1561,6 +1614,10 @@ where each line of input produces a line of output.}
|
||||
\oldpage
|
||||
\endgroup
|
||||
%
|
||||
% Need this before the \...aftertitlepage checks so that if they are
|
||||
% in effect the toc pages will come out with page numbers.
|
||||
\HEADINGSon
|
||||
%
|
||||
% If they want short, they certainly want long too.
|
||||
\ifsetshortcontentsaftertitlepage
|
||||
\shortcontents
|
||||
@@ -1576,8 +1633,6 @@ where each line of input produces a line of output.}
|
||||
\fi
|
||||
%
|
||||
\ifpdf \pdfmakepagedesttrue \fi
|
||||
%
|
||||
\HEADINGSon
|
||||
}
|
||||
|
||||
\def\finishtitlepage{%
|
||||
@@ -2339,13 +2394,15 @@ width0pt\relax} \fi
|
||||
%
|
||||
\def\ignore{\doignore{ignore}}
|
||||
|
||||
% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
|
||||
% Also ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu,
|
||||
% @documentdescription, and @direntry text.
|
||||
%
|
||||
\def\ifinfo{\doignore{ifinfo}}
|
||||
\def\ifhtml{\doignore{ifhtml}}
|
||||
\def\ifnottex{\doignore{ifnottex}}
|
||||
\def\html{\doignore{html}}
|
||||
\def\menu{\doignore{menu}}
|
||||
\def\documentdescription{\doignore{documentdescription}}
|
||||
\def\direntry{\doignore{direntry}}
|
||||
|
||||
% @dircategory CATEGORY -- specify a category of the dir file
|
||||
@@ -2452,10 +2509,14 @@ width0pt\relax} \fi
|
||||
\let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
|
||||
\let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
|
||||
\let\tensf=\nullfont
|
||||
% Similarly for index fonts (mostly for their use in smallexample).
|
||||
% Similarly for index fonts.
|
||||
\let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
|
||||
\let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
|
||||
\let\smallsf=\nullfont
|
||||
% Similarly for smallexample fonts.
|
||||
\let\smallerrm=\nullfont \let\smallerit=\nullfont \let\smallersl=\nullfont
|
||||
\let\smallerbf=\nullfont \let\smallertt=\nullfont \let\smallersc=\nullfont
|
||||
\let\smallersf=\nullfont
|
||||
%
|
||||
% Don't complain when characters are missing from the fonts.
|
||||
\tracinglostchars = 0
|
||||
@@ -2904,16 +2965,17 @@ width0pt\relax} \fi
|
||||
% Now the real index entry with the fonts.
|
||||
\toks0 = {#2}%
|
||||
%
|
||||
% If third (subentry) arg is present, add it to the index
|
||||
% string. And include a space.
|
||||
% If the third (subentry) arg is present, add it to the index
|
||||
% line to write.
|
||||
\ifx\thirdarg\emptymacro \else
|
||||
\toks0 = \expandafter{\the\toks0 \space #3}%
|
||||
\toks0 = \expandafter{\the\toks0{#3}}%
|
||||
\fi
|
||||
%
|
||||
% Set up the complete index entry, with both the sort key
|
||||
% and the original text, including any font commands. We write
|
||||
% three arguments to \entry to the .?? file, texindex reduces to
|
||||
% two when writing the .??s sorted result.
|
||||
% Set up the complete index entry, with both the sort key and
|
||||
% the original text, including any font commands. We write
|
||||
% three arguments to \entry to the .?? file (four in the
|
||||
% subentry case), texindex reduces to two when writing the .??s
|
||||
% sorted result.
|
||||
\edef\temp{%
|
||||
\write\csname#1indfile\endcsname{%
|
||||
\realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
|
||||
@@ -3135,11 +3197,18 @@ width0pt\relax} \fi
|
||||
\def\primary #1{\line{#1\hfil}}
|
||||
|
||||
\newskip\secondaryindent \secondaryindent=0.5cm
|
||||
|
||||
\def\secondary #1#2{
|
||||
{\parfillskip=0in \parskip=0in
|
||||
\hangindent =1in \hangafter=1
|
||||
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
|
||||
\def\secondary#1#2{{%
|
||||
\parfillskip=0in
|
||||
\parskip=0in
|
||||
\hangindent=1in
|
||||
\hangafter=1
|
||||
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
|
||||
\ifpdf
|
||||
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
|
||||
\else
|
||||
#2
|
||||
\fi
|
||||
\par
|
||||
}}
|
||||
|
||||
% Define two-column mode, which we use to typeset indexes.
|
||||
@@ -4134,9 +4203,17 @@ width0pt\relax} \fi
|
||||
% is reset to zero; thus the \afterenvbreak inserts no space -- but the
|
||||
% start of the next paragraph will insert \parskip
|
||||
%
|
||||
\def\aboveenvbreak{{\advance\envskipamount by \parskip
|
||||
\endgraf \ifdim\lastskip<\envskipamount
|
||||
\removelastskip \penalty-50 \vskip\envskipamount \fi}}
|
||||
\def\aboveenvbreak{{%
|
||||
\ifnum\lastpenalty < 10000
|
||||
\advance\envskipamount by \parskip
|
||||
\endgraf
|
||||
\ifdim\lastskip<\envskipamount
|
||||
\removelastskip
|
||||
\penalty-50
|
||||
\vskip\envskipamount
|
||||
\fi
|
||||
\fi
|
||||
}}
|
||||
|
||||
\let\afterenvbreak = \aboveenvbreak
|
||||
|
||||
@@ -4268,7 +4345,7 @@ width0pt\relax} \fi
|
||||
\def\smalllispx{\begingroup
|
||||
\def\Esmalllisp{\nonfillfinish\endgroup}%
|
||||
\def\Esmallexample{\nonfillfinish\endgroup}%
|
||||
\smallfonts
|
||||
\smallexamplefonts
|
||||
\lisp
|
||||
}
|
||||
|
||||
@@ -4279,12 +4356,12 @@ width0pt\relax} \fi
|
||||
\let\Edisplay = \nonfillfinish
|
||||
\gobble
|
||||
}
|
||||
|
||||
%
|
||||
% @smalldisplay (when @smallbook): @display plus smaller fonts.
|
||||
%
|
||||
\def\smalldisplayx{\begingroup
|
||||
\def\Esmalldisplay{\nonfillfinish\endgroup}%
|
||||
\smallfonts \rm
|
||||
\smallexamplefonts \rm
|
||||
\display
|
||||
}
|
||||
|
||||
@@ -4296,12 +4373,12 @@ width0pt\relax} \fi
|
||||
\let\Eformat = \nonfillfinish
|
||||
\gobble
|
||||
}
|
||||
|
||||
%
|
||||
% @smallformat (when @smallbook): @format plus smaller fonts.
|
||||
%
|
||||
\def\smallformatx{\begingroup
|
||||
\def\Esmallformat{\nonfillfinish\endgroup}%
|
||||
\smallfonts \rm
|
||||
\smallexamplefonts \rm
|
||||
\format
|
||||
}
|
||||
|
||||
@@ -5452,13 +5529,15 @@ width0pt\relax} \fi
|
||||
\ifpdf
|
||||
\leavevmode
|
||||
\getfilename{#4}%
|
||||
\ifnum\filenamelength>0
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
goto file{\the\filename.pdf} name{#1@}%
|
||||
\else
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
goto name{#1@}%
|
||||
\fi
|
||||
{\normalturnoffactive
|
||||
\ifnum\filenamelength>0
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
goto file{\the\filename.pdf} name{#1}%
|
||||
\else
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
goto name{#1}%
|
||||
\fi
|
||||
}%
|
||||
\linkcolor
|
||||
\fi
|
||||
%
|
||||
@@ -5738,24 +5817,6 @@ width0pt\relax} \fi
|
||||
|
||||
}%end \catcode `\@=11
|
||||
|
||||
% Set the baselineskip to #1, and the lineskip and strut size
|
||||
% correspondingly. There is no deep meaning behind these magic numbers
|
||||
% used as factors; they just match (closely enough) what Knuth defined.
|
||||
%
|
||||
\def\lineskipfactor{.08333}
|
||||
\def\strutheightpercent{.70833}
|
||||
\def\strutdepthpercent {.29167}
|
||||
%
|
||||
\def\setleading#1{%
|
||||
\normalbaselineskip = #1\relax
|
||||
\normallineskip = \lineskipfactor\normalbaselineskip
|
||||
\normalbaselines
|
||||
\setbox\strutbox =\hbox{%
|
||||
\vrule width0pt height\strutheightpercent\baselineskip
|
||||
depth \strutdepthpercent \baselineskip
|
||||
}%
|
||||
}
|
||||
|
||||
% @| inserts a changebar to the left of the current line. It should
|
||||
% surround any changed text. This approach does *not* work if the
|
||||
% change spans more than two lines of output. To handle that, we would
|
||||
@@ -5827,8 +5888,10 @@ width0pt\relax} \fi
|
||||
% Arguments to @image:
|
||||
% #1 is (mandatory) image filename; we tack on .eps extension.
|
||||
% #2 is (optional) width, #3 is (optional) height.
|
||||
% #4 is just the usual extra ignored arg for parsing this stuff.
|
||||
\def\imagexxx#1,#2,#3,#4\finish{%
|
||||
% #4 is (ignored optional) html alt text.
|
||||
% #5 is (ignored optional) extension.
|
||||
% #6 is just the usual extra ignored arg for parsing this stuff.
|
||||
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{%
|
||||
\ifpdf
|
||||
\centerline{\dopdfimage{#1}{#2}{#3}}%
|
||||
\else
|
||||
@@ -5836,7 +5899,8 @@ width0pt\relax} \fi
|
||||
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
|
||||
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
|
||||
\begingroup
|
||||
\catcode`\^^M = 5 % in case we're inside an example
|
||||
\catcode`\^^M = 5 % in case we're inside an example
|
||||
\normalturnoffactive % allow _ et al. in names
|
||||
% If the image is by itself, center it.
|
||||
\ifvmode
|
||||
\nobreak\bigskip
|
||||
@@ -5922,8 +5986,9 @@ should work if nowhere else does.}
|
||||
}
|
||||
|
||||
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
|
||||
% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can
|
||||
% set \parskip and call \setleading for \baselineskip.
|
||||
% 4) hoffset; 5) binding offset; 6) topskip. We also call
|
||||
% \setleading{\textleading}, so the caller should define \textleading.
|
||||
% The caller should also set \parskip.
|
||||
%
|
||||
\def\internalpagesizes#1#2#3#4#5#6{%
|
||||
\voffset = #3\relax
|
||||
@@ -5944,14 +6009,25 @@ should work if nowhere else does.}
|
||||
\normaloffset = #4\relax
|
||||
\bindingoffset = #5\relax
|
||||
%
|
||||
\setleading{\textleading}
|
||||
%
|
||||
\parindent = \defaultparindent
|
||||
\setemergencystretch
|
||||
}
|
||||
|
||||
% Use `small' versions.
|
||||
%
|
||||
\def\smallenvironments{%
|
||||
\let\smalldisplay = \smalldisplayx
|
||||
\let\smallexample = \smalllispx
|
||||
\let\smallformat = \smallformatx
|
||||
\let\smalllisp = \smalllispx
|
||||
}
|
||||
|
||||
% @letterpaper (the default).
|
||||
\def\letterpaper{{\globaldefs = 1
|
||||
\parskip = 3pt plus 2pt minus 1pt
|
||||
\setleading{13.2pt}%
|
||||
\textleading = 13.2pt
|
||||
%
|
||||
% If page is nothing but text, make it come out even.
|
||||
\internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
|
||||
@@ -5960,7 +6036,7 @@ should work if nowhere else does.}
|
||||
% Use @smallbook to reset parameters for 7x9.5 (or so) format.
|
||||
\def\smallbook{{\globaldefs = 1
|
||||
\parskip = 2pt plus 1pt
|
||||
\setleading{12pt}%
|
||||
\textleading = 12pt
|
||||
%
|
||||
\internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
|
||||
%
|
||||
@@ -5970,17 +6046,13 @@ should work if nowhere else does.}
|
||||
\contentsrightmargin = 0pt
|
||||
\deftypemargin = 0pt
|
||||
\defbodyindent = .5cm
|
||||
%
|
||||
\let\smalldisplay = \smalldisplayx
|
||||
\let\smallexample = \smalllispx
|
||||
\let\smallformat = \smallformatx
|
||||
\let\smalllisp = \smalllispx
|
||||
\smallenvironments
|
||||
}}
|
||||
|
||||
% Use @afourpaper to print on European A4 paper.
|
||||
\def\afourpaper{{\globaldefs = 1
|
||||
\setleading{12pt}%
|
||||
\parskip = 3pt plus 2pt minus 1pt
|
||||
\textleading = 12pt
|
||||
%
|
||||
\internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
|
||||
%
|
||||
@@ -5988,23 +6060,39 @@ should work if nowhere else does.}
|
||||
\hfuzz = 1pt
|
||||
}}
|
||||
|
||||
% Use @afivepaper to print on European A5 paper.
|
||||
% From romildo@urano.iceb.ufop.br, 2 July 2000.
|
||||
% He also recommends making @example and @lisp be small.
|
||||
\def\afivepaper{{\globaldefs = 1
|
||||
\parskip = 2pt plus 1pt minus 0.1pt
|
||||
\textleading = 12.5pt
|
||||
%
|
||||
\internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}%
|
||||
%
|
||||
\lispnarrowing = 0.2in
|
||||
\tolerance = 800
|
||||
\hfuzz = 1.2pt
|
||||
\contentsrightmargin = 0mm
|
||||
\deftypemargin = 0pt
|
||||
\defbodyindent = 2mm
|
||||
\tableindent = 12mm
|
||||
%
|
||||
\smallenvironments
|
||||
}}
|
||||
|
||||
% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
|
||||
% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
|
||||
\def\afourlatex{{\globaldefs = 1
|
||||
\setleading{13.6pt}%
|
||||
\textleading = 13.6pt
|
||||
%
|
||||
\afourpaper
|
||||
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
|
||||
%
|
||||
\globaldefs = 0
|
||||
}}
|
||||
|
||||
% Use @afourwide to print on European A4 paper in wide format.
|
||||
\def\afourwide{%
|
||||
\afourpaper
|
||||
\internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
|
||||
%
|
||||
\globaldefs = 0
|
||||
}
|
||||
|
||||
% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
|
||||
@@ -6018,7 +6106,7 @@ should work if nowhere else does.}
|
||||
\globaldefs = 1
|
||||
%
|
||||
\parskip = 3pt plus 2pt minus 1pt
|
||||
\setleading{13.2pt}%
|
||||
\setleading{\textleading}%
|
||||
%
|
||||
\internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
|
||||
}}
|
||||
|
||||
4415
doc/textutils.texi
4415
doc/textutils.texi
File diff suppressed because it is too large
Load Diff
@@ -11,3 +11,4 @@ safe-lstat.h
|
||||
safe-stat.c
|
||||
safe-stat.h
|
||||
stat.c
|
||||
unlocked-io.h
|
||||
|
||||
710
lib/ChangeLog
710
lib/ChangeLog
@@ -1,7 +1,701 @@
|
||||
2001-02-07 Jim Meyering <meyering@lucent.com>
|
||||
2001-11-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* hash.h (struct hash_table): Don't define here. Merely declare it.
|
||||
* hash.c (struct hash_table): Define it here instead.
|
||||
|
||||
2001-11-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
|
||||
|
||||
2001-11-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* tempname.c (TMP_MAX): Remove; no longer needed.
|
||||
(TEMPORARIES): New macro.
|
||||
(__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
|
||||
removes an artificial limitation (e.g. HP-UX 10.20, where
|
||||
TMP_MAX is 17576).
|
||||
|
||||
2001-11-18 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
|
||||
on SunOS4.
|
||||
|
||||
* Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
|
||||
files will be created before anything else.
|
||||
|
||||
2001-11-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* modechange.c (mode_adjust): Fix error introduced on 1999-04-26
|
||||
that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
|
||||
rather than group writable. Patch by Juan F. Codagnone.
|
||||
|
||||
* readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
|
||||
Instead, include "xalloc.h".
|
||||
|
||||
* mountlist.c: Include unlocked-io.h after all system headers.
|
||||
Remove explicit declarations of xmalloc, xrealloc,
|
||||
and xstrdup. Instead, include "xalloc.h".
|
||||
|
||||
* argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
|
||||
* fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
|
||||
* mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
|
||||
|
||||
* regex.c, sha.c, version-etc.c, yesno.c: Likewise.
|
||||
Reported by Padraig Brady.
|
||||
|
||||
* mkstemp.c: #undef mkstemp.
|
||||
Include config.h.
|
||||
(rpl_mkstemp): Rename from mkstemp.
|
||||
Protoize.
|
||||
|
||||
2001-11-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
|
||||
(physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
|
||||
determine the amount of total physical memory, use pstat_getstatic.
|
||||
HPUX-11 doesn't define _SC_PHYS_PAGES.
|
||||
(physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
|
||||
If sysconf couldn't be used to determine the amount of available
|
||||
physical memory, use both pstat_getstatic and pstat_getdynamic.
|
||||
Based on a patch from Bob Proulx.
|
||||
|
||||
2001-11-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* xstat.in (slash_aware_lstat): Correct a misleading comment.
|
||||
|
||||
2001-11-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
|
||||
in argmatch_to_argument call.
|
||||
|
||||
* dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
|
||||
argument.
|
||||
|
||||
* hash.c (hash_clear): Fix a bug that could lead to an infloop or
|
||||
e.g., a fault due to an attempt to free a NULL pointer.
|
||||
|
||||
2001-11-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* dirfd.c, dirfd.h: New files.
|
||||
* Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
|
||||
|
||||
* hash.c (hash_print) [TESTING]: Clean up.
|
||||
|
||||
2001-10-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
|
||||
to avoid a warning if -Wall.
|
||||
|
||||
2001-10-21 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
|
||||
|
||||
2001-10-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
|
||||
this code would end up calling gettext even in packages built
|
||||
with --disable-nls.
|
||||
* getopt.c (_): Likewise.
|
||||
* regex.c (_): Likewise.
|
||||
|
||||
2001-10-20 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* error.c (strerror_r): Do not declare unless !_LIBC.
|
||||
Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
|
||||
Use strerror_r that is only a macro, even if it is not a function.
|
||||
(strerror): Check for HAVE_DECL_STRERROR before declaring.
|
||||
(private_strerror): Use prototypes, not old-style function definition.
|
||||
(print_errno_message): New function.
|
||||
Support the POSIX 'int'-flavored strerror_r, as well as the traditional
|
||||
char*-flavored one.
|
||||
(error_tail, error, error_at_line): Use it.
|
||||
|
||||
2001-10-11 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
|
||||
and quote_n (1, ... to avoid clobbering a buffer.
|
||||
|
||||
2001-10-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
|
||||
* hash-pjw.c: New file (factored out of fileutils' remove.c).
|
||||
* hash-pjw.h: New file.
|
||||
|
||||
2001-09-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* mountlist.c [MOUNTED_GETFSSTAT]:
|
||||
Include <sys/ucred.h>, for Apple Darwin.
|
||||
Include sys/mount.h and sys/fs_types.h only if available.
|
||||
(FS_TYPE): Define.
|
||||
(read_filesystem_list): Use FS_TYPE.
|
||||
|
||||
2001-09-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* exclude.c (excluded_filename): 0 -> false, since it's
|
||||
a boolean context.
|
||||
|
||||
2001-09-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
|
||||
#defines strtoimax. Also treat the other strto* functions
|
||||
like strtoimax.
|
||||
|
||||
* xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
|
||||
(strtoul): Do not declare if HAVE_DECL_STRTOUL.
|
||||
(strtoimax, strtoumax): Do not declare if already defined as a macro.
|
||||
|
||||
2001-09-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Most macros in unlocked-io.h had the wrong number of arguments.
|
||||
* gen-uio: New script.
|
||||
(USE_UNLOCKED_IO): Define to 1 if not already defined.
|
||||
* unlocked-io.hin: Remove file.
|
||||
* Makefile.am (unlocked-io.h): Rewrite to use a separate script,
|
||||
rather than trying to embed it here.
|
||||
(EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
|
||||
Reported by Padraig Brady.
|
||||
|
||||
2001-09-25 Volker Borchert <bt@teknon.de>
|
||||
|
||||
* gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
|
||||
|
||||
2001-09-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* mountlist.c: Remove useless parentheses in #if directives.
|
||||
(MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
|
||||
the deprecated MOUNTED symbol is no longer defined in mntent.h.
|
||||
|
||||
2001-09-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* localcharset.c: Update from latest gettext.
|
||||
* config.charset: Likewise.
|
||||
|
||||
2001-09-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* xstrtol.c (strtoimax): Guard declaration with
|
||||
`#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
|
||||
The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
|
||||
have their own, conflicting declaration of strtoimax in sys/inttypes.h.
|
||||
(strtoumax): Likewise, for completeness (it wasn't necessary).
|
||||
|
||||
2001-09-06 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* strtoimax.c (HAVE_LONG_LONG):
|
||||
Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
|
||||
(strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
|
||||
to work around bug in IBM C compiler.
|
||||
|
||||
2001-09-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* mkdir.c: New file.
|
||||
|
||||
2001-09-04 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xgetcwd.c: Revert some of the previous change; intead,
|
||||
fix the HAVE_GETCWD_NULL code to behave more like the
|
||||
!HAVE_GETCWD_NULL code used to.
|
||||
|
||||
Include "xalloc.h".
|
||||
(xgetcwd): Do not return NULL when memory is exhausted; instead,
|
||||
invoke xalloc_die.
|
||||
|
||||
2001-09-04 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
|
||||
Use ssize_t, not int, to store result of readlink.
|
||||
Check for ssize_t overflow as well as size_t overflow,
|
||||
as POSIX says the result of readlink is implementation-defined
|
||||
when ssize_t overflows.
|
||||
Remove unnecessary cast to char*.
|
||||
Use free+malloc instead of realloc, as the storage doesn't need
|
||||
to be preserved and it's clearer and can be more efficient that way.
|
||||
(SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
|
||||
* xreadlink.h (xreadlink): Update prototype.
|
||||
|
||||
2001-09-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* exclude.c (fnmatch_no_wildcards): Fix confusion between
|
||||
usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
|
||||
spotted by Jim Meyering.
|
||||
|
||||
2001-09-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* xreadlink.c (xreadlink): Preserve errno around `free' during failure.
|
||||
|
||||
2001-09-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
|
||||
like the HAVE_GETCWD_NULL code.
|
||||
Include pathmax.h if not HAVE_GETCWD.
|
||||
Do not include xalloc.h.
|
||||
(INITIAL_BUFFER_SIZE): New symbol.
|
||||
Do not use xmalloc / xrealloc, since the caller is responsible for
|
||||
handling errors. Preserve errno around `free' during failure.
|
||||
Do not overrun buffer when using getwd.
|
||||
|
||||
2001-09-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
|
||||
__GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
|
||||
|
||||
2001-09-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* error.c: Update from GNU libc.
|
||||
|
||||
2001-09-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* xreadlink.c: New file.
|
||||
* xreadlink.h: New file.
|
||||
* Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
|
||||
|
||||
* regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
|
||||
doesn't conflict with sparc-sun-solaris2.7's definition in
|
||||
/usr/include/sys/int_types.h.
|
||||
|
||||
* exclude.c: Use `""', not `<>' to #include non-system header files.
|
||||
(fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
|
||||
and strncasecmp as r-values. Unixware didn't have declarations.
|
||||
|
||||
2001-08-31 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
|
||||
Use an initial, malloc'd, buffer of length 128 rather than
|
||||
a statically allocated one of length 1024.
|
||||
|
||||
2001-08-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xgetcwd.c: Don't include pathmax.h.
|
||||
Include stdlib.h and unistd.h if available.
|
||||
Include xalloc.h.
|
||||
(xmalloc, xstrdup, free): Remove decls.
|
||||
(xgetcwd): Don't assume sizes fit in unsigned.
|
||||
Check for overflow when computing sizes.
|
||||
Simplify reallocation code.
|
||||
|
||||
2001-08-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
|
||||
|
||||
* strtoimax.c: Renamed from strtoxmax.c, removing the
|
||||
old strtoimax.c.
|
||||
|
||||
Also, make the following further changes to make this file's
|
||||
configuration more similar to that of strtol.c:
|
||||
(UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
|
||||
(strtoumax, uintmax_t, strtoull, strtol): Remove.
|
||||
(intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
|
||||
(strtoimax): Renamed from strtoumax. All uses of unsigned values
|
||||
changed to signed values.
|
||||
|
||||
And make the following changes as well:
|
||||
Fix copyright notice, as 1999 was missing.
|
||||
(verify): New macro.
|
||||
(strtoimax): Check sizes at compile-time, not run-time.
|
||||
Prefer strtol to strtoll if both work.
|
||||
(main): Remove; it was not that useful and was a pain to maintain.
|
||||
|
||||
* strtoumax.c: Include strtoimax.c, not strtouxmax.c.
|
||||
|
||||
2001-08-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* savedir.c (savedir): Remove size parameter, as POSIX says that
|
||||
a directory's st_size can have an arbitrary value, so the old
|
||||
usage could waste an arbitrary amount of memory. All uses
|
||||
changed.
|
||||
* savedir.h: Update prototype.
|
||||
|
||||
2001-08-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xstrtol.c (strtoimax): New decl.
|
||||
|
||||
2001-08-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xstrtol.h: Add copyright notice.
|
||||
(_DECLARE_XSTRTOL): Improve quality of diagnostic for
|
||||
LONGINT_INVALID_SUFFIX_CHAR.
|
||||
|
||||
2001-08-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
|
||||
tm to be declared.
|
||||
|
||||
2001-08-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* hash.c: Remove '2001' from copyright notice.
|
||||
|
||||
2001-08-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* full-write.h: New file.
|
||||
* Makefile.am (libfetish_a_SOURCES): Add full-write.h.
|
||||
* full-write.c: Correct credits, as cccp.c no longer
|
||||
exists and anyway it was so heavily changed from the old cccp
|
||||
code as to be unrecognizable. Include full-write.h.
|
||||
(full_write) Return size_t, with short writes meaning failure.
|
||||
All callers changed. This fixes a bug with large buffers
|
||||
on 64-bit hosts.
|
||||
* utime.c: Include full-write.h.
|
||||
|
||||
2001-08-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Merge 'exclude' changes from tar 1.13.22.
|
||||
This fixes one or two unlikely storage allocation overflow bugs,
|
||||
but doesn't change user-visible behavior otherwise.
|
||||
|
||||
2001-08-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* exclude.c (bool): Declare, perhaps by including stdbool.h.
|
||||
(<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
|
||||
(<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
|
||||
Include if available.
|
||||
(<xalloc.h>): Include
|
||||
(SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
|
||||
(verify): New macro. Use it to verify that EXCLUDE macros do not
|
||||
collide with FNM macros.
|
||||
(struct patopts): New struct.
|
||||
(struct exclude): Use it, as exclude patterns now come with options.
|
||||
(new_exclude): Support above changes.
|
||||
(new_exclude, add_exclude_file):
|
||||
Initial size must now be a power of two to simplify overflow checking.
|
||||
(free_exclude, fnmatch_no_wildcards): New function.
|
||||
(excluded_filename): No longer requires options arg, as the options
|
||||
are determined by add_exclude. Now returns bool, not int.
|
||||
(excluded_filename, add_exclude):
|
||||
Add support for the fancy new exclusion options.
|
||||
(add_exclude, add_exclude_file): Now takes int options arg.
|
||||
Check for arithmetic overflow when computing sizes.
|
||||
(add_exclude_file): xrealloc might modify errno, so don't
|
||||
realloc until after errno might be used.
|
||||
|
||||
* exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
|
||||
New macros.
|
||||
(free_exclude): New decl.
|
||||
(add_exclude, add_exclude_file): Now takes int options arg.
|
||||
(excluded_filename): No longer requires options arg, as the options
|
||||
are determined by add_exclude. Now returns bool, not int.
|
||||
|
||||
2001-08-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* alloca.c (alloca): Arg is of type size_t, not unsigned.
|
||||
|
||||
2001-08-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
|
||||
|
||||
* version-etc.c (N_): Remove definition.
|
||||
Revert most of last change.
|
||||
Instead, simply don't mark the `Copyright...' string for translation.
|
||||
Based on advice from Paul Eggert.
|
||||
|
||||
* strtoxmax.c: Tweak comment.
|
||||
|
||||
2001-08-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* version-etc.c (version_etc_copyright_fmt): Replace literal year
|
||||
of copyright with `%s' so translators don't get an untranslated
|
||||
message in 2002.
|
||||
(COPYRIGHT_YEAR): Define.
|
||||
(version_etc): Use fprintf rather than fputs.
|
||||
Suggestion from Ulrich Drepper.
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
|
||||
|
||||
* strtoll.c: New file, from GNU libc.
|
||||
* xstrtoimax.c: New file.
|
||||
|
||||
* xstrtol.h: Add xstrtoimax.
|
||||
* strtoumax.c: New file. Simply include "strtoumax.c".
|
||||
* strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
|
||||
|
||||
* strtoumax.c: Factor to work both for unsigned and signed types, ...
|
||||
* strtoxmax.c: ... then renamed to this.
|
||||
|
||||
2001-08-13 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
|
||||
Port to Solaris 8, where 'sed' requires a space after the 'r'
|
||||
command, and where sh dislikes "$/". Clean up the spacing a bit.
|
||||
Redirect output to $tmp just once.
|
||||
|
||||
2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
|
||||
|
||||
* addext.c (<errno.h>): Include.
|
||||
(errno): Declare if not defined.
|
||||
(addext): Work correctly when pathconf returns -1 and leaves
|
||||
errno alone because there is no limit. Also, work even if
|
||||
pathconf returns a value greater than SIZE_MAX.
|
||||
|
||||
2001-08-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
|
||||
Simply `return getcwd (NULL, 0);'.
|
||||
[! (defined __GLIBC__ && __GLIBC__ >= 2)]:
|
||||
Use 1300 as initial value for length, not PATH_MAX.
|
||||
|
||||
* pathmax.h: Clean up cpp syntax.
|
||||
|
||||
2001-08-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* gettimeofday.c: New file.
|
||||
* gtod.h: New file.
|
||||
* Makefile.am (libfetish_a_SOURCES): Add gtod.h.
|
||||
|
||||
2001-08-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
|
||||
to get in sync with glibc.
|
||||
|
||||
2001-08-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
The following changes are from gettext 0.10.39 as maintained by
|
||||
Bruno Haible.
|
||||
|
||||
* mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
|
||||
Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
|
||||
with inverted sense. All uses changed.
|
||||
|
||||
* mbswidth.c: Don't include <limits.h>.
|
||||
Include <stdlib.h> and <string.h> unconditionally.
|
||||
(iswcntrl, mbsinit, ISCNTRL): New macros.
|
||||
(mbsnwidth): Use K&R style function declarations.
|
||||
Don't bother checking for MB_LEN_MAX == 1, since the compiler
|
||||
can optimize it when MB_CUR_MAX == 1.
|
||||
The width of control characters is zero, not 1.
|
||||
|
||||
2001-07-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
|
||||
(BUILT_SOURCES): Add unlocked-io.h.
|
||||
(io_functions): Define.
|
||||
(unlocked-io.h): New rule.
|
||||
(DISTCLEANFILES): Add unlocked-io.h.
|
||||
(all-local): Depend on unlocked-io.h, to ensure it is created.
|
||||
|
||||
* unlocked-io.hin: New file
|
||||
|
||||
* regex.c: Update from glibc.
|
||||
|
||||
2001-07-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (noinst_HEADERS): Remove definition, per new automake
|
||||
recommendation.
|
||||
(libfetish_a_SOURCES): Put all .h files here instead.
|
||||
Remove a thus-exposed (better checks in automake) duplicate and
|
||||
two unnecessary .h files.
|
||||
|
||||
2001-06-11 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.c: Update from GNU libc.
|
||||
|
||||
2001-05-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* readutmp.h (UT_TYPE): Define.
|
||||
|
||||
2001-05-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* argmatch.c: Include "quote.h".
|
||||
(argmatch_invalid): Remove explicit `' quotes. Instead, use the
|
||||
quote function. Reported by Göran Uddeborg.
|
||||
|
||||
2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* dirname.c (dir_name): Compute append_dot using path, not newpath
|
||||
which is not yet declared.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES):
|
||||
Add strftime.c, since we now compile it on all hosts.
|
||||
|
||||
* strftime.c (my_strftime):
|
||||
Define to nstrftime if emacs, but only if my_strftime is not defined.
|
||||
(extra_args, extra_args_spec, extra_args_spec_iso): Rename from
|
||||
ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
|
||||
Add one more extra argument: a nanoseconds value.
|
||||
All uses changed.
|
||||
(ns): New macro.
|
||||
(my_strftime function): Add %N format.
|
||||
(emacs_strftimeu): Renamed from emacs_strftime,
|
||||
with extra ut argument.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
dirname code cleanup. base_name now behaves more compatibly
|
||||
with POSIX basename when given file names that have trailing
|
||||
slashes, and similarly for dir_name. Add new primitives
|
||||
base_len and dir_len. Put the directory-name-related decls
|
||||
into dirname.h.
|
||||
|
||||
* addext.c (ISSLASH, base_name): Remove; now in dirname.h.
|
||||
* backupfile.c (base_name): Likewise.
|
||||
* basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
|
||||
* dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
|
||||
* makepath.c (strip_trailing_slashes): Likewise.
|
||||
* path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
|
||||
Likewise.
|
||||
* rename.c (strip_trailing_slashes): Likewise.
|
||||
* same.c (base_name): Likewise.
|
||||
* stripslash.c (ISSLASH): Likewise.
|
||||
|
||||
* addext.c: Include <dirname.h> after size_t is defined.
|
||||
* backupfile.c: Likewise.
|
||||
|
||||
* addext.c (addext): Use base_len to trim redundant
|
||||
trailing slashes instead of doing it ourselves.
|
||||
But do not trim the last slash if it is not redundant.
|
||||
|
||||
* backupfile.c (find_backup_file_name,
|
||||
max_backup_version): Use base_len instead of rolling it ourselves.
|
||||
Handle the case of "" and (on DOS) "C:" correctly.
|
||||
|
||||
* basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
|
||||
Include <string.h>, <dirname.h>.
|
||||
(base_name): Allow file names ending in slashes, other than names
|
||||
that are all slashes. In this case, return the basename followed
|
||||
by the slashes. This is more general, and can be used in places
|
||||
where the original base_name purposely had an assertion failure.
|
||||
(base_len): New function.
|
||||
|
||||
* dirname.c: Include <string.h> instead of <stdlib.h>.
|
||||
Do not include <assert.h>; no longer needed.
|
||||
Include xalloc.h.
|
||||
(memrchr): Remove decl.
|
||||
(dir_name_r): Remove.
|
||||
(dir_len): Renamed from dirlen. All callers changed.
|
||||
Rewrite in terms of base_name, for simplicity and consistency.
|
||||
(dir_name): Never return NULL. All callers changed.
|
||||
Do not include <stdlib.h> in test program; no longer needed.
|
||||
return 0; is fine for test program.
|
||||
|
||||
* dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
|
||||
New macros.
|
||||
(base_name, base_len, dir_len, strip_trailing_slashes): New decls.
|
||||
|
||||
* path-concat.c (path_concat): Use base_len to compute
|
||||
base length, not strlen; this means we cannot rely on memcpy
|
||||
to null-terminate.
|
||||
|
||||
* same.c (STREQ): Remove.
|
||||
(same_name): Handle the case where the basename ends in trailing '/'.
|
||||
|
||||
* stripslash.c (strip_trailing_slashes): Return nonzero if
|
||||
a slash was stripped. Do not strip the last slash after a
|
||||
file system prefix.
|
||||
|
||||
2001-04-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
|
||||
recomputed; that's necessary when the offset spans a DST transition.
|
||||
Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
|
||||
|
||||
2001-04-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.h, regex.c: Update from GNU libc.
|
||||
|
||||
2001-03-19 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* version-etc.c (version_etc_copyright): Update to 2001.
|
||||
|
||||
2001-03-16 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* tempname.c (uint64_t): Define to uintmax_t if
|
||||
not defined, and if UINT64_MAX is not defined.
|
||||
Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
|
||||
Reported by John David Anglin.
|
||||
|
||||
2001-03-10 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
|
||||
alias if codeset is empty.
|
||||
* config.charset (BeOS): Use wildcard syntax.
|
||||
|
||||
2001-03-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
|
||||
Don't insert a backslash when concatenating e.g., `C:' and `foo'.
|
||||
From Bruno Haible.
|
||||
|
||||
2001-03-06 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
|
||||
Don't return NULL.
|
||||
* unicodeio.c (print_unicode_char): Simplify accordingly.
|
||||
|
||||
2001-03-06 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
|
||||
support for DOS/DJGPP.
|
||||
|
||||
2001-02-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES):
|
||||
Add dup-safer.c, fopen-safer.c.
|
||||
(noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
|
||||
|
||||
* dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
|
||||
|
||||
2001-02-25 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
The mkstemp replacement is taken from glibc 2.2.2, with some
|
||||
portability fixes for use outside glibc, as follows:
|
||||
|
||||
* tempname.c (struct_stat64): New macro.
|
||||
(direxists, __gen_tempname): Use it.
|
||||
This avoids a portability problem with Solaris 8.
|
||||
|
||||
* tempname.c (<config.h>): Include if HAVE_CONFIG_H.
|
||||
(<stddef.h>, <stdint.h>, <string.h>):
|
||||
Include only if STDC_HEADERS || _LIBC.
|
||||
(<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
|
||||
(<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
|
||||
(<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
|
||||
(__set_errno): Define this macro if <errno.h> doesn't.
|
||||
(P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
|
||||
Define these macros if <stdio.h> doesn't.
|
||||
(S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
|
||||
Define these macros if <sys/stat.h>
|
||||
doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
|
||||
(stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
|
||||
__xstat64): Define if not _LIBC.
|
||||
(__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
|
||||
(__gen_tempname): Invoke gettimeofday only if
|
||||
HAVE_GETTIMEOFDAY || _LIBC;
|
||||
otherwise, fall back on plain "time".
|
||||
Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
|
||||
|
||||
* mkstemp.c (__GT_FILE): Define to zero if not defined.
|
||||
|
||||
* mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
|
||||
|
||||
2001-02-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* strtoul.c: Sync from GNU libc. Use double quotes, not <...>
|
||||
around included file name.
|
||||
|
||||
* strnlen.c (__strnlen): Merge in a change from GNU libc.
|
||||
|
||||
* strftime.c: Update from GNU libc (the only changes were to comments).
|
||||
|
||||
2001-02-13 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
|
||||
|
||||
2001-02-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* mbswidth.c, quotearg.c (mbrtowc, mbsinit):
|
||||
Remove workaround macros for hosts that have mbrtowc but not
|
||||
mbstate_t, as we now insist on proper declarations for both
|
||||
before using mbrtowc.
|
||||
|
||||
2001-02-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.c: Update from libc.
|
||||
|
||||
2001-02-16 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* alloca.c (malloc): Undef before defining, since stdlib.h
|
||||
may have defined it. Needed for Encore Umax-3.0.9.16b systems.
|
||||
Reported by Mark Hounschell via Paul Eggert.
|
||||
|
||||
2001-01-30 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Update for FreeBSD 4.2.
|
||||
@@ -35,7 +729,7 @@
|
||||
|
||||
2001-01-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/strftime.c: Sync with glibc time/strftime.c 1.81.
|
||||
* strftime.c: Sync with glibc time/strftime.c 1.81.
|
||||
|
||||
2001-01-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
@@ -44,7 +738,7 @@
|
||||
|
||||
2000-12-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/modechange.c: Do not assume that mode_t uses the
|
||||
* modechange.c: Do not assume that mode_t uses the
|
||||
traditional octal encoding. E.g. "chmod 1 FOO" should set
|
||||
the other-execute bit of FOO even if S_IXOTH != 1.
|
||||
|
||||
@@ -144,11 +838,11 @@
|
||||
|
||||
2000-12-01 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/memrchr.c: Include <config.h> before any system include file.
|
||||
* memrchr.c: Include <config.h> before any system include file.
|
||||
|
||||
2000-11-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
|
||||
* dirname.c (dir_name_r): Fix typo: int -> size_t.
|
||||
|
||||
2000-11-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
@@ -156,12 +850,12 @@
|
||||
|
||||
2000-11-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/strftime.c (my_strftime): Do not invoke mbrlen with a
|
||||
* strftime.c (my_strftime): Do not invoke mbrlen with a
|
||||
size of (size_t) -1; it's not portable.
|
||||
|
||||
2000-11-17 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* lib/obstack.h: Formatting changes.
|
||||
* obstack.h: Formatting changes.
|
||||
(obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
|
||||
prevent type checking.
|
||||
(obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
|
||||
@@ -541,7 +1235,7 @@
|
||||
|
||||
* quotearg.h (enum quoting style): New enum clocale_quoting_style.
|
||||
|
||||
* quotearg.c: (quoting_style_args, quoting_style_vals,
|
||||
* quotearg.c (quoting_style_args, quoting_style_vals,
|
||||
quotearg_buffer_restyled): Add support for
|
||||
clocale_quoting_style. Undo previous change to
|
||||
locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
|
||||
|
||||
124
lib/Makefile.am
124
lib/Makefile.am
@@ -7,38 +7,100 @@ noinst_LIBRARIES = libfetish.a
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
|
||||
## Put relatively complex files at the beginning of the list so
|
||||
## that parallel compiles finish a tiny bit sooner. I don't see
|
||||
## a way to make regex.c appear earlier in the list, since it's
|
||||
## added by automake, but on systems with an up to date GNU libc,
|
||||
## regex.c isn't even compiled.
|
||||
libfetish_a_SOURCES = \
|
||||
getdate.y posixtm.c addext.c argmatch.c backupfile.c basename.c \
|
||||
canon-host.c closeout.c diacrit.c dirname.c exclude.c filemode.c \
|
||||
full-write.c getopt.c getopt1.c getstr.c getugroups.c hard-locale.c hash.c \
|
||||
human.c idcache.c isdir.c linebuffer.c localcharset.c long-options.c \
|
||||
makepath.c mbswidth.c md5.c memcasecmp.c memcoll.c modechange.c \
|
||||
path-concat.c physmem.c \
|
||||
quote.c quotearg.c readtokens.c safe-read.c same.c save-cwd.c \
|
||||
savedir.c sha.c stripslash.c unicodeio.c userspec.c version-etc.c xgetcwd.c \
|
||||
xgethostname.c xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c \
|
||||
xstrtoumax.c yesno.c
|
||||
getdate.h getdate.y \
|
||||
posixtm.c posixtm.h \
|
||||
strftime.c \
|
||||
getopt.c getopt.h getopt1.c \
|
||||
hash.c hash.h \
|
||||
hash-pjw.c hash-pjw.h \
|
||||
__fpending.h \
|
||||
addext.c \
|
||||
argmatch.c argmatch.h \
|
||||
backupfile.c backupfile.h \
|
||||
basename.c \
|
||||
bumpalloc.h \
|
||||
canon-host.c \
|
||||
closeout.c closeout.h \
|
||||
diacrit.c diacrit.h \
|
||||
dirname.c dirname.h \
|
||||
dirfd.h \
|
||||
dup-safer.c \
|
||||
exclude.c exclude.h \
|
||||
filemode.c filemode.h \
|
||||
fnmatch.h \
|
||||
fopen-safer.c \
|
||||
fsusage.h \
|
||||
full-write.c full-write.h \
|
||||
getline.h \
|
||||
getpagesize.h \
|
||||
getstr.c getstr.h \
|
||||
getugroups.c \
|
||||
group-member.h \
|
||||
gtod.h \
|
||||
hard-locale.c hard-locale.h \
|
||||
human.c human.h \
|
||||
idcache.c \
|
||||
isdir.c \
|
||||
lchown.h \
|
||||
linebuffer.c linebuffer.h \
|
||||
localcharset.c \
|
||||
long-options.c long-options.h \
|
||||
makepath.c makepath.h \
|
||||
mbswidth.c mbswidth.h \
|
||||
md5.c md5.h \
|
||||
memcasecmp.c memcasecmp.h \
|
||||
memcoll.c memcoll.h \
|
||||
modechange.c modechange.h \
|
||||
mountlist.h \
|
||||
nanosleep.h \
|
||||
path-concat.c path-concat.h \
|
||||
pathmax.h \
|
||||
physmem.c physmem.h \
|
||||
quote.c quote.h \
|
||||
quotearg.c quotearg.h \
|
||||
readtokens.c readtokens.h \
|
||||
readutmp.h \
|
||||
regex.h \
|
||||
safe-read.c safe-read.h \
|
||||
same.c same.h \
|
||||
save-cwd.c save-cwd.h \
|
||||
savedir.c savedir.h \
|
||||
sha.c sha.h \
|
||||
stdio-safer.h \
|
||||
stripslash.c \
|
||||
strverscmp.h \
|
||||
unicodeio.c unicodeio.h \
|
||||
unistd-safer.h \
|
||||
userspec.c \
|
||||
version-etc.c version-etc.h \
|
||||
xalloc.h \
|
||||
xgetcwd.c \
|
||||
xgethostname.c \
|
||||
xmalloc.c \
|
||||
xreadlink.c xreadlink.h \
|
||||
xstrdup.c \
|
||||
xstrtod.c xstrtod.h \
|
||||
xstrtol.c xstrtol.h \
|
||||
xstrtoul.c \
|
||||
xstrtoimax.c \
|
||||
xstrtoumax.c \
|
||||
yesno.c
|
||||
|
||||
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = \
|
||||
argmatch.h backupfile.h bumpalloc.h closeout.h diacrit.h dirname.h error.h \
|
||||
exclude.h filemode.h fnmatch.h __fpending.h fsusage.h \
|
||||
getdate.h getline.h getopt.h \
|
||||
getstr.h getpagesize.h group-member.h hard-locale.h hash.h human.h lchown.h \
|
||||
linebuffer.h long-options.h mbswidth.h md5.h memcasecmp.h memcoll.h \
|
||||
makepath.h mbswidth.h modechange.h mountlist.h nanosleep.h obstack.h \
|
||||
path-concat.h pathmax.h physmem.h posixtm.h \
|
||||
quote.h quotearg.h readtokens.h \
|
||||
readutmp.h regex.h safe-read.h same.h save-cwd.h savedir.h sha.h \
|
||||
strverscmp.h unicodeio.h version-etc.h xalloc.h xstrtod.h xstrtol.h
|
||||
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c unlocked-io.h
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = lstat.c stat.c
|
||||
DISTCLEANFILES = lstat.c stat.c unlocked-io.h
|
||||
|
||||
EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin
|
||||
EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin gen-uio
|
||||
lstat.c: xstat.in
|
||||
sed \
|
||||
-e '/@IGNORE@/d' \
|
||||
@@ -57,6 +119,7 @@ stat.c: xstat.in
|
||||
$(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
Makefile: $(BUILT_SOURCES)
|
||||
|
||||
# The following is needed in order to install a simple file in $(libdir)
|
||||
# which is shared with other installed packages. We use a list of referencing
|
||||
@@ -65,7 +128,7 @@ stat.c: xstat.in
|
||||
# On systems with glibc-2.1 or newer, the file is redundant, therefore we
|
||||
# avoid installing it.
|
||||
|
||||
all-local: charset.alias ref-add.sed ref-del.sed lstat.c stat.c
|
||||
all-local: charset.alias ref-add.sed ref-del.sed lstat.c stat.c unlocked-io.h
|
||||
|
||||
charset_alias = $(DESTDIR)$(libdir)/charset.alias
|
||||
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
|
||||
@@ -105,3 +168,14 @@ SUFFIXES = .sed .sin
|
||||
mv $@-t $@
|
||||
|
||||
CLEANFILES = charset.alias ref-add.sed ref-del.sed
|
||||
|
||||
###############################################
|
||||
|
||||
# FIXME: CAUTION this list is a duplicate of one in ../Makefile.cfg.
|
||||
io_functions = \
|
||||
clearerr feof ferror fflush fgets fputc fputs \
|
||||
fread fwrite getc getchar putc putchar
|
||||
|
||||
unlocked-io.h: $(srcdir)/gen-uio Makefile.am
|
||||
srcdir=$(srcdir) $(SHELL) $(srcdir)/gen-uio $(io_functions) > $@t
|
||||
mv $@t $@
|
||||
|
||||
1124
lib/Makefile.in
1124
lib/Makefile.in
File diff suppressed because it is too large
Load Diff
45
lib/addext.c
45
lib/addext.c
@@ -1,5 +1,5 @@
|
||||
/* addext.c -- add an extension to a file name
|
||||
Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright 1990, 1997, 1998, 1999, 2001 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
|
||||
@@ -29,8 +29,6 @@
|
||||
# define HAVE_LONG_FILE_NAMES 0
|
||||
#endif
|
||||
|
||||
#include <backupfile.h>
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
@@ -49,7 +47,13 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *));
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#include "backupfile.h"
|
||||
#include "dirname.h"
|
||||
|
||||
/* Append to FILENAME the extension EXT, unless the result would be too long,
|
||||
in which case just append the character E. */
|
||||
@@ -58,25 +62,30 @@ void
|
||||
addext (char *filename, char const *ext, int e)
|
||||
{
|
||||
char *s = base_name (filename);
|
||||
size_t slen = strlen (s), extlen = strlen (ext);
|
||||
long slen_max = -1;
|
||||
size_t slen = base_len (s);
|
||||
size_t extlen = strlen (ext);
|
||||
size_t slen_max = HAVE_LONG_FILE_NAMES ? 255 : _POSIX_NAME_MAX;
|
||||
|
||||
#if HAVE_PATHCONF && defined _PC_NAME_MAX
|
||||
if (slen + extlen <= _POSIX_NAME_MAX && ! HAVE_DOS_FILE_NAMES)
|
||||
/* The file name is so short there's no need to call pathconf. */
|
||||
slen_max = _POSIX_NAME_MAX;
|
||||
else if (s == filename)
|
||||
slen_max = pathconf (".", _PC_NAME_MAX);
|
||||
else
|
||||
if (_POSIX_NAME_MAX < slen + extlen || HAVE_DOS_FILE_NAMES)
|
||||
{
|
||||
char c = *s;
|
||||
*s = 0;
|
||||
slen_max = pathconf (filename, _PC_NAME_MAX);
|
||||
*s = c;
|
||||
/* The new base name is long enough to require a pathconf check. */
|
||||
long name_max;
|
||||
errno = 0;
|
||||
if (s == filename)
|
||||
name_max = pathconf (".", _PC_NAME_MAX);
|
||||
else
|
||||
{
|
||||
char c = *s;
|
||||
if (! ISSLASH (c))
|
||||
*s = 0;
|
||||
name_max = pathconf (filename, _PC_NAME_MAX);
|
||||
*s = c;
|
||||
}
|
||||
if (0 <= name_max || errno == 0)
|
||||
slen_max = name_max == (size_t) name_max ? name_max : -1;
|
||||
}
|
||||
#endif
|
||||
if (slen_max < 0)
|
||||
slen_max = HAVE_LONG_FILE_NAMES ? 255 : 14;
|
||||
|
||||
if (HAVE_DOS_FILE_NAMES && slen_max <= 12)
|
||||
{
|
||||
|
||||
@@ -88,6 +88,7 @@ typedef char *pointer;
|
||||
Callers below should use malloc. */
|
||||
|
||||
# ifndef emacs
|
||||
# undef malloc
|
||||
# define malloc xmalloc
|
||||
# endif
|
||||
extern pointer malloc ();
|
||||
@@ -168,7 +169,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
|
||||
implementations of C, for example under Gould's UTX/32. */
|
||||
|
||||
pointer
|
||||
alloca (unsigned size)
|
||||
alloca (size_t size)
|
||||
{
|
||||
auto char probe; /* Probes stack depth: */
|
||||
register char *depth = ADDRESS_FUNCTION (probe);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* argmatch.c -- find a match for a string in an array
|
||||
Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1998, 1999, 2001 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
|
||||
@@ -38,6 +38,8 @@
|
||||
|
||||
#include "error.h"
|
||||
#include "quotearg.h"
|
||||
#include "quote.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
/* When reporting an invalid argument, show nonprinting characters
|
||||
by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
|
||||
@@ -156,10 +158,11 @@ void
|
||||
argmatch_invalid (const char *context, const char *value, int problem)
|
||||
{
|
||||
char const *format = (problem == -1
|
||||
? _("invalid argument %s for `%s'")
|
||||
: _("ambiguous argument %s for `%s'"));
|
||||
? _("invalid argument %s for %s")
|
||||
: _("ambiguous argument %s for %s"));
|
||||
|
||||
error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);
|
||||
error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value),
|
||||
quote_n (1, context));
|
||||
}
|
||||
|
||||
/* List the valid arguments for argmatch.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* argmatch.h -- definitions and prototypes for argmatch.c
|
||||
Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1998, 1999, 2001 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
|
||||
@@ -123,7 +123,7 @@ const char *argmatch_to_argument
|
||||
const char *vallist, size_t valsize));
|
||||
|
||||
# define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist) \
|
||||
argmatch_to_argument ((char const *) &(Value), (Arglist), \
|
||||
argmatch_to_argument ((Value), (Arglist), \
|
||||
(const char *) (Vallist), sizeof (*(Vallist)))
|
||||
|
||||
#endif /* ARGMATCH_H_ */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* backupfile.c -- make Emacs style backup file names
|
||||
Copyright (C) 1990-1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright 1990,91,92,93,94,95,96,97,98,99,2000, 2001 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
|
||||
@@ -23,9 +24,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <argmatch.h>
|
||||
#include <backupfile.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#if HAVE_STRING_H
|
||||
@@ -76,8 +74,6 @@ char *getenv ();
|
||||
char *malloc ();
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *));
|
||||
|
||||
#if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
|
||||
# define HAVE_DIR 1
|
||||
#else
|
||||
@@ -111,6 +107,10 @@ char *base_name PARAMS ((char const *));
|
||||
# define REAL_DIR_ENTRY(dp) 1
|
||||
#endif
|
||||
|
||||
#include "argmatch.h"
|
||||
#include "backupfile.h"
|
||||
#include "dirname.h"
|
||||
|
||||
/* The extension added to file names to produce a simple (as opposed
|
||||
to numbered) backup file name. */
|
||||
const char *simple_backup_suffix = "~";
|
||||
@@ -137,29 +137,31 @@ find_backup_file_name (const char *file, enum backup_type backup_type)
|
||||
if (HAVE_DIR && backup_suffix_size_max < numbered_suffix_size_max)
|
||||
backup_suffix_size_max = numbered_suffix_size_max;
|
||||
|
||||
s = malloc (file_len + backup_suffix_size_max + numbered_suffix_size_max);
|
||||
s = malloc (file_len + 1
|
||||
+ backup_suffix_size_max + numbered_suffix_size_max);
|
||||
if (s)
|
||||
{
|
||||
strcpy (s, file);
|
||||
|
||||
#if HAVE_DIR
|
||||
if (backup_type != simple)
|
||||
{
|
||||
int highest_backup;
|
||||
size_t dir_len = base_name (s) - s;
|
||||
size_t dirlen = dir_len (file);
|
||||
|
||||
strcpy (s + dir_len, ".");
|
||||
highest_backup = max_backup_version (file + dir_len, s);
|
||||
memcpy (s, file, dirlen);
|
||||
if (dirlen == FILESYSTEM_PREFIX_LEN (file))
|
||||
s[dirlen++] = '.';
|
||||
s[dirlen] = '\0';
|
||||
highest_backup = max_backup_version (base_name (file), s);
|
||||
if (! (backup_type == numbered_existing && highest_backup == 0))
|
||||
{
|
||||
char *numbered_suffix = s + (file_len + backup_suffix_size_max);
|
||||
sprintf (numbered_suffix, ".~%d~", highest_backup + 1);
|
||||
suffix = numbered_suffix;
|
||||
}
|
||||
strcpy (s, file);
|
||||
}
|
||||
#endif /* HAVE_DIR */
|
||||
|
||||
strcpy (s, file);
|
||||
addext (s, suffix, '~');
|
||||
}
|
||||
return s;
|
||||
@@ -186,7 +188,7 @@ max_backup_version (const char *file, const char *dir)
|
||||
return 0;
|
||||
|
||||
highest_version = 0;
|
||||
file_name_length = strlen (file);
|
||||
file_name_length = base_len (file);
|
||||
|
||||
while ((dp = readdir (dirp)) != 0)
|
||||
{
|
||||
|
||||
@@ -19,53 +19,61 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef FILESYSTEM_PREFIX_LEN
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *name));
|
||||
#include "dirname.h"
|
||||
|
||||
/* In general, we can't use the builtin `basename' function if available,
|
||||
since it has different meanings in different environments.
|
||||
In some environments the builtin `basename' modifies its argument.
|
||||
If NAME is all slashes, be sure to return `/'. */
|
||||
|
||||
Return the address of the last file name component of NAME. If
|
||||
NAME has no file name components because it is all slashes, return
|
||||
NAME if it is empty, the address of its last slash otherwise. */
|
||||
|
||||
char *
|
||||
base_name (char const *name)
|
||||
{
|
||||
char const *base = name += FILESYSTEM_PREFIX_LEN (name);
|
||||
int all_slashes = 1;
|
||||
char const *base = name + FILESYSTEM_PREFIX_LEN (name);
|
||||
char const *p;
|
||||
|
||||
for (p = name; *p; p++)
|
||||
for (p = base; *p; p++)
|
||||
{
|
||||
if (ISSLASH (*p))
|
||||
base = p + 1;
|
||||
else
|
||||
all_slashes = 0;
|
||||
{
|
||||
/* Treat multiple adjacent slashes like a single slash. */
|
||||
do p++;
|
||||
while (ISSLASH (*p));
|
||||
|
||||
/* If the file name ends in slash, use the trailing slash as
|
||||
the basename if no non-slashes have been found. */
|
||||
if (! *p)
|
||||
{
|
||||
if (ISSLASH (*base))
|
||||
base = p - 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* *P is a non-slash preceded by a slash. */
|
||||
base = p;
|
||||
}
|
||||
}
|
||||
|
||||
/* If NAME is all slashes, arrange to return `/'. */
|
||||
if (*base == '\0' && ISSLASH (*name) && all_slashes)
|
||||
--base;
|
||||
|
||||
/* Make sure the last byte is not a slash. */
|
||||
assert (all_slashes || !ISSLASH (*(p - 1)));
|
||||
|
||||
return (char *) base;
|
||||
}
|
||||
|
||||
/* Return the length of of the basename NAME. Typically NAME is the
|
||||
value returned by base_name. Act like strlen (NAME), except omit
|
||||
redundant trailing slashes. */
|
||||
|
||||
size_t
|
||||
base_len (char const *name)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
|
||||
continue;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* closeout.c - close standard output
|
||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000, 2001 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
|
||||
@@ -43,6 +43,7 @@ extern int errno;
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "quotearg.h"
|
||||
#include "unlocked-io.h"
|
||||
#include "__fpending.h"
|
||||
|
||||
static int default_exit_status = EXIT_FAILURE;
|
||||
|
||||
@@ -33,27 +33,37 @@
|
||||
# name used by which systems a MIME name?
|
||||
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
|
||||
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
|
||||
# ISO-8859-2 glibc aix hpux irix solaris freebsd yes
|
||||
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
|
||||
# ISO-8859-3 glibc yes
|
||||
# ISO-8859-4 solaris yes
|
||||
# ISO-8859-5 glibc aix hpux irix solaris yes
|
||||
# ISO-8859-4 osf solaris freebsd yes
|
||||
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
|
||||
# ISO-8859-6 glibc aix hpux solaris yes
|
||||
# ISO-8859-7 glibc aix hpux irix osf solaris yes
|
||||
# ISO-8859-8 glibc aix hpux solaris yes
|
||||
# ISO-8859-8 glibc aix hpux osf solaris yes
|
||||
# ISO-8859-9 glibc aix hpux irix osf solaris yes
|
||||
# ISO-8859-13 glibc
|
||||
# ISO-8859-15 glibc aix solaris freebsd
|
||||
# ISO-8859-15 glibc aix osf solaris freebsd
|
||||
# KOI8-R glibc solaris freebsd yes
|
||||
# KOI8-U glibc yes
|
||||
# CP850 aix osf
|
||||
# KOI8-U glibc freebsd yes
|
||||
# CP437 dos
|
||||
# CP775 dos
|
||||
# CP850 aix osf dos
|
||||
# CP852 dos
|
||||
# CP855 dos
|
||||
# CP856 aix
|
||||
# CP866 freebsd
|
||||
# CP874 win32
|
||||
# CP857 dos
|
||||
# CP861 dos
|
||||
# CP862 dos
|
||||
# CP864 dos
|
||||
# CP865 dos
|
||||
# CP866 freebsd dos
|
||||
# CP869 dos
|
||||
# CP874 win32 dos
|
||||
# CP922 aix
|
||||
# CP932 aix win32
|
||||
# CP932 aix win32 dos
|
||||
# CP943 aix
|
||||
# CP949 win32
|
||||
# CP950 win32
|
||||
# CP949 osf win32 dos
|
||||
# CP950 win32 dos
|
||||
# CP1046 aix
|
||||
# CP1124 aix
|
||||
# CP1129 aix
|
||||
@@ -65,17 +75,17 @@
|
||||
# CP1255 win32
|
||||
# CP1256 win32
|
||||
# CP1257 win32
|
||||
# GB2312 glibc aix hpux irix solaris yes
|
||||
# EUC-JP glibc aix hpux irix solaris yes
|
||||
# EUC-KR glibc aix hpux irix solaris yes
|
||||
# EUC-TW glibc aix hpux irix solaris
|
||||
# BIG5 glibc aix hpux solaris yes
|
||||
# BIG5HKSCS glibc
|
||||
# GBK aix win32
|
||||
# GB2312 glibc aix hpux irix solaris freebsd yes
|
||||
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
|
||||
# EUC-KR glibc aix hpux irix osf solaris freebsd yes
|
||||
# EUC-TW glibc aix hpux irix osf solaris
|
||||
# BIG5 glibc aix hpux osf solaris freebsd yes
|
||||
# BIG5-HKSCS glibc
|
||||
# GBK aix osf win32 dos
|
||||
# GB18030 glibc
|
||||
# SJIS hpux solaris
|
||||
# SHIFT_JIS hpux osf solaris freebsd yes
|
||||
# JOHAB glibc win32
|
||||
# TIS-620 glibc aix hpux solaris
|
||||
# TIS-620 glibc aix hpux osf solaris
|
||||
# VISCII glibc yes
|
||||
# HP-ROMAN8 hpux
|
||||
# HP-ARABIC8 hpux
|
||||
@@ -83,7 +93,9 @@
|
||||
# HP-HEBREW8 hpux
|
||||
# HP-TURKISH8 hpux
|
||||
# HP-KANA8 hpux
|
||||
# UTF-8 glibc aix hpux solaris yes
|
||||
# DEC-KANJI osf
|
||||
# DEC-HANYU osf
|
||||
# UTF-8 glibc aix hpux osf solaris yes
|
||||
#
|
||||
# Note: Names which are not marked as being a MIME name should not be used in
|
||||
# Internet protocols for information interchange (mail, news, etc.).
|
||||
@@ -162,7 +174,7 @@ case "$os" in
|
||||
echo "eucTW EUC-TW"
|
||||
echo "hp15CN GB2312"
|
||||
#echo "ccdc ?" # what is this?
|
||||
echo "SJIS SJIS"
|
||||
echo "SJIS SHIFT_JIS"
|
||||
echo "utf8 UTF-8"
|
||||
;;
|
||||
irix*)
|
||||
@@ -178,9 +190,28 @@ case "$os" in
|
||||
;;
|
||||
osf*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-4 ISO-8859-4"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "cp850 CP850"
|
||||
echo "big5 BIG5"
|
||||
echo "dechanyu DEC-HANYU"
|
||||
echo "dechanzi GB2312"
|
||||
echo "deckanji DEC-KANJI"
|
||||
echo "deckorean EUC-KR"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
echo "GBK GBK"
|
||||
echo "KSC5601 CP949"
|
||||
echo "sdeckanji EUC-JP"
|
||||
echo "SJIS SHIFT_JIS"
|
||||
echo "TACTIS TIS-620"
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
solaris*)
|
||||
echo "646 ASCII"
|
||||
@@ -199,7 +230,7 @@ case "$os" in
|
||||
echo "cns11643 EUC-TW"
|
||||
echo "5601 EUC-KR"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "PCK SJIS"
|
||||
echo "PCK SHIFT_JIS"
|
||||
echo "TIS620.2533 TIS-620"
|
||||
#echo "sun_eu_greek ?" # what is this?
|
||||
echo "UTF-8 UTF-8"
|
||||
@@ -214,8 +245,8 @@ case "$os" in
|
||||
echo "$l.ASCII ASCII"
|
||||
done
|
||||
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
|
||||
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
|
||||
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
|
||||
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
|
||||
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
|
||||
echo "$l.ISO_8859-1 ISO-8859-1"
|
||||
echo "$l.DIS_8859-15 ISO-8859-15"
|
||||
done
|
||||
@@ -235,12 +266,173 @@ case "$os" in
|
||||
echo "zh_TW.Big5 BIG5"
|
||||
echo "zh_CN.EUC GB2312"
|
||||
echo "ja_JP.EUC EUC-JP"
|
||||
echo "ja_JP.SJIS SJIS"
|
||||
echo "ja_JP.Shift_JIS SJIS"
|
||||
echo "ja_JP.SJIS SHIFT_JIS"
|
||||
echo "ja_JP.Shift_JIS SHIFT_JIS"
|
||||
echo "ko_KR.EUC EUC-KR"
|
||||
;;
|
||||
beos*)
|
||||
# BeOS has a single locale, and it has UTF-8 encoding.
|
||||
echo "C UTF-8"
|
||||
echo "* UTF-8"
|
||||
;;
|
||||
msdosdjgpp*)
|
||||
# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
echo "#"
|
||||
echo "# The encodings given here may not all be correct."
|
||||
echo "# If you find that the encoding given for your language and"
|
||||
echo "# country is not the one your DOS machine actually uses, just"
|
||||
echo "# correct it in this file, and send a mail to"
|
||||
echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
|
||||
echo "# and Bruno Haible <haible@clisp.cons.org>."
|
||||
echo "#"
|
||||
echo "C ASCII"
|
||||
# ISO-8859-1 languages
|
||||
echo "ca CP850"
|
||||
echo "ca_ES CP850"
|
||||
echo "da CP865" # not CP850 ??
|
||||
echo "da_DK CP865" # not CP850 ??
|
||||
echo "de CP850"
|
||||
echo "de_AT CP850"
|
||||
echo "de_CH CP850"
|
||||
echo "de_DE CP850"
|
||||
echo "en CP850"
|
||||
echo "en_AU CP850" # not CP437 ??
|
||||
echo "en_CA CP850"
|
||||
echo "en_GB CP850"
|
||||
echo "en_NZ CP437"
|
||||
echo "en_US CP437"
|
||||
echo "en_ZA CP850" # not CP437 ??
|
||||
echo "es CP850"
|
||||
echo "es_AR CP850"
|
||||
echo "es_BO CP850"
|
||||
echo "es_CL CP850"
|
||||
echo "es_CO CP850"
|
||||
echo "es_CR CP850"
|
||||
echo "es_CU CP850"
|
||||
echo "es_DO CP850"
|
||||
echo "es_EC CP850"
|
||||
echo "es_ES CP850"
|
||||
echo "es_GT CP850"
|
||||
echo "es_HN CP850"
|
||||
echo "es_MX CP850"
|
||||
echo "es_NI CP850"
|
||||
echo "es_PA CP850"
|
||||
echo "es_PY CP850"
|
||||
echo "es_PE CP850"
|
||||
echo "es_SV CP850"
|
||||
echo "es_UY CP850"
|
||||
echo "es_VE CP850"
|
||||
echo "et CP850"
|
||||
echo "et_EE CP850"
|
||||
echo "eu CP850"
|
||||
echo "eu_ES CP850"
|
||||
echo "fi CP850"
|
||||
echo "fi_FI CP850"
|
||||
echo "fr CP850"
|
||||
echo "fr_BE CP850"
|
||||
echo "fr_CA CP850"
|
||||
echo "fr_CH CP850"
|
||||
echo "fr_FR CP850"
|
||||
echo "ga CP850"
|
||||
echo "ga_IE CP850"
|
||||
echo "gd CP850"
|
||||
echo "gd_GB CP850"
|
||||
echo "gl CP850"
|
||||
echo "gl_ES CP850"
|
||||
echo "id CP850" # not CP437 ??
|
||||
echo "id_ID CP850" # not CP437 ??
|
||||
echo "is CP861" # not CP850 ??
|
||||
echo "is_IS CP861" # not CP850 ??
|
||||
echo "it CP850"
|
||||
echo "it_CH CP850"
|
||||
echo "it_IT CP850"
|
||||
echo "lt CP775"
|
||||
echo "lt_LT CP775"
|
||||
echo "lv CP775"
|
||||
echo "lv_LV CP775"
|
||||
echo "nb CP865" # not CP850 ??
|
||||
echo "nb_NO CP865" # not CP850 ??
|
||||
echo "nl CP850"
|
||||
echo "nl_BE CP850"
|
||||
echo "nl_NL CP850"
|
||||
echo "nn CP865" # not CP850 ??
|
||||
echo "nn_NO CP865" # not CP850 ??
|
||||
echo "no CP865" # not CP850 ??
|
||||
echo "no_NO CP865" # not CP850 ??
|
||||
echo "pt CP850"
|
||||
echo "pt_BR CP850"
|
||||
echo "pt_PT CP850"
|
||||
echo "sv CP850"
|
||||
echo "sv_SE CP850"
|
||||
# ISO-8859-2 languages
|
||||
echo "cs CP852"
|
||||
echo "cs_CZ CP852"
|
||||
echo "hr CP852"
|
||||
echo "hr_HR CP852"
|
||||
echo "hu CP852"
|
||||
echo "hu_HU CP852"
|
||||
echo "pl CP852"
|
||||
echo "pl_PL CP852"
|
||||
echo "ro CP852"
|
||||
echo "ro_RO CP852"
|
||||
echo "sk CP852"
|
||||
echo "sk_SK CP852"
|
||||
echo "sl CP852"
|
||||
echo "sl_SI CP852"
|
||||
echo "sq CP852"
|
||||
echo "sq_AL CP852"
|
||||
echo "sr CP852" # CP852 or CP866 or CP855 ??
|
||||
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
|
||||
# ISO-8859-3 languages
|
||||
echo "mt CP850"
|
||||
echo "mt_MT CP850"
|
||||
# ISO-8859-5 languages
|
||||
echo "be CP866"
|
||||
echo "be_BE CP866"
|
||||
echo "bg CP866" # not CP855 ??
|
||||
echo "bg_BG CP866" # not CP855 ??
|
||||
echo "mk CP866" # not CP855 ??
|
||||
echo "mk_MK CP866" # not CP855 ??
|
||||
echo "ru KOI8-R" # not CP866 ??
|
||||
echo "ru_RU KOI8-R" # not CP866 ??
|
||||
# ISO-8859-6 languages
|
||||
echo "ar CP864"
|
||||
echo "ar_AE CP864"
|
||||
echo "ar_DZ CP864"
|
||||
echo "ar_EG CP864"
|
||||
echo "ar_IQ CP864"
|
||||
echo "ar_IR CP864"
|
||||
echo "ar_JO CP864"
|
||||
echo "ar_KW CP864"
|
||||
echo "ar_MA CP864"
|
||||
echo "ar_OM CP864"
|
||||
echo "ar_QA CP864"
|
||||
echo "ar_SA CP864"
|
||||
echo "ar_SY CP864"
|
||||
# ISO-8859-7 languages
|
||||
echo "el CP869"
|
||||
echo "el_GR CP869"
|
||||
# ISO-8859-8 languages
|
||||
echo "he CP862"
|
||||
echo "he_IL CP862"
|
||||
# ISO-8859-9 languages
|
||||
echo "tr CP857"
|
||||
echo "tr_TR CP857"
|
||||
# Japanese
|
||||
echo "ja CP932"
|
||||
echo "ja_JP CP932"
|
||||
# Chinese
|
||||
echo "zh_CN GBK"
|
||||
echo "zh_TW CP950" # not CP938 ??
|
||||
# Korean
|
||||
echo "kr CP949" # not CP934 ??
|
||||
echo "kr_KR CP949" # not CP934 ??
|
||||
# Thai
|
||||
echo "th CP874"
|
||||
echo "th_TH CP874"
|
||||
# Other
|
||||
echo "eo CP850"
|
||||
echo "eo_EO CP850"
|
||||
;;
|
||||
esac
|
||||
|
||||
30
lib/dirfd.c
Normal file
30
lib/dirfd.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/* dirfd.c -- return the file descriptor associated with an open DIR*
|
||||
Copyright (C) 2001 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. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "dirfd.h"
|
||||
|
||||
int
|
||||
dirfd (DIR const *dir_p)
|
||||
{
|
||||
return DIR_TO_FD (dir_p);
|
||||
}
|
||||
27
lib/dirfd.h
Normal file
27
lib/dirfd.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if HAVE_DIRENT_H
|
||||
# include <dirent.h>
|
||||
#else /* not HAVE_DIRENT_H */
|
||||
# define dirent direct
|
||||
# if HAVE_SYS_NDIR_H
|
||||
# include <sys/ndir.h>
|
||||
# endif /* HAVE_SYS_NDIR_H */
|
||||
# if HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif /* HAVE_SYS_DIR_H */
|
||||
# if HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif /* HAVE_NDIR_H */
|
||||
#endif /* HAVE_DIRENT_H */
|
||||
|
||||
#ifndef HAVE_DECL_DIRFD
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_DIRFD
|
||||
int dirfd (DIR const *);
|
||||
#endif
|
||||
132
lib/dirname.c
132
lib/dirname.c
@@ -1,5 +1,5 @@
|
||||
/* dirname.c -- return all but the last element in a path
|
||||
Copyright (C) 1990, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright 1990, 1998, 2000, 2001 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
|
||||
@@ -19,126 +19,43 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
#endif
|
||||
#if defined STDC_HEADERS || defined HAVE_STRING_H
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
# ifndef strrchr
|
||||
# define strrchr rindex
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef HAVE_DECL_MEMRCHR
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_MEMRCHR
|
||||
void *memrchr ();
|
||||
#endif
|
||||
|
||||
#include "dirname.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef FILESYSTEM_PREFIX_LEN
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
|
||||
#define BACKSLASH_IS_PATH_SEPARATOR ISSLASH ('\\')
|
||||
|
||||
/* Return the length of `dirname (PATH)' and set *RESULT to point
|
||||
to PATH or to `"."', as appropriate. Works properly even if
|
||||
there are trailing slashes (by effectively ignoring them).
|
||||
WARNING: This function doesn't work for cwd-relative names like
|
||||
`a:foo' that are specified with a drive-letter prefix. That case
|
||||
is handled in the caller. */
|
||||
static size_t
|
||||
dir_name_r (char const *path, char const **result)
|
||||
/* Return the length of `dirname (PATH)', or zero if PATH is
|
||||
in the working directory. Works properly even if
|
||||
there are trailing slashes (by effectively ignoring them). */
|
||||
size_t
|
||||
dir_len (char const *path)
|
||||
{
|
||||
char const *slash;
|
||||
size_t length; /* Length of result, not including NUL. */
|
||||
size_t prefix_length = FILESYSTEM_PREFIX_LEN (path);
|
||||
size_t length;
|
||||
|
||||
slash = strrchr (path, '/');
|
||||
if (BACKSLASH_IS_PATH_SEPARATOR)
|
||||
{
|
||||
char const *b = strrchr (path, '\\');
|
||||
if (b && slash < b)
|
||||
slash = b;
|
||||
}
|
||||
/* Strip the basename and any redundant slashes before it. */
|
||||
for (length = base_name (path) - path; prefix_length < length; length--)
|
||||
if (! ISSLASH (path[length - 1]))
|
||||
return length;
|
||||
|
||||
/* If the last byte of PATH is a slash, decrement SLASH until it's
|
||||
pointing at the leftmost in a sequence of trailing slashes. */
|
||||
if (slash && slash[1] == 0)
|
||||
{
|
||||
while (path < slash && ISSLASH (slash[-1]))
|
||||
{
|
||||
--slash;
|
||||
}
|
||||
|
||||
if (path < slash)
|
||||
{
|
||||
size_t len = slash - path;
|
||||
slash = memrchr (path, '/', len);
|
||||
if (BACKSLASH_IS_PATH_SEPARATOR)
|
||||
{
|
||||
char const *b = memrchr (path, '\\', len);
|
||||
if (b && slash < b)
|
||||
slash = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (slash == 0)
|
||||
{
|
||||
/* File is in the current directory. */
|
||||
|
||||
length = FILESYSTEM_PREFIX_LEN (path);
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
path = ".";
|
||||
length = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Remove any trailing slashes from the result. If we have a
|
||||
canonicalized "d:/path", leave alone the root case "d:/". */
|
||||
char const *lim = path + FILESYSTEM_PREFIX_LEN (path);
|
||||
|
||||
while (lim < slash && ISSLASH (*slash))
|
||||
--slash;
|
||||
|
||||
length = slash - path + 1;
|
||||
}
|
||||
|
||||
*result = path;
|
||||
return length;
|
||||
/* But don't strip the only slash from "/". */
|
||||
return prefix_length + ISSLASH (path[prefix_length]);
|
||||
}
|
||||
|
||||
/* Return the leading directories part of PATH,
|
||||
allocated with malloc. If out of memory, return 0.
|
||||
allocated with xmalloc.
|
||||
Works properly even if there are trailing slashes
|
||||
(by effectively ignoring them). */
|
||||
|
||||
char *
|
||||
dir_name (char const *path)
|
||||
{
|
||||
char const *result;
|
||||
size_t length = dir_name_r (path, &result);
|
||||
int append_dot = (length && length == FILESYSTEM_PREFIX_LEN (newpath));
|
||||
char *newpath = (char *) malloc (length + append_dot + 1);
|
||||
if (newpath == 0)
|
||||
return 0;
|
||||
strncpy (newpath, result, length);
|
||||
/* If PATH is "d:foo", return "d:.", the CWD on drive d: */
|
||||
size_t length = dir_len (path);
|
||||
int append_dot = (length == FILESYSTEM_PREFIX_LEN (path));
|
||||
char *newpath = xmalloc (length + append_dot + 1);
|
||||
memcpy (newpath, path, length);
|
||||
if (append_dot)
|
||||
newpath[length++] = '.';
|
||||
newpath[length] = 0;
|
||||
@@ -149,7 +66,8 @@ dir_name (char const *path)
|
||||
/*
|
||||
|
||||
Run the test like this (expect no output):
|
||||
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall memrchr.c dirname.c
|
||||
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall \
|
||||
basename.c dirname.c xmalloc.c
|
||||
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
|
||||
|
||||
BEGIN-DATA
|
||||
@@ -165,7 +83,6 @@ END-DATA
|
||||
|
||||
# define MAX_BUFF_LEN 1024
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
@@ -183,7 +100,6 @@ main ()
|
||||
if (strcmp (result, expected_result))
|
||||
printf ("%s: got %s, expected %s\n", path, result, expected_result);
|
||||
}
|
||||
exit (0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1998, 2001 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
|
||||
@@ -25,7 +25,23 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
char *
|
||||
dir_name PARAMS ((const char *path));
|
||||
# ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
# endif
|
||||
|
||||
# ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
# endif
|
||||
|
||||
# ifndef FILESYSTEM_PREFIX_LEN
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
# endif
|
||||
|
||||
char *base_name PARAMS ((char const *path));
|
||||
char *dir_name PARAMS ((char const *path));
|
||||
size_t base_len PARAMS ((char const *path));
|
||||
size_t dir_len PARAMS ((char const *path));
|
||||
|
||||
int strip_trailing_slashes PARAMS ((char *path));
|
||||
|
||||
#endif /* not DIRNAME_H_ */
|
||||
|
||||
62
lib/dup-safer.c
Normal file
62
lib/dup-safer.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/* Invoke dup, but avoid some glitches.
|
||||
Copyright (C) 2001 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 Paul Eggert. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#if HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifndef STDERR_FILENO
|
||||
# define STDERR_FILENO 2
|
||||
#endif
|
||||
|
||||
#include <unistd-safer.h>
|
||||
|
||||
/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
|
||||
STDERR_FILENO. */
|
||||
|
||||
int
|
||||
dup_safer (int fd)
|
||||
{
|
||||
#ifdef F_DUPFD
|
||||
return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
|
||||
#else
|
||||
int f = dup (fd);
|
||||
if (0 <= f && f <= STDERR_FILENO)
|
||||
{
|
||||
int f1 = dup_safer (f);
|
||||
int e = errno;
|
||||
close (f);
|
||||
errno = e;
|
||||
f = f1;
|
||||
}
|
||||
return f;
|
||||
#endif
|
||||
}
|
||||
273
lib/error.c
273
lib/error.c
@@ -1,23 +1,22 @@
|
||||
/* Error handler for noninteractive utilities
|
||||
Copyright (C) 1990-1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1990-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
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.
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, 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.
|
||||
Lesser 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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; 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>. */
|
||||
|
||||
@@ -29,6 +28,10 @@
|
||||
#if HAVE_LIBINTL_H
|
||||
# include <libintl.h>
|
||||
#endif
|
||||
#ifdef _LIBC
|
||||
# include <wchar.h>
|
||||
# define mbsrtowcs __mbsrtowcs
|
||||
#endif
|
||||
|
||||
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
||||
# if __STDC__
|
||||
@@ -51,13 +54,7 @@ void exit ();
|
||||
#endif
|
||||
|
||||
#include "error.h"
|
||||
|
||||
#ifndef HAVE_DECL_STRERROR_R
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRERROR_R
|
||||
char *strerror_r ();
|
||||
#endif
|
||||
#include "unlocked-io.h"
|
||||
|
||||
#ifndef _
|
||||
# define _(String) String
|
||||
@@ -83,6 +80,12 @@ unsigned int error_message_count;
|
||||
|
||||
/* In GNU libc we want do not want to use the common name `error' directly.
|
||||
Instead make it a weak alias. */
|
||||
extern void __error (int status, int errnum, const char *message, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
extern void __error_at_line (int status, int errnum, const char *file_name,
|
||||
unsigned int line_number, const char *message,
|
||||
...)
|
||||
__attribute__ ((__format__ (__printf__, 5, 6)));;
|
||||
# define error __error
|
||||
# define error_at_line __error_at_line
|
||||
|
||||
@@ -93,21 +96,30 @@ unsigned int error_message_count;
|
||||
|
||||
#else /* not _LIBC */
|
||||
|
||||
# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
|
||||
# ifndef HAVE_DECL_STRERROR_R
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
char *strerror_r ();
|
||||
# endif
|
||||
|
||||
/* The calling program should define program_name and set it to the
|
||||
name of the executing program. */
|
||||
extern char *program_name;
|
||||
|
||||
# ifdef HAVE_STRERROR_R
|
||||
# if HAVE_STRERROR_R || defined strerror_r
|
||||
# define __strerror_r strerror_r
|
||||
# else
|
||||
# if HAVE_STRERROR
|
||||
# ifndef strerror /* On some systems, strerror is a macro */
|
||||
# ifndef HAVE_DECL_STRERROR
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
# if !HAVE_DECL_STRERROR
|
||||
char *strerror ();
|
||||
# endif
|
||||
# else
|
||||
static char *
|
||||
private_strerror (errnum)
|
||||
int errnum;
|
||||
private_strerror (int errnum)
|
||||
{
|
||||
extern char *sys_errlist[];
|
||||
extern int sys_nerr;
|
||||
@@ -118,15 +130,118 @@ private_strerror (errnum)
|
||||
}
|
||||
# define strerror private_strerror
|
||||
# endif /* HAVE_STRERROR */
|
||||
# endif /* HAVE_STRERROR_R */
|
||||
# endif /* HAVE_STRERROR_R || defined strerror_r */
|
||||
#endif /* not _LIBC */
|
||||
|
||||
static void
|
||||
print_errno_message (int errnum)
|
||||
{
|
||||
char const *s;
|
||||
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if STRERROR_R_CHAR_P || _LIBC
|
||||
s = __strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
# else
|
||||
if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
|
||||
s = errbuf;
|
||||
else
|
||||
s = 0;
|
||||
# endif
|
||||
#else
|
||||
s = strerror (errnum);
|
||||
#endif
|
||||
|
||||
#if !_LIBC
|
||||
if (! s)
|
||||
s = _("Unknown system error");
|
||||
#endif
|
||||
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
{
|
||||
__fwprintf (stderr, L": %s", s);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
fprintf (stderr, ": %s", s);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
static void
|
||||
error_tail (int status, int errnum, const char *message, va_list args)
|
||||
{
|
||||
# if HAVE_VPRINTF || _LIBC
|
||||
# if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
{
|
||||
# define ALLOCA_LIMIT 2000
|
||||
size_t len = strlen (message) + 1;
|
||||
wchar_t *wmessage = NULL;
|
||||
mbstate_t st;
|
||||
size_t res;
|
||||
const char *tmp;
|
||||
|
||||
do
|
||||
{
|
||||
if (len < ALLOCA_LIMIT)
|
||||
wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
|
||||
else
|
||||
{
|
||||
if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
|
||||
wmessage = NULL;
|
||||
|
||||
wmessage = (wchar_t *) realloc (wmessage,
|
||||
len * sizeof (wchar_t));
|
||||
|
||||
if (wmessage == NULL)
|
||||
{
|
||||
fputws_unlocked (L"out of memory\n", stderr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
memset (&st, '\0', sizeof (st));
|
||||
tmp =message;
|
||||
}
|
||||
while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
|
||||
|
||||
if (res == (size_t) -1)
|
||||
/* The string cannot be converted. */
|
||||
wmessage = (wchar_t *) L"???";
|
||||
|
||||
__vfwprintf (stderr, wmessage, args);
|
||||
}
|
||||
else
|
||||
# endif
|
||||
vfprintf (stderr, message, args);
|
||||
# else
|
||||
_doprnt (message, args, stderr);
|
||||
# endif
|
||||
va_end (args);
|
||||
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
print_errno_message (errnum);
|
||||
# if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
putwc (L'\n', stderr);
|
||||
else
|
||||
# endif
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Print the program name and error message MESSAGE, which is a printf-style
|
||||
format string with optional args.
|
||||
If ERRNUM is nonzero, print its corresponding system error message.
|
||||
Exit with status STATUS if it is nonzero. */
|
||||
/* VARARGS */
|
||||
|
||||
void
|
||||
#if defined VA_START && __STDC__
|
||||
error (int status, int errnum, const char *message, ...)
|
||||
@@ -142,47 +257,48 @@ error (status, errnum, message, va_alist)
|
||||
va_list args;
|
||||
#endif
|
||||
|
||||
fflush (stdout);
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_flockfile (stderr);
|
||||
# else
|
||||
__flockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
if (error_print_progname)
|
||||
(*error_print_progname) ();
|
||||
else
|
||||
{
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s: ", program_name);
|
||||
else
|
||||
#endif
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
VA_START (args, message);
|
||||
# if HAVE_VPRINTF || _LIBC
|
||||
vfprintf (stderr, message, args);
|
||||
# else
|
||||
_doprnt (message, args, stderr);
|
||||
# endif
|
||||
va_end (args);
|
||||
error_tail (status, errnum, message, args);
|
||||
#else
|
||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
#endif
|
||||
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if HAVE_WORKING_STRERROR_R || _LIBC
|
||||
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
|
||||
# else
|
||||
/* Don't use __strerror_r's return value because on some systems
|
||||
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
|
||||
__strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
fprintf (stderr, ": %s", errbuf);
|
||||
# endif
|
||||
#else
|
||||
fprintf (stderr, ": %s", strerror (errnum));
|
||||
#endif
|
||||
}
|
||||
print_errno_message (errnum);
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_funlockfile (stderr);
|
||||
# else
|
||||
__funlockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Sometimes we want to have at most one error per line. This
|
||||
@@ -212,8 +328,9 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
|
||||
static const char *old_file_name;
|
||||
static unsigned int old_line_number;
|
||||
|
||||
if (old_line_number == line_number &&
|
||||
(file_name == old_file_name || !strcmp (old_file_name, file_name)))
|
||||
if (old_line_number == line_number
|
||||
&& (file_name == old_file_name
|
||||
|| strcmp (old_file_name, file_name) == 0))
|
||||
/* Simply return and print nothing. */
|
||||
return;
|
||||
|
||||
@@ -221,50 +338,58 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
|
||||
old_line_number = line_number;
|
||||
}
|
||||
|
||||
fflush (stdout);
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_flockfile (stderr);
|
||||
# else
|
||||
__flockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
if (error_print_progname)
|
||||
(*error_print_progname) ();
|
||||
else
|
||||
{
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s:", program_name);
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s: ", program_name);
|
||||
else
|
||||
#endif
|
||||
fprintf (stderr, "%s:", program_name);
|
||||
}
|
||||
|
||||
if (file_name != NULL)
|
||||
fprintf (stderr, "%s:%d: ", file_name, line_number);
|
||||
{
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s:%d: ", file_name, line_number);
|
||||
else
|
||||
#endif
|
||||
fprintf (stderr, "%s:%d: ", file_name, line_number);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
VA_START (args, message);
|
||||
# if HAVE_VPRINTF || _LIBC
|
||||
vfprintf (stderr, message, args);
|
||||
# else
|
||||
_doprnt (message, args, stderr);
|
||||
# endif
|
||||
va_end (args);
|
||||
error_tail (status, errnum, message, args);
|
||||
#else
|
||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
#endif
|
||||
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if HAVE_WORKING_STRERROR_R || _LIBC
|
||||
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
|
||||
# else
|
||||
/* Don't use __strerror_r's return value because on some systems
|
||||
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
|
||||
__strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
fprintf (stderr, ": %s", errbuf);
|
||||
# endif
|
||||
#else
|
||||
fprintf (stderr, ": %s", strerror (errnum));
|
||||
#endif
|
||||
}
|
||||
print_errno_message (errnum);
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_funlockfile (stderr);
|
||||
# else
|
||||
__funlockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
|
||||
224
lib/exclude.c
224
lib/exclude.c
@@ -1,5 +1,7 @@
|
||||
/* exclude.c -- exclude file names
|
||||
Copyright 1992, 1993, 1994, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
Copyright 1992, 1993, 1994, 1997, 1999, 2000, 2001 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
|
||||
@@ -22,73 +24,206 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
typedef enum {false = 0, true = 1} bool;
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
#include <exclude.h>
|
||||
#include <fnmatch.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#if HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#else
|
||||
# if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
void *xmalloc PARAMS ((size_t));
|
||||
void *xrealloc PARAMS ((void *, size_t));
|
||||
#include "exclude.h"
|
||||
#include "fnmatch.h"
|
||||
#include "unlocked-io.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
/* Keep track of excluded file name patterns. */
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
|
||||
/* Verify a requirement at compile-time (unlike assert, which is runtime). */
|
||||
#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
|
||||
|
||||
verify (EXCLUDE_macros_do_not_collide_with_FNM_macros,
|
||||
(((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS)
|
||||
& (FNM_FILE_NAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR
|
||||
| FNM_CASEFOLD))
|
||||
== 0));
|
||||
|
||||
/* An exclude pattern-options pair. The options are fnmatch options
|
||||
ORed with EXCLUDE_* options. */
|
||||
|
||||
struct patopts
|
||||
{
|
||||
char const *pattern;
|
||||
int options;
|
||||
};
|
||||
|
||||
/* An exclude list, of pattern-options pairs. */
|
||||
|
||||
struct exclude
|
||||
{
|
||||
char const **exclude;
|
||||
int exclude_alloc;
|
||||
int exclude_count;
|
||||
struct patopts *exclude;
|
||||
size_t exclude_alloc;
|
||||
size_t exclude_count;
|
||||
};
|
||||
|
||||
/* Return a newly allocated and empty exclude list. */
|
||||
|
||||
struct exclude *
|
||||
new_exclude (void)
|
||||
{
|
||||
struct exclude *ex = (struct exclude *) xmalloc (sizeof (struct exclude));
|
||||
struct exclude *ex = (struct exclude *) xmalloc (sizeof *ex);
|
||||
ex->exclude_count = 0;
|
||||
ex->exclude_alloc = 64;
|
||||
ex->exclude = (char const **) xmalloc (ex->exclude_alloc * sizeof (char *));
|
||||
ex->exclude_alloc = (1 << 6); /* This must be a power of 2. */
|
||||
ex->exclude = (struct patopts *) xmalloc (ex->exclude_alloc
|
||||
* sizeof ex->exclude[0]);
|
||||
return ex;
|
||||
}
|
||||
|
||||
int
|
||||
excluded_filename (struct exclude const *ex, char const *f, int options)
|
||||
{
|
||||
char const * const *exclude = ex->exclude;
|
||||
int exclude_count = ex->exclude_count;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < exclude_count; i++)
|
||||
if (fnmatch (exclude[i], f, options) == 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* Free the storage associated with an exclude list. */
|
||||
|
||||
void
|
||||
add_exclude (struct exclude *ex, char const *pattern)
|
||||
free_exclude (struct exclude *ex)
|
||||
{
|
||||
if (ex->exclude_alloc <= ex->exclude_count)
|
||||
ex->exclude = (char const **) xrealloc (ex->exclude,
|
||||
((ex->exclude_alloc *= 2)
|
||||
* sizeof (char *)));
|
||||
|
||||
ex->exclude[ex->exclude_count++] = pattern;
|
||||
free (ex->exclude);
|
||||
free (ex);
|
||||
}
|
||||
|
||||
int
|
||||
add_exclude_file (void (*add_func) PARAMS ((struct exclude *, char const *)),
|
||||
struct exclude *ex, char const *filename, char line_end)
|
||||
/* Return zero if PATTERN matches F, obeying OPTIONS, except that
|
||||
(unlike fnmatch) wildcards are disabled in PATTERN. */
|
||||
|
||||
static int
|
||||
fnmatch_no_wildcards (char const *pattern, char const *f, int options)
|
||||
{
|
||||
int use_stdin = filename[0] == '-' && !filename[1];
|
||||
if (! (options & FNM_LEADING_DIR))
|
||||
return ((options & FNM_CASEFOLD)
|
||||
? strcasecmp (pattern, f)
|
||||
: strcmp (pattern, f));
|
||||
else
|
||||
{
|
||||
size_t patlen = strlen (pattern);
|
||||
int r = ((options & FNM_CASEFOLD)
|
||||
? strncasecmp (pattern, f, patlen)
|
||||
: strncmp (pattern, f, patlen));
|
||||
if (! r)
|
||||
{
|
||||
r = f[patlen];
|
||||
if (r == '/')
|
||||
r = 0;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return true if EX excludes F. */
|
||||
|
||||
bool
|
||||
excluded_filename (struct exclude const *ex, char const *f)
|
||||
{
|
||||
size_t exclude_count = ex->exclude_count;
|
||||
|
||||
/* If no options are given, the default is to include. */
|
||||
if (exclude_count == 0)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
struct patopts const *exclude = ex->exclude;
|
||||
size_t i;
|
||||
|
||||
/* Otherwise, the default is the opposite of the first option. */
|
||||
bool excluded = !! (exclude[0].options & EXCLUDE_INCLUDE);
|
||||
|
||||
/* Scan through the options, seeing whether they change F from
|
||||
excluded to included or vice versa. */
|
||||
for (i = 0; i < exclude_count; i++)
|
||||
{
|
||||
char const *pattern = exclude[i].pattern;
|
||||
int options = exclude[i].options;
|
||||
if (excluded == !! (options & EXCLUDE_INCLUDE))
|
||||
{
|
||||
int (*matcher) PARAMS ((char const *, char const *, int)) =
|
||||
(options & EXCLUDE_WILDCARDS
|
||||
? fnmatch
|
||||
: fnmatch_no_wildcards);
|
||||
bool matched = ((*matcher) (pattern, f, options) == 0);
|
||||
char const *p;
|
||||
|
||||
if (! (options & EXCLUDE_ANCHORED))
|
||||
for (p = f; *p && ! matched; p++)
|
||||
if (*p == '/' && p[1] != '/')
|
||||
matched = ((*matcher) (pattern, p + 1, options) == 0);
|
||||
|
||||
excluded ^= matched;
|
||||
}
|
||||
}
|
||||
|
||||
return excluded;
|
||||
}
|
||||
}
|
||||
|
||||
/* Append to EX the exclusion PATTERN with OPTIONS. */
|
||||
|
||||
void
|
||||
add_exclude (struct exclude *ex, char const *pattern, int options)
|
||||
{
|
||||
struct patopts *patopts;
|
||||
|
||||
if (ex->exclude_alloc <= ex->exclude_count)
|
||||
{
|
||||
size_t s = 2 * ex->exclude_alloc;
|
||||
if (! (0 < s && s <= SIZE_MAX / sizeof ex->exclude[0]))
|
||||
xalloc_die ();
|
||||
ex->exclude_alloc = s;
|
||||
ex->exclude = (struct patopts *) xrealloc (ex->exclude,
|
||||
s * sizeof ex->exclude[0]);
|
||||
}
|
||||
|
||||
patopts = &ex->exclude[ex->exclude_count++];
|
||||
patopts->pattern = pattern;
|
||||
patopts->options = options;
|
||||
}
|
||||
|
||||
/* Use ADD_FUNC to append to EX the patterns in FILENAME, each with
|
||||
OPTIONS. LINE_END terminates each pattern in the file. Return -1
|
||||
on failure, 0 on success. */
|
||||
|
||||
int
|
||||
add_exclude_file (void (*add_func) PARAMS ((struct exclude *,
|
||||
char const *, int)),
|
||||
struct exclude *ex, char const *filename, int options,
|
||||
char line_end)
|
||||
{
|
||||
bool use_stdin = filename[0] == '-' && !filename[1];
|
||||
FILE *in;
|
||||
char *buf;
|
||||
char *p;
|
||||
char const *pattern;
|
||||
char const *lim;
|
||||
size_t buf_alloc = 1024;
|
||||
size_t buf_alloc = (1 << 10); /* This must be a power of two. */
|
||||
size_t buf_count = 0;
|
||||
int c;
|
||||
int e = 0;
|
||||
@@ -104,22 +239,27 @@ add_exclude_file (void (*add_func) PARAMS ((struct exclude *, char const *)),
|
||||
{
|
||||
buf[buf_count++] = c;
|
||||
if (buf_count == buf_alloc)
|
||||
buf = xrealloc (buf, buf_alloc *= 2);
|
||||
{
|
||||
buf_alloc *= 2;
|
||||
if (! buf_alloc)
|
||||
xalloc_die ();
|
||||
buf = xrealloc (buf, buf_alloc);
|
||||
}
|
||||
}
|
||||
|
||||
buf = xrealloc (buf, buf_count + 1);
|
||||
|
||||
if (ferror (in))
|
||||
e = errno;
|
||||
|
||||
if (!use_stdin && fclose (in) != 0)
|
||||
e = errno;
|
||||
|
||||
buf = xrealloc (buf, buf_count + 1);
|
||||
|
||||
for (pattern = p = buf, lim = buf + buf_count; p <= lim; p++)
|
||||
if (p < lim ? *p == line_end : buf < p && p[-1])
|
||||
{
|
||||
*p = '\0';
|
||||
(*add_func) (ex, pattern);
|
||||
(*add_func) (ex, pattern, options);
|
||||
pattern = p + 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* exclude.h -- declarations for excluding file names
|
||||
Copyright 1992, 1993, 1994, 1997, 1999 Free Software Foundation, Inc.
|
||||
Copyright 1992, 1993, 1994, 1997, 1999, 2001 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
|
||||
@@ -26,10 +26,24 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Exclude options, which can be ORed with fnmatch options. */
|
||||
|
||||
/* Patterns must match the start of file names, instead of matching
|
||||
anywhere after a '/'. */
|
||||
#define EXCLUDE_ANCHORED (1 << 5)
|
||||
|
||||
/* Include instead of exclude. */
|
||||
#define EXCLUDE_INCLUDE (1 << 6)
|
||||
|
||||
/* '?', '*', '[', and '\\' are special in patterns. Without this
|
||||
option, these characters are ordinary and fnmatch is not used. */
|
||||
#define EXCLUDE_WILDCARDS (1 << 7)
|
||||
|
||||
struct exclude;
|
||||
|
||||
struct exclude *new_exclude PARAMS ((void));
|
||||
void add_exclude PARAMS ((struct exclude *, char const *));
|
||||
int add_exclude_file PARAMS ((void (*) (struct exclude *, char const *),
|
||||
struct exclude *, char const *, char));
|
||||
int excluded_filename PARAMS ((struct exclude const *, char const *, int));
|
||||
void free_exclude PARAMS ((struct exclude *));
|
||||
void add_exclude PARAMS ((struct exclude *, char const *, int));
|
||||
int add_exclude_file PARAMS ((void (*) (struct exclude *, char const *, int),
|
||||
struct exclude *, char const *, int, char));
|
||||
bool excluded_filename PARAMS ((struct exclude const *, char const *));
|
||||
|
||||
@@ -35,6 +35,7 @@ extern char *program_name;
|
||||
#endif
|
||||
|
||||
#include "fatal.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
/* Like error, but always exit with EXIT_FAILURE. */
|
||||
|
||||
|
||||
76
lib/fopen-safer.c
Normal file
76
lib/fopen-safer.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/* Invoke fopen, but avoid some glitches.
|
||||
Copyright (C) 2001 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 Paul Eggert. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <unistd-safer.h>
|
||||
|
||||
#ifndef STDERR_FILENO
|
||||
# define STDERR_FILENO 2
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdio-safer.h>
|
||||
|
||||
/* Like fopen, but do not return stdin, stdout, or stderr. */
|
||||
|
||||
FILE *
|
||||
fopen_safer (char const *file, char const *mode)
|
||||
{
|
||||
FILE *fp = fopen (file, mode);
|
||||
|
||||
if (fp)
|
||||
{
|
||||
int fd = fileno (fp);
|
||||
|
||||
if (0 <= fd && fd <= STDERR_FILENO)
|
||||
{
|
||||
int f = dup_safer (fd);
|
||||
|
||||
if (f < 0)
|
||||
{
|
||||
int e = errno;
|
||||
fclose (fp);
|
||||
errno = e;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (fclose (fp) != 0
|
||||
|| ! (fp = fdopen (f, mode)))
|
||||
{
|
||||
int e = errno;
|
||||
close (f);
|
||||
errno = e;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fp;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
/* full-write.c -- an interface to write that retries after interrupts
|
||||
Copyright (C) 1993, 1994, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
Copyright 1993, 1994, 1997, 1998, 1999, 2000, 2001 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
|
||||
@@ -15,8 +17,7 @@
|
||||
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.
|
||||
*/
|
||||
Written by Paul Eggert. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@@ -24,6 +25,8 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "full-write.h"
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
@@ -33,30 +36,28 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
/* Write LEN bytes at PTR to descriptor DESC, retrying if interrupted.
|
||||
Return LEN upon success, write's (negative) error code otherwise. */
|
||||
/* Write LEN bytes at PTR to descriptor DESC, retrying if interrupted
|
||||
or if partial writes occur. Return the number of bytes successfully
|
||||
written, setting errno if that is less than LEN. */
|
||||
|
||||
int
|
||||
size_t
|
||||
full_write (int desc, const char *ptr, size_t len)
|
||||
{
|
||||
int total_written;
|
||||
size_t total_written = 0;
|
||||
|
||||
total_written = 0;
|
||||
while (len > 0)
|
||||
{
|
||||
int written = write (desc, ptr, len);
|
||||
/* write on an old Slackware Linux 1.2.13 returns zero when
|
||||
I try to write more data than there is room on a floppy disk.
|
||||
This puts dd into an infinite loop. Reproduce with
|
||||
dd if=/dev/zero of=/dev/fd0. If you have this problem,
|
||||
consider upgrading to a newer kernel. */
|
||||
if (written < 0)
|
||||
ssize_t written = write (desc, ptr, len);
|
||||
if (written <= 0)
|
||||
{
|
||||
/* Some buggy drivers return 0 when you fall off a device's end. */
|
||||
if (written == 0)
|
||||
errno = ENOSPC;
|
||||
#ifdef EINTR
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
#endif
|
||||
return written;
|
||||
break;
|
||||
}
|
||||
total_written += written;
|
||||
ptr += written;
|
||||
|
||||
9
lib/full-write.h
Normal file
9
lib/full-write.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
size_t full_write PARAMS ((int, const char *, size_t));
|
||||
53
lib/gen-uio
Executable file
53
lib/gen-uio
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
fail=0
|
||||
cat <<\EOF || fail=1
|
||||
#ifndef UNLOCKED_IO_H
|
||||
# define UNLOCKED_IO_H 1
|
||||
|
||||
# ifndef USE_UNLOCKED_IO
|
||||
# define USE_UNLOCKED_IO 1
|
||||
# endif
|
||||
|
||||
# if USE_UNLOCKED_IO
|
||||
|
||||
/* These are wrappers for functions/macros from GNU libc.
|
||||
The standard I/O functions are thread-safe. These *_unlocked ones are
|
||||
more efficient but not thread-safe. That they're not thread-safe is
|
||||
fine since all of the applications in this package are single threaded. */
|
||||
|
||||
EOF
|
||||
|
||||
for f in $@; do
|
||||
u=`echo $f|tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
|
||||
cat <<EOF || fail=1
|
||||
# if HAVE_${u}_UNLOCKED
|
||||
# undef $f
|
||||
EOF
|
||||
case $f in
|
||||
getchar)
|
||||
params=;;
|
||||
putchar | clearerr | feof | ferror | fflush | getc )
|
||||
params=x;;
|
||||
putc | fputc | fputs )
|
||||
params=x,y;;
|
||||
fgets )
|
||||
params=x,y,z;;
|
||||
fread | fwrite )
|
||||
params=w,x,y,z;;
|
||||
*)
|
||||
echo $0: missing case for $f 2>&1; fail=1;;
|
||||
esac
|
||||
cat <<EOF || fail=1
|
||||
# define $f($params) ${f}_unlocked ($params)
|
||||
# endif
|
||||
EOF
|
||||
done
|
||||
|
||||
cat <<\EOF || fail=1
|
||||
|
||||
# endif /* USE_UNLOCKED_IO */
|
||||
#endif /* UNLOCKED_IO_H */
|
||||
EOF
|
||||
|
||||
(exit $fail); exit
|
||||
@@ -448,6 +448,7 @@ o_merid:
|
||||
may define-away `const'. We want the prototype for get_date to have
|
||||
the same signature as the function definition. */
|
||||
#include "getdate.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
#ifndef gmtime
|
||||
struct tm *gmtime ();
|
||||
@@ -990,7 +991,8 @@ get_date (const char *p, const time_t *now)
|
||||
|
||||
/* Let mktime deduce tm_isdst if we have an absolute time stamp,
|
||||
or if the relative time stamp mentions days, months, or years. */
|
||||
if (pc.dates_seen | pc.days_seen | pc.times_seen | pc.rel_day | pc.rel_month | pc.rel_year)
|
||||
if (pc.dates_seen | pc.days_seen | pc.times_seen | pc.rel_day
|
||||
| pc.rel_month | pc.rel_year)
|
||||
tm.tm_isdst = -1;
|
||||
|
||||
/* But if the input explicitly specifies local time with or without
|
||||
@@ -1037,6 +1039,7 @@ get_date (const char *p, const time_t *now)
|
||||
{
|
||||
tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7
|
||||
+ 7 * (pc.day_ordinal - (0 < pc.day_ordinal)));
|
||||
tm.tm_isdst = -1;
|
||||
Start = mktime (&tm);
|
||||
if (Start == (time_t) -1)
|
||||
return Start;
|
||||
|
||||
46
lib/getopt.c
46
lib/getopt.c
@@ -1,23 +1,25 @@
|
||||
/* Getopt for GNU.
|
||||
NOTE: The canonical source of this file is maintained with the GNU
|
||||
C Library. Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
|
||||
NOTE: getopt is now part of the C library, so if you don't know what
|
||||
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
||||
before changing it!
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
|
||||
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.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
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 General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser 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 Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 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>. */
|
||||
@@ -76,7 +78,7 @@
|
||||
|
||||
#ifndef _
|
||||
/* This is for other GNU distributions with internationalized messages. */
|
||||
# if defined HAVE_LIBINTL_H || defined _LIBC
|
||||
# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||
# include <libintl.h>
|
||||
# ifndef _
|
||||
# define _(msgid) gettext (msgid)
|
||||
@@ -251,11 +253,13 @@ static int last_nonopt;
|
||||
/* Bash 2.0 gives us an environment variable containing flags
|
||||
indicating ARGV elements that should not be considered arguments. */
|
||||
|
||||
#ifdef USE_NONOPTION_FLAGS
|
||||
/* Defined in getopt_init.c */
|
||||
extern char *__getopt_nonoption_flags;
|
||||
|
||||
static int nonoption_flags_max_len;
|
||||
static int nonoption_flags_len;
|
||||
#endif
|
||||
|
||||
static int original_argc;
|
||||
static char *const *original_argv;
|
||||
@@ -276,13 +280,17 @@ store_args_and_env (int argc, char *const *argv)
|
||||
text_set_element (__libc_subinit, store_args_and_env);
|
||||
# endif /* text_set_element */
|
||||
|
||||
# define SWAP_FLAGS(ch1, ch2) \
|
||||
# ifdef USE_NONOPTION_FLAGS
|
||||
# define SWAP_FLAGS(ch1, ch2) \
|
||||
if (nonoption_flags_len > 0) \
|
||||
{ \
|
||||
char __tmp = __getopt_nonoption_flags[ch1]; \
|
||||
__getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
|
||||
__getopt_nonoption_flags[ch2] = __tmp; \
|
||||
}
|
||||
# else
|
||||
# define SWAP_FLAGS(ch1, ch2)
|
||||
# endif
|
||||
#else /* !_LIBC */
|
||||
# define SWAP_FLAGS(ch1, ch2)
|
||||
#endif /* _LIBC */
|
||||
@@ -314,7 +322,7 @@ exchange (argv)
|
||||
It leaves the longer segment in the right place overall,
|
||||
but it consists of two parts that need to be swapped next. */
|
||||
|
||||
#ifdef _LIBC
|
||||
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||
/* First make sure the handling of the `__getopt_nonoption_flags'
|
||||
string can work normally. Our top argument must be in the range
|
||||
of the string. */
|
||||
@@ -418,7 +426,7 @@ _getopt_initialize (argc, argv, optstring)
|
||||
else
|
||||
ordering = PERMUTE;
|
||||
|
||||
#ifdef _LIBC
|
||||
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||
if (posixly_correct == NULL
|
||||
&& argc == original_argc && argv == original_argv)
|
||||
{
|
||||
@@ -537,7 +545,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
Either it does not have option syntax, or there is an environment flag
|
||||
from the shell indicating it is not an option. The later information
|
||||
is only used when the used in the GNU libc. */
|
||||
#ifdef _LIBC
|
||||
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||
# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|
||||
|| (optind < nonoption_flags_len \
|
||||
&& __getopt_nonoption_flags[optind] == '1'))
|
||||
|
||||
43
lib/getopt.h
43
lib/getopt.h
@@ -1,21 +1,21 @@
|
||||
/* Declarations for getopt.
|
||||
Copyright (C) 1989,90,91,92,93,94,96,97,98 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@gnu.org.
|
||||
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.
|
||||
Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, 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 General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser 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 Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
|
||||
@@ -23,6 +23,17 @@
|
||||
# define _GETOPT_H 1
|
||||
#endif
|
||||
|
||||
/* If __GNU_LIBRARY__ is not already defined, either we are being used
|
||||
standalone, or this is the first header included in the source file.
|
||||
If we are being used with glibc, we need to include <features.h>, but
|
||||
that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
|
||||
not defined, include <ctype.h>, which will pull in <features.h> for us
|
||||
if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
|
||||
doesn't flood the namespace with stuff the way some other headers do.) */
|
||||
#if !defined __GNU_LIBRARY__
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -82,7 +93,7 @@ extern int optopt;
|
||||
|
||||
struct option
|
||||
{
|
||||
# if defined __STDC__ && __STDC__
|
||||
# if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
const char *name;
|
||||
# else
|
||||
char *name;
|
||||
@@ -126,7 +137,7 @@ struct option
|
||||
arguments to the option '\0'. This behavior is specific to the GNU
|
||||
`getopt'. */
|
||||
|
||||
#if defined __STDC__ && __STDC__
|
||||
#if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
# ifdef __GNU_LIBRARY__
|
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
||||
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@gnu.org.
|
||||
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.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
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 General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser 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 Lesser General Public
|
||||
License along with the GNU C Library; 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>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992,93,94,95,96,97,98,99,2000, 2001 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
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include "getline.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
/* It is desirable to use this bit on systems that have it.
|
||||
The only bit of terminal state we want to twiddle is echoing, which is
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* getstr.c -- core function for GNU C library getline replacement function
|
||||
|
||||
Copyright (C) 1993, 1996-2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1996-2001 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
|
||||
@@ -33,6 +33,8 @@
|
||||
char *malloc (), *realloc ();
|
||||
#endif
|
||||
|
||||
#include "unlocked-io.h"
|
||||
|
||||
/* Always add at least this many bytes when extending the buffer. */
|
||||
#define MIN_CHUNK 64
|
||||
|
||||
|
||||
73
lib/gettimeofday.c
Normal file
73
lib/gettimeofday.c
Normal file
@@ -0,0 +1,73 @@
|
||||
/* Work around the bug in some systems whereby gettimeofday clobbers the
|
||||
static buffer that localtime uses for it's return value. The gettimeofday
|
||||
function from Mac OS X 10.0.4, i.e. Darwin 1.3.7 has this problem.
|
||||
Copyright (C) 2001 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>
|
||||
|
||||
/* Disable the definition of gettimeofday (from config.h) so we can use
|
||||
the library version. */
|
||||
#undef gettimeofday
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "gtod.h"
|
||||
|
||||
static struct tm *localtime_buffer_addr;
|
||||
|
||||
void
|
||||
GTOD_init (void)
|
||||
{
|
||||
time_t t = 0;
|
||||
localtime_buffer_addr = localtime (&t);
|
||||
}
|
||||
|
||||
/* This is a wrapper for gettimeofday. It is used only on systems for which
|
||||
gettimeofday clobbers the static buffer used for localtime's result.
|
||||
|
||||
Save and restore the contents of the buffer used for localtime's result
|
||||
around the call to gettimeofday. */
|
||||
|
||||
int
|
||||
rpl_gettimeofday (struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
struct tm save;
|
||||
int result;
|
||||
|
||||
if (! localtime_buffer_addr)
|
||||
abort ();
|
||||
|
||||
save = *localtime_buffer_addr;
|
||||
result = gettimeofday (tv, tz);
|
||||
*localtime_buffer_addr = save;
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* getusershell.c -- Return names of valid user shells.
|
||||
Copyright (C) 1991, 1997, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1997, 2000, 2001 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
|
||||
@@ -36,6 +36,7 @@
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include "unlocked-io.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
|
||||
21
lib/gtod.h
Normal file
21
lib/gtod.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef GTOD_H
|
||||
# define GTOD_H 1
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
void GTOD_init PARAMS ((void));
|
||||
|
||||
/* This is a no-op on compliant systems. */
|
||||
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER
|
||||
# define GETTIMEOFDAY_INIT() GTOD_init ()
|
||||
# else
|
||||
# define GETTIMEOFDAY_INIT() /* empty */
|
||||
# endif
|
||||
|
||||
#endif
|
||||
@@ -19,7 +19,9 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
#if __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
#else
|
||||
# ifdef HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
|
||||
42
lib/hash-pjw.c
Normal file
42
lib/hash-pjw.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/* hash-pjw.c -- compute a hash value from a NUL-terminated string.
|
||||
Copyright 2001 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. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "hash-pjw.h"
|
||||
|
||||
/* A hash function for NUL-terminated char* strings using
|
||||
the method described in Aho, Sethi, & Ullman, p 436. */
|
||||
|
||||
unsigned int
|
||||
hash_pjw (const void *x, unsigned int tablesize)
|
||||
{
|
||||
const char *s = x;
|
||||
unsigned int h = 0;
|
||||
unsigned int g;
|
||||
|
||||
while (*s != 0)
|
||||
{
|
||||
h = (h << 4) + *s++;
|
||||
if ((g = h & (unsigned int) 0xf0000000) != 0)
|
||||
h = (h ^ (g >> 24)) ^ g;
|
||||
}
|
||||
|
||||
return (h % tablesize);
|
||||
}
|
||||
20
lib/hash-pjw.h
Normal file
20
lib/hash-pjw.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/* hash-pjw.h -- declaration for a simple hash function
|
||||
Copyright 2001 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; see the file COPYING.
|
||||
If not, write to the Free Software Foundation,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
unsigned int
|
||||
hash_pjw (const void *x, unsigned int tablesize);
|
||||
46
lib/hash.c
46
lib/hash.c
@@ -61,6 +61,40 @@ char *malloc ();
|
||||
|
||||
#include "hash.h"
|
||||
|
||||
struct hash_table
|
||||
{
|
||||
/* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1,
|
||||
for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets
|
||||
are not empty, there are N_ENTRIES active entries in the table. */
|
||||
struct hash_entry *bucket;
|
||||
struct hash_entry *bucket_limit;
|
||||
unsigned n_buckets;
|
||||
unsigned n_buckets_used;
|
||||
unsigned n_entries;
|
||||
|
||||
/* Tuning arguments, kept in a physicaly separate structure. */
|
||||
const Hash_tuning *tuning;
|
||||
|
||||
/* Three functions are given to `hash_initialize', see the documentation
|
||||
block for this function. In a word, HASHER randomizes a user entry
|
||||
into a number up from 0 up to some maximum minus 1; COMPARATOR returns
|
||||
true if two user entries compare equally; and DATA_FREER is the cleanup
|
||||
function for a user entry. */
|
||||
Hash_hasher hasher;
|
||||
Hash_comparator comparator;
|
||||
Hash_data_freer data_freer;
|
||||
|
||||
/* A linked list of freed struct hash_entry structs. */
|
||||
struct hash_entry *free_entry_list;
|
||||
|
||||
#if USE_OBSTACK
|
||||
/* Whenever obstacks are used, it is possible to allocate all overflowed
|
||||
entries into a single stack, so they all can be freed in a single
|
||||
operation. It is not clear if the speedup is worth the trouble. */
|
||||
struct obstack entry_stack;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* A hash table contains many internal entries, each holding a pointer to
|
||||
some user provided data (also called a user entry). An entry indistinctly
|
||||
refers to both the internal entry and its associated user entry. A user
|
||||
@@ -576,19 +610,22 @@ void
|
||||
hash_clear (Hash_table *table)
|
||||
{
|
||||
struct hash_entry *bucket;
|
||||
struct hash_entry *cursor;
|
||||
|
||||
for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
|
||||
{
|
||||
if (bucket->data)
|
||||
{
|
||||
struct hash_entry *cursor;
|
||||
struct hash_entry *next;
|
||||
|
||||
/* Free the bucket overflow. */
|
||||
for (cursor = bucket->next; cursor; cursor = cursor->next)
|
||||
for (cursor = bucket->next; cursor; cursor = next)
|
||||
{
|
||||
if (table->data_freer)
|
||||
(*table->data_freer) (cursor->data);
|
||||
cursor->data = NULL;
|
||||
|
||||
next = cursor->next;
|
||||
/* Relinking is done one entry at a time, as it is to be expected
|
||||
that overflows are either rare or short. */
|
||||
cursor->next = table->free_entry_list;
|
||||
@@ -995,13 +1032,14 @@ hash_print (const Hash_table *table)
|
||||
struct hash_entry *cursor;
|
||||
|
||||
if (bucket)
|
||||
printf ("%d:\n", slot);
|
||||
printf ("%d:\n", bucket - table->bucket);
|
||||
|
||||
for (cursor = bucket; cursor; cursor = cursor->next)
|
||||
{
|
||||
char *s = (char *) cursor->data;
|
||||
/* FIXME */
|
||||
printf (" %s\n", s);
|
||||
if (s)
|
||||
printf (" %s\n", s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
53
lib/hash.h
53
lib/hash.h
@@ -1,5 +1,5 @@
|
||||
/* hash - hashing table processing.
|
||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
Written by Jim Meyering <meyering@ascend.com>, 1998.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -21,13 +21,16 @@
|
||||
/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
|
||||
obstacks instead of malloc, and recompile `hash.c' with same setting. */
|
||||
|
||||
#ifndef PARAMS
|
||||
# if PROTOTYPES || __STDC__
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
#ifndef HASH_H_
|
||||
# define HASH_H_
|
||||
|
||||
# ifndef PARAMS
|
||||
# if PROTOTYPES || __STDC__
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef unsigned (*Hash_hasher) PARAMS ((const void *, unsigned));
|
||||
typedef bool (*Hash_comparator) PARAMS ((const void *, const void *));
|
||||
@@ -54,39 +57,7 @@ struct hash_tuning
|
||||
|
||||
typedef struct hash_tuning Hash_tuning;
|
||||
|
||||
struct hash_table
|
||||
{
|
||||
/* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1,
|
||||
for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets
|
||||
are not empty, there are N_ENTRIES active entries in the table. */
|
||||
struct hash_entry *bucket;
|
||||
struct hash_entry *bucket_limit;
|
||||
unsigned n_buckets;
|
||||
unsigned n_buckets_used;
|
||||
unsigned n_entries;
|
||||
|
||||
/* Tuning arguments, kept in a physicaly separate structure. */
|
||||
const Hash_tuning *tuning;
|
||||
|
||||
/* Three functions are given to `hash_initialize', see the documentation
|
||||
block for this function. In a word, HASHER randomizes a user entry
|
||||
into a number up from 0 up to some maximum minus 1; COMPARATOR returns
|
||||
true if two user entries compare equally; and DATA_FREER is the cleanup
|
||||
function for a user entry. */
|
||||
Hash_hasher hasher;
|
||||
Hash_comparator comparator;
|
||||
Hash_data_freer data_freer;
|
||||
|
||||
/* A linked list of freed struct hash_entry structs. */
|
||||
struct hash_entry *free_entry_list;
|
||||
|
||||
#if USE_OBSTACK
|
||||
/* Whenever obstacks are used, it is possible to allocate all overflowed
|
||||
entries into a single stack, so they all can be freed in a single
|
||||
operation. It is not clear if the speedup is worth the trouble. */
|
||||
struct obstack entry_stack;
|
||||
#endif
|
||||
};
|
||||
struct hash_table;
|
||||
|
||||
typedef struct hash_table Hash_table;
|
||||
|
||||
@@ -118,3 +89,5 @@ void hash_free PARAMS ((Hash_table *));
|
||||
bool hash_rehash PARAMS ((Hash_table *, unsigned));
|
||||
void *hash_insert PARAMS ((Hash_table *, const void *));
|
||||
void *hash_delete PARAMS ((Hash_table *, const void *));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* linebuffer.c -- read arbitrarily long lines
|
||||
Copyright (C) 1986, 1991, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1986, 1991, 1998, 1999, 2001 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
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "linebuffer.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Determine a canonical name for the current locale's character encoding.
|
||||
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@@ -69,16 +69,19 @@
|
||||
'charset_aliases' simultaneously, both will produce the same value,
|
||||
and everything will be ok if the two assignments to 'charset_aliases'
|
||||
are atomic. But I don't know what will happen if the two assignments mix. */
|
||||
#if __STDC__ != 1
|
||||
# define volatile /* empty */
|
||||
#endif
|
||||
/* Pointer to the contents of the charset.alias file, if it has already been
|
||||
read, else NULL. Its format is:
|
||||
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
|
||||
static char * volatile charset_aliases;
|
||||
static const char * volatile charset_aliases;
|
||||
|
||||
/* Return a pointer to the contents of the charset.alias file. */
|
||||
static const char *
|
||||
get_charset_aliases ()
|
||||
{
|
||||
char *cp;
|
||||
const char *cp;
|
||||
|
||||
cp = charset_aliases;
|
||||
if (cp == NULL)
|
||||
@@ -191,7 +194,7 @@ get_charset_aliases ()
|
||||
into one of the canonical names listed in config.charset.
|
||||
The result must not be freed; it is statically allocated.
|
||||
If the canonical name cannot be determined, the result is a non-canonical
|
||||
name or NULL. */
|
||||
name. */
|
||||
|
||||
#ifdef STATIC
|
||||
STATIC
|
||||
@@ -211,10 +214,14 @@ locale_charset ()
|
||||
|
||||
# else
|
||||
|
||||
/* On old systems which lack it, use setlocale and getenv. */
|
||||
/* On old systems which lack it, use setlocale or getenv. */
|
||||
const char *locale = NULL;
|
||||
|
||||
# if HAVE_SETLOCALE
|
||||
/* But most old systems don't have a complete set of locales. Some
|
||||
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
|
||||
use setlocale here; it would return "C" when it doesn't support the
|
||||
locale name the user has set. */
|
||||
# if HAVE_SETLOCALE && 0
|
||||
locale = setlocale (LC_CTYPE, NULL);
|
||||
# endif
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
@@ -245,18 +252,20 @@ locale_charset ()
|
||||
|
||||
#endif
|
||||
|
||||
if (codeset != NULL && codeset[0] != '\0')
|
||||
{
|
||||
/* Resolve alias. */
|
||||
for (aliases = get_charset_aliases ();
|
||||
*aliases != '\0';
|
||||
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
|
||||
if (!strcmp (codeset, aliases))
|
||||
{
|
||||
codeset = aliases + strlen (aliases) + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (codeset == NULL)
|
||||
/* The canonical name cannot be determined. */
|
||||
codeset = "";
|
||||
|
||||
/* Resolve alias. */
|
||||
for (aliases = get_charset_aliases ();
|
||||
*aliases != '\0';
|
||||
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
|
||||
if (strcmp (codeset, aliases) == 0
|
||||
|| (aliases[0] == '*' && aliases[1] == '\0'))
|
||||
{
|
||||
codeset = aliases + strlen (aliases) + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return codeset;
|
||||
}
|
||||
|
||||
@@ -115,11 +115,10 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
#include "save-cwd.h"
|
||||
#include "dirname.h"
|
||||
#include "error.h"
|
||||
#include "quote.h"
|
||||
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
#define CLEANUP_CWD \
|
||||
do \
|
||||
{ \
|
||||
@@ -196,7 +195,6 @@ make_dir (const char *dir, const char *dirpath, mode_t mode, int *created_dir_p)
|
||||
}
|
||||
|
||||
/* Ensure that the directory ARGPATH exists.
|
||||
Remove any trailing slashes from ARGPATH before calling this function.
|
||||
|
||||
Create any leading directories that don't already exist, with
|
||||
permissions PARENT_MODE.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Determine the number of screen columns needed for a string.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2001 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
|
||||
@@ -21,19 +21,10 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Get MB_LEN_MAX. */
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
/* Get MB_CUR_MAX. */
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
/* Get isprint(). */
|
||||
#include <ctype.h>
|
||||
@@ -43,18 +34,21 @@
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
/* Get iswprint(). */
|
||||
/* Get iswprint(), iswcntrl(). */
|
||||
#if HAVE_WCTYPE_H
|
||||
# include <wctype.h>
|
||||
#endif
|
||||
#if !defined iswprint && !HAVE_ISWPRINT
|
||||
# define iswprint(wc) 1
|
||||
#endif
|
||||
#if !defined iswcntrl && !HAVE_ISWCNTRL
|
||||
# define iswcntrl(wc) 0
|
||||
#endif
|
||||
|
||||
/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
|
||||
#if HAVE_MBRTOWC && defined mbstate_t
|
||||
# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
|
||||
# define mbsinit(ps) 1
|
||||
#ifndef mbsinit
|
||||
# if !HAVE_MBSINIT
|
||||
# define mbsinit(ps) 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_WCWIDTH
|
||||
@@ -81,32 +75,40 @@ int wcwidth ();
|
||||
/* Undefine to protect against the definition in wctype.h of solaris2.6. */
|
||||
#undef ISPRINT
|
||||
#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))
|
||||
#undef ISCNTRL
|
||||
#define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c))
|
||||
|
||||
#include "mbswidth.h"
|
||||
|
||||
/* Returns the number of columns needed to represent the multibyte
|
||||
character string pointed to by STRING. If a non-printable character
|
||||
occurs, -1 is returned, unless MBSW_ACCEPT_UNPRINTABLE is specified.
|
||||
With flags = 0, this is the multibyte analogon of the wcswidth function. */
|
||||
occurs, and MBSW_REJECT_UNPRINTABLE is specified, -1 is returned.
|
||||
With flags = MBSW_REJECT_INVALID | MBSW_REJECT_UNPRINTABLE, this is
|
||||
the multibyte analogon of the wcswidth function. */
|
||||
int
|
||||
mbswidth (const char *string, int flags)
|
||||
mbswidth (string, flags)
|
||||
const char *string;
|
||||
int flags;
|
||||
{
|
||||
return mbsnwidth (string, strlen (string), flags);
|
||||
}
|
||||
|
||||
/* Returns the number of columns needed to represent the multibyte
|
||||
character string pointed to by STRING of length NBYTES. If a
|
||||
non-printable character occurs, -1 is returned, unless
|
||||
MBSW_ACCEPT_UNPRINTABLE is specified. */
|
||||
non-printable character occurs, and MBSW_REJECT_UNPRINTABLE is
|
||||
specified, -1 is returned. */
|
||||
int
|
||||
mbsnwidth (const char *string, size_t nbytes, int flags)
|
||||
mbsnwidth (string, nbytes, flags)
|
||||
const char *string;
|
||||
size_t nbytes;
|
||||
int flags;
|
||||
{
|
||||
const char *p = string;
|
||||
const char *plimit = p + nbytes;
|
||||
int width;
|
||||
|
||||
width = 0;
|
||||
#if HAVE_MBRTOWC && (MB_LEN_MAX > 1)
|
||||
#if HAVE_MBRTOWC
|
||||
if (MB_CUR_MAX > 1)
|
||||
{
|
||||
while (p < plimit)
|
||||
@@ -152,7 +154,7 @@ mbsnwidth (const char *string, size_t nbytes, int flags)
|
||||
if (bytes == (size_t) -1)
|
||||
/* An invalid multibyte sequence was encountered. */
|
||||
{
|
||||
if (flags & MBSW_ACCEPT_INVALID)
|
||||
if (!(flags & MBSW_REJECT_INVALID))
|
||||
{
|
||||
p++;
|
||||
width++;
|
||||
@@ -165,7 +167,7 @@ mbsnwidth (const char *string, size_t nbytes, int flags)
|
||||
if (bytes == (size_t) -2)
|
||||
/* An incomplete multibyte character at the end. */
|
||||
{
|
||||
if (flags & MBSW_ACCEPT_INVALID)
|
||||
if (!(flags & MBSW_REJECT_INVALID))
|
||||
{
|
||||
p = plimit;
|
||||
width++;
|
||||
@@ -185,8 +187,8 @@ mbsnwidth (const char *string, size_t nbytes, int flags)
|
||||
width += w;
|
||||
else
|
||||
/* An unprintable multibyte character. */
|
||||
if (flags & MBSW_ACCEPT_UNPRINTABLE)
|
||||
width += 1;
|
||||
if (!(flags & MBSW_REJECT_UNPRINTABLE))
|
||||
width += (iswcntrl (wc) ? 0 : 1);
|
||||
else
|
||||
return -1;
|
||||
|
||||
@@ -204,8 +206,10 @@ mbsnwidth (const char *string, size_t nbytes, int flags)
|
||||
{
|
||||
unsigned char c = (unsigned char) *p++;
|
||||
|
||||
if ((flags & MBSW_ACCEPT_UNPRINTABLE) || ISPRINT (c))
|
||||
if (ISPRINT (c))
|
||||
width++;
|
||||
else if (!(flags & MBSW_REJECT_UNPRINTABLE))
|
||||
width += (ISCNTRL (c) ? 0 : 1);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Determine the number of screen columns needed for a string.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2001 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
|
||||
@@ -16,7 +16,7 @@
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || defined __STDC__
|
||||
# if defined (__GNUC__) || __STDC__
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
@@ -25,15 +25,17 @@
|
||||
|
||||
/* Optional flags to influence mbswidth/mbsnwidth behavior. */
|
||||
|
||||
/* If this bit is set, assume invalid characters have width 0.
|
||||
Otherwise, return -1 upon finding an invalid or incomplete character. */
|
||||
#define MBSW_ACCEPT_INVALID 1
|
||||
/* If this bit is set, return -1 upon finding an invalid or incomplete
|
||||
character. Otherwise, assume invalid characters have width 1. */
|
||||
#define MBSW_REJECT_INVALID 1
|
||||
|
||||
/* If this bit is set, assume unprintable characters have width 1.
|
||||
Otherwise, return -1 upon finding a non-printable character. */
|
||||
#define MBSW_ACCEPT_UNPRINTABLE 2
|
||||
/* If this bit is set, return -1 upon finding a non-printable character.
|
||||
Otherwise, assume unprintable characters have width 0 if they are
|
||||
control characters and 1 otherwise. */
|
||||
#define MBSW_REJECT_UNPRINTABLE 2
|
||||
|
||||
/* Returns the number of screen columns needed for STRING. */
|
||||
#define mbswidth gnu_mbswidth /* avoid clash with UnixWare 7.1.1 function */
|
||||
extern int mbswidth PARAMS ((const char *string, int flags));
|
||||
|
||||
/* Returns the number of screen columns needed for the NBYTES bytes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 2001 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.
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#endif
|
||||
|
||||
#include "md5.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <endian.h>
|
||||
|
||||
76
lib/mkdir.c
Normal file
76
lib/mkdir.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
|
||||
slash. On those systems, this wrapper removes the trailing slash.
|
||||
Copyright (C) 2001 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>
|
||||
|
||||
/* Disable the definition of mkdir to rpl_mkdir (from config.h) in this
|
||||
file. Otherwise, we'd get conflicting prototypes for rpl_mkdir on
|
||||
most systems. */
|
||||
#undef mkdir
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "dirname.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef HAVE_DECL_FREE
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_FREE
|
||||
void free ();
|
||||
#endif
|
||||
|
||||
/* This function is required at least for NetBSD 1.5.2. */
|
||||
|
||||
int
|
||||
rpl_mkdir (char const *dir, mode_t mode)
|
||||
{
|
||||
int ret_val;
|
||||
char *tmp_dir;
|
||||
size_t len = strlen (dir);
|
||||
|
||||
if (len && dir[len - 1] == '/')
|
||||
{
|
||||
tmp_dir = xstrdup (dir);
|
||||
strip_trailing_slashes (tmp_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp_dir = (char *) dir;
|
||||
}
|
||||
|
||||
ret_val = mkdir (tmp_dir, mode);
|
||||
|
||||
if (tmp_dir != dir)
|
||||
free (tmp_dir);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
43
lib/mkstemp.c
Normal file
43
lib/mkstemp.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
This file is derived from the one in 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.
|
||||
|
||||
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.
|
||||
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Disable the definition of mkstemp to rpl_mkstemp (from config.h) in this
|
||||
file. Otherwise, we'd get conflicting prototypes for rpl_mkstemp on
|
||||
most systems. */
|
||||
#undef mkstemp
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef __GT_FILE
|
||||
# define __GT_FILE 0
|
||||
#endif
|
||||
|
||||
int __gen_tempname ();
|
||||
|
||||
/* Generate a unique temporary file name from TEMPLATE.
|
||||
The last six characters of TEMPLATE must be "XXXXXX";
|
||||
they are replaced with a string that makes the filename unique.
|
||||
Then open the file and return a fd. */
|
||||
int
|
||||
rpl_mkstemp (char *template)
|
||||
{
|
||||
return __gen_tempname (template, __GT_FILE);
|
||||
}
|
||||
@@ -413,18 +413,18 @@ mode_adjust (mode_t oldmode, const struct mode_change *changes)
|
||||
|
||||
if (changes->value & S_IRWXU)
|
||||
/* Copy `u' permissions onto `g' and `o'. */
|
||||
value |= ((value & S_IRUSR ? S_IRGRP | S_IROTH : 0)
|
||||
| (value & S_IWUSR ? S_IWGRP | S_IROTH : 0)
|
||||
value |= ( (value & S_IRUSR ? S_IRGRP | S_IROTH : 0)
|
||||
| (value & S_IWUSR ? S_IWGRP | S_IWOTH : 0)
|
||||
| (value & S_IXUSR ? S_IXGRP | S_IXOTH : 0));
|
||||
else if (changes->value & S_IRWXG)
|
||||
/* Copy `g' permissions onto `u' and `o'. */
|
||||
value |= ((value & S_IRGRP ? S_IRUSR | S_IROTH : 0)
|
||||
| (value & S_IWGRP ? S_IWUSR | S_IROTH : 0)
|
||||
value |= ( (value & S_IRGRP ? S_IRUSR | S_IROTH : 0)
|
||||
| (value & S_IWGRP ? S_IWUSR | S_IWOTH : 0)
|
||||
| (value & S_IXGRP ? S_IXUSR | S_IXOTH : 0));
|
||||
else
|
||||
/* Copy `o' permissions onto `u' and `g'. */
|
||||
value |= ((value & S_IROTH ? S_IRUSR | S_IRGRP : 0)
|
||||
| (value & S_IWOTH ? S_IWUSR | S_IRGRP : 0)
|
||||
value |= ( (value & S_IROTH ? S_IRUSR | S_IRGRP : 0)
|
||||
| (value & S_IWOTH ? S_IWUSR | S_IWGRP : 0)
|
||||
| (value & S_IXOTH ? S_IXUSR | S_IXGRP : 0));
|
||||
|
||||
/* In order to change only `u', `g', or `o' permissions,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* mountlist.c -- return a list of mounted filesystems
|
||||
Copyright (C) 1991, 1992, 1997-2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 1997-2001 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
|
||||
@@ -21,25 +21,23 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "mountlist.h"
|
||||
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
void free ();
|
||||
#endif
|
||||
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
|
||||
#if defined STDC_HEADERS || defined HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef strstr
|
||||
char *strstr ();
|
||||
#endif
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
char *xstrdup ();
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
@@ -58,18 +56,33 @@ extern int errno;
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */
|
||||
# include <sys/mount.h>
|
||||
# include <sys/fs_types.h>
|
||||
#if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */
|
||||
# if HAVE_SYS_UCRED_H
|
||||
# include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
|
||||
# endif
|
||||
# if HAVE_SYS_MOUNT_H
|
||||
# include <sys/mount.h>
|
||||
# endif
|
||||
# if HAVE_SYS_FS_TYPES_H
|
||||
# include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */
|
||||
# endif
|
||||
# if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
|
||||
# define FS_TYPE(Ent) ((Ent).f_fstypename)
|
||||
# else
|
||||
# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
|
||||
# endif
|
||||
#endif /* MOUNTED_GETFSSTAT */
|
||||
|
||||
#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */
|
||||
# include <mntent.h>
|
||||
# if !defined(MOUNTED)
|
||||
# if defined(MNT_MNTTAB) /* HP-UX. */
|
||||
# if !defined MOUNTED
|
||||
# if defined _PATH_MOUNTED /* GNU libc */
|
||||
# define MOUNTED _PATH_MOUNTED
|
||||
# endif
|
||||
# if defined MNT_MNTTAB /* HP-UX. */
|
||||
# define MOUNTED MNT_MNTTAB
|
||||
# endif
|
||||
# if defined(MNTTABNAME) /* Dynix. */
|
||||
# if defined MNTTABNAME /* Dynix. */
|
||||
# define MOUNTED MNTTABNAME
|
||||
# endif
|
||||
# endif
|
||||
@@ -123,12 +136,15 @@ extern int errno;
|
||||
# include <sys/mntent.h>
|
||||
#endif
|
||||
|
||||
#if defined (MNTOPT_IGNORE) && defined (HAVE_HASMNTOPT)
|
||||
#if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT
|
||||
# define MNT_IGNORE(M) hasmntopt ((M), MNTOPT_IGNORE)
|
||||
#else
|
||||
# define MNT_IGNORE(M) 0
|
||||
#endif
|
||||
|
||||
#include "mountlist.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */
|
||||
/* Return the value of the hexadecimal number represented by CP.
|
||||
No prefix (like '0x') or suffix (like 'h') is expected to be
|
||||
@@ -417,7 +433,7 @@ read_filesystem_list (int need_fs_type)
|
||||
}
|
||||
#endif /* MOUNTED_GETMNT. */
|
||||
|
||||
#if defined (MOUNTED_FS_STAT_DEV) /* BeOS */
|
||||
#if defined MOUNTED_FS_STAT_DEV /* BeOS */
|
||||
{
|
||||
/* The next_dev() and fs_stat_dev() system calls give the list of
|
||||
all filesystems, including the information returned by statvfs()
|
||||
@@ -522,7 +538,7 @@ read_filesystem_list (int need_fs_type)
|
||||
}
|
||||
#endif /* MOUNTED_FS_STAT_DEV */
|
||||
|
||||
#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */
|
||||
#if defined MOUNTED_GETFSSTAT /* __alpha running OSF_1 */
|
||||
{
|
||||
int numsys, counter, bufsize;
|
||||
struct statfs *stats;
|
||||
@@ -546,7 +562,7 @@ read_filesystem_list (int need_fs_type)
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup (stats[counter].f_mntfromname);
|
||||
me->me_mountdir = xstrdup (stats[counter].f_mntonname);
|
||||
me->me_type = mnt_names[stats[counter].f_type];
|
||||
me->me_type = xstrdup (FS_TYPE (stats[counter]));
|
||||
me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
|
||||
me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
|
||||
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
|
||||
@@ -560,7 +576,7 @@ read_filesystem_list (int need_fs_type)
|
||||
}
|
||||
#endif /* MOUNTED_GETFSSTAT */
|
||||
|
||||
#if defined (MOUNTED_FREAD) || defined (MOUNTED_FREAD_FSTYP) /* SVR[23]. */
|
||||
#if defined MOUNTED_FREAD || defined MOUNTED_FREAD_FSTYP /* SVR[23]. */
|
||||
{
|
||||
struct mnttab mnt;
|
||||
char *table = "/etc/mnttab";
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
/* obstack.c - subroutines used implicitly by object stack macros
|
||||
Copyright (C) 1988-1994,96,97,98,99,2000 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1988-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
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.
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, 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.
|
||||
Lesser 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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; 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>
|
||||
@@ -40,18 +39,21 @@
|
||||
files, it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
|
||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||
#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
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define POINTER void *
|
||||
# else
|
||||
# define POINTER char *
|
||||
@@ -82,7 +84,7 @@ union fooround {long x; double d;};
|
||||
abort gracefully or use longjump - but shouldn't return. This
|
||||
variable by default points to the internal function
|
||||
`print_and_abort'. */
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
static void print_and_abort (void);
|
||||
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
|
||||
# else
|
||||
@@ -110,7 +112,7 @@ struct obstack *_obstack;
|
||||
For free, do not use ?:, since some compilers, like the MIPS compilers,
|
||||
do not allow (expr) ? void : void. */
|
||||
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define CALL_CHUNKFUN(h, size) \
|
||||
(((h) -> use_extra_arg) \
|
||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||
@@ -152,7 +154,7 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
|
||||
struct obstack *h;
|
||||
int size;
|
||||
int alignment;
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
POINTER (*chunkfun) (long);
|
||||
void (*freefun) (void *);
|
||||
# else
|
||||
@@ -181,7 +183,7 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
|
||||
size = 4096 - extra;
|
||||
}
|
||||
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
|
||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||
# else
|
||||
@@ -210,7 +212,7 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
|
||||
struct obstack *h;
|
||||
int size;
|
||||
int alignment;
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
POINTER (*chunkfun) (POINTER, long);
|
||||
void (*freefun) (POINTER, POINTER);
|
||||
# else
|
||||
@@ -240,7 +242,7 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
|
||||
size = 4096 - extra;
|
||||
}
|
||||
|
||||
# if defined(__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
|
||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||
# else
|
||||
@@ -341,7 +343,7 @@ _obstack_newchunk (h, length)
|
||||
This is here for debugging.
|
||||
If you use it in a program, you are probably losing. */
|
||||
|
||||
# if defined (__STDC__) && __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);
|
||||
@@ -457,7 +459,7 @@ _obstack_memory_used (h)
|
||||
|
||||
/* Define the error handler. */
|
||||
# ifndef _
|
||||
# if defined HAVE_LIBINTL_H || defined _LIBC
|
||||
# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||
# include <libintl.h>
|
||||
# ifndef _
|
||||
# define _(Str) gettext (Str)
|
||||
@@ -471,11 +473,28 @@ _obstack_memory_used (h)
|
||||
# define fputs(s, f) _IO_fputs (s, f)
|
||||
# endif
|
||||
|
||||
# ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
# endif
|
||||
|
||||
static void
|
||||
__attribute__ ((noreturn))
|
||||
print_and_abort ()
|
||||
{
|
||||
fputs (_("memory exhausted"), stderr);
|
||||
fputc ('\n', stderr);
|
||||
/* Don't change any of these strings. Yes, it would be possible to add
|
||||
the newline to the string and use fputs or so. But this must not
|
||||
happen because the "memory exhausted" message appears in other places
|
||||
like this and the translation should be reused instead of creating
|
||||
a very similar string which requires a separate translation. */
|
||||
# if defined _LIBC && defined USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s\n", _("memory exhausted"));
|
||||
else
|
||||
# endif
|
||||
fprintf (stderr, "%s\n", _("memory exhausted"));
|
||||
exit (obstack_exit_failure);
|
||||
}
|
||||
|
||||
@@ -486,7 +505,7 @@ print_and_abort ()
|
||||
/* Now define the functional versions of the obstack macros.
|
||||
Define them to simply use the corresponding macros to do the job. */
|
||||
|
||||
# if defined (__STDC__) && __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. */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* path-concat.c -- concatenate two arbitrary pathnames
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 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
|
||||
@@ -55,14 +55,7 @@ char *malloc ();
|
||||
char *strdup ();
|
||||
#endif
|
||||
|
||||
#ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
#endif
|
||||
|
||||
#include "dirname.h"
|
||||
#include "xalloc.h"
|
||||
#include "path-concat.h"
|
||||
|
||||
@@ -84,8 +77,8 @@ path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
{
|
||||
char *p;
|
||||
char *p_concat;
|
||||
size_t base_len;
|
||||
size_t dir_len;
|
||||
size_t baselen;
|
||||
size_t dirlen;
|
||||
|
||||
if (!dir)
|
||||
{
|
||||
@@ -96,27 +89,28 @@ path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
}
|
||||
|
||||
/* DIR is not empty. */
|
||||
base_len = strlen (base);
|
||||
dir_len = strlen (dir);
|
||||
baselen = base_len (base);
|
||||
dirlen = strlen (dir);
|
||||
|
||||
p_concat = malloc (dir_len + base_len + 2);
|
||||
p_concat = malloc (dirlen + baselen + 2);
|
||||
if (!p_concat)
|
||||
return 0;
|
||||
|
||||
p = mempcpy (p_concat, dir, dir_len);
|
||||
p = mempcpy (p_concat, dir, dirlen);
|
||||
|
||||
if (dir_len > 0)
|
||||
if (FILESYSTEM_PREFIX_LEN (dir) < dirlen)
|
||||
{
|
||||
if (ISSLASH (*(p - 1)) && ISSLASH(*base))
|
||||
if (ISSLASH (*(p - 1)) && ISSLASH (*base))
|
||||
--p;
|
||||
else if (!ISSLASH (*(p - 1)) && !ISSLASH(*base))
|
||||
else if (!ISSLASH (*(p - 1)) && !ISSLASH (*base))
|
||||
*p++ = DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
if (base_in_result)
|
||||
*base_in_result = p;
|
||||
|
||||
memcpy (p, base, base_len + 1);
|
||||
memcpy (p, base, baselen);
|
||||
p[baselen] = '\0';
|
||||
|
||||
return p_concat;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Define PATH_MAX somehow. Requires sys/types.h.
|
||||
Copyright (C) 1992, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1999, 2001 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
|
||||
@@ -18,14 +18,14 @@
|
||||
#ifndef _PATHMAX_H
|
||||
# define _PATHMAX_H
|
||||
|
||||
# ifdef HAVE_UNISTD_H
|
||||
# if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
|
||||
/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
|
||||
PATH_MAX but might cause redefinition warnings when sys/param.h is
|
||||
later included (as on MORE/BSD 4.3). */
|
||||
# if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
|
||||
# if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
|
||||
# include <limits.h>
|
||||
# endif
|
||||
|
||||
@@ -33,17 +33,17 @@
|
||||
# define _POSIX_PATH_MAX 255
|
||||
# endif
|
||||
|
||||
# if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
|
||||
# if !defined PATH_MAX && defined _PC_PATH_MAX
|
||||
# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
|
||||
: pathconf ("/", _PC_PATH_MAX))
|
||||
# endif
|
||||
|
||||
/* Don't include sys/param.h if it already has been. */
|
||||
# if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
|
||||
# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
|
||||
# if !defined(PATH_MAX) && defined(MAXPATHLEN)
|
||||
# if !defined PATH_MAX && defined MAXPATHLEN
|
||||
# define PATH_MAX MAXPATHLEN
|
||||
# endif
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Calculate the size of physical memory.
|
||||
Copyright 2000 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001 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
|
||||
@@ -27,15 +27,34 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_PSTAT_H
|
||||
# include <sys/pstat.h>
|
||||
#endif
|
||||
|
||||
/* Return the total amount of physical memory. */
|
||||
double
|
||||
physmem_total (void)
|
||||
{
|
||||
#if defined _SC_PHYS_PAGES && defined _SC_PAGESIZE
|
||||
double pages = sysconf (_SC_PHYS_PAGES);
|
||||
double pagesize = sysconf (_SC_PAGESIZE);
|
||||
if (0 <= pages && 0 <= pagesize)
|
||||
return pages * pagesize;
|
||||
{
|
||||
double pages = sysconf (_SC_PHYS_PAGES);
|
||||
double pagesize = sysconf (_SC_PAGESIZE);
|
||||
if (0 <= pages && 0 <= pagesize)
|
||||
return pages * pagesize;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_PSTAT_GETSTATIC
|
||||
{
|
||||
struct pst_static pss;
|
||||
if (0 <= pstat_getstatic (&pss, sizeof pss, 1, 0))
|
||||
{
|
||||
double pages = pss.physical_memory;
|
||||
double pagesize = pss.page_size;
|
||||
if (0 <= pages && 0 <= pagesize)
|
||||
return pages * pagesize;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Guess 64 MB. It's probably an older host, so guess small. */
|
||||
@@ -47,10 +66,27 @@ double
|
||||
physmem_available (void)
|
||||
{
|
||||
#if defined _SC_AVPHYS_PAGES && defined _SC_PAGESIZE
|
||||
double pages = sysconf (_SC_AVPHYS_PAGES);
|
||||
double pagesize = sysconf (_SC_PAGESIZE);
|
||||
if (0 <= pages && 0 <= pagesize)
|
||||
return pages * pagesize;
|
||||
{
|
||||
double pages = sysconf (_SC_AVPHYS_PAGES);
|
||||
double pagesize = sysconf (_SC_PAGESIZE);
|
||||
if (0 <= pages && 0 <= pagesize)
|
||||
return pages * pagesize;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC
|
||||
{
|
||||
struct pst_static pss;
|
||||
struct pst_dynamic psd;
|
||||
if (0 <= pstat_getstatic (&pss, sizeof pss, 1, 0)
|
||||
&& 0 <= pstat_getdynamic (&psd, sizeof psd, 1, 0))
|
||||
{
|
||||
double pages = psd.psd_free;
|
||||
double pagesize = pss.page_size;
|
||||
if (0 <= pages && 0 <= pagesize)
|
||||
return pages * pagesize;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Guess 25% of physical memory. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Parse dates for touch and date.
|
||||
Copyright (C) 1989, 1990, 1991, 1998, 2000 Free Software Foundation Inc.
|
||||
Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001 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
|
||||
@@ -40,6 +40,7 @@
|
||||
#endif
|
||||
|
||||
#include "posixtm.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
/* ISDIGIT differs from isdigit, as follows:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
|
||||
@@ -63,16 +63,15 @@
|
||||
#endif
|
||||
|
||||
#if HAVE_WCHAR_H
|
||||
|
||||
/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. */
|
||||
# include <stdio.h>
|
||||
# include <time.h>
|
||||
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_MBRTOWC
|
||||
size_t mbrtowc ();
|
||||
# ifdef mbstate_t
|
||||
# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
|
||||
# define mbsinit(ps) 1
|
||||
# endif
|
||||
#else
|
||||
#if !HAVE_MBRTOWC
|
||||
/* Disable multibyte processing entirely. Since MB_CUR_MAX is 1, the
|
||||
other macros are defined only for documentation and to satisfy C
|
||||
syntax. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* readtokens.c -- Functions for reading tokens from an input stream.
|
||||
Copyright (C) 1990-1991, 1999 Jim Meyering.
|
||||
Copyright (C) 1990-1991, 1999, 2001 Jim Meyering.
|
||||
|
||||
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
|
||||
@@ -49,8 +49,8 @@
|
||||
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
|
||||
|
||||
#include "readtokens.h"
|
||||
void *xmalloc ();
|
||||
void *xrealloc ();
|
||||
#include "unlocked-io.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#define STREQ(a,b) ((a) == (b) || ((a) && (b) && *(a) == *(b) \
|
||||
&& strcmp(a, b) == 0))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* GNU's read utmp module.
|
||||
Copyright (C) 1992-2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2001 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
|
||||
@@ -30,6 +30,7 @@
|
||||
#endif /* STDC_HEADERS || HAVE_STRING_H */
|
||||
|
||||
#include "readutmp.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
char *xmalloc ();
|
||||
char *realloc ();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Declarations for GNU's read utmp module.
|
||||
Copyright (C) 1992-2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2001 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
|
||||
@@ -69,6 +69,9 @@
|
||||
# undef UT_USER
|
||||
# define UT_USER(Utmp) ((Utmp)->ut_name)
|
||||
# endif
|
||||
# if defined HAVE_STRUCT_UTMPX_UT_TYPE
|
||||
# define UT_TYPE(Utmp) ((Utmp)->ut_type)
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
@@ -79,6 +82,9 @@
|
||||
# undef UT_USER
|
||||
# define UT_USER(Utmp) Utmp->ut_name
|
||||
# endif
|
||||
# if defined HAVE_STRUCT_UTMP_UT_TYPE
|
||||
# define UT_TYPE(Utmp) ((Utmp)->ut_type)
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
2683
lib/regex.c
2683
lib/regex.c
File diff suppressed because it is too large
Load Diff
25
lib/regex.h
25
lib/regex.h
@@ -1,24 +1,23 @@
|
||||
/* Definitions for data structures and routines for the regular
|
||||
expression library, version 0.12.
|
||||
Copyright (C) 1985,1989-1993,1995-1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
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.
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, 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.
|
||||
Lesser 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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifndef _REGEX_H
|
||||
#define _REGEX_H 1
|
||||
@@ -160,6 +159,11 @@ typedef unsigned long int reg_syntax_t;
|
||||
this bit set, and it won't affect anything in the normal case. */
|
||||
#define RE_DEBUG (RE_NO_GNU_OPS << 1)
|
||||
|
||||
/* If this bit is set, a syntactically invalid interval is treated as
|
||||
a string of ordinary characters. For example, the ERE 'a{1' is
|
||||
treated as 'a\{1'. */
|
||||
#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
|
||||
|
||||
/* This global variable defines the particular regexp syntax to use (for
|
||||
some interfaces). When a regexp is compiled, the syntax used is
|
||||
stored in the pattern buffer, so changing this does not affect
|
||||
@@ -199,7 +203,8 @@ extern reg_syntax_t re_syntax_options;
|
||||
| RE_NO_BK_VBAR)
|
||||
|
||||
#define RE_SYNTAX_POSIX_EGREP \
|
||||
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
|
||||
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
|
||||
| RE_INVALID_INTERVAL_ORD)
|
||||
|
||||
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
|
||||
#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <xalloc.h>
|
||||
#include "dirname.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef HAVE_DECL_FREE
|
||||
"this configure-time declaration test was not run"
|
||||
@@ -39,8 +40,6 @@
|
||||
void free ();
|
||||
#endif
|
||||
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
/* Rename the file SRC_PATH to DST_PATH, removing any trailing
|
||||
slashes from SRC_PATH. Needed for SunOS 4.1.1_U1. */
|
||||
|
||||
|
||||
19
lib/same.c
19
lib/same.c
@@ -54,8 +54,6 @@ extern int errno;
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
|
||||
#define STREQ(a, b) (strcmp ((a), (b)) == 0)
|
||||
|
||||
#ifndef HAVE_DECL_FREE
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
@@ -63,8 +61,6 @@ extern int errno;
|
||||
void free ();
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *));
|
||||
|
||||
#define SAME_INODE(Stat_buf_1, Stat_buf_2) \
|
||||
((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
|
||||
&& (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
|
||||
@@ -78,11 +74,11 @@ same_name (const char *source, const char *dest)
|
||||
struct stat source_dir_stats;
|
||||
struct stat dest_dir_stats;
|
||||
char *source_dirname, *dest_dirname;
|
||||
char *source_basename, *dest_basename;
|
||||
size_t source_baselen, dest_baselen;
|
||||
|
||||
source_dirname = dir_name (source);
|
||||
dest_dirname = dir_name (dest);
|
||||
if (source_dirname == NULL || dest_dirname == NULL)
|
||||
xalloc_die ();
|
||||
|
||||
if (stat (source_dirname, &source_dir_stats))
|
||||
{
|
||||
@@ -99,6 +95,13 @@ same_name (const char *source, const char *dest)
|
||||
free (source_dirname);
|
||||
free (dest_dirname);
|
||||
|
||||
return (SAME_INODE (source_dir_stats, dest_dir_stats)
|
||||
&& STREQ (base_name (source), base_name (dest)));
|
||||
if (! SAME_INODE (source_dir_stats, dest_dir_stats))
|
||||
return 0;
|
||||
|
||||
source_basename = base_name (source);
|
||||
dest_basename = base_name (dest);
|
||||
source_baselen = base_len (source_basename);
|
||||
dest_baselen = base_len (dest_basename);
|
||||
return (source_baselen == dest_baselen
|
||||
&& memcmp (source_basename, dest_basename, dest_baselen) == 0);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* savedir.c -- save the list of files in a directory in a string
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
Copyright 1990, 1997, 1998, 1999, 2000, 2001 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
|
||||
@@ -64,9 +66,6 @@ extern int errno;
|
||||
/* Return a freshly allocated string containing the filenames
|
||||
in directory DIR, separated by '\0' characters;
|
||||
the end is marked by two '\0' characters in a row.
|
||||
NAME_SIZE is the number of bytes to initially allocate
|
||||
for the string; it will be enlarged as needed.
|
||||
Use NAME_SIZE == -1 if you do not know the size.
|
||||
Return NULL (setting errno) if DIR cannot be opened, read, or closed. */
|
||||
|
||||
#ifndef NAME_SIZE_DEFAULT
|
||||
@@ -74,12 +73,12 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
char *
|
||||
savedir (const char *dir, off_t name_size)
|
||||
savedir (const char *dir)
|
||||
{
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
char *name_space;
|
||||
size_t allocated = name_size; /* Overflow is checked indirectly below. */
|
||||
size_t allocated = NAME_SIZE_DEFAULT;
|
||||
size_t used = 0;
|
||||
int save_errno;
|
||||
|
||||
@@ -87,13 +86,6 @@ savedir (const char *dir, off_t name_size)
|
||||
if (dirp == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Use the default if the size is not known. Be sure "allocated"
|
||||
is at least `1' so there's room for the final NUL byte.
|
||||
Do not simply test name_size <= 0, because the initialization
|
||||
of "allocated" might have overflowed. */
|
||||
if (name_size < 0 || allocated == 0)
|
||||
allocated = NAME_SIZE_DEFAULT;
|
||||
|
||||
name_space = xmalloc (allocated);
|
||||
|
||||
errno = 0;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
char *
|
||||
savedir PARAMS ((const char *dir, off_t name_size));
|
||||
char *savedir PARAMS ((const char *dir));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* sha.c - Functions to compute the SHA1 hash (message-digest) of files
|
||||
or blocks of memory. Complies to the NIST specification FIPS-180-1.
|
||||
|
||||
Copyright (C) 2000 Scott G. Miller
|
||||
Copyright (C) 2000, 2001 Scott G. Miller
|
||||
|
||||
Credits:
|
||||
Robert Klep <robert@ilse.nl> -- Expansion function fix
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "md5.h"
|
||||
#include "sha.h"
|
||||
#include "unlocked-io.h"
|
||||
|
||||
/*
|
||||
Not-swap is a macro that does an endian swap on architectures that are
|
||||
|
||||
9
lib/stdio-safer.h
Normal file
9
lib/stdio-safer.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
FILE *fopen_safer PARAMS ((char const *, char const *));
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-1999, 2000, 2001 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.
|
||||
@@ -421,40 +421,49 @@ static CHAR_T const month_name[][10] =
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef emacs
|
||||
# define my_strftime emacs_strftimeu
|
||||
# define ut_argument , ut
|
||||
# define ut_argument_spec int ut;
|
||||
# define ut_argument_spec_iso , int ut
|
||||
/* When compiling this file, GNU applications can #define my_strftime
|
||||
to a symbol (typically nstrftime) to get an extended strftime with
|
||||
extra arguments UT and NS. Emacs is a special case for now, but
|
||||
this Emacs-specific code can be removed once Emacs's config.h
|
||||
defines my_strftime. */
|
||||
#if defined emacs && !defined my_strftime
|
||||
# define my_strftime nstrftime
|
||||
#endif
|
||||
|
||||
#ifdef my_strftime
|
||||
# define extra_args , ut, ns
|
||||
# define extra_args_spec int ut; int ns;
|
||||
# define extra_args_spec_iso , int ut, int ns
|
||||
#else
|
||||
# ifdef COMPILE_WIDE
|
||||
# define my_strftime wcsftime
|
||||
# else
|
||||
# define my_strftime strftime
|
||||
# endif
|
||||
# define ut_argument
|
||||
# define ut_argument_spec
|
||||
# define ut_argument_spec_iso
|
||||
# define extra_args
|
||||
# define extra_args_spec
|
||||
# define extra_args_spec_iso
|
||||
/* We don't have this information in general. */
|
||||
# define ut 0
|
||||
# define ns 0
|
||||
#endif
|
||||
|
||||
#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
|
||||
/* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
|
||||
Work around this bug by copying *tp before it might be munged. */
|
||||
size_t _strftime_copytm __P ((char *, size_t, const char *,
|
||||
const struct tm * ut_argument_spec_iso));
|
||||
const struct tm * extra_args_spec_iso));
|
||||
size_t
|
||||
my_strftime (s, maxsize, format, tp ut_argument)
|
||||
my_strftime (s, maxsize, format, tp extra_args)
|
||||
CHAR_T *s;
|
||||
size_t maxsize;
|
||||
const CHAR_T *format;
|
||||
const struct tm *tp;
|
||||
ut_argument_spec
|
||||
extra_args_spec
|
||||
{
|
||||
struct tm tmcopy;
|
||||
tmcopy = *tp;
|
||||
return _strftime_copytm (s, maxsize, format, &tmcopy ut_argument);
|
||||
return _strftime_copytm (s, maxsize, format, &tmcopy extra_args);
|
||||
}
|
||||
# undef my_strftime
|
||||
# define my_strftime _strftime_copytm
|
||||
@@ -468,12 +477,12 @@ static CHAR_T const month_name[][10] =
|
||||
anywhere, so to determine how many characters would be
|
||||
written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */
|
||||
size_t
|
||||
my_strftime (s, maxsize, format, tp ut_argument)
|
||||
my_strftime (s, maxsize, format, tp extra_args)
|
||||
CHAR_T *s;
|
||||
size_t maxsize;
|
||||
const CHAR_T *format;
|
||||
const struct tm *tp;
|
||||
ut_argument_spec
|
||||
extra_args_spec
|
||||
{
|
||||
int hour12 = tp->tm_hour;
|
||||
#ifdef _NL_CURRENT
|
||||
@@ -810,9 +819,9 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
{
|
||||
CHAR_T *old_start = p;
|
||||
size_t len = my_strftime (NULL, (size_t) -1, subfmt,
|
||||
tp ut_argument);
|
||||
tp extra_args);
|
||||
add (len, my_strftime (p, maxsize - i, subfmt,
|
||||
tp ut_argument));
|
||||
tp extra_args));
|
||||
|
||||
if (to_uppcase)
|
||||
while (old_start < p)
|
||||
@@ -1044,6 +1053,21 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
|
||||
DO_NUMBER (2, tp->tm_mon + 1);
|
||||
|
||||
case L_('N'): /* GNU extension. */
|
||||
if (modifier == L_('E'))
|
||||
goto bad_format;
|
||||
|
||||
number_value = ns;
|
||||
if (width != -1)
|
||||
{
|
||||
/* Take an explicit width less than 9 as a precision. */
|
||||
int j;
|
||||
for (j = width; j < 9; j++)
|
||||
number_value /= 10;
|
||||
}
|
||||
|
||||
DO_NUMBER (9, number_value);
|
||||
|
||||
case L_('n'): /* POSIX.2 extension. */
|
||||
add (1, *p = L_('\n'));
|
||||
break;
|
||||
@@ -1068,7 +1092,7 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
goto underlying_strftime;
|
||||
#endif
|
||||
|
||||
case L_('R'): /* GNU extension. */
|
||||
case L_('R'): /* ISO C99 extension. */
|
||||
subfmt = L_("%H:%M");
|
||||
goto subformat;
|
||||
|
||||
@@ -1161,8 +1185,8 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7);
|
||||
|
||||
case L_('V'):
|
||||
case L_('g'): /* GNU extension. */
|
||||
case L_('G'): /* GNU extension. */
|
||||
case L_('g'): /* ISO C99 extension. */
|
||||
case L_('G'): /* ISO C99 extension. */
|
||||
if (modifier == L_('E'))
|
||||
goto bad_format;
|
||||
{
|
||||
@@ -1286,7 +1310,7 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case L_('z'): /* GNU extension. */
|
||||
case L_('z'): /* ISO C99 extension. */
|
||||
if (tp->tm_isdst < 0)
|
||||
break;
|
||||
|
||||
@@ -1368,15 +1392,15 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
|
||||
#ifdef emacs
|
||||
/* For Emacs we have a separate interface which corresponds to the normal
|
||||
strftime function and does not have the extra information whether the
|
||||
TP arguments comes from a `gmtime' call or not. */
|
||||
strftime function plus the ut argument, but without the ns argument. */
|
||||
size_t
|
||||
emacs_strftime (s, maxsize, format, tp)
|
||||
emacs_strftimeu (s, maxsize, format, tp, ut)
|
||||
char *s;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *tp;
|
||||
int ut;
|
||||
{
|
||||
return my_strftime (s, maxsize, format, tp, 0);
|
||||
return my_strftime (s, maxsize, format, tp, ut, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* stripslash.c -- remove trailing slashes from a string
|
||||
Copyright (C) 1990 Free Software Foundation, Inc.
|
||||
/* stripslash.c -- remove redundant trailing slashes from a file name
|
||||
Copyright (C) 1990, 2001 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
|
||||
@@ -25,22 +25,21 @@
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
#include "dirname.h"
|
||||
|
||||
/* Remove trailing slashes from PATH.
|
||||
Return nonzero if a trailing slash was removed.
|
||||
This is useful when using filename completion from a shell that
|
||||
adds a "/" after directory names (such as tcsh and bash), because
|
||||
the Unix rename and rmdir system calls return an "Invalid argument" error
|
||||
when given a path that ends in "/" (except for the root directory). */
|
||||
|
||||
void
|
||||
int
|
||||
strip_trailing_slashes (char *path)
|
||||
{
|
||||
int last;
|
||||
|
||||
last = strlen (path) - 1;
|
||||
while (0 < last && ISSLASH (path[last]))
|
||||
path[last--] = '\0';
|
||||
char *base = base_name (path);
|
||||
char *base_lim = base + base_len (base);
|
||||
int had_slash = *base_lim;
|
||||
*base_lim = '\0';
|
||||
return had_slash;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Find the length of STRING, but scan at most MAXLEN characters.
|
||||
Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 2000, 2001 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
|
||||
@@ -51,7 +51,7 @@ size_t
|
||||
__strnlen (const char *string, size_t maxlen)
|
||||
{
|
||||
const char *end = memchr (string, '\0', maxlen);
|
||||
return end ? end - string : maxlen;
|
||||
return end ? (size_t) (end - string) : maxlen;
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__strnlen, strnlen)
|
||||
|
||||
100
lib/strtoimax.c
Normal file
100
lib/strtoimax.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/* Convert string representation of a number into an intmax_t value.
|
||||
Copyright 1999, 2001 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 Paul Eggert. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || defined __STDC__
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Verify a requirement at compile-time (unlike assert, which is runtime). */
|
||||
#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
|
||||
|
||||
#ifdef UNSIGNED
|
||||
# ifndef HAVE_DECL_STRTOUL
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
# if !HAVE_DECL_STRTOUL
|
||||
unsigned long strtoul PARAMS ((char const *, char **, int));
|
||||
# endif
|
||||
# ifndef HAVE_DECL_STRTOULL
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
# if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG
|
||||
unsigned long long strtoull PARAMS ((char const *, char **, int));
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
# ifndef HAVE_DECL_STRTOL
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
# if !HAVE_DECL_STRTOL
|
||||
long strtol PARAMS ((char const *, char **, int));
|
||||
# endif
|
||||
# ifndef HAVE_DECL_STRTOLL
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
# if !HAVE_DECL_STRTOLL && HAVE_UNSIGNED_LONG_LONG
|
||||
long long strtoll PARAMS ((char const *, char **, int));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef UNSIGNED
|
||||
# undef HAVE_LONG_LONG
|
||||
# define HAVE_LONG_LONG HAVE_UNSIGNED_LONG_LONG
|
||||
# define INT uintmax_t
|
||||
# define strtoimax strtoumax
|
||||
# define strtol strtoul
|
||||
# define strtoll strtoull
|
||||
#else
|
||||
# define INT intmax_t
|
||||
#endif
|
||||
|
||||
INT
|
||||
strtoimax (char const *ptr, char **endptr, int base)
|
||||
{
|
||||
#if HAVE_LONG_LONG
|
||||
verify (size_is_that_of_long_or_long_long,
|
||||
(sizeof (INT) == sizeof (long)
|
||||
|| sizeof (INT) == sizeof (long long)));
|
||||
|
||||
if (sizeof (INT) != sizeof (long))
|
||||
return strtoll (ptr, endptr, base);
|
||||
#else
|
||||
verify (size_is_that_of_long,
|
||||
sizeof (INT) == sizeof (long));
|
||||
#endif
|
||||
|
||||
return strtol (ptr, endptr, base);
|
||||
}
|
||||
34
lib/strtoll.c
Normal file
34
lib/strtoll.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/* Function to parse a `long long int' from text.
|
||||
Copyright (C) 1995, 1996, 1997, 1999, 2001 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 Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#define QUAD 1
|
||||
|
||||
#include "strtol.c"
|
||||
|
||||
#ifdef _LIBC
|
||||
# ifdef SHARED
|
||||
# include <shlib-compat.h>
|
||||
|
||||
# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
|
||||
compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0);
|
||||
# endif
|
||||
|
||||
# endif
|
||||
weak_alias (strtoll, strtoq)
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1999, 2001 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.
|
||||
@@ -19,4 +19,4 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define UNSIGNED 1
|
||||
|
||||
#include <strtol.c>
|
||||
#include "strtol.c"
|
||||
|
||||
@@ -1,81 +1,2 @@
|
||||
/* Convert string representation of a number into an uintmax_t value.
|
||||
Copyright 1999 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 Paul Eggert. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || defined __STDC__
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_STRTOUL
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRTOUL
|
||||
unsigned long strtoul PARAMS ((char const *, char **, int));
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_STRTOULL
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG
|
||||
unsigned long long strtoull PARAMS ((char const *, char **, int));
|
||||
#endif
|
||||
|
||||
uintmax_t
|
||||
strtoumax (char const *ptr, char **endptr, int base)
|
||||
{
|
||||
#define USE_IF_EQUIVALENT(function) \
|
||||
if (sizeof (uintmax_t) == sizeof function (ptr, endptr, base)) \
|
||||
return function (ptr, endptr, base);
|
||||
|
||||
#if HAVE_UNSIGNED_LONG_LONG
|
||||
USE_IF_EQUIVALENT (strtoull)
|
||||
#endif
|
||||
|
||||
USE_IF_EQUIVALENT (strtoul)
|
||||
|
||||
abort ();
|
||||
}
|
||||
|
||||
#ifdef TESTING
|
||||
# include <stdio.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
char *p, *endptr;
|
||||
printf ("sizeof uintmax_t: %d\n", sizeof (uintmax_t));
|
||||
printf ("sizeof strtoull(): %d\n", sizeof strtoull(p, &endptr, 10));
|
||||
printf ("sizeof strtoul(): %d\n", sizeof strtoul(p, &endptr, 10));
|
||||
exit (0);
|
||||
}
|
||||
#endif
|
||||
#define UNSIGNED 1
|
||||
#include "strtoimax.c"
|
||||
|
||||
316
lib/tempname.c
Normal file
316
lib/tempname.c
Normal file
@@ -0,0 +1,316 @@
|
||||
/* Copyright (C) 1991-1999, 2000, 2001 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.
|
||||
|
||||
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.
|
||||
|
||||
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., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef __set_errno
|
||||
# define __set_errno(Val) errno = (Val)
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef P_tmpdir
|
||||
# define P_tmpdir "/tmp"
|
||||
#endif
|
||||
#ifndef __GT_FILE
|
||||
# define __GT_FILE 0
|
||||
# define __GT_BIGFILE 1
|
||||
# define __GT_DIR 2
|
||||
# define __GT_NOCREATE 3
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS || _LIBC
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_FCNTL_H || _LIBC
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TIME_H || _LIBC
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDINT_H || _LIBC
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H || _LIBC
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
#if !defined S_ISDIR && defined S_IFDIR
|
||||
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
#if !S_IRUSR && S_IREAD
|
||||
# define S_IRUSR S_IREAD
|
||||
#endif
|
||||
#if !S_IRUSR
|
||||
# define S_IRUSR 00400
|
||||
#endif
|
||||
#if !S_IWUSR && S_IWRITE
|
||||
# define S_IWUSR S_IWRITE
|
||||
#endif
|
||||
#if !S_IWUSR
|
||||
# define S_IWUSR 00200
|
||||
#endif
|
||||
#if !S_IXUSR && S_IEXEC
|
||||
# define S_IXUSR S_IEXEC
|
||||
#endif
|
||||
#if !S_IXUSR
|
||||
# define S_IXUSR 00100
|
||||
#endif
|
||||
|
||||
#if _LIBC
|
||||
# define struct_stat64 struct stat64
|
||||
#else
|
||||
# define struct_stat64 struct stat
|
||||
# define __getpid getpid
|
||||
# define __gettimeofday gettimeofday
|
||||
# define __mkdir mkdir
|
||||
# define __open open
|
||||
# define __open64 open
|
||||
# define __lxstat64(version, path, buf) lstat (path, buf)
|
||||
# define __xstat64(version, path, buf) stat (path, buf)
|
||||
#endif
|
||||
|
||||
#if ! (HAVE___SECURE_GETENV || _LIBC)
|
||||
# define __secure_getenv getenv
|
||||
|
||||
# ifndef HAVE_DECL_GETENV
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
# if !HAVE_DECL_GETENV
|
||||
char *getenv ();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Use the widest available unsigned type if uint64_t is not
|
||||
available. The algorithm below extracts a number less than 62**6
|
||||
(approximately 2**35.725) from uint64_t, so ancient hosts where
|
||||
uintmax_t is only 32 bits lose about 3.725 bits of randomness,
|
||||
which is better than not having mkstemp at all. */
|
||||
#if !defined UINT64_MAX && !defined uint64_t
|
||||
# define uint64_t uintmax_t
|
||||
#endif
|
||||
|
||||
/* The total number of temporary file names that can exist for a given
|
||||
template is 62**6. On ancient hosts where uint64_t is really 32
|
||||
bits, TEMPORARIES evaluates to 965660736, which is good enough. */
|
||||
#define TEMPORARIES ((uint64_t) 62 * 62 * 62 * 62 * 62 * 62)
|
||||
|
||||
/* Return nonzero if DIR is an existent directory. */
|
||||
static int
|
||||
direxists (const char *dir)
|
||||
{
|
||||
struct_stat64 buf;
|
||||
return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode);
|
||||
}
|
||||
|
||||
/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
|
||||
non-null and exists, uses it; otherwise uses the first of $TMPDIR,
|
||||
P_tmpdir, /tmp that exists. Copies into TMPL a template suitable
|
||||
for use with mk[s]temp. Will fail (-1) if DIR is non-null and
|
||||
doesn't exist, none of the searched dirs exists, or there's not
|
||||
enough space in TMPL. */
|
||||
int
|
||||
__path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
|
||||
int try_tmpdir)
|
||||
{
|
||||
const char *d;
|
||||
size_t dlen, plen;
|
||||
|
||||
if (!pfx || !pfx[0])
|
||||
{
|
||||
pfx = "file";
|
||||
plen = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
plen = strlen (pfx);
|
||||
if (plen > 5)
|
||||
plen = 5;
|
||||
}
|
||||
|
||||
if (try_tmpdir)
|
||||
{
|
||||
d = __secure_getenv ("TMPDIR");
|
||||
if (d != NULL && direxists (d))
|
||||
dir = d;
|
||||
else if (dir != NULL && direxists (dir))
|
||||
/* nothing */ ;
|
||||
else
|
||||
dir = NULL;
|
||||
}
|
||||
if (dir == NULL)
|
||||
{
|
||||
if (direxists (P_tmpdir))
|
||||
dir = P_tmpdir;
|
||||
else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
dir = "/tmp";
|
||||
else
|
||||
{
|
||||
__set_errno (ENOENT);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
dlen = strlen (dir);
|
||||
while (dlen > 1 && dir[dlen - 1] == '/')
|
||||
dlen--; /* remove trailing slashes */
|
||||
|
||||
/* check we have room for "${dir}/${pfx}XXXXXX\0" */
|
||||
if (tmpl_len < dlen + 1 + plen + 6 + 1)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* These are the characters used in temporary filenames. */
|
||||
static const char letters[] =
|
||||
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
|
||||
/* Generate a temporary file name based on TMPL. TMPL must match the
|
||||
rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed
|
||||
does not exist at the time of the call to __gen_tempname. TMPL is
|
||||
overwritten with the result.
|
||||
|
||||
KIND may be one of:
|
||||
__GT_NOCREATE: simply verify that the name does not exist
|
||||
at the time of the call.
|
||||
__GT_FILE: create the file using open(O_CREAT|O_EXCL)
|
||||
and return a read-write fd. The file is mode 0600.
|
||||
__GT_BIGFILE: same as __GT_FILE but use open64().
|
||||
__GT_DIR: create a directory, which will be mode 0700.
|
||||
|
||||
We use a clever algorithm to get hard-to-predict names. */
|
||||
int
|
||||
__gen_tempname (char *tmpl, int kind)
|
||||
{
|
||||
int len;
|
||||
char *XXXXXX;
|
||||
static uint64_t value;
|
||||
uint64_t random_time_bits;
|
||||
uint64_t count;
|
||||
int fd = -1;
|
||||
int save_errno = errno;
|
||||
struct_stat64 st;
|
||||
|
||||
len = strlen (tmpl);
|
||||
if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX"))
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* This is where the Xs start. */
|
||||
XXXXXX = &tmpl[len - 6];
|
||||
|
||||
/* Get some more or less random data. */
|
||||
#if HAVE_GETTIMEOFDAY || _LIBC
|
||||
{
|
||||
struct timeval tv;
|
||||
__gettimeofday (&tv, NULL);
|
||||
random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec;
|
||||
}
|
||||
#else
|
||||
random_time_bits = time (NULL);
|
||||
#endif
|
||||
value += random_time_bits ^ __getpid ();
|
||||
|
||||
for (count = 0; count < TEMPORARIES; value += 7777, ++count)
|
||||
{
|
||||
uint64_t v = value;
|
||||
|
||||
/* Fill in the random bits. */
|
||||
XXXXXX[0] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[1] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[2] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[3] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[4] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[5] = letters[v % 62];
|
||||
|
||||
switch (kind)
|
||||
{
|
||||
case __GT_FILE:
|
||||
fd = __open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
|
||||
break;
|
||||
|
||||
case __GT_BIGFILE:
|
||||
fd = __open64 (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
|
||||
break;
|
||||
|
||||
case __GT_DIR:
|
||||
fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
|
||||
break;
|
||||
|
||||
case __GT_NOCREATE:
|
||||
/* This case is backward from the other three. __gen_tempname
|
||||
succeeds if __xstat fails because the name does not exist.
|
||||
Note the continue to bypass the common logic at the bottom
|
||||
of the loop. */
|
||||
if (__lxstat64 (_STAT_VER, tmpl, &st) < 0)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
{
|
||||
__set_errno (save_errno);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
/* Give up now. */
|
||||
return -1;
|
||||
}
|
||||
continue;
|
||||
|
||||
default:
|
||||
assert (! "invalid KIND in __gen_tempname");
|
||||
}
|
||||
|
||||
if (fd >= 0)
|
||||
{
|
||||
__set_errno (save_errno);
|
||||
return fd;
|
||||
}
|
||||
else if (errno != EEXIST)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* We got out of the loop because we ran out of combinations to try. */
|
||||
__set_errno (EEXIST);
|
||||
return -1;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Unicode character output to streams with locale dependent encoding.
|
||||
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@@ -124,13 +124,11 @@ print_unicode_char (FILE *stream, unsigned int code)
|
||||
extern const char *locale_charset PARAMS ((void));
|
||||
const char *charset = locale_charset ();
|
||||
|
||||
is_utf8 = (charset != NULL && !strcmp (charset, UTF8_NAME));
|
||||
is_utf8 = !strcmp (charset, UTF8_NAME);
|
||||
#if HAVE_ICONV
|
||||
if (!is_utf8)
|
||||
{
|
||||
utf8_to_local = (charset != NULL
|
||||
? iconv_open (charset, UTF8_NAME)
|
||||
: (iconv_t)(-1));
|
||||
utf8_to_local = iconv_open (charset, UTF8_NAME);
|
||||
if (utf8_to_local == (iconv_t)(-1))
|
||||
{
|
||||
/* For an unknown encoding, assume ASCII. */
|
||||
|
||||
9
lib/unistd-safer.h
Normal file
9
lib/unistd-safer.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int dup_safer PARAMS ((int));
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1998, 2001 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
|
||||
@@ -27,6 +27,7 @@
|
||||
# include <utime.h>
|
||||
#endif
|
||||
|
||||
#include "full-write.h"
|
||||
#include "safe-read.h"
|
||||
|
||||
/* Some systems (even some that do have <utime.h>) don't declare this
|
||||
@@ -57,9 +58,9 @@ utime_null (const char *file)
|
||||
fd = open (file, O_RDWR);
|
||||
if (fd < 0
|
||||
|| fstat (fd, &sb) < 0
|
||||
|| safe_read (fd, &c, sizeof (char)) < 0
|
||||
|| safe_read (fd, &c, sizeof c) < 0
|
||||
|| lseek (fd, (off_t) 0, SEEK_SET) < 0
|
||||
|| full_write (fd, &c, sizeof (char)) < 0
|
||||
|| full_write (fd, &c, sizeof c) != sizeof c
|
||||
/* Maybe do this -- it's necessary on SunOS4.1.3 with some combination
|
||||
of patches, but that system doesn't use this code: it has utimes.
|
||||
|| fsync (fd) < 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Utility to help print --version output in a consistent format.
|
||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2001 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
|
||||
@@ -22,6 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "unlocked-io.h"
|
||||
#include "version-etc.h"
|
||||
|
||||
#if ENABLE_NLS
|
||||
@@ -30,12 +31,12 @@
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
#define N_(Text) Text
|
||||
|
||||
/* Default copyright goes to the FSF. */
|
||||
|
||||
char* version_etc_copyright =
|
||||
N_("Copyright (C) 2000 Free Software Foundation, Inc.");
|
||||
/* Do *not* mark this string for translation. */
|
||||
"Copyright (C) 2001 Free Software Foundation, Inc.";
|
||||
|
||||
|
||||
/* Display the --version information the standard way.
|
||||
@@ -60,7 +61,7 @@ version_etc (FILE *stream,
|
||||
fprintf (stream, _("Written by %s.\n"), authors);
|
||||
putc ('\n', stream);
|
||||
|
||||
fputs (_(version_etc_copyright), stream);
|
||||
fputs (version_etc_copyright, stream);
|
||||
putc ('\n', stream);
|
||||
|
||||
fputs (_("\
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* xgetcwd.c -- return current directory with unlimited length
|
||||
Copyright (C) 1992, 1996, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1996, 2000, 2001 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
|
||||
@@ -28,18 +28,24 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "pathmax.h"
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_GETCWD
|
||||
char *getcwd ();
|
||||
#else
|
||||
# include "pathmax.h"
|
||||
# define INITIAL_BUFFER_SIZE (PATH_MAX + 1)
|
||||
char *getwd ();
|
||||
# define getcwd(Buf, Max) getwd (Buf)
|
||||
#endif
|
||||
|
||||
extern void *xmalloc ();
|
||||
extern char *xstrdup ();
|
||||
extern void free ();
|
||||
#include "xalloc.h"
|
||||
|
||||
/* Return the current directory, newly allocated, arbitrarily long.
|
||||
Return NULL and set errno on error. */
|
||||
@@ -47,39 +53,35 @@ extern void free ();
|
||||
char *
|
||||
xgetcwd ()
|
||||
{
|
||||
char *ret;
|
||||
unsigned path_max;
|
||||
char buf[1024];
|
||||
#if HAVE_GETCWD_NULL
|
||||
char *cwd = getcwd (NULL, 0);
|
||||
if (! cwd && errno == ENOMEM)
|
||||
xalloc_die ();
|
||||
return cwd;
|
||||
#else
|
||||
|
||||
errno = 0;
|
||||
ret = getcwd (buf, sizeof (buf));
|
||||
if (ret != NULL)
|
||||
return xstrdup (buf);
|
||||
if (errno != ERANGE)
|
||||
return NULL;
|
||||
/* The initial buffer size for the working directory. A power of 2
|
||||
detects arithmetic overflow earlier, but is not required. */
|
||||
# ifndef INITIAL_BUFFER_SIZE
|
||||
# define INITIAL_BUFFER_SIZE 128
|
||||
# endif
|
||||
|
||||
path_max = (unsigned) PATH_MAX;
|
||||
path_max += 2; /* The getcwd docs say to do this. */
|
||||
size_t buf_size = INITIAL_BUFFER_SIZE;
|
||||
|
||||
for (;;)
|
||||
while (1)
|
||||
{
|
||||
char *cwd = (char *) xmalloc (path_max);
|
||||
|
||||
errno = 0;
|
||||
ret = getcwd (cwd, path_max);
|
||||
if (ret != NULL)
|
||||
return ret;
|
||||
if (errno != ERANGE)
|
||||
{
|
||||
int save_errno = errno;
|
||||
free (cwd);
|
||||
errno = save_errno;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
free (cwd);
|
||||
|
||||
path_max += path_max / 16;
|
||||
path_max += 32;
|
||||
char *buf = xmalloc (buf_size);
|
||||
char *cwd = getcwd (buf, buf_size);
|
||||
int saved_errno;
|
||||
if (cwd)
|
||||
return cwd;
|
||||
saved_errno = errno;
|
||||
free (buf);
|
||||
if (saved_errno != ERANGE)
|
||||
return NULL;
|
||||
buf_size *= 2;
|
||||
if (buf_size == 0)
|
||||
xalloc_die ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
92
lib/xreadlink.c
Normal file
92
lib/xreadlink.c
Normal file
@@ -0,0 +1,92 @@
|
||||
/* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage
|
||||
|
||||
Copyright 2001 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; see the file COPYING.
|
||||
If not, write to the Free Software Foundation,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Jim Meyering <jim@meyering.net> */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
#ifndef SSIZE_MAX
|
||||
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
|
||||
#endif
|
||||
|
||||
#include "xalloc.h"
|
||||
#include "xreadlink.h"
|
||||
|
||||
/* Call readlink to get the symbolic link value of FILENAME.
|
||||
Return a pointer to that NUL-terminated string in malloc'd storage.
|
||||
If readlink fails, return NULL (caller may use errno to diagnose).
|
||||
If realloc fails, or if the link value is longer than SIZE_MAX :-),
|
||||
give a diagnostic and exit. */
|
||||
|
||||
char *
|
||||
xreadlink (char const *filename)
|
||||
{
|
||||
/* The initial buffer size for the link value. A power of 2
|
||||
detects arithmetic overflow earlier, but is not required. */
|
||||
size_t buf_size = 128;
|
||||
|
||||
while (1)
|
||||
{
|
||||
char *buffer = xmalloc (buf_size);
|
||||
ssize_t link_length = readlink (filename, buffer, buf_size);
|
||||
|
||||
if (link_length < 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
free (buffer);
|
||||
errno = saved_errno;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (link_length < buf_size)
|
||||
{
|
||||
buffer[link_length] = 0;
|
||||
return buffer;
|
||||
}
|
||||
|
||||
free (buffer);
|
||||
buf_size *= 2;
|
||||
if (SSIZE_MAX < buf_size || (SIZE_MAX / 2 < SSIZE_MAX && buf_size == 0))
|
||||
xalloc_die ();
|
||||
}
|
||||
}
|
||||
9
lib/xreadlink.h
Normal file
9
lib/xreadlink.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
char *xreadlink PARAMS ((char const *));
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user