mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
1481 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c453666c3a | ||
|
|
cbe550de62 | ||
|
|
333d061276 | ||
|
|
b0be1bfab9 | ||
|
|
c58c8f5fcf | ||
|
|
9733e004ef | ||
|
|
fd3817b9dc | ||
|
|
744efcce69 | ||
|
|
3d64706c7e | ||
|
|
774786b0cd | ||
|
|
22cb099f3c | ||
|
|
b737ed325a | ||
|
|
fedbe363a9 | ||
|
|
5df431d118 | ||
|
|
b43184c5e5 | ||
|
|
ab365a8297 | ||
|
|
f573721b82 | ||
|
|
1c1efebc1d | ||
|
|
be27aed1ec | ||
|
|
cf16d34a4d | ||
|
|
8d6ec015de | ||
|
|
5c4b305870 | ||
|
|
62ec3fd688 | ||
|
|
eda468af14 | ||
|
|
8775803a9d | ||
|
|
8c6fe7ba06 | ||
|
|
2e962bb26f | ||
|
|
3f8032ddc9 | ||
|
|
7a4fca9d77 | ||
|
|
c1aaa6492f | ||
|
|
f8f48d0023 | ||
|
|
e446ebf6c3 | ||
|
|
273d5d4925 | ||
|
|
bd8333c63d | ||
|
|
d176b68faa | ||
|
|
f6b673d543 | ||
|
|
bb84498a89 | ||
|
|
90eddc5478 | ||
|
|
e3fa0cb53b | ||
|
|
62205d8c7e | ||
|
|
6cac32ec7f | ||
|
|
4db6224838 | ||
|
|
ba088349be | ||
|
|
bbcd510bc5 | ||
|
|
489f1925be | ||
|
|
d813adbf1f | ||
|
|
13707ac76a | ||
|
|
b631b5c3ac | ||
|
|
06b0be15bb | ||
|
|
1f18465289 | ||
|
|
a8b0898ba5 | ||
|
|
9a2ff5e31c | ||
|
|
03caa431a0 | ||
|
|
231f8fc887 | ||
|
|
15ee939c3c | ||
|
|
893fdf84e8 | ||
|
|
f57f26e36a | ||
|
|
7d31261496 | ||
|
|
b67de020d9 | ||
|
|
06eee4e253 | ||
|
|
efa9563f3d | ||
|
|
ae5c430364 | ||
|
|
fe3a834b9f | ||
|
|
d32cf4d872 | ||
|
|
9e30aaca79 | ||
|
|
26c96331b2 | ||
|
|
81df043fdd | ||
|
|
d495aaf3e7 | ||
|
|
3705d57846 | ||
|
|
d5eb5821c6 | ||
|
|
48efd1644d | ||
|
|
a9d4aadb5e | ||
|
|
ce0262560b | ||
|
|
505805856e | ||
|
|
aef5ff97f7 | ||
|
|
7d7c104722 | ||
|
|
d0a520d367 | ||
|
|
4d5960cf1f | ||
|
|
5adc8fd591 | ||
|
|
47b4e7f1aa | ||
|
|
46980c56e0 | ||
|
|
86f00ce878 | ||
|
|
2c702c93fe | ||
|
|
c91b47d64f | ||
|
|
9e4428a605 | ||
|
|
b76b69c8a2 | ||
|
|
4f0cb8adcb | ||
|
|
cbe1109277 | ||
|
|
08e09e9ab4 | ||
|
|
f3f4a60164 | ||
|
|
dce8ba11dd | ||
|
|
45d534215a | ||
|
|
1a50efcd03 | ||
|
|
86a839108c | ||
|
|
aebba9cd1d | ||
|
|
42e962a284 | ||
|
|
0de00b9e6a | ||
|
|
f23d5119d8 | ||
|
|
0d9735fbb4 | ||
|
|
0b7e06d203 | ||
|
|
968d5b2bbf | ||
|
|
abab15deb9 | ||
|
|
570080ef25 | ||
|
|
595bfc8a83 | ||
|
|
dfb0540bb1 | ||
|
|
c099a14fac | ||
|
|
c219eb2daf | ||
|
|
c9c2cdda8b | ||
|
|
58da7aa5b3 | ||
|
|
7bce838dab | ||
|
|
24c45a756e | ||
|
|
d4db66a0fb | ||
|
|
09f1b5f940 | ||
|
|
a2e435c395 | ||
|
|
e1cc8122af | ||
|
|
8ce9f19835 | ||
|
|
f5ff12fcbc | ||
|
|
c7bd32731e | ||
|
|
0f9105c7be | ||
|
|
c4a0e46616 | ||
|
|
a33ca24833 | ||
|
|
465e3422e8 | ||
|
|
1a8bedfeb7 | ||
|
|
88e049caf5 | ||
|
|
8ecfdb48a9 | ||
|
|
c88a1e4466 | ||
|
|
4186d5762f | ||
|
|
c951e3f2c9 | ||
|
|
e48c320244 | ||
|
|
625a560403 | ||
|
|
f3a2399998 | ||
|
|
fc32116042 | ||
|
|
1a779705e8 | ||
|
|
6df5aa20d7 | ||
|
|
d29115d80f | ||
|
|
89d8c4e859 | ||
|
|
4ba6864c31 | ||
|
|
dc6a5317bc | ||
|
|
98379bfc4f | ||
|
|
cfa079e41d | ||
|
|
553fe00983 | ||
|
|
c4acbcc996 | ||
|
|
e8611c5714 | ||
|
|
9393315a06 | ||
|
|
7990f92f15 | ||
|
|
2435963a1f | ||
|
|
469d21a9d3 | ||
|
|
ddcb373abc | ||
|
|
e0a66a6600 | ||
|
|
d448da43d6 | ||
|
|
870858ccad | ||
|
|
fa25e451f9 | ||
|
|
3e115cf2b5 | ||
|
|
41a7e7c193 | ||
|
|
8024f33e45 | ||
|
|
1fe0bff2f4 | ||
|
|
c829e00d78 | ||
|
|
95b4ba5e0d | ||
|
|
f106184dd2 | ||
|
|
93a834533b | ||
|
|
2c3cad16b2 | ||
|
|
7f54d0b6b7 | ||
|
|
751d1a1888 | ||
|
|
47be9d6b2f | ||
|
|
4d034357da | ||
|
|
ea51a6cbaa | ||
|
|
065c2a2cda | ||
|
|
e9296ad49f | ||
|
|
588bb7b9e2 | ||
|
|
53000596a9 | ||
|
|
ccd763bee2 | ||
|
|
0c4d4d0081 | ||
|
|
ac9b999873 | ||
|
|
7a8e14b287 | ||
|
|
38b49a265f | ||
|
|
fb6ad846b4 | ||
|
|
67cf2e1e2e | ||
|
|
2b47bcaca6 | ||
|
|
11d24c8713 | ||
|
|
7c99efe376 | ||
|
|
6bcc673201 | ||
|
|
337515e1ed | ||
|
|
fda148fb1b | ||
|
|
e7d71e0725 | ||
|
|
110b79479d | ||
|
|
e64e8130b1 | ||
|
|
5fae922bab | ||
|
|
840aee01de | ||
|
|
dfc6a234b0 | ||
|
|
b07aaa6cd0 | ||
|
|
9e8497dd61 | ||
|
|
6a483c24a8 | ||
|
|
590f2decc5 | ||
|
|
489dafa7bc | ||
|
|
8ee46f4bf8 | ||
|
|
b6040be40a | ||
|
|
116bfa584d | ||
|
|
c3f357adf5 | ||
|
|
78992ab94f | ||
|
|
48bbfe2e71 | ||
|
|
f02fa3aa3e | ||
|
|
616361c4f6 | ||
|
|
48e3ed52ee | ||
|
|
46d6db5426 | ||
|
|
4841119c1a | ||
|
|
8c0c6b0468 | ||
|
|
5159046f88 | ||
|
|
0d5f220029 | ||
|
|
afd24c5869 | ||
|
|
9bb0428a59 | ||
|
|
cf0a18b69d | ||
|
|
6c7d8fd5b5 | ||
|
|
3eb8c1fea4 | ||
|
|
3ee8530a1e | ||
|
|
66cbf09569 | ||
|
|
3152cf6f82 | ||
|
|
0567a5d9c8 | ||
|
|
a69a2d6856 | ||
|
|
35ed98cc06 | ||
|
|
ff626bd3c0 | ||
|
|
b52f383a7f | ||
|
|
b14089f76b | ||
|
|
3df9479ab4 | ||
|
|
bbe32e1637 | ||
|
|
79732f800d | ||
|
|
c186123316 | ||
|
|
e50dab4ad9 | ||
|
|
5d0f90dff7 | ||
|
|
f3b0ab5eba | ||
|
|
551ab8474b | ||
|
|
12d6e4b1cd | ||
|
|
a5ab3d9aac | ||
|
|
fbe7dca27f | ||
|
|
0d47b4be52 | ||
|
|
59457bee16 | ||
|
|
a3b2c5389c | ||
|
|
1c4c285999 | ||
|
|
1b84791bc8 | ||
|
|
126e14b161 | ||
|
|
80fd95a91d | ||
|
|
ca974b3755 | ||
|
|
9f5307f1d3 | ||
|
|
97085c8df7 | ||
|
|
de1cb33196 | ||
|
|
741c7303a5 | ||
|
|
f23b3eb47a | ||
|
|
f488edddf7 | ||
|
|
60dabf5cd1 | ||
|
|
44381ed288 | ||
|
|
4717bb93f2 | ||
|
|
9442b6050b | ||
|
|
6adb0e4d56 | ||
|
|
6f06aad852 | ||
|
|
baf8720297 | ||
|
|
94966b9515 | ||
|
|
55d80ad41a | ||
|
|
7b9c964fde | ||
|
|
c4b800d7b6 | ||
|
|
913e134b2d | ||
|
|
5f2d0e3d6c | ||
|
|
58cba22668 | ||
|
|
efe3229edb | ||
|
|
1279be6f8a | ||
|
|
c852bc40d3 | ||
|
|
e02fd60260 | ||
|
|
299882b8a4 | ||
|
|
fee7991cbc | ||
|
|
d486a2e744 | ||
|
|
6752f5570a | ||
|
|
00c9ad3937 | ||
|
|
9a0a8e29b0 | ||
|
|
e5f283604b | ||
|
|
1650a9459a | ||
|
|
58edea6508 | ||
|
|
d15ab2c1be | ||
|
|
cabbdf7bbf | ||
|
|
92999d559c | ||
|
|
625ce6a036 | ||
|
|
dfbeb59dc0 | ||
|
|
b8342a9a20 | ||
|
|
2170503967 | ||
|
|
5693e5c586 | ||
|
|
b830d441bb | ||
|
|
923a32a0a8 | ||
|
|
a86b522044 | ||
|
|
11eebed20f | ||
|
|
9bcff27f18 | ||
|
|
858254d559 | ||
|
|
f90f8cea87 | ||
|
|
30a1c917c7 | ||
|
|
36a3a59284 | ||
|
|
aac32d403c | ||
|
|
8606b093e4 | ||
|
|
4e4c0e24d5 | ||
|
|
76bc7db5e2 | ||
|
|
fd3e041f5b | ||
|
|
ce2bd26821 | ||
|
|
1b470586fd | ||
|
|
198bd22923 | ||
|
|
8c5a80b069 | ||
|
|
a2e08f3047 | ||
|
|
eff6393e39 | ||
|
|
bbe0894eb2 | ||
|
|
c2d329d6c8 | ||
|
|
136a8efd10 | ||
|
|
567dae8b9c | ||
|
|
f8c6ea241d | ||
|
|
6784d83a62 | ||
|
|
2f8c0d5542 | ||
|
|
1150e89832 | ||
|
|
dd282c588b | ||
|
|
8301c1310b | ||
|
|
8c0752d9be | ||
|
|
d9b2187a8c | ||
|
|
d50599ae1a | ||
|
|
6cb491d9df | ||
|
|
21b43e0fe9 | ||
|
|
2315cbdeaa | ||
|
|
eee26242bb | ||
|
|
757861331e | ||
|
|
e1cc2ace3c | ||
|
|
f8d2a3f723 | ||
|
|
3a673ed728 | ||
|
|
fd0797a4e4 | ||
|
|
3b979cf095 | ||
|
|
7f1c659ce3 | ||
|
|
ec266f43d5 | ||
|
|
1885aeaaa4 | ||
|
|
a2bee2bc6f | ||
|
|
1e01103713 | ||
|
|
ce17dc2e94 | ||
|
|
6ed0893953 | ||
|
|
483ed4cbfd | ||
|
|
b75698cf72 | ||
|
|
c26299c3d2 | ||
|
|
82ca413ae4 | ||
|
|
0d30a49178 | ||
|
|
cdff473cd3 | ||
|
|
9a74f64d12 | ||
|
|
8714cce36a | ||
|
|
1a7010a87f | ||
|
|
556a7ac657 | ||
|
|
eed8a2f5e1 | ||
|
|
2ff3485a8d | ||
|
|
3206a63225 | ||
|
|
ef4c445a55 | ||
|
|
20ca1d8601 | ||
|
|
60ff88e110 | ||
|
|
6e5a32d58f | ||
|
|
5f55b410a6 | ||
|
|
27f7343bf6 | ||
|
|
141036e2ea | ||
|
|
34c324d786 | ||
|
|
9df5f7720b | ||
|
|
f2de5d5212 | ||
|
|
c5ed5e05ea | ||
|
|
7092835d3b | ||
|
|
af6d4ad6ca | ||
|
|
70cc369588 | ||
|
|
b3faf79a75 | ||
|
|
50de4d0751 | ||
|
|
60f3f576c7 | ||
|
|
05fcf7df27 | ||
|
|
d5d6d965ed | ||
|
|
d9fd3ba617 | ||
|
|
8c3df2e678 | ||
|
|
847d050688 | ||
|
|
18f381afea | ||
|
|
1128d1dffb | ||
|
|
1d54f66fd0 | ||
|
|
84226463b1 | ||
|
|
b32cecce88 | ||
|
|
99c51ad97e | ||
|
|
4c746d7a4c | ||
|
|
dc33452012 | ||
|
|
f71e656070 | ||
|
|
34c6851c4a | ||
|
|
b1dee02eb1 | ||
|
|
0335111c76 | ||
|
|
2dc33d421e | ||
|
|
0ac76a646b | ||
|
|
64003d937b | ||
|
|
936a26728a | ||
|
|
5f22e8234b | ||
|
|
0ecbb73025 | ||
|
|
fc7ceba21b | ||
|
|
c5494ca49a | ||
|
|
c94e214238 | ||
|
|
5db04594ae | ||
|
|
eb19369c84 | ||
|
|
1c49904e91 | ||
|
|
d134d00bb4 | ||
|
|
9cd6962a4a | ||
|
|
21039f0b39 | ||
|
|
ff9eed5ff5 | ||
|
|
176efa5092 | ||
|
|
1206a834dd | ||
|
|
bda1bae801 | ||
|
|
67e3d46292 | ||
|
|
3551f63a62 | ||
|
|
38d48aa7e9 | ||
|
|
94aebe4774 | ||
|
|
759da836f6 | ||
|
|
222389a6d0 | ||
|
|
621a5a5d61 | ||
|
|
1796cbe0c6 | ||
|
|
aa07786952 | ||
|
|
771ec09cd4 | ||
|
|
f9dd65cfc8 | ||
|
|
372ce8d3ce | ||
|
|
7769c416ef | ||
|
|
c077ecf83c | ||
|
|
50075bf532 | ||
|
|
b04f00f3d4 | ||
|
|
036b3bdae7 | ||
|
|
f802f28675 | ||
|
|
4a1f449cbe | ||
|
|
0d9e008da2 | ||
|
|
7902c47089 | ||
|
|
566fb840b3 | ||
|
|
3d58863d57 | ||
|
|
a595998975 | ||
|
|
c8707dcc2f | ||
|
|
4d8a95eff3 | ||
|
|
fa468393ae | ||
|
|
dd1a7723a6 | ||
|
|
0c578407e0 | ||
|
|
bce84b024a | ||
|
|
a260bc04c8 | ||
|
|
68a35b96ce | ||
|
|
a9afc5a7d0 | ||
|
|
96c183f34f | ||
|
|
b9aa56bec4 | ||
|
|
04aa739146 | ||
|
|
ac31ad442b | ||
|
|
a47deedda7 | ||
|
|
a9c3d9197f | ||
|
|
4d90b0efc9 | ||
|
|
c8ad493e6b | ||
|
|
99aa95f945 | ||
|
|
927b1d42fb | ||
|
|
b5123778b7 | ||
|
|
5c2322aacc | ||
|
|
0c7c8c2992 | ||
|
|
c8d452098b | ||
|
|
3182653495 | ||
|
|
7efcffd2e6 | ||
|
|
63324e5e7e | ||
|
|
488028199d | ||
|
|
c71815ac7b | ||
|
|
6ff905699a | ||
|
|
d3d701080b | ||
|
|
c6025b9d1e | ||
|
|
b026aa85d0 | ||
|
|
4c0b11a8e7 | ||
|
|
5ac2b8e39b | ||
|
|
5214179c29 | ||
|
|
e8ff25dd70 | ||
|
|
fc8e7363d2 | ||
|
|
022194de49 | ||
|
|
eb06f705a1 | ||
|
|
aeabe74421 | ||
|
|
46b6c26e4f | ||
|
|
919f2ce3da | ||
|
|
6cbabe63d4 | ||
|
|
1aa50fd72e | ||
|
|
6845fc7c96 | ||
|
|
84339c827f | ||
|
|
be3748ddad | ||
|
|
392a965229 | ||
|
|
5cb18377bc | ||
|
|
93c2c18a80 | ||
|
|
dd002c22fd | ||
|
|
f447e97462 | ||
|
|
3abc240e82 | ||
|
|
ff8f4dde22 | ||
|
|
f880990daf | ||
|
|
7306126ef0 | ||
|
|
305e2306be | ||
|
|
2b10e67d59 | ||
|
|
dc74b3a1e7 | ||
|
|
2f21a269fe | ||
|
|
69408d229e | ||
|
|
f05badd230 | ||
|
|
6763fa97d2 | ||
|
|
b1b10e1e40 | ||
|
|
5810f4bee5 | ||
|
|
91b5e686d5 | ||
|
|
8c096b86ef | ||
|
|
698fd02798 | ||
|
|
28bac510d9 | ||
|
|
2413369d22 | ||
|
|
091109470c | ||
|
|
9481a7bd36 | ||
|
|
2be3dc067a | ||
|
|
c4542a7e8c | ||
|
|
6c9e0d702a | ||
|
|
062906c83a | ||
|
|
2c3fa56cef | ||
|
|
346edb7361 | ||
|
|
b9c91d0570 | ||
|
|
e20a9b89d2 | ||
|
|
0baa523154 | ||
|
|
d5f7b2a2db | ||
|
|
4c05896b20 | ||
|
|
ec974f5c39 | ||
|
|
15d2e7a86b | ||
|
|
069610a0f0 | ||
|
|
5617251659 | ||
|
|
398516f242 | ||
|
|
8e1452ffea | ||
|
|
6b36a017db | ||
|
|
30d2b031ab | ||
|
|
f72f631fa0 | ||
|
|
d10b18f2b9 | ||
|
|
511cd5b6ae | ||
|
|
09282a24f6 | ||
|
|
f36a801a9a | ||
|
|
1e219d6b71 | ||
|
|
2e0f5a2bac | ||
|
|
9234f12d32 | ||
|
|
bd2102efa4 | ||
|
|
6550d040a5 | ||
|
|
afdd1c5ca2 | ||
|
|
7af339b126 | ||
|
|
0d6c850979 | ||
|
|
a6db3e776e | ||
|
|
f5c9c07779 | ||
|
|
05de2104b9 | ||
|
|
22c0d963f1 | ||
|
|
6cfbe9468a | ||
|
|
630d0d3f8d | ||
|
|
d3af459dac | ||
|
|
b9cbaa7073 | ||
|
|
6c95094270 | ||
|
|
65c46d231a | ||
|
|
c401c7f12c | ||
|
|
5a7847d20f | ||
|
|
94129d72a5 | ||
|
|
e0e3f4ba72 | ||
|
|
61511d8bcb | ||
|
|
7eba3be340 | ||
|
|
971da27132 | ||
|
|
eff0f7cd2e | ||
|
|
b609a36366 | ||
|
|
e4dbcfc604 | ||
|
|
8a34174fb2 | ||
|
|
f22a30f1e5 | ||
|
|
4917680b1a | ||
|
|
3bd2800a3c | ||
|
|
783c48e864 | ||
|
|
07632c3ed9 | ||
|
|
808aa68e9c | ||
|
|
8c4882550e | ||
|
|
4a602cec80 | ||
|
|
6fdf590d36 | ||
|
|
5cbce55a86 | ||
|
|
9eda37263f | ||
|
|
57bb960867 | ||
|
|
320be1758d | ||
|
|
115758e03b | ||
|
|
24e8e8409d | ||
|
|
102caacbef | ||
|
|
cfe7b86608 | ||
|
|
7ec33cd342 | ||
|
|
2e05e2b7fa | ||
|
|
cc9b514f5d | ||
|
|
c49e7f4f22 | ||
|
|
f98d307bbb | ||
|
|
06c06bd6f7 | ||
|
|
8c63b56030 | ||
|
|
29e829a66a | ||
|
|
2f50c6930d | ||
|
|
a3fc960f32 | ||
|
|
91ac2fec34 | ||
|
|
55fa0c6a12 | ||
|
|
6bffd08ba5 | ||
|
|
0e09235c9f | ||
|
|
6b85baa502 | ||
|
|
d46a35bbff | ||
|
|
97523193b7 | ||
|
|
4f06def5c0 | ||
|
|
0ce2109a88 | ||
|
|
557af8f47e | ||
|
|
987955f7c5 | ||
|
|
c5187c959c | ||
|
|
7872d7c932 | ||
|
|
f1c24743b8 | ||
|
|
7cff7275f8 | ||
|
|
286e9d9766 | ||
|
|
acf8442f02 | ||
|
|
b6a764d8c6 | ||
|
|
07d20c7e44 | ||
|
|
1b6c640f46 | ||
|
|
101ae141c6 | ||
|
|
375c13c679 | ||
|
|
cbdf71ab00 | ||
|
|
05e6e5583e | ||
|
|
c4d7026cf9 | ||
|
|
baee6fd135 | ||
|
|
59339ab7e5 | ||
|
|
f5225442f8 | ||
|
|
1b5e676e38 | ||
|
|
cf6ad5dcca | ||
|
|
bb928b7ac4 | ||
|
|
8851d83616 | ||
|
|
41c5f76c2f | ||
|
|
0b23ffc1bf | ||
|
|
e2e5b7324e | ||
|
|
f706863aa6 | ||
|
|
c1e927ff6d | ||
|
|
717d76cf4b | ||
|
|
8bc2ecda80 | ||
|
|
5907ad7277 | ||
|
|
1645ace5e7 | ||
|
|
0af22e4bb2 | ||
|
|
7b165ea504 | ||
|
|
a21ac71b0a | ||
|
|
66964546be | ||
|
|
51ca1e585c | ||
|
|
bf43e9b11e | ||
|
|
b2e1221012 | ||
|
|
224fff6a3a | ||
|
|
7876eafaa1 | ||
|
|
8040d4c680 | ||
|
|
6e8ec1114f | ||
|
|
6cdbe93585 | ||
|
|
36daa470f4 | ||
|
|
5f9feb9aae | ||
|
|
6702048c64 | ||
|
|
9f5b324ec5 | ||
|
|
c13a28cc35 | ||
|
|
de9a877716 | ||
|
|
1df7091e3b | ||
|
|
30fc70c376 | ||
|
|
65851e8c38 | ||
|
|
3db1aef04e | ||
|
|
691513e7f3 | ||
|
|
a8871677d1 | ||
|
|
44dbec6a60 | ||
|
|
0d3ddaa85c | ||
|
|
637aa0759b | ||
|
|
e2c0a043f7 | ||
|
|
81718d1a58 | ||
|
|
9dc239aca7 | ||
|
|
ea525f532f | ||
|
|
476de46ee5 | ||
|
|
571d42e74b | ||
|
|
68e5120531 | ||
|
|
6b32b53027 | ||
|
|
8a25562446 | ||
|
|
764e739e01 | ||
|
|
a5bfc49347 | ||
|
|
386d762885 | ||
|
|
9df0229009 | ||
|
|
2d81adfab6 | ||
|
|
ac0c37fd78 | ||
|
|
65b35a9e36 | ||
|
|
67ec190a99 | ||
|
|
4b47f20e6a | ||
|
|
53d2086432 | ||
|
|
cec217ed93 | ||
|
|
0b7aeab254 | ||
|
|
b4e46d54f9 | ||
|
|
62dac2622f | ||
|
|
76f864a015 | ||
|
|
dcc7e653c9 | ||
|
|
1c04247f53 | ||
|
|
fcbef3a982 | ||
|
|
23d439f22b | ||
|
|
ff220fd012 | ||
|
|
670f9b2f8a | ||
|
|
789f74708c | ||
|
|
da60713a1d | ||
|
|
57808ffdb5 | ||
|
|
8c3db8987e | ||
|
|
373ced3924 | ||
|
|
f726258818 | ||
|
|
84e957d300 | ||
|
|
80871da192 | ||
|
|
dd1e7763d3 | ||
|
|
dab2c2f26f | ||
|
|
4aa83de94e | ||
|
|
67a257993d | ||
|
|
d45f587081 | ||
|
|
8d3deedb8d | ||
|
|
85f411e680 | ||
|
|
362c45be17 | ||
|
|
60b24ab5af | ||
|
|
95c67325f7 | ||
|
|
e16e6e2362 | ||
|
|
7179f4a0af | ||
|
|
7570ff1a15 | ||
|
|
ca1b49d35f | ||
|
|
61ef65be66 | ||
|
|
5398f98139 | ||
|
|
143c0051a7 | ||
|
|
c81b144d58 | ||
|
|
b9912b209f | ||
|
|
5f234e2759 | ||
|
|
70dbbd4077 | ||
|
|
cd2e512366 | ||
|
|
b8dc0dccca | ||
|
|
979fe5dc9a | ||
|
|
ec5d352d55 | ||
|
|
d34f5765a8 | ||
|
|
3c4c9446a6 | ||
|
|
063d10ae6c | ||
|
|
ac1e8485b3 | ||
|
|
f62bbb9cb9 | ||
|
|
d437084b93 | ||
|
|
9ddb95e93c | ||
|
|
e3bd3c1c39 | ||
|
|
ff4e97cf78 | ||
|
|
6d1aa48746 | ||
|
|
02ba1920dd | ||
|
|
fb829c2cd1 | ||
|
|
0a4ef2236d | ||
|
|
40c66374f4 | ||
|
|
0ec36fda44 | ||
|
|
84142eaa26 | ||
|
|
9d8529baea | ||
|
|
a579a9f85b | ||
|
|
767a68f512 | ||
|
|
f8c3b33277 | ||
|
|
77def80003 | ||
|
|
96018007df | ||
|
|
23d74f24e4 | ||
|
|
23d5af772e | ||
|
|
8bbc2e2937 | ||
|
|
5d694e4cc3 | ||
|
|
f893b3807d | ||
|
|
a374a307c5 | ||
|
|
b221905959 | ||
|
|
ff2333c835 | ||
|
|
bd4945f89c | ||
|
|
bda7fb978e | ||
|
|
535a5f905f | ||
|
|
34306581ac | ||
|
|
d25861b4da | ||
|
|
c9e90c55fa | ||
|
|
07feb846a6 | ||
|
|
0470b5dce9 | ||
|
|
449c9c39cc | ||
|
|
17c213ed3f | ||
|
|
42da57def9 | ||
|
|
eef13be7f9 | ||
|
|
3bea9c2f51 | ||
|
|
2de1a014ef | ||
|
|
764768f318 | ||
|
|
290848dd2b | ||
|
|
1ac0c21d89 | ||
|
|
17754acc90 | ||
|
|
0226382b34 | ||
|
|
1ca4f162fa | ||
|
|
84928ec02d | ||
|
|
46f2e4efeb | ||
|
|
6c4caf0dbf | ||
|
|
1003235282 | ||
|
|
fb4889bcd9 | ||
|
|
155695ed60 | ||
|
|
d5c47e9163 | ||
|
|
ea0df9b67d | ||
|
|
98ba27811d | ||
|
|
a66e71a1d2 | ||
|
|
4a03ccc044 | ||
|
|
57d52e5170 | ||
|
|
a7047bf647 | ||
|
|
6f3516dc97 | ||
|
|
057f710a76 | ||
|
|
168676d418 | ||
|
|
825a182517 | ||
|
|
34cc9acdd9 | ||
|
|
0f97cac340 | ||
|
|
6710abd4ae | ||
|
|
566b0c41e3 | ||
|
|
72a5a4b5af | ||
|
|
e105d08552 | ||
|
|
2e5a37a44e | ||
|
|
8e0c33f8ea | ||
|
|
16155b0807 | ||
|
|
1648386aa0 | ||
|
|
7447e09e2a | ||
|
|
96949ef7f5 | ||
|
|
44b1bde148 | ||
|
|
1e5c8f23ce | ||
|
|
f1029324fe | ||
|
|
c1eb26af14 | ||
|
|
93eaa3c661 | ||
|
|
67aaf0afa6 | ||
|
|
fc02691130 | ||
|
|
29f710b0e5 | ||
|
|
6c26ef5e0d | ||
|
|
a8d1ef1616 | ||
|
|
8bde83a334 | ||
|
|
85e0053136 | ||
|
|
b10b8369dd | ||
|
|
1aab3474a1 | ||
|
|
42a837c531 | ||
|
|
d1b4719534 | ||
|
|
81fde1922f | ||
|
|
7d2b2cc3f9 | ||
|
|
967bd9f5f0 | ||
|
|
f2a32f6e5b | ||
|
|
8e064c4377 | ||
|
|
5790705b19 | ||
|
|
fa36ee7ea2 | ||
|
|
8a29209450 | ||
|
|
82669abc1a | ||
|
|
794af09007 | ||
|
|
128307fa88 | ||
|
|
84f4450da4 | ||
|
|
038e5f009e | ||
|
|
4ab0a2a4c6 | ||
|
|
4b20f454fe | ||
|
|
33bebae5ae | ||
|
|
ccff4ede2b | ||
|
|
6f48cb1924 | ||
|
|
98ecd5b300 | ||
|
|
57e5f5a5b5 | ||
|
|
2a0b67dc3b | ||
|
|
805034d054 | ||
|
|
c180c51c79 | ||
|
|
e044763e67 | ||
|
|
b8da6c90b6 | ||
|
|
269630005b | ||
|
|
902d5e299d | ||
|
|
75789c4643 | ||
|
|
678cbc835e | ||
|
|
de8d09d22d | ||
|
|
b266f1a207 | ||
|
|
a61888be78 | ||
|
|
a3bafb3263 | ||
|
|
937c7d8bab | ||
|
|
b7af6cd62a | ||
|
|
09b7fb4252 | ||
|
|
f9ab8e8b03 | ||
|
|
fb9a0d3dff | ||
|
|
d45400c9a9 | ||
|
|
81eda26beb | ||
|
|
1a9b70d7a8 | ||
|
|
70c01e7963 | ||
|
|
bd4a3f044d | ||
|
|
13bc9dcc35 | ||
|
|
6b840273e0 | ||
|
|
9f92dfbf90 | ||
|
|
26656272e8 | ||
|
|
948cf23537 | ||
|
|
2395e90973 | ||
|
|
bb6f5c5913 | ||
|
|
d1b7514e91 | ||
|
|
53e173cca6 | ||
|
|
5157fd957e | ||
|
|
d39e2c5127 | ||
|
|
80e8a30f39 | ||
|
|
83d003e558 | ||
|
|
9715e45a87 | ||
|
|
5d3b030798 | ||
|
|
19a165cc9c | ||
|
|
7a7ef5ff5b | ||
|
|
2638bf642c | ||
|
|
9503681d86 | ||
|
|
7d8102bec2 | ||
|
|
b980775bb6 | ||
|
|
b96c6c60eb | ||
|
|
7de78927ed | ||
|
|
7a44e716a4 | ||
|
|
95b8288176 | ||
|
|
5a2d528081 | ||
|
|
8ab42dc273 | ||
|
|
705cf20084 | ||
|
|
fc08f1058a | ||
|
|
a343e68e00 | ||
|
|
e8e722d58e | ||
|
|
8313e867b2 | ||
|
|
4dac9be014 | ||
|
|
46554e300b | ||
|
|
8b5ed0399d | ||
|
|
e11d70c362 | ||
|
|
005c36b178 | ||
|
|
0e3b9af25b | ||
|
|
1ec1017a23 | ||
|
|
bab0581788 | ||
|
|
e23b334713 | ||
|
|
475a58337a | ||
|
|
1195909f5d | ||
|
|
0c44307f3b | ||
|
|
138cf56fdb | ||
|
|
a711e8e132 | ||
|
|
e32013660e | ||
|
|
b4e8324ac2 | ||
|
|
03455da71a | ||
|
|
c82037714e | ||
|
|
6faeb61968 | ||
|
|
82288821f0 | ||
|
|
28c95e39c1 | ||
|
|
47ac7c933a | ||
|
|
4ba5bee1a0 | ||
|
|
f063d2f7a2 | ||
|
|
ee81e2f472 | ||
|
|
c1e29b69ba | ||
|
|
13955cb7c1 | ||
|
|
e95aecb85e | ||
|
|
b66c78c236 | ||
|
|
b1d6d67405 | ||
|
|
086c4578e3 | ||
|
|
99d5294ab1 | ||
|
|
f99e33733b | ||
|
|
4d22e13282 | ||
|
|
18607df151 | ||
|
|
1b4fc0d733 | ||
|
|
1cea2b41a4 | ||
|
|
a2267a42f8 | ||
|
|
7228350401 | ||
|
|
22cdfc8955 | ||
|
|
cb47f7bef7 | ||
|
|
7fda0e1065 | ||
|
|
b91360e484 | ||
|
|
4b797e9d5c | ||
|
|
9b5e17f134 | ||
|
|
bee39b77d9 | ||
|
|
18eb7260a1 | ||
|
|
531ced1819 | ||
|
|
b6ee833da0 | ||
|
|
cfd67ae18c | ||
|
|
a26a44baba | ||
|
|
843d60096e | ||
|
|
bcfbd6fab1 | ||
|
|
84dc18f1db | ||
|
|
10c7ee785a | ||
|
|
6591e754b2 | ||
|
|
05c804e18f | ||
|
|
89e470b8e2 | ||
|
|
e26558d720 | ||
|
|
8fd9cfdd3c | ||
|
|
ca2cd27d3c | ||
|
|
8b2c09a944 | ||
|
|
41a7bbf8e0 | ||
|
|
08ae72e3a4 | ||
|
|
c127e62803 | ||
|
|
0bb442899e | ||
|
|
412590b094 | ||
|
|
6fcaba3a1e | ||
|
|
f5f7082712 | ||
|
|
20c6afc39f | ||
|
|
16fa90f7d0 | ||
|
|
aeb6ea6c01 | ||
|
|
e1eebd3966 | ||
|
|
e03ffca770 | ||
|
|
2f19e00c90 | ||
|
|
12fbee444c | ||
|
|
0abcbb7b3d | ||
|
|
b5f2d23a1c | ||
|
|
2d4a921699 | ||
|
|
66f0de09e8 | ||
|
|
fed1e6eceb | ||
|
|
505ee4c31c | ||
|
|
dda679e516 | ||
|
|
7cdcf3b47a | ||
|
|
e4024a94f8 | ||
|
|
a07027bbda | ||
|
|
cf8234804d | ||
|
|
fad7082c96 | ||
|
|
59b21e3f05 | ||
|
|
c0c398ba95 | ||
|
|
f8b8ef6242 | ||
|
|
707f9870ba | ||
|
|
26fe14166f | ||
|
|
1259760b63 | ||
|
|
9f315fd6f8 | ||
|
|
c6c4932d6c | ||
|
|
7a3247e23b | ||
|
|
a6fcc4893f | ||
|
|
4ff62130e9 | ||
|
|
c8d4c53bff | ||
|
|
4606c57a5c | ||
|
|
231c74cf2b | ||
|
|
3cc8a10875 | ||
|
|
dd7bb02a99 | ||
|
|
0856c30182 | ||
|
|
ef315fa054 | ||
|
|
1a1a070926 | ||
|
|
113874c5f5 | ||
|
|
58954a525e | ||
|
|
f0f1719546 | ||
|
|
47aa3de9f4 | ||
|
|
be9c42975f | ||
|
|
20b936fbd2 | ||
|
|
75e8fc40f8 | ||
|
|
9624b35110 | ||
|
|
10a0ecfe61 | ||
|
|
b1d0c95b4b | ||
|
|
961afa7d2f | ||
|
|
2ce235df9c | ||
|
|
07432a0f9d | ||
|
|
8dc0dbec88 | ||
|
|
270f765604 | ||
|
|
d1ea838331 | ||
|
|
d3172d80ef | ||
|
|
c36cde4138 | ||
|
|
71f2c2f9ec | ||
|
|
ed0c88b7f7 | ||
|
|
fabd45e6c6 | ||
|
|
08aa2e4bde | ||
|
|
5d4eefe8d8 | ||
|
|
fc6aa385f9 | ||
|
|
13cfe05e30 | ||
|
|
e7a73d59e6 | ||
|
|
20e7435ae7 | ||
|
|
555250c779 | ||
|
|
ca47081c5b | ||
|
|
5e8ad5a577 | ||
|
|
b19705597b | ||
|
|
e46de77883 | ||
|
|
a65fa10c4b | ||
|
|
6e38ee2da0 | ||
|
|
b1476fec95 | ||
|
|
48cb109a87 | ||
|
|
f18a0a4331 | ||
|
|
9200ad37c9 | ||
|
|
6b51b6027d | ||
|
|
4d70e59a85 | ||
|
|
d883ecee8a | ||
|
|
3be49c9564 | ||
|
|
898a08f344 | ||
|
|
a765a451e6 | ||
|
|
e246ae8765 | ||
|
|
57f1b329c9 | ||
|
|
998eae92d1 | ||
|
|
eb8c7c7924 | ||
|
|
bf94a704bc | ||
|
|
e3a15bed3c | ||
|
|
4dd5a9b806 | ||
|
|
8ddf290477 | ||
|
|
a197ef9f3c | ||
|
|
a2d3645e9c | ||
|
|
edc46711dd | ||
|
|
06db9a8db3 | ||
|
|
096564b06c | ||
|
|
0476aba87e | ||
|
|
8082ce8f53 | ||
|
|
7b5a5af07f | ||
|
|
c4731cc3f0 | ||
|
|
a19cffba7e | ||
|
|
f9fce0782d | ||
|
|
1aa01e7b7b | ||
|
|
8478414c5d | ||
|
|
bca7546dcd | ||
|
|
c7582bc4ab | ||
|
|
0cae6713e7 | ||
|
|
9c2d071799 | ||
|
|
35c14d81cf | ||
|
|
7387f60b85 | ||
|
|
8e369dfcaa | ||
|
|
196c0a27f0 | ||
|
|
bc1d502816 | ||
|
|
9ea7513f11 | ||
|
|
e7328f4f56 | ||
|
|
2a0577baa1 | ||
|
|
6dc48e999d | ||
|
|
f382570992 | ||
|
|
1e99421584 | ||
|
|
a06c23be9b | ||
|
|
d3defdfba8 | ||
|
|
5db7818497 | ||
|
|
1950561a91 | ||
|
|
13b5f7bc46 | ||
|
|
5c5d74ef09 | ||
|
|
dd408ec740 | ||
|
|
474e7801ff | ||
|
|
6970bbc17b | ||
|
|
db26cba77c | ||
|
|
f1052fb45f | ||
|
|
fae10f70e0 | ||
|
|
f484303d9e | ||
|
|
3f622f08e5 | ||
|
|
8287d3c4c4 | ||
|
|
8b86e4459b | ||
|
|
c44e7a8352 | ||
|
|
d11ec4a80f | ||
|
|
54651dc73c | ||
|
|
ae1e1e5e19 | ||
|
|
647e6ab644 | ||
|
|
41e1351fca | ||
|
|
1b5283ca7a | ||
|
|
dd7e9b194e | ||
|
|
40c0f14648 | ||
|
|
7f44579325 | ||
|
|
171778bed3 | ||
|
|
e7f7f3da11 | ||
|
|
1ccaa26ea4 | ||
|
|
376c3fe740 | ||
|
|
08da7047d0 | ||
|
|
0aa86039dd | ||
|
|
bfd09e35cc | ||
|
|
115372366e | ||
|
|
d67adf2b8c | ||
|
|
3ad83e6ad0 | ||
|
|
ad72fa61c8 | ||
|
|
c3ee42e3b0 | ||
|
|
ca3b34f491 | ||
|
|
cdcf38b40f | ||
|
|
3423927cfa | ||
|
|
fac400a428 | ||
|
|
894e9948f4 | ||
|
|
ed1684742a | ||
|
|
468dd2822c | ||
|
|
90f1e86e58 | ||
|
|
bfbd79ca59 | ||
|
|
fb71ae4c86 | ||
|
|
5b09432a60 | ||
|
|
3ba3797506 | ||
|
|
a64b525ff4 | ||
|
|
56533a5671 | ||
|
|
8999870c56 | ||
|
|
40540367af | ||
|
|
0806bbf608 | ||
|
|
589cf443b9 | ||
|
|
0430c3c938 | ||
|
|
db358e3feb | ||
|
|
032571f565 | ||
|
|
b38198f365 | ||
|
|
0e39b529b6 | ||
|
|
3957028d28 | ||
|
|
97c9216e92 | ||
|
|
f914ebb255 | ||
|
|
3fed986eee | ||
|
|
5cd334b32e | ||
|
|
a54b71f493 | ||
|
|
08f55c4b7c | ||
|
|
994746ffe9 | ||
|
|
645015312e | ||
|
|
642d250781 | ||
|
|
00fbb65ec1 | ||
|
|
0e96b5d2e7 | ||
|
|
2a8c9424f0 | ||
|
|
96074cef79 | ||
|
|
27893412b2 | ||
|
|
ff08632036 | ||
|
|
0868b5794a | ||
|
|
46945ad760 | ||
|
|
78d7d7b746 | ||
|
|
77cf4d48dd | ||
|
|
e7eeacebbc | ||
|
|
dee24e9fac | ||
|
|
65ffd691ee | ||
|
|
80ef68e006 | ||
|
|
b5b54d2fed | ||
|
|
1f2dc06993 | ||
|
|
2b477f5dc4 | ||
|
|
39d0a166c5 | ||
|
|
dae50ead45 | ||
|
|
be6aea6fb9 | ||
|
|
9e48e223db | ||
|
|
59b22bd058 | ||
|
|
77d5a18a9b | ||
|
|
4539e57b3c | ||
|
|
668807df85 | ||
|
|
b66bd5f56c | ||
|
|
7bac5533d7 | ||
|
|
28c635adb2 | ||
|
|
125ce0f85c | ||
|
|
157c31573e | ||
|
|
67fbe7e2a0 | ||
|
|
c734236a6f | ||
|
|
d6261d35c9 | ||
|
|
db0d476b12 | ||
|
|
07add9a796 | ||
|
|
46e594f9bc | ||
|
|
6501594508 | ||
|
|
d60127857c | ||
|
|
0a4ebdb1d3 | ||
|
|
559f32b40d | ||
|
|
bffbff4ff2 | ||
|
|
d30365509d | ||
|
|
9a27ea2eb2 | ||
|
|
61b2bceab7 | ||
|
|
0f5bb7dd4e | ||
|
|
a0766fb80f | ||
|
|
867c8b0e85 | ||
|
|
98270d63fb | ||
|
|
d9076a130e | ||
|
|
8d5798a538 | ||
|
|
1ee4fffc88 | ||
|
|
4fd5e02337 | ||
|
|
92462cca2a | ||
|
|
a162f70539 | ||
|
|
cbdd9172f9 | ||
|
|
bc48b59612 | ||
|
|
901dc5cba9 | ||
|
|
108ff5810f | ||
|
|
4b11c1f734 | ||
|
|
3cf365bf7e | ||
|
|
f2a1097c92 | ||
|
|
3d2009b52d | ||
|
|
73a206d970 | ||
|
|
dad89f8b93 | ||
|
|
23d3bb9416 | ||
|
|
cd0c914437 | ||
|
|
dace9c7477 | ||
|
|
1acf1ddd65 | ||
|
|
771bc6ea9d | ||
|
|
634a39aad5 | ||
|
|
7af9c3c085 | ||
|
|
d8c0345769 | ||
|
|
0a25564c1c | ||
|
|
7565800a11 | ||
|
|
2d97b1c61b | ||
|
|
1fdc84d5a2 | ||
|
|
c93ac403ed | ||
|
|
4c9f46a4a1 | ||
|
|
59d16049d8 | ||
|
|
5a83986f79 | ||
|
|
150ca569b5 | ||
|
|
048a38dc54 | ||
|
|
ece1dc4e51 | ||
|
|
c1a461273d | ||
|
|
da36bbf417 | ||
|
|
74e5374045 | ||
|
|
f039432d03 | ||
|
|
5af7e261fa | ||
|
|
ce1d9075d7 | ||
|
|
c23f5758dc | ||
|
|
af735060cb | ||
|
|
0ff57399ed | ||
|
|
447527eeb5 | ||
|
|
d845b9a5a3 | ||
|
|
f1b3fb4f3b | ||
|
|
94323ee2a7 | ||
|
|
c250ac3ddc | ||
|
|
badacafb98 | ||
|
|
d0672fcf74 | ||
|
|
91e23a4607 | ||
|
|
60d62033fb | ||
|
|
d02a83cba4 | ||
|
|
359c6f7e38 | ||
|
|
1554d14ce1 | ||
|
|
11f093839f | ||
|
|
d1520cea68 | ||
|
|
9cc8d1f6a9 | ||
|
|
48d1df6825 | ||
|
|
3a7457ae6c | ||
|
|
fe76db396c | ||
|
|
dd992130c6 | ||
|
|
02d760e232 | ||
|
|
4905751e2f | ||
|
|
d103085de3 | ||
|
|
9bc1a80b4e | ||
|
|
99ed77dea6 | ||
|
|
bda57be904 | ||
|
|
07053344dc | ||
|
|
f31052628d | ||
|
|
8e03e30c05 | ||
|
|
0ef3c5d7fc | ||
|
|
a06a563ea4 | ||
|
|
9250d1a34f | ||
|
|
a8d7df994f | ||
|
|
b10e58db1b | ||
|
|
a440742330 | ||
|
|
f466b6448a | ||
|
|
9f8bc128f0 | ||
|
|
b0cc976ab9 | ||
|
|
632b63d59c | ||
|
|
1db78f41bf | ||
|
|
7c48860ed8 | ||
|
|
1b0901bb9e | ||
|
|
76a9b4dc10 | ||
|
|
19d33cea2b | ||
|
|
c4ddb7f83a | ||
|
|
431db6c847 | ||
|
|
207d6b3cda | ||
|
|
bbefeb160b | ||
|
|
89d0895332 | ||
|
|
cb5153fefa | ||
|
|
b08eca15fd | ||
|
|
6f922edf2d | ||
|
|
85514c7e0b | ||
|
|
e060631c35 | ||
|
|
cac31ff114 | ||
|
|
f0e23dcff9 | ||
|
|
b3faad27ed | ||
|
|
38121144b2 | ||
|
|
73bc7f0777 | ||
|
|
99571c629e | ||
|
|
4f40ac7422 | ||
|
|
1610efe2fd | ||
|
|
1c70e83474 | ||
|
|
9a06759937 | ||
|
|
6161d60dde | ||
|
|
e3cd439763 | ||
|
|
5e1ffee4d6 | ||
|
|
910287474f | ||
|
|
6faa50c135 | ||
|
|
9fca49f67c | ||
|
|
8a3c0671e0 | ||
|
|
2f7eb5cdf5 | ||
|
|
8fb3745a09 | ||
|
|
aaba44e639 | ||
|
|
1cd88b2b5e | ||
|
|
60695039c0 | ||
|
|
806520fdc0 | ||
|
|
25a8d1f1e9 | ||
|
|
f0e50d53d5 | ||
|
|
40d99818ef | ||
|
|
0d6a1583c6 | ||
|
|
6f48de44ae | ||
|
|
9622d45140 | ||
|
|
890a087101 | ||
|
|
bc2e8cb6ce | ||
|
|
22cce6dadc | ||
|
|
82893aff55 | ||
|
|
c262673191 | ||
|
|
d8071546b1 | ||
|
|
d1e59e17e7 | ||
|
|
9afd1dd692 | ||
|
|
c1e3742914 | ||
|
|
157b3ef61f | ||
|
|
73e540ea1b | ||
|
|
12dd796d8a | ||
|
|
d1c7f62ba8 | ||
|
|
5d76644c3e | ||
|
|
750e5969ff | ||
|
|
6fc1cc1b6a | ||
|
|
9e37b40aa1 | ||
|
|
ebb207dc5a | ||
|
|
d0eeabbc32 | ||
|
|
259838277b | ||
|
|
0b6ee7158e | ||
|
|
3baa7fa854 | ||
|
|
0d13ededce | ||
|
|
a3a4a31c22 | ||
|
|
bf73dd5297 | ||
|
|
6002b5a2ed | ||
|
|
1c9a7ba541 | ||
|
|
e3a368948e | ||
|
|
12bf2f8f8b | ||
|
|
d12ba36443 | ||
|
|
007f495c2f | ||
|
|
0de4165e66 | ||
|
|
f90a5e94b8 | ||
|
|
88fc9ef946 | ||
|
|
fc6db4f55a | ||
|
|
a279b3a84b | ||
|
|
a56886d93d | ||
|
|
82105f5876 | ||
|
|
ea07044f83 | ||
|
|
b67ee7857a | ||
|
|
6796615496 | ||
|
|
88c9f81346 | ||
|
|
55865fda6c | ||
|
|
bdb9cd3f2c | ||
|
|
cef6937705 | ||
|
|
34942b9da8 | ||
|
|
4cbb965035 | ||
|
|
62edaf0b55 | ||
|
|
c274f255c3 | ||
|
|
e7fa925898 | ||
|
|
b003c8fdfa | ||
|
|
2279aec4a3 | ||
|
|
1f74a371e0 | ||
|
|
ae295f9bab | ||
|
|
28a81b47c1 | ||
|
|
9b56140087 | ||
|
|
8907976270 | ||
|
|
3354e7502c | ||
|
|
64bae48df6 | ||
|
|
9d3c3cb2c7 | ||
|
|
9a16aa9fde | ||
|
|
a6f5dd6269 | ||
|
|
9174cee25d | ||
|
|
7d98d28569 | ||
|
|
e441de9acc | ||
|
|
36ca174d81 | ||
|
|
76659f726f | ||
|
|
42a64ac80e | ||
|
|
6783ad7832 | ||
|
|
e8b570e45a | ||
|
|
cf6eaeb03b | ||
|
|
42ccae28c6 | ||
|
|
c850864a19 | ||
|
|
c93a59ac4f | ||
|
|
abc54153b1 | ||
|
|
c4a52014f7 | ||
|
|
c7a0b8f429 | ||
|
|
154588d722 | ||
|
|
f9270b650f | ||
|
|
5f724e01b9 | ||
|
|
c37f2f6355 | ||
|
|
dcf32e94d2 | ||
|
|
3e47e246f8 | ||
|
|
d5c056d478 | ||
|
|
da96ede53c | ||
|
|
6a9f42807f | ||
|
|
36564cbefd | ||
|
|
95836befb3 | ||
|
|
0b8e81aab9 | ||
|
|
a0119464b8 | ||
|
|
00811477e8 | ||
|
|
e144c80776 | ||
|
|
ac4f985ac9 | ||
|
|
560d7d9dac | ||
|
|
e7a7a48ee6 | ||
|
|
95e8d410ff | ||
|
|
d3b1ca9174 | ||
|
|
d70fb569fb | ||
|
|
e5e1c6d4fd | ||
|
|
d17b6bc300 | ||
|
|
114946fdb0 | ||
|
|
30edff7a36 | ||
|
|
d3ffbea816 | ||
|
|
cc7d631369 | ||
|
|
4e8d80cad7 | ||
|
|
a1d8c38553 | ||
|
|
0501984933 | ||
|
|
f8474e2421 | ||
|
|
ddd5fa0ce5 | ||
|
|
a7a7424b8b | ||
|
|
69b1c4026c | ||
|
|
0fe4e6b443 | ||
|
|
8cee2c6772 | ||
|
|
eb4109b66e | ||
|
|
e0cbae44cd | ||
|
|
8f913cc64f | ||
|
|
64dec9fafb | ||
|
|
a625377e8c | ||
|
|
c5027d831c | ||
|
|
f4143898b2 | ||
|
|
5101382ec6 | ||
|
|
dd886e9690 | ||
|
|
6a821331eb | ||
|
|
d679966505 | ||
|
|
f01319465c | ||
|
|
1dbd1aff6f | ||
|
|
69e1d626bd | ||
|
|
609582a161 | ||
|
|
bc95e393d8 | ||
|
|
379dcf4c48 | ||
|
|
ffd4e9684a | ||
|
|
809b33b2ff | ||
|
|
2a8c4e283e | ||
|
|
e6bc0dccbc | ||
|
|
b6d265e347 | ||
|
|
4de61e5f98 | ||
|
|
1f6f06f7de | ||
|
|
69d1c5772e | ||
|
|
d577eef9e4 | ||
|
|
a36f86a13e | ||
|
|
924b7e2291 | ||
|
|
2e2161c97a | ||
|
|
f3df8336ae | ||
|
|
a66cc3009b | ||
|
|
cf3d3f1e6e | ||
|
|
832dfa7e1f | ||
|
|
35af2e8613 | ||
|
|
de9d4e9f91 | ||
|
|
fb059dc67c | ||
|
|
12562e897d | ||
|
|
cc40ff77a8 | ||
|
|
294b139566 | ||
|
|
54047adacd | ||
|
|
4d062fbe6d | ||
|
|
23dfcdb368 | ||
|
|
e6a9ce41b6 | ||
|
|
03e24361ee | ||
|
|
24c8bc7107 | ||
|
|
4ab8ea3cb7 | ||
|
|
75e403b3b3 | ||
|
|
367c2367a6 | ||
|
|
1ff7d4be9b | ||
|
|
43dcc7ef21 | ||
|
|
b655fc9cf7 | ||
|
|
b6dfae5d0e | ||
|
|
1f8c95df83 | ||
|
|
2af4373a90 | ||
|
|
20203a77e1 | ||
|
|
d712631a71 | ||
|
|
2d9a947471 | ||
|
|
47a4b79f74 | ||
|
|
b967ecb86b | ||
|
|
4fa4d097bd | ||
|
|
5050912be0 |
4
COPYING
4
COPYING
@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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
|
||||
@@ -313,7 +313,7 @@ Also add information on how to contact you by electronic and paper mail.
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
111
Makefile.maint
111
Makefile.maint
@@ -11,35 +11,60 @@ maintainer-check:
|
||||
$(MAKE) distcheck
|
||||
$(MAKE) my-distcheck
|
||||
|
||||
prev-version := $(shell echo $(VERSION)|tr a-z Xa-y)
|
||||
tag-package = $(shell echo "$(PACKAGE)" | tr a-z A-Z)
|
||||
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)
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
pkg=`echo "$(PACKAGE)" | tr a-z A-Z`; \
|
||||
ver=`echo "$(VERSION)" | sed 's/\./_/g'`; \
|
||||
tag="$$pkg-$$ver"; \
|
||||
echo tag=$$tag; \
|
||||
if cvs -n log -h README| grep -e $$tag: > /dev/null; then \
|
||||
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 $$tag
|
||||
cvs tag -c $(this-cvs-tag)
|
||||
$(MAKE) dist
|
||||
|
||||
# Use this to make sure we don't run these programs when building
|
||||
# from a virgin tgz file, below.
|
||||
null_AM_MAKEFLAGS = \
|
||||
ACLOCAL=false \
|
||||
AUTOCONF=false \
|
||||
AUTOMAKE=false \
|
||||
AUTOHEADER=false \
|
||||
MAKEINFO=false
|
||||
|
||||
t=./=test
|
||||
my-distcheck:
|
||||
my-distcheck: writable-files po-check
|
||||
|
||||
-rm -rf $(t)
|
||||
mkdir $(t)
|
||||
GZIP=$(GZIP) $(TAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
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.
|
||||
cd $(t)/$(distdir) \
|
||||
&& ./configure --disable-nls \
|
||||
&& $(MAKE) CFLAGS='-Wformat -Werror' \
|
||||
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(MAKE) check \
|
||||
&& rm -rf $(DEPDIR) \
|
||||
&& $(MAKE) distclean
|
||||
cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(TAR) -zxf ../$(distdir).tar.gz
|
||||
&& $(AMTAR) -zxf ../$(distdir).tar.gz
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
-rm -rf $(t)
|
||||
@echo "========================"; \
|
||||
@@ -48,17 +73,20 @@ my-distcheck:
|
||||
|
||||
THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
|
||||
# FIXME: this works only for Gnits-style test releases.
|
||||
PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y)
|
||||
PREV_VERSION := $(shell echo $(VERSION)|tr b-z a-y|sed 's/a$$//')
|
||||
PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
|
||||
v = Version
|
||||
url_list = \
|
||||
ftp://alpha.gnu.org/gnu/fetish/$(distdir).tar.gz \
|
||||
ftp://tug.org/pub/gnu/fetish/$(distdir).tar.gz \
|
||||
ftp://ftp.enst.fr/pub/gnu/gnits/fetish/$(distdir).tar.gz
|
||||
dir_list = \
|
||||
/fs/share/ftp/gnu/fetish \
|
||||
/home/ftp/pub/gnu/fetish \
|
||||
/pub/gnu/gnits/fetish
|
||||
|
||||
a_host=alpha.gnu.org
|
||||
b_host=tug.org
|
||||
|
||||
a_url_dir=gnu/fetish
|
||||
b_url_dir=gnu/fetish
|
||||
|
||||
a_real_dir=/fs/share/ftp/gnu/fetish
|
||||
b_real_dir=/home/ftp/pub/gnu/fetish
|
||||
|
||||
url_dir_list = $(foreach x,a b,ftp://$($(x)_host)/$($(x)_url_dir))
|
||||
|
||||
md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
|
||||
|
||||
@@ -71,14 +99,24 @@ 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
|
||||
@( \
|
||||
echo Subject: $(distdir) released; \
|
||||
echo; \
|
||||
echo FIXME: put comments here; \
|
||||
echo; \
|
||||
for url in $(url_list); do \
|
||||
echo " $$url"; \
|
||||
for url in $(url_dir_list); do \
|
||||
echo " $$url/$(distdir).tar.gz"; \
|
||||
done; \
|
||||
echo; \
|
||||
echo And here are xdelta-style diffs; \
|
||||
echo; \
|
||||
for url in $(url_dir_list); do \
|
||||
echo " $$url/$(xd-delta)"; \
|
||||
done; \
|
||||
echo; \
|
||||
echo "$(md5) $(distdir).tar.gz"; \
|
||||
@@ -88,20 +126,35 @@ announcement: NEWS ChangeLog $(distdir).tar.gz
|
||||
| grep -v '^\['; \
|
||||
echo; \
|
||||
echo ChangeLog entries:; \
|
||||
sed -n "1,/$v $(PREV_VERSION_REGEXP)/p" \
|
||||
ChangeLog; \
|
||||
find . -name ChangeLog \
|
||||
| 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"'; \
|
||||
)
|
||||
|
||||
alpha:
|
||||
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 || :
|
||||
|
||||
alpha: writable-files po-check
|
||||
$(MAKE) cvs-dist
|
||||
$(MAKE) -s announcement > /tmp/announcement
|
||||
$(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)
|
||||
@echo =====================================
|
||||
@for url in $(dir_list); do \
|
||||
echo "ncftp -u $$url"; \
|
||||
done
|
||||
@echo '# put $(distdir).tar.gz'
|
||||
@echo =====================================
|
||||
@echo 'scp $(xd-delta) $(distdir).tar.gz \'
|
||||
@echo ' $(b_host):$(b_real_dir)'
|
||||
@echo '# send the /tmp/announcement e-mail'
|
||||
@echo 'pot-mail $(distdir).tar.gz | bash'
|
||||
@echo =====================================
|
||||
@echo =====================================
|
||||
|
||||
34
THANKS
34
THANKS
@@ -8,7 +8,8 @@ Akim Demaille: demaille@inf.enst.fr
|
||||
Alain Magloire: alain@qnx.com
|
||||
Alexey Solovyov: alekso@math.uu.se
|
||||
Andreas Jaeger: jaeger@gnu.org
|
||||
Andreas Schwab: schwab@issan.informatik.uni-dortmund.de
|
||||
Andreas Schwab: schwab@suse.de
|
||||
Andres Soolo: andres@soolo.matti.ee
|
||||
Andrew Dalke: dalke@bioreason.com
|
||||
Andrew Tridgell: tridge@samba.org
|
||||
Andries Brouwer: Andries.Brouwer@cwi.nl
|
||||
@@ -16,12 +17,17 @@ Arne Henrik Juul: arnej@imf.unit.no
|
||||
Bauke Jan Douma: bjdouma@xs4all.nl
|
||||
Bengt Martensson: bengt@mathematik.uni-Bremen.de
|
||||
Bernd Leibing: bernd.leibing@rz.uni-ulm.de
|
||||
Bernhard Rosenkraenzer: bero@redhat.de
|
||||
Bjorn Helgaas: helgaas@rsn.hp.com
|
||||
Bob McCracken: kerouac@ravenet.com
|
||||
Bob Proulx: rwp@fc.hp.com
|
||||
Brendan O'Dea: bod@compusol.com.au
|
||||
Charles Karney: karney@pppl.gov
|
||||
Chip Salzenberg: chip@valinux.com
|
||||
Chris Yeo: cyeo@biking.org
|
||||
Christian von Roques: roques@pond.sub.org
|
||||
Colin Plumb: colin@nyx.net
|
||||
David Godfrey: dave@delta.demon.co.uk
|
||||
Dirk Lattermann: dlatt@t-online.de
|
||||
Don Parsons: dparsons@synapse.kent.edu
|
||||
Eirik Fuller: eirik@netcom.com
|
||||
@@ -29,20 +35,29 @@ Eli Zaretskii: eliz@is.elta.co.il
|
||||
Emile LeBlanc: leblanc@math.toronto.edu
|
||||
François Pinard: pinard@iro.umontreal.ca
|
||||
Galen Hazelwood: galenh@micron.net
|
||||
Germano Leichsenring: germano@jedi.cs.kobe-u.ac.jp
|
||||
Göran Uddeborg: goeran@uddeborg.pp.se
|
||||
Greg McGary: gkm@eng.ascend.com
|
||||
Gabor Z. Papp: gzp@gzp.org.hu
|
||||
H. J. Lu: hjl@valinux.com
|
||||
Holger Berger: hberger@ess.nec.de
|
||||
Hugh Daniel: hugh@xanadu.com
|
||||
James: james@albion.glarp.com
|
||||
James Antill: jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
James Sneeringer: jvs@ocslink.com
|
||||
James Tanis: jtt@soscorp.com
|
||||
Jamie Lokier: jamie@imbolc.ucc.ie
|
||||
Janos Farkas: chexum@shadow.banki.hu
|
||||
Jesse Thilo: jgt2@eecs.lehigh.edu
|
||||
Joakim Rosqvist: dvljrt@cs.umu.se
|
||||
Joe Orton: joe@orton.demon.co.uk
|
||||
Johan Danielsson: joda@pdc.kth.se
|
||||
John Bley: jbb6@acpub.duke.edu
|
||||
John Gatewood Ham: zappaman@alphabox.compsci.buu.ac.th
|
||||
John Gotts: jgotts@umich.edu
|
||||
Jürgen Fluk: louis@dachau.marco.de
|
||||
jvogel: jvogel@linkny.com
|
||||
Kalle Olavi Niemitalo: tosi@stekt.oulu.fi
|
||||
Karl Heuer: kwzh@gnu.org
|
||||
Kjetil Torgrim Homme: kjetilho@ifi.uio.no
|
||||
Larry McVoy: lm@sgi.com
|
||||
@@ -52,27 +67,42 @@ Marcus Daniels: marcus@sysc.pdx.edu
|
||||
Mark A. Thomas: thommark@access.digex.net
|
||||
Mark Harris: mark@monitor.designacc.com
|
||||
Mark Kettenis: kettenis@phys.uva.nl
|
||||
Martin Mitchell: martin@debian.org
|
||||
Marty Leisner: leisner@sdsp.mc.xerox.com
|
||||
Masami Takikawa: takikawm@CS.ORST.EDU
|
||||
Matthew S. Levine: mslevine@theory.lcs.mit.edu
|
||||
Matthew Swift: swift@alum.mit.edu
|
||||
Matthias Urlichs: smurf@noris.de
|
||||
Michiel Bacchiani: bacchian@raven.bu.edu
|
||||
Michael ???:michael@roka.net
|
||||
Michael Veksler: mveksler@techunix.technion.ac.il
|
||||
Michael Stone: mstone@debian.org
|
||||
Miles Bader: miles@gnu.ai.mit.edu
|
||||
Nelson H. F. Beebe: beebe@math.utah.edu
|
||||
Noel Cragg: noel@red-bean.com
|
||||
Olav Morkrid: olav@funcom.com
|
||||
Per Kristian Hove: perhov@math.ntnu.no
|
||||
Peter Eriksson: peter@ifm.liu.se
|
||||
Peter Moulder: reiter@netspace.net.au
|
||||
Peter Samuelson: psamuels@sampo.creighton.edu
|
||||
Paul Eggert: eggert@twinsun.com
|
||||
Paul Slootman: paul@debian.org
|
||||
Philippe De Muyter: phdm@macqel.be
|
||||
Rainer Orth: ro@TechFak.Uni-Bielefeld.DE
|
||||
Richard Braakman: dark@xs4all.nl
|
||||
Ross Ridge: rridge@calum.csclub.uwaterloo.ca
|
||||
Sami Farin: sfarin@ratol.fi
|
||||
Santiago Vila Doncel: sanvila@unex.es
|
||||
Scott Lurndal: slurn@griffin.engr.sgi.com
|
||||
Stuart Kemp: skemp@peter.bmc.com
|
||||
Thomas Bushnell, n/BSG: thomas@gnu.ai.mit.edu
|
||||
Ton Hospel: thospel@mail.dma.be
|
||||
Torbjorn Lindgren: tl@funcom.no
|
||||
Torsten Landschoff: torsten@pclab.ifg.uni-kiel.de
|
||||
Tony Leneis: tony@plaza.ds.adp.com
|
||||
Ulrich Drepper: drepper@cygnus.com
|
||||
Vin Shelton: acs@alumni.princeton.edu
|
||||
Volker Borchert: bt@teknon.de
|
||||
Michael Veksler: mveksler@techunix.technion.ac.il
|
||||
Wayne Stewart: wstewa@atl.com
|
||||
Wichert Akkerman: wichert@cistron.nl
|
||||
William Bader: william@nscs.fast.net
|
||||
|
||||
@@ -57,13 +57,23 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
@@ -74,20 +84,26 @@ INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MVDIR_PROG = @MVDIR_PROG@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
POW_LIBM = @POW_LIBM@
|
||||
RANLIB = @RANLIB@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
|
||||
@@ -104,9 +120,11 @@ 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
|
||||
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
|
||||
@@ -115,9 +133,8 @@ DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
|
||||
version.texi
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
@@ -165,7 +182,7 @@ DVIPS = dvips
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS=.:$$TEXINPUTS \
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.texi:
|
||||
@@ -184,7 +201,7 @@ DVIPS = dvips
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo.dvi:
|
||||
TEXINPUTS=.:$$TEXINPUTS \
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.txi.info:
|
||||
@@ -193,7 +210,7 @@ DVIPS = dvips
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.txi.dvi:
|
||||
TEXINPUTS=.:$$TEXINPUTS \
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.txi:
|
||||
@@ -209,7 +226,7 @@ install-info-am: $(INFO_DEPS)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
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; \
|
||||
@@ -228,24 +245,26 @@ install-info-am: $(INFO_DEPS)
|
||||
uninstall-info:
|
||||
$(PRE_UNINSTALL)
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
||||
ii=yes; \
|
||||
else ii=; fi; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
test -z "$ii" \
|
||||
|| install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
|
||||
done
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(INFO_DEPS)'; \
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
(cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
|
||||
(if cd $(DESTDIR)$(infodir); then \
|
||||
echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
|
||||
rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
|
||||
else :; fi); \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for file in `cd $$d && eval echo $$base*`; do \
|
||||
for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
@@ -258,7 +277,7 @@ mostlyclean-aminfo:
|
||||
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.cn fileutils.cm fileutils.ov
|
||||
|
||||
clean-aminfo:
|
||||
|
||||
@@ -277,18 +296,11 @@ TAGS:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = doc
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits doc/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
@@ -332,6 +344,7 @@ distclean-generic:
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-rm -f Makefile.in
|
||||
mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
@@ -356,8 +369,8 @@ 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 installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ numerically or literally. All these strings specify the same calendar date:
|
||||
|
||||
@example
|
||||
1970-09-17 # ISO 8601.
|
||||
70-9-17 # This century assumed by default.
|
||||
70-9-17 # Assume 19xx for 69 through 99, 20xx for 00 through 68.
|
||||
70-09-17 # Leading zeros are ignored.
|
||||
9/17/72 # Common U.S. writing.
|
||||
24 September 1972
|
||||
@@ -141,8 +141,9 @@ For numeric months, the ISO 8601 format
|
||||
@samp{@var{year}-@var{month}-@var{day}} is allowed, where @var{year} is
|
||||
any positive number, @var{month} is a number between 01 and 12, and
|
||||
@var{day} is a number between 01 and 31. A leading zero must be present
|
||||
if a number is less than ten. If @var{year} is less than 100, then 1900
|
||||
is added to it to force a date in this century. The construct
|
||||
if a number is less than ten. If @var{year} is 68 or smaller, then 2000
|
||||
is added to it; otherwise, if @var{year} is less than 100,
|
||||
then 1900 is added to it. The construct
|
||||
@samp{@var{month}/@var{day}/@var{year}}, popular in the United States,
|
||||
is accepted. Also @samp{@var{month}/@var{day}}, omitting the year.
|
||||
|
||||
|
||||
@@ -430,7 +430,7 @@ the file to all users.
|
||||
@cindex numeric modes
|
||||
@cindex file permissions, numeric
|
||||
@cindex octal numbers for file modes
|
||||
File permissions are stored internally as 16 bit integers. As an
|
||||
File permissions are stored internally as integers. As an
|
||||
alternative to giving a symbolic mode, you can give an octal (base 8)
|
||||
number that corresponds to the internal representation of the new mode.
|
||||
This number is always interpreted in octal; you do not have to add a
|
||||
@@ -440,12 +440,13 @@ A numeric mode is usually shorter than the corresponding symbolic
|
||||
mode, but it is limited in that it can not take into account a file's
|
||||
previous permissions; it can only set them absolutely.
|
||||
|
||||
The permissions granted to the user, to other users in the file's group,
|
||||
On most systems, the permissions granted to the user,
|
||||
to other users in the file's group,
|
||||
and to other users not in the file's group are each stored as three
|
||||
bits, which are represented as one octal digit. The three special
|
||||
permissions are also each stored as one bit, and they are as a group
|
||||
represented as another octal digit. Here is how the bits are arranged
|
||||
in the 16 bit integer, starting with the lowest valued bit:
|
||||
represented as another octal digit. Here is how the bits are arranged,
|
||||
starting with the lowest valued bit:
|
||||
|
||||
@example
|
||||
Value in Corresponding
|
||||
|
||||
@@ -366,15 +366,21 @@ pipeline.
|
||||
@section @code{false}: Do nothing, unsuccessfully
|
||||
|
||||
@pindex false
|
||||
|
||||
@cindex exit status of @code{true}
|
||||
@cindex do nothing, unsuccessfully
|
||||
@cindex failure exit status
|
||||
@cindex exit status of @code{false}
|
||||
|
||||
@code{false} does nothing except return an exit status of 1, meaning
|
||||
@dfn{failure}. It can be used as a place holder in shell scripts
|
||||
where an unsuccessful command is needed.
|
||||
|
||||
Any arguments are ignored, except for a lone @samp{--help} or
|
||||
@samp{--version} (@pxref{Common options}).
|
||||
@code{false} ignores @emph{all} command line arguments, even @samp{--help}
|
||||
and @samp{--version}, since to do otherwise would change expected
|
||||
behavior that some programmers may be relying on.
|
||||
|
||||
This version of @code{false} is implemented as a C program, and is thus
|
||||
more secure and faster than a shell script implementation, and may safely
|
||||
be used as a dummy shell for the purpose of disabling accounts.
|
||||
|
||||
|
||||
@node true invocation
|
||||
@@ -384,15 +390,20 @@ Any arguments are ignored, except for a lone @samp{--help} or
|
||||
@cindex do nothing, successfully
|
||||
@cindex no-op
|
||||
@cindex successful exit
|
||||
|
||||
@cindex exit status of @code{true}
|
||||
|
||||
@code{true} does nothing except return an exit status of 0, meaning
|
||||
@dfn{success}. It can be used as a place holder in shell scripts
|
||||
where a successful command is needed, although the shell built-in
|
||||
command @code{:} (colon) may be faster.
|
||||
command @code{:} (colon) does the same thing faster.
|
||||
|
||||
Any arguments are ignored, except for a lone @samp{--help} or
|
||||
@samp{--version} (@pxref{Common options}).
|
||||
@code{true} ignores @emph{all} command line arguments, even @samp{--help}
|
||||
and @samp{--version}, since to do otherwise would change expected
|
||||
behavior that some programmers may be relying on.
|
||||
|
||||
This version of @code{true} is implemented as a C program, and is thus
|
||||
more secure and faster than a shell script implementation, and may safely
|
||||
be used as a dummy shell for the purpose of disabling accounts.
|
||||
|
||||
|
||||
@node test invocation
|
||||
@@ -1165,7 +1176,7 @@ Print all current settings in human-readable form. This option may not
|
||||
be used in combination with any line settings.
|
||||
|
||||
@item -F @var{device}
|
||||
@itemx --file @var{device}
|
||||
@itemx --file=@var{device}
|
||||
@opindex -F
|
||||
@opindex --file
|
||||
Set the line opened by the filename specified in @var{device} instead of
|
||||
@@ -2390,6 +2401,32 @@ input. This is useful when you have many dates to process, because the
|
||||
system overhead of starting up the @code{date} executable many times can
|
||||
be considerable.
|
||||
|
||||
@item -I[@var{timespec}]
|
||||
@itemx --iso-8601[=@var{timespec}]
|
||||
@opindex -I[@var{timespec}]
|
||||
@opindex --iso-8601[=@var{timespec}]
|
||||
Display the date using the ISO 8601 format, @samp{%Y-%m-%d}.
|
||||
|
||||
The optional argument @var{timespec} specifies the number of additional
|
||||
terms of the time to include. It can be one of the following:
|
||||
@table @samp
|
||||
@item auto
|
||||
The default behavior: print just the date.
|
||||
|
||||
@item hours
|
||||
Append the hour of the day to the date.
|
||||
|
||||
@item minutes
|
||||
Append the hours and minutes.
|
||||
|
||||
@item seconds
|
||||
Append the hours, minutes, and seconds.
|
||||
@end table
|
||||
|
||||
If showing any time terms, then include the time zone using the format
|
||||
@samp{%z}. If @samp{--utc} is also specified, use @samp{%Z} in place of
|
||||
@samp{%z}.
|
||||
|
||||
@item -R
|
||||
@itemx --rfc-822
|
||||
@opindex -R
|
||||
@@ -3004,7 +3041,7 @@ the values of the command line arguments.
|
||||
Synopsis:
|
||||
|
||||
@example
|
||||
sleep [@var{number}[smhd]]@dots{}
|
||||
sleep @var{number}[smhd]@dots{}
|
||||
@end example
|
||||
|
||||
@cindex time units
|
||||
@@ -3022,6 +3059,10 @@ hours
|
||||
days
|
||||
@end table
|
||||
|
||||
Historical implementations of @code{sleep} have required that
|
||||
@var{number} be an integer. However, GNU @code{sleep} accepts
|
||||
arbitrary floating point numbers.
|
||||
|
||||
The only options are @samp{--help} and @samp{--version}. @xref{Common
|
||||
options}.
|
||||
|
||||
@@ -3057,6 +3098,23 @@ numbers from standard input, delimited by newlines, tabs, or spaces.
|
||||
The only options are @samp{--help} and @samp{--version}. @xref{Common
|
||||
options}.
|
||||
|
||||
The algorithm it uses is not very sophisticated, so for some inputs
|
||||
@code{factor} runs for a long time. The hardest numbers to factor are
|
||||
the products of large primes. Factoring the square of the largest 32-bit
|
||||
prime number takes over 10 minutes of CPU time on a 400MHz Pentium II.
|
||||
|
||||
@example
|
||||
$ factor `echo '4294967291^2'|bc`
|
||||
18446744030759878681: 4294967291 4294967291
|
||||
@end example
|
||||
|
||||
In contrast, @code{factor} factors the largest 64-bit number in just
|
||||
over a tenth of a second:
|
||||
|
||||
@example
|
||||
$ factor `echo '2^64-1'|bc`
|
||||
18446744073709551615: 3 5 17 257 641 65537 6700417
|
||||
@end example
|
||||
|
||||
@node seq invocation
|
||||
@section @code{seq}: Print numeric sequences
|
||||
@@ -3085,8 +3143,8 @@ The program accepts the following options. Also see @ref{Common options}.
|
||||
@opindex --format=@var{format}
|
||||
@cindex formatting of numbers in @code{seq}
|
||||
Print all numbers using @var{format}; default @samp{%g}.
|
||||
@var{format} must contain exactly one of the standarding float output
|
||||
formats @samp{%e}, @samp{%f}, or @samp{%g}.
|
||||
@var{format} must contain exactly one of the standarding floating point
|
||||
output formats @samp{%e}, @samp{%f}, or @samp{%g}.
|
||||
|
||||
@item -s @var{string}
|
||||
@itemx --separator=@var{string}
|
||||
@@ -3101,6 +3159,66 @@ Print all numbers with the same width, by padding with leading zeroes.
|
||||
|
||||
@end table
|
||||
|
||||
If you want to use @code{seq} to print sequences of large integer values,
|
||||
don't use the default @samp{%g} format since it can result in
|
||||
loss of precision:
|
||||
|
||||
@example
|
||||
$ seq 1000000 1000001
|
||||
1e+06
|
||||
1e+06
|
||||
@end example
|
||||
|
||||
Instead, you can use the format, @samp{%1.f},
|
||||
to print large decimal numbers with no exponent and no decimal point.
|
||||
|
||||
@example
|
||||
$ seq --format=%1.f 1000000 1000001
|
||||
1000000
|
||||
1000001
|
||||
@end example
|
||||
|
||||
If you want hexadecimal output, you can use @code{printf}
|
||||
to perform the conversion:
|
||||
|
||||
@example
|
||||
$ printf %x'\n' `seq -f %1.f 1048575 1024 1050623`
|
||||
fffff
|
||||
1003ff
|
||||
1007ff
|
||||
@end example
|
||||
|
||||
For very long lists of numbers, use xargs to avoid
|
||||
system limitations on the length of an argument list:
|
||||
|
||||
@example
|
||||
$ seq -f %1.f 1000000 | xargs printf %x'\n' |tail -3
|
||||
f423e
|
||||
f423f
|
||||
f4240
|
||||
@end example
|
||||
|
||||
To generate octal output, use the printf @code{%o} format instead
|
||||
of @code{%x}. Note however that using printf works only for numbers
|
||||
smaller than @code{2^32}:
|
||||
|
||||
@example
|
||||
$ printf "%x\n" `seq -f %1.f 4294967295 4294967296`
|
||||
ffffffff
|
||||
bash: printf: 4294967296: Numerical result out of range
|
||||
@end example
|
||||
|
||||
On most systems, seq can produce whole-number output for values up to
|
||||
@code{2^53}, so here's a more general approach to base conversion that
|
||||
also happens to be more robust for such large numbers. It works by
|
||||
using @code{bc} and setting its output radix variable, @var{obase},
|
||||
to @samp{16} in this case to produce hexadecimal output.
|
||||
|
||||
@example
|
||||
$ (echo obase=16; seq -f %1.f 4294967295 4294967296)|bc
|
||||
FFFFFFFF
|
||||
100000000
|
||||
@end example
|
||||
|
||||
@node Index
|
||||
@unnumbered Index
|
||||
|
||||
581
doc/texinfo.tex
581
doc/texinfo.tex
@@ -3,7 +3,7 @@
|
||||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{1999-03-31.13}%
|
||||
\def\texinfoversion{1999-09-25.10}
|
||||
%
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
|
||||
% Free Software Foundation, Inc.
|
||||
@@ -29,15 +29,15 @@
|
||||
%
|
||||
% Please try the latest version of texinfo.tex before submitting bug
|
||||
% reports; you can get the latest version from:
|
||||
% ftp://ftp.gnu.org/pub/gnu/texinfo.tex
|
||||
% ftp://ftp.gnu.org/gnu/texinfo.tex
|
||||
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
|
||||
% ftp://tug.org/tex/texinfo.tex
|
||||
% ftp://ctan.org/macros/texinfo/texinfo.tex
|
||||
% (and all CTAN mirrors, finger ctan@ctan.org for a list).
|
||||
% ftp://texinfo.org/tex/texinfo.tex
|
||||
% ftp://us.ctan.org/macros/texinfo/texinfo.tex
|
||||
% (and all CTAN mirrors, finger ctan@us.ctan.org for a list).
|
||||
% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
|
||||
% The texinfo.tex in any given Texinfo distribution could well be out
|
||||
% of date, so if that's what you're using, please check.
|
||||
% There is a small home page for Texinfo at http://texinfo.org/.
|
||||
% Texinfo has a small home page at http://texinfo.org/.
|
||||
%
|
||||
% Send bug reports to bug-texinfo@gnu.org. Please include including a
|
||||
% complete document in each bug report with which we can reproduce the
|
||||
@@ -67,7 +67,6 @@
|
||||
\catcode`+=\active \catcode`\_=\active}
|
||||
|
||||
% Save some parts of plain tex whose names we will redefine.
|
||||
|
||||
\let\ptexb=\b
|
||||
\let\ptexbullet=\bullet
|
||||
\let\ptexc=\c
|
||||
@@ -87,7 +86,6 @@
|
||||
% For @tex, we can use \tabalign.
|
||||
\let\+ = \relax
|
||||
|
||||
|
||||
\message{Basics,}
|
||||
\chardef\other=12
|
||||
|
||||
@@ -245,6 +243,8 @@
|
||||
\unvbox\footlinebox
|
||||
\fi
|
||||
%
|
||||
\ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi
|
||||
%
|
||||
\ifcropmarks
|
||||
\egroup % end of \vbox\bgroup
|
||||
\hfil\egroup % end of (centering) \line\bgroup
|
||||
@@ -599,36 +599,42 @@ where each line of input produces a line of output.}
|
||||
%}}
|
||||
|
||||
\def\needx#1{%
|
||||
% Go into vertical mode, so we don't make a big box in the middle of a
|
||||
% Ensure vertical mode, so we don't make a big box in the middle of a
|
||||
% paragraph.
|
||||
\par
|
||||
%
|
||||
% Don't add any leading before our big empty box, but allow a page
|
||||
% break, since the best break might be right here.
|
||||
\allowbreak
|
||||
\nointerlineskip
|
||||
\vtop to #1\mil{\vfil}%
|
||||
%
|
||||
% TeX does not even consider page breaks if a penalty added to the
|
||||
% main vertical list is 10000 or more. But in order to see if the
|
||||
% empty box we just added fits on the page, we must make it consider
|
||||
% page breaks. On the other hand, we don't want to actually break the
|
||||
% page after the empty box. So we use a penalty of 9999.
|
||||
%
|
||||
% There is an extremely small chance that TeX will actually break the
|
||||
% page at this \penalty, if there are no other feasible breakpoints in
|
||||
% sight. (If the user is using lots of big @group commands, which
|
||||
% almost-but-not-quite fill up a page, TeX will have a hard time doing
|
||||
% good page breaking, for example.) However, I could not construct an
|
||||
% example where a page broke at this \penalty; if it happens in a real
|
||||
% document, then we can reconsider our strategy.
|
||||
\penalty9999
|
||||
%
|
||||
% Back up by the size of the box, whether we did a page break or not.
|
||||
\kern -#1\mil
|
||||
%
|
||||
% Do not allow a page break right after this kern.
|
||||
\nobreak
|
||||
% If the @need value is less than one line space, it's useless.
|
||||
\dimen0 = #1\mil
|
||||
\dimen2 = \ht\strutbox
|
||||
\advance\dimen2 by \dp\strutbox
|
||||
\ifdim\dimen0 > \dimen2
|
||||
%
|
||||
% Do a \strut just to make the height of this box be normal, so the
|
||||
% normal leading is inserted relative to the preceding line.
|
||||
% And a page break here is fine.
|
||||
\vtop to #1\mil{\strut\vfil}%
|
||||
%
|
||||
% TeX does not even consider page breaks if a penalty added to the
|
||||
% main vertical list is 10000 or more. But in order to see if the
|
||||
% empty box we just added fits on the page, we must make it consider
|
||||
% page breaks. On the other hand, we don't want to actually break the
|
||||
% page after the empty box. So we use a penalty of 9999.
|
||||
%
|
||||
% There is an extremely small chance that TeX will actually break the
|
||||
% page at this \penalty, if there are no other feasible breakpoints in
|
||||
% sight. (If the user is using lots of big @group commands, which
|
||||
% almost-but-not-quite fill up a page, TeX will have a hard time doing
|
||||
% good page breaking, for example.) However, I could not construct an
|
||||
% example where a page broke at this \penalty; if it happens in a real
|
||||
% document, then we can reconsider our strategy.
|
||||
\penalty9999
|
||||
%
|
||||
% Back up by the size of the box, whether we did a page break or not.
|
||||
\kern -#1\mil
|
||||
%
|
||||
% Do not allow a page break right after this kern.
|
||||
\nobreak
|
||||
\fi
|
||||
}
|
||||
|
||||
% @br forces paragraph break
|
||||
@@ -842,6 +848,178 @@ where each line of input produces a line of output.}
|
||||
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
|
||||
|
||||
|
||||
\message{pdf,}
|
||||
% adobe `portable' document format
|
||||
\newcount\tempnum
|
||||
\newcount\lnkcount
|
||||
\newtoks\filename
|
||||
\newcount\filenamelength
|
||||
\newcount\pgn
|
||||
\newtoks\toksA
|
||||
\newtoks\toksB
|
||||
\newtoks\toksC
|
||||
\newtoks\toksD
|
||||
\newbox\boxA
|
||||
\newcount\countA
|
||||
\newif\ifpdf
|
||||
\newif\ifpdfmakepagedest
|
||||
|
||||
\ifx\pdfoutput\undefined
|
||||
\pdffalse
|
||||
\let\pdfmkdest = \gobble
|
||||
\let\pdfurl = \gobble
|
||||
\let\endlink = \relax
|
||||
\let\linkcolor = \relax
|
||||
\let\pdfmakeoutlines = \relax
|
||||
\else
|
||||
\pdftrue
|
||||
\pdfoutput = 1
|
||||
\input pdfcolor
|
||||
\def\dopdfimage#1#2#3{%
|
||||
\def\imagewidth{#2}%
|
||||
\def\imageheight{#3}%
|
||||
\ifnum\pdftexversion < 14
|
||||
\pdfimage
|
||||
\else
|
||||
\pdfximage
|
||||
\fi
|
||||
\ifx\empty\imagewidth\else width \imagewidth \fi
|
||||
\ifx\empty\imageheight\else height \imageheight \fi
|
||||
{#1.pdf}%
|
||||
\ifnum\pdftexversion < 14 \else
|
||||
\pdfrefximage \pdflastximage
|
||||
\fi}
|
||||
\def\pdfmkdest#1{\pdfdest name{#1@} xyz}
|
||||
\def\pdfmkpgn#1{#1@}
|
||||
\let\linkcolor = \Cyan
|
||||
\def\endlink{\Black\pdfendlink}
|
||||
% Adding outlines to PDF; macros for calculating structure of outlines
|
||||
% come from Petr Olsak
|
||||
\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
|
||||
\else \csname#1\endcsname \fi}
|
||||
\def\advancenumber#1{\tempnum=\expnumber{#1}\relax
|
||||
\advance\tempnum by1
|
||||
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
|
||||
\def\pdfmakeoutlines{{%
|
||||
\openin 1 \jobname.toc
|
||||
\ifeof 1\else\bgroup
|
||||
\closein 1
|
||||
\indexnofonts
|
||||
\def\tt{}
|
||||
% thanh's hack / proper braces in bookmarks
|
||||
\edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
|
||||
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
|
||||
%
|
||||
\def\chapentry ##1##2##3{}
|
||||
\def\unnumbchapentry ##1##2{}
|
||||
\def\secentry ##1##2##3##4{\advancenumber{chap##2}}
|
||||
\def\unnumbsecentry ##1##2{}
|
||||
\def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
|
||||
\def\unnumbsubsecentry ##1##2{}
|
||||
\def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
|
||||
\def\unnumbsubsubsecentry ##1##2{}
|
||||
\input \jobname.toc
|
||||
\def\chapentry ##1##2##3{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
|
||||
\def\unnumbchapentry ##1##2{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
|
||||
\def\secentry ##1##2##3##4{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
|
||||
\def\unnumbsecentry ##1##2{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
|
||||
\def\subsecentry ##1##2##3##4##5{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
|
||||
\def\unnumbsubsecentry ##1##2{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
|
||||
\def\subsubsecentry ##1##2##3##4##5##6{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
|
||||
\def\unnumbsubsubsecentry ##1##2{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
|
||||
\input \jobname.toc
|
||||
\egroup\fi
|
||||
}}
|
||||
\def\makelinks #1,{%
|
||||
\def\params{#1}\def\E{END}%
|
||||
\ifx\params\E
|
||||
\let\nextmakelinks=\relax
|
||||
\else
|
||||
\let\nextmakelinks=\makelinks
|
||||
\ifnum\lnkcount>0,\fi
|
||||
\picknum{#1}%
|
||||
\startlink attr{/Border [0 0 0]}
|
||||
goto name{\pdfmkpgn{\the\pgn}}%
|
||||
\linkcolor #1%
|
||||
\advance\lnkcount by 1%
|
||||
\endlink
|
||||
\fi
|
||||
\nextmakelinks
|
||||
}
|
||||
\def\picknum#1{\expandafter\pn#1}
|
||||
\def\pn#1{%
|
||||
\def\p{#1}%
|
||||
\ifx\p\lbrace
|
||||
\let\nextpn=\ppn
|
||||
\else
|
||||
\let\nextpn=\ppnn
|
||||
\def\first{#1}
|
||||
\fi
|
||||
\nextpn
|
||||
}
|
||||
\def\ppn#1{\pgn=#1\gobble}
|
||||
\def\ppnn{\pgn=\first}
|
||||
\def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
|
||||
\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
|
||||
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
|
||||
\ifx\PP\D\let\nextsp\relax
|
||||
\else\let\nextsp\skipspaces
|
||||
\ifx\p\space\else\addtokens{\filename}{\PP}%
|
||||
\advance\filenamelength by 1
|
||||
\fi
|
||||
\fi
|
||||
\nextsp}
|
||||
\def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
|
||||
\ifnum\pdftexversion < 14
|
||||
\let \startlink \pdfannotlink
|
||||
\else
|
||||
\let \startlink \pdfstartlink
|
||||
\fi
|
||||
\def\pdfurl#1{%
|
||||
\begingroup
|
||||
\normalturnoffactive\def\@{@}%
|
||||
\leavevmode\Red
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
|
||||
% #1
|
||||
\endgroup}
|
||||
\def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
|
||||
\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
|
||||
\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
|
||||
\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
|
||||
\def\maketoks{%
|
||||
\expandafter\poptoks\the\toksA|ENDTOKS|
|
||||
\ifx\first0\adn0
|
||||
\else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
|
||||
\else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
|
||||
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
|
||||
\else
|
||||
\ifnum0=\countA\else\makelink\fi
|
||||
\ifx\first.\let\next=\done\else
|
||||
\let\next=\maketoks
|
||||
\addtokens{\toksB}{\the\toksD}
|
||||
\ifx\first,\addtokens{\toksB}{\space}\fi
|
||||
\fi
|
||||
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
|
||||
\next}
|
||||
\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}}
|
||||
\linkcolor #1\endlink}
|
||||
\def\mkpgn#1{#1@}
|
||||
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
|
||||
\fi % \ifx\pdfoutput
|
||||
|
||||
|
||||
\message{fonts,}
|
||||
% Font-change commands.
|
||||
|
||||
@@ -911,23 +1089,17 @@ where each line of input produces a line of output.}
|
||||
\setfont\deftt\ttshape{10}{\magstep1}
|
||||
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
|
||||
|
||||
% Fonts for indices and small examples (9pt).
|
||||
% We actually use the slanted font rather than the italic,
|
||||
% because texinfo normally uses the slanted fonts for that.
|
||||
% Do not make many font distinctions in general in the index, since they
|
||||
% aren't very useful.
|
||||
\setfont\ninett\ttshape{9}{1000}
|
||||
\setfont\ninettsl\ttslshape{10}{900}
|
||||
\setfont\indrm\rmshape{9}{1000}
|
||||
\setfont\indit\itshape{9}{1000}
|
||||
\setfont\indsl\slshape{9}{1000}
|
||||
\let\indtt=\ninett
|
||||
\let\indttsl=\ninettsl
|
||||
\let\indsf=\indrm
|
||||
\let\indbf=\indrm
|
||||
\setfont\indsc\scshape{10}{900}
|
||||
\font\indi=cmmi9
|
||||
\font\indsy=cmsy9
|
||||
% Fonts for indices, footnotes, small examples (9pt).
|
||||
\setfont\smallrm\rmshape{9}{1000}
|
||||
\setfont\smalltt\ttshape{9}{1000}
|
||||
\setfont\smallbf\bfshape{10}{900}
|
||||
\setfont\smallit\itshape{9}{1000}
|
||||
\setfont\smallsl\slshape{9}{1000}
|
||||
\setfont\smallsf\sfshape{9}{1000}
|
||||
\setfont\smallsc\scshape{10}{900}
|
||||
\setfont\smallttsl\ttslshape{10}{900}
|
||||
\font\smalli=cmmi9
|
||||
\font\smallsy=cmsy9
|
||||
|
||||
% Fonts for title page:
|
||||
\setfont\titlerm\rmbshape{12}{\magstep3}
|
||||
@@ -1041,11 +1213,12 @@ where each line of input produces a line of output.}
|
||||
\let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
|
||||
\resetmathfonts \setleading{15pt}}
|
||||
\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
|
||||
\def\indexfonts{%
|
||||
\let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
|
||||
\let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
|
||||
\let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
|
||||
\resetmathfonts \setleading{12pt}}
|
||||
\def\smallfonts{%
|
||||
\let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
|
||||
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
|
||||
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
|
||||
\let\tenttsl=\smallttsl
|
||||
\resetmathfonts \setleading{11pt}}
|
||||
|
||||
% Set up the default fonts, so we can use them for creating boxes.
|
||||
%
|
||||
@@ -1094,9 +1267,9 @@ where each line of input produces a line of output.}
|
||||
}
|
||||
\let\ttfont=\t
|
||||
\def\samp#1{`\tclose{#1}'\null}
|
||||
\setfont\smallrm\rmshape{8}{1000}
|
||||
\font\smallsy=cmsy9
|
||||
\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
|
||||
\setfont\keyrm\rmshape{8}{1000}
|
||||
\font\keysy=cmsy9
|
||||
\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
|
||||
\raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
|
||||
\vbox{\hrule\kern-0.4pt
|
||||
\hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
|
||||
@@ -1207,24 +1380,43 @@ where each line of input produces a line of output.}
|
||||
% a hypertex \special here.
|
||||
%
|
||||
\def\uref#1{\douref #1,,,\finish}
|
||||
\def\douref#1,#2,#3,#4\finish{%
|
||||
\def\douref#1,#2,#3,#4\finish{\begingroup
|
||||
\unsepspaces
|
||||
\pdfurl{#1}%
|
||||
\setbox0 = \hbox{\ignorespaces #3}%
|
||||
\ifdim\wd0 > 0pt
|
||||
\unhbox0 % third arg given, show only that
|
||||
\else
|
||||
\setbox0 = \hbox{\ignorespaces #2}%
|
||||
\ifdim\wd0 > 0pt
|
||||
\unhbox0\ (\code{#1})% second arg given, show both it and url
|
||||
\ifpdf
|
||||
\unhbox0 % PDF: 2nd arg given, show only it
|
||||
\else
|
||||
\unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
|
||||
\fi
|
||||
\else
|
||||
\code{#1}% only url given, so show it
|
||||
\fi
|
||||
\fi
|
||||
}
|
||||
\endlink
|
||||
\endgroup}
|
||||
|
||||
% rms does not like the angle brackets --karl, 17may97.
|
||||
% So now @email is just like @uref.
|
||||
% rms does not like angle brackets --karl, 17may97.
|
||||
% So now @email is just like @uref, unless we are pdf.
|
||||
%
|
||||
%\def\email#1{\angleleft{\tt #1}\angleright}
|
||||
\let\email=\uref
|
||||
\ifpdf
|
||||
\def\email#1{\doemail#1,,\finish}
|
||||
\def\doemail#1,#2,#3\finish{\begingroup
|
||||
\unsepspaces
|
||||
\pdfurl{mailto:#1}%
|
||||
\setbox0 = \hbox{\ignorespaces #2}%
|
||||
\ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
|
||||
\endlink
|
||||
\endgroup}
|
||||
\else
|
||||
\let\email=\uref
|
||||
\fi
|
||||
|
||||
% Check if we are currently using a typewriter font. Since all the
|
||||
% Computer Modern typewriter fonts have zero interword stretch (and
|
||||
@@ -1343,6 +1535,8 @@ where each line of input produces a line of output.}
|
||||
\global\let\shortcontents = \relax
|
||||
\fi
|
||||
%
|
||||
\ifpdf \pdfmakepagedesttrue \fi
|
||||
%
|
||||
\HEADINGSon
|
||||
}
|
||||
|
||||
@@ -1908,10 +2102,11 @@ where each line of input produces a line of output.}
|
||||
\go
|
||||
}
|
||||
|
||||
% multitable syntax
|
||||
\def\tab{&\hskip1sp\relax} % 2/2/96
|
||||
% tiny skip here makes sure this column space is
|
||||
% maintained, even if it is never used.
|
||||
% This used to have \hskip1sp. But then the space in a template line is
|
||||
% not enough. That is bad. So let's go back to just & until we
|
||||
% encounter the problem it was intended to solve again.
|
||||
% --karl, nathan@acm.org, 20apr99.
|
||||
\def\tab{&}
|
||||
|
||||
% @multitable ... @end multitable definitions:
|
||||
%
|
||||
@@ -1992,15 +2187,18 @@ where each line of input produces a line of output.}
|
||||
% If so, do nothing. If not, give it an appropriate dimension based on
|
||||
% current baselineskip.
|
||||
\ifdim\multitablelinespace=0pt
|
||||
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
|
||||
\global\advance\multitablelinespace by-\ht0
|
||||
%% strut to put in table in case some entry doesn't have descenders,
|
||||
%% to keep lines equally spaced
|
||||
\let\multistrut = \strut
|
||||
\else
|
||||
%% FIXME: what is \box0 supposed to be?
|
||||
\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
|
||||
width0pt\relax} \fi
|
||||
%% Test to see if parskip is larger than space between lines of
|
||||
%% table. If not, do nothing.
|
||||
%% If so, set to same dimension as multitablelinespace.
|
||||
\else
|
||||
\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
|
||||
width0pt\relax} \fi
|
||||
\ifdim\multitableparskip>\multitablelinespace
|
||||
\global\multitableparskip=\multitablelinespace
|
||||
\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
|
||||
@@ -2063,6 +2261,7 @@ width0pt\relax} \fi
|
||||
\let\deftypefn = \relax
|
||||
\let\deftypefun = \relax
|
||||
\let\deftypeivar = \relax
|
||||
\let\deftypeop = \relax
|
||||
\let\deftypevar = \relax
|
||||
\let\deftypevr = \relax
|
||||
\let\defun = \relax
|
||||
@@ -2206,14 +2405,13 @@ width0pt\relax} \fi
|
||||
% stuff compared to the main input.
|
||||
%
|
||||
\nullfont
|
||||
\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)
|
||||
\let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont
|
||||
\let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont
|
||||
\let\indsf = \nullfont
|
||||
\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).
|
||||
\let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
|
||||
\let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
|
||||
\let\smallsf=\nullfont
|
||||
%
|
||||
% Don't complain when characters are missing from the fonts.
|
||||
\tracinglostchars = 0
|
||||
@@ -2477,7 +2675,7 @@ width0pt\relax} \fi
|
||||
\def\@{@}% will be @@ when we switch to @ as escape char.
|
||||
% Need these in case \tex is in effect and \{ is a \delimiter again.
|
||||
% But can't use \lbracecmd and \rbracecmd because texindex assumes
|
||||
% braces and backslashes are used only as delimiters.
|
||||
% braces and backslashes are used only as delimiters.
|
||||
\let\{ = \mylbrace
|
||||
\let\} = \myrbrace
|
||||
\def\_{{\realbackslash _}}%
|
||||
@@ -2590,6 +2788,7 @@ width0pt\relax} \fi
|
||||
\let\url=\indexdummyfont
|
||||
\let\uref=\indexdummyfont
|
||||
\let\env=\indexdummyfont
|
||||
\let\acronym=\indexdummyfont
|
||||
\let\command=\indexdummyfont
|
||||
\let\option=\indexdummyfont
|
||||
\let\file=\indexdummyfont
|
||||
@@ -2743,7 +2942,7 @@ width0pt\relax} \fi
|
||||
\def\doprintindex#1{\begingroup
|
||||
\dobreak \chapheadingskip{10000}%
|
||||
%
|
||||
\indexfonts \rm
|
||||
\smallfonts \rm
|
||||
\tolerance = 9500
|
||||
\indexbreaks
|
||||
%
|
||||
@@ -2870,7 +3069,11 @@ width0pt\relax} \fi
|
||||
% The `\ ' here is removed by the implicit \unskip that TeX does as
|
||||
% part of (the primitive) \par. Without it, a spurious underfull
|
||||
% \hbox ensues.
|
||||
\ #2% The page number ends the paragraph.
|
||||
\ifpdf
|
||||
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
|
||||
\else
|
||||
\ #2% The page number ends the paragraph.
|
||||
\fi
|
||||
\fi%
|
||||
\par
|
||||
\endgroup}
|
||||
@@ -3029,7 +3232,7 @@ width0pt\relax} \fi
|
||||
|
||||
|
||||
\message{sectioning,}
|
||||
% Define chapters, sections, etc.
|
||||
% Chapters, sections, etc.
|
||||
|
||||
\newcount\chapno
|
||||
\newcount\secno \secno=0
|
||||
@@ -3038,7 +3241,43 @@ width0pt\relax} \fi
|
||||
|
||||
% This counter is funny since it counts through charcodes of letters A, B, ...
|
||||
\newcount\appendixno \appendixno = `\@
|
||||
\def\appendixletter{\char\appendixno}
|
||||
% \def\appendixletter{\char\the\appendixno}
|
||||
% We do the following for the sake of pdftex, which needs the actual
|
||||
% letter in the expansion, not just typeset.
|
||||
\def\appendixletter{%
|
||||
\ifnum\appendixno=`A A%
|
||||
\else\ifnum\appendixno=`B B%
|
||||
\else\ifnum\appendixno=`C C%
|
||||
\else\ifnum\appendixno=`D D%
|
||||
\else\ifnum\appendixno=`E E%
|
||||
\else\ifnum\appendixno=`F F%
|
||||
\else\ifnum\appendixno=`G G%
|
||||
\else\ifnum\appendixno=`H H%
|
||||
\else\ifnum\appendixno=`I I%
|
||||
\else\ifnum\appendixno=`J J%
|
||||
\else\ifnum\appendixno=`K K%
|
||||
\else\ifnum\appendixno=`L L%
|
||||
\else\ifnum\appendixno=`M M%
|
||||
\else\ifnum\appendixno=`N N%
|
||||
\else\ifnum\appendixno=`O O%
|
||||
\else\ifnum\appendixno=`P P%
|
||||
\else\ifnum\appendixno=`Q Q%
|
||||
\else\ifnum\appendixno=`R R%
|
||||
\else\ifnum\appendixno=`S S%
|
||||
\else\ifnum\appendixno=`T T%
|
||||
\else\ifnum\appendixno=`U U%
|
||||
\else\ifnum\appendixno=`V V%
|
||||
\else\ifnum\appendixno=`W W%
|
||||
\else\ifnum\appendixno=`X X%
|
||||
\else\ifnum\appendixno=`Y Y%
|
||||
\else\ifnum\appendixno=`Z Z%
|
||||
% The \the is necessary, despite appearances, because \appendixletter is
|
||||
% expanded while writing the .toc file. \char\appendixno is not
|
||||
% expandable, thus it is written literally, thus all appendixes come out
|
||||
% with the same letter (or @) in the toc without it.
|
||||
\else\char\the\appendixno
|
||||
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
|
||||
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
|
||||
|
||||
% Each @chapter defines this as the name of the chapter.
|
||||
% page headings and footings can use it. @section does likewise.
|
||||
@@ -3511,6 +3750,7 @@ width0pt\relax} \fi
|
||||
|
||||
|
||||
\message{toc,}
|
||||
% Table of contents.
|
||||
\newwrite\tocfile
|
||||
|
||||
% Write an entry to the toc file, opening it if necessary.
|
||||
@@ -3571,6 +3811,7 @@ width0pt\relax} \fi
|
||||
\fi
|
||||
\vfill \eject
|
||||
\contentsalignmacro % in case @setchapternewpage odd is in effect
|
||||
\pdfmakeoutlines
|
||||
\endgroup
|
||||
\lastnegativepageno = \pageno
|
||||
\pageno = \savepageno
|
||||
@@ -3607,6 +3848,10 @@ width0pt\relax} \fi
|
||||
}
|
||||
\let\shortcontents = \summarycontents
|
||||
|
||||
\ifpdf
|
||||
\pdfcatalog{/PageMode /UseOutlines}%
|
||||
\fi
|
||||
|
||||
% These macros generate individual entries in the table of contents.
|
||||
% The first argument is the chapter or section name.
|
||||
% The last argument is the page number.
|
||||
@@ -3617,7 +3862,7 @@ width0pt\relax} \fi
|
||||
|
||||
% See comments in \dochapentry re vbox and related settings
|
||||
\def\shortchapentry#1#2#3{%
|
||||
\tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}%
|
||||
\tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}%
|
||||
}
|
||||
|
||||
% Typeset the label for a chapter or appendix for the short contents.
|
||||
@@ -3625,10 +3870,14 @@ width0pt\relax} \fi
|
||||
% We could simplify the code here by writing out an \appendixentry
|
||||
% command in the toc file for appendices, instead of using \chapentry
|
||||
% for both, but it doesn't seem worth it.
|
||||
\setbox0 = \hbox{\shortcontrm \putwordAppendix }
|
||||
\newdimen\shortappendixwidth \shortappendixwidth = \wd0
|
||||
|
||||
%
|
||||
\newdimen\shortappendixwidth
|
||||
%
|
||||
\def\shortchaplabel#1{%
|
||||
% Compute width of word "Appendix", may change with language.
|
||||
\setbox0 = \hbox{\shortcontrm \putwordAppendix}%
|
||||
\shortappendixwidth = \wd0
|
||||
%
|
||||
% We typeset #1 in a box of constant width, regardless of the text of
|
||||
% #1, so the chapter titles will come out aligned.
|
||||
\setbox0 = \hbox{#1}%
|
||||
@@ -3643,7 +3892,7 @@ width0pt\relax} \fi
|
||||
}
|
||||
|
||||
\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
|
||||
\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}}
|
||||
\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}}
|
||||
|
||||
% Sections.
|
||||
\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
|
||||
@@ -3670,24 +3919,24 @@ width0pt\relax} \fi
|
||||
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
|
||||
\begingroup
|
||||
\chapentryfonts
|
||||
\tocentry{#1}{\dopageno{#2}}%
|
||||
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
|
||||
\endgroup
|
||||
\nobreak\vskip .25\baselineskip plus.1\baselineskip
|
||||
}
|
||||
|
||||
\def\dosecentry#1#2{\begingroup
|
||||
\secentryfonts \leftskip=\tocindent
|
||||
\tocentry{#1}{\dopageno{#2}}%
|
||||
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
|
||||
\endgroup}
|
||||
|
||||
\def\dosubsecentry#1#2{\begingroup
|
||||
\subsecentryfonts \leftskip=2\tocindent
|
||||
\tocentry{#1}{\dopageno{#2}}%
|
||||
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
|
||||
\endgroup}
|
||||
|
||||
\def\dosubsubsecentry#1#2{\begingroup
|
||||
\subsubsecentryfonts \leftskip=3\tocindent
|
||||
\tocentry{#1}{\dopageno{#2}}%
|
||||
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
|
||||
\endgroup}
|
||||
|
||||
% Final typesetting of a toc entry; we use the same \entry macro as for
|
||||
@@ -3715,6 +3964,7 @@ width0pt\relax} \fi
|
||||
|
||||
|
||||
\message{environments,}
|
||||
% @foo ... @end foo.
|
||||
|
||||
% Since these characters are used in examples, it should be an even number of
|
||||
% \tt widths. Each \tt character is 1en, so two makes it 1em.
|
||||
@@ -3964,7 +4214,7 @@ width0pt\relax} \fi
|
||||
\def\smalllispx{\begingroup
|
||||
\def\Esmalllisp{\nonfillfinish\endgroup}%
|
||||
\def\Esmallexample{\nonfillfinish\endgroup}%
|
||||
\indexfonts
|
||||
\smallfonts
|
||||
\lisp
|
||||
}
|
||||
|
||||
@@ -3980,7 +4230,7 @@ width0pt\relax} \fi
|
||||
%
|
||||
\def\smalldisplayx{\begingroup
|
||||
\def\Esmalldisplay{\nonfillfinish\endgroup}%
|
||||
\indexfonts \rm
|
||||
\smallfonts \rm
|
||||
\display
|
||||
}
|
||||
|
||||
@@ -3997,7 +4247,7 @@ width0pt\relax} \fi
|
||||
%
|
||||
\def\smallformatx{\begingroup
|
||||
\def\Esmallformat{\nonfillfinish\endgroup}%
|
||||
\indexfonts \rm
|
||||
\smallfonts \rm
|
||||
\format
|
||||
}
|
||||
|
||||
@@ -4038,8 +4288,9 @@ width0pt\relax} \fi
|
||||
|
||||
|
||||
\message{defuns,}
|
||||
% Define formatter for defuns
|
||||
% First, allow user to change definition object font (\df) internally
|
||||
% @defun etc.
|
||||
|
||||
% Allow user to change definition object font (\df) internally
|
||||
\def\setdeffont #1 {\csname DEF#1\endcsname}
|
||||
|
||||
\newskip\defbodyindent \defbodyindent=.4in
|
||||
@@ -4166,23 +4417,39 @@ width0pt\relax} \fi
|
||||
\exdentamount=\defbodyindent
|
||||
\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
|
||||
|
||||
% @deftypemethod has an extra argument that nothing else does. Sigh.
|
||||
% Used for @deftypemethod and @deftypeivar.
|
||||
% #1 is the \E... control sequence to end the definition (which we define).
|
||||
% #2 is the \...x control sequence for consecutive fns (which we define).
|
||||
% #3 is the control sequence to call to resume processing.
|
||||
% #4, delimited by the space, is the class name.
|
||||
% #4, delimited by a space, is the class name.
|
||||
% #5 is the method's return type.
|
||||
%
|
||||
\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV %
|
||||
\medbreak %
|
||||
% Define the end token that this defining construct specifies
|
||||
% so that it will exit this group.
|
||||
\def#1{\endgraf\endgroup\medbreak}%
|
||||
\def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
|
||||
\parindent=0in
|
||||
\advance\leftskip by \defbodyindent
|
||||
\exdentamount=\defbodyindent
|
||||
\begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
|
||||
\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV
|
||||
\medbreak
|
||||
\def#1{\endgraf\endgroup\medbreak}%
|
||||
\def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
|
||||
\parindent=0in
|
||||
\advance\leftskip by \defbodyindent
|
||||
\exdentamount=\defbodyindent
|
||||
\begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
|
||||
|
||||
% Used for @deftypeop. The change from \deftypemethparsebody is an
|
||||
% extra argument at the beginning which is the `category', instead of it
|
||||
% being the hardwired string `Method' or `Instance Variable'. We have
|
||||
% to account for this both in the \...x definition and in parsing the
|
||||
% input at hand. Thus also need a control sequence (passed as #5) for
|
||||
% the \E... definition to assign the category name to.
|
||||
%
|
||||
\def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV
|
||||
\medbreak
|
||||
\def#1{\endgraf\endgroup\medbreak}%
|
||||
\def#2##1 ##2 ##3 {%
|
||||
\def#4{##1}%
|
||||
\begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}%
|
||||
\parindent=0in
|
||||
\advance\leftskip by \defbodyindent
|
||||
\exdentamount=\defbodyindent
|
||||
\begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}}
|
||||
|
||||
\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
|
||||
\medbreak %
|
||||
@@ -4293,12 +4560,13 @@ width0pt\relax} \fi
|
||||
% First, define the processing that is wanted for arguments of \defun
|
||||
% Use this to expand the args and terminate the paragraph they make up
|
||||
|
||||
\def\defunargs #1{\functionparens \sl
|
||||
\def\defunargs#1{\functionparens \sl
|
||||
% Expand, preventing hyphenation at `-' chars.
|
||||
% Note that groups don't affect changes in \hyphenchar.
|
||||
\hyphenchar\tensl=0
|
||||
% Set the font temporarily and use \font in case \setfont made \tensl a macro.
|
||||
{\tensl\hyphenchar\font=0}%
|
||||
#1%
|
||||
\hyphenchar\tensl=45
|
||||
{\tensl\hyphenchar\font=45}%
|
||||
\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
|
||||
\interlinepenalty=10000
|
||||
\advance\rightskip by 0pt plus 1fil
|
||||
@@ -4397,13 +4665,29 @@ width0pt\relax} \fi
|
||||
\def\defop #1 {\def\defoptype{#1}%
|
||||
\defopparsebody\Edefop\defopx\defopheader\defoptype}
|
||||
%
|
||||
\def\defopheader #1#2#3{%
|
||||
\def\defopheader#1#2#3{%
|
||||
\dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index
|
||||
\begingroup\defname {#2}{\defoptype\ \putwordon\ #1}%
|
||||
\defunargs {#3}\endgroup %
|
||||
}
|
||||
|
||||
% @deftypemethod CLASS RETURN-TYPE METHOD ARG...
|
||||
% @deftypeop CATEGORY CLASS TYPE OPERATION ARG...
|
||||
%
|
||||
\def\deftypeop #1 {\def\deftypeopcategory{#1}%
|
||||
\deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader
|
||||
\deftypeopcategory}
|
||||
%
|
||||
% #1 is the class name, #2 the data type, #3 the operation name, #4 the args.
|
||||
\def\deftypeopheader#1#2#3#4{%
|
||||
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
|
||||
\begingroup
|
||||
\defname{\defheaderxcond#2\relax$$$#3}
|
||||
{\deftypeopcategory\ \putwordon\ \code{#1}}%
|
||||
\deftypefunargs{#4}%
|
||||
\endgroup
|
||||
}
|
||||
|
||||
% @deftypemethod CLASS TYPE METHOD ARG...
|
||||
%
|
||||
\def\deftypemethod{%
|
||||
\deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
|
||||
@@ -4552,6 +4836,7 @@ width0pt\relax} \fi
|
||||
\def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}}
|
||||
\def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}}
|
||||
\def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}}
|
||||
\def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}}
|
||||
\def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}}
|
||||
\def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}}
|
||||
\def\defunx#1 {\errmessage{@defunx in invalid context}}
|
||||
@@ -4839,10 +5124,19 @@ width0pt\relax} \fi
|
||||
|
||||
|
||||
% @alias.
|
||||
\def\alias#1=#2{\gdef#1{#2}}
|
||||
% We need some trickery to remove the optional spaces around the equal
|
||||
% sign. Just make them active and then expand them all to nothing.
|
||||
\def\alias{\begingroup\obeyspaces\parsearg\aliasxxx}
|
||||
\def\aliasxxx #1{\aliasyyy#1\relax}
|
||||
\def\aliasyyy #1=#2\relax{\ignoreactivespaces
|
||||
\edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=%
|
||||
\expandafter\noexpand\csname#2\endcsname}%
|
||||
\expandafter\endgroup\next}
|
||||
|
||||
|
||||
\message{cross references,}
|
||||
% @xref etc.
|
||||
|
||||
\newwrite\auxfile
|
||||
|
||||
\newif\ifhavexrefs % True if xref values are known.
|
||||
@@ -4885,20 +5179,10 @@ width0pt\relax} \fi
|
||||
|
||||
% @anchor{NAME} -- define xref target at arbitrary point.
|
||||
%
|
||||
{ \catcode`\@ = 11
|
||||
% From latex.ltx, to make @anchor truely invisible.
|
||||
\newdimen\@savsk
|
||||
\newcount\@savsf
|
||||
\gdef\@bsphack{\relax
|
||||
\ifhmode \@savsk\lastskip \@savsf\spacefactor \fi
|
||||
}
|
||||
\gdef\@esphack{\relax
|
||||
\ifhmode \spacefactor\@savsf
|
||||
\ifdim\@savsk>\z@ \ignorespaces \fi
|
||||
\fi
|
||||
}
|
||||
\gdef\anchor#1{\@bsphack \setref{#1}{Ynothing}\@esphack}
|
||||
}
|
||||
\newcount\savesfregister
|
||||
\gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
|
||||
\gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
|
||||
\gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
|
||||
|
||||
% \setref{NAME}{SNT} defines a cross-reference point NAME, namely
|
||||
% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have
|
||||
@@ -4908,6 +5192,7 @@ width0pt\relax} \fi
|
||||
%
|
||||
\def\setref#1#2{{%
|
||||
\indexdummies
|
||||
\pdfmkdest{#1}%
|
||||
\dosetq{#1-title}{Ytitle}%
|
||||
\dosetq{#1-pg}{Ypagenumber}%
|
||||
\dosetq{#1-snt}{#2}%
|
||||
@@ -4922,6 +5207,7 @@ width0pt\relax} \fi
|
||||
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
|
||||
\def\ref#1{\xrefX[#1,,,,,,,]}
|
||||
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
|
||||
\unsepspaces
|
||||
\def\printedmanual{\ignorespaces #5}%
|
||||
\def\printednodename{\ignorespaces #3}%
|
||||
\setbox1=\hbox{\printedmanual}%
|
||||
@@ -4955,6 +5241,19 @@ width0pt\relax} \fi
|
||||
% are best written with fairly long node names, containing hyphens, this
|
||||
% is a loss. Therefore, we give the text of the node name again, so it
|
||||
% is as if TeX is seeing it for the first time.
|
||||
\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
|
||||
\linkcolor
|
||||
\fi
|
||||
%
|
||||
\ifdim \wd1 > 0pt
|
||||
\putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}%
|
||||
\else
|
||||
@@ -4974,6 +5273,7 @@ width0pt\relax} \fi
|
||||
% page 3
|
||||
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
|
||||
\fi
|
||||
\endlink
|
||||
\endgroup}
|
||||
|
||||
% \dosetq is the interface for calls from other macros
|
||||
@@ -5210,6 +5510,8 @@ width0pt\relax} \fi
|
||||
\xspaceskip\z@skip
|
||||
\parindent\defaultparindent
|
||||
%
|
||||
\smallfonts \rm
|
||||
%
|
||||
% Hang the footnote text off the number.
|
||||
\hang
|
||||
\textindent{\thisfootno}%
|
||||
@@ -5224,7 +5526,7 @@ width0pt\relax} \fi
|
||||
\else\let\next\f@t\fi \next}
|
||||
\def\f@@t{\bgroup\aftergroup\@foot\let\next}
|
||||
\def\f@t#1{#1\@foot}
|
||||
\def\@foot{\strut\egroup}
|
||||
\def\@foot{\strut\par\egroup}
|
||||
|
||||
}%end \catcode `\@=11
|
||||
|
||||
@@ -5319,7 +5621,9 @@ width0pt\relax} \fi
|
||||
% #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{%
|
||||
\ifx\pdfoutput\undefined
|
||||
\ifpdf
|
||||
\centerline{\dopdfimage{#1}{#2}{#3}}%
|
||||
\else
|
||||
% \epsfbox itself resets \epsf?size at each figure.
|
||||
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
|
||||
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
|
||||
@@ -5340,13 +5644,12 @@ width0pt\relax} \fi
|
||||
\epsfbox{#1.eps}%
|
||||
\fi
|
||||
\endgroup
|
||||
\else
|
||||
\centerline{\pdfimage #1.pdf}%
|
||||
\fi
|
||||
}
|
||||
|
||||
|
||||
\message{localization,}
|
||||
% and i18n.
|
||||
|
||||
% @documentlanguage is usually given very early, just after
|
||||
% @setfilename. If done too late, it may not override everything
|
||||
@@ -5406,8 +5709,7 @@ should work if nowhere else does.}
|
||||
% Allow us to assign to \emergencystretch anyway.
|
||||
\def\emergencystretch{\dimen0}%
|
||||
\else
|
||||
\emergencystretch = \hsize
|
||||
\divide\emergencystretch by 40
|
||||
\emergencystretch = .15\hsize
|
||||
\fi
|
||||
}
|
||||
|
||||
@@ -5517,6 +5819,7 @@ should work if nowhere else does.}
|
||||
%
|
||||
\letterpaper
|
||||
|
||||
|
||||
\message{and turning on texinfo input format.}
|
||||
|
||||
% Define macros to output various characters with catcode for normal text.
|
||||
@@ -5684,6 +5987,6 @@ should work if nowhere else does.}
|
||||
@c eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
@c page-delimiter: "^\\\\message"
|
||||
@c time-stamp-start: "def\\\\texinfoversion{"
|
||||
@c time-stamp-format: "%:y-%02m-%02d.%H"
|
||||
@c time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
@c time-stamp-end: "}"
|
||||
@c End:
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
START-INFO-DIR-ENTRY
|
||||
* Text utilities: (textutils). GNU text utilities.
|
||||
* cat: (textutils)cat invocation. Concatenate and write files.
|
||||
* cksum: (textutils)cksum invocation. Print @sc{POSIX} CRC checksum.
|
||||
* cksum: (textutils)cksum invocation. Print @sc{posix} CRC checksum.
|
||||
* comm: (textutils)comm invocation. Compare sorted files by line.
|
||||
* csplit: (textutils)csplit invocation. Split by context.
|
||||
* cut: (textutils)cut invocation. Print selected parts of lines.
|
||||
@@ -44,7 +44,7 @@ START-INFO-DIR-ENTRY
|
||||
* tsort: (textutils)tsort invocation. Topological sort.
|
||||
* tr: (textutils)tr invocation. Translate characters.
|
||||
* unexpand: (textutils)unexpand invocation. Convert spaces to tabs.
|
||||
* uniq: (textutils)uniq invocation. Uniqify files.
|
||||
* uniq: (textutils)uniq invocation. Uniquify files.
|
||||
* wc: (textutils)wc invocation. Byte, word, and line counts.
|
||||
END-INFO-DIR-ENTRY
|
||||
@end format
|
||||
@@ -161,7 +161,7 @@ Summarizing files
|
||||
Operating on sorted files
|
||||
|
||||
* sort invocation:: Sort text files.
|
||||
* uniq invocation:: Uniqify files.
|
||||
* uniq invocation:: Uniquify files.
|
||||
* comm invocation:: Compare two sorted files line by line.
|
||||
* ptx invocation:: Produce a permuted index of file contents.
|
||||
* tsort invocation:: Topological sort.
|
||||
@@ -220,7 +220,7 @@ involved in improving this manual. The entire GNU community will
|
||||
benefit.
|
||||
|
||||
@cindex POSIX.2
|
||||
The GNU text utilities are mostly compatible with the @sc{POSIX.2} standard.
|
||||
The GNU text utilities are mostly compatible with the @sc{posix.2} standard.
|
||||
|
||||
@c This paragraph appears in all of fileutils.texi, textutils.texi, and
|
||||
@c sh-utils.texi too -- so be sure to keep them consistent.
|
||||
@@ -317,18 +317,18 @@ Equivalent to @samp{-vET}.
|
||||
@opindex -B
|
||||
@opindex --binary
|
||||
@cindex binary and text I/O in cat
|
||||
On MS-DOS and MS-Windows only, causes @code{cat} read and write the
|
||||
On MS-DOS and MS-Windows only, read and write the
|
||||
files in binary mode. By default, @code{cat} on MS-DOS/MS-Windows uses
|
||||
binary mode only when standard output is redirected to a file or a pipe;
|
||||
this option overrides that. Binary file I/O is used so that the files
|
||||
retain their format (Unix text as opposed to DOS text and binary),
|
||||
because @code{cat} is frequently used as file copying program. Some
|
||||
because @code{cat} is frequently used as a file-copying program. Some
|
||||
options (see below) cause @code{cat} read and write files in text mode
|
||||
because then the original file contents aren't important (e.g., when
|
||||
lines are numbered by @code{cat}, or when line endings should be
|
||||
marked). This is so these options work as DOS/Windows users would
|
||||
expect; for example, DOS-style text files have their lines end with
|
||||
@key{CR-LF} pair of characters which won't be processed as an empty line
|
||||
the CR-LF pair of characters which won't be processed as an empty line
|
||||
by @samp{-b} unless the file is read in text mode.
|
||||
|
||||
@item -b
|
||||
@@ -375,7 +375,7 @@ Equivalent to @samp{-vT}.
|
||||
@itemx --show-tabs
|
||||
@opindex -T
|
||||
@opindex --show-tabs
|
||||
Display @key{TAB} characters as @samp{^I}.
|
||||
Display TAB characters as @samp{^I}.
|
||||
|
||||
@item -u
|
||||
@opindex -u
|
||||
@@ -385,10 +385,10 @@ Ignored; for Unix compatibility.
|
||||
@itemx --show-nonprinting
|
||||
@opindex -v
|
||||
@opindex --show-nonprinting
|
||||
Display control characters except for @key{LFD} and @key{TAB} using
|
||||
Display control characters except for LFD and TAB using
|
||||
@samp{^} notation and precede characters that have the high bit set with
|
||||
@samp{M-}. On MS-DOS and MS-Windows, this option causes @code{cat} to
|
||||
read files and standard input in DOS binary mode, so the @key{CR}
|
||||
read files and standard input in DOS binary mode, so the CR
|
||||
characters at the end of each line are also visible.
|
||||
|
||||
@end table
|
||||
@@ -583,7 +583,7 @@ Do not reset the line number at the start of a logical page.
|
||||
@opindex -s
|
||||
@opindex --number-separator
|
||||
Separate the line number from the text line in the output with
|
||||
@var{string} (default is @key{TAB}).
|
||||
@var{string} (default is the TAB character).
|
||||
|
||||
@item -v @var{number}
|
||||
@itemx --starting-line-number=@var{number}
|
||||
@@ -672,7 +672,7 @@ Output at most @var{bytes} bytes of the input. Prefixes and suffixes on
|
||||
@opindex --strings
|
||||
@cindex string constants, outputting
|
||||
Instead of the normal output, output only @dfn{string constants}: at
|
||||
least @var{n} (3 by default) consecutive ASCII graphic characters,
|
||||
least @var{n} (3 by default) consecutive @sc{ascii} graphic characters,
|
||||
followed by a null (zero) byte.
|
||||
|
||||
@item -t @var{type}
|
||||
@@ -687,14 +687,14 @@ of each output line using each of the data types that you specified,
|
||||
in the order that you specified.
|
||||
|
||||
Adding a trailing ``z'' to any type specification appends a display
|
||||
of the ASCII character representation of the printable characters
|
||||
of the @sc{ascii} character representation of the printable characters
|
||||
to the output line generated by the type specification.
|
||||
|
||||
@table @samp
|
||||
@item a
|
||||
named character,
|
||||
@item c
|
||||
ASCII character or backslash escape,
|
||||
@sc{ascii} character or backslash escape,
|
||||
@item d
|
||||
signed decimal,
|
||||
@item f
|
||||
@@ -762,8 +762,8 @@ is not given at all, the default is 16.
|
||||
|
||||
@end table
|
||||
|
||||
The next several options map the old, pre-@sc{POSIX} format specification
|
||||
options to the corresponding @sc{POSIX} format specs. GNU @code{od} accepts
|
||||
The next several options map the old, pre-@sc{posix} format specification
|
||||
options to the corresponding @sc{posix} format specs. GNU @code{od} accepts
|
||||
any combination of old- and new-style options. Format specification
|
||||
options accumulate.
|
||||
|
||||
@@ -779,7 +779,7 @@ Output as octal bytes. Equivalent to @samp{-toC}.
|
||||
|
||||
@item -c
|
||||
@opindex -c
|
||||
Output as ASCII characters or backslash escapes. Equivalent to
|
||||
Output as @sc{ascii} characters or backslash escapes. Equivalent to
|
||||
@samp{-tc}.
|
||||
|
||||
@item -d
|
||||
@@ -1065,7 +1065,7 @@ Double space the output.
|
||||
@opindex --expand-tabs
|
||||
@cindex input tabs
|
||||
Expand @var{tab}s to spaces on input. Optional argument @var{in-tabchar} is
|
||||
the input tab character (default is @key{TAB}). Second optional
|
||||
the input tab character (default is the TAB character). Second optional
|
||||
argument @var{in-tabwidth} is the input tab character's width (default
|
||||
is 8).
|
||||
|
||||
@@ -1097,7 +1097,7 @@ indispensable.
|
||||
@opindex --output-tabs
|
||||
@cindex output tabs
|
||||
Replace spaces with @var{tab}s on output. Optional argument @var{out-tabchar}
|
||||
is the output tab character (default is @key{TAB}). Second optional
|
||||
is the output tab character (default is the TAB character). Second optional
|
||||
argument @var{out-tabwidth} is the output tab character's width (default
|
||||
is 8).
|
||||
|
||||
@@ -1151,7 +1151,7 @@ line of the input file (not the 1st line printed, compare the
|
||||
@samp{--page} option and @samp{-N} option).
|
||||
Optional argument @var{number-separator} is the character appended to
|
||||
the line number to separate it from the text followed. The default
|
||||
separator is a @key{TAB}. In a strict sense a @key{TAB} is always
|
||||
separator is the TAB character. In a strict sense a TAB is always
|
||||
printed with single column output only. The @var{TAB}-width varies
|
||||
with the @var{TAB}-position, e.g. with the left @var{margin} specified
|
||||
by @samp{-o} option. With multicolumn output priority is given to
|
||||
@@ -1192,7 +1192,7 @@ opened. (The exit status will still be nonzero, however.)
|
||||
@opindex -s
|
||||
@opindex --separator
|
||||
Separate columns by a single character @var{char}. Default for @var{char}
|
||||
is the @key{TAB} character without @samp{-w} and @samp{no character} with
|
||||
is the TAB character without @samp{-w} and @samp{no character} with
|
||||
@samp{-w}. Without @samp{-s} default separator @samp{space} is set.
|
||||
@samp{-s[char]} turns off line truncation of all three column options
|
||||
(@samp{-COLUMN}|@samp{-a -COLUMN}|@samp{-m}) except @samp{-w} is set.
|
||||
@@ -1203,16 +1203,19 @@ That is a @var{posix} compliant formulation.
|
||||
@itemx --sep-string[=@var{string}]
|
||||
@opindex -S
|
||||
@opindex --sep-string
|
||||
Separate columns by any string @var{string}. The @samp{-S} option doesn't
|
||||
react upon the @samp{-W/-w} option (unlike @samp{-s} option does). It
|
||||
does not affect line truncation or column alignment. A separator is
|
||||
defined, nothing else. Without @samp{-S}: default separator @key{TAB}
|
||||
is used with @samp{-J} and @samp{space} otherwise (same as @samp{-S" "}).
|
||||
With @samp{-S} only: no separator is used, same as @samp{-S""}. Quotes
|
||||
should be used with blanks and some shell active characters. Some of the
|
||||
@code{pr} options don't allow the option letter to be separated from its
|
||||
argument. @samp{-S/-s} is one of them. Don't use @samp{-S "STRING"}.
|
||||
That's @var{posix} compliant.
|
||||
Use @var{string} to separate output columns. The @samp{-S} option doesn't
|
||||
affect the @samp{-W/-w} option, unlike the @samp{-s} option which does. It
|
||||
does not affect line truncation or column alignment.
|
||||
Without @samp{-S}, and with @samp{-J}, @code{pr} uses the default output
|
||||
separator, TAB.
|
||||
Without @samp{-S} or @samp{-J}, @code{pr} uses a @samp{space}
|
||||
(same as @samp{-S" "}).
|
||||
Using @samp{-S} with no @var{string} is equivalent to @samp{-S""}.
|
||||
Note that for some of @code{pr}'s options the single-letter option
|
||||
character must be followed immediately by any corresponding argument;
|
||||
there may not be any intervening white space.
|
||||
@samp{-S/-s} is one of them. Don't use @samp{-S "STRING"}.
|
||||
@sc{posix} requires this.
|
||||
|
||||
@item -t
|
||||
@itemx --omit-header
|
||||
@@ -1222,7 +1225,7 @@ Do not print the usual header [and footer] on each page, and do not fill
|
||||
out the bottom of pages (with blank lines or a form feed). No page
|
||||
structure is produced, but form feeds set in the input files are retained.
|
||||
The predefined pagination is not changed. @samp{-t} or @samp{-T} may be
|
||||
useful together with other options; e.g.: @samp{-t -e4}, expand @key{TAB}
|
||||
useful together with other options; e.g.: @samp{-t -e4}, expand TAB characters
|
||||
in the input file to 4 spaces but don't make any other changes. Use of
|
||||
@samp{-t} overrides @samp{-h}.
|
||||
|
||||
@@ -1483,13 +1486,13 @@ gets output from a different file, to indicate which file that output is
|
||||
from.
|
||||
|
||||
There are two ways to specify how you'd like to track files with this option,
|
||||
but that difference is noticeable only when a followed file is removed.
|
||||
but that difference is noticeable only when a followed file is removed or
|
||||
renamed.
|
||||
If you'd like to continue to track the end of a growing file even after
|
||||
it has been unlinked, use @samp{--follow=descriptor}. This is the default
|
||||
behavior, but it is not useful if you're tracking a log file that may be
|
||||
rotated (removed and reopened). In that case, use @samp{--follow=name} to
|
||||
track the named file by reopening it periodically
|
||||
@c FIXME: cross reference to the new option name
|
||||
rotated (removed or renamed, then reopened). In that case, use
|
||||
@samp{--follow=name} to track the named file by reopening it periodically
|
||||
to see if it has been removed and recreated by some other program.
|
||||
|
||||
No matter which method you use, if the tracked file is determined to have
|
||||
@@ -1499,16 +1502,71 @@ and resumes tracking the end of the file from the newly-determined endpoint.
|
||||
When a file is removed, @code{tail}'s behavior depends on whether it is
|
||||
following the name or the descriptor. When following by name, tail can
|
||||
detect that a file has been removed and gives a message to that effect,
|
||||
and if @samp{--allow-missing} has been specified it will continue checking
|
||||
and if @samp{--retry} has been specified it will continue checking
|
||||
periodically to see if the file reappears.
|
||||
When following a descriptor, tail does not detect that the file has
|
||||
been unlinked and issues no message.
|
||||
been unlinked or renamed and issues no message; even though the file
|
||||
may no longer be accessible via its original name, it may still be
|
||||
growing.
|
||||
|
||||
The option values @samp{descriptor} and @samp{name} may be specified only
|
||||
with the long form of the option, not with @samp{-f}.
|
||||
|
||||
@c FIXME-describe --allow-missing [useful only with --follow]
|
||||
@c FIXME-describe --sleep-interval [useful only with --follow]
|
||||
@itemx --retry
|
||||
@opindex --retry
|
||||
This option is meaningful only when following by name.
|
||||
Without this option, when tail encounters a file that doesn't
|
||||
exist or is otherwise inaccessible, it reports that fact and
|
||||
never checks it again.
|
||||
|
||||
@itemx --sleep-interval=@var{n}
|
||||
@opindex --sleep-interval
|
||||
Change the number of seconds to wait between iterations (the default is 1).
|
||||
During one iteration, every specified file is checked to see if it has
|
||||
changed size.
|
||||
|
||||
@itemx --pid=@var{pid}
|
||||
@opindex --pid
|
||||
When following by name or by descriptor, you may specify the process ID,
|
||||
@var{pid}, of the sole writer of all @var{file} arguments. Then, shortly
|
||||
after that process terminates, tail will also terminate. This will
|
||||
work properly only if the writer and the tailing process are running on
|
||||
the same machine. For example, to save the output of a build in a file
|
||||
and to watch the file grow, if you invoke @code{make} and @code{tail}
|
||||
like this then the tail process will stop when your build completes.
|
||||
Without this option, you would have had to kill the @code{tail -f}
|
||||
process yourself.
|
||||
@example
|
||||
$ make >& makerr & tail --pid=$! -f makerr
|
||||
@end example
|
||||
If you specify a @var{pid} that is not in use or that does not correspond
|
||||
to the process that is writing to the tailed files, then @code{tail}
|
||||
may terminate long before any @var{file}s stop growing or it may not
|
||||
terminate until long after the real writer has terminated.
|
||||
Note that @samp{--pid} cannot be supported on some systems; @code{tail}
|
||||
will print a warning if this is the case.
|
||||
|
||||
@itemx --max-consecutive-size-changes=@var{n}
|
||||
@opindex --max-consecutive-size-changes
|
||||
This option is meaningful only when following by name.
|
||||
Use it to control how long @code{tail} follows the descriptor of a file
|
||||
that continues growing at a rapid pace even after it is deleted or renamed.
|
||||
After detecting @var{n} consecutive size changes for a file,
|
||||
@code{open}/@code{fstat} the file to determine if that file name is
|
||||
still associated with the same device/inode-number pair as before.
|
||||
See the output of @code{tail --help} for the default value.
|
||||
|
||||
@itemx --max-unchanged-stats=@var{n}
|
||||
@opindex --max-unchanged-stats
|
||||
When tailing a file by name, if there have been this many consecutive
|
||||
iterations for which the size has remained the same, then
|
||||
@code{open}/@code{fstat} the file to determine if that file name is
|
||||
still associated with the same device/inode-number pair as before.
|
||||
When following a log file that is rotated, this is approximately the
|
||||
number of seconds between when tail prints the last pre-rotation lines
|
||||
and when it prints the lines that have accumulated in the new log file.
|
||||
See the output of @code{tail --help} for the default value.
|
||||
This option is meaningful only when following by name.
|
||||
|
||||
@itemx -n @var{n}
|
||||
@itemx --lines=@var{n}
|
||||
@@ -1762,6 +1820,11 @@ given as an argument, it prints the file name following the counts. If
|
||||
more than one @var{file} is given, @code{wc} prints a final line
|
||||
containing the cumulative counts, with the file name @file{total}. The
|
||||
counts are printed in this order: newlines, words, bytes.
|
||||
By default, each count is output right-justified in a 7-byte field with
|
||||
one space between fields so that the numbers and file names line up nicely
|
||||
in columns. However, POSIX requires that there be exactly one space
|
||||
separating columns. You can make @code{wc} use the POSIX-mandated
|
||||
output format by setting the @env{POSIXLY_CORRECT} environment variable.
|
||||
|
||||
By default, @code{wc} prints all three counts. Options can specify
|
||||
that only certain counts be printed. Options do not undo others
|
||||
@@ -1884,7 +1947,7 @@ by comparing the @code{cksum} output for the received files with the
|
||||
@code{cksum} output for the original files (typically given in the
|
||||
distribution).
|
||||
|
||||
The CRC algorithm is specified by the @sc{POSIX.2} standard. It is not
|
||||
The CRC algorithm is specified by the @sc{posix.2} standard. It is not
|
||||
compatible with the BSD or System V @code{sum} algorithms (see the
|
||||
previous section); it is more robust.
|
||||
|
||||
@@ -1998,7 +2061,7 @@ These commands work with (or produce) sorted files.
|
||||
|
||||
@menu
|
||||
* sort invocation:: Sort text files.
|
||||
* uniq invocation:: Uniqify files.
|
||||
* uniq invocation:: Uniquify files.
|
||||
* comm invocation:: Compare two sorted files line by line.
|
||||
* ptx invocation:: Produce a permuted index of file contents.
|
||||
* tsort invocation:: Topological sort.
|
||||
@@ -2043,18 +2106,21 @@ works.
|
||||
|
||||
@end table
|
||||
|
||||
@vindex LC_COLLATE
|
||||
A pair of lines is compared as follows: if any key fields have been
|
||||
specified, @code{sort} compares each pair of fields, in the order
|
||||
specified on the command line, according to the associated ordering
|
||||
options, until a difference is found or no fields are left.
|
||||
Unless otherwise specified, all comparisons use the character
|
||||
collating sequence specified by the @env{LC_COLLATE} locale.
|
||||
|
||||
If any of the global options @samp{Mbdfinr} are given but no key fields
|
||||
are specified, @code{sort} compares the entire lines according to the
|
||||
global options.
|
||||
|
||||
Finally, as a last resort when all keys compare equal (or if no
|
||||
ordering options were specified at all), @code{sort} compares the lines
|
||||
byte by byte in machine collating sequence. The last resort comparison
|
||||
ordering options were specified at all), @code{sort} compares the entire
|
||||
lines. The last resort comparison
|
||||
honors the @samp{-r} global option. The @samp{-s} (stable) option
|
||||
disables this last-resort comparison so that lines in which all fields
|
||||
compare equal are left in their original relative order. If no fields
|
||||
@@ -2063,7 +2129,12 @@ or global options are specified, @samp{-s} has no effect.
|
||||
GNU @code{sort} (as specified for all GNU utilities) has no limits on
|
||||
input line length or restrictions on bytes allowed within lines. In
|
||||
addition, if the final byte of an input file is not a newline, GNU
|
||||
@code{sort} silently supplies one.
|
||||
@code{sort} silently supplies one. A line's trailing newline is not
|
||||
part of the line for comparison purposes.@footnote{@sc{posix}.2-1992
|
||||
requires that the trailing newline be part of the comparison, and some
|
||||
@code{sort} implementations obey this requirement, but it is widely
|
||||
considered to be a bug in the standard and the next version of
|
||||
@sc{posix}.2 will likely remove this requirement.}
|
||||
|
||||
Upon any error, @code{sort} exits with a status of @samp{2}.
|
||||
|
||||
@@ -2073,11 +2144,14 @@ value as the directory for temporary files instead of @file{/tmp}. The
|
||||
@samp{-T @var{tempdir}} option in turn overrides the environment
|
||||
variable.
|
||||
|
||||
@vindex LC_CTYPE
|
||||
The following options affect the ordering of output lines. They may be
|
||||
specified globally or as part of a specific key field. If no key
|
||||
fields are specified, global options apply to comparison of entire
|
||||
lines; otherwise the global options are inherited by key fields that do
|
||||
not specify any special options of their own.
|
||||
not specify any special options of their own. The @samp{-b}, @samp{-d},
|
||||
@samp{-f} and @samp{-i} options classify characters according to
|
||||
the @env{LC_CTYPE} locale.
|
||||
|
||||
@table @samp
|
||||
|
||||
@@ -2102,40 +2176,59 @@ sorting so that, for example, @samp{b} and @samp{B} sort as equal.
|
||||
@item -g
|
||||
@opindex -g
|
||||
@cindex general numeric sort
|
||||
Sort numerically, but use strtod(3) to arrive at the numeric values.
|
||||
Sort numerically, using the standard C function @code{strtod} to convert
|
||||
a prefix of each line to a double-precision floating point number.
|
||||
This allows floating point numbers to be specified in scientific notation,
|
||||
like @code{1.0e-34} and @code{10e100}. Use this option only if there
|
||||
is no alternative; it is much slower than @samp{-n} and numbers with
|
||||
too many significant digits will be compared as if they had been
|
||||
truncated. In addition, numbers outside the range of representable
|
||||
double precision floating point numbers are treated as if they were
|
||||
zeroes; overflow and underflow are not reported.
|
||||
like @code{1.0e-34} and @code{10e100}.
|
||||
Do not report overflow, underflow, or conversion errors.
|
||||
Use the following collating sequence:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Lines that do not start with numbers (all considered to be equal).
|
||||
@item
|
||||
NaNs (``Not a Number'' values, in IEEE floating point arithmetic)
|
||||
in a consistent but machine-dependent order.
|
||||
@item
|
||||
Minus infinity.
|
||||
@item
|
||||
Finite numbers in ascending numeric order (with @math{-0} and @math{+0} equal).
|
||||
@item
|
||||
Plus infinity.
|
||||
@end itemize
|
||||
|
||||
Use this option only if there is no alternative; it is much slower than
|
||||
@samp{-n} and it can lose information when converting to floating point.
|
||||
|
||||
@item -i
|
||||
@opindex -i
|
||||
@cindex unprintable characters, ignoring
|
||||
Ignore characters outside the printable ASCII range 040-0176 octal
|
||||
(inclusive) when sorting.
|
||||
Ignore unprintable characters.
|
||||
|
||||
@item -M
|
||||
@opindex -M
|
||||
@cindex months, sorting by
|
||||
@vindex LC_TIME
|
||||
An initial string, consisting of any amount of whitespace, followed
|
||||
by three letters abbreviating a month name, is folded to UPPER case and
|
||||
by a month name abbreviation, is folded to UPPER case and
|
||||
compared in the order @samp{JAN} < @samp{FEB} < @dots{} < @samp{DEC}.
|
||||
Invalid names compare low to valid names.
|
||||
Invalid names compare low to valid names. The @env{LC_TIME} locale
|
||||
determines the month spellings.
|
||||
|
||||
@item -n
|
||||
@opindex -n
|
||||
@cindex numeric sort
|
||||
@vindex LC_NUMERIC
|
||||
Sort numerically: the number begins each line; specifically, it consists
|
||||
of optional whitespace, an optional @samp{-} sign, and zero or more
|
||||
digits, optionally followed by a decimal point and zero or more digits.
|
||||
digits possibly separated by thousands separators, optionally followed
|
||||
by a radix character and zero or more digits. The @env{LC_NUMERIC}
|
||||
locale specifies the radix character and thousands separator.
|
||||
|
||||
@code{sort -n} uses what might be considered an unconventional method
|
||||
to compare strings representing floating point numbers. Rather than
|
||||
first converting each string to the C @code{double} type and then
|
||||
comparing those values, sort aligns the decimal points in the two
|
||||
comparing those values, sort aligns the radix characters in the two
|
||||
strings and compares the strings a character at a time. One benefit
|
||||
of using this approach is its speed. In practice this is much more
|
||||
efficient than performing the two corresponding string-to-double (or even
|
||||
@@ -2180,7 +2273,7 @@ following.
|
||||
|
||||
@item -u
|
||||
@opindex -u
|
||||
@cindex uniqifying output
|
||||
@cindex uniquifying output
|
||||
For the default case or the @samp{-m} option, only output the first
|
||||
of a sequence of lines that compare equal. For the @samp{-c} option,
|
||||
check that no pair of consecutive lines compares equal.
|
||||
@@ -2188,16 +2281,18 @@ check that no pair of consecutive lines compares equal.
|
||||
@item -k @var{pos1}[,@var{pos2}]
|
||||
@opindex -k
|
||||
@cindex sort field
|
||||
The recommended, @sc{POSIX}, option for specifying a sort field. The field
|
||||
The recommended, @sc{posix}, option for specifying a sort field. The field
|
||||
consists of the part of the line between @var{pos1} and @var{pos2} (or the
|
||||
end of the line, if @var{pos2} is omitted), inclusive. Fields and
|
||||
character positions are numbered starting with 1. See below.
|
||||
end of the line, if @var{pos2} is omitted), @emph{inclusive}.
|
||||
Fields and character positions are numbered starting with 1.
|
||||
So to sort on the second field, you'd use @samp{-k 2,2}
|
||||
See below for more examples.
|
||||
|
||||
@item -z
|
||||
@opindex -z
|
||||
@cindex sort zero-terminated lines
|
||||
Treat the input as a set of lines, each terminated by a zero byte (@sc{ASCII}
|
||||
@sc{NUL} (Null) character) instead of a @sc{ASCII} @sc{LF} (Line Feed.)
|
||||
Treat the input as a set of lines, each terminated by a zero byte (@sc{ascii}
|
||||
@sc{nul} (Null) character) instead of an @sc{ascii} @sc{lf} (Line Feed).
|
||||
This option can be useful in conjunction with @samp{perl -0} or
|
||||
@samp{find -print0} and @samp{xargs -0} which do the same in order to
|
||||
reliably handle arbitrary pathnames (even those which contain Line Feed
|
||||
@@ -2217,9 +2312,9 @@ options}.
|
||||
|
||||
Historical (BSD and System V) implementations of @code{sort} have
|
||||
differed in their interpretation of some options, particularly
|
||||
@samp{-b}, @samp{-f}, and @samp{-n}. GNU sort follows the @sc{POSIX}
|
||||
@samp{-b}, @samp{-f}, and @samp{-n}. GNU sort follows the @sc{posix}
|
||||
behavior, which is usually (but not always!) like the System V behavior.
|
||||
According to @sc{POSIX}, @samp{-n} no longer implies @samp{-b}. For
|
||||
According to @sc{posix}, @samp{-n} no longer implies @samp{-b}. For
|
||||
consistency, @samp{-M} has been changed in the same way. This may
|
||||
affect the meaning of character positions in field specifications in
|
||||
obscure cases. The only fix is to add an explicit @samp{-b}.
|
||||
@@ -2244,7 +2339,7 @@ from the global options it will be attached to both.
|
||||
Keys may span multiple fields.
|
||||
|
||||
Here are some examples to illustrate various combinations of options.
|
||||
In them, the @sc{POSIX} @samp{-k} option is used to specify sort keys rather
|
||||
In them, the @sc{posix} @samp{-k} option is used to specify sort keys rather
|
||||
than the obsolete @samp{+@var{pos1}-@var{pos2}} syntax.
|
||||
|
||||
@itemize @bullet
|
||||
@@ -2256,12 +2351,13 @@ Sort in descending (reverse) numeric order.
|
||||
sort -nr
|
||||
@end example
|
||||
|
||||
@item
|
||||
Sort alphabetically, omitting the first and second fields.
|
||||
This uses a single key composed of the characters beginning
|
||||
at the start of field three and extending to the end of each line.
|
||||
|
||||
@example
|
||||
sort -k3
|
||||
sort -k 3
|
||||
@end example
|
||||
|
||||
@item
|
||||
@@ -2303,6 +2399,7 @@ sort -t : -n -k 5b,5 -k 3,3 /etc/passwd
|
||||
|
||||
@item
|
||||
Generate a tags file in case insensitive sorted order.
|
||||
|
||||
@example
|
||||
find src -type f -print0 | sort -t / -z -f | xargs -0 etags --append
|
||||
@end example
|
||||
@@ -2340,10 +2437,10 @@ sort -t : -b -k 5,5 -k 3,3n /etc/passwd
|
||||
|
||||
|
||||
@node uniq invocation
|
||||
@section @code{uniq}: Uniqify files
|
||||
@section @code{uniq}: Uniquify files
|
||||
|
||||
@pindex uniq
|
||||
@cindex uniqify files
|
||||
@cindex uniquify files
|
||||
|
||||
@code{uniq} writes the unique lines in the given @file{input}, or
|
||||
standard input if nothing is given or for an @var{input} name of
|
||||
@@ -2450,14 +2547,19 @@ standard input. Synopsis:
|
||||
comm [@var{option}]@dots{} @var{file1} @var{file2}
|
||||
@end example
|
||||
|
||||
The input files must be sorted before @code{comm} can be used.
|
||||
@vindex LC_COLLATE
|
||||
Before @code{comm} can be used, the input files must be sorted using the
|
||||
collating sequence specified by the @env{LC_COLLATE} locale, with
|
||||
trailing newlines significant. If an input file ends in a non-newline
|
||||
character, a newline is silently appended. The @code{sort} command with
|
||||
no options always outputs a file that is suitable input to @code{comm}.
|
||||
|
||||
@cindex differing lines
|
||||
@cindex common lines
|
||||
With no options, @code{comm} produces three column output. Column one
|
||||
contains lines unique to @var{file1}, column two contains lines unique
|
||||
to @var{file2}, and column three contains lines common to both files.
|
||||
Columns are separated by @key{TAB}.
|
||||
Columns are separated by a single TAB character.
|
||||
@c FIXME: when there's an option to supply an alternative separator
|
||||
@c string, append `by default' to the above sentence.
|
||||
|
||||
@@ -2616,7 +2718,7 @@ As it is setup now, the program assumes that the input file is coded
|
||||
using 8-bit ISO 8859-1 code, also known as Latin-1 character set,
|
||||
@emph{unless} if it is compiled for MS-DOS, in which case it uses the
|
||||
character set of the IBM-PC. (GNU @code{ptx} is not known to work on
|
||||
smaller MS-DOS machines anymore.) Compared to 7-bit ASCII, the set of
|
||||
smaller MS-DOS machines anymore.) Compared to 7-bit @sc{ascii}, the set of
|
||||
characters which are letters is then different, this fact alters the
|
||||
behaviour of regular expression matching. Thus, the default regular
|
||||
expression for a keyword allows foreign or diacriticized letters.
|
||||
@@ -2905,7 +3007,7 @@ sequence @code{^\@{ @}} and @code{~\@{ @}} respectively. Other
|
||||
diacriticized characters of the underlying character set produce an
|
||||
appropriate @TeX{} sequence as far as possible. The other non-graphical
|
||||
characters, like newline and tab, and all others characters which are
|
||||
not part of ASCII, are merely changed to exactly one space, with no
|
||||
not part of @sc{ascii}, are merely changed to exactly one space, with no
|
||||
special attempt to compress consecutive spaces. Let me know how to
|
||||
improve this special character processing for @TeX{}.
|
||||
|
||||
@@ -3042,14 +3144,14 @@ take up 1 character.
|
||||
@opindex -f
|
||||
@opindex --fields
|
||||
Print only the fields listed in @var{field-list}. Fields are
|
||||
separated by a @key{TAB} by default.
|
||||
separated by a TAB character by default.
|
||||
|
||||
@item -d @var{input_delim_byte}
|
||||
@itemx --delimiter=@var{input_delim_byte}
|
||||
@opindex -d
|
||||
@opindex --delimiter
|
||||
For @samp{-f}, fields are separated in the input by the first character
|
||||
in @var{input_delim_byte} (default is @key{TAB}).
|
||||
in @var{input_delim_byte} (default is TAB).
|
||||
|
||||
@item -n
|
||||
@opindex -n
|
||||
@@ -3078,7 +3180,7 @@ The default is to use the input delimiter.
|
||||
@cindex merging files
|
||||
|
||||
@code{paste} writes to standard output lines consisting of sequentially
|
||||
corresponding lines of each given file, separated by @key{TAB}.
|
||||
corresponding lines of each given file, separated by a TAB character.
|
||||
Standard input is used for a file name of @samp{-} or if no input files
|
||||
are given.
|
||||
|
||||
@@ -3100,11 +3202,11 @@ Paste the lines of one file at a time rather than one line from each
|
||||
file.
|
||||
|
||||
@item -d @var{delim-list}
|
||||
@itemx --delimiters @var{delim-list}
|
||||
@itemx --delimiters=@var{delim-list}
|
||||
@opindex -d
|
||||
@opindex --delimiters
|
||||
Consecutively use the characters in @var{delim-list} instead of
|
||||
@key{TAB} to separate merged lines. When @var{delim-list} is
|
||||
TAB to separate merged lines. When @var{delim-list} is
|
||||
exhausted, start again at its beginning.
|
||||
|
||||
@end table
|
||||
@@ -3123,10 +3225,12 @@ lines that have identical join fields. Synopsis:
|
||||
join [@var{option}]@dots{} @var{file1} @var{file2}
|
||||
@end example
|
||||
|
||||
@vindex LC_COLLATE
|
||||
Either @var{file1} or @var{file2} (but not both) can be @samp{-},
|
||||
meaning standard input. @var{file1} and @var{file2} should be already
|
||||
sorted in increasing order (not numerically) on the join fields; unless
|
||||
the @samp{-t} option is given, they should be sorted ignoring blanks at
|
||||
sorted in increasing textual order on the join fields, using the
|
||||
collating sequence specified by the @env{LC_COLLATE} locale. Unless
|
||||
the @samp{-t} option is given, the input should be sorted ignoring blanks at
|
||||
the start of the join field, as in @code{sort -b}. If the
|
||||
@samp{--ignore-case} option is given, lines should be sorted without
|
||||
regard to the case of characters in the join field, as in @code{sort -f}.
|
||||
@@ -3187,7 +3291,7 @@ to the join field. However, when printing unpairable lines
|
||||
(using either of the @samp{-a} or @samp{-v} options), there is no way
|
||||
to specify the join field using @var{m.n} in @var{field-list}
|
||||
if there are unpairable lines in both files.
|
||||
To give @code{join} that functionality, @sc{POSIX} invented the @samp{0}
|
||||
To give @code{join} that functionality, @sc{posix} invented the @samp{0}
|
||||
field specification notation.
|
||||
|
||||
The elements in @var{field-list}
|
||||
@@ -3430,7 +3534,7 @@ typically have the same length. If @var{set1} is shorter than
|
||||
@var{set2}, the extra characters at the end of @var{set2} are ignored.
|
||||
|
||||
On the other hand, making @var{set1} longer than @var{set2} is not
|
||||
portable; @sc{POSIX.2} says that the result is undefined. In this situation,
|
||||
portable; @sc{posix.2} says that the result is undefined. In this situation,
|
||||
BSD @code{tr} pads @var{set2} to the length of @var{set1} by repeating
|
||||
the last character of @var{set2} as many times as necessary. System V
|
||||
@code{tr} truncates @var{set1} to the length of @var{set2}.
|
||||
@@ -3491,7 +3595,7 @@ non-alphanumeric characters to newlines, then squeezes each string
|
||||
of repeated newlines into a single newline:
|
||||
|
||||
@example
|
||||
tr -cs '[a-zA-Z0-9]' '[\n*]'
|
||||
tr -cs 'a-zA-Z0-9' '[\n*]'
|
||||
@end example
|
||||
|
||||
@item
|
||||
@@ -3519,6 +3623,39 @@ cat "$@@" \
|
||||
| uniq -d
|
||||
@end example
|
||||
|
||||
@item
|
||||
Deleting a small set of characters is usually straightforward. For example,
|
||||
to remove all @samp{a}s, @samp{x}s, and @samp{M}s you would do this:
|
||||
|
||||
@example
|
||||
tr -d axM
|
||||
@end example
|
||||
|
||||
However, when @samp{-} is one of those characters, it can be tricky because
|
||||
@samp{-} has special meanings. Performing the same task as above but also
|
||||
removing all @samp{-} characters, we might try @code{tr -d -axM}, but
|
||||
that would fail because @code{tr} would try to interpret @samp{-a} as
|
||||
a command-line option. Alternatively, we could try putting the hyphen
|
||||
inside the string, @code{tr -d a-xM}, but that wouldn't work either because
|
||||
it would make @code{tr} interpret @code{a-x} as the range of characters
|
||||
@samp{a}@dots{}@samp{x} rather than the three.
|
||||
One way to solve the problem is to put the hyphen at the end of the list
|
||||
of characters:
|
||||
|
||||
@example
|
||||
tr -d axM-
|
||||
@end example
|
||||
|
||||
More generally, use the character class notation @code{[=c=]}
|
||||
with @samp{-} (or any other character) in place of the @samp{c}:
|
||||
|
||||
@example
|
||||
tr -d '[=-=]axM'
|
||||
@end example
|
||||
|
||||
Note how single quotes are used in the above example to protect the
|
||||
square brackets from interpretation by a shell.
|
||||
|
||||
@end itemize
|
||||
|
||||
|
||||
@@ -3528,7 +3665,7 @@ cat "$@@" \
|
||||
@vindex POSIXLY_CORRECT
|
||||
Setting the environment variable @env{POSIXLY_CORRECT} turns off the
|
||||
following warning and error messages, for strict compliance with
|
||||
@sc{POSIX.2}. Otherwise, the following diagnostics are issued:
|
||||
@sc{posix.2}. Otherwise, the following diagnostics are issued:
|
||||
|
||||
@enumerate
|
||||
|
||||
@@ -3536,7 +3673,7 @@ following warning and error messages, for strict compliance with
|
||||
When the @samp{--delete} option is given but @samp{--squeeze-repeats}
|
||||
is not, and @var{set2} is given, GNU @code{tr} by default prints
|
||||
a usage message and exits, because @var{set2} would not be used.
|
||||
The @sc{POSIX} specification says that @var{set2} must be ignored in
|
||||
The @sc{posix} specification says that @var{set2} must be ignored in
|
||||
this case. Silently ignoring arguments is a bad idea.
|
||||
|
||||
@item
|
||||
@@ -3547,7 +3684,7 @@ value 400 octal does not fit into a single byte.
|
||||
@end enumerate
|
||||
|
||||
GNU @code{tr} does not provide complete BSD or System V compatibility.
|
||||
For example, it is impossible to disable interpretation of the @sc{POSIX}
|
||||
For example, it is impossible to disable interpretation of the @sc{posix}
|
||||
constructs @samp{[:alpha:]}, @samp{[=c=]}, and @samp{[c*10]}. Also, GNU
|
||||
@code{tr} does not delete zero bytes automatically, unlike traditional
|
||||
Unix versions, which provide no way to preserve zero bytes.
|
||||
@@ -3765,7 +3902,7 @@ redirected standard output of your program away from your screen.
|
||||
For filter programs to work together, the format of the data has to be
|
||||
agreed upon. The most straightforward and easiest format to use is simply
|
||||
lines of text. Unix data files are generally just streams of bytes, with
|
||||
lines delimited by the @sc{ASCII} @sc{LF} (Line Feed) character,
|
||||
lines delimited by the @sc{ascii} @sc{lf} (Line Feed) character,
|
||||
conventionally called a ``newline'' in the Unix literature. (This is
|
||||
@code{'\n'} if you're a C programmer.) This is the format used by all
|
||||
the traditional filtering programs. (Many earlier operating systems
|
||||
@@ -3840,8 +3977,8 @@ yourself using when setting up fancy data plumbing. The @code{sort}
|
||||
command reads and sorts each file named on the command line. It then
|
||||
merges the sorted data and writes it to standard output. It will read
|
||||
standard input if no files are given on the command line (thus
|
||||
making it into a filter). The sort is based on the machine collating
|
||||
sequence (@sc{ASCII}) or based on user-supplied ordering criteria.
|
||||
making it into a filter). The sort is based on the character collating
|
||||
sequence or based on user-supplied ordering criteria.
|
||||
|
||||
|
||||
@node The uniq command
|
||||
@@ -4017,7 +4154,7 @@ $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' | ...
|
||||
The second @code{tr} command operates on the complement of the listed
|
||||
characters, which are all the letters, the digits, the underscore, and
|
||||
the blank. The @samp{\012} represents the newline character; it has to
|
||||
be left alone. (The ASCII TAB character should also be included for
|
||||
be left alone. (The @sc{ascii} tab character should also be included for
|
||||
good measure in a production script.)
|
||||
|
||||
At this point, we have data consisting of words separated by blank space.
|
||||
@@ -4063,7 +4200,7 @@ with the help of two more @code{sort} options:
|
||||
|
||||
@table @samp
|
||||
@item -n
|
||||
do a numeric sort, not an ASCII one
|
||||
do a numeric sort, not a textual one
|
||||
|
||||
@item -r
|
||||
reverse the order of the sort
|
||||
|
||||
9
lib/.cppi-disable
Normal file
9
lib/.cppi-disable
Normal file
@@ -0,0 +1,9 @@
|
||||
error.h
|
||||
fnmatch.h
|
||||
getopt.h
|
||||
getopt.c
|
||||
getopt1.c
|
||||
md5.h
|
||||
obstack.h
|
||||
regex.h
|
||||
getpagesize.h
|
||||
165
lib/.gdb-history
165
lib/.gdb-history
@@ -19,3 +19,168 @@ n
|
||||
p (he->h_addrtype)
|
||||
n
|
||||
q
|
||||
r a:b
|
||||
b main
|
||||
r a:b
|
||||
n
|
||||
s
|
||||
n
|
||||
p separator
|
||||
n
|
||||
l 128
|
||||
c
|
||||
q
|
||||
r meyering:store
|
||||
p *username
|
||||
p *username[separator - name]
|
||||
p separator - name
|
||||
p username[separator - name]
|
||||
r ''
|
||||
l
|
||||
q
|
||||
r ''
|
||||
l
|
||||
q
|
||||
r meyering
|
||||
b main
|
||||
r meyering
|
||||
n
|
||||
r
|
||||
n
|
||||
s
|
||||
n
|
||||
p u
|
||||
n
|
||||
n
|
||||
q
|
||||
r ''
|
||||
r meyering
|
||||
up
|
||||
l
|
||||
q
|
||||
b main
|
||||
b a.out 1
|
||||
r a.out 1
|
||||
n
|
||||
s
|
||||
fin
|
||||
s
|
||||
n
|
||||
p uid
|
||||
p gid
|
||||
p euid
|
||||
p egid
|
||||
n
|
||||
p mode
|
||||
p path
|
||||
fin
|
||||
r -v -c 10 -n 20 -x 80 < in-2
|
||||
up
|
||||
up
|
||||
p &dummy
|
||||
p *ovp
|
||||
p *(int*)*ovp
|
||||
p ((struct item*)*ovp)->key
|
||||
p old_vec@10
|
||||
r -v -c 10 -n 20 -x 80 < in-3
|
||||
p *(int*)*ovp
|
||||
up
|
||||
dow
|
||||
p *(int*)*ovp
|
||||
up
|
||||
p *(int*)*ovp
|
||||
i loca
|
||||
dow
|
||||
p key
|
||||
p dummy
|
||||
p &dummy
|
||||
up
|
||||
p old_vec
|
||||
p *ovp
|
||||
p ovp
|
||||
p ovp - old_vec
|
||||
p *old_vec@10
|
||||
p *old_vec@13
|
||||
b hash_insert_item
|
||||
r
|
||||
b hash_insert_item_at
|
||||
r
|
||||
n
|
||||
p fail
|
||||
p *(ht->vec)@13
|
||||
p *(ht->ht_vec)@13
|
||||
p ((struct item*)(ht->ht_vec)[10])->key
|
||||
b hash_delete_item
|
||||
b hash_delete_item_at
|
||||
c
|
||||
n
|
||||
p slot
|
||||
p item
|
||||
n
|
||||
n
|
||||
p *(ht->ht_vec)@13
|
||||
p &dummy
|
||||
p dummy
|
||||
n
|
||||
s
|
||||
n
|
||||
n
|
||||
p *(ht->ht_vec)@13
|
||||
n
|
||||
p new_size
|
||||
n
|
||||
p *old_vec@13
|
||||
p old_vec@13
|
||||
n
|
||||
p *old_vec@13
|
||||
n
|
||||
p *old_vec@13
|
||||
n
|
||||
l
|
||||
n
|
||||
p ovp - old_vec
|
||||
n
|
||||
p ovp - old_vec
|
||||
n
|
||||
p ovp - old_vec
|
||||
p *old_vec@13
|
||||
p &dummy
|
||||
q
|
||||
r 444444444444 44444444444
|
||||
b human_readable
|
||||
r
|
||||
n
|
||||
q
|
||||
b main
|
||||
r 444444444444 44444444444
|
||||
n
|
||||
p a
|
||||
p b
|
||||
r 34343434 3434343434
|
||||
c
|
||||
r
|
||||
n
|
||||
n
|
||||
p a
|
||||
p b
|
||||
r 343434343 343434343
|
||||
c
|
||||
q
|
||||
b posixtime
|
||||
r
|
||||
n
|
||||
s
|
||||
n
|
||||
p len
|
||||
n
|
||||
p pair
|
||||
p len
|
||||
n
|
||||
b year
|
||||
y
|
||||
c
|
||||
c
|
||||
p n
|
||||
up
|
||||
p len
|
||||
q
|
||||
|
||||
50
lib/ChangeLog
Normal file
50
lib/ChangeLog
Normal file
@@ -0,0 +1,50 @@
|
||||
2000-01-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
|
||||
uses of ->ut_name. The latter doesn't work with new Linux header files
|
||||
where only utmpx.ut_user is declared.
|
||||
|
||||
* readutmp.h (UT_USER): Define.
|
||||
|
||||
2000-01-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
|
||||
obstack.c.
|
||||
|
||||
2000-01-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
|
||||
[! HAVE_DECL_STRTOULL]: Declare strtoull.
|
||||
Required for some AIX systems. Reported by Christian Krackowizer.
|
||||
[TESTING] (main): New function.
|
||||
|
||||
1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
* dirname.c (dir_name): Support for DOS-style file names with drive
|
||||
letters.
|
||||
|
||||
* quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
|
||||
|
||||
* strverscmp.c (ISDIGIT): Define.
|
||||
(strverscmp): Use ISDIGIT, not isdigit.
|
||||
|
||||
2000-01-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* nanosleep.c (nanosleep):
|
||||
Don't use SA_INTERRUPT to decide whether to call sigaction, as
|
||||
POSIX.1 doesn't require SA_INTERRUPT and some systems
|
||||
(e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
|
||||
it's been part of POSIX.1 since day 1 (in 1988).
|
||||
|
||||
2000-01-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* interlock: Remove unused file. Reported by François Pinard.
|
||||
|
||||
2000-01-16 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/quotearg.c (quotearg_buffer_restyled): Do not quote
|
||||
alert, backslash, formfeed, and vertical tab unnecessarily in
|
||||
shell quoting style.
|
||||
|
||||
Local Variables:
|
||||
version-control: never
|
||||
End:
|
||||
@@ -2,35 +2,52 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = ../src/ansi2knr
|
||||
|
||||
noinst_LIBRARIES = libfu.a
|
||||
noinst_LIBRARIES = libfetish.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
libfu_a_SOURCES = getdate.y posixtm.c getopt.c getopt1.c \
|
||||
addext.c argmatch.c backupfile.c basename.c \
|
||||
closeout.c dirname.c exclude.c filemode.c \
|
||||
full-write.c human.c idcache.c \
|
||||
isdir.c long-options.c makepath.c modechange.c hash.c path-concat.c \
|
||||
quotearg.c safe-read.c save-cwd.c savedir.c stripslash.c userspec.c \
|
||||
version-etc.c xgetcwd.c xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
|
||||
libfetish_a_SOURCES = \
|
||||
getdate.y posixtm.c addext.c argmatch.c backupfile.c basename.c \
|
||||
canon-host.c closeout.c dirname.c exclude.c filemode.c diacrit.c \
|
||||
full-write.c getopt.c getopt1.c getugroups.c hard-locale.c hash.c \
|
||||
human.c idcache.c isdir.c linebuffer.c long-options.c makepath.c \
|
||||
md5.c memcasecmp.c memcoll.c modechange.c path-concat.c \
|
||||
quotearg.c readtokens.c readutmp.c safe-read.c same.c save-cwd.c \
|
||||
savedir.c stripslash.c userspec.c version-etc.c xgetcwd.c xgethostname.c \
|
||||
xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c xstrtoumax.c yesno.c
|
||||
|
||||
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
|
||||
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = argmatch.h backupfile.h closeout.h \
|
||||
dirname.h error.h exclude.h filemode.h fnmatch.h fsusage.h \
|
||||
getdate.h getline.h getopt.h group-member.h human.h lchown.h long-options.h \
|
||||
makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
|
||||
posixtm.h quotearg.h regex.h safe-read.h save-cwd.h savedir.h strverscmp.h \
|
||||
version-etc.h xalloc.h xstrtol.h xstrtoul.h
|
||||
noinst_HEADERS = \
|
||||
argmatch.h backupfile.h bumpalloc.h closeout.h diacrit.h dirname.h error.h \
|
||||
exclude.h filemode.h fnmatch.h fsusage.h getdate.h getline.h getopt.h \
|
||||
getpagesize.h group-member.h hard-locale.h hash.h human.h lchown.h \
|
||||
linebuffer.h long-options.h md5.h memcasecmp.h memcoll.h \
|
||||
makepath.h modechange.h mountlist.h nanosleep.h obstack.h \
|
||||
path-concat.h pathmax.h posixtm.h quotearg.h readtokens.h \
|
||||
readutmp.h regex.h safe-read.h same.h save-cwd.h savedir.h \
|
||||
strverscmp.h version-etc.h xalloc.h xstrtod.h xstrtol.h
|
||||
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = lstat.c stat.c
|
||||
|
||||
EXTRA_DIST = xstat.in
|
||||
lstat.c: xstat.in
|
||||
sed -e '/@IGNORE@/d' -e 's/@xstat@/lstat/g' $(srcdir)/xstat.in > $@-t
|
||||
sed \
|
||||
-e '/@IGNORE@/d' \
|
||||
-e 's/@xstat@/lstat/g' \
|
||||
-e '/_LSTAT_ONLY@/d' \
|
||||
-e '/@BEGIN_STAT_ONLY@/,/@END_STAT_ONLY@/d' \
|
||||
$(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
stat.c: xstat.in
|
||||
sed -e '/@IGNORE@/d' -e 's/@xstat@/stat/g' $(srcdir)/xstat.in > $@-t
|
||||
sed \
|
||||
-e '/@IGNORE@/d' \
|
||||
-e 's/@xstat@/stat/g' \
|
||||
-e '/_STAT_ONLY@/d' \
|
||||
-e '/@BEGIN_LSTAT_ONLY@/,/@END_LSTAT_ONLY@/d' \
|
||||
$(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
435
lib/Makefile.in
435
lib/Makefile.in
@@ -57,13 +57,23 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
@@ -74,42 +84,67 @@ INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MVDIR_PROG = @MVDIR_PROG@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
POW_LIBM = @POW_LIBM@
|
||||
RANLIB = @RANLIB@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
|
||||
AUTOMAKE_OPTIONS = ../src/ansi2knr
|
||||
|
||||
noinst_LIBRARIES = libfu.a
|
||||
noinst_LIBRARIES = libfetish.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
libfu_a_SOURCES = getdate.y posixtm.c getopt.c getopt1.c addext.c argmatch.c backupfile.c basename.c closeout.c dirname.c exclude.c filemode.c full-write.c human.c idcache.c isdir.c long-options.c makepath.c modechange.c hash.c path-concat.c quotearg.c safe-read.c save-cwd.c savedir.c stripslash.c userspec.c version-etc.c xgetcwd.c xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
|
||||
libfetish_a_SOURCES = \
|
||||
getdate.y posixtm.c addext.c argmatch.c backupfile.c basename.c \
|
||||
canon-host.c closeout.c dirname.c exclude.c filemode.c diacrit.c \
|
||||
full-write.c getopt.c getopt1.c getugroups.c hard-locale.c hash.c \
|
||||
human.c idcache.c isdir.c linebuffer.c long-options.c makepath.c \
|
||||
md5.c memcasecmp.c memcoll.c modechange.c path-concat.c \
|
||||
quotearg.c readtokens.c readutmp.c safe-read.c same.c save-cwd.c \
|
||||
savedir.c stripslash.c userspec.c version-etc.c xgetcwd.c xgethostname.c \
|
||||
xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c xstrtoumax.c yesno.c
|
||||
|
||||
|
||||
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
|
||||
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = argmatch.h backupfile.h closeout.h dirname.h error.h exclude.h filemode.h fnmatch.h fsusage.h getdate.h getline.h getopt.h group-member.h human.h lchown.h long-options.h makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h posixtm.h quotearg.h regex.h safe-read.h save-cwd.h savedir.h strverscmp.h version-etc.h xalloc.h xstrtol.h xstrtoul.h
|
||||
noinst_HEADERS = \
|
||||
argmatch.h backupfile.h bumpalloc.h closeout.h diacrit.h dirname.h error.h \
|
||||
exclude.h filemode.h fnmatch.h fsusage.h getdate.h getline.h getopt.h \
|
||||
getpagesize.h group-member.h hard-locale.h hash.h human.h lchown.h \
|
||||
linebuffer.h long-options.h md5.h memcasecmp.h memcoll.h \
|
||||
makepath.h modechange.h mountlist.h nanosleep.h obstack.h \
|
||||
path-concat.h pathmax.h posixtm.h quotearg.h readtokens.h \
|
||||
readutmp.h regex.h safe-read.h same.h save-cwd.h savedir.h \
|
||||
strverscmp.h version-etc.h xalloc.h xstrtod.h xstrtol.h
|
||||
|
||||
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = lstat.c stat.c
|
||||
|
||||
EXTRA_DIST = xstat.in
|
||||
subdir = lib
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
@@ -121,57 +156,82 @@ CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
ANSI2KNR = ../src/ansi2knr
|
||||
libfu_a_OBJECTS = getdate$U.o posixtm$U.o getopt$U.o getopt1$U.o \
|
||||
addext$U.o argmatch$U.o backupfile$U.o basename$U.o closeout$U.o \
|
||||
dirname$U.o exclude$U.o filemode$U.o full-write$U.o human$U.o \
|
||||
idcache$U.o isdir$U.o long-options$U.o makepath$U.o modechange$U.o \
|
||||
hash$U.o path-concat$U.o quotearg$U.o safe-read$U.o save-cwd$U.o \
|
||||
savedir$U.o stripslash$U.o userspec$U.o version-etc$U.o xgetcwd$U.o \
|
||||
xmalloc$U.o xstrdup$U.o xstrtol$U.o xstrtoul$U.o yesno$U.o
|
||||
libfetish_a_AR = $(AR) cru
|
||||
am_libfetish_a_OBJECTS = getdate$U.o posixtm$U.o addext$U.o \
|
||||
argmatch$U.o backupfile$U.o basename$U.o canon-host$U.o closeout$U.o \
|
||||
dirname$U.o exclude$U.o filemode$U.o diacrit$U.o full-write$U.o \
|
||||
getopt$U.o getopt1$U.o getugroups$U.o hard-locale$U.o hash$U.o \
|
||||
human$U.o idcache$U.o isdir$U.o linebuffer$U.o long-options$U.o \
|
||||
makepath$U.o md5$U.o memcasecmp$U.o memcoll$U.o modechange$U.o \
|
||||
path-concat$U.o quotearg$U.o readtokens$U.o readutmp$U.o safe-read$U.o \
|
||||
same$U.o save-cwd$U.o savedir$U.o stripslash$U.o userspec$U.o \
|
||||
version-etc$U.o xgetcwd$U.o xgethostname$U.o xmalloc$U.o xstrdup$U.o \
|
||||
xstrtod$U.o xstrtol$U.o xstrtoul$U.o xstrtoumax$U.o yesno$U.o
|
||||
libfetish_a_OBJECTS = $(am_libfetish_a_OBJECTS)
|
||||
AR = ar
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CFLAGS = @CFLAGS@
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_SOURCES = $(libfetish_a_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in TODO alloca.c chown.c error.c \
|
||||
error.h euidaccess.c fileblocks.c fnmatch.c fsusage.c ftruncate.c \
|
||||
getdate.c getgroups.c getline.c group-member.c lchown.c lstat.c \
|
||||
malloc.c memcmp.c memcpy.c memset.c mkdir.c mktime.c mountlist.c \
|
||||
obstack.c obstack.h realloc.c regex.c rename.c rmdir.c rpmatch.c stat.c \
|
||||
stpcpy.c strcasecmp.c strdup.c strftime.c strncasecmp.c strndup.c \
|
||||
strstr.c strtol.c strtoul.c strverscmp.c utime.c
|
||||
DIST_COMMON = $(noinst_HEADERS) ChangeLog Makefile.am Makefile.in TODO \
|
||||
alloca.c chown.c dup2.c error.c error.h euidaccess.c fileblocks.c \
|
||||
fnmatch.c fsusage.c ftruncate.c getdate.c getgroups.c gethostname.c \
|
||||
getline.c getloadavg.c getusershell.c group-member.c lchown.c malloc.c \
|
||||
memchr.c memcmp.c memcpy.c memmove.c memset.c mkdir.c mktime.c \
|
||||
mountlist.c nanosleep.c obstack.c obstack.h putenv.c realloc.c regex.c \
|
||||
rmdir.c rpmatch.c stime.c stpcpy.c strcasecmp.c strcspn.c strdup.c \
|
||||
strftime.c strncasecmp.c strndup.c strpbrk.c strstr.c strtod.c strtol.c \
|
||||
strtoul.c strtoull.c strtoumax.c strverscmp.c utime.c
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/addext.P .deps/alloca.P .deps/argmatch.P \
|
||||
.deps/backupfile.P .deps/basename.P .deps/chown.P .deps/closeout.P \
|
||||
.deps/dirname.P .deps/error.P .deps/euidaccess.P .deps/exclude.P \
|
||||
.deps/fileblocks.P .deps/filemode.P .deps/fnmatch.P .deps/fsusage.P \
|
||||
.deps/ftruncate.P .deps/full-write.P .deps/getdate.P .deps/getgroups.P \
|
||||
.deps/getline.P .deps/getopt.P .deps/getopt1.P .deps/group-member.P \
|
||||
.deps/hash.P .deps/human.P .deps/idcache.P .deps/isdir.P .deps/lchown.P \
|
||||
.deps/long-options.P .deps/lstat.P .deps/makepath.P .deps/malloc.P \
|
||||
.deps/memcmp.P .deps/memcpy.P .deps/memset.P .deps/mkdir.P \
|
||||
.deps/mktime.P .deps/modechange.P .deps/mountlist.P .deps/obstack.P \
|
||||
.deps/path-concat.P .deps/posixtm.P .deps/quotearg.P .deps/realloc.P \
|
||||
.deps/regex.P .deps/rename.P .deps/rmdir.P .deps/rpmatch.P \
|
||||
.deps/safe-read.P .deps/save-cwd.P .deps/savedir.P .deps/stat.P \
|
||||
.deps/stpcpy.P .deps/strcasecmp.P .deps/strdup.P .deps/strftime.P \
|
||||
.deps/stripslash.P .deps/strncasecmp.P .deps/strndup.P .deps/strstr.P \
|
||||
.deps/strtol.P .deps/strtoul.P .deps/strverscmp.P .deps/userspec.P \
|
||||
.deps/utime.P .deps/version-etc.P .deps/xgetcwd.P .deps/xmalloc.P \
|
||||
.deps/xstrdup.P .deps/xstrtol.P .deps/xstrtoul.P .deps/yesno.P
|
||||
SOURCES = $(libfu_a_SOURCES)
|
||||
OBJECTS = $(libfu_a_OBJECTS)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
DEP_FILES = @AMDEP@ $(DEPDIR)/addext$U.Po $(DEPDIR)/alloca.Po \
|
||||
$(DEPDIR)/argmatch$U.Po $(DEPDIR)/backupfile$U.Po \
|
||||
$(DEPDIR)/basename$U.Po $(DEPDIR)/canon-host$U.Po $(DEPDIR)/chown.Po \
|
||||
$(DEPDIR)/closeout$U.Po $(DEPDIR)/diacrit$U.Po $(DEPDIR)/dirname$U.Po \
|
||||
$(DEPDIR)/dup2.Po $(DEPDIR)/error.Po $(DEPDIR)/euidaccess.Po \
|
||||
$(DEPDIR)/exclude$U.Po $(DEPDIR)/fileblocks.Po $(DEPDIR)/filemode$U.Po \
|
||||
$(DEPDIR)/fnmatch.Po $(DEPDIR)/fsusage.Po $(DEPDIR)/ftruncate.Po \
|
||||
$(DEPDIR)/full-write$U.Po $(DEPDIR)/getdate$U.Po $(DEPDIR)/getgroups.Po \
|
||||
$(DEPDIR)/gethostname.Po $(DEPDIR)/getline.Po $(DEPDIR)/getloadavg.Po \
|
||||
$(DEPDIR)/getopt$U.Po $(DEPDIR)/getopt1$U.Po $(DEPDIR)/getugroups$U.Po \
|
||||
$(DEPDIR)/getusershell.Po $(DEPDIR)/group-member.Po \
|
||||
$(DEPDIR)/hard-locale$U.Po $(DEPDIR)/hash$U.Po $(DEPDIR)/human$U.Po \
|
||||
$(DEPDIR)/idcache$U.Po $(DEPDIR)/isdir$U.Po $(DEPDIR)/lchown.Po \
|
||||
$(DEPDIR)/linebuffer$U.Po $(DEPDIR)/long-options$U.Po \
|
||||
$(DEPDIR)/lstat.Po $(DEPDIR)/makepath$U.Po $(DEPDIR)/malloc.Po \
|
||||
$(DEPDIR)/md5$U.Po $(DEPDIR)/memcasecmp$U.Po $(DEPDIR)/memchr.Po \
|
||||
$(DEPDIR)/memcmp.Po $(DEPDIR)/memcoll$U.Po $(DEPDIR)/memcpy.Po \
|
||||
$(DEPDIR)/memmove.Po $(DEPDIR)/memset.Po $(DEPDIR)/mkdir.Po \
|
||||
$(DEPDIR)/mktime.Po $(DEPDIR)/modechange$U.Po $(DEPDIR)/mountlist.Po \
|
||||
$(DEPDIR)/nanosleep.Po $(DEPDIR)/obstack.Po $(DEPDIR)/path-concat$U.Po \
|
||||
$(DEPDIR)/posixtm$U.Po $(DEPDIR)/putenv.Po $(DEPDIR)/quotearg$U.Po \
|
||||
$(DEPDIR)/readtokens$U.Po $(DEPDIR)/readutmp$U.Po $(DEPDIR)/realloc.Po \
|
||||
$(DEPDIR)/regex.Po $(DEPDIR)/rmdir.Po $(DEPDIR)/rpmatch.Po \
|
||||
$(DEPDIR)/safe-read$U.Po $(DEPDIR)/same$U.Po $(DEPDIR)/save-cwd$U.Po \
|
||||
$(DEPDIR)/savedir$U.Po $(DEPDIR)/stat.Po $(DEPDIR)/stime.Po \
|
||||
$(DEPDIR)/stpcpy.Po $(DEPDIR)/strcasecmp.Po $(DEPDIR)/strcspn.Po \
|
||||
$(DEPDIR)/strdup.Po $(DEPDIR)/strftime.Po $(DEPDIR)/stripslash$U.Po \
|
||||
$(DEPDIR)/strncasecmp.Po $(DEPDIR)/strndup.Po $(DEPDIR)/strpbrk.Po \
|
||||
$(DEPDIR)/strstr.Po $(DEPDIR)/strtod.Po $(DEPDIR)/strtol.Po \
|
||||
$(DEPDIR)/strtoul.Po $(DEPDIR)/strtoull.Po $(DEPDIR)/strtoumax.Po \
|
||||
$(DEPDIR)/strverscmp.Po $(DEPDIR)/userspec$U.Po $(DEPDIR)/utime.Po \
|
||||
$(DEPDIR)/version-etc$U.Po $(DEPDIR)/xgetcwd$U.Po \
|
||||
$(DEPDIR)/xgethostname$U.Po $(DEPDIR)/xmalloc$U.Po \
|
||||
$(DEPDIR)/xstrdup$U.Po $(DEPDIR)/xstrtod$U.Po $(DEPDIR)/xstrtol$U.Po \
|
||||
$(DEPDIR)/xstrtoul$U.Po $(DEPDIR)/xstrtoumax$U.Po $(DEPDIR)/yesno$U.Po
|
||||
SOURCES = $(libfetish_a_SOURCES)
|
||||
OBJECTS = $(am_libfetish_a_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s .y
|
||||
.SUFFIXES: .c .o .y
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/Makefile
|
||||
|
||||
@@ -189,12 +249,6 @@ distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
@@ -220,10 +274,10 @@ distclean-kr:
|
||||
|
||||
maintainer-clean-kr:
|
||||
|
||||
libfu.a: $(libfu_a_OBJECTS) $(libfu_a_DEPENDENCIES)
|
||||
-rm -f libfu.a
|
||||
$(AR) cru libfu.a $(libfu_a_OBJECTS) $(libfu_a_LIBADD)
|
||||
$(RANLIB) libfu.a
|
||||
libfetish.a: $(libfetish_a_OBJECTS) $(libfetish_a_DEPENDENCIES)
|
||||
-rm -f libfetish.a
|
||||
$(libfetish_a_AR) libfetish.a $(libfetish_a_OBJECTS) $(libfetish_a_LIBADD)
|
||||
$(RANLIB) libfetish.a
|
||||
addext_.c: addext.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/addext.c; then echo $(srcdir)/addext.c; else echo addext.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > addext_.c
|
||||
alloca_.c: alloca.c $(ANSI2KNR)
|
||||
@@ -234,12 +288,18 @@ backupfile_.c: backupfile.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/backupfile.c; then echo $(srcdir)/backupfile.c; else echo backupfile.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > backupfile_.c
|
||||
basename_.c: basename.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/basename.c; then echo $(srcdir)/basename.c; else echo basename.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > basename_.c
|
||||
canon-host_.c: canon-host.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/canon-host.c; then echo $(srcdir)/canon-host.c; else echo canon-host.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > canon-host_.c
|
||||
chown_.c: chown.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/chown.c; then echo $(srcdir)/chown.c; else echo chown.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > chown_.c
|
||||
closeout_.c: closeout.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/closeout.c; then echo $(srcdir)/closeout.c; else echo closeout.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > closeout_.c
|
||||
diacrit_.c: diacrit.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/diacrit.c; then echo $(srcdir)/diacrit.c; else echo diacrit.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > diacrit_.c
|
||||
dirname_.c: dirname.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dirname.c; then echo $(srcdir)/dirname.c; else echo dirname.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dirname_.c
|
||||
dup2_.c: dup2.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dup2.c; then echo $(srcdir)/dup2.c; else echo dup2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dup2_.c
|
||||
error_.c: error.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c
|
||||
euidaccess_.c: euidaccess.c $(ANSI2KNR)
|
||||
@@ -262,14 +322,24 @@ getdate_.c: getdate.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getdate.c; then echo $(srcdir)/getdate.c; else echo getdate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getdate_.c
|
||||
getgroups_.c: getgroups.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getgroups.c; then echo $(srcdir)/getgroups.c; else echo getgroups.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getgroups_.c
|
||||
gethostname_.c: gethostname.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gethostname.c; then echo $(srcdir)/gethostname.c; else echo gethostname.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gethostname_.c
|
||||
getline_.c: getline.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getline.c; then echo $(srcdir)/getline.c; else echo getline.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getline_.c
|
||||
getloadavg_.c: getloadavg.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getloadavg.c; then echo $(srcdir)/getloadavg.c; else echo getloadavg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getloadavg_.c
|
||||
getopt_.c: getopt.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt_.c
|
||||
getopt1_.c: getopt1.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt1_.c
|
||||
getugroups_.c: getugroups.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getugroups.c; then echo $(srcdir)/getugroups.c; else echo getugroups.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getugroups_.c
|
||||
getusershell_.c: getusershell.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getusershell.c; then echo $(srcdir)/getusershell.c; else echo getusershell.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getusershell_.c
|
||||
group-member_.c: group-member.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/group-member.c; then echo $(srcdir)/group-member.c; else echo group-member.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > group-member_.c
|
||||
hard-locale_.c: hard-locale.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hard-locale.c; then echo $(srcdir)/hard-locale.c; else echo hard-locale.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hard-locale_.c
|
||||
hash_.c: hash.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hash.c; then echo $(srcdir)/hash.c; else echo hash.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hash_.c
|
||||
human_.c: human.c $(ANSI2KNR)
|
||||
@@ -280,6 +350,8 @@ isdir_.c: isdir.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/isdir.c; then echo $(srcdir)/isdir.c; else echo isdir.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > isdir_.c
|
||||
lchown_.c: lchown.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lchown.c; then echo $(srcdir)/lchown.c; else echo lchown.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lchown_.c
|
||||
linebuffer_.c: linebuffer.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/linebuffer.c; then echo $(srcdir)/linebuffer.c; else echo linebuffer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > linebuffer_.c
|
||||
long-options_.c: long-options.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/long-options.c; then echo $(srcdir)/long-options.c; else echo long-options.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > long-options_.c
|
||||
lstat_.c: lstat.c $(ANSI2KNR)
|
||||
@@ -288,10 +360,20 @@ makepath_.c: makepath.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/makepath.c; then echo $(srcdir)/makepath.c; else echo makepath.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > makepath_.c
|
||||
malloc_.c: malloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/malloc.c; then echo $(srcdir)/malloc.c; else echo malloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > malloc_.c
|
||||
md5_.c: md5.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/md5.c; then echo $(srcdir)/md5.c; else echo md5.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > md5_.c
|
||||
memcasecmp_.c: memcasecmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcasecmp.c; then echo $(srcdir)/memcasecmp.c; else echo memcasecmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcasecmp_.c
|
||||
memchr_.c: memchr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memchr.c; then echo $(srcdir)/memchr.c; else echo memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c
|
||||
memcmp_.c: memcmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcmp.c; then echo $(srcdir)/memcmp.c; else echo memcmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcmp_.c
|
||||
memcoll_.c: memcoll.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcoll.c; then echo $(srcdir)/memcoll.c; else echo memcoll.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcoll_.c
|
||||
memcpy_.c: memcpy.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcpy.c; then echo $(srcdir)/memcpy.c; else echo memcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcpy_.c
|
||||
memmove_.c: memmove.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memmove.c; then echo $(srcdir)/memmove.c; else echo memmove.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memmove_.c
|
||||
memset_.c: memset.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memset.c; then echo $(srcdir)/memset.c; else echo memset.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memset_.c
|
||||
mkdir_.c: mkdir.c $(ANSI2KNR)
|
||||
@@ -302,36 +384,48 @@ modechange_.c: modechange.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/modechange.c; then echo $(srcdir)/modechange.c; else echo modechange.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > modechange_.c
|
||||
mountlist_.c: mountlist.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mountlist.c; then echo $(srcdir)/mountlist.c; else echo mountlist.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > mountlist_.c
|
||||
nanosleep_.c: nanosleep.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nanosleep.c; then echo $(srcdir)/nanosleep.c; else echo nanosleep.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > nanosleep_.c
|
||||
obstack_.c: obstack.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c
|
||||
path-concat_.c: path-concat.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/path-concat.c; then echo $(srcdir)/path-concat.c; else echo path-concat.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > path-concat_.c
|
||||
posixtm_.c: posixtm.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/posixtm.c; then echo $(srcdir)/posixtm.c; else echo posixtm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > posixtm_.c
|
||||
putenv_.c: putenv.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/putenv.c; then echo $(srcdir)/putenv.c; else echo putenv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > putenv_.c
|
||||
quotearg_.c: quotearg.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quotearg.c; then echo $(srcdir)/quotearg.c; else echo quotearg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quotearg_.c
|
||||
readtokens_.c: readtokens.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/readtokens.c; then echo $(srcdir)/readtokens.c; else echo readtokens.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > readtokens_.c
|
||||
readutmp_.c: readutmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/readutmp.c; then echo $(srcdir)/readutmp.c; else echo readutmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > readutmp_.c
|
||||
realloc_.c: realloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c
|
||||
regex_.c: regex.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/regex.c; then echo $(srcdir)/regex.c; else echo regex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > regex_.c
|
||||
rename_.c: rename.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rename.c; then echo $(srcdir)/rename.c; else echo rename.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rename_.c
|
||||
rmdir_.c: rmdir.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rmdir.c; then echo $(srcdir)/rmdir.c; else echo rmdir.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rmdir_.c
|
||||
rpmatch_.c: rpmatch.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rpmatch.c; then echo $(srcdir)/rpmatch.c; else echo rpmatch.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rpmatch_.c
|
||||
safe-read_.c: safe-read.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/safe-read.c; then echo $(srcdir)/safe-read.c; else echo safe-read.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > safe-read_.c
|
||||
same_.c: same.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/same.c; then echo $(srcdir)/same.c; else echo same.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > same_.c
|
||||
save-cwd_.c: save-cwd.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/save-cwd.c; then echo $(srcdir)/save-cwd.c; else echo save-cwd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > save-cwd_.c
|
||||
savedir_.c: savedir.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/savedir.c; then echo $(srcdir)/savedir.c; else echo savedir.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > savedir_.c
|
||||
stat_.c: stat.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stat.c; then echo $(srcdir)/stat.c; else echo stat.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stat_.c
|
||||
stime_.c: stime.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stime.c; then echo $(srcdir)/stime.c; else echo stime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stime_.c
|
||||
stpcpy_.c: stpcpy.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c
|
||||
strcasecmp_.c: strcasecmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strcasecmp.c; then echo $(srcdir)/strcasecmp.c; else echo strcasecmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strcasecmp_.c
|
||||
strcspn_.c: strcspn.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strcspn.c; then echo $(srcdir)/strcspn.c; else echo strcspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strcspn_.c
|
||||
strdup_.c: strdup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strdup.c; then echo $(srcdir)/strdup.c; else echo strdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strdup_.c
|
||||
strftime_.c: strftime.c $(ANSI2KNR)
|
||||
@@ -342,12 +436,20 @@ strncasecmp_.c: strncasecmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strncasecmp.c; then echo $(srcdir)/strncasecmp.c; else echo strncasecmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strncasecmp_.c
|
||||
strndup_.c: strndup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c
|
||||
strpbrk_.c: strpbrk.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strpbrk.c; then echo $(srcdir)/strpbrk.c; else echo strpbrk.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strpbrk_.c
|
||||
strstr_.c: strstr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strstr.c; then echo $(srcdir)/strstr.c; else echo strstr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strstr_.c
|
||||
strtod_.c: strtod.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtod.c; then echo $(srcdir)/strtod.c; else echo strtod.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strtod_.c
|
||||
strtol_.c: strtol.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtol.c; then echo $(srcdir)/strtol.c; else echo strtol.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strtol_.c
|
||||
strtoul_.c: strtoul.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtoul.c; then echo $(srcdir)/strtoul.c; else echo strtoul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strtoul_.c
|
||||
strtoull_.c: strtoull.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtoull.c; then echo $(srcdir)/strtoull.c; else echo strtoull.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strtoull_.c
|
||||
strtoumax_.c: strtoumax.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtoumax.c; then echo $(srcdir)/strtoumax.c; else echo strtoumax.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strtoumax_.c
|
||||
strverscmp_.c: strverscmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strverscmp.c; then echo $(srcdir)/strverscmp.c; else echo strverscmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strverscmp_.c
|
||||
userspec_.c: userspec.c $(ANSI2KNR)
|
||||
@@ -358,56 +460,70 @@ version-etc_.c: version-etc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/version-etc.c; then echo $(srcdir)/version-etc.c; else echo version-etc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > version-etc_.c
|
||||
xgetcwd_.c: xgetcwd.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xgetcwd.c; then echo $(srcdir)/xgetcwd.c; else echo xgetcwd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xgetcwd_.c
|
||||
xgethostname_.c: xgethostname.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xgethostname.c; then echo $(srcdir)/xgethostname.c; else echo xgethostname.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xgethostname_.c
|
||||
xmalloc_.c: xmalloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c
|
||||
xstrdup_.c: xstrdup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrdup_.c
|
||||
xstrtod_.c: xstrtod.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtod.c; then echo $(srcdir)/xstrtod.c; else echo xstrtod.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrtod_.c
|
||||
xstrtol_.c: xstrtol.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtol.c; then echo $(srcdir)/xstrtol.c; else echo xstrtol.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrtol_.c
|
||||
xstrtoul_.c: xstrtoul.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtoul.c; then echo $(srcdir)/xstrtoul.c; else echo xstrtoul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrtoul_.c
|
||||
xstrtoumax_.c: xstrtoumax.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtoumax.c; then echo $(srcdir)/xstrtoumax.c; else echo xstrtoumax.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrtoumax_.c
|
||||
yesno_.c: yesno.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/yesno.c; then echo $(srcdir)/yesno.c; else echo yesno.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > yesno_.c
|
||||
addext_.o alloca_.o argmatch_.o backupfile_.o basename_.o chown_.o \
|
||||
closeout_.o dirname_.o error_.o euidaccess_.o exclude_.o fileblocks_.o \
|
||||
filemode_.o fnmatch_.o fsusage_.o ftruncate_.o full-write_.o getdate_.o \
|
||||
getgroups_.o getline_.o getopt_.o getopt1_.o group-member_.o hash_.o \
|
||||
human_.o idcache_.o isdir_.o lchown_.o long-options_.o lstat_.o \
|
||||
makepath_.o malloc_.o memcmp_.o memcpy_.o memset_.o mkdir_.o mktime_.o \
|
||||
modechange_.o mountlist_.o obstack_.o path-concat_.o posixtm_.o \
|
||||
quotearg_.o realloc_.o regex_.o rename_.o rmdir_.o rpmatch_.o \
|
||||
safe-read_.o save-cwd_.o savedir_.o stat_.o stpcpy_.o strcasecmp_.o \
|
||||
strdup_.o strftime_.o stripslash_.o strncasecmp_.o strndup_.o strstr_.o \
|
||||
strtol_.o strtoul_.o strverscmp_.o userspec_.o utime_.o version-etc_.o \
|
||||
xgetcwd_.o xmalloc_.o xstrdup_.o xstrtol_.o xstrtoul_.o yesno_.o : \
|
||||
$(ANSI2KNR)
|
||||
addext_.o alloca_.o argmatch_.o backupfile_.o basename_.o canon-host_.o \
|
||||
chown_.o closeout_.o diacrit_.o dirname_.o dup2_.o error_.o \
|
||||
euidaccess_.o exclude_.o fileblocks_.o filemode_.o fnmatch_.o \
|
||||
fsusage_.o ftruncate_.o full-write_.o getdate_.o getgroups_.o \
|
||||
gethostname_.o getline_.o getloadavg_.o getopt_.o getopt1_.o \
|
||||
getugroups_.o getusershell_.o group-member_.o hard-locale_.o hash_.o \
|
||||
human_.o idcache_.o isdir_.o lchown_.o linebuffer_.o long-options_.o \
|
||||
lstat_.o makepath_.o malloc_.o md5_.o memcasecmp_.o memchr_.o memcmp_.o \
|
||||
memcoll_.o memcpy_.o memmove_.o memset_.o mkdir_.o mktime_.o \
|
||||
modechange_.o mountlist_.o nanosleep_.o obstack_.o path-concat_.o \
|
||||
posixtm_.o putenv_.o quotearg_.o readtokens_.o readutmp_.o realloc_.o \
|
||||
regex_.o rmdir_.o rpmatch_.o safe-read_.o same_.o save-cwd_.o \
|
||||
savedir_.o stat_.o stime_.o stpcpy_.o strcasecmp_.o strcspn_.o \
|
||||
strdup_.o strftime_.o stripslash_.o strncasecmp_.o strndup_.o \
|
||||
strpbrk_.o strstr_.o strtod_.o strtol_.o strtoul_.o strtoull_.o \
|
||||
strtoumax_.o strverscmp_.o userspec_.o utime_.o version-etc_.o \
|
||||
xgetcwd_.o xgethostname_.o xmalloc_.o xstrdup_.o xstrtod_.o xstrtol_.o \
|
||||
xstrtoul_.o xstrtoumax_.o yesno_.o : $(ANSI2KNR)
|
||||
.y.c:
|
||||
$(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
|
||||
if test -f y.tab.h; then \
|
||||
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
|
||||
else :; fi
|
||||
getdate.h: getdate.c
|
||||
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
@@ -420,18 +536,11 @@ maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = lib
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits lib/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
@@ -439,37 +548,123 @@ distdir: $(DISTFILES)
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
@AMDEP@include $(DEPDIR)/addext$U.Po
|
||||
@AMDEP@include $(DEPDIR)/alloca.Po
|
||||
@AMDEP@include $(DEPDIR)/argmatch$U.Po
|
||||
@AMDEP@include $(DEPDIR)/backupfile$U.Po
|
||||
@AMDEP@include $(DEPDIR)/basename$U.Po
|
||||
@AMDEP@include $(DEPDIR)/canon-host$U.Po
|
||||
@AMDEP@include $(DEPDIR)/chown.Po
|
||||
@AMDEP@include $(DEPDIR)/closeout$U.Po
|
||||
@AMDEP@include $(DEPDIR)/diacrit$U.Po
|
||||
@AMDEP@include $(DEPDIR)/dirname$U.Po
|
||||
@AMDEP@include $(DEPDIR)/dup2.Po
|
||||
@AMDEP@include $(DEPDIR)/error.Po
|
||||
@AMDEP@include $(DEPDIR)/euidaccess.Po
|
||||
@AMDEP@include $(DEPDIR)/exclude$U.Po
|
||||
@AMDEP@include $(DEPDIR)/fileblocks.Po
|
||||
@AMDEP@include $(DEPDIR)/filemode$U.Po
|
||||
@AMDEP@include $(DEPDIR)/fnmatch.Po
|
||||
@AMDEP@include $(DEPDIR)/fsusage.Po
|
||||
@AMDEP@include $(DEPDIR)/ftruncate.Po
|
||||
@AMDEP@include $(DEPDIR)/full-write$U.Po
|
||||
@AMDEP@include $(DEPDIR)/getdate$U.Po
|
||||
@AMDEP@include $(DEPDIR)/getgroups.Po
|
||||
@AMDEP@include $(DEPDIR)/gethostname.Po
|
||||
@AMDEP@include $(DEPDIR)/getline.Po
|
||||
@AMDEP@include $(DEPDIR)/getloadavg.Po
|
||||
@AMDEP@include $(DEPDIR)/getopt$U.Po
|
||||
@AMDEP@include $(DEPDIR)/getopt1$U.Po
|
||||
@AMDEP@include $(DEPDIR)/getugroups$U.Po
|
||||
@AMDEP@include $(DEPDIR)/getusershell.Po
|
||||
@AMDEP@include $(DEPDIR)/group-member.Po
|
||||
@AMDEP@include $(DEPDIR)/hard-locale$U.Po
|
||||
@AMDEP@include $(DEPDIR)/hash$U.Po
|
||||
@AMDEP@include $(DEPDIR)/human$U.Po
|
||||
@AMDEP@include $(DEPDIR)/idcache$U.Po
|
||||
@AMDEP@include $(DEPDIR)/isdir$U.Po
|
||||
@AMDEP@include $(DEPDIR)/lchown.Po
|
||||
@AMDEP@include $(DEPDIR)/linebuffer$U.Po
|
||||
@AMDEP@include $(DEPDIR)/long-options$U.Po
|
||||
@AMDEP@include $(DEPDIR)/lstat.Po
|
||||
@AMDEP@include $(DEPDIR)/makepath$U.Po
|
||||
@AMDEP@include $(DEPDIR)/malloc.Po
|
||||
@AMDEP@include $(DEPDIR)/md5$U.Po
|
||||
@AMDEP@include $(DEPDIR)/memcasecmp$U.Po
|
||||
@AMDEP@include $(DEPDIR)/memchr.Po
|
||||
@AMDEP@include $(DEPDIR)/memcmp.Po
|
||||
@AMDEP@include $(DEPDIR)/memcoll$U.Po
|
||||
@AMDEP@include $(DEPDIR)/memcpy.Po
|
||||
@AMDEP@include $(DEPDIR)/memmove.Po
|
||||
@AMDEP@include $(DEPDIR)/memset.Po
|
||||
@AMDEP@include $(DEPDIR)/mkdir.Po
|
||||
@AMDEP@include $(DEPDIR)/mktime.Po
|
||||
@AMDEP@include $(DEPDIR)/modechange$U.Po
|
||||
@AMDEP@include $(DEPDIR)/mountlist.Po
|
||||
@AMDEP@include $(DEPDIR)/nanosleep.Po
|
||||
@AMDEP@include $(DEPDIR)/obstack.Po
|
||||
@AMDEP@include $(DEPDIR)/path-concat$U.Po
|
||||
@AMDEP@include $(DEPDIR)/posixtm$U.Po
|
||||
@AMDEP@include $(DEPDIR)/putenv.Po
|
||||
@AMDEP@include $(DEPDIR)/quotearg$U.Po
|
||||
@AMDEP@include $(DEPDIR)/readtokens$U.Po
|
||||
@AMDEP@include $(DEPDIR)/readutmp$U.Po
|
||||
@AMDEP@include $(DEPDIR)/realloc.Po
|
||||
@AMDEP@include $(DEPDIR)/regex.Po
|
||||
@AMDEP@include $(DEPDIR)/rmdir.Po
|
||||
@AMDEP@include $(DEPDIR)/rpmatch.Po
|
||||
@AMDEP@include $(DEPDIR)/safe-read$U.Po
|
||||
@AMDEP@include $(DEPDIR)/same$U.Po
|
||||
@AMDEP@include $(DEPDIR)/save-cwd$U.Po
|
||||
@AMDEP@include $(DEPDIR)/savedir$U.Po
|
||||
@AMDEP@include $(DEPDIR)/stat.Po
|
||||
@AMDEP@include $(DEPDIR)/stime.Po
|
||||
@AMDEP@include $(DEPDIR)/stpcpy.Po
|
||||
@AMDEP@include $(DEPDIR)/strcasecmp.Po
|
||||
@AMDEP@include $(DEPDIR)/strcspn.Po
|
||||
@AMDEP@include $(DEPDIR)/strdup.Po
|
||||
@AMDEP@include $(DEPDIR)/strftime.Po
|
||||
@AMDEP@include $(DEPDIR)/stripslash$U.Po
|
||||
@AMDEP@include $(DEPDIR)/strncasecmp.Po
|
||||
@AMDEP@include $(DEPDIR)/strndup.Po
|
||||
@AMDEP@include $(DEPDIR)/strpbrk.Po
|
||||
@AMDEP@include $(DEPDIR)/strstr.Po
|
||||
@AMDEP@include $(DEPDIR)/strtod.Po
|
||||
@AMDEP@include $(DEPDIR)/strtol.Po
|
||||
@AMDEP@include $(DEPDIR)/strtoul.Po
|
||||
@AMDEP@include $(DEPDIR)/strtoull.Po
|
||||
@AMDEP@include $(DEPDIR)/strtoumax.Po
|
||||
@AMDEP@include $(DEPDIR)/strverscmp.Po
|
||||
@AMDEP@include $(DEPDIR)/userspec$U.Po
|
||||
@AMDEP@include $(DEPDIR)/utime.Po
|
||||
@AMDEP@include $(DEPDIR)/version-etc$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xgetcwd$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xgethostname$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xmalloc$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xstrdup$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xstrtod$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xstrtol$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xstrtoul$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xstrtoumax$U.Po
|
||||
@AMDEP@include $(DEPDIR)/yesno$U.Po
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
-rm -rf $(DEPDIR)
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
@AMDEP@CCDEPMODE = @CCDEPMODE@
|
||||
|
||||
.c.o:
|
||||
@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -503,9 +698,11 @@ clean-generic:
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "getdate.hgetdate.c$(BUILT_SOURCES)" || rm -f getdate.h getdate.c $(BUILT_SOURCES)
|
||||
-rm -f Makefile.in
|
||||
-test -z "getdate.c$(BUILT_SOURCES)$(MAINTAINERCLEANFILES)" || rm -f getdate.c $(BUILT_SOURCES) $(MAINTAINERCLEANFILES)
|
||||
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-kr mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
@@ -541,16 +738,26 @@ maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
|
||||
clean-depend maintainer-clean-depend 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 installdirs mostlyclean-generic \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
lstat.c: xstat.in
|
||||
sed -e '/@IGNORE@/d' -e 's/@xstat@/lstat/g' $(srcdir)/xstat.in > $@-t
|
||||
sed \
|
||||
-e '/@IGNORE@/d' \
|
||||
-e 's/@xstat@/lstat/g' \
|
||||
-e '/_LSTAT_ONLY@/d' \
|
||||
-e '/@BEGIN_STAT_ONLY@/,/@END_STAT_ONLY@/d' \
|
||||
$(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
stat.c: xstat.in
|
||||
sed -e '/@IGNORE@/d' -e 's/@xstat@/stat/g' $(srcdir)/xstat.in > $@-t
|
||||
sed \
|
||||
-e '/@IGNORE@/d' \
|
||||
-e 's/@xstat@/stat/g' \
|
||||
-e '/_STAT_ONLY@/d' \
|
||||
-e '/@BEGIN_LSTAT_ONLY@/,/@END_LSTAT_ONLY@/d' \
|
||||
$(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
||||
10
lib/alloca.c
10
lib/alloca.c
@@ -25,6 +25,13 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef emacs
|
||||
# include "blockinput.h"
|
||||
#endif
|
||||
@@ -210,6 +217,9 @@ alloca (unsigned size)
|
||||
register pointer new = malloc (sizeof (header) + size);
|
||||
/* Address of header. */
|
||||
|
||||
if (new == 0)
|
||||
abort();
|
||||
|
||||
((header *) new)->h.next = last_alloca_header;
|
||||
((header *) new)->h.deep = depth;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
|
||||
literal_quoting_style. */
|
||||
#ifndef ARGMATCH_QUOTING_STYLE
|
||||
# define ARGMATCH_QUOTING_STYLE escape_quoting_style
|
||||
# define ARGMATCH_QUOTING_STYLE locale_quoting_style
|
||||
#endif
|
||||
|
||||
/* The following test is to work around the gross typo in
|
||||
@@ -155,21 +155,11 @@ argcasematch (const char *arg, const char *const *arglist,
|
||||
void
|
||||
argmatch_invalid (const char *context, const char *value, int problem)
|
||||
{
|
||||
enum quoting_style saved_quoting_style;
|
||||
char const *format;
|
||||
char const *format = (problem == -1
|
||||
? _("invalid argument %s for `%s'")
|
||||
: _("ambiguous argument %s for `%s'"));
|
||||
|
||||
/* Make sure to have a good quoting style to report errors.
|
||||
literal is insane here. */
|
||||
saved_quoting_style = get_quoting_style (NULL);
|
||||
set_quoting_style (NULL, ARGMATCH_QUOTING_STYLE);
|
||||
|
||||
format = (problem == -1
|
||||
? _("invalid argument `%s' for `%s'")
|
||||
: _("ambiguous argument `%s' for `%s'"));
|
||||
|
||||
error (0, 0, format, quotearg (value), context);
|
||||
|
||||
set_quoting_style (NULL, saved_quoting_style);
|
||||
error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);
|
||||
}
|
||||
|
||||
/* List the valid arguments for argmatch.
|
||||
|
||||
@@ -23,10 +23,20 @@
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#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));
|
||||
|
||||
/* 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.
|
||||
|
||||
@@ -57,8 +57,17 @@ dir_name (const char *path)
|
||||
else
|
||||
{
|
||||
/* Remove any trailing slashes from the result. */
|
||||
#ifdef MSDOS
|
||||
char *lim = (path[0] >= 'A' && path[0] <= 'z' && path[1] == ':')
|
||||
? path + 2 : path;
|
||||
|
||||
/* If canonicalized "d:/path", leave alone the root case "d:/". */
|
||||
while (slash > lim && *slash == '/')
|
||||
--slash;
|
||||
#else
|
||||
while (slash > path && *slash == '/')
|
||||
--slash;
|
||||
#endif
|
||||
|
||||
length = slash - path + 1;
|
||||
}
|
||||
|
||||
66
lib/dup2.c
Normal file
66
lib/dup2.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/* Duplicate an open file descriptor to a specified file descriptor.
|
||||
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
|
||||
|
||||
#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 F_DUPFD
|
||||
static int
|
||||
dupfd (int fd, int desired_fd)
|
||||
{
|
||||
int duplicated_fd = dup (fd);
|
||||
if (duplicated_fd < 0 || duplicated_fd == desired_fd)
|
||||
return duplicated_fd;
|
||||
else
|
||||
{
|
||||
int r = dupfd (fd, desired_fd);
|
||||
int e = errno;
|
||||
close (duplicated_fd);
|
||||
errno = e;
|
||||
return r;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
dup2 (int fd, int desired_fd)
|
||||
{
|
||||
if (fd == desired_fd)
|
||||
return fd;
|
||||
close (desired_fd);
|
||||
#ifdef F_DUPFD
|
||||
return fcntl (fd, F_DUPFD, desired_fd);
|
||||
#else
|
||||
return dupfd (fd, desired_fd);
|
||||
#endif
|
||||
}
|
||||
17
lib/error.c
17
lib/error.c
@@ -1,5 +1,5 @@
|
||||
/* Error handler for noninteractive utilities
|
||||
Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-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.
|
||||
@@ -150,12 +150,16 @@ error (status, errnum, message, va_alist)
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || defined _LIBC
|
||||
#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
|
||||
@@ -228,9 +232,16 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || defined _LIBC
|
||||
#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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* euidaccess -- check if effective user id can access file
|
||||
Copyright (C) 1990, 1991, 1995, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1991, 1995, 1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -66,6 +66,9 @@ gid_t getegid ();
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
#ifndef __set_errno
|
||||
# define __set_errno(val) errno = (val)
|
||||
#endif
|
||||
|
||||
#if defined(EACCES) && !defined(EACCESS)
|
||||
# define EACCESS EACCES
|
||||
@@ -93,6 +96,7 @@ extern int errno;
|
||||
#ifdef _LIBC
|
||||
|
||||
# define group_member __group_member
|
||||
# define euidaccess __euidaccess
|
||||
|
||||
#else
|
||||
|
||||
@@ -102,15 +106,6 @@ static uid_t uid;
|
||||
/* The user's real group id. */
|
||||
static gid_t gid;
|
||||
|
||||
/* The user's effective user id. */
|
||||
static uid_t euid;
|
||||
|
||||
/* The user's effective group id. */
|
||||
static gid_t egid;
|
||||
|
||||
/* Nonzero if UID, GID, EUID, and EGID have valid values. */
|
||||
static int have_ids = 0;
|
||||
|
||||
# if HAVE_GETGROUPS
|
||||
int group_member ();
|
||||
# else
|
||||
@@ -119,6 +114,15 @@ int group_member ();
|
||||
|
||||
#endif
|
||||
|
||||
/* The user's effective user id. */
|
||||
static uid_t euid;
|
||||
|
||||
/* The user's effective group id. */
|
||||
static gid_t egid;
|
||||
|
||||
/* Nonzero if UID, GID, EUID, and EGID have valid values. */
|
||||
static int have_ids;
|
||||
|
||||
|
||||
/* Return 0 if the user has permission of type MODE on file PATH;
|
||||
otherwise, return -1 and set `errno' to EACCESS.
|
||||
@@ -133,8 +137,9 @@ euidaccess (const char *path, int mode)
|
||||
int granted;
|
||||
|
||||
#ifdef _LIBC
|
||||
uid_t uid = getuid (), euid = geteuid ();
|
||||
gid_t gid = getgid (), egid = getegid ();
|
||||
if (! __libc_enable_secure)
|
||||
/* If we are not set-uid or set-gid, access does the same. */
|
||||
return __access (path, mode);
|
||||
#else
|
||||
if (have_ids == 0)
|
||||
{
|
||||
@@ -144,11 +149,11 @@ euidaccess (const char *path, int mode)
|
||||
euid = geteuid ();
|
||||
egid = getegid ();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (uid == euid && gid == egid)
|
||||
/* If we are not set-uid or set-gid, access does the same. */
|
||||
return access (path, mode);
|
||||
#endif
|
||||
|
||||
if (stat (path, &stats))
|
||||
return -1;
|
||||
@@ -161,6 +166,16 @@ euidaccess (const char *path, int mode)
|
||||
if (mode == F_OK)
|
||||
return 0; /* The file exists. */
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Now we need the IDs. */
|
||||
if (have_ids == 0)
|
||||
{
|
||||
have_ids = 1;
|
||||
euid = __geteuid ();
|
||||
egid = __getegid ();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The super-user can read and write any file, and execute any file
|
||||
that anyone can execute. */
|
||||
if (euid == 0 && ((mode & X_OK) == 0
|
||||
@@ -175,6 +190,40 @@ euidaccess (const char *path, int mode)
|
||||
granted = (stats.st_mode & mode);
|
||||
if (granted == mode)
|
||||
return 0;
|
||||
errno = EACCESS;
|
||||
__set_errno (EACCESS);
|
||||
return -1;
|
||||
}
|
||||
#undef euidaccess
|
||||
#ifdef weak_alias
|
||||
weak_alias (__euidaccess, euidaccess)
|
||||
#endif
|
||||
|
||||
#ifdef TEST
|
||||
# include <stdio.h>
|
||||
# include <errno.h>
|
||||
# include "error.h"
|
||||
|
||||
char *program_name;
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
char *file;
|
||||
int mode;
|
||||
int err;
|
||||
|
||||
program_name = argv[0];
|
||||
if (argc < 3)
|
||||
abort ();
|
||||
file = argv[1];
|
||||
mode = atoi (argv[2]);
|
||||
|
||||
err = euidaccess (file, mode);
|
||||
printf ("%d\n", err);
|
||||
if (err != 0)
|
||||
error (0, errno, "%s", file);
|
||||
exit (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* exclude.c -- exclude file names
|
||||
Copyright 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1992, 1993, 1994, 1997, 1999, 2000 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
|
||||
@@ -54,14 +54,14 @@ new_exclude (void)
|
||||
}
|
||||
|
||||
int
|
||||
excluded_filename (struct exclude const *ex, char const *f)
|
||||
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, 0) == 0)
|
||||
if (fnmatch (exclude[i], f, options) == 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
@@ -79,7 +79,8 @@ add_exclude (struct exclude *ex, char const *pattern)
|
||||
}
|
||||
|
||||
int
|
||||
add_exclude_file (struct exclude *ex, char const *filename, char line_end)
|
||||
add_exclude_file (void (*add_func) PARAMS ((struct exclude *, char const *)),
|
||||
struct exclude *ex, char const *filename, char line_end)
|
||||
{
|
||||
int use_stdin = filename[0] == '-' && !filename[1];
|
||||
FILE *in;
|
||||
@@ -118,7 +119,7 @@ add_exclude_file (struct exclude *ex, char const *filename, char line_end)
|
||||
if (p < lim ? *p == line_end : buf < p && p[-1])
|
||||
{
|
||||
*p = '\0';
|
||||
add_exclude (ex, pattern);
|
||||
(*add_func) (ex, pattern);
|
||||
pattern = p + 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* exclude.h -- declarations for excluding file names
|
||||
Copyright 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1992, 1993, 1994, 1997, 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
|
||||
@@ -30,5 +30,6 @@ struct exclude;
|
||||
|
||||
struct exclude *new_exclude PARAMS ((void));
|
||||
void add_exclude PARAMS ((struct exclude *, char const *));
|
||||
int add_exclude_file PARAMS ((struct exclude *, char const *, char));
|
||||
int excluded_filename PARAMS ((struct exclude const *, 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));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Convert file size to number of blocks on System V-like machines.
|
||||
Copyright (C) 1990, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1997, 1998, 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
|
||||
@@ -27,7 +27,7 @@
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#if !HAVE_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
|
||||
#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
|
||||
|
||||
# if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
|
||||
@@ -48,6 +48,25 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !S_IRGRP
|
||||
# define S_IRGRP (S_IRUSR >> 3)
|
||||
#endif
|
||||
#if !S_IWGRP
|
||||
# define S_IWGRP (S_IWUSR >> 3)
|
||||
#endif
|
||||
#if !S_IXGRP
|
||||
# define S_IXGRP (S_IXUSR >> 3)
|
||||
#endif
|
||||
#if !S_IROTH
|
||||
# define S_IROTH (S_IRUSR >> 6)
|
||||
#endif
|
||||
#if !S_IWOTH
|
||||
# define S_IWOTH (S_IWUSR >> 6)
|
||||
#endif
|
||||
#if !S_IXOTH
|
||||
# define S_IXOTH (S_IXUSR >> 6)
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# undef S_ISBLK
|
||||
# undef S_ISCHR
|
||||
@@ -93,22 +112,11 @@
|
||||
# define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR)
|
||||
#endif
|
||||
|
||||
/* Look at read, write, and execute bits in BITS and set
|
||||
flags in CHARS accordingly. */
|
||||
|
||||
static void
|
||||
rwx (short unsigned int bits, char *chars)
|
||||
{
|
||||
chars[0] = (bits & S_IRUSR) ? 'r' : '-';
|
||||
chars[1] = (bits & S_IWUSR) ? 'w' : '-';
|
||||
chars[2] = (bits & S_IXUSR) ? 'x' : '-';
|
||||
}
|
||||
|
||||
/* Set the 's' and 't' flags in file attributes string CHARS,
|
||||
according to the file mode BITS. */
|
||||
|
||||
static void
|
||||
setst (short unsigned int bits, char *chars)
|
||||
setst (mode_t bits, char *chars)
|
||||
{
|
||||
#ifdef S_ISUID
|
||||
if (bits & S_ISUID)
|
||||
@@ -157,7 +165,7 @@ setst (short unsigned int bits, char *chars)
|
||||
'?' for any other file type. */
|
||||
|
||||
static char
|
||||
ftypelet (long int bits)
|
||||
ftypelet (mode_t bits)
|
||||
{
|
||||
#ifdef S_ISBLK
|
||||
if (S_ISBLK (bits))
|
||||
@@ -216,12 +224,18 @@ ftypelet (long int bits)
|
||||
is given as an argument. */
|
||||
|
||||
void
|
||||
mode_string (short unsigned int mode, char *str)
|
||||
mode_string (mode_t mode, char *str)
|
||||
{
|
||||
str[0] = ftypelet ((long) mode);
|
||||
rwx ((mode & 0700) << 0, &str[1]);
|
||||
rwx ((mode & 0070) << 3, &str[4]);
|
||||
rwx ((mode & 0007) << 6, &str[7]);
|
||||
str[0] = ftypelet (mode);
|
||||
str[1] = mode & S_IRUSR ? 'r' : '-';
|
||||
str[2] = mode & S_IWUSR ? 'w' : '-';
|
||||
str[3] = mode & S_IXUSR ? 'x' : '-';
|
||||
str[4] = mode & S_IRGRP ? 'r' : '-';
|
||||
str[5] = mode & S_IWGRP ? 'w' : '-';
|
||||
str[6] = mode & S_IXGRP ? 'x' : '-';
|
||||
str[7] = mode & S_IROTH ? 'r' : '-';
|
||||
str[8] = mode & S_IWOTH ? 'w' : '-';
|
||||
str[9] = mode & S_IXOTH ? 'x' : '-';
|
||||
setst (mode, str);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
#ifndef FILEMODE_H_
|
||||
|
||||
void mode_string PARAMS ((short unsigned int mode, char *str));
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
# include <sys/types.h>
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
void mode_string PARAMS ((mode_t mode, char *str));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* fsusage.c -- return space usage of mounted filesystems
|
||||
Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 1996, 1998, 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
|
||||
@@ -184,7 +184,7 @@ get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp)
|
||||
truncation, presumably without botching the 4.1.1 case, in which
|
||||
the values are not truncated. The correct counts are stored in
|
||||
undocumented spare fields. */
|
||||
if (fsd.f_blocks == 0x1fffff && fsd.f_spare[0] > 0)
|
||||
if (fsd.f_blocks == 0x7fffffff / fsd.f_bsize && fsd.f_spare[0] > 0)
|
||||
{
|
||||
fsd.f_blocks = fsd.f_spare[0];
|
||||
fsd.f_bfree = fsd.f_spare[1];
|
||||
|
||||
1599
lib/getdate.y
1599
lib/getdate.y
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1997, 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
|
||||
@@ -27,10 +27,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if __GLIBC__ < 2
|
||||
int
|
||||
getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
|
||||
|
||||
int
|
||||
getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
|
||||
# endif
|
||||
|
||||
#endif /* not GETLINE_H_ */
|
||||
|
||||
42
lib/getopt.c
42
lib/getopt.c
@@ -1,25 +1,23 @@
|
||||
/* Getopt for GNU.
|
||||
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!
|
||||
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
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
@@ -29,13 +27,13 @@
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
#else
|
||||
# if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
# ifndef const
|
||||
# define const
|
||||
# ifndef const
|
||||
# define const
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -109,7 +107,7 @@
|
||||
Also, when `ordering' is RETURN_IN_ORDER,
|
||||
each non-option ARGV-element is returned here. */
|
||||
|
||||
char *optarg = NULL;
|
||||
char *optarg;
|
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller
|
||||
@@ -130,7 +128,7 @@ int optind = 1;
|
||||
causes problems with re-calling getopt as programs generally don't
|
||||
know that. */
|
||||
|
||||
int __getopt_initialized = 0;
|
||||
int __getopt_initialized;
|
||||
|
||||
/* The next char to be scanned in the option-element
|
||||
in which the last option character we returned was found.
|
||||
|
||||
26
lib/getopt.h
26
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.
|
||||
This file is part of the GNU C Library.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@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.
|
||||
|
||||
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,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
|
||||
|
||||
@@ -1,29 +1,26 @@
|
||||
/* 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.
|
||||
This file is part of the GNU C Library.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#else
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
@@ -31,6 +28,9 @@
|
||||
#define const
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
35
lib/getpagesize.h
Normal file
35
lib/getpagesize.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/* Emulate getpagesize on systems that lack it. */
|
||||
|
||||
#ifndef HAVE_GETPAGESIZE
|
||||
|
||||
#ifdef VMS
|
||||
#define getpagesize() 512
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef _SC_PAGESIZE
|
||||
#define getpagesize() sysconf(_SC_PAGESIZE)
|
||||
#else
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#ifdef EXEC_PAGESIZE
|
||||
#define getpagesize() EXEC_PAGESIZE
|
||||
#else
|
||||
#ifdef NBPG
|
||||
#define getpagesize() NBPG * CLSIZE
|
||||
#ifndef CLSIZE
|
||||
#define CLSIZE 1
|
||||
#endif /* no CLSIZE */
|
||||
#else /* no NBPG */
|
||||
#ifdef NBPC
|
||||
#define getpagesize() NBPC
|
||||
#endif /* NBPC */
|
||||
#endif /* no NBPG */
|
||||
#endif /* no EXEC_PAGESIZE */
|
||||
#endif /* no _SC_PAGESIZE */
|
||||
|
||||
#endif /* not HAVE_GETPAGESIZE */
|
||||
@@ -41,6 +41,8 @@ struct group *getgrent ();
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
|
||||
|
||||
/* Like `getgroups', but for user USERNAME instead of for the current
|
||||
process. Store at most MAXCOUNT group IDs in the GROUPLIST array.
|
||||
If GID is not -1, store it first (if possible). GID should be the
|
||||
@@ -64,14 +66,17 @@ getugroups (int maxcount, GETGROUPS_T *grouplist, char *username, gid_t gid)
|
||||
|
||||
setgrent ();
|
||||
while ((grp = getgrent ()) != 0)
|
||||
for (cp = grp->gr_mem; *cp; ++cp)
|
||||
if (!strcmp (username, *cp))
|
||||
{
|
||||
for (cp = grp->gr_mem; *cp; ++cp)
|
||||
{
|
||||
int n;
|
||||
|
||||
if ( ! STREQ (username, *cp))
|
||||
continue;
|
||||
|
||||
/* See if this group number is already on the list. */
|
||||
for (n = 0; n < count; ++n)
|
||||
if (grouplist[n] == grp->gr_gid)
|
||||
if (grouplist && grouplist[n] == grp->gr_gid)
|
||||
break;
|
||||
|
||||
/* If it's a new group number, then try to add it to the list. */
|
||||
@@ -89,6 +94,8 @@ getugroups (int maxcount, GETGROUPS_T *grouplist, char *username, gid_t gid)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
endgrent ();
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
85
lib/hard-locale.c
Normal file
85
lib/hard-locale.c
Normal file
@@ -0,0 +1,85 @@
|
||||
/* hard-locale.c -- Determine whether a locale is hard.
|
||||
Copyright 1997, 1998, 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. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
# ifdef HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
# pragma alloca
|
||||
# else
|
||||
# ifdef _WIN32
|
||||
# include <malloc.h>
|
||||
# include <io.h>
|
||||
# else
|
||||
# ifndef alloca
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
/* Return nonzero if the current CATEGORY locale is hard, i.e. if you
|
||||
can't get away with assuming traditional C or POSIX behavior. */
|
||||
int
|
||||
hard_locale (int category)
|
||||
{
|
||||
#if ! (defined ENABLE_NLS && HAVE_SETLOCALE)
|
||||
return 0;
|
||||
#else
|
||||
|
||||
int hard = 1;
|
||||
char const *p = setlocale (category, 0);
|
||||
|
||||
if (p)
|
||||
{
|
||||
# if defined __GLIBC__ && __GLIBC__ >= 2
|
||||
if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
|
||||
hard = 0;
|
||||
# else
|
||||
char *locale = alloca (strlen (p) + 1);
|
||||
strcpy (locale, p);
|
||||
|
||||
/* Temporarily set the locale to the "C" and "POSIX" locales to
|
||||
find their names, so that we can determine whether one or the
|
||||
other is the caller's locale. */
|
||||
if (((p = setlocale (category, "C")) && strcmp (p, locale) == 0)
|
||||
|| ((p = setlocale (category, "POSIX")) && strcmp (p, locale) == 0))
|
||||
hard = 0;
|
||||
|
||||
/* Restore the caller's locale. */
|
||||
setlocale (category, locale);
|
||||
# endif
|
||||
}
|
||||
|
||||
return hard;
|
||||
|
||||
#endif
|
||||
}
|
||||
18
lib/hard-locale.h
Normal file
18
lib/hard-locale.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef HARD_LOCALE_H_
|
||||
# define HARD_LOCALE_H_ 1
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int hard_locale PARAMS ((int));
|
||||
|
||||
#endif /* HARD_LOCALE_H_ */
|
||||
25
lib/hash.c
25
lib/hash.c
@@ -445,8 +445,8 @@ hash_reset_tuning (Hash_tuning *tuning)
|
||||
|
||||
/* For the given hash TABLE, check the user supplied tuning structure for
|
||||
reasonable values, and return true if there is no gross error with it.
|
||||
Otherwise, definitvely reset the TUNING field to some acceptable default in
|
||||
the hash table (that is, the user loses the right of further modifying
|
||||
Otherwise, definitively reset the TUNING field to some acceptable default
|
||||
in the hash table (that is, the user loses the right of further modifying
|
||||
tuning arguments), and return false. */
|
||||
|
||||
static bool
|
||||
@@ -468,15 +468,14 @@ check_tuning (Hash_table *table)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Allocate and return a new hash table, or NULL upon failure. The
|
||||
initial number of buckets is automatically selected so as to _guarantee_ that
|
||||
you may insert at least CANDIDATE different user entries before any growth
|
||||
of the hash table size occurs. So, if have a reasonably tight a-priori
|
||||
upper bound on the
|
||||
number of entries you intend to insert in the hash table, you may save some
|
||||
table memory and insertion time, by specifying it here. If the
|
||||
IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE argument
|
||||
has its meaning changed to the wanted number of buckets.
|
||||
/* Allocate and return a new hash table, or NULL upon failure. The initial
|
||||
number of buckets is automatically selected so as to _guarantee_ that you
|
||||
may insert at least CANDIDATE different user entries before any growth of
|
||||
the hash table size occurs. So, if have a reasonably tight a-priori upper
|
||||
bound on the number of entries you intend to insert in the hash table, you
|
||||
may save some table memory and insertion time, by specifying it here. If
|
||||
the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
|
||||
argument has its meaning changed to the wanted number of buckets.
|
||||
|
||||
TUNING points to a structure of user-supplied values, in case some fine
|
||||
tuning is wanted over the default behavior of the hasher. If TUNING is
|
||||
@@ -769,8 +768,8 @@ hash_find_entry (Hash_table *table, const void *entry,
|
||||
|
||||
/* For an already existing hash table, change the number of buckets through
|
||||
specifying CANDIDATE. The contents of the hash table are preserved. The
|
||||
new number of buckets is automatically selected so as to _guarantee_ that the
|
||||
table may receive at least CANDIDATE different user entries, including
|
||||
new number of buckets is automatically selected so as to _guarantee_ that
|
||||
the table may receive at least CANDIDATE different user entries, including
|
||||
those already in the table, before any other growth of the hash table size
|
||||
occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
|
||||
exact number of buckets desired. */
|
||||
|
||||
74
lib/human.c
74
lib/human.c
@@ -23,10 +23,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -34,6 +30,12 @@
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
@@ -54,7 +56,7 @@ char *getenv ();
|
||||
|
||||
#include <argmatch.h>
|
||||
#include <error.h>
|
||||
#include <xstrtoul.h>
|
||||
#include <xstrtol.h>
|
||||
|
||||
#include "human.h"
|
||||
|
||||
@@ -71,15 +73,27 @@ static const char suffixes[] =
|
||||
'Y' /* Yotta */
|
||||
};
|
||||
|
||||
/* Like human_readable_inexact, except always round to even. */
|
||||
char *
|
||||
human_readable (uintmax_t n, char *buf,
|
||||
int from_block_size, int output_block_size)
|
||||
{
|
||||
return human_readable_inexact (n, buf, from_block_size, output_block_size,
|
||||
human_round_to_even);
|
||||
}
|
||||
|
||||
/* Convert N to a human readable format in BUF.
|
||||
|
||||
N is expressed in units of FROM_BLOCK_SIZE. FROM_BLOCK_SIZE must
|
||||
be positive.
|
||||
be nonnegative.
|
||||
|
||||
If OUTPUT_BLOCK_SIZE is positive, use units of OUTPUT_BLOCK_SIZE in
|
||||
the output number. OUTPUT_BLOCK_SIZE must be a multiple of
|
||||
FROM_BLOCK_SIZE or vice versa.
|
||||
|
||||
Use INEXACT_STYLE to determine whether to take the ceiling or floor
|
||||
of any result that cannot be expressed exactly.
|
||||
|
||||
If OUTPUT_BLOCK_SIZE is negative, use a format like "127k" if
|
||||
possible, using powers of -OUTPUT_BLOCK_SIZE; otherwise, use
|
||||
ordinary decimal format. Normally -OUTPUT_BLOCK_SIZE is either
|
||||
@@ -93,13 +107,14 @@ static const char suffixes[] =
|
||||
than -OUTPUT_BLOCK_SIZE aren't modified. */
|
||||
|
||||
char *
|
||||
human_readable (uintmax_t n, char *buf,
|
||||
int from_block_size, int output_block_size)
|
||||
human_readable_inexact (uintmax_t n, char *buf,
|
||||
int from_block_size, int output_block_size,
|
||||
enum human_inexact_style inexact_style)
|
||||
{
|
||||
uintmax_t amt;
|
||||
int base;
|
||||
int to_block_size;
|
||||
int tenths;
|
||||
int tenths = 0;
|
||||
int power;
|
||||
char *p;
|
||||
|
||||
@@ -107,7 +122,7 @@ human_readable (uintmax_t n, char *buf,
|
||||
1 means AMT.TENTHS < adjusted N < AMT.TENTHS + 0.05;
|
||||
2 means adjusted N == AMT.TENTHS + 0.05;
|
||||
3 means AMT.TENTHS + 0.05 < adjusted N < AMT.TENTHS + 0.1. */
|
||||
int rounding;
|
||||
int rounding = 0;
|
||||
|
||||
if (output_block_size < 0)
|
||||
{
|
||||
@@ -134,7 +149,6 @@ human_readable (uintmax_t n, char *buf,
|
||||
{
|
||||
int multiplier = from_block_size / to_block_size;
|
||||
amt = n * multiplier;
|
||||
tenths = rounding = 0;
|
||||
|
||||
if (amt / multiplier != n)
|
||||
{
|
||||
@@ -170,6 +184,8 @@ human_readable (uintmax_t n, char *buf,
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
else if (from_block_size == 0)
|
||||
amt = 0;
|
||||
else
|
||||
{
|
||||
int divisor = to_block_size / from_block_size;
|
||||
@@ -204,24 +220,33 @@ human_readable (uintmax_t n, char *buf,
|
||||
|
||||
if (amt < 10)
|
||||
{
|
||||
tenths += 2 < rounding + (tenths & 1);
|
||||
|
||||
if (tenths == 10)
|
||||
if (2 * (1 - (int) inexact_style)
|
||||
< rounding + (tenths & (inexact_style == human_round_to_even)))
|
||||
{
|
||||
amt++;
|
||||
tenths = 0;
|
||||
tenths++;
|
||||
rounding = 0;
|
||||
|
||||
if (tenths == 10)
|
||||
{
|
||||
amt++;
|
||||
tenths = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (amt < 10)
|
||||
{
|
||||
*--p = '0' + tenths;
|
||||
*--p = '.';
|
||||
tenths = 0;
|
||||
tenths = rounding = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (5 < tenths + (2 < rounding + (amt & 1)))
|
||||
if (inexact_style == human_ceiling
|
||||
? 0 < tenths + rounding
|
||||
: inexact_style == human_round_to_even
|
||||
? 5 < tenths + (2 < rounding + (amt & 1))
|
||||
: /* inexact_style == human_floor */ 0)
|
||||
{
|
||||
amt++;
|
||||
|
||||
@@ -251,13 +276,19 @@ human_readable (uintmax_t n, char *buf,
|
||||
static char const *const block_size_args[] = { "human-readable", "si", 0 };
|
||||
static int const block_size_types[] = { -1024, -1000 };
|
||||
|
||||
static int
|
||||
default_block_size (void)
|
||||
{
|
||||
return getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE;
|
||||
}
|
||||
|
||||
static strtol_error
|
||||
humblock (char const *spec, int *block_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (! spec && ! (spec = getenv ("BLOCK_SIZE")))
|
||||
*block_size = getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE;
|
||||
*block_size = default_block_size ();
|
||||
else if (0 <= (i = ARGMATCH (spec, block_size_args, block_size_types)))
|
||||
*block_size = block_size_types[i];
|
||||
else
|
||||
@@ -281,6 +312,11 @@ void
|
||||
human_block_size (char const *spec, int report_errors, int *block_size)
|
||||
{
|
||||
strtol_error e = humblock (spec, block_size);
|
||||
if (*block_size == 0)
|
||||
{
|
||||
*block_size = default_block_size ();
|
||||
e = LONGINT_INVALID;
|
||||
}
|
||||
if (e != LONGINT_OK && report_errors)
|
||||
STRTOL_FATAL_ERROR (spec, _("block size"), e);
|
||||
}
|
||||
|
||||
17
lib/human.h
17
lib/human.h
@@ -1,6 +1,14 @@
|
||||
#ifndef HUMAN_H_
|
||||
# define HUMAN_H_ 1
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
# if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
# endif
|
||||
|
||||
/* A conservative bound on the maximum length of a human-readable string.
|
||||
The output can be the product of the largest uintmax_t and the largest int,
|
||||
so add their sizes before converting to a bound on digits. */
|
||||
@@ -15,7 +23,16 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
enum human_inexact_style
|
||||
{
|
||||
human_floor = -1,
|
||||
human_round_to_even = 0,
|
||||
human_ceiling = 1
|
||||
};
|
||||
|
||||
char *human_readable PARAMS ((uintmax_t, char *, int, int));
|
||||
char *human_readable_inexact PARAMS ((uintmax_t, char *, int, int,
|
||||
enum human_inexact_style));
|
||||
|
||||
void human_block_size PARAMS ((char const *, int, int *));
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# interlock - wrap program invocation in lock to allow
|
||||
# parallel builds to work.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>, Aug 10 1996
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Usage:
|
||||
# interlock lock-dir-name program args-to-program...
|
||||
|
||||
dirname="$1"
|
||||
program="$2"
|
||||
|
||||
shift
|
||||
shift
|
||||
|
||||
while (mkdir $dirname > /dev/null 2>&1 && exit 1 || exit 0); do
|
||||
# Wait a bit.
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Race condition here: if interrupted after the loop but before this
|
||||
# trap, the lock can be left around.
|
||||
trap "rmdir $dirname > /dev/null 2>&1" 1 2 3 15
|
||||
|
||||
# We have the lock, so run the program.
|
||||
$program ${1+"$@"}
|
||||
ret=$?
|
||||
|
||||
# Release the lock.
|
||||
rmdir $dirname > /dev/null 2>&1
|
||||
|
||||
exit $ret
|
||||
@@ -27,6 +27,13 @@ extern int errno;
|
||||
#endif
|
||||
#include "lchown.h"
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# undef S_ISLNK
|
||||
#endif
|
||||
#if !defined(S_ISLNK) && defined(S_IFLNK)
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
#endif
|
||||
|
||||
/* Declare chown to avoid a warning. Don't include unistd.h,
|
||||
because it may have a conflicting prototype for lchown. */
|
||||
int chown ();
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
# define ENOSYS ENOTSUP
|
||||
# else
|
||||
/* Some systems don't have ENOTSUP either. */
|
||||
# define ENOSYS ENOMSG
|
||||
# define ENOSYS EINVAL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* linebuffer.c -- read arbitrarily long lines
|
||||
Copyright (C) 1986, 1991, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1986, 1991, 1998, 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
|
||||
@@ -22,6 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "linebuffer.h"
|
||||
|
||||
char *xmalloc ();
|
||||
@@ -39,9 +40,9 @@ initbuffer (struct linebuffer *linebuffer)
|
||||
}
|
||||
|
||||
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
|
||||
Remove any newline. Does not null terminate.
|
||||
Return zero upon error or upon end of file.
|
||||
Otherwise, return LINEBUFFER. */
|
||||
Keep the newline; append a newline if it's the last line of a file
|
||||
that ends in a non-newline character. Do not null terminate.
|
||||
Return LINEBUFFER, except at end of file return 0. */
|
||||
|
||||
struct linebuffer *
|
||||
readline (struct linebuffer *linebuffer, FILE *stream)
|
||||
@@ -52,33 +53,32 @@ readline (struct linebuffer *linebuffer, FILE *stream)
|
||||
char *end = buffer + linebuffer->size; /* Sentinel. */
|
||||
|
||||
if (feof (stream) || ferror (stream))
|
||||
{
|
||||
linebuffer->length = 0;
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
while (1)
|
||||
do
|
||||
{
|
||||
c = getc (stream);
|
||||
if (c == EOF)
|
||||
{
|
||||
if (p == buffer)
|
||||
return 0;
|
||||
if (p[-1] == '\n')
|
||||
break;
|
||||
c = '\n';
|
||||
}
|
||||
if (p == end)
|
||||
{
|
||||
linebuffer->size *= 2;
|
||||
buffer = (char *) xrealloc (buffer, linebuffer->size);
|
||||
p += buffer - linebuffer->buffer;
|
||||
p = p - linebuffer->buffer + buffer;
|
||||
linebuffer->buffer = buffer;
|
||||
end = buffer + linebuffer->size;
|
||||
}
|
||||
if (c == EOF || c == '\n')
|
||||
break;
|
||||
*p++ = c;
|
||||
}
|
||||
while (c != '\n');
|
||||
|
||||
if (feof (stream) && p == buffer)
|
||||
{
|
||||
linebuffer->length = 0;
|
||||
return 0;
|
||||
}
|
||||
linebuffer->length = p - linebuffer->buffer;
|
||||
linebuffer->length = p - buffer;
|
||||
return linebuffer;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* linebuffer.h -- declarations for reading arbitrarily long lines
|
||||
Copyright (C) 1986, 1991, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1986, 1991, 1998, 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
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
struct linebuffer
|
||||
{
|
||||
long size; /* Allocated. */
|
||||
long length; /* Used. */
|
||||
size_t size; /* Allocated. */
|
||||
size_t length; /* Used. */
|
||||
char *buffer;
|
||||
};
|
||||
|
||||
@@ -39,7 +39,8 @@ struct linebuffer
|
||||
void initbuffer PARAMS ((struct linebuffer *linebuffer));
|
||||
|
||||
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
|
||||
Remove any newline. Does not null terminate.
|
||||
Keep the newline; append a newline if it's the last line of a file
|
||||
that ends in a non-newline character. Do not null terminate.
|
||||
Return LINEBUFFER, except at end of file return 0. */
|
||||
struct linebuffer *readline PARAMS ((struct linebuffer *linebuffer,
|
||||
FILE *stream));
|
||||
|
||||
@@ -71,16 +71,34 @@ extern int errno;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef S_ISUID
|
||||
# define S_ISUID 04000
|
||||
#endif
|
||||
#ifndef S_ISGID
|
||||
# define S_ISGID 02000
|
||||
#endif
|
||||
#ifndef S_ISVTX
|
||||
# define S_ISVTX 01000
|
||||
#endif
|
||||
#ifndef S_IRUSR
|
||||
# define S_IRUSR 0200
|
||||
#endif
|
||||
#ifndef S_IWUSR
|
||||
# define S_IWUSR 0200
|
||||
#endif
|
||||
|
||||
#ifndef S_IXUSR
|
||||
# define S_IXUSR 0100
|
||||
#endif
|
||||
|
||||
#ifndef S_IRWXU
|
||||
# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
|
||||
#endif
|
||||
|
||||
#define WX_USR (S_IWUSR | S_IXUSR)
|
||||
|
||||
/* Include this before libintl.h so we get our definition of PARAMS. */
|
||||
#include "makepath.h"
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
@@ -98,7 +116,6 @@ typedef int gid_t;
|
||||
#endif
|
||||
|
||||
#include "save-cwd.h"
|
||||
#include "makepath.h"
|
||||
#include "error.h"
|
||||
|
||||
void strip_trailing_slashes ();
|
||||
@@ -145,6 +162,7 @@ make_dir (const char *dir, const char *dirpath, mode_t mode, int *created_dir_p)
|
||||
if (!created_dir)
|
||||
{
|
||||
struct stat stats;
|
||||
int saved_errno = errno;
|
||||
|
||||
/* The mkdir and stat calls below may appear to be reversed.
|
||||
They are not. It is important to call mkdir first and then to
|
||||
@@ -156,7 +174,7 @@ make_dir (const char *dir, const char *dirpath, mode_t mode, int *created_dir_p)
|
||||
|
||||
if (stat (dir, &stats))
|
||||
{
|
||||
error (0, errno, _("cannot create directory `%s'"), dirpath);
|
||||
error (0, saved_errno, _("cannot create directory `%s'"), dirpath);
|
||||
fail = 1;
|
||||
}
|
||||
else if (!S_ISDIR (stats.st_mode))
|
||||
@@ -223,7 +241,7 @@ make_path (const char *argpath,
|
||||
char *dirpath;
|
||||
|
||||
/* Temporarily relax umask in case it's overly restrictive. */
|
||||
int oldmask = umask (0);
|
||||
mode_t oldmask = umask (0);
|
||||
|
||||
/* Make a copy of ARGPATH that we can scribble NULs on. */
|
||||
dirpath = (char *) alloca (strlen (argpath) + 1);
|
||||
@@ -235,9 +253,9 @@ make_path (const char *argpath,
|
||||
their owners, we need to fix their permissions after making them. */
|
||||
if (((parent_mode & WX_USR) != WX_USR)
|
||||
|| ((owner != (uid_t) -1 || group != (gid_t) -1)
|
||||
&& (parent_mode & 07000) != 0))
|
||||
&& (parent_mode & (S_ISUID | S_ISGID | S_ISVTX)) != 0))
|
||||
{
|
||||
tmp_mode = 0700;
|
||||
tmp_mode = S_IRWXU;
|
||||
re_protect = 1;
|
||||
}
|
||||
else
|
||||
@@ -290,7 +308,7 @@ make_path (const char *argpath,
|
||||
if (newly_created_dir)
|
||||
{
|
||||
if (verbose_fmt_string)
|
||||
fprintf (stderr, verbose_fmt_string, dirpath);
|
||||
error (0, 0, verbose_fmt_string, dirpath);
|
||||
|
||||
if ((owner != (uid_t) -1 || group != (gid_t) -1)
|
||||
&& chown (basename_dir, owner, group)
|
||||
@@ -351,7 +369,7 @@ make_path (const char *argpath,
|
||||
if (verbose_fmt_string != NULL)
|
||||
error (0, 0, verbose_fmt_string, dirpath);
|
||||
|
||||
if (owner != (uid_t) -1 && group != (gid_t) -1)
|
||||
if (owner != (uid_t) -1 || group != (gid_t) -1)
|
||||
{
|
||||
if (chown (basename_dir, owner, group)
|
||||
#ifdef AFS
|
||||
@@ -363,7 +381,8 @@ make_path (const char *argpath,
|
||||
retval = 1;
|
||||
}
|
||||
/* chown may have turned off some permission bits we wanted. */
|
||||
if ((mode & 07000) != 0 && chmod (basename_dir, mode))
|
||||
if ((mode & (S_ISUID | S_ISGID | S_ISVTX))
|
||||
&& chmod (basename_dir, mode))
|
||||
{
|
||||
error (0, errno, _("cannot chmod %s"), dirpath);
|
||||
retval = 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* md5.h - Declaration of functions and data types used for MD5 sum
|
||||
computing library functions.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1999 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.
|
||||
|
||||
@@ -118,7 +118,7 @@ extern void md5_process_bytes __P ((const void *buffer, size_t len,
|
||||
endian byte order, so that a byte-wise output yields to the wanted
|
||||
ASCII representation of the message digest.
|
||||
|
||||
IMPORTANT: On some systems it is required that RESBUF is correctly
|
||||
IMPORTANT: On some systems it is required that RESBUF be correctly
|
||||
aligned for a 32 bits value. */
|
||||
extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Case-insensitive buffer comparator.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 2000 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,9 +15,9 @@
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Jim Meyering (meyering@na-net.ornl.gov) */
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
@@ -25,16 +25,16 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
# define IN_CTYPE_DOMAIN(c) 1
|
||||
# define IN_CTYPE_DOMAIN(Char) 1
|
||||
#else
|
||||
# define IN_CTYPE_DOMAIN(c) isascii(c)
|
||||
# define IN_CTYPE_DOMAIN(Char) isascii(Char)
|
||||
#endif
|
||||
#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
|
||||
#define ISLOWER(Char) (IN_CTYPE_DOMAIN (Char) && islower (Char))
|
||||
|
||||
#if _LIBC || STDC_HEADERS
|
||||
# define TOUPPER(c) toupper (c)
|
||||
# define TOUPPER(Char) toupper (Char)
|
||||
#else
|
||||
# define TOUPPER(c) (ISLOWER (c) ? toupper (c) : (c))
|
||||
# define TOUPPER(Char) (ISLOWER (Char) ? toupper (Char) : (Char))
|
||||
#endif
|
||||
|
||||
#include "memcasecmp.h"
|
||||
@@ -44,14 +44,11 @@
|
||||
join -i works with sort -f. */
|
||||
|
||||
int
|
||||
memcasecmp (vs1, vs2, n)
|
||||
const void *vs1;
|
||||
const void *vs2;
|
||||
size_t n;
|
||||
memcasecmp (const void *vs1, const void *vs2, size_t n)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned char *s1 = (unsigned char *) vs1;
|
||||
unsigned char *s2 = (unsigned char *) vs2;
|
||||
unsigned char const *s1 = (unsigned char const *) vs1;
|
||||
unsigned char const *s2 = (unsigned char const *) vs2;
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
unsigned char u1 = *s1++;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1993, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1993, 1997, 1999 Free Software Foundation, Inc.
|
||||
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
|
||||
with help from Dan Sahlin (dan@sics.se) and
|
||||
commentary by Jim Blandy (jimb@ai.mit.edu);
|
||||
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#undef __ptr_t
|
||||
@@ -45,7 +45,7 @@ USA. */
|
||||
#define LONG_MAX_32_BITS 2147483647
|
||||
|
||||
#ifndef LONG_MAX
|
||||
#define LONG_MAX LONG_MAX_32_BITS
|
||||
# define LONG_MAX LONG_MAX_32_BITS
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
71
lib/memcoll.c
Normal file
71
lib/memcoll.c
Normal file
@@ -0,0 +1,71 @@
|
||||
/* Locale-specific memory comparison.
|
||||
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. */
|
||||
|
||||
/* Contributed by Paul Eggert <eggert@twinsun.com>. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
/* Compare S1 (with length S1LEN) and S2 (with length S2LEN) according
|
||||
to the LC_COLLATE locale. S1 and S2 do not overlap, and are not
|
||||
adjacent. Temporarily modify the bytes after S1 and S2, but
|
||||
restore their original contents before returning. */
|
||||
int
|
||||
memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
|
||||
{
|
||||
int diff;
|
||||
char n1 = s1[s1len];
|
||||
char n2 = s2[s2len];
|
||||
|
||||
s1[s1len++] = '\0';
|
||||
s2[s2len++] = '\0';
|
||||
|
||||
while (! (diff = strcoll (s1, s2)))
|
||||
{
|
||||
/* strcoll found no difference, but perhaps it was fooled by NUL
|
||||
characters in the data. Work around this problem by advancing
|
||||
past the NUL chars. */
|
||||
size_t size1 = strlen (s1) + 1;
|
||||
size_t size2 = strlen (s2) + 1;
|
||||
s1 += size1;
|
||||
s2 += size2;
|
||||
s1len -= size1;
|
||||
s2len -= size2;
|
||||
|
||||
if (s1len == 0)
|
||||
{
|
||||
if (s2len != 0)
|
||||
diff = -1;
|
||||
break;
|
||||
}
|
||||
else if (s2len == 0)
|
||||
{
|
||||
diff = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
s1[s1len - 1] = n1;
|
||||
s2[s2len - 1] = n2;
|
||||
|
||||
return diff;
|
||||
}
|
||||
18
lib/memcoll.h
Normal file
18
lib/memcoll.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef MEMCOLL_H_
|
||||
# define MEMCOLL_H_ 1
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int memcoll PARAMS ((char *, size_t, char *, size_t));
|
||||
|
||||
#endif /* MEMCOLL_H_ */
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1997, 2000 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,10 +25,7 @@
|
||||
Return DESTADDR. */
|
||||
|
||||
char *
|
||||
memcpy (destaddr, srcaddr, len)
|
||||
char *destaddr;
|
||||
const char *srcaddr;
|
||||
int len;
|
||||
memcpy (char *destaddr, const char *srcaddr, int len)
|
||||
{
|
||||
char *dest = destaddr;
|
||||
|
||||
|
||||
18
lib/mkdir.c
18
lib/mkdir.c
@@ -34,6 +34,16 @@ extern int errno;
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifndef S_IRWXU
|
||||
# define S_IRWXU 0700
|
||||
#endif
|
||||
#ifndef S_IRWXG
|
||||
# define S_IRWXG 0070
|
||||
#endif
|
||||
#ifndef S_IRWXO
|
||||
# define S_IRWXO 0007
|
||||
#endif
|
||||
|
||||
/* mkdir adapted from GNU tar. */
|
||||
|
||||
/* Make directory DPATH, with permission mode DMODE.
|
||||
@@ -48,9 +58,10 @@ extern int errno;
|
||||
subroutine didn't return EEXIST. It does now. */
|
||||
|
||||
int
|
||||
mkdir (const char *dpath, int dmode)
|
||||
mkdir (const char *dpath, mode_t dmode)
|
||||
{
|
||||
pid_t cpid;
|
||||
mode_t mode;
|
||||
int status;
|
||||
struct stat statbuf;
|
||||
|
||||
@@ -75,8 +86,9 @@ mkdir (const char *dpath, int dmode)
|
||||
process is going away anyway, we zap its umask.
|
||||
This won't suffice to set SUID, SGID, etc. on this
|
||||
directory, so the parent process calls chmod afterward. */
|
||||
status = umask (0); /* Get current umask. */
|
||||
umask (status | (0777 & ~dmode)); /* Set for mkdir. */
|
||||
mode = umask (0); /* Get current umask. */
|
||||
/* Set for mkdir. */
|
||||
umask (mode | ((S_IRWXU | S_IRWXG | S_IRWXO) & ~dmode));
|
||||
execl ("/bin/mkdir", "mkdir", dpath, (char *) 0);
|
||||
_exit (1);
|
||||
|
||||
|
||||
157
lib/modechange.c
157
lib/modechange.c
@@ -1,5 +1,5 @@
|
||||
/* modechange.c -- file mode manipulation
|
||||
Copyright (C) 1989, 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989, 1990, 1997-2000 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,9 +28,9 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "modechange.h"
|
||||
#include <sys/stat.h>
|
||||
#include "xstrtol.h"
|
||||
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
@@ -50,34 +50,65 @@ char *malloc ();
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISUID
|
||||
# define S_ISUID 04000
|
||||
#endif
|
||||
#ifndef S_ISGID
|
||||
# define S_ISGID 04000
|
||||
#endif
|
||||
#ifndef S_ISVTX
|
||||
# define S_ISVTX 01000
|
||||
#endif
|
||||
#ifndef S_IRUSR
|
||||
# define S_IRUSR 0400
|
||||
#endif
|
||||
#ifndef S_IWUSR
|
||||
# define S_IWUSR 0200
|
||||
#endif
|
||||
#ifndef S_IXUSR
|
||||
# define S_IXUSR 0100
|
||||
#endif
|
||||
#ifndef S_IRGRP
|
||||
# define S_IRGRP 0040
|
||||
#endif
|
||||
#ifndef S_IWGRP
|
||||
# define S_IWGRP 0020
|
||||
#endif
|
||||
#ifndef S_IXGRP
|
||||
# define S_IXGRP 0010
|
||||
#endif
|
||||
#ifndef S_IROTH
|
||||
# define S_IROTH 0004
|
||||
#endif
|
||||
#ifndef S_IWOTH
|
||||
# define S_IWOTH 0002
|
||||
#endif
|
||||
#ifndef S_IXOTH
|
||||
# define S_IXOTH 0001
|
||||
#endif
|
||||
#ifndef S_IRWXU
|
||||
# define S_IRWXU 0700
|
||||
#endif
|
||||
#ifndef S_IRWXG
|
||||
# define S_IRWXG 0070
|
||||
#endif
|
||||
#ifndef S_IRWXO
|
||||
# define S_IRWXO 0007
|
||||
#endif
|
||||
|
||||
/* All the mode bits that can be affected by chmod. */
|
||||
#define CHMOD_MODE_BITS \
|
||||
(S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
|
||||
|
||||
/* Return newly allocated memory to hold one element of type TYPE. */
|
||||
#define talloc(type) ((type *) malloc (sizeof (type)))
|
||||
|
||||
#define isodigit(c) ((c) >= '0' && (c) <= '7')
|
||||
|
||||
/* Return a positive integer containing the value of the ASCII
|
||||
octal number S. If S is not an octal number, return -1. */
|
||||
|
||||
static int
|
||||
oatoi (const char *s)
|
||||
{
|
||||
register int i;
|
||||
|
||||
if (*s == 0)
|
||||
return -1;
|
||||
for (i = 0; isodigit (*s); ++s)
|
||||
i = i * 8 + *s - '0';
|
||||
if (*s)
|
||||
return -1;
|
||||
return i;
|
||||
}
|
||||
|
||||
/* Create a mode_change entry with the specified `=ddd'-style
|
||||
mode change operation, where NEW_MODE is `ddd'. Return the
|
||||
new entry, or NULL upon failure. */
|
||||
|
||||
static struct mode_change *
|
||||
make_node_op_equals (int new_mode)
|
||||
make_node_op_equals (mode_t new_mode)
|
||||
{
|
||||
struct mode_change *p;
|
||||
p = talloc (struct mode_change);
|
||||
@@ -87,7 +118,7 @@ make_node_op_equals (int new_mode)
|
||||
p->op = '=';
|
||||
p->flags = 0;
|
||||
p->value = new_mode;
|
||||
p->affected = 07777; /* Affect all permissions. */
|
||||
p->affected = CHMOD_MODE_BITS; /* Affect all permissions. */
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -126,21 +157,21 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
{
|
||||
struct mode_change *head; /* First element of the linked list. */
|
||||
struct mode_change *tail; /* An element of the linked list. */
|
||||
int i; /* General purpose temporary. */
|
||||
int umask_value; /* The umask value (surprise). */
|
||||
uintmax_t mode_value; /* The mode value, if octal. */
|
||||
char *string_end; /* Pointer to end of parsed value. */
|
||||
mode_t umask_value; /* The umask value (surprise). */
|
||||
|
||||
head = NULL;
|
||||
#ifdef lint
|
||||
tail = NULL;
|
||||
#endif
|
||||
|
||||
i = oatoi (mode_string);
|
||||
if (i >= 0)
|
||||
if (xstrtoumax (mode_string, &string_end, 8, &mode_value, "") == LONGINT_OK)
|
||||
{
|
||||
struct mode_change *p;
|
||||
if (i > 07777)
|
||||
if (mode_value != (mode_value & CHMOD_MODE_BITS))
|
||||
return MODE_INVALID;
|
||||
p = make_node_op_equals (i);
|
||||
p = make_node_op_equals ((mode_t) mode_value);
|
||||
if (p == NULL)
|
||||
return MODE_MEMORY_EXHAUSTED;
|
||||
mode_append_entry (&head, &tail, p);
|
||||
@@ -155,9 +186,9 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
do
|
||||
{
|
||||
/* Which bits in the mode are operated on. */
|
||||
unsigned short affected_bits = 0;
|
||||
mode_t affected_bits = 0;
|
||||
/* `affected_bits' modified by umask. */
|
||||
unsigned short affected_masked;
|
||||
mode_t affected_masked;
|
||||
/* Operators to actually use umask on. */
|
||||
unsigned ops_to_mask = 0;
|
||||
|
||||
@@ -170,16 +201,16 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
switch (*mode_string)
|
||||
{
|
||||
case 'u':
|
||||
affected_bits |= 04700;
|
||||
affected_bits |= S_ISUID | S_IRWXU;
|
||||
break;
|
||||
case 'g':
|
||||
affected_bits |= 02070;
|
||||
affected_bits |= S_ISGID | S_IRWXG;
|
||||
break;
|
||||
case 'o':
|
||||
affected_bits |= 01007;
|
||||
affected_bits |= S_ISVTX | S_IRWXO;
|
||||
break;
|
||||
case 'a':
|
||||
affected_bits |= 07777;
|
||||
affected_bits |= CHMOD_MODE_BITS;
|
||||
break;
|
||||
default:
|
||||
goto no_more_affected;
|
||||
@@ -193,7 +224,7 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
else
|
||||
{
|
||||
who_specified_p = 0;
|
||||
affected_bits = 07777;
|
||||
affected_bits = CHMOD_MODE_BITS;
|
||||
ops_to_mask = masked_ops;
|
||||
}
|
||||
|
||||
@@ -238,31 +269,34 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
switch (*mode_string)
|
||||
{
|
||||
case 'r':
|
||||
change->value |= 00444 & affected_masked;
|
||||
change->value |= ((S_IRUSR | S_IRGRP | S_IROTH)
|
||||
& affected_masked);
|
||||
break;
|
||||
case 'w':
|
||||
change->value |= 00222 & affected_masked;
|
||||
change->value |= ((S_IWUSR | S_IWGRP | S_IWOTH)
|
||||
& affected_masked);
|
||||
break;
|
||||
case 'X':
|
||||
change->flags |= MODE_X_IF_ANY_X;
|
||||
/* Fall through. */
|
||||
case 'x':
|
||||
change->value |= 00111 & affected_masked;
|
||||
change->value |= ((S_IXUSR | S_IXGRP | S_IXOTH)
|
||||
& affected_masked);
|
||||
break;
|
||||
case 's':
|
||||
/* Set the setuid/gid bits if `u' or `g' is selected. */
|
||||
change->value |= 06000 & affected_masked;
|
||||
change->value |= (S_ISUID | S_ISGID) & affected_masked;
|
||||
break;
|
||||
case 't':
|
||||
/* Set the "save text image" bit if `o' is selected. */
|
||||
change->value |= 01000 & affected_masked;
|
||||
change->value |= S_ISVTX & affected_masked;
|
||||
break;
|
||||
case 'u':
|
||||
/* Set the affected bits to the value of the `u' bits
|
||||
on the same file. */
|
||||
if (change->value)
|
||||
goto invalid;
|
||||
change->value = 00700;
|
||||
change->value = S_IRWXU;
|
||||
change->flags |= MODE_COPY_EXISTING;
|
||||
break;
|
||||
case 'g':
|
||||
@@ -270,7 +304,7 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
on the same file. */
|
||||
if (change->value)
|
||||
goto invalid;
|
||||
change->value = 00070;
|
||||
change->value = S_IRWXG;
|
||||
change->flags |= MODE_COPY_EXISTING;
|
||||
break;
|
||||
case 'o':
|
||||
@@ -278,7 +312,7 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
on the same file. */
|
||||
if (change->value)
|
||||
goto invalid;
|
||||
change->value = 00007;
|
||||
change->value = S_IRWXO;
|
||||
change->flags |= MODE_COPY_EXISTING;
|
||||
break;
|
||||
default:
|
||||
@@ -313,7 +347,7 @@ mode_create_from_ref (const char *ref_file)
|
||||
|
||||
change->op = '=';
|
||||
change->flags = 0;
|
||||
change->affected = 07777;
|
||||
change->affected = CHMOD_MODE_BITS;
|
||||
change->value = ref_stats.st_mode;
|
||||
change->next = NULL;
|
||||
|
||||
@@ -325,13 +359,13 @@ mode_create_from_ref (const char *ref_file)
|
||||
change affects it even if no execute bits were set in OLDMODE.
|
||||
The returned value has the S_IFMT bits cleared. */
|
||||
|
||||
unsigned short
|
||||
mode_adjust (unsigned int oldmode, const struct mode_change *changes)
|
||||
mode_t
|
||||
mode_adjust (mode_t oldmode, const struct mode_change *changes)
|
||||
{
|
||||
unsigned short newmode; /* The adjusted mode and one operand. */
|
||||
unsigned short value; /* The other operand. */
|
||||
mode_t newmode; /* The adjusted mode and one operand. */
|
||||
mode_t value; /* The other operand. */
|
||||
|
||||
newmode = oldmode & 07777;
|
||||
newmode = oldmode & CHMOD_MODE_BITS;
|
||||
|
||||
for (; changes; changes = changes->next)
|
||||
{
|
||||
@@ -341,15 +375,21 @@ mode_adjust (unsigned int oldmode, const struct mode_change *changes)
|
||||
the mask `changes->value'. */
|
||||
value = newmode & changes->value;
|
||||
|
||||
if (changes->value & 00700)
|
||||
if (changes->value & S_IRWXU)
|
||||
/* Copy `u' permissions onto `g' and `o'. */
|
||||
value |= (value >> 3) | (value >> 6);
|
||||
else if (changes->value & 00070)
|
||||
value |= ((value & S_IRUSR ? S_IRGRP | S_IROTH : 0)
|
||||
| (value & S_IWUSR ? S_IWGRP | S_IROTH : 0)
|
||||
| (value & S_IXUSR ? S_IXGRP | S_IXOTH : 0));
|
||||
else if (changes->value & S_IRWXG)
|
||||
/* Copy `g' permissions onto `u' and `o'. */
|
||||
value |= (value << 3) | (value >> 3);
|
||||
value |= ((value & S_IRGRP ? S_IRUSR | S_IROTH : 0)
|
||||
| (value & S_IWGRP ? S_IWUSR | S_IROTH : 0)
|
||||
| (value & S_IXGRP ? S_IXUSR | S_IXOTH : 0));
|
||||
else
|
||||
/* Copy `o' permissions onto `u' and `g'. */
|
||||
value |= (value << 3) | (value << 6);
|
||||
value |= ((value & S_IROTH ? S_IRUSR | S_IRGRP : 0)
|
||||
| (value & S_IWOTH ? S_IWUSR | S_IRGRP : 0)
|
||||
| (value & S_IXOTH ? S_IXUSR | S_IXGRP : 0));
|
||||
|
||||
/* In order to change only `u', `g', or `o' permissions,
|
||||
or some combination thereof, clear unselected bits.
|
||||
@@ -365,8 +405,9 @@ mode_adjust (unsigned int oldmode, const struct mode_change *changes)
|
||||
directory and no execute bits are already set. */
|
||||
if ((changes->flags & MODE_X_IF_ANY_X)
|
||||
&& !S_ISDIR (oldmode)
|
||||
&& (newmode & 00111) == 0)
|
||||
value &= ~00111; /* Clear the execute bits. */
|
||||
&& (newmode & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0)
|
||||
/* Clear the execute bits. */
|
||||
value &= ~ (S_IXUSR | S_IXGRP | S_IXOTH);
|
||||
}
|
||||
|
||||
switch (changes->op)
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
#if ! defined MODECHANGE_H_
|
||||
# define MODECHANGE_H_
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
# include <sys/types.h>
|
||||
|
||||
/* Affect the execute bits only if at least one execute bit is set already,
|
||||
or if the file is a directory. */
|
||||
# define MODE_X_IF_ANY_X 01
|
||||
@@ -33,8 +39,8 @@ struct mode_change
|
||||
{
|
||||
char op; /* One of "=+-". */
|
||||
char flags; /* Special operations. */
|
||||
unsigned short affected; /* Set for u/g/o/s/s/t, if to be affected. */
|
||||
unsigned short value; /* Bits to add/remove. */
|
||||
mode_t affected; /* Set for u/g/o/s/s/t, if to be affected. */
|
||||
mode_t value; /* Bits to add/remove. */
|
||||
struct mode_change *next; /* Link to next change in list. */
|
||||
};
|
||||
|
||||
@@ -59,7 +65,7 @@ struct mode_change
|
||||
|
||||
struct mode_change *mode_compile PARAMS ((const char *, unsigned));
|
||||
struct mode_change *mode_create_from_ref PARAMS ((const char *));
|
||||
unsigned short mode_adjust PARAMS ((unsigned, const struct mode_change *));
|
||||
mode_t mode_adjust PARAMS ((mode_t, const struct mode_change *));
|
||||
void mode_free PARAMS ((struct mode_change *));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* mountlist.c -- return a list of mounted filesystems
|
||||
Copyright (C) 1991, 1992, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 1997, 1998, 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
|
||||
|
||||
102
lib/nanosleep.c
Normal file
102
lib/nanosleep.c
Normal file
@@ -0,0 +1,102 @@
|
||||
/* Provide a replacement for the POSIX nanosleep function.
|
||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* written by Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "nanosleep.h"
|
||||
|
||||
static int suspended;
|
||||
int first_call = 1;
|
||||
|
||||
/* Handle SIGCONT. */
|
||||
|
||||
static void
|
||||
sighandler (int sig)
|
||||
{
|
||||
suspended = 1;
|
||||
}
|
||||
|
||||
/* FIXME: comment */
|
||||
|
||||
static void
|
||||
my_usleep (const struct timespec *ts_delay)
|
||||
{
|
||||
struct timeval tv_delay;
|
||||
tv_delay.tv_sec = ts_delay->tv_sec;
|
||||
tv_delay.tv_usec = ts_delay->tv_nsec / 1000;
|
||||
select (0, (void *) 0, (void *) 0, (void *) 0, &tv_delay);
|
||||
}
|
||||
|
||||
/* FIXME: comment */
|
||||
|
||||
int
|
||||
nanosleep (const struct timespec *requested_delay,
|
||||
struct timespec *remaining_delay)
|
||||
{
|
||||
#ifdef SA_NOCLDSTOP
|
||||
struct sigaction oldact, newact;
|
||||
#endif
|
||||
|
||||
suspended = 0;
|
||||
|
||||
/* set up sig handler */
|
||||
if (first_call)
|
||||
{
|
||||
#ifdef SA_NOCLDSTOP
|
||||
newact.sa_handler = sighandler;
|
||||
sigemptyset (&newact.sa_mask);
|
||||
newact.sa_flags = 0;
|
||||
|
||||
sigaction (SIGCONT, NULL, &oldact);
|
||||
if (oldact.sa_handler != SIG_IGN)
|
||||
sigaction (SIGCONT, &newact, NULL);
|
||||
#else
|
||||
if (signal (SIGCONT, SIG_IGN) != SIG_IGN)
|
||||
signal (SIGCONT, sighandler);
|
||||
#endif
|
||||
first_call = 0;
|
||||
}
|
||||
|
||||
my_usleep (requested_delay);
|
||||
|
||||
if (suspended)
|
||||
{
|
||||
/* Calculate time remaining. */
|
||||
/* FIXME: the code in sleep doesn't use this, so there's no
|
||||
rush to implement it. */
|
||||
|
||||
errno = EINTR;
|
||||
}
|
||||
|
||||
/* FIXME: Restore sig handler? */
|
||||
|
||||
return suspended;
|
||||
}
|
||||
57
lib/nanosleep.h
Normal file
57
lib/nanosleep.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/* Copyright (C) 2000 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 ! defined NANOSLEEP_H
|
||||
# define NANOSLEEP_H
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# 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
|
||||
|
||||
# if ! HAVE_STRUCT_TIMESPEC
|
||||
/* Some systems don't define this struct, e.g., AIX 4.1, Ultrix 4.3. */
|
||||
struct timespec
|
||||
{
|
||||
time_t tv_sec;
|
||||
long tv_nsec;
|
||||
};
|
||||
# endif
|
||||
|
||||
int
|
||||
nanosleep PARAMS ((const struct timespec *requested_delay,
|
||||
struct timespec *remaining_delay));
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/* path-concat.c -- concatenate two arbitrary pathnames
|
||||
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 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
|
||||
@@ -33,21 +33,49 @@
|
||||
|
||||
char *malloc ();
|
||||
|
||||
/* Concatenate two pathname components, DIR and BASE, in newly-allocated
|
||||
storage and return the result. Return 0 if out of memory. Add a slash
|
||||
between DIR and BASE in the result if neither would contribute one.
|
||||
If each would contribute at least one, elide one from the end of DIR.
|
||||
Otherwise, simply concatenate DIR and BASE. In any case, if
|
||||
BASE_IN_RESULT is non-NULL, set *BASE_IN_RESULT to point to the copy of
|
||||
BASE in the returned concatenation. */
|
||||
#ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
#endif
|
||||
|
||||
#include "xalloc.h"
|
||||
#include "path-concat.h"
|
||||
|
||||
/* Concatenate two pathname components, DIR and BASE, in
|
||||
newly-allocated storage and return the result. Return 0 if out of
|
||||
memory. Add a slash between DIR and BASE in the result if neither
|
||||
would contribute one. If each would contribute at least one, elide
|
||||
one from the end of DIR. Otherwise, simply concatenate DIR and
|
||||
BASE. In any case, if BASE_IN_RESULT is non-NULL, set
|
||||
*BASE_IN_RESULT to point to the copy of BASE in the returned
|
||||
concatenation.
|
||||
|
||||
DIR may be NULL, BASE must not be.
|
||||
|
||||
Return NULL if memory is exhausted. */
|
||||
|
||||
char *
|
||||
path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
{
|
||||
char *p;
|
||||
char *p_concat;
|
||||
size_t base_len = strlen (base);
|
||||
size_t dir_len = strlen (dir);
|
||||
size_t base_len;
|
||||
size_t dir_len;
|
||||
|
||||
if (!dir)
|
||||
{
|
||||
p_concat = strdup (base);
|
||||
if (base_in_result)
|
||||
*base_in_result = p_concat;
|
||||
return p_concat;
|
||||
}
|
||||
|
||||
/* DIR is not empty. */
|
||||
base_len = strlen (base);
|
||||
dir_len = strlen (dir);
|
||||
|
||||
p_concat = malloc (dir_len + base_len + 2);
|
||||
if (!p_concat)
|
||||
@@ -55,10 +83,10 @@ path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
|
||||
p = mempcpy (p_concat, dir, dir_len);
|
||||
|
||||
if (*(p - 1) == '/' && *base == '/')
|
||||
if (ISSLASH (*(p - 1)) && ISSLASH(*base))
|
||||
--p;
|
||||
else if (*(p - 1) != '/' && *base != '/')
|
||||
*p++ = '/';
|
||||
else if (!ISSLASH (*(p - 1)) && !ISSLASH(*base))
|
||||
*p++ = DIRECTORY_SEPARATOR;
|
||||
|
||||
if (base_in_result)
|
||||
*base_in_result = p;
|
||||
@@ -67,3 +95,14 @@ path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
|
||||
return p_concat;
|
||||
}
|
||||
|
||||
/* Same, but die when memory is exhausted. */
|
||||
|
||||
char *
|
||||
xpath_concat (const char *dir, const char *base, char **base_in_result)
|
||||
{
|
||||
char *res = path_concat (dir, base, base_in_result);
|
||||
if (res)
|
||||
return res;
|
||||
xalloc_die ();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Define PATH_MAX somehow. Requires sys/types.h.
|
||||
Copyright (C) 1992 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 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
|
||||
@@ -16,38 +16,39 @@
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _PATHMAX_H
|
||||
#define _PATHMAX_H
|
||||
# define _PATHMAX_H
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
# ifdef 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__))
|
||||
#include <limits.h>
|
||||
#endif
|
||||
# if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
|
||||
# include <limits.h>
|
||||
# endif
|
||||
|
||||
#ifndef _POSIX_PATH_MAX
|
||||
#define _POSIX_PATH_MAX 255
|
||||
#endif
|
||||
# ifndef _POSIX_PATH_MAX
|
||||
# define _POSIX_PATH_MAX 255
|
||||
# endif
|
||||
|
||||
#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
|
||||
#define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
|
||||
#endif
|
||||
# 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)
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
# if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
|
||||
#if !defined(PATH_MAX) && defined(MAXPATHLEN)
|
||||
#define PATH_MAX MAXPATHLEN
|
||||
#endif
|
||||
# if !defined(PATH_MAX) && defined(MAXPATHLEN)
|
||||
# define PATH_MAX MAXPATHLEN
|
||||
# endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX _POSIX_PATH_MAX
|
||||
#endif
|
||||
# ifndef PATH_MAX
|
||||
# define PATH_MAX _POSIX_PATH_MAX
|
||||
# endif
|
||||
|
||||
#endif /* _PATHMAX_H */
|
||||
|
||||
480
lib/quotearg.c
480
lib/quotearg.c
@@ -1,5 +1,5 @@
|
||||
/* quotearg.c - quote arguments for output
|
||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000 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
|
||||
@@ -31,10 +31,13 @@
|
||||
#else
|
||||
# define ISASCII(c) isascii (c)
|
||||
#endif
|
||||
#ifdef isgraph
|
||||
# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
|
||||
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(text) gettext (text)
|
||||
#else
|
||||
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
|
||||
# define _(text) text
|
||||
#endif
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
@@ -55,6 +58,19 @@
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_WCTYPE_H
|
||||
# include <wctype.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_MBRTOWC && HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
#else
|
||||
# define iswprint(wc) 1
|
||||
# define mbrtowc(pwc, s, n, ps) 1
|
||||
# define mbsinit(ps) 1
|
||||
# define mbstate_t int
|
||||
#endif
|
||||
|
||||
#define INT_BITS (sizeof (int) * CHAR_BIT)
|
||||
|
||||
struct quoting_options
|
||||
@@ -62,7 +78,7 @@ struct quoting_options
|
||||
/* Basic quoting style. */
|
||||
enum quoting_style style;
|
||||
|
||||
/* Quote the chararacters indicated by this bit vector even if the
|
||||
/* Quote the characters indicated by this bit vector even if the
|
||||
quoting style would not normally require them to be quoted. */
|
||||
int quote_these_too[((UCHAR_MAX + 1) / INT_BITS
|
||||
+ ((UCHAR_MAX + 1) % INT_BITS != 0))];
|
||||
@@ -76,17 +92,19 @@ char const *const quoting_style_args[] =
|
||||
"shell-always",
|
||||
"c",
|
||||
"escape",
|
||||
"locale",
|
||||
0
|
||||
};
|
||||
|
||||
/* Correspondances to quoting style names. */
|
||||
/* Correspondences to quoting style names. */
|
||||
enum quoting_style const quoting_style_vals[] =
|
||||
{
|
||||
literal_quoting_style,
|
||||
shell_quoting_style,
|
||||
shell_always_quoting_style,
|
||||
c_quoting_style,
|
||||
escape_quoting_style
|
||||
escape_quoting_style,
|
||||
locale_quoting_style
|
||||
};
|
||||
|
||||
/* The default quoting options. */
|
||||
@@ -135,6 +153,293 @@ set_char_quoting (struct quoting_options *o, char c, int i)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
|
||||
argument ARG (of size ARGSIZE), using QUOTING_STYLE and the
|
||||
non-quoting-style part of O to control quoting.
|
||||
Terminate the output with a null character, and return the written
|
||||
size of the output, not counting the terminating null.
|
||||
If BUFFERSIZE is too small to store the output string, return the
|
||||
value that would have been returned had BUFFERSIZE been large enough.
|
||||
If ARGSIZE is -1, use the string length of the argument for ARGSIZE.
|
||||
|
||||
This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG,
|
||||
ARGSIZE, O), except it uses QUOTING_STYLE instead of the quoting
|
||||
style specified by O, and O may not be null. */
|
||||
|
||||
static size_t
|
||||
quotearg_buffer_restyled (char *buffer, size_t buffersize,
|
||||
char const *arg, size_t argsize,
|
||||
enum quoting_style quoting_style,
|
||||
struct quoting_options const *o)
|
||||
{
|
||||
size_t i;
|
||||
size_t len = 0;
|
||||
char const *quote_string = 0;
|
||||
size_t quote_string_len = 0;
|
||||
int backslash_escapes = 0;
|
||||
|
||||
#define STORE(c) \
|
||||
do \
|
||||
{ \
|
||||
if (len < buffersize) \
|
||||
buffer[len] = (c); \
|
||||
len++; \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
switch (quoting_style)
|
||||
{
|
||||
case c_quoting_style:
|
||||
STORE ('"');
|
||||
backslash_escapes = 1;
|
||||
quote_string = "\"";
|
||||
quote_string_len = 1;
|
||||
break;
|
||||
|
||||
case escape_quoting_style:
|
||||
backslash_escapes = 1;
|
||||
break;
|
||||
|
||||
case locale_quoting_style:
|
||||
for (quote_string = _("`"); *quote_string; quote_string++)
|
||||
STORE (*quote_string);
|
||||
backslash_escapes = 1;
|
||||
quote_string = _("'");
|
||||
quote_string_len = strlen (quote_string);
|
||||
break;
|
||||
|
||||
case shell_always_quoting_style:
|
||||
STORE ('\'');
|
||||
quote_string = "'";
|
||||
quote_string_len = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; ! (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize); i++)
|
||||
{
|
||||
unsigned char c;
|
||||
unsigned char esc;
|
||||
|
||||
if (backslash_escapes
|
||||
&& quote_string_len
|
||||
&& i + quote_string_len <= argsize
|
||||
&& memcmp (arg + i, quote_string, quote_string_len) == 0)
|
||||
STORE ('\\');
|
||||
|
||||
c = arg[i];
|
||||
switch (c)
|
||||
{
|
||||
case '?':
|
||||
switch (quoting_style)
|
||||
{
|
||||
case shell_quoting_style:
|
||||
goto use_shell_always_quoting_style;
|
||||
|
||||
case c_quoting_style:
|
||||
if (i + 2 < argsize && arg[i + 1] == '?')
|
||||
switch (arg[i + 2])
|
||||
{
|
||||
case '!': case '\'':
|
||||
case '(': case ')': case '-': case '/':
|
||||
case '<': case '=': case '>':
|
||||
/* Escape the second '?' in what would otherwise be
|
||||
a trigraph. */
|
||||
i += 2;
|
||||
c = arg[i + 2];
|
||||
STORE ('?');
|
||||
STORE ('\\');
|
||||
STORE ('?');
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
#if HAVE_C_BACKSLASH_A
|
||||
case '\a': esc = 'a'; goto c_escape;
|
||||
#endif
|
||||
case '\b': esc = 'b'; goto c_escape;
|
||||
case '\f': esc = 'f'; goto c_escape;
|
||||
case '\n': esc = 'n'; goto c_and_shell_escape;
|
||||
case '\r': esc = 'r'; goto c_and_shell_escape;
|
||||
case '\t': esc = 't'; goto c_and_shell_escape;
|
||||
case '\v': esc = 'v'; goto c_escape;
|
||||
case '\\': esc = c; goto c_and_shell_escape;
|
||||
|
||||
c_and_shell_escape:
|
||||
if (quoting_style == shell_quoting_style)
|
||||
goto use_shell_always_quoting_style;
|
||||
c_escape:
|
||||
if (backslash_escapes)
|
||||
{
|
||||
c = esc;
|
||||
goto store_escape;
|
||||
}
|
||||
break;
|
||||
|
||||
case '#': case '~':
|
||||
if (i != 0)
|
||||
break;
|
||||
/* Fall through. */
|
||||
case ' ':
|
||||
case '!': /* special in bash */
|
||||
case '"': case '$': case '&':
|
||||
case '(': case ')': case '*': case ';':
|
||||
case '<': case '>': case '[':
|
||||
case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
|
||||
case '`': case '|':
|
||||
/* A shell special character. In theory, '$' and '`' could
|
||||
be the first bytes of multibyte characters, which means
|
||||
we should check them with mbrtowc, but in practice this
|
||||
doesn't happen so it's not worth worrying about. */
|
||||
if (quoting_style == shell_quoting_style)
|
||||
goto use_shell_always_quoting_style;
|
||||
break;
|
||||
|
||||
case '\'':
|
||||
switch (quoting_style)
|
||||
{
|
||||
case shell_quoting_style:
|
||||
goto use_shell_always_quoting_style;
|
||||
|
||||
case shell_always_quoting_style:
|
||||
STORE ('\'');
|
||||
STORE ('\\');
|
||||
STORE ('\'');
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case '%': case '+': case ',': case '-': case '.': case '/':
|
||||
case '0': case '1': case '2': case '3': case '4': case '5':
|
||||
case '6': case '7': case '8': case '9': case ':': case '=':
|
||||
case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
|
||||
case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
|
||||
case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
|
||||
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
|
||||
case 'Y': case 'Z': case ']': case '_': case 'a': case 'b':
|
||||
case 'c': case 'd': case 'e': case 'f': case 'g': case 'h':
|
||||
case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
|
||||
case 'o': case 'p': case 'q': case 'r': case 's': case 't':
|
||||
case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
|
||||
case '{': case '}':
|
||||
/* These characters don't cause problems, no matter what the
|
||||
quoting style is. They cannot start multibyte sequences. */
|
||||
break;
|
||||
|
||||
default:
|
||||
/* If we have a multibyte sequence, copy it until we reach
|
||||
its end, find an error, or come back to the initial shift
|
||||
state. For C-like styles, if the sequence has
|
||||
unprintable characters, escape the whole sequence, since
|
||||
we can't easily escape single characters within it. */
|
||||
{
|
||||
/* Length of multibyte sequence found so far. */
|
||||
size_t m = 0;
|
||||
|
||||
int printable = 1;
|
||||
mbstate_t mbstate;
|
||||
memset (&mbstate, 0, sizeof mbstate);
|
||||
|
||||
if (argsize == (size_t) -1)
|
||||
argsize = strlen (arg);
|
||||
|
||||
do
|
||||
{
|
||||
wchar_t w;
|
||||
size_t bytes = mbrtowc (&w, &arg[i + m],
|
||||
argsize - (i + m), &mbstate);
|
||||
if (bytes == 0)
|
||||
break;
|
||||
else if (bytes == (size_t) -1)
|
||||
{
|
||||
printable = 0;
|
||||
break;
|
||||
}
|
||||
else if (bytes == (size_t) -2)
|
||||
{
|
||||
printable = 0;
|
||||
while (i + m < argsize && arg[i + m])
|
||||
m++;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! iswprint (w))
|
||||
printable = 0;
|
||||
m += bytes;
|
||||
}
|
||||
}
|
||||
while (! mbsinit (&mbstate));
|
||||
|
||||
if (m <= 1)
|
||||
{
|
||||
/* Escape a unibyte character like a multibyte
|
||||
sequence if using backslash escapes, and if the
|
||||
character is not printable. */
|
||||
m = backslash_escapes && ! ISPRINT (c);
|
||||
printable = 0;
|
||||
}
|
||||
|
||||
if (m)
|
||||
{
|
||||
/* Output a multibyte sequence, or an escaped
|
||||
unprintable unibyte character. */
|
||||
size_t imax = i + m - 1;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (backslash_escapes && ! printable)
|
||||
{
|
||||
STORE ('\\');
|
||||
STORE ('0' + (c >> 6));
|
||||
STORE ('0' + ((c >> 3) & 7));
|
||||
c = '0' + (c & 7);
|
||||
}
|
||||
if (i == imax)
|
||||
break;
|
||||
STORE (c);
|
||||
c = arg[++i];
|
||||
}
|
||||
|
||||
goto store_c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! (backslash_escapes
|
||||
&& o->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
|
||||
goto store_c;
|
||||
|
||||
store_escape:
|
||||
STORE ('\\');
|
||||
|
||||
store_c:
|
||||
STORE (c);
|
||||
}
|
||||
|
||||
if (quote_string)
|
||||
for (; *quote_string; quote_string++)
|
||||
STORE (*quote_string);
|
||||
|
||||
if (len < buffersize)
|
||||
buffer[len] = '\0';
|
||||
return len;
|
||||
|
||||
use_shell_always_quoting_style:
|
||||
return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
|
||||
shell_always_quoting_style, o);
|
||||
}
|
||||
|
||||
/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
|
||||
argument ARG (of size ARGSIZE), using O to control quoting.
|
||||
If O is null, use the default.
|
||||
@@ -148,151 +453,9 @@ quotearg_buffer (char *buffer, size_t buffersize,
|
||||
char const *arg, size_t argsize,
|
||||
struct quoting_options const *o)
|
||||
{
|
||||
unsigned char c;
|
||||
size_t i;
|
||||
size_t len;
|
||||
int quote_mark;
|
||||
struct quoting_options const *p = o ? o : &default_quoting_options;
|
||||
enum quoting_style quoting_style = p->style;
|
||||
#define STORE(c) \
|
||||
do \
|
||||
{ \
|
||||
if (len < buffersize) \
|
||||
buffer[len] = (c); \
|
||||
len++; \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
switch (quoting_style)
|
||||
{
|
||||
case shell_quoting_style:
|
||||
if (! (argsize == (size_t) -1 ? arg[0] == '\0' : argsize == 0))
|
||||
{
|
||||
switch (arg[0])
|
||||
{
|
||||
case '#': case '~':
|
||||
break;
|
||||
|
||||
default:
|
||||
len = 0;
|
||||
for (i = 0; ; i++)
|
||||
{
|
||||
if (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize)
|
||||
goto done;
|
||||
|
||||
c = arg[i];
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '\t': case '\n': case ' ':
|
||||
case '!': /* special in csh */
|
||||
case '"': case '$': case '&': case '\'':
|
||||
case '(': case ')': case '*': case ';':
|
||||
case '<': case '>': case '?': case '[': case '\\':
|
||||
case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
|
||||
case '`': case '|':
|
||||
goto needs_quoting;
|
||||
}
|
||||
|
||||
if (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
|
||||
goto needs_quoting;
|
||||
|
||||
STORE (c);
|
||||
}
|
||||
|
||||
needs_quoting:;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Fall through. */
|
||||
|
||||
case shell_always_quoting_style:
|
||||
quote_mark = '\'';
|
||||
break;
|
||||
|
||||
case c_quoting_style:
|
||||
quote_mark = '"';
|
||||
break;
|
||||
|
||||
default:
|
||||
quote_mark = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
len = 0;
|
||||
|
||||
if (quote_mark)
|
||||
STORE (quote_mark);
|
||||
|
||||
for (i = 0; ! (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize); i++)
|
||||
{
|
||||
c = arg[i];
|
||||
|
||||
switch (quoting_style)
|
||||
{
|
||||
case literal_quoting_style:
|
||||
break;
|
||||
|
||||
case shell_quoting_style:
|
||||
case shell_always_quoting_style:
|
||||
if (c == '\'')
|
||||
{
|
||||
STORE ('\'');
|
||||
STORE ('\\');
|
||||
STORE ('\'');
|
||||
}
|
||||
break;
|
||||
|
||||
case c_quoting_style:
|
||||
case escape_quoting_style:
|
||||
switch (c)
|
||||
{
|
||||
case '?': /* Do not generate trigraphs. */
|
||||
case '\\': goto store_escape;
|
||||
/* Not all C compilers know what \a means. */
|
||||
case 7 : c = 'a'; goto store_escape;
|
||||
case '\b': c = 'b'; goto store_escape;
|
||||
case '\f': c = 'f'; goto store_escape;
|
||||
case '\n': c = 'n'; goto store_escape;
|
||||
case '\r': c = 'r'; goto store_escape;
|
||||
case '\t': c = 't'; goto store_escape;
|
||||
case '\v': c = 'v'; goto store_escape;
|
||||
|
||||
case '"':
|
||||
if (quoting_style == c_quoting_style)
|
||||
goto store_escape;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (!ISGRAPH (c))
|
||||
{
|
||||
STORE ('\\');
|
||||
STORE ('0' + (c >> 6));
|
||||
STORE ('0' + ((c >> 3) & 7));
|
||||
c = '0' + (c & 7);
|
||||
goto store_c;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (! (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
|
||||
goto store_c;
|
||||
|
||||
store_escape:
|
||||
STORE ('\\');
|
||||
}
|
||||
|
||||
store_c:
|
||||
STORE (c);
|
||||
}
|
||||
|
||||
if (quote_mark)
|
||||
STORE (quote_mark);
|
||||
|
||||
done:
|
||||
if (len < buffersize)
|
||||
buffer[len] = '\0';
|
||||
return len;
|
||||
return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
|
||||
p->style, p);
|
||||
}
|
||||
|
||||
/* Use storage slot N to return a quoted version of the string ARG.
|
||||
@@ -351,6 +514,21 @@ quotearg (char const *arg)
|
||||
return quotearg_n (0, arg);
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n_style (unsigned int n, enum quoting_style s, char const *arg)
|
||||
{
|
||||
struct quoting_options o;
|
||||
o.style = s;
|
||||
memset (o.quote_these_too, 0, sizeof o.quote_these_too);
|
||||
return quotearg_n_options (n, arg, &o);
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_style (enum quoting_style s, char const *arg)
|
||||
{
|
||||
return quotearg_n_style (0, s, arg);
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_char (char const *arg, char ch)
|
||||
{
|
||||
|
||||
@@ -24,11 +24,11 @@ enum quoting_style
|
||||
shell_quoting_style, /* --quoting-style=shell */
|
||||
shell_always_quoting_style, /* --quoting-style=shell-always */
|
||||
c_quoting_style, /* --quoting-style=c */
|
||||
escape_quoting_style /* --quoting-style=escape */
|
||||
escape_quoting_style, /* --quoting-style=escape */
|
||||
locale_quoting_style /* --quoting-style=locale */
|
||||
};
|
||||
|
||||
/* For now, --quoting-style=literal is the default, but
|
||||
this is planned to change to --quoting-style=shell in the future. */
|
||||
/* For now, --quoting-style=literal is the default, but this may change. */
|
||||
#ifndef DEFAULT_QUOTING_STYLE
|
||||
# define DEFAULT_QUOTING_STYLE literal_quoting_style
|
||||
#endif
|
||||
@@ -93,6 +93,15 @@ char *quotearg_n PARAMS ((unsigned int n, char const *arg));
|
||||
/* Equivalent to quotearg_n (0, ARG). */
|
||||
char *quotearg PARAMS ((char const *arg));
|
||||
|
||||
/* Use style S and storage slot N to return a quoted version of the string ARG.
|
||||
This is like quotearg_n (N, ARG), except that it uses S with no other
|
||||
options to specify the quoting method. */
|
||||
char *quotearg_n_style PARAMS ((unsigned int n, enum quoting_style s,
|
||||
char const *arg));
|
||||
|
||||
/* Equivalent to quotearg_n_style (0, S, ARG). */
|
||||
char *quotearg_style PARAMS ((enum quoting_style s, char const *arg));
|
||||
|
||||
/* Like quotearg (ARG), except also quote any instances of CH. */
|
||||
char *quotearg_char PARAMS ((char const *arg, char ch));
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* readtokens.c -- Functions for reading tokens from an input stream.
|
||||
Copyright (C) 1990-1991 Jim Meyering.
|
||||
Copyright (C) 1990-1991, 1999 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
|
||||
@@ -77,11 +77,10 @@ init_tokenbuffer (tokenbuffer)
|
||||
and on files that aren't newline-terminated. */
|
||||
|
||||
long
|
||||
readtoken (stream, delim, n_delim, tokenbuffer)
|
||||
FILE *stream;
|
||||
const char *delim;
|
||||
int n_delim;
|
||||
token_buffer *tokenbuffer;
|
||||
readtoken (FILE *stream,
|
||||
const char *delim,
|
||||
int n_delim,
|
||||
token_buffer *tokenbuffer)
|
||||
{
|
||||
char *p;
|
||||
int c, i, n;
|
||||
@@ -164,14 +163,12 @@ readtoken (stream, delim, n_delim, tokenbuffer)
|
||||
%%% realloc() of `tokens' just before returning? */
|
||||
|
||||
int
|
||||
readtokens (stream, projected_n_tokens, delim, n_delim,
|
||||
tokens_out, token_lengths)
|
||||
FILE *stream;
|
||||
int projected_n_tokens;
|
||||
const char *delim;
|
||||
int n_delim;
|
||||
char ***tokens_out;
|
||||
long **token_lengths;
|
||||
readtokens (FILE *stream,
|
||||
int projected_n_tokens,
|
||||
const char *delim,
|
||||
int n_delim,
|
||||
char ***tokens_out,
|
||||
long **token_lengths)
|
||||
{
|
||||
token_buffer tb, *token = &tb;
|
||||
int token_length;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* GNU's read utmp module.
|
||||
Copyright (C) 1992-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2000 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
|
||||
@@ -41,11 +41,11 @@ extract_trimmed_name (const STRUCT_UTMP *ut)
|
||||
{
|
||||
char *p, *trimmed_name;
|
||||
|
||||
trimmed_name = xmalloc (sizeof (ut->ut_name) + 1);
|
||||
strncpy (trimmed_name, ut->ut_name, sizeof (ut->ut_name));
|
||||
trimmed_name = xmalloc (sizeof (UT_USER (ut)) + 1);
|
||||
strncpy (trimmed_name, UT_USER (ut), sizeof (UT_USER (ut)));
|
||||
/* Append a trailing space character. Some systems pad names shorter than
|
||||
the maximum with spaces, others pad with NULs. Remove any spaces. */
|
||||
trimmed_name[sizeof (ut->ut_name)] = ' ';
|
||||
trimmed_name[sizeof (UT_USER (ut))] = ' ';
|
||||
p = strchr (trimmed_name, ' ');
|
||||
if (p != NULL)
|
||||
*p = '\0';
|
||||
@@ -66,13 +66,16 @@ read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf)
|
||||
STRUCT_UTMP *u;
|
||||
STRUCT_UTMP *utmp = NULL;
|
||||
|
||||
if (utmpname (filename))
|
||||
return 1;
|
||||
/* Ignore the return value for now.
|
||||
Solaris' utmpname returns 1 upon success -- which is contrary
|
||||
to what the GNU libc version does. In addition, older GNU libc
|
||||
versions are actually void. */
|
||||
UTMP_NAME_FUNCTION (filename);
|
||||
|
||||
setutent ();
|
||||
SET_UTMP_ENT ();
|
||||
|
||||
n_read = 0;
|
||||
while ((u = getutent ()) != NULL)
|
||||
while ((u = GET_UTMP_ENT ()) != NULL)
|
||||
{
|
||||
++n_read;
|
||||
utmp = (STRUCT_UTMP *) realloc (utmp, n_read * sizeof (STRUCT_UTMP));
|
||||
@@ -81,7 +84,7 @@ read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf)
|
||||
utmp[n_read - 1] = *u;
|
||||
}
|
||||
|
||||
endutent ();
|
||||
END_UTMP_ENT ();
|
||||
|
||||
*n_entries = n_read;
|
||||
*utmp_buf = utmp;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Declarations for GNU's read utmp module.
|
||||
Copyright (C) 1992-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2000 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
|
||||
@@ -34,10 +34,41 @@
|
||||
# include <utmpx.h>
|
||||
# define UTMP_STRUCT_NAME utmpx
|
||||
# define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_tv.tv_sec)
|
||||
# define SET_UTMP_ENT setutxent
|
||||
# define GET_UTMP_ENT getutxent
|
||||
# define END_UTMP_ENT endutxent
|
||||
# define UTMP_NAME_FUNCTION utmpxname
|
||||
# else
|
||||
# include <utmp.h>
|
||||
# define UTMP_STRUCT_NAME utmp
|
||||
# define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_time)
|
||||
# define SET_UTMP_ENT setutent
|
||||
# define GET_UTMP_ENT getutent
|
||||
# define END_UTMP_ENT endutent
|
||||
# define UTMP_NAME_FUNCTION utmpname
|
||||
# endif
|
||||
|
||||
/* Accessor macro for the member named ut_user or ut_name. */
|
||||
# ifdef HAVE_UTMPX_H
|
||||
|
||||
# if HAVE_STRUCT_UTMPX_UT_USER
|
||||
# define UT_USER(Utmp) Utmp->ut_user
|
||||
# endif
|
||||
# if HAVE_STRUCT_UTMPX_UT_NAME
|
||||
# undef UT_USER
|
||||
# define UT_USER(Utmp) Utmp->ut_name
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# if HAVE_STRUCT_UTMP_UT_USER
|
||||
# define UT_USER(Utmp) Utmp->ut_user
|
||||
# endif
|
||||
# if HAVE_STRUCT_UTMP_UT_NAME
|
||||
# undef UT_USER
|
||||
# define UT_USER(Utmp) Utmp->ut_name
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
typedef struct UTMP_STRUCT_NAME STRUCT_UTMP;
|
||||
|
||||
10
lib/regex.c
10
lib/regex.c
@@ -2,7 +2,7 @@
|
||||
version 0.12.
|
||||
(Implements POSIX draft P1003.2/D11.2, except for some of the
|
||||
internationalization features.)
|
||||
Copyright (C) 1993, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
|
||||
|
||||
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
|
||||
@@ -254,6 +254,12 @@ init_syntax_once ()
|
||||
#define ISUPPER(c) (ISASCII (c) && isupper (c))
|
||||
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||
|
||||
#ifdef _tolower
|
||||
# define TOLOWER(c) _tolower(c)
|
||||
#else
|
||||
# define TOLOWER(c) tolower(c)
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
# define NULL (void *)0
|
||||
#endif
|
||||
@@ -5628,7 +5634,7 @@ regcomp (preg, pattern, cflags)
|
||||
|
||||
/* Map uppercase characters to corresponding lowercase ones. */
|
||||
for (i = 0; i < CHAR_SET_SIZE; i++)
|
||||
preg->translate[i] = ISUPPER (i) ? tolower (i) : i;
|
||||
preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
|
||||
}
|
||||
else
|
||||
preg->translate = NULL;
|
||||
|
||||
113
lib/rename.c
113
lib/rename.c
@@ -1,113 +0,0 @@
|
||||
/* BSD compatible rename and directory rename function for System V.
|
||||
Copyright (C) 1988, 1990 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
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 <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
#if !defined(S_ISDIR) && defined(S_IFDIR)
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
/* Rename file FROM to file TO.
|
||||
Return 0 if successful, -1 if not. */
|
||||
|
||||
int
|
||||
rename (char *from, char *to)
|
||||
{
|
||||
struct stat from_stats, to_stats;
|
||||
|
||||
if (stat (from, &from_stats))
|
||||
return -1;
|
||||
|
||||
/* Be careful not to unlink `from' if it happens to be equal to `to' or
|
||||
(on filesystems that silently truncate filenames after 14 characters)
|
||||
if `from' and `to' share the significant characters. */
|
||||
if (stat (to, &to_stats))
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((from_stats.st_dev == to_stats.st_dev)
|
||||
&& (from_stats.st_ino == to_stats.st_ino))
|
||||
/* `from' and `to' designate the same file on that filesystem. */
|
||||
return 0;
|
||||
|
||||
if (unlink (to) && errno != ENOENT)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef MVDIR
|
||||
|
||||
/* If MVDIR is defined, it should be the full filename of a setuid root
|
||||
program able to link and unlink directories. If MVDIR is not defined,
|
||||
then the capability of renaming directories may be missing. */
|
||||
|
||||
if (S_ISDIR (from_stats.st_mode))
|
||||
{
|
||||
/* Need a setuid root process to link and unlink directories. */
|
||||
int status;
|
||||
pid_t pid = fork ();
|
||||
switch (pid)
|
||||
{
|
||||
case -1: /* Error. */
|
||||
return -1; /* errno already set */
|
||||
|
||||
case 0: /* Child. */
|
||||
execl (MVDIR, "mvdir", from, to, (char *) 0);
|
||||
_exit (1);
|
||||
|
||||
default: /* Parent. */
|
||||
while (wait (&status) != pid)
|
||||
/* Do nothing. */ ;
|
||||
|
||||
if (status)
|
||||
{
|
||||
/* MVDIR failed. */
|
||||
errno = EIO;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
#endif /* MVDIR */
|
||||
|
||||
{
|
||||
if (link (from, to))
|
||||
return -1;
|
||||
if (unlink (from) && errno != ENOENT)
|
||||
{
|
||||
unlink (to);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
94
lib/same.c
Normal file
94
lib/same.c
Normal file
@@ -0,0 +1,94 @@
|
||||
/* Determine whether two file names refer to the same file.
|
||||
Copyright (C) 1997-2000 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 <stdio.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#include "same.h"
|
||||
#include "dirname.h"
|
||||
#include "error.h"
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
|
||||
#define STREQ(a, b) (strcmp ((a), (b)) == 0)
|
||||
|
||||
#ifndef HAVE_DECL_FREE
|
||||
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)
|
||||
|
||||
/* Return nonzero if SOURCE and DEST point to the same name in the same
|
||||
directory. */
|
||||
|
||||
int
|
||||
same_name (const char *source, const char *dest)
|
||||
{
|
||||
struct stat source_dir_stats;
|
||||
struct stat dest_dir_stats;
|
||||
char *source_dirname, *dest_dirname;
|
||||
|
||||
source_dirname = dir_name (source);
|
||||
dest_dirname = dir_name (dest);
|
||||
if (source_dirname == NULL || dest_dirname == NULL)
|
||||
error (1, 0, _("virtual memory exhausted"));
|
||||
|
||||
if (stat (source_dirname, &source_dir_stats))
|
||||
{
|
||||
/* Shouldn't happen. */
|
||||
error (1, errno, "%s", source_dirname);
|
||||
}
|
||||
|
||||
if (stat (dest_dirname, &dest_dir_stats))
|
||||
{
|
||||
/* Shouldn't happen. */
|
||||
error (1, errno, "%s", dest_dirname);
|
||||
}
|
||||
|
||||
free (source_dirname);
|
||||
free (dest_dirname);
|
||||
|
||||
return (SAME_INODE (source_dir_stats, dest_dir_stats)
|
||||
&& STREQ (base_name (source), base_name (dest)));
|
||||
}
|
||||
36
lib/same.h
Normal file
36
lib/same.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Determine whether two file names refer to the same file.
|
||||
Copyright (C) 1997-2000 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. */
|
||||
|
||||
#ifndef SAME_H_
|
||||
# define SAME_H_ 1
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int
|
||||
same_name PARAMS ((const char *source, const char *dest));
|
||||
|
||||
#endif /* SAME_H_ */
|
||||
@@ -1,5 +1,5 @@
|
||||
/* savedir.c -- save the list of files in a directory in a string
|
||||
Copyright (C) 1990, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2000 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
|
||||
@@ -76,7 +76,7 @@ char *stpcpy ();
|
||||
Return NULL if DIR cannot be opened or if out of memory. */
|
||||
|
||||
char *
|
||||
savedir (const char *dir, unsigned int name_size)
|
||||
savedir (const char *dir, off_t name_size)
|
||||
{
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
@@ -87,6 +87,10 @@ savedir (const char *dir, unsigned int name_size)
|
||||
if (dirp == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Be sure name_size is at least `1' so there's room for
|
||||
the final NUL byte. */
|
||||
name_size += !name_size;
|
||||
|
||||
name_space = (char *) malloc (name_size);
|
||||
if (name_space == NULL)
|
||||
{
|
||||
@@ -102,7 +106,7 @@ savedir (const char *dir, unsigned int name_size)
|
||||
|| (dp->d_name[1] != '\0'
|
||||
&& (dp->d_name[1] != '.' || dp->d_name[2] != '\0')))
|
||||
{
|
||||
unsigned size_needed = (namep - name_space) + NAMLEN (dp) + 2;
|
||||
off_t size_needed = (namep - name_space) + NAMLEN (dp) + 2;
|
||||
|
||||
if (size_needed > name_size)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
# endif
|
||||
|
||||
char *
|
||||
savedir PARAMS ((const char *dir, unsigned int name_size));
|
||||
savedir PARAMS ((const char *dir, off_t name_size));
|
||||
|
||||
#endif
|
||||
|
||||
534
lib/strftime.c
534
lib/strftime.c
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1994, 2000 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.
|
||||
|
||||
@@ -16,15 +16,13 @@
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Find the first ocurrence in S of any character in ACCEPT. */
|
||||
char *
|
||||
strpbrk (s, accept)
|
||||
register const char *s;
|
||||
register const char *accept;
|
||||
strpbrk (const char *s, const char *accept)
|
||||
{
|
||||
while (*s != '\0')
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994, 1999 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
|
||||
@@ -24,6 +24,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
*
|
||||
* Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -71,7 +75,7 @@ strstr (const char *phaystack, const char *pneedle)
|
||||
a = *++haystack;
|
||||
if (a == '\0')
|
||||
goto ret0;
|
||||
shloop: }
|
||||
shloop:; }
|
||||
while (a != b);
|
||||
|
||||
jin: a = *++haystack;
|
||||
|
||||
252
lib/strtol.c
252
lib/strtol.c
@@ -1,7 +1,7 @@
|
||||
/* strtol - Convert string representation of a number into an integer value.
|
||||
Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
/* Convert string representation of a number into an integer value.
|
||||
Copyright (C) 1991, 92, 94, 95, 96, 97, 98, 99 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.
|
||||
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
|
||||
@@ -54,7 +54,7 @@ extern int errno;
|
||||
# include "../locale/localeinfo.h"
|
||||
#endif
|
||||
|
||||
/* Nonzero if we are defining `strtoul' or `strtouq', operating on
|
||||
/* Nonzero if we are defining `strtoul' or `strtoull', operating on
|
||||
unsigned integers. */
|
||||
#ifndef UNSIGNED
|
||||
# define UNSIGNED 0
|
||||
@@ -64,72 +64,154 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
/* Determine the name. */
|
||||
#if UNSIGNED
|
||||
# ifdef USE_WIDE_CHAR
|
||||
# ifdef QUAD
|
||||
# define strtol wcstouq
|
||||
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||
# if UNSIGNED
|
||||
# ifdef USE_WIDE_CHAR
|
||||
# ifdef QUAD
|
||||
# define strtol __wcstoull_l
|
||||
# else
|
||||
# define strtol __wcstoul_l
|
||||
# endif
|
||||
# else
|
||||
# define strtol wcstoul
|
||||
# ifdef QUAD
|
||||
# define strtol __strtoull_l
|
||||
# else
|
||||
# define strtol __strtoul_l
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# ifdef QUAD
|
||||
# define strtol strtouq
|
||||
# ifdef USE_WIDE_CHAR
|
||||
# ifdef QUAD
|
||||
# define strtol __wcstoll_l
|
||||
# else
|
||||
# define strtol __wcstol_l
|
||||
# endif
|
||||
# else
|
||||
# define strtol strtoul
|
||||
# ifdef QUAD
|
||||
# define strtol __strtoll_l
|
||||
# else
|
||||
# define strtol __strtol_l
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# ifdef USE_WIDE_CHAR
|
||||
# ifdef QUAD
|
||||
# define strtol wcstoq
|
||||
# if UNSIGNED
|
||||
# ifdef USE_WIDE_CHAR
|
||||
# ifdef QUAD
|
||||
# define strtol wcstoull
|
||||
# else
|
||||
# define strtol wcstoul
|
||||
# endif
|
||||
# else
|
||||
# define strtol wcstol
|
||||
# ifdef QUAD
|
||||
# define strtol strtoull
|
||||
# else
|
||||
# define strtol strtoul
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# ifdef QUAD
|
||||
# define strtol strtoq
|
||||
# ifdef USE_WIDE_CHAR
|
||||
# ifdef QUAD
|
||||
# define strtol wcstoll
|
||||
# else
|
||||
# define strtol wcstol
|
||||
# endif
|
||||
# else
|
||||
# ifdef QUAD
|
||||
# define strtol strtoll
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* If QUAD is defined, we are defining `strtoq' or `strtouq',
|
||||
/* If QUAD is defined, we are defining `strtoll' or `strtoull',
|
||||
operating on `long long int's. */
|
||||
#ifdef QUAD
|
||||
# define LONG long long
|
||||
# undef LONG_MIN
|
||||
# define LONG_MIN LONG_LONG_MIN
|
||||
# undef LONG_MAX
|
||||
# define LONG_MAX LONG_LONG_MAX
|
||||
# undef ULONG_MAX
|
||||
# define ULONG_MAX ULONG_LONG_MAX
|
||||
# define STRTOL_LONG_MIN LONG_LONG_MIN
|
||||
# define STRTOL_LONG_MAX LONG_LONG_MAX
|
||||
# define STRTOL_ULONG_MAX ULONG_LONG_MAX
|
||||
|
||||
/* The extra casts work around common compiler bugs,
|
||||
e.g. Cray C 5.0.3.0 when t == time_t. */
|
||||
# ifndef TYPE_SIGNED
|
||||
# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
|
||||
# endif
|
||||
# ifndef TYPE_MINIMUM
|
||||
# define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \
|
||||
? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) \
|
||||
: (t) 0))
|
||||
# endif
|
||||
# ifndef TYPE_MAXIMUM
|
||||
# define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t)))
|
||||
# endif
|
||||
|
||||
# ifndef ULONG_LONG_MAX
|
||||
# define ULONG_LONG_MAX TYPE_MAXIMUM (unsigned long long)
|
||||
# endif
|
||||
# ifndef LONG_LONG_MAX
|
||||
# define LONG_LONG_MAX TYPE_MAXIMUM (long long int)
|
||||
# endif
|
||||
# ifndef LONG_LONG_MIN
|
||||
# define LONG_LONG_MIN TYPE_MINIMUM (long long int)
|
||||
# endif
|
||||
|
||||
# if __GNUC__ == 2 && __GNUC_MINOR__ < 7
|
||||
/* Work around gcc bug with using this constant. */
|
||||
static const unsigned long long int maxquad = ULONG_LONG_MAX;
|
||||
# undef ULONG_MAX
|
||||
# define ULONG_MAX maxquad
|
||||
# undef STRTOL_ULONG_MAX
|
||||
# define STRTOL_ULONG_MAX maxquad
|
||||
# endif
|
||||
#else
|
||||
# define LONG long
|
||||
|
||||
#ifndef ULONG_MAX
|
||||
# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
|
||||
# ifndef ULONG_MAX
|
||||
# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
|
||||
# endif
|
||||
# ifndef LONG_MAX
|
||||
# define LONG_MAX ((long int) (ULONG_MAX >> 1))
|
||||
# endif
|
||||
# define STRTOL_LONG_MIN LONG_MIN
|
||||
# define STRTOL_LONG_MAX LONG_MAX
|
||||
# define STRTOL_ULONG_MAX ULONG_MAX
|
||||
#endif
|
||||
#ifndef LONG_MAX
|
||||
# define LONG_MAX ((long int) (ULONG_MAX >> 1))
|
||||
|
||||
|
||||
/* We use this code also for the extended locale handling where the
|
||||
function gets as an additional argument the locale which has to be
|
||||
used. To access the values we have to redefine the _NL_CURRENT
|
||||
macro. */
|
||||
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||
# undef _NL_CURRENT
|
||||
# define _NL_CURRENT(category, item) \
|
||||
(current->values[_NL_ITEM_INDEX (item)].string)
|
||||
# define LOCALE_PARAM , loc
|
||||
# define LOCALE_PARAM_DECL __locale_t loc;
|
||||
#else
|
||||
# define LOCALE_PARAM
|
||||
# define LOCALE_PARAM_DECL
|
||||
#endif
|
||||
|
||||
#if defined _LIBC || defined HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_WIDE_CHAR
|
||||
# include <wchar.h>
|
||||
# include <wctype.h>
|
||||
# define L_(Ch) L##Ch
|
||||
# define UCHAR_TYPE wint_t
|
||||
# define STRING_TYPE wchar_t
|
||||
# define ISSPACE(Ch) iswspace (Ch)
|
||||
# define ISALPHA(Ch) iswalpha (Ch)
|
||||
# define TOUPPER(Ch) towupper (Ch)
|
||||
# ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||
# define ISSPACE(Ch) __iswspace_l ((Ch), loc)
|
||||
# define ISALPHA(Ch) __iswalpha_l ((Ch), loc)
|
||||
# define TOUPPER(Ch) __towupper_l ((Ch), loc)
|
||||
# else
|
||||
# define ISSPACE(Ch) iswspace (Ch)
|
||||
# define ISALPHA(Ch) iswalpha (Ch)
|
||||
# define TOUPPER(Ch) towupper (Ch)
|
||||
# endif
|
||||
#else
|
||||
# if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
# if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
|
||||
# define IN_CTYPE_DOMAIN(c) 1
|
||||
# else
|
||||
# define IN_CTYPE_DOMAIN(c) isascii(c)
|
||||
@@ -137,12 +219,20 @@ extern int errno;
|
||||
# define L_(Ch) Ch
|
||||
# define UCHAR_TYPE unsigned char
|
||||
# define STRING_TYPE char
|
||||
# define ISSPACE(Ch) (IN_CTYPE_DOMAIN (Ch) && isspace (Ch))
|
||||
# define ISALPHA(Ch) (IN_CTYPE_DOMAIN (Ch) && isalpha (Ch))
|
||||
# define TOUPPER(Ch) (IN_CTYPE_DOMAIN (Ch) ? toupper (Ch) : (Ch))
|
||||
# ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||
# define ISSPACE(Ch) __isspace_l ((Ch), loc)
|
||||
# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
|
||||
# define TOUPPER(Ch) __toupper_l ((Ch), loc)
|
||||
# else
|
||||
# define ISSPACE(Ch) (IN_CTYPE_DOMAIN (Ch) && isspace (Ch))
|
||||
# define ISALPHA(Ch) (IN_CTYPE_DOMAIN (Ch) && isalpha (Ch))
|
||||
# define TOUPPER(Ch) (IN_CTYPE_DOMAIN (Ch) ? toupper (Ch) : (Ch))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
/* For compilers which are ansi but don't define __STDC__, like SGI
|
||||
Irix-4.0.5 cc, also check whether PROTOTYPES is defined. */
|
||||
#if defined (__STDC__) || defined (PROTOTYPES)
|
||||
# define INTERNAL(X) INTERNAL1(X)
|
||||
# define INTERNAL1(X) __##X##_internal
|
||||
# define WEAKNAME(X) WEAKNAME1(X)
|
||||
@@ -156,6 +246,7 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Convert NPTR to an `unsigned long int' or `long int' in base BASE.
|
||||
If BASE is 0 the base is determined by the presence of a leading
|
||||
zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal.
|
||||
@@ -164,11 +255,12 @@ extern int errno;
|
||||
one converted is stored in *ENDPTR. */
|
||||
|
||||
INT
|
||||
INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
INTERNAL (strtol) (nptr, endptr, base, group LOCALE_PARAM)
|
||||
const STRING_TYPE *nptr;
|
||||
STRING_TYPE **endptr;
|
||||
int base;
|
||||
int group;
|
||||
LOCALE_PARAM_DECL
|
||||
{
|
||||
int negative;
|
||||
register unsigned LONG int cutoff;
|
||||
@@ -180,8 +272,11 @@ INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
int overflow;
|
||||
|
||||
#ifdef USE_NUMBER_GROUPING
|
||||
# ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
||||
struct locale_data *current = loc->__locales[LC_NUMERIC];
|
||||
# endif
|
||||
/* The thousands character of the current locale. */
|
||||
wchar_t thousands;
|
||||
wchar_t thousands = L'\0';
|
||||
/* The numeric grouping specification of the current locale,
|
||||
in the format described in <locale.h>. */
|
||||
const char *grouping;
|
||||
@@ -194,9 +289,11 @@ INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
else
|
||||
{
|
||||
/* Figure out the thousands separator character. */
|
||||
if (mbtowc (&thousands, _NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP),
|
||||
strlen (_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP))) <= 0)
|
||||
thousands = (wchar_t) *_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP);
|
||||
# if defined _LIBC || defined _HAVE_BTOWC
|
||||
thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP));
|
||||
if (thousands == WEOF)
|
||||
thousands = L'\0';
|
||||
# endif
|
||||
if (thousands == L'\0')
|
||||
grouping = NULL;
|
||||
}
|
||||
@@ -233,23 +330,19 @@ INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
else
|
||||
negative = 0;
|
||||
|
||||
if (base == 16 && s[0] == L_('0') && TOUPPER (s[1]) == L_('X'))
|
||||
s += 2;
|
||||
|
||||
/* If BASE is zero, figure it out ourselves. */
|
||||
if (base == 0)
|
||||
if (*s == L_('0'))
|
||||
{
|
||||
if (TOUPPER (s[1]) == L_('X'))
|
||||
{
|
||||
s += 2;
|
||||
base = 16;
|
||||
}
|
||||
else
|
||||
base = 8;
|
||||
}
|
||||
else
|
||||
base = 10;
|
||||
/* Recognize number prefix and if BASE is zero, figure it out ourselves. */
|
||||
if (*s == L_('0'))
|
||||
{
|
||||
if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X'))
|
||||
{
|
||||
s += 2;
|
||||
base = 16;
|
||||
}
|
||||
else if (base == 0)
|
||||
base = 8;
|
||||
}
|
||||
else if (base == 0)
|
||||
base = 10;
|
||||
|
||||
/* Save the pointer so we can check later if anything happened. */
|
||||
save = s;
|
||||
@@ -273,8 +366,8 @@ INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
#endif
|
||||
end = NULL;
|
||||
|
||||
cutoff = ULONG_MAX / (unsigned LONG int) base;
|
||||
cutlim = ULONG_MAX % (unsigned LONG int) base;
|
||||
cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base;
|
||||
cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base;
|
||||
|
||||
overflow = 0;
|
||||
i = 0;
|
||||
@@ -314,25 +407,23 @@ INTERNAL (strtol) (nptr, endptr, base, group)
|
||||
`unsigned LONG int', but outside the range of `LONG int'. */
|
||||
if (overflow == 0
|
||||
&& i > (negative
|
||||
? -((unsigned LONG int) (LONG_MIN + 1)) + 1
|
||||
: (unsigned LONG int) LONG_MAX))
|
||||
? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1
|
||||
: (unsigned LONG int) STRTOL_LONG_MAX))
|
||||
overflow = 1;
|
||||
#else
|
||||
overflow |= negative;
|
||||
#endif
|
||||
|
||||
if (overflow)
|
||||
{
|
||||
__set_errno (ERANGE);
|
||||
#if UNSIGNED
|
||||
return ULONG_MAX;
|
||||
return STRTOL_ULONG_MAX;
|
||||
#else
|
||||
return negative ? LONG_MIN : LONG_MAX;
|
||||
return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Return the result of the appropriate sign. */
|
||||
return (negative ? -i : i);
|
||||
return negative ? -i : i;
|
||||
|
||||
noconv:
|
||||
/* We must handle a special case here: the base is 0 or 16 and the
|
||||
@@ -340,12 +431,14 @@ noconv:
|
||||
hexadecimal digits. This is no error case. We return 0 and
|
||||
ENDPTR points to the `x`. */
|
||||
if (endptr != NULL)
|
||||
if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
|
||||
&& save[-2] == L_('0'))
|
||||
*endptr = (STRING_TYPE *) &save[-1];
|
||||
else
|
||||
/* There was no number to convert. */
|
||||
*endptr = (STRING_TYPE *) nptr;
|
||||
{
|
||||
if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
|
||||
&& save[-2] == L_('0'))
|
||||
*endptr = (STRING_TYPE *) &save[-1];
|
||||
else
|
||||
/* There was no number to convert. */
|
||||
*endptr = (STRING_TYPE *) nptr;
|
||||
}
|
||||
|
||||
return 0L;
|
||||
}
|
||||
@@ -369,10 +462,11 @@ INT
|
||||
#ifdef weak_function
|
||||
weak_function
|
||||
#endif
|
||||
strtol (nptr, endptr, base)
|
||||
strtol (nptr, endptr, base LOCALE_PARAM)
|
||||
const STRING_TYPE *nptr;
|
||||
STRING_TYPE **endptr;
|
||||
int base;
|
||||
LOCALE_PARAM_DECL
|
||||
{
|
||||
return INTERNAL (strtol) (nptr, endptr, base, 0);
|
||||
return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1999 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.
|
||||
@@ -17,6 +17,6 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define UNSIGNED 1
|
||||
#define UNSIGNED 1
|
||||
|
||||
#include <strtol.c>
|
||||
|
||||
27
lib/strtoull.c
Normal file
27
lib/strtoull.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/* Function to parse an `unsigned long long int' from text.
|
||||
Copyright (C) 1995, 1996, 1997, 1999 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.
|
||||
|
||||
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. */
|
||||
|
||||
#define QUAD 1
|
||||
|
||||
#include "strtoul.c"
|
||||
|
||||
#ifdef _LIBC
|
||||
strong_alias (__strtoull_internal, __strtouq_internal)
|
||||
weak_alias (strtoull, strtouq)
|
||||
#endif
|
||||
75
lib/strtoumax.c
Normal file
75
lib/strtoumax.c
Normal file
@@ -0,0 +1,75 @@
|
||||
/* 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
|
||||
unsigned long long strtoul PARAMS ((char const *, char **, int));
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_STRTOULL
|
||||
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
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Compare strings while treating digits characters numerically.
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jean-Francois Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
|
||||
|
||||
@@ -36,6 +36,15 @@
|
||||
#define CMP 2
|
||||
#define LEN 3
|
||||
|
||||
/* ISDIGIT differs from isdigit, as follows:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to Posix. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
/* Compare S1 and S2 as strings holding indices/version numbers,
|
||||
returning less than, equal to or greater than zero if S1 is less than,
|
||||
@@ -83,17 +92,17 @@ strverscmp (const char *s1, const char *s2)
|
||||
c1 = *p1++;
|
||||
c2 = *p2++;
|
||||
/* Hint: '0' is a digit too. */
|
||||
state = S_N | ((c1 == '0') + (isdigit (c1) != 0));
|
||||
state = S_N | ((c1 == '0') + (ISDIGIT (c1) != 0));
|
||||
|
||||
while ((diff = c1 - c2) == 0 && c1 != '\0')
|
||||
{
|
||||
state = next_state[state];
|
||||
c1 = *p1++;
|
||||
c2 = *p2++;
|
||||
state |= (c1 == '0') + (isdigit (c1) != 0);
|
||||
state |= (c1 == '0') + (ISDIGIT (c1) != 0);
|
||||
}
|
||||
|
||||
state = result_type[state << 2 | ((c2 == '0') + (isdigit (c2) != 0))];
|
||||
state = result_type[state << 2 | ((c2 == '0') + (ISDIGIT (c2) != 0))];
|
||||
|
||||
switch (state)
|
||||
{
|
||||
@@ -101,11 +110,11 @@ strverscmp (const char *s1, const char *s2)
|
||||
return diff;
|
||||
|
||||
case LEN:
|
||||
while (isdigit (*p1++))
|
||||
if (!isdigit (*p2++))
|
||||
while (ISDIGIT (*p1++))
|
||||
if (!ISDIGIT (*p2++))
|
||||
return 1;
|
||||
|
||||
return isdigit (*p2) ? -1 : diff;
|
||||
return ISDIGIT (*p2) ? -1 : diff;
|
||||
|
||||
default:
|
||||
return state;
|
||||
|
||||
@@ -54,7 +54,7 @@ utime_null (const char *file)
|
||||
int status = 0;
|
||||
struct stat sb;
|
||||
|
||||
fd = open (file, O_RDWR, 0666);
|
||||
fd = open (file, O_RDWR);
|
||||
if (fd < 0
|
||||
|| fstat (fd, &sb) < 0
|
||||
|| safe_read (fd, &c, sizeof (char)) < 0
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
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
|
||||
@@ -28,20 +30,41 @@
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
#define N_(Text) Text
|
||||
|
||||
/* Default copyright goes to the FSF. */
|
||||
|
||||
char* version_etc_copyright =
|
||||
N_("Copyright (C) 1999 Free Software Foundation, Inc.");
|
||||
|
||||
|
||||
/* Display the --version information the standard way.
|
||||
|
||||
If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
|
||||
the program. The formats are therefore:
|
||||
|
||||
PACKAGE VERSION
|
||||
|
||||
or
|
||||
|
||||
COMMAND_NAME (PACKAGE) VERSION. */
|
||||
void
|
||||
version_etc (FILE *stream,
|
||||
const char *command_name, const char *package,
|
||||
const char *version, const char *authors)
|
||||
{
|
||||
fprintf (stream, "%s (%s) %s\n", command_name, package, version);
|
||||
fputs (_("\
|
||||
\n\
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.\n\
|
||||
This is free software; see the source for copying conditions. There is NO\n\
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||
\n\
|
||||
"
|
||||
), stream);
|
||||
if (command_name)
|
||||
fprintf (stream, "%s (%s) %s\n", command_name, package, version);
|
||||
else
|
||||
fprintf (stream, "%s %s\n", package, version);
|
||||
fprintf (stream, _("Written by %s.\n"), authors);
|
||||
putc ('\n', stream);
|
||||
|
||||
fputs (_(version_etc_copyright), stream);
|
||||
putc ('\n', stream);
|
||||
|
||||
fputs (_("\
|
||||
This is free software; see the source for copying conditions. There is NO\n\
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"),
|
||||
stream);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
/* Utility to help print --version output in a consistent format.
|
||||
Copyright (C) 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 Jim Meyering. */
|
||||
|
||||
#ifndef VERSION_ETC_H
|
||||
# define VERSION_ETC_H 1
|
||||
|
||||
@@ -9,9 +28,11 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
extern char *version_etc_copyright;
|
||||
|
||||
void
|
||||
version_etc PARAMS ((FILE *stream,
|
||||
const char *command_name, const char *package,
|
||||
const char *version, const char *authors));
|
||||
const char *command_name, const char *package,
|
||||
const char *version, const char *authors));
|
||||
|
||||
#endif /* VERSION_ETC_H */
|
||||
|
||||
45
lib/xalloc.h
45
lib/xalloc.h
@@ -26,6 +26,16 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef __attribute__
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
|
||||
# define __attribute__(x)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef ATTRIBUTE_NORETURN
|
||||
# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||
# endif
|
||||
|
||||
/* Exit value when the requested amount of memory is not available.
|
||||
It is initialized to EXIT_FAILURE, but the caller may set it to
|
||||
some other value. */
|
||||
@@ -33,20 +43,45 @@ extern int xalloc_exit_failure;
|
||||
|
||||
/* If this pointer is non-zero, run the specified function upon each
|
||||
allocation failure. It is initialized to zero. */
|
||||
extern void (*xalloc_fail_func) ();
|
||||
extern void (*xalloc_fail_func) PARAMS ((void));
|
||||
|
||||
/* If XALLOC_FAIL_FUNC is undefined or a function that returns, this
|
||||
message must be non-NULL. It is translated via gettext.
|
||||
The default value is "Memory exhausted". */
|
||||
extern char *const xalloc_msg_memory_exhausted;
|
||||
|
||||
/* This function is always triggered when memory is exhausted. It is
|
||||
in charge of honoring the three previous items. This is the
|
||||
function to call when one wants the program to die because of a
|
||||
memory allocation failure. */
|
||||
extern void xalloc_die PARAMS ((void)) ATTRIBUTE_NORETURN;
|
||||
|
||||
void *xmalloc PARAMS ((size_t n));
|
||||
void *xcalloc PARAMS ((size_t n, size_t s));
|
||||
void *xrealloc PARAMS ((void *p, size_t n));
|
||||
char *xstrdup PARAMS ((const char *str));
|
||||
|
||||
# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items)))
|
||||
# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items)))
|
||||
# define XREALLOC(Ptr, Type, N_items) \
|
||||
((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items)))
|
||||
|
||||
/* Declare and alloc memory for VAR of type TYPE. */
|
||||
# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1)
|
||||
|
||||
/* Free VAR only if non NULL. */
|
||||
# define XFREE(Var) \
|
||||
do { \
|
||||
if (Var) \
|
||||
free (Var); \
|
||||
} while (0)
|
||||
|
||||
/* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */
|
||||
# define CCLONE(Src, Num) \
|
||||
(memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num)))
|
||||
|
||||
/* Return a malloc'ed copy of SRC. */
|
||||
# define CLONE(Src) CCLONE (Src, 1)
|
||||
|
||||
# define XMALLOC(Type, N_bytes) ((Type *) xmalloc (sizeof (Type) * (N_bytes)))
|
||||
# define XCALLOC(Type, N_bytes) ((Type *) xcalloc (sizeof (Type), (N_bytes)))
|
||||
# define XREALLOC(Ptr, Type, N_bytes) \
|
||||
((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_bytes)))
|
||||
|
||||
#endif /* !XALLOC_H_ */
|
||||
|
||||
@@ -59,18 +59,22 @@ you must run the autoconf test for a properly working realloc -- see realloc.m4
|
||||
int xalloc_exit_failure = EXIT_FAILURE;
|
||||
|
||||
/* If non NULL, call this function when memory is exhausted. */
|
||||
void (*xalloc_fail_func) () = 0;
|
||||
void (*xalloc_fail_func) PARAMS ((void)) = 0;
|
||||
|
||||
/* If XALLOC_FAIL_FUNC is NULL, or does return, display this message
|
||||
before exiting when memory is exhausted. Goes through gettext. */
|
||||
char *const xalloc_msg_memory_exhausted = N_("Memory exhausted");
|
||||
|
||||
static void
|
||||
xalloc_fail (void)
|
||||
void
|
||||
xalloc_die (void)
|
||||
{
|
||||
if (xalloc_fail_func)
|
||||
(*xalloc_fail_func) ();
|
||||
error (xalloc_exit_failure, 0, "%s", xalloc_msg_memory_exhausted);
|
||||
error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
|
||||
/* The `noreturn' cannot be given to error, since it may return if
|
||||
its first argument is 0. To help compilers understand the
|
||||
xalloc_die does terminate, call exit. */
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Allocate N bytes of memory dynamically, with error checking. */
|
||||
@@ -82,7 +86,7 @@ xmalloc (size_t n)
|
||||
|
||||
p = malloc (n);
|
||||
if (p == 0)
|
||||
xalloc_fail ();
|
||||
xalloc_die ();
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -95,7 +99,7 @@ xrealloc (void *p, size_t n)
|
||||
{
|
||||
p = realloc (p, n);
|
||||
if (p == 0)
|
||||
xalloc_fail ();
|
||||
xalloc_die ();
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -108,6 +112,6 @@ xcalloc (size_t n, size_t s)
|
||||
|
||||
p = calloc (n, s);
|
||||
if (p == 0)
|
||||
xalloc_fail ();
|
||||
xalloc_die ();
|
||||
return p;
|
||||
}
|
||||
|
||||
66
lib/xstat.in
66
lib/xstat.in
@@ -4,7 +4,7 @@
|
||||
/* Work around the bug in some systems whereby @xstat@ succeeds when
|
||||
given the zero-length file name argument. The @xstat@ from SunOS4.1.4
|
||||
has this bug.
|
||||
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2000 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,58 @@
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
@BEGIN_LSTAT_ONLY@
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# undef S_ISLNK
|
||||
#endif
|
||||
#if !defined(S_ISLNK) && defined(S_IFLNK)
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
#endif
|
||||
|
||||
char *xmalloc ();
|
||||
|
||||
/* lstat works different on Linux and Solaris systems. POSIX (see
|
||||
`pathname resolution' in the glossary) requires that programs like `ls'
|
||||
take into consideration the fact that FILE has a trailing slash when
|
||||
FILE is a symbolic link. On Linux systems, the lstat function already
|
||||
has the desired semantics (in treating `lstat("symlink/",sbuf)' just like
|
||||
`lstat("symlink/.",sbuf)', but on Solaris it does not.
|
||||
|
||||
If FILE has a trailing slash and specifies a symbolic link,
|
||||
then append a `.' to FILE and call lstat a second time. */
|
||||
|
||||
static int
|
||||
slash_aware_lstat (const char *file, struct stat *sbuf)
|
||||
{
|
||||
size_t len;
|
||||
char *new_file;
|
||||
|
||||
int lstat_result = lstat (file, sbuf);
|
||||
|
||||
if (lstat_result != 0 || !S_ISLNK (sbuf->st_mode))
|
||||
return lstat_result;
|
||||
|
||||
len = strlen (file);
|
||||
if (file[len - 1] != '/')
|
||||
return lstat_result;
|
||||
|
||||
/* FILE refers to a symbolic link and the name ends with a slash.
|
||||
Append a `.' to FILE and repeat the lstat call. */
|
||||
|
||||
/* Add one for the `.' we might have to append, and one more
|
||||
for the trailing NUL. */
|
||||
new_file = xmalloc (len + 1 + 1);
|
||||
memcpy (new_file, file, len);
|
||||
new_file[len] = '.';
|
||||
new_file[len + 1] = 0;
|
||||
|
||||
lstat_result = lstat (new_file, sbuf);
|
||||
free (new_file);
|
||||
|
||||
return lstat_result;
|
||||
}
|
||||
@END_LSTAT_ONLY@
|
||||
|
||||
/* This is a wrapper for @xstat@(2).
|
||||
If FILE is the empty string, fail with errno == ENOENT.
|
||||
@@ -38,6 +90,11 @@ extern int errno;
|
||||
This works around the bug in some systems whereby @xstat@ succeeds when
|
||||
given the zero-length file name argument. The @xstat@ from SunOS4.1.4
|
||||
has this bug. */
|
||||
@BEGIN_LSTAT_ONLY@
|
||||
|
||||
/* This function also provides a version of lstat with consistent semantics
|
||||
when FILE specifies a symbolic link and has a trailing slash. */
|
||||
@END_LSTAT_ONLY@
|
||||
|
||||
int
|
||||
rpl_@xstat@ (const char *file, struct stat *sbuf)
|
||||
@@ -48,5 +105,10 @@ rpl_@xstat@ (const char *file, struct stat *sbuf)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return @xstat@ (file, sbuf);
|
||||
@BEGIN_LSTAT_ONLY@
|
||||
return slash_aware_lstat (file, sbuf);
|
||||
@END_LSTAT_ONLY@
|
||||
@BEGIN_STAT_ONLY@
|
||||
return stat (file, sbuf);
|
||||
@END_STAT_ONLY@
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* xstrtod.c - error-checking interface to strtod
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1999, 2000 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
|
||||
@@ -32,6 +32,11 @@ double strtod ();
|
||||
#include <limits.h>
|
||||
#include "xstrtod.h"
|
||||
|
||||
/* Tell the compiler that non-default rounding modes are used. */
|
||||
#if 199901 <= __STDC_VERSION__
|
||||
#pragma STDC FENV_ACCESS ON
|
||||
#endif
|
||||
|
||||
/* An interface to strtod that encapsulates all the error checking
|
||||
one should usually perform. Like strtod, but upon successful
|
||||
conversion put the result in *RESULT and return zero. Return
|
||||
@@ -68,4 +73,3 @@ xstrtod (str, ptr, result)
|
||||
*result = val;
|
||||
return fail;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* A more useful interface to strtol.
|
||||
Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1998-2000 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,6 +21,12 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef __strtol
|
||||
# define __strtol strtol
|
||||
# define __strtol_t long int
|
||||
# define __xstrtol xstrtol
|
||||
#endif
|
||||
|
||||
/* Some pre-ANSI implementations (e.g. SunOS 4)
|
||||
need stderr defined if assertion checking is enabled. */
|
||||
#include <stdio.h>
|
||||
@@ -39,6 +45,7 @@
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
@@ -61,34 +68,32 @@ extern int errno;
|
||||
? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0))
|
||||
#define TYPE_MAXIMUM(t) (~ (t) 0 - TYPE_MINIMUM (t))
|
||||
|
||||
#ifndef ULONG_MAX
|
||||
# define ULONG_MAX TYPE_MAXIMUM (unsigned long int)
|
||||
#endif
|
||||
|
||||
#ifndef LONG_MAX
|
||||
# define LONG_MAX TYPE_MAXIMUM (long int)
|
||||
#endif
|
||||
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
# define IN_CTYPE_DOMAIN(c) 1
|
||||
#else
|
||||
# define IN_CTYPE_DOMAIN(c) isascii(c)
|
||||
#endif
|
||||
|
||||
#ifdef isblank
|
||||
# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c))
|
||||
#else
|
||||
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
|
||||
#endif
|
||||
#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
|
||||
|
||||
#include "xstrtol.h"
|
||||
|
||||
__unsigned long int __strtol ();
|
||||
#ifndef strtol
|
||||
long int strtol ();
|
||||
#endif
|
||||
|
||||
#ifndef strtoul
|
||||
unsigned long int strtoul ();
|
||||
#endif
|
||||
|
||||
#ifndef strtoumax
|
||||
uintmax_t strtoumax ();
|
||||
#endif
|
||||
|
||||
static int
|
||||
bkm_scale (__unsigned long int *x, int scale_factor)
|
||||
bkm_scale (__strtol_t *x, int scale_factor)
|
||||
{
|
||||
__unsigned long int product = *x * scale_factor;
|
||||
__strtol_t product = *x * scale_factor;
|
||||
if (*x != product / scale_factor)
|
||||
return 1;
|
||||
*x = product;
|
||||
@@ -96,7 +101,7 @@ bkm_scale (__unsigned long int *x, int scale_factor)
|
||||
}
|
||||
|
||||
static int
|
||||
bkm_scale_by_power (__unsigned long int *x, int base, int power)
|
||||
bkm_scale_by_power (__strtol_t *x, int base, int power)
|
||||
{
|
||||
while (power--)
|
||||
if (bkm_scale (x, base))
|
||||
@@ -109,27 +114,24 @@ bkm_scale_by_power (__unsigned long int *x, int base, int power)
|
||||
|
||||
strtol_error
|
||||
__xstrtol (const char *s, char **ptr, int strtol_base,
|
||||
__unsigned long int *val, const char *valid_suffixes)
|
||||
__strtol_t *val, const char *valid_suffixes)
|
||||
{
|
||||
char *t_ptr;
|
||||
char **p;
|
||||
__unsigned long int tmp;
|
||||
__strtol_t tmp;
|
||||
|
||||
assert (0 <= strtol_base && strtol_base <= 36);
|
||||
|
||||
p = (ptr ? ptr : &t_ptr);
|
||||
|
||||
#if STRING_TO_UNSIGNED
|
||||
{
|
||||
const char *q = s;
|
||||
while (ISBLANK (*q))
|
||||
{
|
||||
if (! TYPE_SIGNED (__strtol_t))
|
||||
{
|
||||
const char *q = s;
|
||||
while (ISSPACE ((unsigned char) *q))
|
||||
++q;
|
||||
}
|
||||
if (*q == '-')
|
||||
return LONGINT_INVALID;
|
||||
}
|
||||
#endif
|
||||
if (*q == '-')
|
||||
return LONGINT_INVALID;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
tmp = __strtol (s, p, strtol_base);
|
||||
@@ -139,8 +141,8 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
|
||||
return LONGINT_INVALID;
|
||||
|
||||
/* Let valid_suffixes == NULL mean `allow any suffix'. */
|
||||
/* FIXME: update all callers except the one in tail.c changing
|
||||
last parameter NULL to `""'. */
|
||||
/* FIXME: update all callers except the ones that allow suffixes
|
||||
after the number, changing last parameter NULL to `""'. */
|
||||
if (!valid_suffixes)
|
||||
{
|
||||
*val = tmp;
|
||||
@@ -154,7 +156,10 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
|
||||
int overflow;
|
||||
|
||||
if (!strchr (valid_suffixes, **p))
|
||||
return LONGINT_INVALID_SUFFIX_CHAR;
|
||||
{
|
||||
*val = tmp;
|
||||
return LONGINT_INVALID_SUFFIX_CHAR;
|
||||
}
|
||||
|
||||
if (strchr (valid_suffixes, '0'))
|
||||
{
|
||||
@@ -227,6 +232,7 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
|
||||
break;
|
||||
|
||||
default:
|
||||
*val = tmp;
|
||||
return LONGINT_INVALID_SUFFIX_CHAR;
|
||||
break;
|
||||
}
|
||||
@@ -258,7 +264,7 @@ main (int argc, char** argv)
|
||||
for (i=1; i<argc; i++)
|
||||
{
|
||||
char *p;
|
||||
__unsigned long int val;
|
||||
__strtol_t val;
|
||||
|
||||
s_err = __xstrtol (argv[i], &p, 0, &val, "bckmw");
|
||||
if (s_err == LONGINT_OK)
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
#ifndef XSTRTOL_H_
|
||||
# define XSTRTOL_H_ 1
|
||||
|
||||
# if STRING_TO_UNSIGNED
|
||||
# define __xstrtol xstrtoul
|
||||
# define __strtol strtoul
|
||||
# define __unsigned unsigned
|
||||
# else
|
||||
# define __xstrtol xstrtol
|
||||
# define __strtol strtol
|
||||
# define __unsigned /* empty */
|
||||
# if HAVE_INTTYPES_H
|
||||
# include <inttypes.h> /* for uintmax_t */
|
||||
# endif
|
||||
|
||||
# ifndef PARAMS
|
||||
@@ -27,11 +21,14 @@ enum strtol_error
|
||||
typedef enum strtol_error strtol_error;
|
||||
# endif
|
||||
|
||||
strtol_error
|
||||
__xstrtol PARAMS ((const char *s, char **ptr, int base,
|
||||
__unsigned long int *val, const char *valid_suffixes));
|
||||
# define _DECLARE_XSTRTOL(name, type) \
|
||||
strtol_error \
|
||||
name PARAMS ((const char *s, char **ptr, int base, \
|
||||
type *val, const char *valid_suffixes));
|
||||
_DECLARE_XSTRTOL (xstrtol, long int)
|
||||
_DECLARE_XSTRTOL (xstrtoul, unsigned long int)
|
||||
_DECLARE_XSTRTOL (xstrtoumax, uintmax_t)
|
||||
|
||||
# undef _STRTOL_ERROR
|
||||
# define _STRTOL_ERROR(Exit_code, Str, Argument_type_string, Err) \
|
||||
do \
|
||||
{ \
|
||||
@@ -51,8 +48,7 @@ strtol_error
|
||||
break; \
|
||||
\
|
||||
case LONGINT_OVERFLOW: \
|
||||
/* FIXME: make this message dependent on STRING_TO_UNSIGNED */\
|
||||
error ((Exit_code), 0, "%s `%s' larger than maximum long int",\
|
||||
error ((Exit_code), 0, "%s `%s' too large", \
|
||||
(Argument_type_string), (Str)); \
|
||||
break; \
|
||||
} \
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
#define STRING_TO_UNSIGNED 1
|
||||
#define __strtol strtoul
|
||||
#define __strtol_t unsigned long int
|
||||
#define __xstrtol xstrtoul
|
||||
#include "xstrtol.c"
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef XSTRTOUL_H_
|
||||
# define XSTRTOUL_H_ 1
|
||||
|
||||
# define STRING_TO_UNSIGNED 1
|
||||
|
||||
/* Undefine this symbol so we can include xstrtol.h a second time.
|
||||
Otherwise, a program that wanted both xstrtol.h and xstrtoul.h
|
||||
would never get the declaration corresponding to the header file
|
||||
included after the first one. */
|
||||
# undef XSTRTOL_H_
|
||||
# include "xstrtol.h"
|
||||
|
||||
#endif /* not XSTRTOUL_H_ */
|
||||
31
lib/xstrtoumax.c
Normal file
31
lib/xstrtoumax.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/* xstrtoumax.c -- A more useful interface to strtoumax.
|
||||
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
|
||||
|
||||
#define __strtol strtoumax
|
||||
#define __strtol_t uintmax_t
|
||||
#define __xstrtol xstrtoumax
|
||||
#include "xstrtol.c"
|
||||
383
m4/ChangeLog
383
m4/ChangeLog
@@ -1,3 +1,382 @@
|
||||
2000-01-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* lib-check.m4: Clean up some kludgy old shadow password tests.
|
||||
|
||||
* prereq.m4 (utmp_includes): Define.
|
||||
Check for ut_user and ut_name members in both struct utmpx
|
||||
and struct utmp.
|
||||
|
||||
2000-01-29 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* lib-check.m4: New file containing library-related checks from
|
||||
fileutils and sh-utils (textutils had none).
|
||||
|
||||
2000-01-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* perl.m4: Change format of warning message to look more like that
|
||||
from the missing script. Suggestion from François Pinard.
|
||||
|
||||
2000-01-25 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as well
|
||||
as time.h in the compile check.
|
||||
* nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
|
||||
Fix typo in cross-compiling case: s/yes/no/.
|
||||
|
||||
2000-01-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4: Move df-related tests here from fileutils/configure.in
|
||||
|
||||
* ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
|
||||
(jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
|
||||
|
||||
* fsusage.m4: New file. Extracted from fileutils/configure.in.
|
||||
s/space/ac_fsusage_space/.
|
||||
(jm_FILE_SYSTEM_USAGE): Take two parameters.
|
||||
|
||||
* ftruncate.m4: New file (derived from part of fileutils/configure.in).
|
||||
* jm-macros.m4: (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
|
||||
(jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
|
||||
|
||||
* jm-macros.m4: (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
|
||||
AC_SUBST these here, rather than just in sh-util/configure.in, so
|
||||
that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
|
||||
all the same.
|
||||
(AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
|
||||
(AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
|
||||
(AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
|
||||
(AC_SUBST(POW_LIBM)): Likewise.
|
||||
(AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
|
||||
|
||||
2000-01-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
|
||||
|
||||
* prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
|
||||
|
||||
* jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
|
||||
configure.in
|
||||
(AC_CHECK_HEADERS): Likewise for sh-utils.
|
||||
(AC_CHECK_HEADERS): Likewise for textutils.
|
||||
Merge the three lists of headers.
|
||||
|
||||
* prereq.m4 (jm_PREREQ_ADDEXT): New macro. Parts moved here
|
||||
from fileutils' configure.in.
|
||||
|
||||
* decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)' code.
|
||||
Moved tests into their own function (_jm_DECL_HEADERS) in check-decl.m4.
|
||||
|
||||
* check-decl.m4: Use #if rather than #ifdef.
|
||||
Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
|
||||
(jm_CHECK_DECLARATIONS): Add strtoul strtoull.
|
||||
(_jm_DECL_HEADERS): Define new function.
|
||||
(jm_CHECK_DECLARATIONS): Require it.
|
||||
|
||||
2000-01-19 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
|
||||
Use AC_HEADER_TIME. Volker Borchert reported that OpenBSD-2.3/sparc
|
||||
defines `struct timespec' in <sys/time.h>
|
||||
|
||||
* c-bs-a.m4: Remove uses of changequote altogether.
|
||||
Thanks to Akim for explaining.
|
||||
|
||||
2000-01-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
|
||||
AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
|
||||
jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
|
||||
AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
|
||||
|
||||
2000-01-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
|
||||
because the latter didn't work.
|
||||
|
||||
2000-01-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
|
||||
(AC_REPLACE_FUNCS): Add memcpy and memset.
|
||||
Add these, too: stime strcspn stpcpy strstr strtol strtoul.
|
||||
Add strpbrk.
|
||||
Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
|
||||
|
||||
2000-01-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
|
||||
(jm_PREREQ): Use it.
|
||||
(jm_PREREQ_READUTMP): New macro.
|
||||
(jm_PREREQ): Use it.
|
||||
|
||||
2000-01-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Quote multibyte characters correctly.
|
||||
* m4/c-bs-a.m4: New file.
|
||||
* m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
|
||||
(jm_PREREQ): Use it.
|
||||
|
||||
2000-01-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/uintmax_t.m4: Port to autoconf 2.13.
|
||||
|
||||
2000-01-08 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
|
||||
* jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
|
||||
|
||||
2000-01-04 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
|
||||
jm_STRUCT_DIRENT_D_TYPE.
|
||||
* d-ino.m4: (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
|
||||
jm_STRUCT_DIRENT_D_INO.
|
||||
* utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
|
||||
jm_STRUCT_UTIMBUF.
|
||||
* jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/ renamings.
|
||||
* utime.m4: Likewise.
|
||||
|
||||
* timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
|
||||
* jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
|
||||
|
||||
2000-01-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
|
||||
(for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
|
||||
|
||||
2000-01-02 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* search-libs.m4: Escape `$' in $3 of dnl comment. I no longer
|
||||
remember if this is necessary.
|
||||
|
||||
1999-12-26 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: Use it here.
|
||||
* nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
|
||||
|
||||
1999-12-23 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: Check for clock_gettime (moved from
|
||||
fileutils/configure.in)
|
||||
Check for gettimeofday.
|
||||
|
||||
1999-12-20 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* strftime.m4: Remove kludge, now that I'm using the fixed
|
||||
autoconf-2.14a-1999-12-20.
|
||||
|
||||
1999-12-19 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* lstat-slash.m4: New file.
|
||||
* jm-macros.m4: Use the new macro:
|
||||
jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
|
||||
|
||||
1999-12-07 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* perl.m4: Require that File::Compare be available, too.
|
||||
Too many systems seem to lack it.
|
||||
|
||||
* strftime.m4: Add checks for most of the cpp macros tested in
|
||||
GNU's strftime.c. Prompted by a patch from Paul Eggert.
|
||||
|
||||
1999-11-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
|
||||
problem with the QNX 4.25 shell, which doesn't propagate exit
|
||||
status of failed commands inside shell assignments.
|
||||
|
||||
1999-11-17 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
|
||||
|
||||
1999-11-07 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
|
||||
|
||||
1999-11-06 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
|
||||
* jm-macros.m4 (jm_MACROS): Use it here.
|
||||
|
||||
1999-11-05 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from configure.in
|
||||
of textutils, fileutils, and sh-utils into this one (shared between
|
||||
those packages) file.
|
||||
Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
|
||||
AC_STRUCT_ST_BLKSIZE.
|
||||
|
||||
1999-11-03 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* ssize_t.m4: Remove file. No longer needed since the new version of
|
||||
AC_CHECK_TYPE checks includes unistd.h.
|
||||
* jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
|
||||
Suggestion from Akim Demaille.
|
||||
|
||||
1999-10-30 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* uintmax_t.m4: Require 2.14a. Remove backslash before backtick in
|
||||
m4-quoted string.
|
||||
* ls-mntd-fs.m4: Likewise.
|
||||
* jm-macros.m4: Likewise. Also, use AC_TYPE_SSIZE_T instead
|
||||
* jm-winsz1.m4: Likewise.
|
||||
|
||||
* const.m4: Remove file, since the fix made it into the experimental
|
||||
version of autoconf.
|
||||
* mktime.m4: Likewise.
|
||||
|
||||
* check-type.m4: Remove file, now that the latest version of
|
||||
AC_CHECK_TYPE takes a third arg to specify additional #includes.
|
||||
|
||||
* ssize_t.m4: New file, requires experimental version of autoconf.
|
||||
* jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
|
||||
AC_CHECK_TYPE.
|
||||
|
||||
1999-10-04 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: Don't require autoconf-2.14.1.
|
||||
|
||||
1999-09-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
|
||||
2.95.1 bug with HP-UX 10.20.
|
||||
|
||||
1999-09-17 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
|
||||
Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
|
||||
due to missing strdup (against sh-utils-2.0).
|
||||
|
||||
1999-08-29 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: Require jm_BISON.
|
||||
* bison.m4: New file.
|
||||
|
||||
1999-08-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
|
||||
in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
|
||||
|
||||
1999-08-05 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* getline.m4: Rename test file from conftestdata to conftest.data
|
||||
to avoid conflicts with `conftest' on 8+3 filesystems.
|
||||
Suggestion from Eli Zaretskii.
|
||||
|
||||
1999-08-04 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: Move a 4-line block of code from the configure.in of
|
||||
fileutils and sh-utils (textutils's getline test was inadequate).
|
||||
(AM_FUNC_GETLINE): Run this test.
|
||||
(AC_CHECK_FUNCS): Check for getdelim.
|
||||
Reported by Bob Proulx.
|
||||
|
||||
1999-08-02 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: Add a comment.
|
||||
|
||||
1999-08-01 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from m4.
|
||||
|
||||
1999-08-01 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lfs.m4: Remove this file.
|
||||
* largefile.m4: New file. It contains the old contents of
|
||||
lfs.m4, except that all names with prefix AC_LFS have been
|
||||
changed to use the prefix AC_SYS_LARGEFILE instead, to be
|
||||
compatible with future autoconf versions. Also, some minor m4
|
||||
quoting problems have been fixed.
|
||||
|
||||
1999-07-16 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
|
||||
that we can shift, multiply and divide unsigned long long
|
||||
values; Ultrix cc can't do it.
|
||||
|
||||
1999-07-14 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
|
||||
<inttypes.h> defines strtoumax as a macro (and not as a
|
||||
function).
|
||||
|
||||
1999-07-05 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
|
||||
Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
|
||||
(AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
|
||||
and simplify the shell code.
|
||||
|
||||
1999-07-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* mktime.m4: New file, which is a preview of what should appear
|
||||
in the next public autoconf release.
|
||||
|
||||
1999-07-20 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
|
||||
|
||||
1999-07-15 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: (AC_CHECK_FUNCS): Check for getpagesize.
|
||||
|
||||
1999-05-22 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
|
||||
|
||||
1999-05-20 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
|
||||
Add a colon after each `then' in case $4 is empty.
|
||||
|
||||
1999-05-16 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
|
||||
|
||||
1999-05-10 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
|
||||
|
||||
* jm-macros.m4: Require 2.14.1, since we use newly-renamed
|
||||
AC_FUNC_MKTIME.
|
||||
|
||||
1999-05-10 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||
|
||||
* jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
|
||||
|
||||
1999-05-04 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
|
||||
not CPPFLAGS, so that linking works correctly in IRIX.
|
||||
|
||||
1999-04-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
|
||||
|
||||
1999-04-20 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
|
||||
AC_REPLACE xstroull if necessary. From Paul Eggert.
|
||||
(AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
|
||||
|
||||
1999-04-20 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
|
||||
long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
|
||||
jm_AC_TYPE_UNSIGNED_LONG_LONG.
|
||||
* ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
|
||||
|
||||
* lfs.m4: Port to AIX and HP-UX. Support cross-compilation.
|
||||
|
||||
1999-04-18 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
|
||||
* jm-macros.m4: Use it.
|
||||
|
||||
1999-04-06 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* strftime.m4: Remove test for %f.
|
||||
|
||||
1999-03-29 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
|
||||
@@ -39,7 +418,7 @@
|
||||
* group-member.m4: New file -- extracted from sh-utils' configure.in.
|
||||
|
||||
1999-02-05 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
* m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
|
||||
* gettext.m4: Support DOS-style d:/foo/bar absolute file names.
|
||||
|
||||
1999-02-06 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
@@ -388,7 +767,7 @@
|
||||
Add lseek and memchr.
|
||||
|
||||
* decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
|
||||
T.E.Dickey <dickey@clark.net> said that some older preprocessors
|
||||
T.E.Dickey <dickey@clark.net> said that some older preprocessors
|
||||
have a 20-character limit on names.
|
||||
|
||||
1997-11-30 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
@@ -4,16 +4,18 @@
|
||||
EXTRA_DIST = README Makefile.am.in \
|
||||
afs.m4 \
|
||||
assert.m4 \
|
||||
bison.m4 \
|
||||
c-bs-a.m4 \
|
||||
check-decl.m4 \
|
||||
check-type.m4 \
|
||||
chown.m4 \
|
||||
const.m4 \
|
||||
d-ino.m4 \
|
||||
d-type.m4 \
|
||||
decl.m4 \
|
||||
error.m4 \
|
||||
fnmatch.m4 \
|
||||
fstypename.m4 \
|
||||
fsusage.m4 \
|
||||
ftruncate.m4 \
|
||||
getgroups.m4 \
|
||||
getline.m4 \
|
||||
getloadavg.m4 \
|
||||
@@ -27,13 +29,17 @@ jm-macros.m4 \
|
||||
jm-mktime.m4 \
|
||||
jm-winsz1.m4 \
|
||||
jm-winsz2.m4 \
|
||||
largefile.m4 \
|
||||
lchown.m4 \
|
||||
lcmessage.m4 \
|
||||
lfs.m4 \
|
||||
lib-check.m4 \
|
||||
link-follow.m4 \
|
||||
ls-mntd-fs.m4 \
|
||||
lstat-slash.m4 \
|
||||
lstat.m4 \
|
||||
malloc.m4 \
|
||||
memcmp.m4 \
|
||||
nanosleep.m4 \
|
||||
perl.m4 \
|
||||
prereq.m4 \
|
||||
progtest.m4 \
|
||||
@@ -41,15 +47,20 @@ putenv.m4 \
|
||||
readdir.m4 \
|
||||
realloc.m4 \
|
||||
regex.m4 \
|
||||
search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
st_mtim.m4 \
|
||||
stat.m4 \
|
||||
strerror_r.m4 \
|
||||
strftime.m4 \
|
||||
timespec.m4 \
|
||||
uintmax_t.m4 \
|
||||
ulonglong.m4 \
|
||||
uptime.m4 \
|
||||
utimbuf.m4 \
|
||||
utime.m4 \
|
||||
utimes.m4
|
||||
utimes.m4 \
|
||||
xstrtoumax.m4
|
||||
##m4-files-end
|
||||
|
||||
Makefile.am: Makefile.am.in
|
||||
|
||||
@@ -57,12 +57,22 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
@@ -76,7 +86,6 @@ INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
@@ -90,27 +99,86 @@ POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
POW_LIBM = @POW_LIBM@
|
||||
RANLIB = @RANLIB@
|
||||
SEQ_LIBM = @SEQ_LIBM@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
|
||||
EXTRA_DIST = README Makefile.am.in afs.m4 assert.m4 check-decl.m4 check-type.m4 chown.m4 const.m4 d-ino.m4 d-type.m4 decl.m4 error.m4 fnmatch.m4 fstypename.m4 getgroups.m4 getline.m4 getloadavg.m4 gettext.m4 glibc.m4 group-member.m4 inttypes_h.m4 isc-posix.m4 jm-glibc-io.m4 jm-macros.m4 jm-mktime.m4 jm-winsz1.m4 jm-winsz2.m4 lchown.m4 lcmessage.m4 lfs.m4 ls-mntd-fs.m4 lstat.m4 malloc.m4 memcmp.m4 perl.m4 prereq.m4 progtest.m4 putenv.m4 readdir.m4 realloc.m4 regex.m4 st_dm_mode.m4 st_mtim.m4 stat.m4 strftime.m4 uintmax_t.m4 uptime.m4 utimbuf.m4 utime.m4 utimes.m4
|
||||
EXTRA_DIST = README Makefile.am.in \
|
||||
afs.m4 \
|
||||
assert.m4 \
|
||||
bison.m4 \
|
||||
c-bs-a.m4 \
|
||||
check-decl.m4 \
|
||||
chown.m4 \
|
||||
d-ino.m4 \
|
||||
d-type.m4 \
|
||||
decl.m4 \
|
||||
error.m4 \
|
||||
fnmatch.m4 \
|
||||
fstypename.m4 \
|
||||
fsusage.m4 \
|
||||
ftruncate.m4 \
|
||||
getgroups.m4 \
|
||||
getline.m4 \
|
||||
getloadavg.m4 \
|
||||
gettext.m4 \
|
||||
glibc.m4 \
|
||||
group-member.m4 \
|
||||
inttypes_h.m4 \
|
||||
isc-posix.m4 \
|
||||
jm-glibc-io.m4 \
|
||||
jm-macros.m4 \
|
||||
jm-mktime.m4 \
|
||||
jm-winsz1.m4 \
|
||||
jm-winsz2.m4 \
|
||||
largefile.m4 \
|
||||
lchown.m4 \
|
||||
lcmessage.m4 \
|
||||
lib-check.m4 \
|
||||
link-follow.m4 \
|
||||
ls-mntd-fs.m4 \
|
||||
lstat-slash.m4 \
|
||||
lstat.m4 \
|
||||
malloc.m4 \
|
||||
memcmp.m4 \
|
||||
nanosleep.m4 \
|
||||
perl.m4 \
|
||||
prereq.m4 \
|
||||
progtest.m4 \
|
||||
putenv.m4 \
|
||||
readdir.m4 \
|
||||
realloc.m4 \
|
||||
regex.m4 \
|
||||
search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
st_mtim.m4 \
|
||||
stat.m4 \
|
||||
strerror_r.m4 \
|
||||
strftime.m4 \
|
||||
timespec.m4 \
|
||||
uintmax_t.m4 \
|
||||
ulonglong.m4 \
|
||||
uptime.m4 \
|
||||
utimbuf.m4 \
|
||||
utime.m4 \
|
||||
utimes.m4 \
|
||||
xstrtoumax.m4
|
||||
|
||||
subdir = m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
DIST_COMMON = README ChangeLog Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
@@ -127,18 +195,11 @@ TAGS:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = m4
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits m4/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
@@ -180,6 +241,7 @@ distclean-generic:
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-rm -f Makefile.in
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
@@ -201,7 +263,7 @@ maintainer-clean: maintainer-clean-am
|
||||
.PHONY: 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 installdirs mostlyclean-generic \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
8
m4/bison.m4
Normal file
8
m4/bison.m4
Normal file
@@ -0,0 +1,8 @@
|
||||
#serial 1
|
||||
|
||||
AC_DEFUN(jm_BISON,
|
||||
[
|
||||
# getdate.y works with bison only.
|
||||
: ${YACC='bison -y'}
|
||||
AC_SUBST(YACC)
|
||||
])
|
||||
23
m4/c-bs-a.m4
Normal file
23
m4/c-bs-a.m4
Normal file
@@ -0,0 +1,23 @@
|
||||
#serial 3
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
AC_DEFUN(AC_C_BACKSLASH_A,
|
||||
[
|
||||
AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
|
||||
[AC_TRY_COMPILE([],
|
||||
[
|
||||
#if '\a' == 'a'
|
||||
syntax error;
|
||||
#endif
|
||||
char buf['\a' == 'a' ? -1 : 1];
|
||||
buf[0] = '\a';
|
||||
return buf[0] != "\a"[0];
|
||||
],
|
||||
ac_cv_c_backslash_a=yes,
|
||||
ac_cv_c_backslash_a=no)])
|
||||
if test $ac_cv_c_backslash_a = yes; then
|
||||
AC_DEFINE(HAVE_C_BACKSLASH_A, 1,
|
||||
[Define if backslash-a works in C strings.])
|
||||
fi
|
||||
])
|
||||
@@ -1,26 +1,27 @@
|
||||
#serial 5
|
||||
#serial 6
|
||||
|
||||
dnl This is just a wrapper function to encapsulate this kludge.
|
||||
dnl Putting it in a separate file like this helps share it between
|
||||
dnl different packages.
|
||||
AC_DEFUN(jm_CHECK_DECLS,
|
||||
[
|
||||
AC_REQUIRE([_jm_DECL_HEADERS])
|
||||
headers='
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STRING_H
|
||||
#if HAVE_STRING_H
|
||||
# if !STDC_HEADERS && HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#else
|
||||
# ifdef HAVE_STRINGS_H
|
||||
# if HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
'
|
||||
@@ -38,8 +39,18 @@ AC_DEFUN(jm_CHECK_DECLS,
|
||||
AC_DEFINE(HAVE_DECL_REALLOC, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_STPCPY, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_STRSTR, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_STRTOUL, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_STRTOULL, 1, [Define if this function is declared.])
|
||||
fi
|
||||
|
||||
jm_CHECK_DECLARATIONS($headers, free lseek malloc \
|
||||
memchr realloc stpcpy strstr)
|
||||
memchr realloc stpcpy strstr strtoul strtoull)
|
||||
])
|
||||
|
||||
dnl FIXME: when autoconf has support for it.
|
||||
dnl This is a little helper so we can require these header checks.
|
||||
AC_DEFUN(_jm_DECL_HEADERS,
|
||||
[
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h)
|
||||
])
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#serial 2
|
||||
|
||||
dnl Just like AC_CHECK_TYPE from autoconf-2.12, but also checks in unistd.h
|
||||
dnl on systems that have it. Fujitsu UXP/V needs this for ssize_t.
|
||||
dnl Now, also uses the three-argument form of AC_DEFINE.
|
||||
|
||||
undefine([AC_CHECK_TYPE])
|
||||
dnl AC_CHECK_TYPE(TYPE, DEFAULT)
|
||||
AC_DEFUN(AC_CHECK_TYPE,
|
||||
[AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_CHECK_HEADERS(unistd.h)
|
||||
AC_MSG_CHECKING(for $1)
|
||||
AC_CACHE_VAL(ac_cv_type_$1,
|
||||
[AC_EGREP_CPP(dnl
|
||||
changequote(<<,>>)dnl
|
||||
<<$1[^a-zA-Z_0-9]>>dnl
|
||||
changequote([,]), [#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
|
||||
AC_MSG_RESULT($ac_cv_type_$1)
|
||||
if test $ac_cv_type_$1 = no; then
|
||||
AC_DEFINE($1, $2,
|
||||
[ Define to \`$2' if certain system header files doesn't define it.])
|
||||
fi
|
||||
])
|
||||
66
m4/const.m4
66
m4/const.m4
@@ -1,66 +0,0 @@
|
||||
#serial 1
|
||||
|
||||
dnl Just like AC_C_CONST from autoconf-2.12, but with an initializer
|
||||
dnl for `charset x' and with
|
||||
dnl AC_DEFINE(const, )
|
||||
dnl changed to
|
||||
dnl AC_DEFINE_UNQUOTED(const, [/* empty */])
|
||||
dnl to avoid this warning:
|
||||
dnl [...]/m4: Warning: Excess arguments to built-in `define' ignored
|
||||
|
||||
undefine([AC_C_CONST])
|
||||
AC_DEFUN(AC_C_CONST,
|
||||
[dnl This message is consistent in form with the other checking messages,
|
||||
dnl and with the result message.
|
||||
AC_CACHE_CHECK([for working const], ac_cv_c_const,
|
||||
[AC_TRY_COMPILE(,
|
||||
changequote(<<, >>)dnl
|
||||
<<
|
||||
/* Ultrix mips cc rejects this. */
|
||||
typedef int charset[2]; const charset x = {0, 0};
|
||||
/* SunOS 4.1.1 cc rejects this. */
|
||||
char const *const *ccp;
|
||||
char **p;
|
||||
/* NEC SVR4.0.2 mips cc rejects this. */
|
||||
struct point {int x, y;};
|
||||
static struct point const zero = {0,0};
|
||||
/* AIX XL C 1.02.0.0 rejects this.
|
||||
It does not let you subtract one const X* pointer from another in an arm
|
||||
of an if-expression whose if-part is not a constant expression */
|
||||
const char *g = "string";
|
||||
ccp = &g + (g ? g-g : 0);
|
||||
/* HPUX 7.0 cc rejects these. */
|
||||
++ccp;
|
||||
p = (char**) ccp;
|
||||
ccp = (char const *const *) p;
|
||||
{ /* SCO 3.2v4 cc rejects this. */
|
||||
char *t;
|
||||
char const *s = 0 ? (char *) 0 : (char const *) 0;
|
||||
|
||||
*t++ = 0;
|
||||
}
|
||||
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
|
||||
int x[] = {25, 17};
|
||||
const int *foo = &x[0];
|
||||
++foo;
|
||||
}
|
||||
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
|
||||
typedef const int *iptr;
|
||||
iptr p = 0;
|
||||
++p;
|
||||
}
|
||||
{ /* AIX XL C 1.02.0.0 rejects this saying
|
||||
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
|
||||
struct s { int j; const int *ap[3]; };
|
||||
struct s *b; b->j = 5;
|
||||
}
|
||||
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
|
||||
const int foo = 10;
|
||||
}
|
||||
>>,
|
||||
changequote([, ])dnl
|
||||
ac_cv_c_const=yes, ac_cv_c_const=no)])
|
||||
if test $ac_cv_c_const = no; then
|
||||
AC_DEFINE_UNQUOTED(const, [/* empty */])
|
||||
fi
|
||||
])
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user