mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-08 18:25:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a4ca91b73 | ||
|
|
f02ecea550 | ||
|
|
5bc2230d3c | ||
|
|
a0a0185e9a | ||
|
|
679eba1067 | ||
|
|
0e96bb2121 | ||
|
|
3c9127d55c | ||
|
|
67d5db69e7 | ||
|
|
a15f4278a3 | ||
|
|
f3b206a9a6 | ||
|
|
b12d2b3054 | ||
|
|
f4b4269b3b | ||
|
|
2185ba74ba | ||
|
|
ec178c6427 | ||
|
|
70bcf94ae8 | ||
|
|
41ee433e39 | ||
|
|
9bd1a920de | ||
|
|
334414e7f8 | ||
|
|
7bbd91208c | ||
|
|
078493afa4 | ||
|
|
897c1dd9a9 | ||
|
|
a6624adaee | ||
|
|
8afe2396ab | ||
|
|
d7be63a140 | ||
|
|
b8fae6b493 | ||
|
|
0d240c12ba | ||
|
|
eda67e575d | ||
|
|
b286091ee2 | ||
|
|
83eda11059 | ||
|
|
d0f19d6f43 | ||
|
|
f443a1eb89 | ||
|
|
4eeb7bc9a2 | ||
|
|
5d08b24fba | ||
|
|
3af141b0e3 | ||
|
|
bae3c8d209 | ||
|
|
6f8dd2075e | ||
|
|
5327d634b3 | ||
|
|
3491db2e44 | ||
|
|
9fef6a2a0b | ||
|
|
fe24ffa45a | ||
|
|
28f490e38d | ||
|
|
48dccdf81a | ||
|
|
039e51a37c | ||
|
|
20b9de21c7 | ||
|
|
26ae304aa6 | ||
|
|
2d0bf7bdd5 | ||
|
|
e1fe241dc8 | ||
|
|
e334b4a99b | ||
|
|
1bb14a172a | ||
|
|
cc20bc3166 | ||
|
|
9cbe3c4878 | ||
|
|
d961d172be | ||
|
|
dbbe1eb433 | ||
|
|
0e25677ee2 | ||
|
|
e89a22bfab | ||
|
|
f5c0dc4880 | ||
|
|
7307a21a45 | ||
|
|
63f7fb275a | ||
|
|
4f55c2577d | ||
|
|
62a21d52ce | ||
|
|
27fb1c24b7 | ||
|
|
281a98c77a | ||
|
|
83ce390155 | ||
|
|
c96ef8e0b9 | ||
|
|
501cc96c68 | ||
|
|
a69417c066 | ||
|
|
d138fdbf19 | ||
|
|
9326268a46 | ||
|
|
88964d04d9 | ||
|
|
e803581008 | ||
|
|
015af8c168 | ||
|
|
3a48f72d7e | ||
|
|
3e0f96bc08 | ||
|
|
ef1a77c2c9 | ||
|
|
2842171a4c | ||
|
|
64fa1ea1b8 | ||
|
|
7700a71572 | ||
|
|
7baed3bf89 | ||
|
|
1710ea3d30 | ||
|
|
12de352a6f | ||
|
|
6fc75bfd3a | ||
|
|
96df91407c | ||
|
|
b30efba0d0 | ||
|
|
fd2d280114 | ||
|
|
68e202f30f | ||
|
|
d7848b138c | ||
|
|
40c6b975e9 | ||
|
|
a5fb3dead0 | ||
|
|
ac5ff6a908 | ||
|
|
0b1cb33137 | ||
|
|
9f3c97f74f | ||
|
|
a99566be67 | ||
|
|
ca66b45a86 | ||
|
|
55601256c2 | ||
|
|
43cc2463d2 | ||
|
|
25a46077de | ||
|
|
62d3162c4c | ||
|
|
3f2f7848cc | ||
|
|
c4267a3d35 | ||
|
|
ae774286e8 | ||
|
|
43f8a3245a | ||
|
|
a22d7bd8d6 | ||
|
|
f36280e16e | ||
|
|
38612b10a3 | ||
|
|
ffc03584ad | ||
|
|
dd3c3f3006 | ||
|
|
f1d93aa21c | ||
|
|
a4f0747a2a | ||
|
|
ca69f83c53 | ||
|
|
b06c1dfb75 | ||
|
|
7525f95ed5 | ||
|
|
1daed0de8a | ||
|
|
32e175835b | ||
|
|
ea04a14c5c | ||
|
|
d6b12c2d8b | ||
|
|
f4ffa313a2 | ||
|
|
1214dfb03b | ||
|
|
55b4181996 | ||
|
|
12a04365ce | ||
|
|
6929a4a0e8 | ||
|
|
07cccc8bc6 | ||
|
|
36791b5576 | ||
|
|
dba44a1367 | ||
|
|
d4593e87be | ||
|
|
6b1ec1fb33 | ||
|
|
bfb74f79b8 | ||
|
|
c520f816b1 | ||
|
|
cc6ed5f7f1 | ||
|
|
ac28f67c0b | ||
|
|
f30e1ab65c | ||
|
|
52e9776027 | ||
|
|
21292982fe | ||
|
|
9f0938ad32 | ||
|
|
cb948818d0 | ||
|
|
c0760f18e0 | ||
|
|
c884affb0b | ||
|
|
f7e7f57941 | ||
|
|
d1210d1d6e | ||
|
|
d5c2eff246 | ||
|
|
b59b91bb6e | ||
|
|
63e75f2e38 | ||
|
|
69dc1147ba | ||
|
|
3d9d5d34ff | ||
|
|
701d80ffa0 | ||
|
|
88f06d2beb | ||
|
|
daa938e7f0 | ||
|
|
ed45e93ed8 | ||
|
|
74d757ab92 | ||
|
|
4be25f1591 | ||
|
|
b7008317cf | ||
|
|
3f66ed1c8b | ||
|
|
58dce15432 | ||
|
|
e6970f2ed0 | ||
|
|
b9866ce4da | ||
|
|
b32ba448c8 | ||
|
|
5844cd0cfa | ||
|
|
0fc1a97d9f | ||
|
|
84b6f48351 | ||
|
|
b6a70d99a6 | ||
|
|
66d35de779 | ||
|
|
5e5b240715 | ||
|
|
aaf7be2c4b | ||
|
|
0ea80316a9 | ||
|
|
09b2117db7 | ||
|
|
78fc5ce865 | ||
|
|
766ffc1523 | ||
|
|
06a2f464b1 | ||
|
|
15ab9127f5 | ||
|
|
32f18df511 | ||
|
|
19f8d30b9c | ||
|
|
7b106ce5f0 | ||
|
|
b5c15946a1 | ||
|
|
980929ba0b | ||
|
|
4c3791f08d | ||
|
|
a8355549a5 | ||
|
|
2883204382 | ||
|
|
825b9e4ef4 | ||
|
|
57339f0421 | ||
|
|
963c0cf62f | ||
|
|
6a1e01f060 | ||
|
|
4cecb5a248 | ||
|
|
76c97f6a39 | ||
|
|
e4ef7aa1c9 | ||
|
|
3557477440 | ||
|
|
4b412c9eca | ||
|
|
fa7f94f217 | ||
|
|
d854cc9e5a | ||
|
|
2dfb4daf9b | ||
|
|
cc904af579 | ||
|
|
716c50b877 | ||
|
|
9f41bcaae8 | ||
|
|
1ccbf4bb8b | ||
|
|
a69f6fa569 | ||
|
|
3757d84e90 | ||
|
|
cac4f75e15 | ||
|
|
fc7ddd2818 | ||
|
|
0ffdf37212 | ||
|
|
9e55edfc29 | ||
|
|
d39a6b7ca9 | ||
|
|
d287d66a69 | ||
|
|
ea451a17d7 | ||
|
|
24b1e65f04 | ||
|
|
7ad28769d6 | ||
|
|
57d4ee2b82 | ||
|
|
d8a9ec00b8 | ||
|
|
872e1b86c4 | ||
|
|
ad4c2c7a57 | ||
|
|
0785dec2c8 | ||
|
|
e1828f4f07 | ||
|
|
a816bf3eac | ||
|
|
2ce6476804 | ||
|
|
457b6d1e72 | ||
|
|
79ebbdb36a | ||
|
|
0aa2ac9063 | ||
|
|
e7d79012ae | ||
|
|
eb4a4d73bc | ||
|
|
dee96b5a07 | ||
|
|
4bfeeafb00 | ||
|
|
c18cf8cb26 | ||
|
|
54b982ae70 | ||
|
|
cf2e198269 | ||
|
|
af4483a0ab | ||
|
|
674fd9acbc | ||
|
|
6fedd4d1d6 | ||
|
|
abe1baa044 | ||
|
|
33285af04d | ||
|
|
cd7f95831e | ||
|
|
1b9a8440cd | ||
|
|
aead559e00 | ||
|
|
92b69b7f09 | ||
|
|
6e303f08d6 | ||
|
|
3dfc01e247 | ||
|
|
1503820f54 | ||
|
|
bc9bb28004 | ||
|
|
16c4a35041 | ||
|
|
f0451dba71 | ||
|
|
a9f37dee0c | ||
|
|
4b0979fcf3 | ||
|
|
cc35239e1b | ||
|
|
2e2cbb3fad | ||
|
|
adb4edee47 | ||
|
|
65490badba | ||
|
|
8b044b8540 | ||
|
|
0704bc9b8e | ||
|
|
2b7c2ef124 | ||
|
|
48e38d301e | ||
|
|
560757768c | ||
|
|
238b8134ec | ||
|
|
483642486d | ||
|
|
146ad4c8d0 | ||
|
|
f2a4c94506 | ||
|
|
65fae038b9 | ||
|
|
e1cb5fb523 | ||
|
|
64fabbb49f | ||
|
|
3b2925a060 | ||
|
|
83bcf86639 | ||
|
|
8639df64a6 | ||
|
|
377bd7c9a2 | ||
|
|
b4a7a230f1 | ||
|
|
c1586e58fe | ||
|
|
50766eee39 | ||
|
|
dc3b81cd67 | ||
|
|
c555896775 | ||
|
|
35f61cb998 | ||
|
|
9291f914de | ||
|
|
ff1581dddb | ||
|
|
4b9170b2c0 | ||
|
|
523a9eafdc | ||
|
|
bcdf932ed9 | ||
|
|
e2aabb3dc6 | ||
|
|
e8ebe4b0c7 | ||
|
|
9043475828 | ||
|
|
d80a86e0b5 | ||
|
|
cfc3acf242 | ||
|
|
93337ac41c | ||
|
|
0d7803637b | ||
|
|
a62c863ec3 | ||
|
|
1e883de90c | ||
|
|
efcff8cd5c | ||
|
|
3e85a00236 | ||
|
|
f85c981ac1 | ||
|
|
5cb10dae3c | ||
|
|
26e1ca45ba | ||
|
|
8888e43b2c | ||
|
|
d9ca2df2aa | ||
|
|
e8def3ff6e | ||
|
|
76e734e5ed | ||
|
|
b8b4a730a0 | ||
|
|
b9d2d2a881 | ||
|
|
78986eff74 | ||
|
|
1393a78454 | ||
|
|
de11686376 | ||
|
|
badfc69c26 | ||
|
|
fb28699f95 | ||
|
|
6b307af66c | ||
|
|
dad56b10d3 | ||
|
|
5f1ff7cd74 | ||
|
|
b6cac93afa | ||
|
|
86d5a1ed5c | ||
|
|
97e9ee3ad5 | ||
|
|
d81e5db73f | ||
|
|
029806c785 | ||
|
|
a2874a4e5d | ||
|
|
d54387b4bc | ||
|
|
a4c22fa4bf | ||
|
|
0d214b93b0 | ||
|
|
3c5d71ca8b | ||
|
|
d61c57b70c | ||
|
|
ea57e0a3c4 | ||
|
|
57c429f305 | ||
|
|
239e5c1a9a | ||
|
|
ae9b5e5a4f | ||
|
|
7ae1c5929e | ||
|
|
1d708336d4 | ||
|
|
705131d1de | ||
|
|
5c2a5a8970 | ||
|
|
6b784f8552 | ||
|
|
32a1edfccd | ||
|
|
63cf44e7ac | ||
|
|
9507085cf3 | ||
|
|
8d3c8c3643 | ||
|
|
16c9da79ef | ||
|
|
d0132d6bec | ||
|
|
1306676ce3 | ||
|
|
e18cda8b5e | ||
|
|
ddf896eb8e | ||
|
|
9aadbdf371 | ||
|
|
f1b769ff28 | ||
|
|
94ff2b9475 | ||
|
|
470d206b2e | ||
|
|
08f0a4e409 | ||
|
|
00fda01856 | ||
|
|
bf31619762 | ||
|
|
31a743b2bb | ||
|
|
48b43d9d83 | ||
|
|
4b9e71f993 | ||
|
|
16cd214585 | ||
|
|
f2c7ab2c1f | ||
|
|
2c377512c2 | ||
|
|
74c3b26d85 | ||
|
|
72ab1d45d2 | ||
|
|
d9302e4b73 | ||
|
|
f1394282f0 | ||
|
|
d8b1af2801 | ||
|
|
445cb4e989 | ||
|
|
f40703a29a | ||
|
|
e348b12ae0 | ||
|
|
ba6f6bf90f | ||
|
|
d9af6cc62f | ||
|
|
ab30845981 | ||
|
|
0b3870c112 | ||
|
|
e92a5d5bae | ||
|
|
02cbcfc577 | ||
|
|
8c67836b58 | ||
|
|
cae30a7df4 | ||
|
|
9fb2ad6738 | ||
|
|
8bce355d7c | ||
|
|
ae7c7ada67 | ||
|
|
9e42f7b625 | ||
|
|
f87fc33f87 | ||
|
|
7ba81a101f | ||
|
|
9190f3e726 | ||
|
|
330de47708 | ||
|
|
bb84601097 | ||
|
|
9a96ccfa20 | ||
|
|
6051d37287 | ||
|
|
2aec1bc1de | ||
|
|
c6e1f6235a | ||
|
|
ab6fbb02ad | ||
|
|
f2632e420f | ||
|
|
19f01e885f | ||
|
|
6792619fa8 |
@@ -113,6 +113,13 @@ But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
||||
language and `CC' denoting the country, is the one use on systems based
|
||||
on GNU libc. On other systems, some variations of this scheme are
|
||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
||||
locales supported by your system for your country by running the command
|
||||
`locale -a | grep '^LL''.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
@@ -164,124 +171,193 @@ Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of July
|
||||
2001. The matrix shows, in regard of each package, for which languages
|
||||
matrix shows the current state of internationalization, as of March
|
||||
2002. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files bg cs da de el en eo es et fi fr gl he hr id it
|
||||
+-------------------------------------------------+
|
||||
a2ps | [] [] |
|
||||
bash | [] [] [] [] |
|
||||
bfd | |
|
||||
binutils | |
|
||||
bison | [] [] [] [] |
|
||||
clisp | [] [] [] [] |
|
||||
cpio | [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] |
|
||||
fetchmail | |
|
||||
fileutils | [] [] [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] [] |
|
||||
flex | [] [] [] |
|
||||
freetype | |
|
||||
gas | |
|
||||
gawk | [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext | [] [] [] [] [] [] [] [] [] |
|
||||
gnupg | [] [] [] [] [] [] |
|
||||
gprof | |
|
||||
grep | [] [] [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] [] |
|
||||
jpilot | [] |
|
||||
kbd | |
|
||||
ld | |
|
||||
libc | [] [] [] [] [] [] [] [] |
|
||||
lilypond | |
|
||||
lynx | [] [] [] |
|
||||
m4 | [] [] [] [] [] [] [] |
|
||||
make | [] [] [] [] [] |
|
||||
nano | [] [] |
|
||||
opcodes | |
|
||||
parted | [] [] |
|
||||
ptx | [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] [] |
|
||||
soundtracker | [] |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] [] |
|
||||
textutils | [] [] [] [] [] [] [] |
|
||||
util-linux | [] [] |
|
||||
wdiff | [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] [] |
|
||||
+-------------------------------------------------+
|
||||
bg cs da de el en eo es et fi fr gl he hr id it
|
||||
0 13 23 30 11 1 8 21 13 1 29 22 3 0 8 10
|
||||
Ready PO files bg ca cs da de el en eo es et fi fr
|
||||
+-------------------------------------+
|
||||
a2ps | [] [] [] [] |
|
||||
bash | [] [] [] [] |
|
||||
bfd | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] |
|
||||
clisp | [] [] [] [] |
|
||||
cpio | [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] |
|
||||
fetchmail | () [] [] [] () |
|
||||
fileutils | [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] |
|
||||
flex | [] [] [] [] |
|
||||
gas | [] [] |
|
||||
gawk | [] [] |
|
||||
gcal | [] [] |
|
||||
gcc | [] [] |
|
||||
gettext | [] [] [] [] [] |
|
||||
gnupg | [] [] [] [] [] [] |
|
||||
gprof | [] [] |
|
||||
grep | [] [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] [] |
|
||||
jpilot | () [] [] [] |
|
||||
jwhois | [] [] |
|
||||
kbd | [] [] |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] [] [] |
|
||||
lilypond | [] [] |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
mysecretdiary | [] [] |
|
||||
nano | [] () [] [] [] [] |
|
||||
nano_1_0 | [] () [] [] [] [] |
|
||||
opcodes | [] [] [] |
|
||||
parted | [] [] [] [] |
|
||||
ptx | [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] |
|
||||
sketch | () [] () |
|
||||
soundtracker | [] [] [] |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] [] |
|
||||
textutils | [] [] [] [] [] |
|
||||
util-linux | [] [] [] [] |
|
||||
vorbis-tools | |
|
||||
wdiff | [] [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] |
|
||||
+-------------------------------------+
|
||||
bg ca cs da de el en eo es et fi fr
|
||||
1 12 11 31 36 9 1 8 39 15 1 50
|
||||
|
||||
ja ko lv nl no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
+-------------------------------------------------+
|
||||
a2ps | [] [] [] | 5
|
||||
bash | | 4
|
||||
bfd | | 0
|
||||
binutils | | 0
|
||||
bison | [] [] [] | 7
|
||||
clisp | [] | 5
|
||||
cpio | [] [] [] [] [] | 10
|
||||
diffutils | [] [] [] | 10
|
||||
enscript | [] [] [] | 5
|
||||
error | [] | 3
|
||||
fetchmail | | 0
|
||||
fileutils | [] [] [] [] [] [] [] [] [] [] | 17
|
||||
findutils | [] [] [] [] [] [] [] [] | 16
|
||||
flex | [] [] [] | 6
|
||||
freetype | | 0
|
||||
gas | | 0
|
||||
gawk | [] | 2
|
||||
gcal | | 0
|
||||
gcc | | 0
|
||||
gettext | [] [] [] [] [] [] [] [] [] | 18
|
||||
gnupg | [] [] [] [] | 10
|
||||
gprof | | 0
|
||||
grep | [] [] [] | 10
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 21
|
||||
id-utils | [] [] [] | 6
|
||||
indent | [] [] [] [] [] [] [] | 12
|
||||
jpilot | | 1
|
||||
kbd | [] | 1
|
||||
ld | | 0
|
||||
libc | [] [] [] [] [] [] [] [] [] | 17
|
||||
lilypond | [] [] | 2
|
||||
lynx | [] [] [] [] [] | 8
|
||||
m4 | [] [] [] [] [] | 12
|
||||
make | [] [] [] [] [] [] [] | 12
|
||||
nano | [] | 3
|
||||
opcodes | | 0
|
||||
parted | [] [] [] | 5
|
||||
ptx | [] [] [] [] [] [] [] | 14
|
||||
python | | 0
|
||||
recode | [] [] [] [] | 13
|
||||
sed | [] [] [] [] [] [] [] [] | 18
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 20
|
||||
sharutils | [] [] [] [] | 11
|
||||
soundtracker | | 1
|
||||
sp | | 0
|
||||
tar | [] [] [] [] [] [] [] [] [] | 17
|
||||
texinfo | [] [] | 7
|
||||
textutils | [] [] [] [] [] [] [] [] | 15
|
||||
util-linux | [] [] | 4
|
||||
wdiff | [] [] [] | 5
|
||||
wget | [] [] [] [] [] [] [] | 16
|
||||
+-------------------------------------------------+
|
||||
31 teams ja ko lv nl no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
51 domains 17 9 1 23 6 17 1 13 26 9 11 20 19 2 2 369
|
||||
gl he hr hu id it ja ko lv nb nl nn
|
||||
+-------------------------------------+
|
||||
a2ps | () () [] |
|
||||
bash | |
|
||||
bfd | [] |
|
||||
binutils | [] |
|
||||
bison | [] [] |
|
||||
clisp | [] |
|
||||
cpio | [] [] [] |
|
||||
diffutils | [] [] [] |
|
||||
enscript | [] |
|
||||
error | [] |
|
||||
fetchmail | |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] [] [] [] [] |
|
||||
flex | [] |
|
||||
gas | |
|
||||
gawk | [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext | [] |
|
||||
gnupg | [] [] [] |
|
||||
gprof | |
|
||||
grep | [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] |
|
||||
indent | [] [] [] |
|
||||
jpilot | () () |
|
||||
jwhois | |
|
||||
kbd | |
|
||||
ld | |
|
||||
libc | [] [] [] [] |
|
||||
lilypond | [] [] |
|
||||
lynx | [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
mysecretdiary | |
|
||||
nano | [] [] [] () [] () [] |
|
||||
nano_1_0 | [] [] [] () [] () [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] |
|
||||
sharutils | [] [] [] |
|
||||
sketch | () |
|
||||
soundtracker | [] |
|
||||
sp | |
|
||||
tar | [] [] [] |
|
||||
texinfo | [] [] |
|
||||
textutils | [] [] |
|
||||
util-linux | () [] |
|
||||
vorbis-tools | |
|
||||
wdiff | |
|
||||
wget | [] [] [] [] [] |
|
||||
+-------------------------------------+
|
||||
gl he hr hu id it ja ko lv nb nl nn
|
||||
19 7 0 4 6 11 22 9 1 8 19 4
|
||||
|
||||
no pl pt pt_BR ru sk sl sv tr uk zh_TW
|
||||
+----------------------------------------+
|
||||
a2ps | () () () [] [] [] () | 8
|
||||
bash | | 4
|
||||
bfd | [] [] | 5
|
||||
binutils | [] | 4
|
||||
bison | [] [] [] | 8
|
||||
clisp | | 5
|
||||
cpio | [] [] [] [] | 11
|
||||
diffutils | [] [] [] [] [] | 14
|
||||
enscript | [] [] [] | 6
|
||||
error | [] [] [] | 6
|
||||
fetchmail | () () [] | 4
|
||||
fileutils | [] [] [] [] | 12
|
||||
findutils | [] [] [] [] [] [] [] | 18
|
||||
flex | [] [] [] | 8
|
||||
gas | [] | 3
|
||||
gawk | [] [] | 5
|
||||
gcal | [] [] | 4
|
||||
gcc | [] | 3
|
||||
gettext | [] [] [] [] | 10
|
||||
gnupg | [] [] [] | 12
|
||||
gprof | [] [] | 4
|
||||
grep | [] [] [] | 10
|
||||
hello | [] [] [] [] [] [] [] | 25
|
||||
id-utils | [] [] | 6
|
||||
indent | [] [] [] [] | 12
|
||||
jpilot | () () | 3
|
||||
jwhois | () () [] | 3
|
||||
kbd | [] [] | 4
|
||||
ld | [] [] | 4
|
||||
libc | [] [] [] [] [] [] | 17
|
||||
lilypond | [] | 5
|
||||
lynx | [] [] [] | 9
|
||||
m4 | [] [] [] | 12
|
||||
make | [] [] [] [] | 12
|
||||
mysecretdiary | [] [] | 4
|
||||
nano | () [] [] [] [] | 14
|
||||
nano_1_0 | () [] [] [] | 13
|
||||
opcodes | [] [] | 6
|
||||
parted | [] [] [] | 10
|
||||
ptx | [] [] [] [] [] [] | 15
|
||||
python | | 0
|
||||
recode | [] [] [] [] | 13
|
||||
sed | [] [] [] [] [] [] | 21
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] | 22
|
||||
sharutils | [] [] [] | 12
|
||||
sketch | [] () | 3
|
||||
soundtracker | [] | 5
|
||||
sp | | 0
|
||||
tar | [] [] [] [] [] [] [] | 16
|
||||
texinfo | [] [] [] | 10
|
||||
textutils | [] [] [] [] | 11
|
||||
util-linux | [] [] [] | 8
|
||||
vorbis-tools | [] | 1
|
||||
wdiff | [] [] [] [] | 9
|
||||
wget | [] [] [] [] [] [] [] | 20
|
||||
+----------------------------------------+
|
||||
35 teams no pl pt pt_BR ru sk sl sv tr uk zh_TW
|
||||
55 domains 5 13 2 12 25 11 11 41 34 4 7 489
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
@@ -294,7 +370,7 @@ distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If July 2001 seems to be old, you may fetch a more recent copy of
|
||||
If March 2002 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
||||
matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
@@ -304,10 +380,11 @@ Using `gettext' in new packages
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course the GNU General Public License applies to your
|
||||
sources from then on if you include `gettext' directly in your
|
||||
distribution but since you are writing free software anyway this is no
|
||||
restriction.
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
to use of `gettext' the only thing missing are the translations. The
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Copyright 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
@@ -8,20 +14,27 @@ various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
@@ -55,14 +68,15 @@ Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
You can give `configure' initial values for variables by setting
|
||||
them in the environment. You can do that on the command line like this:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
@@ -75,11 +89,11 @@ directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
@@ -122,22 +136,35 @@ you can use the `configure' options `--x-includes=DIR' and
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
a message saying it cannot guess the host type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the host
|
||||
platform (i.e., that on which the generated programs will eventually be
|
||||
run) with `--host=TYPE'. In this case, you should also specify the
|
||||
build platform with `--build=TYPE', because, in this case, it may not
|
||||
be possible to guess the build platform (it sometimes involves
|
||||
compiling and running simple test programs, and this can't be done if
|
||||
the compiler is a cross compiler).
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
@@ -150,20 +177,44 @@ default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
@@ -175,8 +226,6 @@ operates.
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
||||
+17
-2
@@ -1,11 +1,26 @@
|
||||
## 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 of the License, 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
|
||||
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha
|
||||
AUTOMAKE_OPTIONS = 1.6 check-news readme-alpha dist-bzip2
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = config intl po lib src doc m4 tests
|
||||
|
||||
EXTRA_DIST = REFERENCES configure.bat OChangeLog Makefile.maint GNUmakefile
|
||||
EXTRA_DIST = config/config.rpath REFERENCES configure.bat OChangeLog Makefile.maint GNUmakefile
|
||||
|
||||
DISTCLEANFILES = intl/libintl.h
|
||||
|
||||
|
||||
+108
-82
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -43,9 +43,12 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -57,52 +60,58 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC = @GCC@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
LIBINTL = @LIBINTL@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha
|
||||
AUTOMAKE_OPTIONS = 1.6 check-news readme-alpha dist-bzip2
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = config intl po lib src doc m4 tests
|
||||
|
||||
EXTRA_DIST = REFERENCES configure.bat OChangeLog Makefile.maint GNUmakefile
|
||||
EXTRA_DIST = config/config.rpath REFERENCES configure.bat OChangeLog Makefile.maint GNUmakefile
|
||||
|
||||
DISTCLEANFILES = intl/libintl.h
|
||||
|
||||
@@ -132,9 +141,9 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
|
||||
uninstall-info-recursive all-recursive install-data-recursive \
|
||||
install-exec-recursive installdirs-recursive install-recursive \
|
||||
uninstall-recursive check-recursive installcheck-recursive
|
||||
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
|
||||
INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS \
|
||||
aclocal.m4 config.hin configure configure.in
|
||||
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL \
|
||||
Makefile.am Makefile.in NEWS THANKS aclocal.m4 config.hin \
|
||||
configure configure.in
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
@@ -144,44 +153,34 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$@ $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
|
||||
|
||||
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
$(ACLOCAL_M4): configure.in m4/c-bs-a.m4 m4/codeset.m4 m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/m4.m4 m4/malloc.m4 m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
|
||||
$(ACLOCAL_M4): configure.in m4/c-bs-a.m4 m4/codeset.m4 m4/dmalloc.m4 m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/malloc.m4 m4/mbrtowc.m4 m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
config.h: stamp-h
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h; \
|
||||
$(MAKE) stamp-h; \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
stamp-h: $(srcdir)/config.hin $(top_builddir)/config.status
|
||||
@rm -f stamp-h stamp-hT
|
||||
@echo timestamp > stamp-hT 2> /dev/null
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.hin \
|
||||
$(SHELL) ./config.status
|
||||
@mv stamp-hT stamp-h
|
||||
$(srcdir)/config.hin: $(srcdir)/./stamp-h.in
|
||||
@if test ! -f $@; then \
|
||||
rm -f $(srcdir)/./stamp-h.in; \
|
||||
$(MAKE) $(srcdir)/./stamp-h.in; \
|
||||
else :; fi
|
||||
$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
|
||||
@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
|
||||
|
||||
stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
|
||||
$(srcdir)/config.hin: $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
|
||||
touch $(srcdir)/config.hin
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h
|
||||
intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
|
||||
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
@@ -239,16 +238,19 @@ tags-recursive:
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(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; }'`; \
|
||||
mkid -fID $$unique $(LISP)
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
@@ -259,30 +261,35 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(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)config.hin$$unique$(LISP)$$tags" \
|
||||
|| etags $(ETAGS_ARGS) $$tags config.hin $$unique $(LISP)
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = .
|
||||
# Avoid unsightly `./'.
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
|
||||
GZIP_ENV = --best
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; \
|
||||
@@ -290,17 +297,20 @@ distdir: $(DISTFILES)
|
||||
echo "NEWS not updated; not releasing" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkinstalldirs) $(distdir)/intl $(distdir)/po
|
||||
$(mkinstalldirs) $(distdir)/config $(distdir)/intl $(distdir)/po $(distdir)/tests
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
cp -pR $$d/$$file $(distdir)$$dir \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
@@ -308,7 +318,7 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
for subdir in $(SUBDIRS); do \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
@@ -326,24 +336,34 @@ distdir: $(DISTFILES)
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist: distdir
|
||||
dist-gzip: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
||||
$(am__remove_distdir)
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
|
||||
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
|
||||
&& cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
--with-included-gettext \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
@@ -351,17 +371,24 @@ distcheck: dist
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|
||||
|| (echo "Error: files left after uninstall" 1>&2; \
|
||||
exit 1) ) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
find $$dc_install_base -type f -print ; \
|
||||
exit 1; } >&2 ) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
|
||||
&& rm -f $(distdir).tar.gz \
|
||||
&& (test `find . -type f -print | wc -l` -eq 0 \
|
||||
|| (echo "Error: files left after distclean" 1>&2; \
|
||||
exit 1) )
|
||||
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
||||
sed 'h;s/./=/g;p;x;p;x'
|
||||
distcleancheck: distclean
|
||||
if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile config.h
|
||||
@@ -379,6 +406,7 @@ install-am: all-am
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
@@ -396,9 +424,6 @@ clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
distclean: distclean-recursive
|
||||
-rm -f config.status config.cache config.log
|
||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
||||
@@ -434,19 +459,20 @@ uninstall-am: uninstall-info-am
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
|
||||
clean-generic clean-recursive dist dist-all distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-recursive \
|
||||
distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
|
||||
info-recursive install install-am install-data install-data-am \
|
||||
install-data-recursive install-exec install-exec-am \
|
||||
install-exec-recursive install-info install-info-am \
|
||||
install-info-recursive install-man install-recursive \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am installdirs-recursive maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
|
||||
mostlyclean-generic mostlyclean-recursive tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-info-recursive uninstall-recursive
|
||||
clean-generic clean-recursive dist dist-all dist-bzip2 \
|
||||
dist-gzip distcheck distclean distclean-generic distclean-hdr \
|
||||
distclean-recursive distclean-tags distcleancheck distdir dvi \
|
||||
dvi-am dvi-recursive info info-am info-recursive install \
|
||||
install-am install-data install-data-am install-data-recursive \
|
||||
install-exec install-exec-am install-exec-recursive \
|
||||
install-info install-info-am install-info-recursive install-man \
|
||||
install-recursive install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am installdirs-recursive \
|
||||
maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-recursive tags tags-recursive uninstall \
|
||||
uninstall-am uninstall-info-am uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
||||
@@ -1,22 +1,161 @@
|
||||
Bison News
|
||||
----------
|
||||
|
||||
Changes in version 1.29a:
|
||||
Changes in version 1.35, 2002-03-25:
|
||||
|
||||
* C Skeleton
|
||||
Some projects use Bison's C parser with C++ compilers, and define
|
||||
YYSTYPE as a class. The recent adjustment of C parsers for data
|
||||
alignment and 64 bit architectures made this impossible.
|
||||
|
||||
Because for the time being no real solution for C++ parser
|
||||
generation exists, kludges were implemented in the parser to
|
||||
maintain this use. In the future, when Bison has C++ parsers, this
|
||||
kludge will be disabled.
|
||||
|
||||
This kludge also addresses some C++ problems when the stack was
|
||||
extended.
|
||||
|
||||
|
||||
Changes in version 1.34, 2002-03-12:
|
||||
|
||||
* File name clashes are detected
|
||||
$ bison foo.y -d -o foo.x
|
||||
fatal error: header and parser would both be named `foo.x'
|
||||
|
||||
* A missing `;' at the end of a rule triggers a warning
|
||||
In accordance with POSIX, and in agreement with other
|
||||
Yacc implementations, Bison will mandate this semicolon in the near
|
||||
future. This eases the implementation of a Bison parser of Bison
|
||||
grammars by making this grammar LALR(1) instead of LR(2). To
|
||||
facilitate the transition, this release introduces a warning.
|
||||
|
||||
* Revert the C++ namespace changes introduced in 1.31, as they caused too
|
||||
many portability hassles.
|
||||
|
||||
* DJGPP support added.
|
||||
|
||||
* Fix test suite portability problems.
|
||||
|
||||
Changes in version 1.33, 2002-02-07:
|
||||
|
||||
* Fix C++ issues
|
||||
Groff could not be compiled for the definition of size_t was lacking
|
||||
under some conditions.
|
||||
|
||||
* Catch invalid @n
|
||||
As is done with $n.
|
||||
|
||||
Changes in version 1.32, 2002-01-23:
|
||||
|
||||
* Fix Yacc output file names
|
||||
|
||||
* Portability fixes
|
||||
|
||||
* Italian, Dutch translations
|
||||
|
||||
Changes in version 1.31, 2002-01-14:
|
||||
|
||||
* Many Bug Fixes
|
||||
|
||||
* GNU Gettext and %expect
|
||||
GNU Gettext asserts 10 s/r conflicts, but there are 7. Now that
|
||||
Bison dies on incorrect %expectations, we fear there will be
|
||||
too many bug reports for Gettext, so _for the time being_, %expect
|
||||
does not trigger an error when the input file is named `plural.y'.
|
||||
|
||||
* Use of alloca in parsers
|
||||
If YYSTACK_USE_ALLOCA is defined to 0, then the parsers will use
|
||||
malloc exclusively. Since 1.29, but was not NEWS'ed.
|
||||
|
||||
alloca is used only when compiled with GCC, to avoid portability
|
||||
problems as on AIX.
|
||||
|
||||
* When the generated parser lacks debugging code, YYDEBUG is now 0
|
||||
(as POSIX requires) instead of being undefined.
|
||||
|
||||
* User Actions
|
||||
Bison has always permitted actions such as { $$ = $1 }: it adds the
|
||||
ending semicolon. Now if in Yacc compatibility mode, the semicolon
|
||||
is no longer output: one has to write { $$ = $1; }.
|
||||
|
||||
* Better C++ compliance
|
||||
The output parsers try to respect C++ namespaces.
|
||||
[This turned out to be a failed experiment, and it was reverted later.]
|
||||
|
||||
* Reduced Grammars
|
||||
Fixed bugs when reporting useless nonterminals.
|
||||
|
||||
* 64 bit hosts
|
||||
The parsers work properly on 64 bit hosts.
|
||||
|
||||
* Error messages
|
||||
Some calls to strerror resulted in scrambled or missing error messages.
|
||||
|
||||
* %expect
|
||||
When the number of shift/reduce conflicts is correct, don't issue
|
||||
any warning.
|
||||
|
||||
* The verbose report includes the rule line numbers.
|
||||
|
||||
* Rule line numbers are fixed in traces.
|
||||
|
||||
* Swedish translation
|
||||
|
||||
* Parse errors
|
||||
Verbose parse error messages from the parsers are better looking.
|
||||
Before: parse error: unexpected `'/'', expecting `"number"' or `'-'' or `'(''
|
||||
Now: parse error: unexpected '/', expecting "number" or '-' or '('
|
||||
|
||||
* Fixed parser memory leaks.
|
||||
When the generated parser was using malloc to extend its stacks, the
|
||||
previous allocations were not freed.
|
||||
|
||||
* Fixed verbose output file.
|
||||
Some newlines were missing.
|
||||
Some conflicts in state descriptions were missing.
|
||||
|
||||
* Fixed conflict report.
|
||||
Option -v was needed to get the result.
|
||||
|
||||
* %expect
|
||||
Was not used.
|
||||
Mismatches are errors, not warnings.
|
||||
|
||||
* Fixed incorrect processing of some invalid input.
|
||||
|
||||
* Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.
|
||||
|
||||
* Fixed some typos in the documentation.
|
||||
|
||||
* %token MY_EOF 0 is supported.
|
||||
Before, MY_EOF was silently renumbered as 257.
|
||||
|
||||
* doc/refcard.tex is updated.
|
||||
|
||||
* %output, %file-prefix, %name-prefix.
|
||||
New.
|
||||
|
||||
* --output
|
||||
New, aliasing `--output-file'.
|
||||
|
||||
Changes in version 1.30, 2001-10-26:
|
||||
|
||||
* `--defines' and `--graph' have now an optionnal argument which is the
|
||||
output file name. `-d' and `-g' do not change, they do not take any
|
||||
output file name. `-d' and `-g' do not change, they do not take any
|
||||
argument.
|
||||
|
||||
* `%source_extension' and `%header_extension' are removed, failed
|
||||
experiment.
|
||||
|
||||
* The test suite is more portable.
|
||||
* Portability fixes.
|
||||
|
||||
Changes in version 1.29, 2001-09-07:
|
||||
|
||||
* Better portability.
|
||||
|
||||
Changes in version 1.29:
|
||||
|
||||
* Output file does not redefine const; that is now config.h's job.
|
||||
* The output file does not define const, as this caused problems when used
|
||||
with common autoconfiguration schemes. If you still use ancient compilers
|
||||
that lack const, compile with the equivalent of the C compiler option
|
||||
`-Dconst='. autoconf's AC_C_CONST macro provides one way to do this.
|
||||
|
||||
* Added `-g' and `--graph'.
|
||||
|
||||
@@ -42,8 +181,11 @@ Changes in version 1.29:
|
||||
* New directives.
|
||||
`%yacc', `%fixed_output_files', `%defines', `%no_parser', `%verbose',
|
||||
`%debug', `%source_extension' and `%header_extension'.
|
||||
|
||||
* @$
|
||||
Automatic location tracking.
|
||||
|
||||
Changes in version 1.28:
|
||||
Changes in version 1.28, 1999-07-06:
|
||||
|
||||
* Should compile better now with K&R compilers.
|
||||
|
||||
@@ -75,7 +217,7 @@ Changes in version 1.26:
|
||||
* Generated parsers should now work even on operating systems which do
|
||||
not provide alloca().
|
||||
|
||||
Changes in version 1.25:
|
||||
Changes in version 1.25, 1995-10-16:
|
||||
|
||||
* Errors in the input grammar are not fatal; Bison keeps reading
|
||||
the grammar file, and reports all the errors found in it.
|
||||
@@ -116,3 +258,7 @@ Changes in version 1.22:
|
||||
Changes in version 1.20:
|
||||
|
||||
Output file does not redefine const for C++.
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
End:
|
||||
|
||||
@@ -1,25 +1,47 @@
|
||||
Bison was originally written by Robert Corbett. It would not be what
|
||||
it is today without the invaluable help of these people:
|
||||
|
||||
Akim Demaille akim@epita.fr
|
||||
Airy Andre Airy.Andre@edf.fr
|
||||
Akim Demaille [email protected]
|
||||
Albert Chin-A-Young [email protected]
|
||||
Daniel Hagerty [email protected]
|
||||
David J. MacKenzie [email protected]
|
||||
Fabrice Bauzac noon@cote-dazur.com
|
||||
Hans Aberg [email protected]
|
||||
Jesse Thilo [email protected]
|
||||
Jim Meyering meyerin[email protected]
|
||||
Juan Manuel Guerrero [email protected]
|
||||
Keith Browne [email protected]
|
||||
Laurent Mascherpa [email protected]
|
||||
Alexander Belopolsky [email protected]
|
||||
Andreas Schwab [email protected]
|
||||
Arnold Robbins arnold@skeeve.com
|
||||
Bruce Lilly [email protected]
|
||||
Cris van Pelt [email protected]
|
||||
Daniel Hagerty ha[email protected]
|
||||
David J. MacKenzie [email protected]
|
||||
Dick Streefland [email protected]
|
||||
Enrico Scholz [email protected]
|
||||
Evgeny Stambulchik [email protected]
|
||||
Fabrice Bauzac [email protected]
|
||||
Florian Krohm [email protected]
|
||||
H. Merijn Brand [email protected]
|
||||
Hans Aberg [email protected]
|
||||
Jesse Thilo [email protected]
|
||||
Jim Meyering [email protected]
|
||||
Juan Manuel Guerrero [email protected]
|
||||
Kees Zeelenberg [email protected]
|
||||
Keith Browne [email protected]
|
||||
Laurent Mascherpa [email protected]
|
||||
Marc Autret [email protected]
|
||||
Neil Booth [email protected]
|
||||
Noah Friedman [email protected]
|
||||
Mike Castle [email protected]
|
||||
Neil Booth [email protected]
|
||||
Nelson H. F. Beebe [email protected]
|
||||
Noah Friedman [email protected]
|
||||
Pascal Bart [email protected]
|
||||
Paul Eggert [email protected]
|
||||
Piotr Gackiewicz gacek@intertel.com.pl
|
||||
Richard Stallman [email protected]
|
||||
Paul Eggert [email protected]
|
||||
Per Allansson per@appgate.com
|
||||
Peter Hámorský [email protected]
|
||||
Piotr Gackiewicz [email protected]
|
||||
Richard Stallman [email protected]
|
||||
Robert Anisko [email protected]
|
||||
Shura [email protected]
|
||||
Tom Lane [email protected]
|
||||
Tom Tromey [email protected]
|
||||
Wayne Green [email protected]
|
||||
Wolfram Wagner [email protected]
|
||||
Wwp [email protected]
|
||||
|
||||
Many people are not named here because we lost track of them. We
|
||||
thank them! Please, help us keeping this list up to date.
|
||||
|
||||
Vendored
+1936
-610
File diff suppressed because it is too large
Load Diff
+112
-74
@@ -5,97 +5,114 @@
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define if using `alloca.c'. */
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define if you have `alloca', as a function or macro. */
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define if you have the <argz.h> header file. */
|
||||
/* Define to 1 if you have the <argz.h> header file. */
|
||||
#undef HAVE_ARGZ_H
|
||||
|
||||
/* Define if you have the <ctype.h> header file. */
|
||||
/* Define to 1 if you have the <ctype.h> header file. */
|
||||
#undef HAVE_CTYPE_H
|
||||
|
||||
/* Define if backslash-a works in C strings. */
|
||||
#undef HAVE_C_BACKSLASH_A
|
||||
|
||||
/* Define if you have the `dcgettext' function. */
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define to 1 if you have the declaration of `memchr', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_MEMCHR
|
||||
|
||||
/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_MEMRCHR
|
||||
|
||||
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STPCPY
|
||||
|
||||
/* Define to 1 if you have the declaration of `strchr', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STRCHR
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRERROR
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRERROR_R
|
||||
|
||||
/* Define to 1 if you have the declaration of `strndup', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRNDUP
|
||||
|
||||
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRNLEN
|
||||
|
||||
/* Define to 1 if you have the declaration of `strspn', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STRSPN
|
||||
|
||||
/* Define if the malloc check has been performed. */
|
||||
#undef HAVE_DONE_WORKING_MALLOC_CHECK
|
||||
|
||||
/* Define if the realloc check has been performed. */
|
||||
#undef HAVE_DONE_WORKING_REALLOC_CHECK
|
||||
|
||||
/* Define if you have the `doprnt' function. */
|
||||
/* Define to 1 if you have the `doprnt' function. */
|
||||
#undef HAVE_DOPRNT
|
||||
|
||||
/* Define if you have the `feof_unlocked' function. */
|
||||
/* Define to 1 if you have the `feof_unlocked' function. */
|
||||
#undef HAVE_FEOF_UNLOCKED
|
||||
|
||||
/* Define if you have the `fgets_unlocked' function. */
|
||||
/* Define to 1 if you have the `fgets_unlocked' function. */
|
||||
#undef HAVE_FGETS_UNLOCKED
|
||||
|
||||
/* Define if you have the `getcwd' function. */
|
||||
/* Define to 1 if you have the `getcwd' function. */
|
||||
#undef HAVE_GETCWD
|
||||
|
||||
/* Define if you have the `getegid' function. */
|
||||
/* Define to 1 if you have the `getc_unlocked' function. */
|
||||
#undef HAVE_GETC_UNLOCKED
|
||||
|
||||
/* Define to 1 if you have the `getegid' function. */
|
||||
#undef HAVE_GETEGID
|
||||
|
||||
/* Define if you have the `geteuid' function. */
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#undef HAVE_GETEUID
|
||||
|
||||
/* Define if you have the `getgid' function. */
|
||||
/* Define to 1 if you have the `getgid' function. */
|
||||
#undef HAVE_GETGID
|
||||
|
||||
/* Define if you have the `getpagesize' function. */
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define if you have the `getuid' function. */
|
||||
/* Define to 1 if you have the `getuid' function. */
|
||||
#undef HAVE_GETUID
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the `isascii' function. */
|
||||
/* Define to 1 if you have the `isascii' function. */
|
||||
#undef HAVE_ISASCII
|
||||
|
||||
/* Define if you have the `iswprint' function. */
|
||||
/* Define to 1 if you have the `iswprint' function. */
|
||||
#undef HAVE_ISWPRINT
|
||||
|
||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||
@@ -104,127 +121,127 @@
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define if you have the `mbrtowc' function. */
|
||||
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
|
||||
#undef HAVE_MBRTOWC
|
||||
|
||||
/* Define if you have the `memchr' function. */
|
||||
/* Define to 1 if you have the `mbsinit' function. */
|
||||
#undef HAVE_MBSINIT
|
||||
|
||||
/* Define to 1 if you have the `memchr' function. */
|
||||
#undef HAVE_MEMCHR
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if you have the `mempcpy' function. */
|
||||
/* Define to 1 if you have the `mempcpy' function. */
|
||||
#undef HAVE_MEMPCPY
|
||||
|
||||
/* Define if you have the `mkstemp' function. */
|
||||
/* Define to 1 if you have the `memrchr' function. */
|
||||
#undef HAVE_MEMRCHR
|
||||
|
||||
/* Define to 1 if you have the `mkstemp' function. */
|
||||
#undef HAVE_MKSTEMP
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define if you have the `munmap' function. */
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
#undef HAVE_MUNMAP
|
||||
|
||||
/* Define if you have the <nl_types.h> header file. */
|
||||
/* Define to 1 if you have the <nl_types.h> header file. */
|
||||
#undef HAVE_NL_TYPES_H
|
||||
|
||||
/* Define if you have the `putenv' function. */
|
||||
/* Define to 1 if libc includes obstacks. */
|
||||
#undef HAVE_OBSTACK
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define if you have the `setenv' function. */
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
#undef HAVE_SETENV
|
||||
|
||||
/* Define if you have the `setlocale' function. */
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
/* Define if you have the <stddef.h> header file. */
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#undef HAVE_STDDEF_H
|
||||
|
||||
/* Define if you have the <stdint.h> header file. */
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define if you have the `stpcpy' function. */
|
||||
/* Define to 1 if you have the `stpcpy' function. */
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
/* Define if you have the `strcasecmp' function. */
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define if you have the `strchr' function. */
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define if you have the `strdup' function. */
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define if you have the `strerror' function. */
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you have the `strerror_r' function. */
|
||||
/* Define to 1 if you have the `strerror_r' function. */
|
||||
#undef HAVE_STRERROR_R
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define if you have the `strndup' function. */
|
||||
#undef HAVE_STRNDUP
|
||||
|
||||
/* Define if you have the `strnlen' function. */
|
||||
#undef HAVE_STRNLEN
|
||||
|
||||
/* Define if you have the `strspn' function. */
|
||||
/* Define to 1 if you have the `strspn' function. */
|
||||
#undef HAVE_STRSPN
|
||||
|
||||
/* Define if you have the `strtoul' function. */
|
||||
/* Define to 1 if you have the `strtoul' function. */
|
||||
#undef HAVE_STRTOUL
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define if you have the `tsearch' function. */
|
||||
/* Define to 1 if you have the `tsearch' function. */
|
||||
#undef HAVE_TSEARCH
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define if you have the `vprintf' function. */
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define if you have the <wchar.h> header file. */
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
/* Define if you have the <wctype.h> header file. */
|
||||
/* Define to 1 if you have the <wctype.h> header file. */
|
||||
#undef HAVE_WCTYPE_H
|
||||
|
||||
/* Define to 1 if `strerror_r' returns a string. */
|
||||
#undef HAVE_WORKING_STRERROR_R
|
||||
|
||||
/* Define if you have the `__argz_count' function. */
|
||||
/* Define to 1 if you have the `__argz_count' function. */
|
||||
#undef HAVE___ARGZ_COUNT
|
||||
|
||||
/* Define if you have the `__argz_next' function. */
|
||||
/* Define to 1 if you have the `__argz_next' function. */
|
||||
#undef HAVE___ARGZ_NEXT
|
||||
|
||||
/* Define if you have the `__argz_stringify' function. */
|
||||
/* Define to 1 if you have the `__argz_stringify' function. */
|
||||
#undef HAVE___ARGZ_STRINGIFY
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
@@ -233,6 +250,21 @@
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define if compiler has function prototypes */
|
||||
#undef PROTOTYPES
|
||||
|
||||
@@ -244,23 +276,29 @@
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
#undef STRERROR_R_CHAR_P
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define if using the dmalloc debugging malloc package */
|
||||
#undef WITH_DMALLOC
|
||||
|
||||
/* Define to 1 for GNU C library extensions. */
|
||||
#undef _GNU_SOURCE
|
||||
|
||||
/* Define if on MINIX. */
|
||||
/* Define to 1 if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except with this
|
||||
defined. */
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define if you need to in order for `stat' and other things to work. */
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
|
||||
+31
-21
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -43,9 +43,12 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -57,53 +60,59 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC = @GCC@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
LIBINTL = @LIBINTL@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
EXTRA_DIST = move-if-change prev-version.txt
|
||||
subdir = config
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
DIST_COMMON = Makefile.am Makefile.in config.guess config.sub depcomp \
|
||||
install-sh mdate-sh missing mkinstalldirs texinfo.tex
|
||||
DIST_COMMON = Makefile.am Makefile.in config.guess config.rpath \
|
||||
config.sub depcomp install-sh mdate-sh missing mkinstalldirs \
|
||||
texinfo.tex
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
@@ -111,14 +120,11 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu config/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
@@ -126,13 +132,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
cp -pR $$d/$$file $(distdir)$$dir \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
@@ -157,6 +166,7 @@ install-am: all-am
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
Vendored
+88
-76
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-09-13'
|
||||
timestamp='2002-03-20'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -24,8 +24,9 @@ timestamp='2001-09-13'
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# Please send patches to <[email protected]>.
|
||||
# Originally written by Per Bothner <per@bothner.com>.
|
||||
# Please send patches to <[email protected]>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
@@ -97,7 +98,7 @@ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
|
||||
|
||||
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int dummy(){}" > $dummy.c ;
|
||||
for c in cc gcc c89 ; do
|
||||
for c in cc gcc c89 c99 ; do
|
||||
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
|
||||
if test $? = 0 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
@@ -134,23 +135,22 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# object file format. This provides both forward
|
||||
# compatibility and a consistent mechanism for selecting the
|
||||
# object file format.
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-unknown ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
mac68k) machine=m68k-apple ;;
|
||||
macppc) machine=powerpc-apple ;;
|
||||
hp3[0-9][05]) machine=m68k-hp ;;
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
sparc*) machine=`uname -p`-unknown ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
#
|
||||
# Note: NetBSD doesn't particularly care about the vendor
|
||||
# portion of the name. We always set it to "unknown".
|
||||
sysctl="sysctl -n hw.machine_arch"
|
||||
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE}" in
|
||||
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
@@ -290,6 +290,9 @@ EOF
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
*:[Mm]orph[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-morphos
|
||||
exit 0 ;;
|
||||
*:OS/390:*:*)
|
||||
echo i370-ibm-openedition
|
||||
exit 0 ;;
|
||||
@@ -338,7 +341,7 @@ EOF
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
@@ -507,7 +510,7 @@ EOF
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:[45])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
@@ -547,10 +550,8 @@ EOF
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
case "${HPUX_REV}" in
|
||||
11.[0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
@@ -559,13 +560,13 @@ EOF
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
fi ;;
|
||||
esac
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
fi
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
@@ -598,10 +599,10 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
esac
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
@@ -683,9 +684,6 @@ EOF
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
@@ -707,9 +705,6 @@ EOF
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
@@ -737,6 +732,9 @@ EOF
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:3*)
|
||||
echo i386-pc-interix3
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
@@ -762,16 +760,30 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
mips:Linux:*:*)
|
||||
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
|
||||
big) echo mips-unknown-linux-gnu && exit 0 ;;
|
||||
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
|
||||
esac
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mipsel
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
rm -f $dummy.c
|
||||
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
@@ -820,7 +832,8 @@ EOF
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_supported_targets=`cd /; ld --help 2>&1 \
|
||||
# Set LC_ALL=C to ensure ld outputs messages in English.
|
||||
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
|
||||
| sed -ne '/supported targets:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported targets: *//
|
||||
@@ -844,32 +857,29 @@ EOF
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-pc-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-pc-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <features.h>
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
LIBC=gnu
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#ifdef __INTEL_COMPILER
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
rm -f $dummy.c
|
||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
@@ -948,7 +958,7 @@ EOF
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
@@ -1049,15 +1059,17 @@ EOF
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
if test "${UNAME_MACHINE}" = "x86pc"; then
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
if test "$UNAME_PROCESSOR" = "x86"; then
|
||||
UNAME_PROCESSOR=i386
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
|
||||
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-[KW]:NONSTOP_KERNEL:*:*)
|
||||
NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:NonStop-UX:*:*)
|
||||
|
||||
Vendored
+90
-59
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-09-14'
|
||||
timestamp='2002-03-07'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -29,7 +29,8 @@ timestamp='2001-09-14'
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Please send patches to <[email protected]>.
|
||||
# Please send patches to <[email protected]>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
@@ -117,7 +118,7 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
|
||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -226,6 +227,7 @@ case $basic_machine in
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dsp16xx \
|
||||
@@ -233,25 +235,24 @@ case $basic_machine in
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| m32r | m68000 | m68k | m88k | mcore \
|
||||
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
||||
| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
||||
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
|
||||
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
|
||||
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
|
||||
| mipsisa32 \
|
||||
| mipsisa32 | mipsisa64 \
|
||||
| mn10200 | mn10300 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc \
|
||||
| openrisc | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| s390 | s390x \
|
||||
| sh | sh[34] | sh[34]eb | shbe | shle \
|
||||
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| stormy16 | strongarm \
|
||||
| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic80 | tron \
|
||||
| v850 \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
@@ -278,12 +279,13 @@ case $basic_machine in
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alphapca5[67]-* | arc-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armv*-* \
|
||||
| avr-* \
|
||||
| bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c54x-* \
|
||||
| clipper-* | cray2-* | cydra-* \
|
||||
| clipper-* | cydra-* \
|
||||
| d10v-* | d30v-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | fx80-* \
|
||||
@@ -291,7 +293,7 @@ case $basic_machine in
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| m32r-* \
|
||||
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | mcore-* \
|
||||
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
|
||||
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
|
||||
@@ -303,14 +305,14 @@ case $basic_machine in
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
|
||||
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
||||
| v850-* | vax-* \
|
||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
||||
| xtensa-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
@@ -375,6 +377,10 @@ case $basic_machine in
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
@@ -395,16 +401,8 @@ case $basic_machine in
|
||||
basic_machine=c38-convex
|
||||
os=-bsd
|
||||
;;
|
||||
cray | ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[cjt]90)
|
||||
basic_machine=${basic_machine}-cray
|
||||
cray | j90)
|
||||
basic_machine=j90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
@@ -419,6 +417,14 @@ case $basic_machine in
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
decsystem10* | dec10*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops10
|
||||
;;
|
||||
decsystem20* | dec20*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops20
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
@@ -599,14 +605,6 @@ case $basic_machine in
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
@@ -621,6 +619,10 @@ case $basic_machine in
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
morphos)
|
||||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
@@ -700,6 +702,10 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
or32 | or32-*)
|
||||
basic_machine=or32-unknown
|
||||
os=-coff
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
os=-ose
|
||||
@@ -725,7 +731,7 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen)
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86 | athlon)
|
||||
@@ -734,7 +740,7 @@ case $basic_machine in
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
@@ -785,6 +791,12 @@ case $basic_machine in
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
s390 | s390-*)
|
||||
basic_machine=s390-ibm
|
||||
;;
|
||||
s390x | s390x-*)
|
||||
basic_machine=s390x-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
@@ -796,7 +808,7 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sparclite-wrs)
|
||||
sparclite-wrs | simso-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
@@ -854,7 +866,7 @@ case $basic_machine in
|
||||
sun386 | sun386i | roadrunner)
|
||||
basic_machine=i386-sun
|
||||
;;
|
||||
sv1)
|
||||
sv1)
|
||||
basic_machine=sv1-cray
|
||||
os=-unicos
|
||||
;;
|
||||
@@ -862,8 +874,16 @@ case $basic_machine in
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
t3d)
|
||||
basic_machine=alpha-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=t3e-cray
|
||||
basic_machine=alphaev5-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t90)
|
||||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
@@ -876,6 +896,10 @@ case $basic_machine in
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
toad1)
|
||||
basic_machine=pdp10-xkl
|
||||
os=-tops20
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
@@ -926,13 +950,13 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-windows32-msvcrt
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
z8k-*-coff)
|
||||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
@@ -953,13 +977,6 @@ case $basic_machine in
|
||||
op60c)
|
||||
basic_machine=hppa1.1-oki
|
||||
;;
|
||||
mips)
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
else
|
||||
basic_machine=mips-mips
|
||||
fi
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
@@ -982,6 +999,9 @@ case $basic_machine in
|
||||
sh3 | sh4 | sh3eb | sh4eb)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
@@ -1069,7 +1089,8 @@ case $os in
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos*)
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1121,12 +1142,18 @@ case $os in
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-atheos*)
|
||||
os=-atheos
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-nova*)
|
||||
os=-rtmk-nova
|
||||
;;
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
@@ -1201,6 +1228,7 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
;;
|
||||
@@ -1231,6 +1259,9 @@ case $basic_machine in
|
||||
mips*-*)
|
||||
os=-elf
|
||||
;;
|
||||
or32-*)
|
||||
os=-coff
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
|
||||
+29
-4
@@ -31,7 +31,16 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
@@ -204,8 +213,9 @@ tru64)
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
|
||||
tmpdepfile1="$object.d"
|
||||
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
|
||||
base=`echo "$object" | sed -e 's/\.o$/.d/' -e 's/\.lo$/.d/'`
|
||||
tmpdepfile1="$base.o.d"
|
||||
tmpdepfile2="$base.d"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
@@ -314,7 +324,7 @@ makedepend)
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tail +3 "$tmpdepfile" | tr ' ' '
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
@@ -382,6 +392,21 @@ msvisualcpp)
|
||||
done
|
||||
;;
|
||||
esac
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
) &
|
||||
|
||||
+17
-17
@@ -109,7 +109,7 @@ then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
:
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
@@ -120,7 +120,7 @@ if [ x"$dir_arg" != x ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
@@ -130,7 +130,7 @@ else
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
:
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
@@ -141,7 +141,7 @@ else
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
:
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
@@ -151,7 +151,7 @@ else
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -163,8 +163,8 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
@@ -183,7 +183,7 @@ while [ $# -ne 0 ] ; do
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
@@ -194,10 +194,10 @@ if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
@@ -216,7 +216,7 @@ else
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
@@ -235,10 +235,10 @@ else
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
|
||||
+6
-1
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Get modification time of a file or directory and pretty-print it.
|
||||
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# written by Ulrich Drepper <[email protected]>, June 1995
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -17,6 +17,11 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Prevent date giving response in another language.
|
||||
LANG=C
|
||||
export LANG
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ Supported PROGRAM values:
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal)
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
@@ -139,7 +139,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake)
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
|
||||
+66
-5
@@ -7,6 +7,52 @@
|
||||
# $Id$
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi ;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
@@ -22,13 +68,24 @@ do
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
@@ -37,4 +94,8 @@ done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 3
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.29
|
||||
1.34
|
||||
|
||||
+288
-225
@@ -3,10 +3,10 @@
|
||||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2001-07-25.07}
|
||||
\def\texinfoversion{2002-03-13.06}
|
||||
%
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
|
||||
% 2000, 01 Free Software Foundation, Inc.
|
||||
% 2000, 01, 02 Free Software Foundation, Inc.
|
||||
%
|
||||
% This texinfo.tex file is free software; you can redistribute it and/or
|
||||
% modify it under the terms of the GNU General Public License as
|
||||
@@ -30,14 +30,17 @@
|
||||
% Please try the latest version of texinfo.tex before submitting bug
|
||||
% reports; you can get the latest version from:
|
||||
% ftp://ftp.gnu.org/gnu/texinfo.tex
|
||||
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
|
||||
% ftp://texinfo.org/tex/texinfo.tex
|
||||
% ftp://us.ctan.org/macros/texinfo/texinfo.tex
|
||||
% (and all CTAN mirrors, finger [email protected] for a list).
|
||||
% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
|
||||
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
|
||||
% ftp://texinfo.org/texinfo/texinfo.tex
|
||||
% ftp://tug.org/tex/texinfo.tex
|
||||
% (and all CTAN mirrors, see http://www.ctan.org),
|
||||
% and /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.
|
||||
% Texinfo has a small home page at http://texinfo.org/.
|
||||
%
|
||||
% Texinfo has a small home page at http://texinfo.org/ and also
|
||||
% http://www.gnu.org/software/texinfo.
|
||||
%
|
||||
% Send bug reports to [email protected]. Please include including a
|
||||
% complete document in each bug report with which we can reproduce the
|
||||
@@ -51,12 +54,12 @@
|
||||
% tex foo.texi
|
||||
% tex foo.texi
|
||||
% dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.
|
||||
% The extra runs of TeX get the cross-reference information correct.
|
||||
% The extra TeX runs get the cross-reference information correct.
|
||||
% Sometimes one run after texindex suffices, and sometimes you need more
|
||||
% than two; texi2dvi does it as many times as necessary.
|
||||
%
|
||||
% It is possible to adapt texinfo.tex for other languages. You can get
|
||||
% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/.
|
||||
% the existing language-specific files from the full Texinfo distribution.
|
||||
|
||||
\message{Loading texinfo [version \texinfoversion]:}
|
||||
|
||||
@@ -833,18 +836,43 @@ where each line of input produces a line of output.}
|
||||
%
|
||||
\def\asis#1{#1}
|
||||
|
||||
% @math means output in math mode.
|
||||
% We don't use $'s directly in the definition of \math because control
|
||||
% sequences like \math are expanded when the toc file is written. Then,
|
||||
% we read the toc file back, the $'s will be normal characters (as they
|
||||
% should be, according to the definition of Texinfo). So we must use a
|
||||
% control sequence to switch into and out of math mode.
|
||||
% @math outputs its argument in math mode.
|
||||
% We don't use $'s directly in the definition of \math because we need
|
||||
% to set catcodes according to plain TeX first, to allow for subscripts,
|
||||
% superscripts, special math chars, etc.
|
||||
%
|
||||
% @math does not do math typesetting in section titles, index
|
||||
% entries, and other such contexts where the catcodes are set before
|
||||
% @math gets a chance to work. This could perhaps be fixed, but for now
|
||||
% at least we can have real math in the main text, where it's needed most.
|
||||
%
|
||||
% This isn't quite enough for @math to work properly in indices, but it
|
||||
% seems unlikely it will ever be needed there.
|
||||
\let\implicitmath = $%$ font-lock fix
|
||||
%
|
||||
\let\implicitmath = $
|
||||
\def\math#1{\implicitmath #1\implicitmath}
|
||||
% One complication: _ usually means subscripts, but it could also mean
|
||||
% an actual _ character, as in @math{@var{some_variable} + 1}. So make
|
||||
% _ within @math be active (mathcode "8000), and distinguish by seeing
|
||||
% if the current family is \slfam, which is what @var uses.
|
||||
%
|
||||
{\catcode95 = \active % 95 = _
|
||||
\gdef\mathunderscore{%
|
||||
\catcode95=\active
|
||||
\def_{\ifnum\fam=\slfam \_\else\sb\fi}%
|
||||
}}
|
||||
%
|
||||
% Another complication: we want \\ (and @\) to output a \ character.
|
||||
% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
|
||||
% this is not advertised and we don't care. Texinfo does not
|
||||
% otherwise define @\.
|
||||
%
|
||||
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
|
||||
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
|
||||
%
|
||||
\def\math{%
|
||||
\tex
|
||||
\mathcode`\_="8000 \mathunderscore
|
||||
\let\\ = \mathbackslash
|
||||
\implicitmath\finishmath}
|
||||
\def\finishmath#1{#1\implicitmath\Etex}
|
||||
|
||||
% @bullet and @minus need the same treatment as @math, just above.
|
||||
\def\bullet{\implicitmath\ptexbullet\implicitmath}
|
||||
@@ -927,10 +955,12 @@ where each line of input produces a line of output.}
|
||||
\def\dopdfimage#1#2#3{%
|
||||
\def\imagewidth{#2}%
|
||||
\def\imageheight{#3}%
|
||||
% without \immediate, pdftex seg faults when the same image is
|
||||
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
|
||||
\ifnum\pdftexversion < 14
|
||||
\pdfimage
|
||||
\immediate\pdfimage
|
||||
\else
|
||||
\pdfximage
|
||||
\immediate\pdfximage
|
||||
\fi
|
||||
\ifx\empty\imagewidth\else width \imagewidth \fi
|
||||
\ifx\empty\imageheight\else height \imageheight \fi
|
||||
@@ -943,7 +973,7 @@ where each line of input produces a line of output.}
|
||||
\pdfrefximage \pdflastximage
|
||||
\fi}
|
||||
\def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
|
||||
\def\pdfmkpgn#1{#1@}
|
||||
\def\pdfmkpgn#1{#1}
|
||||
\let\linkcolor = \Blue % was Cyan, but that seems light?
|
||||
\def\endlink{\Black\pdfendlink}
|
||||
% Adding outlines to PDF; macros for calculating structure of outlines
|
||||
@@ -955,7 +985,7 @@ where each line of input produces a line of output.}
|
||||
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
|
||||
\def\pdfmakeoutlines{{%
|
||||
\openin 1 \jobname.toc
|
||||
\ifeof 1\else\bgroup
|
||||
\ifeof 1\else\begingroup
|
||||
\closein 1
|
||||
\indexnofonts
|
||||
\def\tt{}
|
||||
@@ -965,32 +995,34 @@ where each line of input produces a line of output.}
|
||||
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
|
||||
%
|
||||
\def\chapentry ##1##2##3{}
|
||||
\let\appendixentry = \chapentry
|
||||
\def\unnumbchapentry ##1##2{}
|
||||
\def\secentry ##1##2##3##4{\advancenumber{chap##2}}
|
||||
\def\unnumbsecentry ##1##2{}
|
||||
\def\unnumbsecentry ##1##2##3{\advancenumber{chap##2}}
|
||||
\def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
|
||||
\def\unnumbsubsecentry ##1##2{}
|
||||
\def\unnumbsubsecentry ##1##2##3##4{\advancenumber{sec##2.##3}}
|
||||
\def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
|
||||
\def\unnumbsubsubsecentry ##1##2{}
|
||||
\def\unnumbsubsubsecentry ##1##2##3##4##5{\advancenumber{subsec##2.##3.##4}}
|
||||
\input \jobname.toc
|
||||
\def\chapentry ##1##2##3{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
|
||||
\let\appendixentry = \chapentry
|
||||
\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\unnumbsecentry ##1##2##3{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##3}}{##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\unnumbsubsecentry ##1##2##3##4{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##4}}{##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}}
|
||||
\def\unnumbsubsubsecentry ##1##2##3##4##5{%
|
||||
\pdfoutline goto name{\pdfmkpgn{##5}}{##1}}
|
||||
\input \jobname.toc
|
||||
\egroup\fi
|
||||
\endgroup\fi
|
||||
}}
|
||||
\def\makelinks #1,{%
|
||||
\def\params{#1}\def\E{END}%
|
||||
@@ -1107,9 +1139,6 @@ where each line of input produces a line of output.}
|
||||
}%
|
||||
}
|
||||
|
||||
% Use Computer Modern fonts at \magstephalf (11pt).
|
||||
\newcount\mainmagstep \mainmagstep=\magstephalf
|
||||
|
||||
% Set the font macro #1 to the font named #2, adding on the
|
||||
% specified font prefix (normally `cm').
|
||||
% #3 is the font's design size, #4 is a scale factor
|
||||
@@ -1138,13 +1167,16 @@ where each line of input produces a line of output.}
|
||||
\def\scshape{csc}
|
||||
\def\scbshape{csc}
|
||||
|
||||
\newcount\mainmagstep
|
||||
\ifx\bigger\relax
|
||||
\let\mainmagstep=\magstep1
|
||||
\setfont\textrm\rmshape{12}{1000}
|
||||
\setfont\texttt\ttshape{12}{1000}
|
||||
% not really supported.
|
||||
\let\mainmagstep=\magstep1
|
||||
\setfont\textrm\rmshape{12}{1000}
|
||||
\setfont\texttt\ttshape{12}{1000}
|
||||
\else
|
||||
\setfont\textrm\rmshape{10}{\mainmagstep}
|
||||
\setfont\texttt\ttshape{10}{\mainmagstep}
|
||||
\mainmagstep=\magstephalf
|
||||
\setfont\textrm\rmshape{10}{\mainmagstep}
|
||||
\setfont\texttt\ttshape{10}{\mainmagstep}
|
||||
\fi
|
||||
% Instead of cmb10, you many want to use cmbx10.
|
||||
% cmbx10 is a prettier font on its own, but cmb10
|
||||
@@ -1224,20 +1256,6 @@ where each line of input produces a line of output.}
|
||||
\font\seci=cmmi12 scaled \magstep1
|
||||
\font\secsy=cmsy10 scaled \magstep2
|
||||
|
||||
% \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.
|
||||
% \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.
|
||||
% \setfont\ssecsl\slshape{10}{\magstep1}
|
||||
% \setfont\ssectt\ttshape{10}{\magstep1}
|
||||
% \setfont\ssecsf\sfshape{10}{\magstep1}
|
||||
|
||||
%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
|
||||
%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
|
||||
%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
|
||||
%\setfont\ssectt\ttshape{10}{1315}
|
||||
%\setfont\ssecsf\sfshape{10}{1315}
|
||||
|
||||
%\let\ssecbf=\ssecrm
|
||||
|
||||
% Subsection fonts (13.15pt).
|
||||
\setfont\ssecrm\rmbshape{12}{\magstephalf}
|
||||
\setfont\ssecit\itbshape{10}{1315}
|
||||
@@ -1254,17 +1272,16 @@ where each line of input produces a line of output.}
|
||||
|
||||
% In order for the font changes to affect most math symbols and letters,
|
||||
% we have to define the \textfont of the standard families. Since
|
||||
% texinfo doesn't allow for producing subscripts and superscripts, we
|
||||
% don't bother to reset \scriptfont and \scriptscriptfont (which would
|
||||
% also require loading a lot more fonts).
|
||||
% texinfo doesn't allow for producing subscripts and superscripts except
|
||||
% in the main text, we don't bother to reset \scriptfont and
|
||||
% \scriptscriptfont (which would also require loading a lot more fonts).
|
||||
%
|
||||
\def\resetmathfonts{%
|
||||
\textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
|
||||
\textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
|
||||
\textfont\ttfam = \tentt \textfont\sffam = \tensf
|
||||
\textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
|
||||
\textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
|
||||
\textfont\ttfam=\tentt \textfont\sffam=\tensf
|
||||
}
|
||||
|
||||
|
||||
% The font-changing commands redefine the meanings of \tenSTYLE, instead
|
||||
% of just \STYLE. We do this so that font changes will continue to work
|
||||
% in math mode, where it is the current \fam that is relevant in most
|
||||
@@ -1425,11 +1442,19 @@ where each line of input produces a line of output.}
|
||||
|
||||
\def\realdash{-}
|
||||
\def\codedash{-\discretionary{}{}{}}
|
||||
\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
|
||||
\def\codeunder{%
|
||||
% this is all so @math{@code{var_name}+1} can work. In math mode, _
|
||||
% is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
|
||||
% will therefore expand the active definition of _, which is us
|
||||
% (inside @code that is), therefore an endless loop.
|
||||
\ifusingtt{\ifmmode
|
||||
\mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
|
||||
\else\normalunderscore \fi
|
||||
\discretionary{}{}{}}%
|
||||
{\_}%
|
||||
}
|
||||
\def\codex #1{\tclose{#1}\endgroup}
|
||||
|
||||
%\let\exp=\tclose %Was temporary
|
||||
|
||||
% @kbd is like @code, except that if the argument is just one @key command,
|
||||
% then @kbd has no effect.
|
||||
|
||||
@@ -1631,8 +1656,6 @@ where each line of input produces a line of output.}
|
||||
\global\let\contents = \relax
|
||||
\global\let\shortcontents = \relax
|
||||
\fi
|
||||
%
|
||||
\ifpdf \pdfmakepagedesttrue \fi
|
||||
}
|
||||
|
||||
\def\finishtitlepage{%
|
||||
@@ -2753,9 +2776,23 @@ width0pt\relax} \fi
|
||||
\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
|
||||
\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
|
||||
|
||||
% Take care of texinfo commands likely to appear in an index entry.
|
||||
% (Must be a way to avoid doing expansion at all, and thus not have to
|
||||
% laboriously list every single command here.)
|
||||
%
|
||||
\def\indexdummies{%
|
||||
\def\ { }%
|
||||
\def\@{@}% change to @@ when we switch to @ as escape char in aux files.
|
||||
% 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.
|
||||
\let\{ = \mylbrace
|
||||
\let\} = \myrbrace
|
||||
\def\_{{\realbackslash _}}%
|
||||
\normalturnoffactive
|
||||
%
|
||||
% Take care of the plain tex accent commands.
|
||||
\def\,##1{\realbackslash ,{##1}}%
|
||||
\def\"{\realbackslash "}%
|
||||
\def\`{\realbackslash `}%
|
||||
\def\'{\realbackslash '}%
|
||||
@@ -2768,69 +2805,66 @@ width0pt\relax} \fi
|
||||
\def\u{\realbackslash u}%
|
||||
\def\v{\realbackslash v}%
|
||||
\def\H{\realbackslash H}%
|
||||
% Take care of the plain tex special European modified letters.
|
||||
\def\oe{\realbackslash oe}%
|
||||
\def\ae{\realbackslash ae}%
|
||||
\def\aa{\realbackslash aa}%
|
||||
\def\OE{\realbackslash OE}%
|
||||
\def\AE{\realbackslash AE}%
|
||||
\def\AA{\realbackslash AA}%
|
||||
\def\o{\realbackslash o}%
|
||||
\def\O{\realbackslash O}%
|
||||
\def\l{\realbackslash l}%
|
||||
\def\L{\realbackslash L}%
|
||||
\def\ss{\realbackslash ss}%
|
||||
% Take care of texinfo commands likely to appear in an index entry.
|
||||
% (Must be a way to avoid doing expansion at all, and thus not have to
|
||||
% laboriously list every single command here.)
|
||||
\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.
|
||||
\let\{ = \mylbrace
|
||||
\let\} = \myrbrace
|
||||
\def\_{{\realbackslash _}}%
|
||||
\def\w{\realbackslash w }%
|
||||
\def\bf{\realbackslash bf }%
|
||||
%\def\rm{\realbackslash rm }%
|
||||
\def\sl{\realbackslash sl }%
|
||||
\def\sf{\realbackslash sf}%
|
||||
\def\tt{\realbackslash tt}%
|
||||
\def\gtr{\realbackslash gtr}%
|
||||
\def\less{\realbackslash less}%
|
||||
\def\hat{\realbackslash hat}%
|
||||
\def\TeX{\realbackslash TeX}%
|
||||
\def\dots{\realbackslash dots }%
|
||||
\def\result{\realbackslash result}%
|
||||
\def\equiv{\realbackslash equiv}%
|
||||
\def\expansion{\realbackslash expansion}%
|
||||
\def\print{\realbackslash print}%
|
||||
\def\error{\realbackslash error}%
|
||||
\def\point{\realbackslash point}%
|
||||
\def\copyright{\realbackslash copyright}%
|
||||
\def\tclose##1{\realbackslash tclose {##1}}%
|
||||
\def\code##1{\realbackslash code {##1}}%
|
||||
\def\uref##1{\realbackslash uref {##1}}%
|
||||
\def\url##1{\realbackslash url {##1}}%
|
||||
\def\env##1{\realbackslash env {##1}}%
|
||||
\def\command##1{\realbackslash command {##1}}%
|
||||
\def\option##1{\realbackslash option {##1}}%
|
||||
\def\dotless##1{\realbackslash dotless {##1}}%
|
||||
\def\samp##1{\realbackslash samp {##1}}%
|
||||
\def\,##1{\realbackslash ,{##1}}%
|
||||
% Take care of the plain tex special European modified letters.
|
||||
\def\AA{\realbackslash AA}%
|
||||
\def\AE{\realbackslash AE}%
|
||||
\def\L{\realbackslash L}%
|
||||
\def\OE{\realbackslash OE}%
|
||||
\def\O{\realbackslash O}%
|
||||
\def\aa{\realbackslash aa}%
|
||||
\def\ae{\realbackslash ae}%
|
||||
\def\l{\realbackslash l}%
|
||||
\def\oe{\realbackslash oe}%
|
||||
\def\o{\realbackslash o}%
|
||||
\def\ss{\realbackslash ss}%
|
||||
%
|
||||
% Although these internals commands shouldn't show up, sometimes they do.
|
||||
\def\bf{\realbackslash bf }%
|
||||
\def\gtr{\realbackslash gtr}%
|
||||
\def\hat{\realbackslash hat}%
|
||||
\def\less{\realbackslash less}%
|
||||
%\def\rm{\realbackslash rm }%
|
||||
\def\sf{\realbackslash sf}%
|
||||
\def\sl{\realbackslash sl }%
|
||||
\def\tclose##1{\realbackslash tclose {##1}}%
|
||||
\def\tt{\realbackslash tt}%
|
||||
%
|
||||
\def\b##1{\realbackslash b {##1}}%
|
||||
\def\i##1{\realbackslash i {##1}}%
|
||||
\def\sc##1{\realbackslash sc {##1}}%
|
||||
\def\t##1{\realbackslash t {##1}}%
|
||||
\def\r##1{\realbackslash r {##1}}%
|
||||
\def\i##1{\realbackslash i {##1}}%
|
||||
\def\b##1{\realbackslash b {##1}}%
|
||||
\def\sc##1{\realbackslash sc {##1}}%
|
||||
\def\cite##1{\realbackslash cite {##1}}%
|
||||
\def\key##1{\realbackslash key {##1}}%
|
||||
\def\file##1{\realbackslash file {##1}}%
|
||||
\def\var##1{\realbackslash var {##1}}%
|
||||
\def\kbd##1{\realbackslash kbd {##1}}%
|
||||
\def\dfn##1{\realbackslash dfn {##1}}%
|
||||
\def\emph##1{\realbackslash emph {##1}}%
|
||||
%
|
||||
\def\TeX{\realbackslash TeX}%
|
||||
\def\acronym##1{\realbackslash acronym {##1}}%
|
||||
\def\cite##1{\realbackslash cite {##1}}%
|
||||
\def\code##1{\realbackslash code {##1}}%
|
||||
\def\command##1{\realbackslash command {##1}}%
|
||||
\def\dfn##1{\realbackslash dfn {##1}}%
|
||||
\def\dots{\realbackslash dots }%
|
||||
\def\emph##1{\realbackslash emph {##1}}%
|
||||
\def\env##1{\realbackslash env {##1}}%
|
||||
\def\file##1{\realbackslash file {##1}}%
|
||||
\def\kbd##1{\realbackslash kbd {##1}}%
|
||||
\def\key##1{\realbackslash key {##1}}%
|
||||
\def\math##1{\realbackslash math {##1}}%
|
||||
\def\option##1{\realbackslash option {##1}}%
|
||||
\def\samp##1{\realbackslash samp {##1}}%
|
||||
\def\strong##1{\realbackslash strong {##1}}%
|
||||
\def\uref##1{\realbackslash uref {##1}}%
|
||||
\def\url##1{\realbackslash url {##1}}%
|
||||
\def\var##1{\realbackslash var {##1}}%
|
||||
\def\w{\realbackslash w }%
|
||||
%
|
||||
% These math commands don't seem likely to be used in index entries.
|
||||
\def\copyright{\realbackslash copyright}%
|
||||
\def\equiv{\realbackslash equiv}%
|
||||
\def\error{\realbackslash error}%
|
||||
\def\expansion{\realbackslash expansion}%
|
||||
\def\point{\realbackslash point}%
|
||||
\def\print{\realbackslash print}%
|
||||
\def\result{\realbackslash result}%
|
||||
%
|
||||
% Handle some cases of @value -- where the variable name does not
|
||||
% contain - or _, and the value does not contain any
|
||||
@@ -2844,7 +2878,7 @@ width0pt\relax} \fi
|
||||
|
||||
% If an index command is used in an @example environment, any spaces
|
||||
% therein should become regular spaces in the raw index file, not the
|
||||
% expansion of \tie (\\leavevmode \penalty \@M \ ).
|
||||
% expansion of \tie (\leavevmode \penalty \@M \ ).
|
||||
{\obeyspaces
|
||||
\gdef\unsepspaces{\obeyspaces\let =\space}}
|
||||
|
||||
@@ -2855,7 +2889,10 @@ width0pt\relax} \fi
|
||||
\def\indexdummydots{...}
|
||||
|
||||
\def\indexnofonts{%
|
||||
% Just ignore accents.
|
||||
\def\@{@}%
|
||||
% how to handle braces?
|
||||
\def\_{\normalunderscore}%
|
||||
%
|
||||
\let\,=\indexdummyfont
|
||||
\let\"=\indexdummyfont
|
||||
\let\`=\indexdummyfont
|
||||
@@ -2871,45 +2908,49 @@ width0pt\relax} \fi
|
||||
\let\H=\indexdummyfont
|
||||
\let\dotless=\indexdummyfont
|
||||
% Take care of the plain tex special European modified letters.
|
||||
\def\oe{oe}%
|
||||
\def\ae{ae}%
|
||||
\def\aa{aa}%
|
||||
\def\OE{OE}%
|
||||
\def\AE{AE}%
|
||||
\def\AA{AA}%
|
||||
\def\o{o}%
|
||||
\def\O{O}%
|
||||
\def\l{l}%
|
||||
\def\AE{AE}%
|
||||
\def\L{L}%
|
||||
\def\OE{OE}%
|
||||
\def\O{O}%
|
||||
\def\aa{aa}%
|
||||
\def\ae{ae}%
|
||||
\def\l{l}%
|
||||
\def\oe{oe}%
|
||||
\def\o{o}%
|
||||
\def\ss{ss}%
|
||||
\let\w=\indexdummyfont
|
||||
\let\t=\indexdummyfont
|
||||
\let\r=\indexdummyfont
|
||||
\let\i=\indexdummyfont
|
||||
\let\b=\indexdummyfont
|
||||
\let\emph=\indexdummyfont
|
||||
\let\strong=\indexdummyfont
|
||||
\let\cite=\indexdummyfont
|
||||
\let\sc=\indexdummyfont
|
||||
%Don't no-op \tt, since it isn't a user-level command
|
||||
% and is used in the definitions of the active chars like <, >, |...
|
||||
%
|
||||
% Don't no-op \tt, since it isn't a user-level command
|
||||
% and is used in the definitions of the active chars like <, >, |, etc.
|
||||
% Likewise with the other plain tex font commands.
|
||||
%\let\tt=\indexdummyfont
|
||||
\let\tclose=\indexdummyfont
|
||||
\let\code=\indexdummyfont
|
||||
\let\url=\indexdummyfont
|
||||
\let\uref=\indexdummyfont
|
||||
\let\env=\indexdummyfont
|
||||
%
|
||||
\let\b=\indexdummyfont
|
||||
\let\i=\indexdummyfont
|
||||
\let\r=\indexdummyfont
|
||||
\let\sc=\indexdummyfont
|
||||
\let\t=\indexdummyfont
|
||||
%
|
||||
\let\TeX=\indexdummytex
|
||||
\let\acronym=\indexdummyfont
|
||||
\let\cite=\indexdummyfont
|
||||
\let\code=\indexdummyfont
|
||||
\let\command=\indexdummyfont
|
||||
\let\option=\indexdummyfont
|
||||
\let\dfn=\indexdummyfont
|
||||
\let\dots=\indexdummydots
|
||||
\let\emph=\indexdummyfont
|
||||
\let\env=\indexdummyfont
|
||||
\let\file=\indexdummyfont
|
||||
\let\samp=\indexdummyfont
|
||||
\let\kbd=\indexdummyfont
|
||||
\let\key=\indexdummyfont
|
||||
\let\math=\indexdummyfont
|
||||
\let\option=\indexdummyfont
|
||||
\let\samp=\indexdummyfont
|
||||
\let\strong=\indexdummyfont
|
||||
\let\uref=\indexdummyfont
|
||||
\let\url=\indexdummyfont
|
||||
\let\var=\indexdummyfont
|
||||
\let\TeX=\indexdummytex
|
||||
\let\dots=\indexdummydots
|
||||
\def\@{@}%
|
||||
\let\w=\indexdummyfont
|
||||
}
|
||||
|
||||
% To define \realbackslash, we must make \ not be an escape.
|
||||
@@ -3511,8 +3552,8 @@ width0pt\relax} \fi
|
||||
\gdef\thischaptername{#1}%
|
||||
\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
|
||||
{\putwordAppendix{} \appendixletter}}}%
|
||||
\edef\temp{\noexpand\writetocentry{\realbackslash appendixentry{\the\toks0}%
|
||||
{\appendixletter}}}%
|
||||
\temp
|
||||
\appendixnoderef
|
||||
\global\let\section = \appendixsec
|
||||
@@ -3589,7 +3630,8 @@ width0pt\relax} \fi
|
||||
\def\unnumberedseczzz #1{%
|
||||
\plainsecheading {#1}\gdef\thissection{#1}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}%
|
||||
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry%
|
||||
{\the\toks0}{\the\chapno}}}%
|
||||
\temp
|
||||
\unnumbnoderef
|
||||
\nobreak
|
||||
@@ -3628,7 +3670,7 @@ width0pt\relax} \fi
|
||||
\plainsubsecheading {#1}\gdef\thissection{#1}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry%
|
||||
{\the\toks0}}}%
|
||||
{\the\toks0}{\the\chapno}{\the\secno}}}%
|
||||
\temp
|
||||
\unnumbnoderef
|
||||
\nobreak
|
||||
@@ -3669,7 +3711,7 @@ width0pt\relax} \fi
|
||||
\plainsubsubsecheading {#1}\gdef\thissection{#1}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry%
|
||||
{\the\toks0}}}%
|
||||
{\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}}}%
|
||||
\temp
|
||||
\unnumbnoderef
|
||||
\nobreak
|
||||
@@ -3881,7 +3923,7 @@ width0pt\relax} \fi
|
||||
% argument, which will end up as the last argument to the \...entry macro.
|
||||
%
|
||||
% We open the .toc file here instead of at @setfilename or any other
|
||||
% given time so that @contents can be put in the document anywhere.
|
||||
% fixed time so that @contents can be put in the document anywhere.
|
||||
%
|
||||
\newif\iftocfileopened
|
||||
\def\writetocentry#1{%
|
||||
@@ -3890,6 +3932,14 @@ width0pt\relax} \fi
|
||||
\global\tocfileopenedtrue
|
||||
\fi
|
||||
\iflinks \write\tocfile{#1{\folio}}\fi
|
||||
%
|
||||
% Tell \shipout to create a page destination if we're doing pdf, which
|
||||
% will be the target of the links in the table of contents. We can't
|
||||
% just do it on every page because the title pages are numbered 1 and
|
||||
% 2 (the page numbers aren't printed), and so are the first two pages
|
||||
% of the document. Thus, we'd have two destinations named `1', and
|
||||
% two named `2'.
|
||||
\ifpdf \pdfmakepagedesttrue \fi
|
||||
}
|
||||
|
||||
\newskip\contentsrightmargin \contentsrightmargin=1in
|
||||
@@ -3945,6 +3995,7 @@ width0pt\relax} \fi
|
||||
\startcontents{\putwordShortTOC}%
|
||||
%
|
||||
\let\chapentry = \shortchapentry
|
||||
\let\appendixentry = \shortappendixentry
|
||||
\let\unnumbchapentry = \shortunnumberedentry
|
||||
% We want a true roman here for the page numbers.
|
||||
\secfonts
|
||||
@@ -3953,11 +4004,11 @@ width0pt\relax} \fi
|
||||
\hyphenpenalty = 10000
|
||||
\advance\baselineskip by 1pt % Open it up a little.
|
||||
\def\secentry ##1##2##3##4{}
|
||||
\def\unnumbsecentry ##1##2{}
|
||||
\def\unnumbsecentry ##1##2##3{}
|
||||
\def\subsecentry ##1##2##3##4##5{}
|
||||
\def\unnumbsubsecentry ##1##2{}
|
||||
\def\unnumbsubsecentry ##1##2##3##4{}
|
||||
\def\subsubsecentry ##1##2##3##4##5##6{}
|
||||
\def\unnumbsubsubsecentry ##1##2{}
|
||||
\def\unnumbsubsubsecentry ##1##2##3##4##5{}
|
||||
\openin 1 \jobname.toc
|
||||
\ifeof 1 \else
|
||||
\closein 1
|
||||
@@ -3980,16 +4031,23 @@ width0pt\relax} \fi
|
||||
% The last argument is the page number.
|
||||
% The arguments in between are the chapter number, section number, ...
|
||||
|
||||
% Chapter-level things, for both the long and short contents.
|
||||
% Chapters, in the main contents.
|
||||
\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
|
||||
|
||||
% See comments in \dochapentry re vbox and related settings
|
||||
%
|
||||
% Chapters, in the short toc.
|
||||
% See comments in \dochapentry re vbox and related settings.
|
||||
\def\shortchapentry#1#2#3{%
|
||||
\tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}%
|
||||
}
|
||||
|
||||
% Appendices, in the main contents.
|
||||
\def\appendixentry#1#2#3{\dochapentry{\putwordAppendix{} #2\labelspace#1}{#3}}
|
||||
%
|
||||
% Appendices, in the short toc.
|
||||
\let\shortappendixentry = \shortchapentry
|
||||
|
||||
% Typeset the label for a chapter or appendix for the short contents.
|
||||
% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.
|
||||
% The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter.
|
||||
% 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.
|
||||
@@ -3997,38 +4055,31 @@ width0pt\relax} \fi
|
||||
\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}%
|
||||
\dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi
|
||||
%
|
||||
% This space should be plenty, since a single number is .5em, and the
|
||||
% This space should be enough, since a single number is .5em, and the
|
||||
% widest letter (M) is 1em, at least in the Computer Modern fonts.
|
||||
% But use \hss just in case.
|
||||
% (This space doesn't include the extra space that gets added after
|
||||
% the label; that gets put in by \shortchapentry above.)
|
||||
\advance\dimen0 by 1.1em
|
||||
\hbox to \dimen0{#1\hfil}%
|
||||
\dimen0 = 1em
|
||||
\hbox to \dimen0{#1\hss}%
|
||||
}
|
||||
|
||||
% Unnumbered chapters.
|
||||
\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
|
||||
\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}}
|
||||
|
||||
% Sections.
|
||||
\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
|
||||
\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
|
||||
\def\unnumbsecentry#1#2#3{\dosecentry{#1}{#3}}
|
||||
|
||||
% Subsections.
|
||||
\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
|
||||
\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
|
||||
\def\unnumbsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
|
||||
|
||||
% And subsubsections.
|
||||
\def\subsubsecentry#1#2#3#4#5#6{%
|
||||
\dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
|
||||
\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
|
||||
\def\unnumbsubsubsecentry#1#2#3#4#5{\dosubsubsecentry{#1}{#5}}
|
||||
|
||||
% This parameter controls the indentation of the various levels.
|
||||
\newdimen\tocindent \tocindent = 3pc
|
||||
@@ -4069,7 +4120,7 @@ width0pt\relax} \fi
|
||||
\def\tocentry#1#2{\begingroup
|
||||
\vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
|
||||
% Do not use \turnoffactive in these arguments. Since the toc is
|
||||
% typeset in cmr, so characters such as _ would come out wrong; we
|
||||
% typeset in cmr, characters such as _ would come out wrong; we
|
||||
% have to do the usual translation tricks.
|
||||
\entry{#1}{#2}%
|
||||
\endgroup}
|
||||
@@ -4898,7 +4949,7 @@ width0pt\relax} \fi
|
||||
% #1 is the data type, #2 the name, #3 the args.
|
||||
\def\deftypefunheaderx #1#2 #3\relax{%
|
||||
\doind {fn}{\code{#2}}% Make entry in function index
|
||||
\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}%
|
||||
\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}%
|
||||
\deftypefunargs {#3}\endgroup %
|
||||
\catcode 61=\other % Turn off change made in \defparsebody
|
||||
}
|
||||
@@ -4907,9 +4958,9 @@ width0pt\relax} \fi
|
||||
|
||||
\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
|
||||
|
||||
% \defheaderxcond#1\relax$$$
|
||||
% \defheaderxcond#1\relax$.$
|
||||
% puts #1 in @code, followed by a space, but does nothing if #1 is null.
|
||||
\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi}
|
||||
\def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi}
|
||||
|
||||
% #1 is the classification. #2 is the data type. #3 is the name and args.
|
||||
\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
|
||||
@@ -4919,7 +4970,7 @@ width0pt\relax} \fi
|
||||
\begingroup
|
||||
\normalparens % notably, turn off `&' magic, which prevents
|
||||
% at least some C++ text from working
|
||||
\defname {\defheaderxcond#2\relax$$$#3}{#1}%
|
||||
\defname {\defheaderxcond#2\relax$.$#3}{#1}%
|
||||
\deftypefunargs {#4}\endgroup %
|
||||
\catcode 61=\other % Turn off change made in \defparsebody
|
||||
}
|
||||
@@ -4965,7 +5016,7 @@ width0pt\relax} \fi
|
||||
\def\deftypeopheader#1#2#3#4{%
|
||||
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
|
||||
\begingroup
|
||||
\defname{\defheaderxcond#2\relax$$$#3}
|
||||
\defname{\defheaderxcond#2\relax$.$#3}
|
||||
{\deftypeopcategory\ \putwordon\ \code{#1}}%
|
||||
\deftypefunargs{#4}%
|
||||
\endgroup
|
||||
@@ -4980,7 +5031,7 @@ width0pt\relax} \fi
|
||||
\def\deftypemethodheader#1#2#3#4{%
|
||||
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
|
||||
\begingroup
|
||||
\defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}%
|
||||
\defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}%
|
||||
\deftypefunargs{#4}%
|
||||
\endgroup
|
||||
}
|
||||
@@ -4994,7 +5045,7 @@ width0pt\relax} \fi
|
||||
\def\deftypeivarheader#1#2#3{%
|
||||
\dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index
|
||||
\begingroup
|
||||
\defname{\defheaderxcond#2\relax$$$#3}
|
||||
\defname{\defheaderxcond#2\relax$.$#3}
|
||||
{\putwordInstanceVariableof\ \code{#1}}%
|
||||
\defvarargs{#3}%
|
||||
\endgroup
|
||||
@@ -5077,7 +5128,7 @@ width0pt\relax} \fi
|
||||
% is actually part of the data type, which should not be put into the index.
|
||||
\def\deftypevarheader #1#2{%
|
||||
\dovarind#2 \relax% Make entry in variables index
|
||||
\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}%
|
||||
\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}%
|
||||
\interlinepenalty=10000
|
||||
\endgraf\nobreak\vskip -\parskip\nobreak
|
||||
\endgroup}
|
||||
@@ -5088,7 +5139,7 @@ width0pt\relax} \fi
|
||||
\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
|
||||
|
||||
\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
|
||||
\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
|
||||
\begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1}
|
||||
\interlinepenalty=10000
|
||||
\endgraf\nobreak\vskip -\parskip\nobreak
|
||||
\endgroup}
|
||||
@@ -5248,7 +5299,7 @@ width0pt\relax} \fi
|
||||
\message{Warning: redefining \the\macname}%
|
||||
\else
|
||||
\expandafter\ifx\csname \the\macname\endcsname \relax
|
||||
\else \errmessage{The name \the\macname\space is reserved}\fi
|
||||
\else \errmessage{Macro name \the\macname\space already defined}\fi
|
||||
\global\cslet{macsave.\the\macname}{\the\macname}%
|
||||
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
|
||||
% Add the macroname to \macrolist
|
||||
@@ -5799,8 +5850,15 @@ width0pt\relax} \fi
|
||||
%
|
||||
\smallfonts \rm
|
||||
%
|
||||
% Hang the footnote text off the number.
|
||||
\hang
|
||||
% Because we use hanging indentation in footnotes, a @noindent appears
|
||||
% to exdent this text, so make it be a no-op. makeinfo does not use
|
||||
% hanging indentation so @noindent can still be needed within footnote
|
||||
% text after an @example or the like (not that this is good style).
|
||||
\let\noindent = \relax
|
||||
%
|
||||
% Hang the footnote text off the number. Use \everypar in case the
|
||||
% footnote extends for more than one paragraph.
|
||||
\everypar = {\hang}%
|
||||
\textindent{\thisfootno}%
|
||||
%
|
||||
% Don't crash into the line above the footnote text. Since this
|
||||
@@ -5881,7 +5939,7 @@ width0pt\relax} \fi
|
||||
\global\warnednoepsftrue
|
||||
\fi
|
||||
\else
|
||||
\imagexxx #1,,,\finish
|
||||
\imagexxx #1,,,,,\finish
|
||||
\fi
|
||||
}
|
||||
%
|
||||
@@ -5891,33 +5949,34 @@ width0pt\relax} \fi
|
||||
% #4 is (ignored optional) html alt text.
|
||||
% #5 is (ignored optional) extension.
|
||||
% #6 is just the usual extra ignored arg for parsing this stuff.
|
||||
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{%
|
||||
\newif\ifimagevmode
|
||||
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
|
||||
\catcode`\^^M = 5 % in case we're inside an example
|
||||
\normalturnoffactive % allow _ et al. in names
|
||||
% If the image is by itself, center it.
|
||||
\ifvmode
|
||||
\imagevmodetrue
|
||||
\nobreak\bigskip
|
||||
% Usually we'll have text after the image which will insert
|
||||
% \parskip glue, so insert it here too to equalize the space
|
||||
% above and below.
|
||||
\nobreak\vskip\parskip
|
||||
\nobreak
|
||||
\line\bgroup\hss
|
||||
\fi
|
||||
%
|
||||
% Output the image.
|
||||
\ifpdf
|
||||
\centerline{\dopdfimage{#1}{#2}{#3}}%
|
||||
\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
|
||||
\begingroup
|
||||
\catcode`\^^M = 5 % in case we're inside an example
|
||||
\normalturnoffactive % allow _ et al. in names
|
||||
% If the image is by itself, center it.
|
||||
\ifvmode
|
||||
\nobreak\bigskip
|
||||
% Usually we'll have text after the image which will insert
|
||||
% \parskip glue, so insert it here too to equalize the space
|
||||
% above and below.
|
||||
\nobreak\vskip\parskip
|
||||
\nobreak
|
||||
\centerline{\epsfbox{#1.eps}}%
|
||||
\bigbreak
|
||||
\else
|
||||
% In the middle of a paragraph, no extra space.
|
||||
\epsfbox{#1.eps}%
|
||||
\fi
|
||||
\endgroup
|
||||
\epsfbox{#1.eps}%
|
||||
\fi
|
||||
}
|
||||
%
|
||||
\ifimagevmode \hss \egroup \bigbreak \fi % space after the image
|
||||
\endgroup}
|
||||
|
||||
|
||||
\message{localization,}
|
||||
@@ -6087,6 +6146,10 @@ should work if nowhere else does.}
|
||||
%
|
||||
\afourpaper
|
||||
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
|
||||
%
|
||||
% Must explicitly reset to 0 because we call \afourpaper, apparently,
|
||||
% although this does not entirely make sense.
|
||||
\globaldefs = 0
|
||||
}}
|
||||
|
||||
% Use @afourwide to print on European A4 paper in wide format.
|
||||
@@ -6136,7 +6199,7 @@ should work if nowhere else does.}
|
||||
\def\normalless{<}
|
||||
\def\normalgreater{>}
|
||||
\def\normalplus{+}
|
||||
\def\normaldollar{$}
|
||||
\def\normaldollar{$}%$ font-lock fix
|
||||
|
||||
% This macro is used to make a character print one way in ttfont
|
||||
% where it can probably just be output, and another way in other fonts,
|
||||
@@ -6185,7 +6248,7 @@ should work if nowhere else does.}
|
||||
\catcode`\+=\active
|
||||
\def+{{\tt \char 43}}
|
||||
\catcode`\$=\active
|
||||
\def${\ifusingit{{\sl\$}}\normaldollar}
|
||||
\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
|
||||
%\catcode 27=\active
|
||||
%\def^^[{$\diamondsuit$}
|
||||
|
||||
@@ -6230,7 +6293,7 @@ should work if nowhere else does.}
|
||||
@let<=@normalless
|
||||
@let>=@normalgreater
|
||||
@let+=@normalplus
|
||||
@let$=@normaldollar}
|
||||
@let$=@normaldollar}%$ font-lock fix
|
||||
|
||||
@def@normalturnoffactive{@let"=@normaldoublequote
|
||||
@let\=@normalbackslash
|
||||
@@ -6241,7 +6304,7 @@ should work if nowhere else does.}
|
||||
@let<=@normalless
|
||||
@let>=@normalgreater
|
||||
@let+=@normalplus
|
||||
@let$=@normaldollar}
|
||||
@let$=@normaldollar}%$ font-lock fix
|
||||
|
||||
% Make _ and + \other characters, temporarily.
|
||||
% This is canceled by @fixbackslash.
|
||||
|
||||
+24
-18
@@ -1,5 +1,7 @@
|
||||
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2001, 2002 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 of the License, or
|
||||
@@ -16,16 +18,20 @@
|
||||
# 02111-1307 USA
|
||||
|
||||
# We need a recent Autoconf to run a recent Autotest.
|
||||
AC_PREREQ(2.52c)
|
||||
AC_PREREQ(2.53)
|
||||
|
||||
AC_INIT([GNU Bison], [1.29a], [[email protected]])
|
||||
AC_INIT([GNU Bison], [1.35], [[email protected]])
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
|
||||
AM_INIT_AUTOMAKE([bison], [1.29a])
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER(config.h:config.hin)
|
||||
|
||||
# Initialize the test suite.
|
||||
AC_CONFIG_TESTDIR(tests)
|
||||
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
|
||||
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
|
||||
# Needed by tests/atlocal.in.
|
||||
AC_SUBST([GCC])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -33,12 +39,7 @@ AC_MINIX
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_RANLIB
|
||||
# GNU M4 is needed to build the testsuite.
|
||||
BISON_AC_PROG_GNU_M4
|
||||
if test "$ac_cv_prog_gnu_m4" != yes; then
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
M4="$missing_dir/missing m4"
|
||||
fi
|
||||
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
||||
|
||||
AC_ARG_ENABLE(gcc-warnings,
|
||||
[ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)],
|
||||
@@ -48,6 +49,9 @@ AC_ARG_ENABLE(gcc-warnings,
|
||||
esac],
|
||||
[enableval=no])
|
||||
if test "${enableval}" = yes; then
|
||||
BISON_WARNING(-Werror)
|
||||
AC_SUBST([WERROR_CFLAGS], [$WARNING_CFLAGS])
|
||||
WARNING_CFLAGS=
|
||||
BISON_WARNING(-Wall)
|
||||
BISON_WARNING(-W)
|
||||
BISON_WARNING(-Wbad-function-cast)
|
||||
@@ -60,7 +64,6 @@ if test "${enableval}" = yes; then
|
||||
BISON_WARNING(-Wshadow)
|
||||
BISON_WARNING(-Wstrict-prototypes)
|
||||
BISON_WARNING(-Wwrite-strings)
|
||||
CFLAGS="$CFLAGS $WARNING_CFLAGS"
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
@@ -81,25 +84,28 @@ AM_C_PROTOTYPES
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_ALLOCA
|
||||
AC_FUNC_OBSTACK
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
AC_FUNC_STRNLEN
|
||||
AC_CHECK_FUNCS(mkstemp setlocale)
|
||||
AC_CHECK_DECLS([stpcpy, strndup, strnlen, memchr])
|
||||
AC_REPLACE_FUNCS(stpcpy strndup strnlen strspn memchr)
|
||||
AC_CHECK_DECLS([stpcpy, strchr, strspn, strnlen, memchr, memrchr])
|
||||
AC_REPLACE_FUNCS(stpcpy strchr strspn memchr memrchr)
|
||||
jm_FUNC_MALLOC
|
||||
jm_FUNC_REALLOC
|
||||
jm_PREREQ_QUOTEARG
|
||||
jm_PREREQ_ERROR
|
||||
AM_WITH_DMALLOC
|
||||
|
||||
ALL_LINGUAS="de es et fr ja nl tr ru"
|
||||
AM_GNU_GETTEXT
|
||||
ALL_LINGUAS="de es et fr it ja nl ru sv tr"
|
||||
AM_GNU_GETTEXT(, need-ngettext)
|
||||
|
||||
# This is necessary so that .o files in LIBOBJS are also built via
|
||||
# the ANSI2KNR-filtering rules.
|
||||
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
||||
AC_SUBST(LIBOBJS)
|
||||
LIB@&t@OBJS=`echo $LIB@&t@OBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
||||
AC_SUBST(LIB@&t@OBJS)
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
config/Makefile
|
||||
intl/Makefile po/Makefile.in
|
||||
lib/Makefile src/Makefile doc/Makefile
|
||||
m4/Makefile
|
||||
tests/Makefile])
|
||||
m4/Makefile])
|
||||
|
||||
+4
-8
@@ -1,16 +1,12 @@
|
||||
Makefile
|
||||
bison.aux
|
||||
Makefile Makefile.in
|
||||
*.aux *.dvi *.log *.info* *.pdf *.ps
|
||||
stamp-*
|
||||
auto
|
||||
bison.cp
|
||||
bison.cps
|
||||
bison.dvi
|
||||
bison.fn
|
||||
bison.ky
|
||||
bison.log
|
||||
bison.pg
|
||||
bison.ps
|
||||
bison.toc
|
||||
bison.tp
|
||||
bison.vr
|
||||
refcard.dvi
|
||||
refcard.log
|
||||
refcard.ps
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
info_TEXINFOS = bison.texinfo
|
||||
man_MANS = bison.1
|
||||
|
||||
-398
@@ -1,398 +0,0 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
info_TEXINFOS = bison.texinfo
|
||||
man_MANS = bison.1
|
||||
bison_TEXINFOS = gpl.texi fdl.texi
|
||||
|
||||
EXTRA_DIST = FAQ bison.1 bison.rnh refcard.tex
|
||||
|
||||
CLEANFILES = refcard.dvi refcard.log refcard.ps
|
||||
subdir = doc
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex
|
||||
INFO_DEPS = bison.info
|
||||
DVIS = bison.dvi
|
||||
TEXINFOS = bison.texinfo
|
||||
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
DIST_COMMON = $(bison_TEXINFOS) Makefile.am Makefile.in stamp-vti \
|
||||
version.texi
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .info .ps .texinfo
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
|
||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||
@:
|
||||
$(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure.in
|
||||
@(set `$(SHELL) $(top_srcdir)/config/mdate-sh $(srcdir)/bison.texinfo`; \
|
||||
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||
echo "@set EDITION $(VERSION)"; \
|
||||
echo "@set VERSION $(VERSION)") > vti.tmp
|
||||
@cmp -s vti.tmp $(srcdir)/version.texi \
|
||||
|| (echo "Updating $(srcdir)/version.texi"; \
|
||||
cp vti.tmp $(srcdir)/version.texi)
|
||||
-@rm -f vti.tmp
|
||||
@cp $(srcdir)/version.texi $@
|
||||
|
||||
mostlyclean-vti:
|
||||
-rm -f vti.tmp
|
||||
|
||||
maintainer-clean-vti:
|
||||
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
|
||||
|
||||
bison.info: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
|
||||
bison.dvi: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
|
||||
|
||||
.texinfo.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo.dvi:
|
||||
TEXINPUTS=$(top_srcdir)/config:$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
.texinfo:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
|
||||
MAKEINFO = @MAKEINFO@
|
||||
TEXI2DVI = texi2dvi
|
||||
DVIPS = dvips
|
||||
.dvi.ps:
|
||||
$(DVIPS) $< -o $@
|
||||
|
||||
uninstall-info-am:
|
||||
$(PRE_UNINSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
(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 `CDPATH=: && cd $$d && eval echo $$base*`; do \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -f bison.aux bison.cp bison.cps bison.dvi bison.fn bison.ky bison.log \
|
||||
bison.pg bison.ps bison.toc bison.tp bison.vr
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
cd $(srcdir) && \
|
||||
for i in $(INFO_DEPS); do \
|
||||
rm -f $$i; \
|
||||
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
|
||||
rm -f $$i-[0-9]*; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
man1dir = $(mandir)/man1
|
||||
install-man1: $(man1_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="${top_distdir}" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(INFO_DEPS) $(MANS)
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am install-man
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
if test -f $$d/$$ifile; then \
|
||||
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
|
||||
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man: install-man1
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic dist-info \
|
||||
distclean distclean-generic distdir dvi dvi-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-man1 install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti mostlyclean \
|
||||
mostlyclean-aminfo mostlyclean-generic mostlyclean-vti \
|
||||
uninstall uninstall-am uninstall-info-am uninstall-man \
|
||||
uninstall-man1
|
||||
|
||||
|
||||
refcard.dvi: refcard.tex
|
||||
tex refcard.tex
|
||||
|
||||
refcard.ps: refcard.dvi
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
+2
-2
@@ -262,9 +262,9 @@ and so on.
|
||||
.ns
|
||||
.TP
|
||||
.B \-\-debug
|
||||
Output a definition of the macro
|
||||
In the parser file, define the macro
|
||||
.B YYDEBUG
|
||||
into the parser file,
|
||||
to 1 if it is not already defined,
|
||||
so that the debugging facilities are compiled.
|
||||
.TP
|
||||
.B \-v
|
||||
|
||||
-145
@@ -1,145 +0,0 @@
|
||||
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
|
||||
à partir bison.texinfo.
|
||||
|
||||
START-INFO-DIR-ENTRY
|
||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
This file documents the Bison parser generator.
|
||||
|
||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998, 1999,
|
||||
2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of
|
||||
this manual under the conditions for verbatim copying, provided also
|
||||
that the sections entitled "GNU General Public License" and "Conditions
|
||||
for Using Bison" are included exactly as in the original, and provided
|
||||
that the entire resulting derived work is distributed under the terms
|
||||
of a permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this
|
||||
manual into another language, under the above conditions for modified
|
||||
versions, except that the sections entitled "GNU General Public
|
||||
License", "Conditions for Using Bison" and this permission notice may be
|
||||
included in translations approved by the Free Software Foundation
|
||||
instead of in the original English.
|
||||
|
||||
|
||||
Indirect:
|
||||
bison.info-1: 1313
|
||||
bison.info-2: 50691
|
||||
bison.info-3: 100581
|
||||
bison.info-4: 150131
|
||||
bison.info-5: 197908
|
||||
|
||||
Tag Table:
|
||||
(Indirect)
|
||||
Node: Top1313
|
||||
Node: Introduction8969
|
||||
Node: Conditions10244
|
||||
Node: Copying11708
|
||||
Node: Concepts30911
|
||||
Node: Language and Grammar31990
|
||||
Node: Grammar in Bison37006
|
||||
Node: Semantic Values38930
|
||||
Node: Semantic Actions41031
|
||||
Node: Locations Overview42220
|
||||
Node: Bison Parser43667
|
||||
Node: Stages45979
|
||||
Node: Grammar Layout47262
|
||||
Node: Examples48519
|
||||
Node: RPN Calc49717
|
||||
Node: Rpcalc Decls50691
|
||||
Node: Rpcalc Rules52278
|
||||
Node: Rpcalc Input54078
|
||||
Node: Rpcalc Line55539
|
||||
Node: Rpcalc Expr56654
|
||||
Node: Rpcalc Lexer58599
|
||||
Node: Rpcalc Main61171
|
||||
Node: Rpcalc Error61569
|
||||
Node: Rpcalc Gen62577
|
||||
Node: Rpcalc Compile63726
|
||||
Node: Infix Calc64601
|
||||
Node: Simple Error Recovery67308
|
||||
Node: Location Tracking Calc69197
|
||||
Node: Ltcalc Decls69927
|
||||
Node: Ltcalc Rules70836
|
||||
Node: Ltcalc Lexer72897
|
||||
Node: Multi-function Calc75235
|
||||
Node: Mfcalc Decl76802
|
||||
Node: Mfcalc Rules78825
|
||||
Node: Mfcalc Symtab80205
|
||||
Node: Exercises86578
|
||||
Node: Grammar File87084
|
||||
Node: Grammar Outline87932
|
||||
Node: C Declarations88666
|
||||
Node: Bison Declarations89246
|
||||
Node: Grammar Rules89658
|
||||
Node: C Code90118
|
||||
Node: Symbols91048
|
||||
Node: Rules96129
|
||||
Node: Recursion97768
|
||||
Node: Semantics99487
|
||||
Node: Value Type100581
|
||||
Node: Multiple Types101253
|
||||
Node: Actions102270
|
||||
Node: Action Types105055
|
||||
Node: Mid-Rule Actions106358
|
||||
Node: Locations111928
|
||||
Node: Location Type112576
|
||||
Node: Actions and Locations113134
|
||||
Node: Location Default Action115290
|
||||
Node: Declarations116753
|
||||
Node: Token Decl118072
|
||||
Node: Precedence Decl120085
|
||||
Node: Union Decl121636
|
||||
Node: Type Decl122480
|
||||
Node: Expect Decl123386
|
||||
Node: Start Decl124932
|
||||
Node: Pure Decl125310
|
||||
Node: Decl Summary126987
|
||||
Node: Multiple Parsers132370
|
||||
Node: Interface133864
|
||||
Node: Parser Function134736
|
||||
Node: Lexical135571
|
||||
Node: Calling Convention136977
|
||||
Node: Token Values139748
|
||||
Node: Token Positions140897
|
||||
Node: Pure Calling141782
|
||||
Node: Error Reporting144714
|
||||
Node: Action Features146836
|
||||
Node: Algorithm150131
|
||||
Node: Look-Ahead152424
|
||||
Node: Shift/Reduce154556
|
||||
Node: Precedence157468
|
||||
Node: Why Precedence158119
|
||||
Node: Using Precedence159984
|
||||
Node: Precedence Examples160952
|
||||
Node: How Precedence161653
|
||||
Node: Contextual Precedence162802
|
||||
Node: Parser States164593
|
||||
Node: Reduce/Reduce165836
|
||||
Node: Mystery Conflicts169397
|
||||
Node: Stack Overflow172783
|
||||
Node: Error Recovery174156
|
||||
Node: Context Dependency179292
|
||||
Node: Semantic Tokens180140
|
||||
Node: Lexical Tie-ins183157
|
||||
Node: Tie-in Recovery184705
|
||||
Node: Debugging186877
|
||||
Node: Invocation190178
|
||||
Node: Bison Options191430
|
||||
Node: Environment Variables195398
|
||||
Node: Option Cross Key196246
|
||||
Node: VMS Invocation197124
|
||||
Node: Table of Symbols197908
|
||||
Node: Glossary205547
|
||||
Node: Copying This Manual211851
|
||||
Node: GNU Free Documentation License212060
|
||||
Node: Index231925
|
||||
|
||||
End Tag Table
|
||||
-1076
File diff suppressed because it is too large
Load Diff
-1427
File diff suppressed because it is too large
Load Diff
-1317
File diff suppressed because it is too large
Load Diff
-1261
File diff suppressed because it is too large
Load Diff
-1036
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -56,7 +56,8 @@ foo_tab.c.
|
||||
.indent -1
|
||||
2 /DEBUG
|
||||
.skip
|
||||
Output a definition of the macro YYDEBUG into the parser file,
|
||||
In the parser file,
|
||||
define the macro YYDEBUG to 1 if it is not already defined,
|
||||
so that the debugging facilities are compiled.
|
||||
.skip
|
||||
.indent -1
|
||||
|
||||
+294
-198
@@ -304,6 +304,8 @@ Invoking Bison
|
||||
* Bison Options:: All the options described in detail,
|
||||
in alphabetical order by short options.
|
||||
* Option Cross Key:: Alphabetical list of long options.
|
||||
* Extension Limitations Under DOS:: Bison output files extension differences
|
||||
depending on the DOS/Windows file system flavour used.
|
||||
* VMS Invocation:: Bison command syntax on VMS.
|
||||
|
||||
Copying This Manual
|
||||
@@ -447,16 +449,26 @@ lexicography, not grammar.)
|
||||
|
||||
Here is a simple C function subdivided into tokens:
|
||||
|
||||
@ifinfo
|
||||
@example
|
||||
int /* @r{keyword `int'} */
|
||||
square (x) /* @r{identifier, open-paren,} */
|
||||
/* @r{identifier, close-paren} */
|
||||
int x; /* @r{keyword `int', identifier, semicolon} */
|
||||
square (int x) /* @r{identifier, open-paren, identifier,}
|
||||
@r{identifier, close-paren} */
|
||||
@{ /* @r{open-brace} */
|
||||
return x * x; /* @r{keyword `return', identifier,} */
|
||||
/* @r{asterisk, identifier, semicolon} */
|
||||
return x * x; /* @r{keyword `return', identifier, asterisk,
|
||||
identifier, semicolon} */
|
||||
@} /* @r{close-brace} */
|
||||
@end example
|
||||
@end ifinfo
|
||||
@ifnotinfo
|
||||
@example
|
||||
int /* @r{keyword `int'} */
|
||||
square (int x) /* @r{identifier, open-paren, identifier, identifier, close-paren} */
|
||||
@{ /* @r{open-brace} */
|
||||
return x * x; /* @r{keyword `return', identifier, asterisk, identifier, semicolon} */
|
||||
@} /* @r{close-brace} */
|
||||
@end example
|
||||
@end ifnotinfo
|
||||
|
||||
The syntactic groupings of C include the expression, the statement, the
|
||||
declaration, and the function definition. These are represented in the
|
||||
@@ -683,7 +695,7 @@ arrange for it to call @code{yyparse} or the parser will never run.
|
||||
@xref{Interface, ,Parser C-Language Interface}.
|
||||
|
||||
Aside from the token type names and the symbols in the actions you
|
||||
write, all variable and function names used in the Bison parser file
|
||||
write, all symbols defined in the Bison parser file itself
|
||||
begin with @samp{yy} or @samp{YY}. This includes interface functions
|
||||
such as the lexical analyzer function @code{yylex}, the error reporting
|
||||
function @code{yyerror} and the parser function @code{yyparse} itself.
|
||||
@@ -692,6 +704,14 @@ Therefore, you should avoid using C identifiers starting with @samp{yy}
|
||||
or @samp{YY} in the Bison grammar file except for the ones defined in
|
||||
this manual.
|
||||
|
||||
In some cases the Bison parser file includes system headers, and in
|
||||
those cases your code should respect the identifiers reserved by those
|
||||
headers. On some non-@sc{gnu} hosts, @code{<alloca.h>},
|
||||
@code{<stddef.h>}, and @code{<stdlib.h>} are included as needed to
|
||||
declare memory allocators and related types.
|
||||
Other system headers may be included if you define @code{YYDEBUG} to a
|
||||
nonzero value (@pxref{Debugging, ,Debugging Your Parser}).
|
||||
|
||||
@node Stages
|
||||
@section Stages in Using Bison
|
||||
@cindex stages in using Bison
|
||||
@@ -855,11 +875,12 @@ The C declarations section (@pxref{C Declarations, ,The C Declarations Section})
|
||||
preprocessor directives.
|
||||
|
||||
The @code{#define} directive defines the macro @code{YYSTYPE}, thus
|
||||
specifying the C data type for semantic values of both tokens and groupings
|
||||
(@pxref{Value Type, ,Data Types of Semantic Values}). The Bison parser will use whatever type
|
||||
@code{YYSTYPE} is defined as; if you don't define it, @code{int} is the
|
||||
default. Because we specify @code{double}, each token and each expression
|
||||
has an associated value, which is a floating point number.
|
||||
specifying the C data type for semantic values of both tokens and
|
||||
groupings (@pxref{Value Type, ,Data Types of Semantic Values}). The
|
||||
Bison parser will use whatever type @code{YYSTYPE} is defined as; if you
|
||||
don't define it, @code{int} is the default. Because we specify
|
||||
@code{double}, each token and each expression has an associated value,
|
||||
which is a floating point number.
|
||||
|
||||
The @code{#include} directive is used to declare the exponentiation
|
||||
function @code{pow}.
|
||||
@@ -1066,10 +1087,11 @@ token type is an identifier, that identifier is defined by Bison as a C
|
||||
macro whose definition is the appropriate number. In this example,
|
||||
therefore, @code{NUM} becomes a macro for @code{yylex} to use.
|
||||
|
||||
The semantic value of the token (if it has one) is stored into the global
|
||||
variable @code{yylval}, which is where the Bison parser will look for it.
|
||||
(The C data type of @code{yylval} is @code{YYSTYPE}, which was defined
|
||||
at the beginning of the grammar; @pxref{Rpcalc Decls, ,Declarations for @code{rpcalc}}.)
|
||||
The semantic value of the token (if it has one) is stored into the
|
||||
global variable @code{yylval}, which is where the Bison parser will look
|
||||
for it. (The C data type of @code{yylval} is @code{YYSTYPE}, which was
|
||||
defined at the beginning of the grammar; @pxref{Rpcalc Decls,
|
||||
,Declarations for @code{rpcalc}}.)
|
||||
|
||||
A token type code of zero is returned if the end-of-file is encountered.
|
||||
(Bison recognizes any nonpositive value as indicating the end of the
|
||||
@@ -1202,19 +1224,19 @@ Here is how to compile and run the parser file:
|
||||
@example
|
||||
@group
|
||||
# @r{List files in current directory.}
|
||||
% ls
|
||||
$ @kbd{ls}
|
||||
rpcalc.tab.c rpcalc.y
|
||||
@end group
|
||||
|
||||
@group
|
||||
# @r{Compile the Bison parser.}
|
||||
# @r{@samp{-lm} tells compiler to search math library for @code{pow}.}
|
||||
% cc rpcalc.tab.c -lm -o rpcalc
|
||||
$ @kbd{cc rpcalc.tab.c -lm -o rpcalc}
|
||||
@end group
|
||||
|
||||
@group
|
||||
# @r{List files again.}
|
||||
% ls
|
||||
$ @kbd{ls}
|
||||
rpcalc rpcalc.tab.c rpcalc.y
|
||||
@end group
|
||||
@end example
|
||||
@@ -1223,19 +1245,19 @@ The file @file{rpcalc} now contains the executable code. Here is an
|
||||
example session using @code{rpcalc}.
|
||||
|
||||
@example
|
||||
% rpcalc
|
||||
4 9 +
|
||||
$ @kbd{rpcalc}
|
||||
@kbd{4 9 +}
|
||||
13
|
||||
3 7 + 3 4 5 *+-
|
||||
@kbd{3 7 + 3 4 5 *+-}
|
||||
-13
|
||||
3 7 + 3 4 5 * + - n @r{Note the unary minus, @samp{n}}
|
||||
@kbd{3 7 + 3 4 5 * + - n} @r{Note the unary minus, @samp{n}}
|
||||
13
|
||||
5 6 / 4 n +
|
||||
@kbd{5 6 / 4 n +}
|
||||
-3.166666667
|
||||
3 4 ^ @r{Exponentiation}
|
||||
@kbd{3 4 ^} @r{Exponentiation}
|
||||
81
|
||||
^D @r{End-of-file indicator}
|
||||
%
|
||||
@kbd{^D} @r{End-of-file indicator}
|
||||
$
|
||||
@end example
|
||||
|
||||
@node Infix Calc
|
||||
@@ -1315,12 +1337,12 @@ Here is a sample run of @file{calc.y}:
|
||||
|
||||
@need 500
|
||||
@example
|
||||
% calc
|
||||
4 + 4.5 - (34/(8*3+-3))
|
||||
$ @kbd{calc}
|
||||
@kbd{4 + 4.5 - (34/(8*3+-3))}
|
||||
6.880952381
|
||||
-56 + 2
|
||||
@kbd{-56 + 2}
|
||||
-54
|
||||
3 ^ 2
|
||||
@kbd{3 ^ 2}
|
||||
9
|
||||
@end example
|
||||
|
||||
@@ -1372,13 +1394,11 @@ Bison programs.
|
||||
@cindex @code{ltcalc}
|
||||
@cindex calculator, location tracking
|
||||
|
||||
This example extends the infix notation calculator with location tracking.
|
||||
This feature will be used to improve error reporting, and provide better
|
||||
error messages.
|
||||
|
||||
For the sake of clarity, we will switch for this example to an integer
|
||||
calculator, since most of the work needed to use locations will be done
|
||||
in the lexical analyser.
|
||||
This example extends the infix notation calculator with location
|
||||
tracking. This feature will be used to improve the error messages. For
|
||||
the sake of clarity, this example is a simple integer calculator, since
|
||||
most of the work needed to use locations will be done in the lexical
|
||||
analyser.
|
||||
|
||||
@menu
|
||||
* Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
|
||||
@@ -1389,8 +1409,8 @@ in the lexical analyser.
|
||||
@node Ltcalc Decls
|
||||
@subsection Declarations for @code{ltcalc}
|
||||
|
||||
The C and Bison declarations for the location tracking calculator are the same
|
||||
as the declarations for the infix notation calculator.
|
||||
The C and Bison declarations for the location tracking calculator are
|
||||
the same as the declarations for the infix notation calculator.
|
||||
|
||||
@example
|
||||
/* Location tracking calculator. */
|
||||
@@ -1411,22 +1431,24 @@ as the declarations for the infix notation calculator.
|
||||
%% /* Grammar follows */
|
||||
@end example
|
||||
|
||||
In the code above, there are no declarations specific to locations. Defining
|
||||
a data type for storing locations is not needed: we will use the type provided
|
||||
by default (@pxref{Location Type, ,Data Types of Locations}), which is a four
|
||||
member structure with the following integer fields: @code{first_line},
|
||||
@code{first_column}, @code{last_line} and @code{last_column}.
|
||||
@noindent
|
||||
Note there are no declarations specific to locations. Defining a data
|
||||
type for storing locations is not needed: we will use the type provided
|
||||
by default (@pxref{Location Type, ,Data Types of Locations}), which is a
|
||||
four member structure with the following integer fields:
|
||||
@code{first_line}, @code{first_column}, @code{last_line} and
|
||||
@code{last_column}.
|
||||
|
||||
@node Ltcalc Rules
|
||||
@subsection Grammar Rules for @code{ltcalc}
|
||||
|
||||
Whether you choose to handle locations or not has no effect on the syntax of
|
||||
your language. Therefore, grammar rules for this example will be very close to
|
||||
those of the previous example: we will only modify them to benefit from the new
|
||||
informations we will have.
|
||||
Whether handling locations or not has no effect on the syntax of your
|
||||
language. Therefore, grammar rules for this example will be very close
|
||||
to those of the previous example: we will only modify them to benefit
|
||||
from the new information.
|
||||
|
||||
Here, we will use locations to report divisions by zero, and locate the wrong
|
||||
expressions or subexpressions.
|
||||
Here, we will use locations to report divisions by zero, and locate the
|
||||
wrong expressions or subexpressions.
|
||||
|
||||
@example
|
||||
@group
|
||||
@@ -1447,17 +1469,17 @@ exp : NUM @{ $$ = $1; @}
|
||||
| exp '-' exp @{ $$ = $1 - $3; @}
|
||||
| exp '*' exp @{ $$ = $1 * $3; @}
|
||||
@end group
|
||||
| exp '/' exp
|
||||
@group
|
||||
| exp '/' exp
|
||||
@{
|
||||
if ($3)
|
||||
$$ = $1 / $3;
|
||||
else
|
||||
@{
|
||||
$$ = 1;
|
||||
printf("Division by zero, l%d,c%d-l%d,c%d",
|
||||
@@3.first_line, @@3.first_column,
|
||||
@@3.last_line, @@3.last_column);
|
||||
fprintf (stderr, "%d.%d-%d.%d: division by zero",
|
||||
@@3.first_line, @@3.first_column,
|
||||
@@3.last_line, @@3.last_column);
|
||||
@}
|
||||
@}
|
||||
@end group
|
||||
@@ -1472,25 +1494,24 @@ This code shows how to reach locations inside of semantic actions, by
|
||||
using the pseudo-variables @code{@@@var{n}} for rule components, and the
|
||||
pseudo-variable @code{@@$} for groupings.
|
||||
|
||||
In this example, we never assign a value to @code{@@$}, because the
|
||||
output parser can do this automatically. By default, before executing
|
||||
the C code of each action, @code{@@$} is set to range from the beginning
|
||||
of @code{@@1} to the end of @code{@@@var{n}}, for a rule with @var{n}
|
||||
components.
|
||||
|
||||
Of course, this behavior can be redefined (@pxref{Location Default
|
||||
Action, , Default Action for Locations}), and for very specific rules,
|
||||
@code{@@$} can be computed by hand.
|
||||
We don't need to assign a value to @code{@@$}: the output parser does it
|
||||
automatically. By default, before executing the C code of each action,
|
||||
@code{@@$} is set to range from the beginning of @code{@@1} to the end
|
||||
of @code{@@@var{n}}, for a rule with @var{n} components. This behavior
|
||||
can be redefined (@pxref{Location Default Action, , Default Action for
|
||||
Locations}), and for very specific rules, @code{@@$} can be computed by
|
||||
hand.
|
||||
|
||||
@node Ltcalc Lexer
|
||||
@subsection The @code{ltcalc} Lexical Analyzer.
|
||||
|
||||
Until now, we relied on Bison's defaults to enable location tracking. The next
|
||||
step is to rewrite the lexical analyser, and make it able to feed the parser
|
||||
with locations of tokens, as he already does for semantic values.
|
||||
Until now, we relied on Bison's defaults to enable location
|
||||
tracking. The next step is to rewrite the lexical analyser, and make it
|
||||
able to feed the parser with the token locations, as it already does for
|
||||
semantic values.
|
||||
|
||||
To do so, we must take into account every single character of the input text,
|
||||
to avoid the computed locations of being fuzzy or wrong:
|
||||
To this end, we must take into account every single character of the
|
||||
input text, to avoid the computed locations of being fuzzy or wrong:
|
||||
|
||||
@example
|
||||
@group
|
||||
@@ -1540,17 +1561,18 @@ yylex (void)
|
||||
@}
|
||||
@end example
|
||||
|
||||
Basically, the lexical analyzer does the same processing as before: it skips
|
||||
blanks and tabs, and reads numbers or single-character tokens. In addition
|
||||
to this, it updates the @code{yylloc} global variable (of type @code{YYLTYPE}),
|
||||
where the location of tokens is stored.
|
||||
Basically, the lexical analyzer performs the same processing as before:
|
||||
it skips blanks and tabs, and reads numbers or single-character tokens.
|
||||
In addition, it updates @code{yylloc}, the global variable (of type
|
||||
@code{YYLTYPE}) containing the token's location.
|
||||
|
||||
Now, each time this function returns a token, the parser has it's number as
|
||||
well as it's semantic value, and it's position in the text. The last needed
|
||||
change is to initialize @code{yylloc}, for example in the controlling
|
||||
function:
|
||||
Now, each time this function returns a token, the parser has its number
|
||||
as well as its semantic value, and its location in the text. The last
|
||||
needed change is to initialize @code{yylloc}, for example in the
|
||||
controlling function:
|
||||
|
||||
@example
|
||||
@group
|
||||
int
|
||||
main (void)
|
||||
@{
|
||||
@@ -1558,11 +1580,12 @@ main (void)
|
||||
yylloc.first_column = yylloc.last_column = 0;
|
||||
return yyparse ();
|
||||
@}
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Remember that computing locations is not a matter of syntax. Every character
|
||||
must be associated to a location update, whether it is in valid input, in
|
||||
comments, in literal strings, and so on...
|
||||
Remember that computing locations is not a matter of syntax. Every
|
||||
character must be associated to a location update, whether it is in
|
||||
valid input, in comments, in literal strings, and so on.
|
||||
|
||||
@node Multi-function Calc
|
||||
@section Multi-Function Calculator: @code{mfcalc}
|
||||
@@ -1592,20 +1615,20 @@ to create named variables, store values in them, and use them later.
|
||||
Here is a sample session with the multi-function calculator:
|
||||
|
||||
@example
|
||||
% mfcalc
|
||||
pi = 3.141592653589
|
||||
$ @kbd{mfcalc}
|
||||
@kbd{pi = 3.141592653589}
|
||||
3.1415926536
|
||||
sin(pi)
|
||||
@kbd{sin(pi)}
|
||||
0.0000000000
|
||||
alpha = beta1 = 2.3
|
||||
@kbd{alpha = beta1 = 2.3}
|
||||
2.3000000000
|
||||
alpha
|
||||
@kbd{alpha}
|
||||
2.3000000000
|
||||
ln(alpha)
|
||||
@kbd{ln(alpha)}
|
||||
0.8329091229
|
||||
exp(ln(beta1))
|
||||
@kbd{exp(ln(beta1))}
|
||||
2.3000000000
|
||||
%
|
||||
$
|
||||
@end example
|
||||
|
||||
Note that multiple assignment and nested function calls are permitted.
|
||||
@@ -2374,7 +2397,8 @@ the numbers associated with @var{x} and @var{y}.
|
||||
|
||||
In a simple program it may be sufficient to use the same data type for
|
||||
the semantic values of all language constructs. This was true in the
|
||||
RPN and infix calculator examples (@pxref{RPN Calc, ,Reverse Polish Notation Calculator}).
|
||||
RPN and infix calculator examples (@pxref{RPN Calc, ,Reverse Polish
|
||||
Notation Calculator}).
|
||||
|
||||
Bison's default is to use type @code{int} for all semantic values. To
|
||||
specify some other type, define @code{YYSTYPE} as a macro, like this:
|
||||
@@ -3067,11 +3091,11 @@ terminal symbol. All kinds of token declarations allow
|
||||
@findex %expect
|
||||
|
||||
Bison normally warns if there are any conflicts in the grammar
|
||||
(@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars have harmless shift/reduce
|
||||
conflicts which are resolved in a predictable way and would be difficult to
|
||||
eliminate. It is desirable to suppress the warning about these conflicts
|
||||
unless the number of conflicts changes. You can do this with the
|
||||
@code{%expect} declaration.
|
||||
(@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars
|
||||
have harmless shift/reduce conflicts which are resolved in a predictable
|
||||
way and would be difficult to eliminate. It is desirable to suppress
|
||||
the warning about these conflicts unless the number of conflicts
|
||||
changes. You can do this with the @code{%expect} declaration.
|
||||
|
||||
The declaration looks like this:
|
||||
|
||||
@@ -3079,10 +3103,11 @@ The declaration looks like this:
|
||||
%expect @var{n}
|
||||
@end example
|
||||
|
||||
Here @var{n} is a decimal integer. The declaration says there should be no
|
||||
warning if there are @var{n} shift/reduce conflicts and no reduce/reduce
|
||||
conflicts. The usual warning is given if there are either more or fewer
|
||||
conflicts, or if there are any reduce/reduce conflicts.
|
||||
Here @var{n} is a decimal integer. The declaration says there should be
|
||||
no warning if there are @var{n} shift/reduce conflicts and no
|
||||
reduce/reduce conflicts. An error, instead of the usual warning, is
|
||||
given if there are either more or fewer conflicts, or if there are any
|
||||
reduce/reduce conflicts.
|
||||
|
||||
In general, using @code{%expect} involves these steps:
|
||||
|
||||
@@ -3167,7 +3192,7 @@ valid grammar.
|
||||
@cindex declaration summary
|
||||
@cindex summary, Bison declaration
|
||||
|
||||
Here is a summary of all Bison declarations:
|
||||
Here is a summary of the declarations used to define a grammar:
|
||||
|
||||
@table @code
|
||||
@item %union
|
||||
@@ -3202,44 +3227,18 @@ Start-Symbol}).
|
||||
@item %expect
|
||||
Declare the expected number of shift-reduce conflicts
|
||||
(@pxref{Expect Decl, ,Suppressing Conflict Warnings}).
|
||||
@end table
|
||||
|
||||
@item %yacc
|
||||
@itemx %fixed_output_files
|
||||
Pretend the option @option{--yacc} was given, i.e., imitate Yacc,
|
||||
including its naming conventions. @xref{Bison Options}, for more.
|
||||
|
||||
@item %locations
|
||||
Generate the code processing the locations (@pxref{Action Features,
|
||||
,Special Features for Use in Actions}). This mode is enabled as soon as
|
||||
the grammar uses the special @samp{@@@var{n}} tokens, but if your
|
||||
grammar does not use it, using @samp{%locations} allows for more
|
||||
accurate parse error messages.
|
||||
|
||||
@item %pure_parser
|
||||
Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
|
||||
(Reentrant) Parser}).
|
||||
|
||||
@item %no_parser
|
||||
Do not include any C code in the parser file; generate tables only. The
|
||||
parser file contains just @code{#define} directives and static variable
|
||||
declarations.
|
||||
|
||||
This option also tells Bison to write the C code for the grammar actions
|
||||
into a file named @file{@var{filename}.act}, in the form of a
|
||||
brace-surrounded body fit for a @code{switch} statement.
|
||||
|
||||
@item %no_lines
|
||||
Don't generate any @code{#line} preprocessor commands in the parser
|
||||
file. Ordinarily Bison writes these commands in the parser file so that
|
||||
the C compiler and debuggers will associate errors and object code with
|
||||
your source file (the grammar file). This directive causes them to
|
||||
associate errors with the parser file, treating it an independent source
|
||||
file in its own right.
|
||||
@sp 1
|
||||
@noindent
|
||||
In order to change the behavior of @command{bison}, use the following
|
||||
directives:
|
||||
|
||||
@table @code
|
||||
@item %debug
|
||||
Output a definition of the macro @code{YYDEBUG} into the parser file, so
|
||||
that the debugging facilities are compiled. @xref{Debugging, ,Debugging
|
||||
Your Parser}.
|
||||
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
|
||||
already defined, so that the debugging facilities are compiled.
|
||||
@xref{Debugging, ,Debugging Your Parser}.
|
||||
|
||||
@item %defines
|
||||
Write an extra output file containing macro definitions for the token
|
||||
@@ -3254,35 +3253,64 @@ This output file is essential if you wish to put the definition of
|
||||
be able to refer to token type codes and the variable
|
||||
@code{yylval}. @xref{Token Values, ,Semantic Values of Tokens}.@refill
|
||||
|
||||
@item %file-prefix="@var{prefix}"
|
||||
Specify a prefix to use for all Bison output file names. The names are
|
||||
chosen as if the input file were named @file{@var{prefix}.y}.
|
||||
|
||||
@c @item %header_extension
|
||||
@c Specify the extension of the parser header file generated when
|
||||
@c @code{%define} or @samp{-d} are used.
|
||||
@c
|
||||
@c For example, a grammar file named @file{foo.ypp} and containing a
|
||||
@c @code{%header_extension .hh} directive will produce a header file
|
||||
@c named @file{foo.tab.hh}
|
||||
|
||||
@item %locations
|
||||
Generate the code processing the locations (@pxref{Action Features,
|
||||
,Special Features for Use in Actions}). This mode is enabled as soon as
|
||||
the grammar uses the special @samp{@@@var{n}} tokens, but if your
|
||||
grammar does not use it, using @samp{%locations} allows for more
|
||||
accurate parse error messages.
|
||||
|
||||
@item %name-prefix="@var{prefix}"
|
||||
Rename the external symbols used in the parser so that they start with
|
||||
@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
|
||||
is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
|
||||
@code{yylval}, @code{yychar} and @code{yydebug}. For example, if you
|
||||
use @samp{%name-prefix="c_"}, the names become @code{c_parse},
|
||||
@code{c_lex}, and so on. @xref{Multiple Parsers, ,Multiple Parsers in
|
||||
the Same Program}.
|
||||
|
||||
@item %no-parser
|
||||
Do not include any C code in the parser file; generate tables only. The
|
||||
parser file contains just @code{#define} directives and static variable
|
||||
declarations.
|
||||
|
||||
This option also tells Bison to write the C code for the grammar actions
|
||||
into a file named @file{@var{filename}.act}, in the form of a
|
||||
brace-surrounded body fit for a @code{switch} statement.
|
||||
|
||||
@item %no-lines
|
||||
Don't generate any @code{#line} preprocessor commands in the parser
|
||||
file. Ordinarily Bison writes these commands in the parser file so that
|
||||
the C compiler and debuggers will associate errors and object code with
|
||||
your source file (the grammar file). This directive causes them to
|
||||
associate errors with the parser file, treating it an independent source
|
||||
file in its own right.
|
||||
|
||||
@item %output="@var{filename}"
|
||||
Specify the @var{filename} for the parser file.
|
||||
|
||||
@item %pure-parser
|
||||
Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
|
||||
(Reentrant) Parser}).
|
||||
|
||||
@c @item %source_extension
|
||||
@c Specify the extension of the parser output file.
|
||||
@c
|
||||
@c For example, a grammar file named @file{foo.yy} and containing a
|
||||
@c @code{%source_extension .cpp} directive will produce a parser file
|
||||
@c named @file{foo.tab.cpp}
|
||||
@c
|
||||
@c @item %header_extension
|
||||
@c Specify the extension of the parser header file generated when
|
||||
@c @code{%define} or @samp{-d} are used.
|
||||
@c
|
||||
@c For example, a garmmar file named @file{foo.ypp} and containing a
|
||||
@c @code{%header_extension .hh} directive will produce a header file
|
||||
@c named @file{foo.tab.hh}
|
||||
|
||||
@item %verbose
|
||||
Write an extra output file containing verbose descriptions of the
|
||||
parser states and what is done for each type of look-ahead token in
|
||||
that state.
|
||||
|
||||
This file also describes all the conflicts, both those resolved by
|
||||
operator precedence and the unresolved ones.
|
||||
|
||||
The file's name is made by removing @samp{.tab.c} or @samp{.c} from
|
||||
the parser output file name, and adding @samp{.output} instead.@refill
|
||||
|
||||
Therefore, if the input file is @file{foo.y}, then the parser file is
|
||||
called @file{foo.tab.c} by default. As a consequence, the verbose
|
||||
output file is called @file{foo.output}.@refill
|
||||
|
||||
@item %token_table
|
||||
Generate an array of token names in the parser file. The name of the
|
||||
@@ -3316,8 +3344,31 @@ The number of grammar rules,
|
||||
@item YYNSTATES
|
||||
The number of parser states (@pxref{Parser States}).
|
||||
@end table
|
||||
|
||||
@item %verbose
|
||||
Write an extra output file containing verbose descriptions of the
|
||||
parser states and what is done for each type of look-ahead token in
|
||||
that state.
|
||||
|
||||
This file also describes all the conflicts, both those resolved by
|
||||
operator precedence and the unresolved ones.
|
||||
|
||||
The file's name is made by removing @samp{.tab.c} or @samp{.c} from
|
||||
the parser output file name, and adding @samp{.output} instead.@refill
|
||||
|
||||
Therefore, if the input file is @file{foo.y}, then the parser file is
|
||||
called @file{foo.tab.c} by default. As a consequence, the verbose
|
||||
output file is called @file{foo.output}.@refill
|
||||
|
||||
@item %yacc
|
||||
@itemx %fixed-output-files
|
||||
Pretend the option @option{--yacc} was given, i.e., imitate Yacc,
|
||||
including its naming conventions. @xref{Bison Options}, for more.
|
||||
@end table
|
||||
|
||||
|
||||
|
||||
|
||||
@node Multiple Parsers
|
||||
@section Multiple Parsers in the Same Program
|
||||
|
||||
@@ -4875,15 +4926,21 @@ If a Bison grammar compiles properly but doesn't do what you want when it
|
||||
runs, the @code{yydebug} parser-trace feature can help you figure out why.
|
||||
|
||||
To enable compilation of trace facilities, you must define the macro
|
||||
@code{YYDEBUG} when you compile the parser. You could use
|
||||
@samp{-DYYDEBUG=1} as a compiler option or you could put @samp{#define
|
||||
YYDEBUG 1} in the C declarations section of the grammar file
|
||||
(@pxref{C Declarations, ,The C Declarations Section}). Alternatively, use the @samp{-t} option when
|
||||
you run Bison (@pxref{Invocation, ,Invoking Bison}). We always define @code{YYDEBUG} so that
|
||||
debugging is always possible.
|
||||
@code{YYDEBUG} to a nonzero value when you compile the parser. You
|
||||
could use @samp{-DYYDEBUG=1} as a compiler option or you could put
|
||||
@samp{#define YYDEBUG 1} in the C declarations section of the grammar
|
||||
file (@pxref{C Declarations, ,The C Declarations Section}).
|
||||
Alternatively, use the @samp{-t} option when you run Bison
|
||||
(@pxref{Invocation, ,Invoking Bison}) or the @code{%debug} declaration
|
||||
(@pxref{Decl Summary, ,Bison Declaration Summary}). We suggest that
|
||||
you always define @code{YYDEBUG} so that debugging is always possible.
|
||||
|
||||
The trace facility uses @code{stderr}, so you must add @w{@code{#include
|
||||
<stdio.h>}} to the C declarations section unless it is already there.
|
||||
The trace facility outputs messages with macro calls of the form
|
||||
@code{YYFPRINTF (stderr, @var{format}, @var{args})} where
|
||||
@var{format} and @var{args} are the usual @code{printf} format and
|
||||
arguments. If you define @code{YYDEBUG} to a nonzero value but do not
|
||||
define @code{YYFPRINTF}, @code{<stdio.h>} is automatically included
|
||||
and @code{YYPRINTF} is defined to @code{fprintf}.
|
||||
|
||||
Once you have compiled the program with trace facilities, the way to
|
||||
request a trace is to store a nonzero value in the variable @code{yydebug}.
|
||||
@@ -4962,7 +5019,7 @@ Here @var{infile} is the grammar file name, which usually ends in
|
||||
@samp{.y}. The parser file's name is made by replacing the @samp{.y}
|
||||
with @samp{.tab.c}. Thus, the @samp{bison foo.y} filename yields
|
||||
@file{foo.tab.c}, and the @samp{bison hack/foo.y} filename yields
|
||||
@file{hack/foo.tab.c}. It's is also possible, in case you are writting
|
||||
@file{hack/foo.tab.c}. It's is also possible, in case you are writing
|
||||
C++ code instead of C in your grammar file, to name it @file{foo.ypp}
|
||||
or @file{foo.y++}. Then, the output files will take an extention like
|
||||
the given one as input (repectively @file{foo.tab.cpp} and @file{foo.tab.c++}).
|
||||
@@ -4989,6 +5046,8 @@ will produce @file{output.c++} and @file{outfile.h++}.
|
||||
in alphabetical order by short options.
|
||||
* Environment Variables:: Variables which affect Bison execution.
|
||||
* Option Cross Key:: Alphabetical list of long options.
|
||||
* Extension Limitations Under DOS:: Bison output files extension differences
|
||||
depending on the DOS/Windows file system flavour used.
|
||||
* VMS Invocation:: Bison command syntax on VMS.
|
||||
@end menu
|
||||
|
||||
@@ -5044,24 +5103,17 @@ you are developing Bison.
|
||||
|
||||
@item -t
|
||||
@itemx --debug
|
||||
Output a definition of the macro @code{YYDEBUG} into the parser file, so
|
||||
that the debugging facilities are compiled. @xref{Debugging, ,Debugging
|
||||
Your Parser}.
|
||||
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
|
||||
already defined, so that the debugging facilities are compiled.
|
||||
@xref{Debugging, ,Debugging Your Parser}.
|
||||
|
||||
@item --locations
|
||||
Pretend that @code{%locactions} was specified. @xref{Decl Summary}.
|
||||
Pretend that @code{%locations} was specified. @xref{Decl Summary}.
|
||||
|
||||
@item -p @var{prefix}
|
||||
@itemx --name-prefix=@var{prefix}
|
||||
Rename the external symbols used in the parser so that they start with
|
||||
@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
|
||||
is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
|
||||
@code{yylval}, @code{yychar} and @code{yydebug}.
|
||||
|
||||
For example, if you use @samp{-p c}, the names become @code{cparse},
|
||||
@code{clex}, and so on.
|
||||
|
||||
@xref{Multiple Parsers, ,Multiple Parsers in the Same Program}.
|
||||
Pretend that @code{%name-prefix="@var{prefix}"} was specified.
|
||||
@xref{Decl Summary}.
|
||||
|
||||
@item -l
|
||||
@itemx --no-lines
|
||||
@@ -5073,11 +5125,11 @@ parser file, treating it as an independent source file in its own right.
|
||||
|
||||
@item -n
|
||||
@itemx --no-parser
|
||||
Pretend that @code{%no_parser} was specified. @xref{Decl Summary}.
|
||||
Pretend that @code{%no-parser} was specified. @xref{Decl Summary}.
|
||||
|
||||
@item -k
|
||||
@itemx --token-table
|
||||
Pretend that @code{%token_table} was specified. @xref{Decl Summary}.
|
||||
Pretend that @code{%token-table} was specified. @xref{Decl Summary}.
|
||||
@end table
|
||||
|
||||
@noindent
|
||||
@@ -5085,33 +5137,32 @@ Adjust the output:
|
||||
|
||||
@table @option
|
||||
@item -d
|
||||
Pretend that @code{%verbose} was specified, i.e., write an extra output
|
||||
@itemx --defines
|
||||
Pretend that @code{%defines} was specified, i.e., write an extra output
|
||||
file containing macro definitions for the token type names defined in
|
||||
the grammar and the semantic value type @code{YYSTYPE}, as well as a few
|
||||
@code{extern} variable declarations. @xref{Decl Summary}.
|
||||
|
||||
@item --defines=@var{defines-file}
|
||||
The behaviour of @var{--defines} is the same than @samp{-d}. The only
|
||||
difference is that it has an optionnal argument which is the name of
|
||||
the output filename.
|
||||
Same as above, but save in the file @var{defines-file}.
|
||||
|
||||
@item -b @var{file-prefix}
|
||||
@itemx --file-prefix=@var{prefix}
|
||||
Specify a prefix to use for all Bison output file names. The names are
|
||||
chosen as if the input file were named @file{@var{prefix}.c}.
|
||||
Pretend that @code{%verbose} was specified, i.e, specify prefix to use
|
||||
for all Bison output file names. @xref{Decl Summary}.
|
||||
|
||||
@item -v
|
||||
@itemx --verbose
|
||||
Pretend that @code{%verbose} was specified, i.e, write an extra output
|
||||
file containing verbose descriptions of the grammar and
|
||||
parser. @xref{Decl Summary}, for more.
|
||||
parser. @xref{Decl Summary}.
|
||||
|
||||
@item -o @var{outfile}
|
||||
@itemx --output-file=@var{outfile}
|
||||
Specify the name @var{outfile} for the parser file.
|
||||
@item -o @var{filename}
|
||||
@itemx --output=@var{filename}
|
||||
Specify the @var{filename} for the parser file.
|
||||
|
||||
The other output files' names are constructed from @var{outfile}
|
||||
as described under the @samp{-v} and @samp{-d} options.
|
||||
The other output files' names are constructed from @var{filename} as
|
||||
described under the @samp{-v} and @samp{-d} options.
|
||||
|
||||
@item -g
|
||||
Output a VCG definition of the LALR(1) grammar automaton computed by
|
||||
@@ -5119,7 +5170,7 @@ Bison. If the grammar file is @file{foo.y}, the VCG output file will
|
||||
be @file{foo.vcg}.
|
||||
|
||||
@item --graph=@var{graph-file}
|
||||
The behaviour of @var{--graph} is the same than @samp{-g}. The only
|
||||
The behaviour of @var{--graph} is the same than @samp{-g}. The only
|
||||
difference is that it has an optionnal argument which is the name of
|
||||
the output graph filename.
|
||||
@end table
|
||||
@@ -5168,7 +5219,7 @@ the corresponding short option.
|
||||
\line{ --name-prefix \leaderfill -p}
|
||||
\line{ --no-lines \leaderfill -l}
|
||||
\line{ --no-parser \leaderfill -n}
|
||||
\line{ --output-file \leaderfill -o}
|
||||
\line{ --output \leaderfill -o}
|
||||
\line{ --token-table \leaderfill -k}
|
||||
\line{ --verbose \leaderfill -v}
|
||||
\line{ --version \leaderfill -V}
|
||||
@@ -5187,13 +5238,47 @@ the corresponding short option.
|
||||
--name-prefix=@var{prefix} -p @var{name-prefix}
|
||||
--no-lines -l
|
||||
--no-parser -n
|
||||
--output-file=@var{outfile} -o @var{outfile}
|
||||
--output=@var{outfile} -o @var{outfile}
|
||||
--token-table -k
|
||||
--verbose -v
|
||||
--version -V
|
||||
@end example
|
||||
@end ifinfo
|
||||
|
||||
@node Extension Limitations Under DOS
|
||||
@section Extension Limitations under DOS
|
||||
@cindex extension limitations under DOS
|
||||
@cindex DOS
|
||||
|
||||
On DOS/Windows 9X systems the file name extensions of the output files,
|
||||
like @file{.tab.c}, that may be used depend on the file system in use.
|
||||
The plain DOS file system has limited file name length, does not allow
|
||||
the use of a set of certain illicit characters and does not allow more
|
||||
than a single dot in the file name.
|
||||
|
||||
The DJGPP port of @code{bison} will detect at runtime if (LFN) long file
|
||||
name support is available or not. LFN support will be available in a
|
||||
DOS session under Windows 9X and successors. Windows NT 4.0 needs a
|
||||
special LFN driver (@file{ntlfn08b.zip}) or later available at any
|
||||
simtelnet mirror in the /v2misc dir) for proper LFN support in a DOS
|
||||
session. If LFN support is available the DJGPP port of @code{bison}
|
||||
will use the standard POSIX file name extensions of the output files.
|
||||
If LFN support is not available, then the DJGPP port of @code{bison}
|
||||
will use DOS specific file name extensions.
|
||||
|
||||
@noindent This table summarizes the used extensions:
|
||||
|
||||
@multitable @columnfractions 0.1 0.45 0.45
|
||||
@item @tab LFN extension (Win9X) @tab SFN extension (plain DOS)
|
||||
@item @tab @file{.tab.c} @tab @file{_tab.c}
|
||||
@item @tab @file{.tab.h} @tab @file{_tab.h}
|
||||
@item @tab @file{.tab.cpp} @tab @file{_tab.cpp}
|
||||
@item @tab @file{.tab.hpp} @tab @file{_tab.hpp}
|
||||
@item @tab @file{.output} @tab @file{.out}
|
||||
@item @tab @file{.stype.h} @tab @file{.sth}
|
||||
@item @tab @file{.guard.c} @tab @file{.guc}
|
||||
@end multitable
|
||||
|
||||
@node VMS Invocation
|
||||
@section Invoking Bison under VMS
|
||||
@cindex invoking Bison under VMS
|
||||
@@ -5361,6 +5446,10 @@ Equip the parser for debugging. @xref{Decl Summary}.
|
||||
Bison declaration to create a header file meant for the scanner.
|
||||
@xref{Decl Summary}.
|
||||
|
||||
@item %file-prefix="@var{prefix}"
|
||||
Bison declaration to set tge prefix of the output files. @xref{Decl
|
||||
Summary}.
|
||||
|
||||
@c @item %source_extension
|
||||
@c Bison declaration to specify the generated parser output file extension.
|
||||
@c @xref{Decl Summary}.
|
||||
@@ -5373,7 +5462,10 @@ Bison declaration to create a header file meant for the scanner.
|
||||
Bison declaration to assign left associativity to token(s).
|
||||
@xref{Precedence Decl, ,Operator Precedence}.
|
||||
|
||||
@item %no_lines
|
||||
@item %name-prefix="@var{prefix}"
|
||||
Bison declaration to rename the external symbols. @xref{Decl Summary}.
|
||||
|
||||
@item %no-lines
|
||||
Bison declaration to avoid generating @code{#line} directives in the
|
||||
parser file. @xref{Decl Summary}.
|
||||
|
||||
@@ -5381,11 +5473,15 @@ parser file. @xref{Decl Summary}.
|
||||
Bison declaration to assign non-associativity to token(s).
|
||||
@xref{Precedence Decl, ,Operator Precedence}.
|
||||
|
||||
@item %output="@var{filename}"
|
||||
Bison declaration to set the name of the parser file. @xref{Decl
|
||||
Summary}.
|
||||
|
||||
@item %prec
|
||||
Bison declaration to assign a precedence to a specific rule.
|
||||
@xref{Contextual Precedence, ,Context-Dependent Precedence}.
|
||||
|
||||
@item %pure_parser
|
||||
@item %pure-parser
|
||||
Bison declaration to request a pure (reentrant) parser.
|
||||
@xref{Pure Decl, ,A Pure (Reentrant) Parser}.
|
||||
|
||||
@@ -5400,7 +5496,7 @@ Bison declaration to specify the start symbol. @xref{Start Decl, ,The Start-Sym
|
||||
Bison declaration to declare token(s) without specifying precedence.
|
||||
@xref{Token Decl, ,Token Type Names}.
|
||||
|
||||
@item %token_table
|
||||
@item %token-table
|
||||
Bison declaration to include a token name table in the parser file.
|
||||
@xref{Decl Summary}.
|
||||
|
||||
|
||||
+44
-38
@@ -6,7 +6,7 @@
|
||||
% This file can be printed with 1 or 2 columns per page (see below).
|
||||
% Specify how many you want here. Nothing else needs to be changed
|
||||
% unless you are maintaining the documentation.
|
||||
% For printing reference cards to use in books, specify one column
|
||||
% For printing reference cards to use in books, specify one column
|
||||
% per page and reduce to 80%.
|
||||
% Note that if columnsperpage is set to 2, there will be a few overfull
|
||||
% boxes, but they are not serious. Just uncomment \finalout.
|
||||
@@ -19,7 +19,7 @@
|
||||
\def\finalout{\overfullrule=0pt}
|
||||
%\finalout
|
||||
|
||||
% Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
% Copyright (c) 1998, 2001 Free Software Foundation, Inc.
|
||||
%
|
||||
% This file is part of Bison.
|
||||
%
|
||||
@@ -51,11 +51,11 @@
|
||||
% Which mode to use is controlled by setting \columnsperpage above.
|
||||
%
|
||||
% Authors:
|
||||
% Brendan Kehoe
|
||||
% Brendan Kehoe
|
||||
% UUCP: widener!brendan
|
||||
% Internet: [email protected]
|
||||
% Internet: [email protected]
|
||||
%
|
||||
% Gavin Nicol
|
||||
% Gavin Nicol
|
||||
% Internet: [email protected]
|
||||
%
|
||||
% This refcard format was created by Steve Gildea.
|
||||
@@ -66,12 +66,12 @@
|
||||
% We only change the following to change the version numbers and
|
||||
% such.
|
||||
|
||||
\def\bisonversion{1.20} % the bison version
|
||||
\def\bisonversion{1.31} % the bison version
|
||||
|
||||
\def\refcardversion{0.4a} % reference card version
|
||||
\def\month{August} % month
|
||||
\def\year{1998} % year
|
||||
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
|
||||
\def\refcardversion{0.5} % reference card version
|
||||
\def\month{November} % month
|
||||
\def\year{2001} % year
|
||||
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
|
||||
|
||||
% for copyright notices
|
||||
\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
Permission is granted to make and distribute copies of this card
|
||||
provided the copyright notice and this permission notice
|
||||
are preserved on all copies.
|
||||
are preserved on all copies.
|
||||
\vskip .2\baselineskip
|
||||
For information, write to the:
|
||||
\vskip .2\baselineskip
|
||||
@@ -115,7 +115,7 @@ For information, write to the:
|
||||
|
||||
Permission is granted to make and distribute copies of this card
|
||||
provided the copyright notice and this permission notice
|
||||
are preserved on all copies.
|
||||
are preserved on all copies.
|
||||
\vskip .2\baselineskip
|
||||
For information, write to the:
|
||||
\vskip .2\baselineskip
|
||||
@@ -136,7 +136,7 @@ For information, write to the:
|
||||
|
||||
\def\ncolumns{\the\columnsperpage}
|
||||
|
||||
\message{[\ncolumns\space
|
||||
\message{[\ncolumns\space
|
||||
column\if 1\ncolumns\else s\fi\space per page]}
|
||||
|
||||
\def\scaledmag#1{ scaled \magstep #1}
|
||||
@@ -227,7 +227,7 @@ For information, write to the:
|
||||
\def\bye{\par\vfill\supereject
|
||||
\if a\abc \else\null\vfill\eject\fi
|
||||
\if a\abc \else\null\vfill\eject\fi
|
||||
\end}
|
||||
\end}
|
||||
\fi
|
||||
|
||||
% we won't be using math mode much, so redefine some of the characters
|
||||
@@ -316,41 +316,44 @@ Options can be used as: \kbd{bison {\it options} {\it filename}}
|
||||
\section{Command Line Options}
|
||||
%*****************************
|
||||
|
||||
\key{Display usage information.} {-h}
|
||||
\key{Display version information.} {-V}
|
||||
\key{Generate token and {\tt YYSTYPE} definitions.} {-d}
|
||||
\key{Prepend a prefix to external symbols.} {-p {\it prefix}}
|
||||
\key{Don't put {\tt \#line} directives in the parser.} {-l}
|
||||
\key{Specify the output file.} {-o {\it filename}}
|
||||
\key{Debug or {\it trace} mode.} {-t}
|
||||
\key{Debug or {\it trace} mode.} {-t}
|
||||
\key{Verbose description of the parser.} {-v}
|
||||
\key{Emulate {\tt yacc} (generate {\tt y.tab.*} files).} {-y}
|
||||
|
||||
\vskip .10truein
|
||||
{\bf Note:} The token and {\tt YYSTYPE} definitions are generated
|
||||
to a file called {\tt y.tab.h} if the {\tt -y} option is used,
|
||||
{\bf Note:} The token and {\tt YYSTYPE} definitions are generated
|
||||
to a file called {\tt y.tab.h} if the {\tt -y} option is used,
|
||||
otherwise it will have the format {\tt {\it name}.tab.h}, where
|
||||
{\it name} is the leading part of the parser definition filename.
|
||||
|
||||
\section{Definitions}
|
||||
%********************
|
||||
|
||||
\key{Declare a terminal symbol.}{\%token <{\it t\/}>
|
||||
\key{Declare a terminal symbol.}{\%token <{\it t\/}>
|
||||
{\it n}}
|
||||
|
||||
\key{Declare a terminal symbol, and define its association.}
|
||||
\key{Declare a terminal symbol, and define its association.}
|
||||
{{\it association} <{\it t\/}> {\it n}}
|
||||
|
||||
\vskip .2\baselineskip
|
||||
\key{Generate a reentrant (pure) parser.}
|
||||
\key{Generate a reentrant (pure) parser.}
|
||||
{\%pure_parser}
|
||||
|
||||
\key{Define the union of all data types used in the parser.}
|
||||
\key{Define the union of all data types used in the parser.}
|
||||
{\%union\{{\it field list}\} }
|
||||
|
||||
\vskip .2\baselineskip
|
||||
\key{Tell {\tt bison} where to start parsing.}
|
||||
{\%start {\it m}}
|
||||
\key{Tell {\tt bison} where to start parsing.}
|
||||
{\%start {\it m}}
|
||||
|
||||
\key{Tell {\tt bison} the data type of symbols.}
|
||||
{\%type <{\it t\/}> {\it s1}\dots{\it sn}}
|
||||
\key{Tell {\tt bison} the data type of symbols.}
|
||||
{\%type <{\it t\/}> {\it s1}\dots{\it sn}}
|
||||
|
||||
\vskip .10truein
|
||||
|
||||
@@ -362,8 +365,8 @@ definition, {\it n} is a {\it terminal} symbol name, {\it m} is a
|
||||
\vskip .10truein
|
||||
|
||||
The {\tt <{\it t\/}>} after {\tt \%token, \%left, \%right} and {\tt
|
||||
\%nonassoc} is optional. Additionally, precedence may be overridden with
|
||||
embedded {\tt \%prec} commands.
|
||||
\%nonassoc} is optional. Additionally, precedence may be overridden
|
||||
in the rules with {\tt \%prec} commands.
|
||||
|
||||
\section{Parser Definition Files}
|
||||
%*********************************
|
||||
@@ -379,7 +382,7 @@ The general form for a parser definition is:
|
||||
|
||||
\%\%
|
||||
|
||||
Rule definition 1
|
||||
Rule definition 1
|
||||
\vdots
|
||||
Rule definition {\it n}
|
||||
|
||||
@@ -397,8 +400,9 @@ The general form for a parser definition is:
|
||||
|
||||
Rules take the form:
|
||||
|
||||
\vskip -\baselineskip
|
||||
\beginexample
|
||||
non-terminal : {\it statement} 1
|
||||
non-terminal : {\it statement} 1
|
||||
| {\it statement} 2
|
||||
\vdots
|
||||
| {\it statement n}
|
||||
@@ -406,12 +410,12 @@ Rules take the form:
|
||||
\endexample
|
||||
|
||||
Where {\it statements} can be either empty, or contain
|
||||
a mixture of C code (enclosed in {\tt \{...\}}), and the
|
||||
a mixture of C code (enclosed in {\tt \{...\}}), and the
|
||||
symbols that make up the non-terminal. For example:
|
||||
|
||||
\vskip -\baselineskip
|
||||
\beginexample
|
||||
expression : number '$+$' number \{ \$\$ $=$ \$1 $+$ \$3 \}
|
||||
expression : number '$+$' number \{ \$\$ $=$ \$1 $+$ \$3 \}
|
||||
| number '$-$' number \{ \$\$ $=$ \$1 $-$ \$3 \}
|
||||
| number '$/$' number \{ \$\$ $=$ \$1 $/$ \$3 \}
|
||||
| number '$*$' number \{ \$\$ $=$ \$1 $*$ \$3 \}
|
||||
@@ -428,7 +432,7 @@ For altering the precedence of a symbol use:
|
||||
For example:
|
||||
\vskip -\baselineskip
|
||||
\beginexample
|
||||
foo : gnu bar gnu \%prec bar
|
||||
foo : gnu bar gnu \%prec bar
|
||||
;
|
||||
\endexample
|
||||
|
||||
@@ -438,16 +442,18 @@ For example:
|
||||
\key{Recognize an error \& continue parsing.}{error}
|
||||
\key{Access data associated with a symbol.} {\$\$, \$0\dots\${\it n}}
|
||||
\key{Access a field of the data union.} {\$\$.{\it t},
|
||||
\$0.{\it t}\dots\${\it n}.{\it t}}
|
||||
\key{Access data's line position.} {@{\it n}.{\it line\_spec}}
|
||||
\key{Access data's column position.} {@{\it n}.{\it column\_spec}}
|
||||
\$0.{\it t}\dots\${\it n}.{\it t}}
|
||||
\key{Access symbol's location.} {@\$, @0\dots@{\it n}}
|
||||
\key{Access data's line location.} {@{\it x}.{\it line\_spec}}
|
||||
\key{Access data's column location.} {@{\it x}.{\it column\_spec}}
|
||||
|
||||
|
||||
\vskip .10truein
|
||||
%
|
||||
Where {\it t} is a type defined in the {\tt \%union}, {\it n} is a
|
||||
number, {\it line\_spec} one of {\tt first_line} and {\tt last_line},
|
||||
and {\it column\_spec} is specified as either {\tt first_column} or {\tt
|
||||
last_column}.
|
||||
number, {\it x} is a number or \$, {\it line\_spec} one of {\tt
|
||||
first_line} and {\tt last_line}, and {\it column\_spec} is specified
|
||||
as either {\tt first_column} or {\tt last_column}.
|
||||
|
||||
\section {Variables and Types}
|
||||
%*****************************
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
@set UPDATED 20 September 2001
|
||||
@set UPDATED-MONTH September 2001
|
||||
@set EDITION 1.29a
|
||||
@set VERSION 1.29a
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 20 September 2001
|
||||
@set UPDATED-MONTH September 2001
|
||||
@set EDITION 1.29a
|
||||
@set VERSION 1.29a
|
||||
@set UPDATED 25 February 2002
|
||||
@set UPDATED-MONTH February 2002
|
||||
@set EDITION 1.35
|
||||
@set VERSION 1.35
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
2001-07-24 GNU <bug-gnu-utils@gnu.org>
|
||||
2002-03-12 GNU <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Version 0.10.39 released.
|
||||
* Version 0.11.1 released.
|
||||
|
||||
|
||||
+51
-26
@@ -1,19 +1,20 @@
|
||||
# Makefile for directory with message catalog handling in GNU NLS Utilities.
|
||||
# Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995-1998, 2000-2002 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)
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# 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.
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# You should have received a copy of the GNU Library 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.
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
@@ -51,39 +52,40 @@ YACC = @INTLBISON@ -y -d
|
||||
YFLAGS = --name-prefix=__gettext
|
||||
|
||||
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
|
||||
-DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
|
||||
COMHDRS = gettext.h gettextP.h hash-string.h
|
||||
HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h
|
||||
COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h
|
||||
SOURCES = $(COMSRCS) intl-compat.c
|
||||
COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
|
||||
finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
|
||||
explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
|
||||
localcharset.c
|
||||
plural-exp.c localcharset.c localename.c osdep.c os2compat.c
|
||||
OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
|
||||
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
|
||||
explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
|
||||
plural.$lo localcharset.$lo
|
||||
plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo
|
||||
GETTOBJS = intl-compat.$lo
|
||||
DISTFILES.common = Makefile.in \
|
||||
config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
|
||||
DISTFILES.generated = plural.c
|
||||
DISTFILES.normal = VERSION
|
||||
DISTFILES.gettext = libintl.glibc
|
||||
DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
|
||||
DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc
|
||||
DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
|
||||
COPYING.LIB-2 gettext.h libgettext.h plural-eval.c
|
||||
|
||||
# Libtool's library version information for libintl.
|
||||
# Before making a gettext release, the gettext maintainer must change this
|
||||
# according to the libtool documentation, section "Library interface versions".
|
||||
# Maintainers of other packages that include the intl directory must *not*
|
||||
# change these values.
|
||||
LTV_CURRENT=1
|
||||
LTV_REVISION=1
|
||||
LTV_CURRENT=2
|
||||
LTV_REVISION=0
|
||||
LTV_AGE=0
|
||||
|
||||
.SUFFIXES:
|
||||
@@ -117,7 +119,7 @@ libintl.a libgnuintl.a: $(OBJECTS)
|
||||
libintl.la libgnuintl.la: $(OBJECTS)
|
||||
$(LIBTOOL) --mode=link \
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
|
||||
$(OBJECTS) @LIBICONV@ \
|
||||
$(OBJECTS) @LTLIBICONV@ -lc \
|
||||
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
|
||||
-rpath $(libdir) \
|
||||
-no-undefined
|
||||
@@ -151,7 +153,7 @@ install-exec: all
|
||||
: ; \
|
||||
fi
|
||||
if test '@USE_INCLUDED_LIBINTL@' = yes; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir); \
|
||||
test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
|
||||
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
|
||||
dest=$(DESTDIR)$(libdir)/charset.alias; \
|
||||
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
|
||||
@@ -184,7 +186,7 @@ install-data: all
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
$(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
|
||||
$(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
|
||||
dists="$(DISTFILES.common)"; \
|
||||
dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
|
||||
for file in $$dists; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
@@ -204,6 +206,27 @@ install-data: all
|
||||
: ; \
|
||||
fi
|
||||
|
||||
install-strip: install
|
||||
|
||||
installdirs:
|
||||
if test "$(PACKAGE)" = "gettext" \
|
||||
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
if test '@USE_INCLUDED_LIBINTL@' = yes; then \
|
||||
test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
|
||||
$(mkinstalldirs) $(DESTDIR)$(localedir); \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
@@ -243,7 +266,7 @@ uninstall:
|
||||
: ; \
|
||||
fi
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
for file in VERSION ChangeLog $(DISTFILES.common) $(DISTFILES.generated); do \
|
||||
for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
@@ -253,8 +276,11 @@ uninstall:
|
||||
info dvi:
|
||||
|
||||
$(OBJECTS): ../config.h libgnuintl.h
|
||||
bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
|
||||
dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
|
||||
bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h
|
||||
dcigettext.$lo: hash-string.h
|
||||
explodename.$lo l10nflist.$lo: loadinfo.h
|
||||
dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h
|
||||
dcigettext.$lo: eval-plural.h
|
||||
|
||||
tags: TAGS
|
||||
|
||||
@@ -299,8 +325,7 @@ dist distdir: Makefile
|
||||
$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
|
||||
for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
|
||||
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
||||
ln $$dir/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $$dir/$$file $(distdir); \
|
||||
cp -p $$dir/$$file $(distdir); \
|
||||
done
|
||||
|
||||
Makefile: Makefile.in ../config.status
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
GNU gettext library from gettext-0.10.39
|
||||
GNU gettext library from gettext-0.11.1
|
||||
|
||||
+10
-9
@@ -1,19 +1,20 @@
|
||||
/* Implementation of the bindtextdomain(3) function
|
||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
@@ -84,7 +85,7 @@ __libc_rwlock_define (extern, _nl_state_lock)
|
||||
static void set_binding_values PARAMS ((const char *domainname,
|
||||
const char **dirnamep,
|
||||
const char **codesetp));
|
||||
|
||||
|
||||
/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
|
||||
to be used for the DOMAINNAME message catalog.
|
||||
If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
|
||||
|
||||
+20
-4
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent table of character encoding aliases.
|
||||
#
|
||||
# Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
@@ -235,10 +235,12 @@ case "$os" in
|
||||
#echo "sun_eu_greek ?" # what is this?
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
freebsd*)
|
||||
freebsd* | os2*)
|
||||
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
# Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
|
||||
# reuse FreeBSD's locale data for OS/2.
|
||||
echo "C ASCII"
|
||||
echo "US-ASCII ASCII"
|
||||
for l in la_LN lt_LN; do
|
||||
@@ -270,6 +272,20 @@ case "$os" in
|
||||
echo "ja_JP.Shift_JIS SHIFT_JIS"
|
||||
echo "ko_KR.EUC EUC-KR"
|
||||
;;
|
||||
netbsd*)
|
||||
echo "646 ASCII"
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-4 ISO-8859-4"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "eucCN GB2312"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
echo "BIG5 BIG5"
|
||||
echo "SJIS SHIFT_JIS"
|
||||
;;
|
||||
beos*)
|
||||
# BeOS has a single locale, and it has UTF-8 encoding.
|
||||
echo "* UTF-8"
|
||||
@@ -394,8 +410,8 @@ case "$os" in
|
||||
echo "bg_BG CP866" # not CP855 ??
|
||||
echo "mk CP866" # not CP855 ??
|
||||
echo "mk_MK CP866" # not CP855 ??
|
||||
echo "ru KOI8-R" # not CP866 ??
|
||||
echo "ru_RU KOI8-R" # not CP866 ??
|
||||
echo "ru CP866"
|
||||
echo "ru_RU CP866"
|
||||
# ISO-8859-6 languages
|
||||
echo "ar CP864"
|
||||
echo "ar_AE CP864"
|
||||
|
||||
+9
-8
@@ -1,19 +1,20 @@
|
||||
/* Implementation of the dcgettext(3) function.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
+35
-126
@@ -1,19 +1,20 @@
|
||||
/* Implementation of the internal dcigettext function.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-1999, 2000-2002 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)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||
This must come before <config.h> because <config.h> may include
|
||||
@@ -55,13 +56,7 @@ extern int errno;
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <string.h>
|
||||
#if !HAVE_STRCHR && !defined _LIBC
|
||||
# ifndef strchr
|
||||
# define strchr index
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined HAVE_UNISTD_H || defined _LIBC
|
||||
# include <unistd.h>
|
||||
@@ -74,6 +69,7 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
#include "gettextP.h"
|
||||
#include "plural-exp.h"
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
@@ -197,16 +193,6 @@ static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
|
||||
# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
|
||||
#endif
|
||||
|
||||
/* XPG3 defines the result of `setlocale (category, NULL)' as:
|
||||
``Directs `setlocale()' to query `category' and return the current
|
||||
setting of `local'.''
|
||||
However it does not specify the exact format. Neither do SUSV2 and
|
||||
ISO C 99. So we can use this feature only on selected systems (e.g.
|
||||
those using GNU C Library). */
|
||||
#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
|
||||
# define HAVE_LOCALE_NULL
|
||||
#endif
|
||||
|
||||
/* This is the type used for the search tree where known translations
|
||||
are stored. */
|
||||
struct known_translation_t
|
||||
@@ -279,7 +265,11 @@ const char _nl_default_default_domain[] = "messages";
|
||||
const char *_nl_current_default_domain = _nl_default_default_domain;
|
||||
|
||||
/* Contains the default location of the message catalogs. */
|
||||
#if defined __EMX__
|
||||
extern const char _nl_default_dirname[];
|
||||
#else
|
||||
const char _nl_default_dirname[] = LOCALEDIR;
|
||||
#endif
|
||||
|
||||
/* List with bindings of specific domains created by bindtextdomain()
|
||||
calls. */
|
||||
@@ -291,9 +281,6 @@ static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain,
|
||||
const char *translation,
|
||||
size_t translation_len))
|
||||
internal_function;
|
||||
static unsigned long int plural_eval PARAMS ((struct expression *pexp,
|
||||
unsigned long int n))
|
||||
internal_function;
|
||||
static const char *category_to_name PARAMS ((int category)) internal_function;
|
||||
static const char *guess_category_value PARAMS ((int category,
|
||||
const char *categoryname))
|
||||
@@ -394,6 +381,9 @@ static int enable_secure;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Get the function to evaluate the plural expression. */
|
||||
#include "eval-plural.h"
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
CATEGORY locale and, if PLURAL is nonzero, search over string
|
||||
depending on the plural form determined by N. */
|
||||
@@ -437,6 +427,12 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
|
||||
if (domainname == NULL)
|
||||
domainname = _nl_current_default_domain;
|
||||
|
||||
/* OS/2 specific: backward compatibility with older libintl versions */
|
||||
#ifdef LC_MESSAGES_COMPAT
|
||||
if (category == LC_MESSAGES_COMPAT)
|
||||
category = LC_MESSAGES;
|
||||
#endif
|
||||
|
||||
#if defined HAVE_TSEARCH || defined _LIBC
|
||||
msgid_len = strlen (msgid1) + 1;
|
||||
|
||||
@@ -1004,87 +1000,6 @@ plural_lookup (domain, n, translation, translation_len)
|
||||
}
|
||||
|
||||
|
||||
/* Function to evaluate the plural expression and return an index value. */
|
||||
static unsigned long int
|
||||
internal_function
|
||||
plural_eval (pexp, n)
|
||||
struct expression *pexp;
|
||||
unsigned long int n;
|
||||
{
|
||||
switch (pexp->nargs)
|
||||
{
|
||||
case 0:
|
||||
switch (pexp->operation)
|
||||
{
|
||||
case var:
|
||||
return n;
|
||||
case num:
|
||||
return pexp->val.num;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* NOTREACHED */
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
/* pexp->operation must be lnot. */
|
||||
unsigned long int arg = plural_eval (pexp->val.args[0], n);
|
||||
return ! arg;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
|
||||
if (pexp->operation == lor)
|
||||
return leftarg || plural_eval (pexp->val.args[1], n);
|
||||
else if (pexp->operation == land)
|
||||
return leftarg && plural_eval (pexp->val.args[1], n);
|
||||
else
|
||||
{
|
||||
unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
|
||||
|
||||
switch (pexp->operation)
|
||||
{
|
||||
case mult:
|
||||
return leftarg * rightarg;
|
||||
case divide:
|
||||
return leftarg / rightarg;
|
||||
case module:
|
||||
return leftarg % rightarg;
|
||||
case plus:
|
||||
return leftarg + rightarg;
|
||||
case minus:
|
||||
return leftarg - rightarg;
|
||||
case less_than:
|
||||
return leftarg < rightarg;
|
||||
case greater_than:
|
||||
return leftarg > rightarg;
|
||||
case less_or_equal:
|
||||
return leftarg <= rightarg;
|
||||
case greater_or_equal:
|
||||
return leftarg >= rightarg;
|
||||
case equal:
|
||||
return leftarg == rightarg;
|
||||
case not_equal:
|
||||
return leftarg != rightarg;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* NOTREACHED */
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
/* pexp->operation must be qmop. */
|
||||
unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
|
||||
return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
|
||||
}
|
||||
}
|
||||
/* NOTREACHED */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Return string representation of locale CATEGORY. */
|
||||
static const char *
|
||||
internal_function
|
||||
@@ -1165,27 +1080,21 @@ guess_category_value (category, categoryname)
|
||||
/* We have to proceed with the POSIX methods of looking to `LC_ALL',
|
||||
`LC_xxx', and `LANG'. On some systems this can be done by the
|
||||
`setlocale' function itself. */
|
||||
#if defined _LIBC || (defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL)
|
||||
#ifdef _LIBC
|
||||
retval = setlocale (category, NULL);
|
||||
#else
|
||||
/* Setting of LC_ALL overwrites all other. */
|
||||
retval = getenv ("LC_ALL");
|
||||
if (retval == NULL || retval[0] == '\0')
|
||||
{
|
||||
/* Next comes the name of the desired category. */
|
||||
retval = getenv (categoryname);
|
||||
if (retval == NULL || retval[0] == '\0')
|
||||
{
|
||||
/* Last possibility is the LANG environment variable. */
|
||||
retval = getenv ("LANG");
|
||||
if (retval == NULL || retval[0] == '\0')
|
||||
/* We use C as the default domain. POSIX says this is
|
||||
implementation defined. */
|
||||
return "C";
|
||||
}
|
||||
}
|
||||
retval = _nl_locale_name (category, categoryname);
|
||||
#endif
|
||||
|
||||
/* Ignore LANGUAGE if the locale is set to "C" because
|
||||
1. "C" locale usually uses the ASCII encoding, and most international
|
||||
messages use non-ASCII characters. These characters get displayed
|
||||
as question marks (if using glibc's iconv()) or as invalid 8-bit
|
||||
characters (because other iconv()s refuse to convert most non-ASCII
|
||||
characters to ASCII). In any case, the output is ugly.
|
||||
2. The precise output of some programs in the "C" locale is specified
|
||||
by POSIX and should not depend on environment variables like
|
||||
"LANGUAGE". We allow such programs to use gettext(). */
|
||||
return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
|
||||
}
|
||||
|
||||
|
||||
+9
-8
@@ -1,19 +1,20 @@
|
||||
/* Implementation of the dcngettext(3) function.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
+9
-8
@@ -1,19 +1,20 @@
|
||||
/* Implementation of the dgettext(3) function.
|
||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
+9
-8
@@ -1,19 +1,20 @@
|
||||
/* Implementation of the dngettext(3) function.
|
||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
+9
-8
@@ -1,19 +1,20 @@
|
||||
/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
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)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
+9
-8
@@ -2,19 +2,20 @@
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
|
||||
|
||||
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)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
+9
-8
@@ -1,19 +1,20 @@
|
||||
/* Implementation of gettext(3) function.
|
||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
-101
@@ -1,101 +0,0 @@
|
||||
/* Description of GNU message catalog format: general file layout.
|
||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 _GETTEXT_H
|
||||
#define _GETTEXT_H 1
|
||||
|
||||
#if HAVE_LIMITS_H || _LIBC
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* The magic number of the GNU message catalog format. */
|
||||
#define _MAGIC 0x950412de
|
||||
#define _MAGIC_SWAPPED 0xde120495
|
||||
|
||||
/* Revision number of the currently used .mo (binary) file format. */
|
||||
#define MO_REVISION_NUMBER 0
|
||||
|
||||
/* The following contortions are an attempt to use the C preprocessor
|
||||
to determine an unsigned integral type that is 32 bits wide. An
|
||||
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
|
||||
as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
|
||||
when cross-compiling. */
|
||||
|
||||
#if __STDC__
|
||||
# define UINT_MAX_32_BITS 4294967295U
|
||||
#else
|
||||
# define UINT_MAX_32_BITS 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
|
||||
This should be valid for all systems GNU cares about because
|
||||
that doesn't include 16-bit systems, and only modern systems
|
||||
(that certainly have <limits.h>) have 64+-bit integral types. */
|
||||
|
||||
#ifndef UINT_MAX
|
||||
# define UINT_MAX UINT_MAX_32_BITS
|
||||
#endif
|
||||
|
||||
#if UINT_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned nls_uint32;
|
||||
#else
|
||||
# if USHRT_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned short nls_uint32;
|
||||
# else
|
||||
# if ULONG_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned long nls_uint32;
|
||||
# else
|
||||
/* The following line is intended to throw an error. Using #error is
|
||||
not portable enough. */
|
||||
"Cannot determine unsigned 32-bit data type."
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Header for binary .mo file format. */
|
||||
struct mo_file_header
|
||||
{
|
||||
/* The magic number. */
|
||||
nls_uint32 magic;
|
||||
/* The revision number of the file format. */
|
||||
nls_uint32 revision;
|
||||
/* The number of strings pairs. */
|
||||
nls_uint32 nstrings;
|
||||
/* Offset of table with start offsets of original strings. */
|
||||
nls_uint32 orig_tab_offset;
|
||||
/* Offset of table with start offsets of translation strings. */
|
||||
nls_uint32 trans_tab_offset;
|
||||
/* Size of hashing table. */
|
||||
nls_uint32 hash_tab_size;
|
||||
/* Offset of first hashing entry. */
|
||||
nls_uint32 hash_tab_offset;
|
||||
};
|
||||
|
||||
struct string_desc
|
||||
{
|
||||
/* Length of addressed string. */
|
||||
nls_uint32 length;
|
||||
/* Offset of string in file. */
|
||||
nls_uint32 offset;
|
||||
};
|
||||
|
||||
/* @@ begin of epilog @@ */
|
||||
|
||||
#endif /* gettext.h */
|
||||
+15
-65
@@ -2,19 +2,20 @@
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
|
||||
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)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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 _GETTEXTP_H
|
||||
#define _GETTEXTP_H
|
||||
@@ -31,12 +32,12 @@
|
||||
|
||||
#include "loadinfo.h"
|
||||
|
||||
#include "gettext.h" /* Get nls_uint32. */
|
||||
#include "gmo.h" /* Get nls_uint32. */
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
@@ -71,51 +72,6 @@ SWAP (i)
|
||||
#endif
|
||||
|
||||
|
||||
/* This is the representation of the expressions to determine the
|
||||
plural form. */
|
||||
struct expression
|
||||
{
|
||||
int nargs; /* Number of arguments. */
|
||||
enum operator
|
||||
{
|
||||
/* Without arguments: */
|
||||
var, /* The variable "n". */
|
||||
num, /* Decimal number. */
|
||||
/* Unary operators: */
|
||||
lnot, /* Logical NOT. */
|
||||
/* Binary operators: */
|
||||
mult, /* Multiplication. */
|
||||
divide, /* Division. */
|
||||
module, /* Module operation. */
|
||||
plus, /* Addition. */
|
||||
minus, /* Subtraction. */
|
||||
less_than, /* Comparison. */
|
||||
greater_than, /* Comparison. */
|
||||
less_or_equal, /* Comparison. */
|
||||
greater_or_equal, /* Comparison. */
|
||||
equal, /* Comparision for equality. */
|
||||
not_equal, /* Comparision for inequality. */
|
||||
land, /* Logical AND. */
|
||||
lor, /* Logical OR. */
|
||||
/* Ternary operators: */
|
||||
qmop /* Question mark operator. */
|
||||
} operation;
|
||||
union
|
||||
{
|
||||
unsigned long int num; /* Number value for `num'. */
|
||||
struct expression *args[3]; /* Up to three arguments. */
|
||||
} val;
|
||||
};
|
||||
|
||||
/* This is the data structure to pass information to the parser and get
|
||||
the result in a thread-safe way. */
|
||||
struct parse_args
|
||||
{
|
||||
const char *cp;
|
||||
struct expression *res;
|
||||
};
|
||||
|
||||
|
||||
/* The representation of an opened message catalog. */
|
||||
struct loaded_domain
|
||||
{
|
||||
@@ -166,6 +122,10 @@ struct binding
|
||||
This variable is part of the external ABI of the GNU libintl. */
|
||||
extern int _nl_msg_cat_cntr;
|
||||
|
||||
#ifndef _LIBC
|
||||
const char *_nl_locale_name PARAMS ((int category, const char *categoryname));
|
||||
#endif
|
||||
|
||||
struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
|
||||
char *__locale,
|
||||
const char *__domainname,
|
||||
@@ -236,16 +196,6 @@ extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
|
||||
const char *__codeset));
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
extern void __gettext_free_exp PARAMS ((struct expression *exp))
|
||||
internal_function;
|
||||
extern int __gettextparse PARAMS ((void *arg));
|
||||
#else
|
||||
extern void gettext_free_exp__ PARAMS ((struct expression *exp))
|
||||
internal_function;
|
||||
extern int gettextparse__ PARAMS ((void *arg));
|
||||
#endif
|
||||
|
||||
/* @@ begin of epilog @@ */
|
||||
|
||||
#endif /* gettextP.h */
|
||||
|
||||
+10
-9
@@ -1,24 +1,25 @@
|
||||
/* Description of GNU message catalog format: string hashing function.
|
||||
Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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. */
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
|
||||
+12
-11
@@ -2,19 +2,20 @@
|
||||
Library.
|
||||
Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
+14
-18
@@ -1,19 +1,20 @@
|
||||
/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
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)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for stpcpy().
|
||||
This must come before <config.h> because <config.h> may include
|
||||
@@ -27,11 +28,6 @@
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#if !HAVE_STRCHR && !defined _LIBC
|
||||
# ifndef strchr
|
||||
# define strchr index
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined _LIBC || defined HAVE_ARGZ_H
|
||||
# include <argz.h>
|
||||
@@ -355,11 +351,11 @@ _nl_normalize_codeset (codeset, name_len)
|
||||
size_t cnt;
|
||||
|
||||
for (cnt = 0; cnt < name_len; ++cnt)
|
||||
if (isalnum (codeset[cnt]))
|
||||
if (isalnum ((unsigned char) codeset[cnt]))
|
||||
{
|
||||
++len;
|
||||
|
||||
if (isalpha (codeset[cnt]))
|
||||
if (isalpha ((unsigned char) codeset[cnt]))
|
||||
only_digit = 0;
|
||||
}
|
||||
|
||||
@@ -373,9 +369,9 @@ _nl_normalize_codeset (codeset, name_len)
|
||||
wp = retval;
|
||||
|
||||
for (cnt = 0; cnt < name_len; ++cnt)
|
||||
if (isalpha (codeset[cnt]))
|
||||
*wp++ = tolower (codeset[cnt]);
|
||||
else if (isdigit (codeset[cnt]))
|
||||
if (isalpha ((unsigned char) codeset[cnt]))
|
||||
*wp++ = tolower ((unsigned char) codeset[cnt]);
|
||||
else if (isdigit ((unsigned char) codeset[cnt]))
|
||||
*wp++ = codeset[cnt];
|
||||
|
||||
*wp = '\0';
|
||||
|
||||
+9
-8
@@ -1,19 +1,20 @@
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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 _LIBGETTEXT_H
|
||||
#define _LIBGETTEXT_H 1
|
||||
|
||||
+38
-28
@@ -1,19 +1,20 @@
|
||||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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 _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
@@ -41,11 +42,13 @@
|
||||
# define gettext gettext
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__ || defined __cplusplus
|
||||
# define PARAMS(args) args
|
||||
/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers
|
||||
used by programs. Similarly, test __PROTOTYPES, not PROTOTYPES. */
|
||||
#ifndef _INTL_PARAMS
|
||||
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
|
||||
# define _INTL_PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
# define _INTL_PARAMS(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -56,49 +59,56 @@ extern "C" {
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
extern char *gettext PARAMS ((const char *__msgid));
|
||||
extern char *gettext _INTL_PARAMS ((const char *__msgid));
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
LC_MESSAGES locale. */
|
||||
extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
|
||||
extern char *dgettext _INTL_PARAMS ((const char *__domainname,
|
||||
const char *__msgid));
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
|
||||
int __category));
|
||||
extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
|
||||
const char *__msgid,
|
||||
int __category));
|
||||
|
||||
|
||||
/* Similar to `gettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
|
||||
const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
|
||||
/* Similar to `dgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n));
|
||||
extern char *dngettext _INTL_PARAMS ((const char *__domainname,
|
||||
const char *__msgid1,
|
||||
const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
|
||||
/* Similar to `dcgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n,
|
||||
int __category));
|
||||
extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
|
||||
const char *__msgid1,
|
||||
const char *__msgid2,
|
||||
unsigned long int __n,
|
||||
int __category));
|
||||
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
extern char *textdomain PARAMS ((const char *__domainname));
|
||||
extern char *textdomain _INTL_PARAMS ((const char *__domainname));
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
extern char *bindtextdomain PARAMS ((const char *__domainname,
|
||||
const char *__dirname));
|
||||
extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
|
||||
const char *__dirname));
|
||||
|
||||
/* Specify the character encoding in which the messages from the
|
||||
DOMAINNAME message catalog will be returned. */
|
||||
extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
|
||||
const char *__codeset));
|
||||
extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
|
||||
const char *__codeset));
|
||||
|
||||
|
||||
/* Optimized version of the functions above. */
|
||||
|
||||
+22
-9
@@ -2,25 +2,38 @@
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 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)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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 _LOADINFO_H
|
||||
#define _LOADINFO_H 1
|
||||
|
||||
/* Declarations of locale dependent catalog lookup functions.
|
||||
Implemented in
|
||||
|
||||
localealias.c Possibly replace a locale name by another.
|
||||
explodename.c Split a locale name into its various fields.
|
||||
l10nflist.c Generate a list of filenames of possible message catalogs.
|
||||
finddomain.c Find and open the relevant message catalogs.
|
||||
|
||||
The main function _nl_find_domain() in finddomain.c is declared
|
||||
in gettextP.h.
|
||||
*/
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
|
||||
+20
-141
@@ -1,19 +1,20 @@
|
||||
/* Load needed message catalogs.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||
This must come before <config.h> because <config.h> may include
|
||||
@@ -70,8 +71,9 @@ char *alloca ();
|
||||
# undef HAVE_MMAP
|
||||
#endif
|
||||
|
||||
#include "gettext.h"
|
||||
#include "gmo.h"
|
||||
#include "gettextP.h"
|
||||
#include "plural-exp.h"
|
||||
|
||||
#ifdef _LIBC
|
||||
# include "../locale/localeinfo.h"
|
||||
@@ -90,16 +92,6 @@ char *alloca ();
|
||||
# define munmap __munmap
|
||||
#endif
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define PLURAL_PARSE __gettextparse
|
||||
#else
|
||||
# define PLURAL_PARSE gettextparse__
|
||||
#endif
|
||||
|
||||
/* For those losing systems which don't have `alloca' we have to add
|
||||
some additional code emulating it. */
|
||||
#ifdef HAVE_ALLOCA
|
||||
@@ -131,73 +123,6 @@ char *alloca ();
|
||||
cached by one of GCC's features. */
|
||||
int _nl_msg_cat_cntr;
|
||||
|
||||
#if (defined __GNUC__ && !defined __APPLE_CC__) \
|
||||
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
|
||||
|
||||
/* These structs are the constant expression for the germanic plural
|
||||
form determination. It represents the expression "n != 1". */
|
||||
static const struct expression plvar =
|
||||
{
|
||||
.nargs = 0,
|
||||
.operation = var,
|
||||
};
|
||||
static const struct expression plone =
|
||||
{
|
||||
.nargs = 0,
|
||||
.operation = num,
|
||||
.val =
|
||||
{
|
||||
.num = 1
|
||||
}
|
||||
};
|
||||
static struct expression germanic_plural =
|
||||
{
|
||||
.nargs = 2,
|
||||
.operation = not_equal,
|
||||
.val =
|
||||
{
|
||||
.args =
|
||||
{
|
||||
[0] = (struct expression *) &plvar,
|
||||
[1] = (struct expression *) &plone
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
# define INIT_GERMANIC_PLURAL()
|
||||
|
||||
#else
|
||||
|
||||
/* For compilers without support for ISO C 99 struct/union initializers:
|
||||
Initialization at run-time. */
|
||||
|
||||
static struct expression plvar;
|
||||
static struct expression plone;
|
||||
static struct expression germanic_plural;
|
||||
|
||||
static void
|
||||
init_germanic_plural ()
|
||||
{
|
||||
if (plone.val.num == 0)
|
||||
{
|
||||
plvar.nargs = 0;
|
||||
plvar.operation = var;
|
||||
|
||||
plone.nargs = 0;
|
||||
plone.operation = num;
|
||||
plone.val.num = 1;
|
||||
|
||||
germanic_plural.nargs = 2;
|
||||
germanic_plural.operation = not_equal;
|
||||
germanic_plural.val.args[0] = &plvar;
|
||||
germanic_plural.val.args[1] = &plone;
|
||||
}
|
||||
}
|
||||
|
||||
# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Initialize the codeset dependent parts of an opened message catalog.
|
||||
Return the header entry. */
|
||||
@@ -270,7 +195,7 @@ _nl_init_domain_conv (domain_file, domain, domainbinding)
|
||||
outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
|
||||
# else
|
||||
# if HAVE_ICONV
|
||||
extern const char *locale_charset (void);
|
||||
extern const char *locale_charset PARAMS ((void));
|
||||
outcharset = locale_charset ();
|
||||
# endif
|
||||
# endif
|
||||
@@ -287,8 +212,10 @@ _nl_init_domain_conv (domain_file, domain, domainbinding)
|
||||
domain->conv = (__gconv_t) -1;
|
||||
# else
|
||||
# if HAVE_ICONV
|
||||
/* When using GNU libiconv, we want to use transliteration. */
|
||||
# if _LIBICONV_VERSION >= 0x0105
|
||||
/* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
|
||||
we want to use transliteration. */
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
|
||||
|| _LIBICONV_VERSION >= 0x0105
|
||||
len = strlen (outcharset);
|
||||
{
|
||||
char *tmp = (char *) alloca (len + 10 + 1);
|
||||
@@ -298,7 +225,8 @@ _nl_init_domain_conv (domain_file, domain, domainbinding)
|
||||
}
|
||||
# endif
|
||||
domain->conv = iconv_open (outcharset, charset);
|
||||
# if _LIBICONV_VERSION >= 0x0105
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
|
||||
|| _LIBICONV_VERSION >= 0x0105
|
||||
freea (outcharset);
|
||||
# endif
|
||||
# endif
|
||||
@@ -490,56 +418,7 @@ _nl_load_domain (domain_file, domainbinding)
|
||||
nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
|
||||
|
||||
/* Also look for a plural specification. */
|
||||
if (nullentry != NULL)
|
||||
{
|
||||
const char *plural;
|
||||
const char *nplurals;
|
||||
|
||||
plural = strstr (nullentry, "plural=");
|
||||
nplurals = strstr (nullentry, "nplurals=");
|
||||
if (plural == NULL || nplurals == NULL)
|
||||
goto no_plural;
|
||||
else
|
||||
{
|
||||
/* First get the number. */
|
||||
char *endp;
|
||||
unsigned long int n;
|
||||
struct parse_args args;
|
||||
|
||||
nplurals += 9;
|
||||
while (*nplurals != '\0' && isspace (*nplurals))
|
||||
++nplurals;
|
||||
#if defined HAVE_STRTOUL || defined _LIBC
|
||||
n = strtoul (nplurals, &endp, 10);
|
||||
#else
|
||||
for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
|
||||
n = n * 10 + (*endp - '0');
|
||||
#endif
|
||||
domain->nplurals = n;
|
||||
if (nplurals == endp)
|
||||
goto no_plural;
|
||||
|
||||
/* Due to the restrictions bison imposes onto the interface of the
|
||||
scanner function we have to put the input string and the result
|
||||
passed up from the parser into the same structure which address
|
||||
is passed down to the parser. */
|
||||
plural += 7;
|
||||
args.cp = plural;
|
||||
if (PLURAL_PARSE (&args) != 0)
|
||||
goto no_plural;
|
||||
domain->plural = args.res;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* By default we are using the Germanic form: singular form only
|
||||
for `one', the plural form otherwise. Yes, this is also what
|
||||
English is using since English is a Germanic language. */
|
||||
no_plural:
|
||||
INIT_GERMANIC_PLURAL ();
|
||||
domain->plural = &germanic_plural;
|
||||
domain->nplurals = 2;
|
||||
}
|
||||
EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
|
||||
}
|
||||
|
||||
|
||||
@@ -549,7 +428,7 @@ internal_function
|
||||
_nl_unload_domain (domain)
|
||||
struct loaded_domain *domain;
|
||||
{
|
||||
if (domain->plural != &germanic_plural)
|
||||
if (domain->plural != &__gettext_germanic_plural)
|
||||
__gettext_free_exp (domain->plural);
|
||||
|
||||
_nl_free_domain_conv (domain);
|
||||
|
||||
+84
-10
@@ -1,6 +1,6 @@
|
||||
/* Determine a canonical name for the current locale's character encoding.
|
||||
|
||||
Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@@ -42,7 +42,12 @@
|
||||
# define WIN32
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#if defined __EMX__
|
||||
/* Assume EMX program runs on OS/2, even if compiled under DOS. */
|
||||
# define OS2
|
||||
#endif
|
||||
|
||||
#if !defined WIN32
|
||||
# if HAVE_LANGINFO_CODESET
|
||||
# include <langinfo.h>
|
||||
# else
|
||||
@@ -50,10 +55,19 @@
|
||||
# include <locale.h>
|
||||
# endif
|
||||
# endif
|
||||
#else /* WIN32 */
|
||||
#elif defined WIN32
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#if defined OS2
|
||||
# define INCL_DOS
|
||||
# include <os2.h>
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, OS/2, DOS */
|
||||
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
|
||||
#endif
|
||||
|
||||
#ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
@@ -63,6 +77,11 @@
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETC_UNLOCKED
|
||||
# undef getc
|
||||
# define getc getc_unlocked
|
||||
#endif
|
||||
|
||||
/* The following static variable is declared 'volatile' to avoid a
|
||||
possible multithread problem in the function get_charset_aliases. If we
|
||||
are running in a threaded environment, and if two threads initialize
|
||||
@@ -86,7 +105,7 @@ get_charset_aliases ()
|
||||
cp = charset_aliases;
|
||||
if (cp == NULL)
|
||||
{
|
||||
#ifndef WIN32
|
||||
#if !defined WIN32
|
||||
FILE *fp;
|
||||
const char *dir = LIBDIR;
|
||||
const char *base = "charset.alias";
|
||||
@@ -138,19 +157,19 @@ get_charset_aliases ()
|
||||
continue;
|
||||
}
|
||||
ungetc (c, fp);
|
||||
if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
|
||||
if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
|
||||
break;
|
||||
l1 = strlen (buf1);
|
||||
l2 = strlen (buf2);
|
||||
if (res_size == 0)
|
||||
{
|
||||
res_size = l1 + 1 + l2 + 1;
|
||||
res_ptr = malloc (res_size + 1);
|
||||
res_ptr = (char *) malloc (res_size + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
res_size += l1 + 1 + l2 + 1;
|
||||
res_ptr = realloc (res_ptr, res_size + 1);
|
||||
res_ptr = (char *) realloc (res_ptr, res_size + 1);
|
||||
}
|
||||
if (res_ptr == NULL)
|
||||
{
|
||||
@@ -174,14 +193,16 @@ get_charset_aliases ()
|
||||
if (file_name != NULL)
|
||||
free (file_name);
|
||||
|
||||
#else /* WIN32 */
|
||||
#else
|
||||
|
||||
/* To avoid the troubles of installing a separate file in the same
|
||||
directory as the DLL and of retrieving the DLL's directory at
|
||||
runtime, simply inline the aliases here. */
|
||||
|
||||
# if defined WIN32
|
||||
cp = "CP936" "\0" "GBK" "\0"
|
||||
"CP1361" "\0" "JOHAB" "\0";
|
||||
# endif
|
||||
#endif
|
||||
|
||||
charset_aliases = cp;
|
||||
@@ -205,7 +226,7 @@ locale_charset ()
|
||||
const char *codeset;
|
||||
const char *aliases;
|
||||
|
||||
#ifndef WIN32
|
||||
#if !(defined WIN32 || defined OS2)
|
||||
|
||||
# if HAVE_LANGINFO_CODESET
|
||||
|
||||
@@ -242,7 +263,7 @@ locale_charset ()
|
||||
|
||||
# endif
|
||||
|
||||
#else /* WIN32 */
|
||||
#elif defined WIN32
|
||||
|
||||
static char buf[2 + 10 + 1];
|
||||
|
||||
@@ -250,6 +271,59 @@ locale_charset ()
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
codeset = buf;
|
||||
|
||||
#elif defined OS2
|
||||
|
||||
const char *locale;
|
||||
static char buf[2 + 10 + 1];
|
||||
ULONG cp[3];
|
||||
ULONG cplen;
|
||||
|
||||
/* Allow user to override the codeset, as set in the operating system,
|
||||
with standard language environment variables. */
|
||||
locale = getenv ("LC_ALL");
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
{
|
||||
locale = getenv ("LC_CTYPE");
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
locale = getenv ("LANG");
|
||||
}
|
||||
if (locale != NULL && locale[0] != '\0')
|
||||
{
|
||||
/* If the locale name contains an encoding after the dot, return it. */
|
||||
const char *dot = strchr (locale, '.');
|
||||
|
||||
if (dot != NULL)
|
||||
{
|
||||
const char *modifier;
|
||||
|
||||
dot++;
|
||||
/* Look for the possible @... trailer and remove it, if any. */
|
||||
modifier = strchr (dot, '@');
|
||||
if (modifier == NULL)
|
||||
return dot;
|
||||
if (modifier - dot < sizeof (buf))
|
||||
{
|
||||
memcpy (buf, dot, modifier - dot);
|
||||
buf [modifier - dot] = '\0';
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
||||
/* Resolve through the charset.alias file. */
|
||||
codeset = locale;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* OS/2 has a function returning the locale's codepage as a number. */
|
||||
if (DosQueryCp (sizeof (cp), cp, &cplen))
|
||||
codeset = "";
|
||||
else
|
||||
{
|
||||
sprintf (buf, "CP%u", cp[0]);
|
||||
codeset = buf;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (codeset == NULL)
|
||||
|
||||
+10
-9
@@ -1,19 +1,20 @@
|
||||
# Locale name alias data base.
|
||||
# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# 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.
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# You should have received a copy of the GNU Library 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.
|
||||
|
||||
# The format of this file is the same as for the corresponding file of
|
||||
# the X Window System, which normally can be found in
|
||||
@@ -46,7 +47,7 @@ galego gl_ES.ISO-8859-1
|
||||
galician gl_ES.ISO-8859-1
|
||||
german de_DE.ISO-8859-1
|
||||
greek el_GR.ISO-8859-7
|
||||
hebrew iw_IL.ISO-8859-8
|
||||
hebrew he_IL.ISO-8859-8
|
||||
hrvatski hr_HR.ISO-8859-2
|
||||
hungarian hu_HU.ISO-8859-2
|
||||
icelandic is_IS.ISO-8859-1
|
||||
|
||||
+38
-22
@@ -1,19 +1,20 @@
|
||||
/* Handle aliases for locale names.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||
This must come before <config.h> because <config.h> may include
|
||||
@@ -28,6 +29,9 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#if defined _LIBC || defined HAVE___FSETLOCKING
|
||||
# include <stdio_ext.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
@@ -48,13 +52,7 @@ char *alloca ();
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <string.h>
|
||||
#if !HAVE_STRCHR && !defined _LIBC
|
||||
# ifndef strchr
|
||||
# define strchr index
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "gettextP.h"
|
||||
|
||||
@@ -70,6 +68,7 @@ char *alloca ();
|
||||
# define mempcpy __mempcpy
|
||||
# endif
|
||||
# define HAVE_MEMPCPY 1
|
||||
# define HAVE___FSETLOCKING 1
|
||||
|
||||
/* We need locking here since we can be called from different places. */
|
||||
# include <bits/libc-lock.h>
|
||||
@@ -81,6 +80,15 @@ __libc_lock_define_initialized (static, lock);
|
||||
# define internal_function
|
||||
#endif
|
||||
|
||||
/* Some optimizations for glibc. */
|
||||
#ifdef _LIBC
|
||||
# define FEOF(fp) feof_unlocked (fp)
|
||||
# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
|
||||
#else
|
||||
# define FEOF(fp) feof (fp)
|
||||
# define FGETS(buf, n, fp) fgets (buf, n, fp)
|
||||
#endif
|
||||
|
||||
/* For those losing systems which don't have `alloca' we have to add
|
||||
some additional code emulating it. */
|
||||
#ifdef HAVE_ALLOCA
|
||||
@@ -127,7 +135,7 @@ const char *
|
||||
_nl_expand_alias (name)
|
||||
const char *name;
|
||||
{
|
||||
static const char *locale_alias_path = LOCALE_ALIAS_PATH;
|
||||
static const char *locale_alias_path;
|
||||
struct alias_map *retval;
|
||||
const char *result = NULL;
|
||||
size_t added;
|
||||
@@ -136,6 +144,9 @@ _nl_expand_alias (name)
|
||||
__libc_lock_lock (lock);
|
||||
#endif
|
||||
|
||||
if (locale_alias_path == NULL)
|
||||
locale_alias_path = LOCALE_ALIAS_PATH;
|
||||
|
||||
do
|
||||
{
|
||||
struct alias_map item;
|
||||
@@ -211,8 +222,13 @@ read_alias_file (fname, fname_len)
|
||||
if (fp == NULL)
|
||||
return 0;
|
||||
|
||||
#ifdef HAVE___FSETLOCKING
|
||||
/* No threads present. */
|
||||
__fsetlocking (fp, FSETLOCKING_BYCALLER);
|
||||
#endif
|
||||
|
||||
added = 0;
|
||||
while (!feof (fp))
|
||||
while (!FEOF (fp))
|
||||
{
|
||||
/* It is a reasonable approach to use a fix buffer here because
|
||||
a) we are only interested in the first two fields
|
||||
@@ -224,7 +240,7 @@ read_alias_file (fname, fname_len)
|
||||
char *value;
|
||||
char *cp;
|
||||
|
||||
if (fgets (buf, sizeof buf, fp) == NULL)
|
||||
if (FGETS (buf, sizeof buf, fp) == NULL)
|
||||
/* EOF reached. */
|
||||
break;
|
||||
|
||||
@@ -234,7 +250,7 @@ read_alias_file (fname, fname_len)
|
||||
{
|
||||
char altbuf[BUFSIZ];
|
||||
do
|
||||
if (fgets (altbuf, sizeof altbuf, fp) == NULL)
|
||||
if (FGETS (altbuf, sizeof altbuf, fp) == NULL)
|
||||
/* Make sure the inner loop will be left. The outer loop
|
||||
will exit at the `feof' test. */
|
||||
break;
|
||||
@@ -243,21 +259,21 @@ read_alias_file (fname, fname_len)
|
||||
|
||||
cp = buf;
|
||||
/* Ignore leading white space. */
|
||||
while (isspace (cp[0]))
|
||||
while (isspace ((unsigned char) cp[0]))
|
||||
++cp;
|
||||
|
||||
/* A leading '#' signals a comment line. */
|
||||
if (cp[0] != '\0' && cp[0] != '#')
|
||||
{
|
||||
alias = cp++;
|
||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
||||
while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
|
||||
++cp;
|
||||
/* Terminate alias name. */
|
||||
if (cp[0] != '\0')
|
||||
*cp++ = '\0';
|
||||
|
||||
/* Now look for the beginning of the value. */
|
||||
while (isspace (cp[0]))
|
||||
while (isspace ((unsigned char) cp[0]))
|
||||
++cp;
|
||||
|
||||
if (cp[0] != '\0')
|
||||
@@ -266,7 +282,7 @@ read_alias_file (fname, fname_len)
|
||||
size_t value_len;
|
||||
|
||||
value = cp++;
|
||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
||||
while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
|
||||
++cp;
|
||||
/* Terminate value. */
|
||||
if (cp[0] == '\n')
|
||||
|
||||
+9
-8
@@ -1,19 +1,20 @@
|
||||
/* Implementation of ngettext(3) function.
|
||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
+35
-38
@@ -23,19 +23,20 @@
|
||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
|
||||
|
||||
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)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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. */
|
||||
|
||||
/* The bison generated parser uses alloca. AIX 3 forces us to put this
|
||||
declaration at the beginning of the file. The declaration in bison's
|
||||
@@ -49,30 +50,26 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include "gettextP.h"
|
||||
#include "plural-exp.h"
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define FREE_EXPRESSION __gettext_free_exp
|
||||
#else
|
||||
# define FREE_EXPRESSION gettext_free_exp__
|
||||
# define __gettextparse gettextparse__
|
||||
/* The main function generated by the parser is called __gettextparse,
|
||||
but we want it to be called PLURAL_PARSE. */
|
||||
#ifndef _LIBC
|
||||
# define __gettextparse PLURAL_PARSE
|
||||
#endif
|
||||
|
||||
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
||||
#define YYPARSE_PARAM arg
|
||||
|
||||
#line 52 "plural.y"
|
||||
#line 49 "plural.y"
|
||||
typedef union {
|
||||
unsigned long int num;
|
||||
enum operator op;
|
||||
struct expression *exp;
|
||||
} YYSTYPE;
|
||||
#line 58 "plural.y"
|
||||
#line 55 "plural.y"
|
||||
|
||||
/* Prototypes for local functions. */
|
||||
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
|
||||
@@ -234,8 +231,8 @@ static const short yyrhs[] = { 17,
|
||||
|
||||
#if YYDEBUG != 0
|
||||
static const short yyrline[] = { 0,
|
||||
177, 185, 189, 193, 197, 201, 205, 209, 213, 217,
|
||||
221, 226
|
||||
174, 182, 186, 190, 194, 198, 202, 206, 210, 214,
|
||||
218, 223
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -302,7 +299,7 @@ static const short yycheck[] = { 1,
|
||||
#define YYPURE 1
|
||||
|
||||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||||
#line 3 "/home/haible/gnu/arch/linuxlibc6/share/bison.simple"
|
||||
#line 3 "/usr/local/share/bison.simple"
|
||||
/* This file comes from bison-1.28. */
|
||||
|
||||
/* Skeleton output parser for bison,
|
||||
@@ -516,7 +513,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#line 217 "/home/haible/gnu/arch/linuxlibc6/share/bison.simple"
|
||||
#line 217 "/usr/local/share/bison.simple"
|
||||
|
||||
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
||||
into yyparse. The argument should have type void *.
|
||||
@@ -845,7 +842,7 @@ yyreduce:
|
||||
switch (yyn) {
|
||||
|
||||
case 1:
|
||||
#line 178 "plural.y"
|
||||
#line 175 "plural.y"
|
||||
{
|
||||
if (yyvsp[0].exp == NULL)
|
||||
YYABORT;
|
||||
@@ -853,75 +850,75 @@ case 1:
|
||||
;
|
||||
break;}
|
||||
case 2:
|
||||
#line 186 "plural.y"
|
||||
#line 183 "plural.y"
|
||||
{
|
||||
yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
|
||||
;
|
||||
break;}
|
||||
case 3:
|
||||
#line 190 "plural.y"
|
||||
#line 187 "plural.y"
|
||||
{
|
||||
yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
|
||||
;
|
||||
break;}
|
||||
case 4:
|
||||
#line 194 "plural.y"
|
||||
#line 191 "plural.y"
|
||||
{
|
||||
yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
|
||||
;
|
||||
break;}
|
||||
case 5:
|
||||
#line 198 "plural.y"
|
||||
#line 195 "plural.y"
|
||||
{
|
||||
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
||||
;
|
||||
break;}
|
||||
case 6:
|
||||
#line 202 "plural.y"
|
||||
#line 199 "plural.y"
|
||||
{
|
||||
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
||||
;
|
||||
break;}
|
||||
case 7:
|
||||
#line 206 "plural.y"
|
||||
#line 203 "plural.y"
|
||||
{
|
||||
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
||||
;
|
||||
break;}
|
||||
case 8:
|
||||
#line 210 "plural.y"
|
||||
#line 207 "plural.y"
|
||||
{
|
||||
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
||||
;
|
||||
break;}
|
||||
case 9:
|
||||
#line 214 "plural.y"
|
||||
#line 211 "plural.y"
|
||||
{
|
||||
yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
|
||||
;
|
||||
break;}
|
||||
case 10:
|
||||
#line 218 "plural.y"
|
||||
#line 215 "plural.y"
|
||||
{
|
||||
yyval.exp = new_exp_0 (var);
|
||||
;
|
||||
break;}
|
||||
case 11:
|
||||
#line 222 "plural.y"
|
||||
#line 219 "plural.y"
|
||||
{
|
||||
if ((yyval.exp = new_exp_0 (num)) != NULL)
|
||||
yyval.exp->val.num = yyvsp[0].num;
|
||||
;
|
||||
break;}
|
||||
case 12:
|
||||
#line 227 "plural.y"
|
||||
#line 224 "plural.y"
|
||||
{
|
||||
yyval.exp = yyvsp[-1].exp;
|
||||
;
|
||||
break;}
|
||||
}
|
||||
/* the action file gets copied in in place of this dollarsign */
|
||||
#line 543 "/home/haible/gnu/arch/linuxlibc6/share/bison.simple"
|
||||
#line 543 "/usr/local/share/bison.simple"
|
||||
|
||||
yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
@@ -1141,7 +1138,7 @@ yyerrhandle:
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#line 232 "plural.y"
|
||||
#line 229 "plural.y"
|
||||
|
||||
|
||||
void
|
||||
|
||||
+16
-19
@@ -3,19 +3,20 @@
|
||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <[email protected]>, 2000.
|
||||
|
||||
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)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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. */
|
||||
|
||||
/* The bison generated parser uses alloca. AIX 3 forces us to put this
|
||||
declaration at the beginning of the file. The declaration in bison's
|
||||
@@ -29,25 +30,21 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include "gettextP.h"
|
||||
#include "plural-exp.h"
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define FREE_EXPRESSION __gettext_free_exp
|
||||
#else
|
||||
# define FREE_EXPRESSION gettext_free_exp__
|
||||
# define __gettextparse gettextparse__
|
||||
/* The main function generated by the parser is called __gettextparse,
|
||||
but we want it to be called PLURAL_PARSE. */
|
||||
#ifndef _LIBC
|
||||
# define __gettextparse PLURAL_PARSE
|
||||
#endif
|
||||
|
||||
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
||||
#define YYPARSE_PARAM arg
|
||||
%}
|
||||
%pure_parser
|
||||
%expect 10
|
||||
%expect 7
|
||||
|
||||
%union {
|
||||
unsigned long int num;
|
||||
|
||||
+9
-8
@@ -1,19 +1,20 @@
|
||||
/* Implementation of the textdomain(3) function.
|
||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library 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>
|
||||
|
||||
+24
-8
@@ -1,22 +1,38 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright 2001, 2002 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 of the License, 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
|
||||
|
||||
AUTOMAKE_OPTIONS = ansi2knr
|
||||
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = libbison.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
# Heck, we are still using an old version of Automake which does not
|
||||
# understand LIBOBJ additions using $objext...
|
||||
|
||||
EXTRA_DIST = malloc.c realloc.c
|
||||
# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
|
||||
# configure.in).
|
||||
EXTRA_DIST = malloc.c realloc.c strnlen.c
|
||||
|
||||
libbison_a_SOURCES = \
|
||||
error.c error.h \
|
||||
basename.c dirname.h dirname.c \
|
||||
getopt.h getopt.c getopt1.c \
|
||||
obstack.h obstack.c \
|
||||
quote.h quote.c quotearg.h quotearg.c \
|
||||
xalloc.h xmalloc.c xstrdup.c
|
||||
xalloc.h xmalloc.c xstrdup.c xstrndup.c gettext.h
|
||||
|
||||
libbison_a_LIBADD = @LIBOBJS@
|
||||
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
|
||||
|
||||
+111
-81
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -43,9 +43,12 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -57,65 +60,72 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC = @GCC@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
LIBINTL = @LIBINTL@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
AUTOMAKE_OPTIONS = ansi2knr
|
||||
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = libbison.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
|
||||
# Heck, we are still using an old version of Automake which does not
|
||||
# understand LIBOBJ additions using $objext...
|
||||
EXTRA_DIST = malloc.c realloc.c
|
||||
# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
|
||||
# configure.in).
|
||||
EXTRA_DIST = malloc.c realloc.c strnlen.c
|
||||
|
||||
libbison_a_SOURCES = \
|
||||
error.c error.h \
|
||||
basename.c dirname.h dirname.c \
|
||||
getopt.h getopt.c getopt1.c \
|
||||
obstack.h obstack.c \
|
||||
quote.h quote.c quotearg.h quotearg.c \
|
||||
xalloc.h xmalloc.c xstrdup.c
|
||||
xalloc.h xmalloc.c xstrdup.c xstrndup.c gettext.h
|
||||
|
||||
|
||||
libbison_a_LIBADD = @LIBOBJS@
|
||||
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
|
||||
subdir = lib
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
@@ -124,9 +134,10 @@ CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
libbison_a_AR = $(AR) cru
|
||||
am_libbison_a_OBJECTS = error$U.$(OBJEXT) getopt$U.$(OBJEXT) \
|
||||
getopt1$U.$(OBJEXT) obstack$U.$(OBJEXT) quote$U.$(OBJEXT) \
|
||||
quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) xstrdup$U.$(OBJEXT)
|
||||
am_libbison_a_OBJECTS = basename$U.$(OBJEXT) dirname$U.$(OBJEXT) \
|
||||
getopt$U.$(OBJEXT) getopt1$U.$(OBJEXT) quote$U.$(OBJEXT) \
|
||||
quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) xstrdup$U.$(OBJEXT) \
|
||||
xstrndup$U.$(OBJEXT)
|
||||
libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
|
||||
|
||||
DEFS = @DEFS@
|
||||
@@ -135,22 +146,25 @@ CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error$U.Po $(DEPDIR)/getopt$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/getopt1$U.Po $(DEPDIR)/malloc.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/memchr.Po $(DEPDIR)/obstack$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/quote$U.Po $(DEPDIR)/quotearg$U.Po \
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/error.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/malloc.Po $(DEPDIR)/memchr.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/memrchr.Po $(DEPDIR)/obstack.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/realloc.Po $(DEPDIR)/stpcpy.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/strndup.Po $(DEPDIR)/strnlen.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/strspn.Po $(DEPDIR)/xmalloc$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/xstrdup$U.Po
|
||||
@AMDEP_TRUE@ $(DEPDIR)/strchr.Po $(DEPDIR)/strspn.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/basename$U.Po ./$(DEPDIR)/dirname$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/getopt$U.Po ./$(DEPDIR)/getopt1$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/quote$U.Po ./$(DEPDIR)/quotearg$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/xmalloc$U.Po ./$(DEPDIR)/xstrdup$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/xstrndup$U.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
CFLAGS = @CFLAGS@
|
||||
DIST_SOURCES = $(libbison_a_SOURCES)
|
||||
DIST_COMMON = Makefile.am Makefile.in ansi2knr.1 ansi2knr.c malloc.c \
|
||||
memchr.c realloc.c stpcpy.c strndup.c strnlen.c strspn.c
|
||||
DIST_COMMON = Makefile.am Makefile.in alloca.c ansi2knr.1 ansi2knr.c \
|
||||
error.c error.h malloc.c memchr.c memrchr.c obstack.c obstack.h \
|
||||
realloc.c stpcpy.c strchr.c strspn.c
|
||||
SOURCES = $(libbison_a_SOURCES)
|
||||
|
||||
all: all-am
|
||||
@@ -161,9 +175,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu lib/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
|
||||
AR = ar
|
||||
|
||||
@@ -189,26 +201,30 @@ clean-krextra:
|
||||
-rm -f ansi2knr
|
||||
|
||||
mostlyclean-kr:
|
||||
-rm -f *_.c
|
||||
-test "$U" = "" || rm -f *_.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quote$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quotearg$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memrchr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stpcpy.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strchr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strspn.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrdup$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrdup$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup$U.Po@am__quote@
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf $(DEPDIR)
|
||||
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||
|
||||
.c.o:
|
||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@@ -222,77 +238,87 @@ distclean-depend:
|
||||
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
alloca_.c: alloca.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c || rm -f alloca_.c
|
||||
error_.c: error.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f error_.c
|
||||
alloca_.c: lib/alloca.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/alloca.c; then echo $(srcdir)/lib/alloca.c; else echo lib/alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c || rm -f alloca_.c
|
||||
basename_.c: basename.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f basename_.c
|
||||
dirname_.c: dirname.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f dirname_.c
|
||||
error_.c: lib/error.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/error.c; then echo $(srcdir)/lib/error.c; else echo lib/error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c || rm -f error_.c
|
||||
getopt_.c: getopt.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f getopt_.c
|
||||
getopt1_.c: getopt1.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f getopt1_.c
|
||||
malloc_.c: malloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f malloc_.c
|
||||
memchr_.c: memchr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f memchr_.c
|
||||
obstack_.c: obstack.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f obstack_.c
|
||||
malloc_.c: lib/malloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/malloc.c; then echo $(srcdir)/lib/malloc.c; else echo lib/malloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > malloc_.c || rm -f malloc_.c
|
||||
memchr_.c: lib/memchr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/memchr.c; then echo $(srcdir)/lib/memchr.c; else echo lib/memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c || rm -f memchr_.c
|
||||
memrchr_.c: lib/memrchr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/memrchr.c; then echo $(srcdir)/lib/memrchr.c; else echo lib/memrchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memrchr_.c || rm -f memrchr_.c
|
||||
obstack_.c: lib/obstack.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/obstack.c; then echo $(srcdir)/lib/obstack.c; else echo lib/obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c || rm -f obstack_.c
|
||||
quote_.c: quote.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quote.c; then echo $(srcdir)/quote.c; else echo quote.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quote_.c || rm -f quote_.c
|
||||
quotearg_.c: quotearg.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f quotearg_.c
|
||||
realloc_.c: realloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f realloc_.c
|
||||
stpcpy_.c: stpcpy.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f stpcpy_.c
|
||||
strndup_.c: strndup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f strndup_.c
|
||||
strnlen_.c: strnlen.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c || rm -f strnlen_.c
|
||||
strspn_.c: strspn.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c || rm -f strspn_.c
|
||||
realloc_.c: lib/realloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/realloc.c; then echo $(srcdir)/lib/realloc.c; else echo lib/realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c || rm -f realloc_.c
|
||||
stpcpy_.c: lib/stpcpy.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/stpcpy.c; then echo $(srcdir)/lib/stpcpy.c; else echo lib/stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c || rm -f stpcpy_.c
|
||||
strchr_.c: lib/strchr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/strchr.c; then echo $(srcdir)/lib/strchr.c; else echo lib/strchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strchr_.c || rm -f strchr_.c
|
||||
strspn_.c: lib/strspn.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/strspn.c; then echo $(srcdir)/lib/strspn.c; else echo lib/strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c || rm -f strspn_.c
|
||||
xmalloc_.c: xmalloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f xmalloc_.c
|
||||
xstrdup_.c: xstrdup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(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 || rm -f xstrdup_.c
|
||||
alloca_.$(OBJEXT) error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) \
|
||||
malloc_.$(OBJEXT) memchr_.$(OBJEXT) obstack_.$(OBJEXT) quote_.$(OBJEXT) \
|
||||
quotearg_.$(OBJEXT) realloc_.$(OBJEXT) stpcpy_.$(OBJEXT) \
|
||||
strndup_.$(OBJEXT) strnlen_.$(OBJEXT) strspn_.$(OBJEXT) \
|
||||
xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) : $(ANSI2KNR)
|
||||
xstrndup_.c: xstrndup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrndup.c; then echo $(srcdir)/xstrndup.c; else echo xstrndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrndup_.c || rm -f xstrndup_.c
|
||||
alloca_.$(OBJEXT) basename_.$(OBJEXT) dirname_.$(OBJEXT) \
|
||||
error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) malloc_.$(OBJEXT) \
|
||||
memchr_.$(OBJEXT) memrchr_.$(OBJEXT) obstack_.$(OBJEXT) \
|
||||
quote_.$(OBJEXT) quotearg_.$(OBJEXT) realloc_.$(OBJEXT) \
|
||||
stpcpy_.$(OBJEXT) strchr_.$(OBJEXT) strspn_.$(OBJEXT) \
|
||||
xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) xstrndup_.$(OBJEXT) : $(ANSI2KNR)
|
||||
uninstall-info-am:
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(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; }'`; \
|
||||
mkid -fID $$unique $(LISP)
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(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" \
|
||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
@@ -300,13 +326,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
cp -pR $$d/$$file $(distdir)$$dir \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
@@ -331,6 +360,7 @@ install-am: all-am
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
+66
-66
@@ -22,18 +22,18 @@
|
||||
your main control loop, etc. to force garbage collection. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef emacs
|
||||
#include "blockinput.h"
|
||||
# include "blockinput.h"
|
||||
#endif
|
||||
|
||||
/* If compiling with GCC 2, this file's not needed. */
|
||||
@@ -41,41 +41,41 @@
|
||||
|
||||
/* If someone has defined alloca as a macro,
|
||||
there must be some other way alloca is supposed to work. */
|
||||
#ifndef alloca
|
||||
# ifndef alloca
|
||||
|
||||
#ifdef emacs
|
||||
#ifdef static
|
||||
# ifdef emacs
|
||||
# ifdef static
|
||||
/* actually, only want this if static is defined as ""
|
||||
-- this is for usg, in which emacs must undefine static
|
||||
in order to make unexec workable
|
||||
*/
|
||||
#ifndef STACK_DIRECTION
|
||||
# ifndef STACK_DIRECTION
|
||||
you
|
||||
lose
|
||||
-- must know STACK_DIRECTION at compile-time
|
||||
#endif /* STACK_DIRECTION undefined */
|
||||
#endif /* static */
|
||||
#endif /* emacs */
|
||||
# endif /* STACK_DIRECTION undefined */
|
||||
# endif /* static */
|
||||
# endif /* emacs */
|
||||
|
||||
/* If your stack is a linked list of frames, you have to
|
||||
provide an "address metric" ADDRESS_FUNCTION macro. */
|
||||
|
||||
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
long i00afunc ();
|
||||
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
|
||||
#else
|
||||
#define ADDRESS_FUNCTION(arg) &(arg)
|
||||
#endif
|
||||
# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
|
||||
# else
|
||||
# define ADDRESS_FUNCTION(arg) &(arg)
|
||||
# endif
|
||||
|
||||
#if __STDC__
|
||||
# if __STDC__
|
||||
typedef void *pointer;
|
||||
#else
|
||||
# else
|
||||
typedef char *pointer;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
# ifndef NULL
|
||||
# define NULL 0
|
||||
# endif
|
||||
|
||||
/* Different portions of Emacs need to call different versions of
|
||||
malloc. The Emacs executable needs alloca to call xmalloc, because
|
||||
@@ -83,13 +83,14 @@ typedef char *pointer;
|
||||
hand, the utilities in lib-src need alloca to call malloc; some of
|
||||
them are very simple, and don't have an xmalloc routine.
|
||||
|
||||
Non-Emacs programs expect this to call use xmalloc.
|
||||
Non-Emacs programs expect this to call xmalloc.
|
||||
|
||||
Callers below should use malloc. */
|
||||
|
||||
#ifndef emacs
|
||||
#define malloc xmalloc
|
||||
#endif
|
||||
# ifndef emacs
|
||||
# undef malloc
|
||||
# define malloc xmalloc
|
||||
# endif
|
||||
extern pointer malloc ();
|
||||
|
||||
/* Define STACK_DIRECTION if you know the direction of stack
|
||||
@@ -100,18 +101,18 @@ extern pointer malloc ();
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
|
||||
#ifndef STACK_DIRECTION
|
||||
#define STACK_DIRECTION 0 /* Direction unknown. */
|
||||
#endif
|
||||
# ifndef STACK_DIRECTION
|
||||
# define STACK_DIRECTION 0 /* Direction unknown. */
|
||||
# endif
|
||||
|
||||
#if STACK_DIRECTION != 0
|
||||
# if STACK_DIRECTION != 0
|
||||
|
||||
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
|
||||
# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
|
||||
|
||||
#else /* STACK_DIRECTION == 0; need run-time code. */
|
||||
# else /* STACK_DIRECTION == 0; need run-time code. */
|
||||
|
||||
static int stack_dir; /* 1 or -1 once known. */
|
||||
#define STACK_DIR stack_dir
|
||||
# define STACK_DIR stack_dir
|
||||
|
||||
static void
|
||||
find_stack_direction ()
|
||||
@@ -135,7 +136,7 @@ find_stack_direction ()
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* STACK_DIRECTION == 0 */
|
||||
# endif /* STACK_DIRECTION == 0 */
|
||||
|
||||
/* An "alloca header" is used to:
|
||||
(a) chain together all alloca'ed blocks;
|
||||
@@ -144,9 +145,9 @@ find_stack_direction ()
|
||||
It is very important that sizeof(header) agree with malloc
|
||||
alignment chunk size. The following default should work okay. */
|
||||
|
||||
#ifndef ALIGN_SIZE
|
||||
#define ALIGN_SIZE sizeof(double)
|
||||
#endif
|
||||
# ifndef ALIGN_SIZE
|
||||
# define ALIGN_SIZE sizeof(double)
|
||||
# endif
|
||||
|
||||
typedef union hdr
|
||||
{
|
||||
@@ -168,16 +169,15 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
|
||||
implementations of C, for example under Gould's UTX/32. */
|
||||
|
||||
pointer
|
||||
alloca (size)
|
||||
unsigned size;
|
||||
alloca (size_t size)
|
||||
{
|
||||
auto char probe; /* Probes stack depth: */
|
||||
register char *depth = ADDRESS_FUNCTION (probe);
|
||||
|
||||
#if STACK_DIRECTION == 0
|
||||
# if STACK_DIRECTION == 0
|
||||
if (STACK_DIR == 0) /* Unknown growth direction. */
|
||||
find_stack_direction ();
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Reclaim garbage, defined as all alloca'd storage that
|
||||
was allocated from deeper in the stack than currently. */
|
||||
@@ -185,9 +185,9 @@ alloca (size)
|
||||
{
|
||||
register header *hp; /* Traverses linked list. */
|
||||
|
||||
#ifdef emacs
|
||||
# ifdef emacs
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
for (hp = last_alloca_header; hp != NULL;)
|
||||
if ((STACK_DIR > 0 && hp->h.deep > depth)
|
||||
@@ -204,9 +204,9 @@ alloca (size)
|
||||
|
||||
last_alloca_header = hp; /* -> last valid storage. */
|
||||
|
||||
#ifdef emacs
|
||||
# ifdef emacs
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
|
||||
if (size == 0)
|
||||
@@ -232,15 +232,15 @@ alloca (size)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
# ifdef DEBUG_I00AFUNC
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
|
||||
#ifndef CRAY_STACK
|
||||
#define CRAY_STACK
|
||||
#ifndef CRAY2
|
||||
# ifndef CRAY_STACK
|
||||
# define CRAY_STACK
|
||||
# ifndef CRAY2
|
||||
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
|
||||
struct stack_control_header
|
||||
{
|
||||
@@ -292,7 +292,7 @@ struct stack_segment_linkage
|
||||
long sss7;
|
||||
};
|
||||
|
||||
#else /* CRAY2 */
|
||||
# else /* CRAY2 */
|
||||
/* The following structure defines the vector of words
|
||||
returned by the STKSTAT library routine. */
|
||||
struct stk_stat
|
||||
@@ -345,10 +345,10 @@ struct stk_trailer
|
||||
long unknown14;
|
||||
};
|
||||
|
||||
#endif /* CRAY2 */
|
||||
#endif /* not CRAY_STACK */
|
||||
# endif /* CRAY2 */
|
||||
# endif /* not CRAY_STACK */
|
||||
|
||||
#ifdef CRAY2
|
||||
# ifdef CRAY2
|
||||
/* Determine a "stack measure" for an arbitrary ADDRESS.
|
||||
I doubt that "lint" will like this much. */
|
||||
|
||||
@@ -419,7 +419,7 @@ i00afunc (long *address)
|
||||
return (result);
|
||||
}
|
||||
|
||||
#else /* not CRAY2 */
|
||||
# else /* not CRAY2 */
|
||||
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
|
||||
Determine the number of the cell within the stack,
|
||||
given the address of the cell. The purpose of this
|
||||
@@ -464,9 +464,9 @@ i00afunc (long address)
|
||||
|
||||
while (!(this_segment <= address && address <= stkl))
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
# ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
|
||||
#endif
|
||||
# endif
|
||||
if (pseg == 0)
|
||||
break;
|
||||
stkl = stkl - pseg;
|
||||
@@ -485,9 +485,9 @@ i00afunc (long address)
|
||||
|
||||
while (pseg != 0)
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
# ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o\n", pseg, size);
|
||||
#endif
|
||||
# endif
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
@@ -497,8 +497,8 @@ i00afunc (long address)
|
||||
return (result);
|
||||
}
|
||||
|
||||
#endif /* not CRAY2 */
|
||||
#endif /* CRAY */
|
||||
# endif /* not CRAY2 */
|
||||
# endif /* CRAY */
|
||||
|
||||
#endif /* no alloca */
|
||||
# endif /* no alloca */
|
||||
#endif /* not GCC version 2 */
|
||||
|
||||
+182
-52
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1989, 1997, 1998 Aladdin Enterprises. All rights reserved. */
|
||||
/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
|
||||
|
||||
/*$Id$*/
|
||||
/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
|
||||
@@ -37,27 +37,62 @@ program under the GPL.
|
||||
* There are no error messages.
|
||||
*
|
||||
* ansi2knr recognizes function definitions by seeing a non-keyword
|
||||
* identifier at the left margin, followed by a left parenthesis,
|
||||
* with a right parenthesis as the last character on the line,
|
||||
* and with a left brace as the first token on the following line
|
||||
* (ignoring possible intervening comments), except that a line
|
||||
* identifier at the left margin, followed by a left parenthesis, with a
|
||||
* right parenthesis as the last character on the line, and with a left
|
||||
* brace as the first token on the following line (ignoring possible
|
||||
* intervening comments and/or preprocessor directives), except that a line
|
||||
* consisting of only
|
||||
* identifier1(identifier2)
|
||||
* will not be considered a function definition unless identifier2 is
|
||||
* the word "void". ansi2knr will recognize a multi-line header provided
|
||||
* that no intervening line ends with a left or right brace or a semicolon.
|
||||
* These algorithms ignore whitespace and comments, except that
|
||||
* the function name must be the first thing on the line.
|
||||
* The following constructs will confuse it:
|
||||
* the word "void", and a line consisting of
|
||||
* identifier1(identifier2, <<arbitrary>>)
|
||||
* will not be considered a function definition.
|
||||
* ansi2knr will recognize a multi-line header provided that no intervening
|
||||
* line ends with a left or right brace or a semicolon. These algorithms
|
||||
* ignore whitespace, comments, and preprocessor directives, except that
|
||||
* the function name must be the first thing on the line. The following
|
||||
* constructs will confuse it:
|
||||
* - Any other construct that starts at the left margin and
|
||||
* follows the above syntax (such as a macro or function call).
|
||||
* - Some macros that tinker with the syntax of the function header.
|
||||
* - Some macros that tinker with the syntax of function headers.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The original and principal author of ansi2knr is L. Peter Deutsch
|
||||
* <ghost@aladdin.com>. Other authors are noted in the change history
|
||||
* that follows (in reverse chronological order):
|
||||
|
||||
lpd 2000-04-12 backs out Eggert's changes because of bugs:
|
||||
- concatlits didn't declare the type of its bufend argument;
|
||||
- concatlits didn't't recognize when it was inside a comment;
|
||||
- scanstring could scan backward past the beginning of the string; when
|
||||
- the check for \ + newline in scanstring was unnecessary.
|
||||
|
||||
2000-03-05 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Add support for concatenated string literals.
|
||||
* ansi2knr.c (concatlits): New decl.
|
||||
(main): Invoke concatlits to concatenate string literals.
|
||||
(scanstring): Handle backslash-newline correctly. Work with
|
||||
character constants. Fix bug when scanning backwards through
|
||||
backslash-quote. Check for unterminated strings.
|
||||
(convert1): Parse character constants, too.
|
||||
(appendline, concatlits): New functions.
|
||||
* ansi2knr.1: Document this.
|
||||
|
||||
lpd 1999-08-17 added code to allow preprocessor directives
|
||||
wherever comments are allowed
|
||||
lpd 1999-04-12 added minor fixes from Pavel Roskin
|
||||
<pavel_roskin@geocities.com> for clean compilation with
|
||||
gcc -W -Wall
|
||||
lpd 1999-03-22 added hack to recognize lines consisting of
|
||||
identifier1(identifier2, xxx) as *not* being procedures
|
||||
lpd 1999-02-03 made indentation of preprocessor commands consistent
|
||||
lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
|
||||
endless loop; quoted strings within an argument list
|
||||
confused the parser
|
||||
lpd 1999-01-24 added a check for write errors on the output,
|
||||
suggested by Jim Meyering <meyering@ascend.com>
|
||||
lpd 1998-11-09 added further hack to recognize identifier(void)
|
||||
as being a procedure
|
||||
lpd 1998-10-23 added hack to recognize lines consisting of
|
||||
@@ -153,19 +188,24 @@ program under the GPL.
|
||||
|
||||
#endif
|
||||
|
||||
/* Define NULL (for *very* old compilers). */
|
||||
#ifndef NULL
|
||||
# define NULL (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The ctype macros don't always handle 8-bit characters correctly.
|
||||
* Compensate for this here.
|
||||
*/
|
||||
#ifdef isascii
|
||||
# undef HAVE_ISASCII /* just in case */
|
||||
# define HAVE_ISASCII 1
|
||||
# undef HAVE_ISASCII /* just in case */
|
||||
# define HAVE_ISASCII 1
|
||||
#else
|
||||
#endif
|
||||
#if STDC_HEADERS || !HAVE_ISASCII
|
||||
# define is_ascii(c) 1
|
||||
# define is_ascii(c) 1
|
||||
#else
|
||||
# define is_ascii(c) isascii(c)
|
||||
# define is_ascii(c) isascii(c)
|
||||
#endif
|
||||
|
||||
#define is_space(c) (is_ascii(c) && isspace(c))
|
||||
@@ -177,7 +217,10 @@ program under the GPL.
|
||||
#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
|
||||
|
||||
/* Forward references */
|
||||
char *ppdirforward();
|
||||
char *ppdirbackward();
|
||||
char *skipspace();
|
||||
char *scanstring();
|
||||
int writeblanks();
|
||||
int test1();
|
||||
int convert1();
|
||||
@@ -190,6 +233,8 @@ main(argc, argv)
|
||||
{ FILE *in = stdin;
|
||||
FILE *out = stdout;
|
||||
char *filename = 0;
|
||||
char *program_name = argv[0];
|
||||
char *output_name = 0;
|
||||
#define bufsize 5000 /* arbitrary size */
|
||||
char *buf;
|
||||
char *line;
|
||||
@@ -205,6 +250,7 @@ main(argc, argv)
|
||||
* check for this switch for backward compatibility.
|
||||
*/
|
||||
int convert_varargs = 1;
|
||||
int output_error;
|
||||
|
||||
while ( argc > 1 && argv[1][0] == '-' ) {
|
||||
if ( !strcmp(argv[1], "--varargs") ) {
|
||||
@@ -219,7 +265,8 @@ main(argc, argv)
|
||||
argv += 2;
|
||||
continue;
|
||||
}
|
||||
fprintf(stderr, "Unrecognized switch: %s\n", argv[1]);
|
||||
fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
|
||||
argv[1]);
|
||||
fprintf(stderr, usage);
|
||||
exit(1);
|
||||
}
|
||||
@@ -229,16 +276,19 @@ main(argc, argv)
|
||||
fprintf(stderr, usage);
|
||||
exit(0);
|
||||
case 3:
|
||||
out = fopen(argv[2], "w");
|
||||
output_name = argv[2];
|
||||
out = fopen(output_name, "w");
|
||||
if ( out == NULL ) {
|
||||
fprintf(stderr, "Cannot open output file %s\n", argv[2]);
|
||||
fprintf(stderr, "%s: Cannot open output file %s\n",
|
||||
program_name, output_name);
|
||||
exit(1);
|
||||
}
|
||||
/* falls through */
|
||||
case 2:
|
||||
in = fopen(argv[1], "r");
|
||||
if ( in == NULL ) {
|
||||
fprintf(stderr, "Cannot open input file %s\n", argv[1]);
|
||||
fprintf(stderr, "%s: Cannot open input file %s\n",
|
||||
program_name, argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
if ( filename == 0 )
|
||||
@@ -250,6 +300,11 @@ main(argc, argv)
|
||||
if ( filename )
|
||||
fprintf(out, "#line 1 \"%s\"\n", filename);
|
||||
buf = malloc(bufsize);
|
||||
if ( buf == NULL )
|
||||
{
|
||||
fprintf(stderr, "Unable to allocate read buffer!\n");
|
||||
exit(1);
|
||||
}
|
||||
line = buf;
|
||||
while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
|
||||
{
|
||||
@@ -266,7 +321,7 @@ f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
|
||||
goto wl;
|
||||
if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
|
||||
goto wl;
|
||||
switch ( *skipspace(more, 1) )
|
||||
switch ( *skipspace(ppdirforward(more), 1) )
|
||||
{
|
||||
case '{':
|
||||
/* Definitely a function header. */
|
||||
@@ -300,32 +355,91 @@ wl: fputs(buf, out);
|
||||
if ( line != buf )
|
||||
fputs(buf, out);
|
||||
free(buf);
|
||||
if ( out != stdout )
|
||||
fclose(out);
|
||||
if ( output_name ) {
|
||||
output_error = ferror(out);
|
||||
output_error |= fclose(out);
|
||||
} else { /* out == stdout */
|
||||
fflush(out);
|
||||
output_error = ferror(out);
|
||||
}
|
||||
if ( output_error ) {
|
||||
fprintf(stderr, "%s: error writing to %s\n", program_name,
|
||||
(output_name ? output_name : "stdout"));
|
||||
exit(1);
|
||||
}
|
||||
if ( in != stdin )
|
||||
fclose(in);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Skip over space and comments, in either direction. */
|
||||
/*
|
||||
* Skip forward or backward over one or more preprocessor directives.
|
||||
*/
|
||||
char *
|
||||
ppdirforward(p)
|
||||
char *p;
|
||||
{
|
||||
for (; *p == '#'; ++p) {
|
||||
for (; *p != '\r' && *p != '\n'; ++p)
|
||||
if (*p == 0)
|
||||
return p;
|
||||
if (*p == '\r' && p[1] == '\n')
|
||||
++p;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
char *
|
||||
ppdirbackward(p, limit)
|
||||
char *p;
|
||||
char *limit;
|
||||
{
|
||||
char *np = p;
|
||||
|
||||
for (;; p = --np) {
|
||||
if (*np == '\n' && np[-1] == '\r')
|
||||
--np;
|
||||
for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
|
||||
if (np[-1] == 0)
|
||||
return np;
|
||||
if (*np != '#')
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip over whitespace, comments, and preprocessor directives,
|
||||
* in either direction.
|
||||
*/
|
||||
char *
|
||||
skipspace(p, dir)
|
||||
register char *p;
|
||||
register int dir; /* 1 for forward, -1 for backward */
|
||||
{ for ( ; ; )
|
||||
{ while ( is_space(*p) )
|
||||
p += dir;
|
||||
if ( !(*p == '/' && p[dir] == '*') )
|
||||
break;
|
||||
p += dir; p += dir;
|
||||
while ( !(*p == '*' && p[dir] == '/') )
|
||||
{ if ( *p == 0 )
|
||||
return p; /* multi-line comment?? */
|
||||
p += dir;
|
||||
}
|
||||
p += dir; p += dir;
|
||||
}
|
||||
return p;
|
||||
char *p;
|
||||
int dir; /* 1 for forward, -1 for backward */
|
||||
{
|
||||
for ( ; ; ) {
|
||||
while ( is_space(*p) )
|
||||
p += dir;
|
||||
if ( !(*p == '/' && p[dir] == '*') )
|
||||
break;
|
||||
p += dir; p += dir;
|
||||
while ( !(*p == '*' && p[dir] == '/') ) {
|
||||
if ( *p == 0 )
|
||||
return p; /* multi-line comment?? */
|
||||
p += dir;
|
||||
}
|
||||
p += dir; p += dir;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/* Scan over a quoted string, in either direction. */
|
||||
char *
|
||||
scanstring(p, dir)
|
||||
char *p;
|
||||
int dir;
|
||||
{
|
||||
for (p += dir; ; p += dir)
|
||||
if (*p == '"' && p[-dir] != '\\')
|
||||
return p + dir;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -359,14 +473,14 @@ writeblanks(start, end)
|
||||
int
|
||||
test1(buf)
|
||||
char *buf;
|
||||
{ register char *p = buf;
|
||||
{ char *p = buf;
|
||||
char *bend;
|
||||
char *endfn;
|
||||
int contin;
|
||||
|
||||
if ( !isidfirstchar(*p) )
|
||||
return 0; /* no name at left margin */
|
||||
bend = skipspace(buf + strlen(buf) - 1, -1);
|
||||
bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
|
||||
switch ( *bend )
|
||||
{
|
||||
case ';': contin = 0 /*2*/; break;
|
||||
@@ -396,7 +510,7 @@ test1(buf)
|
||||
};
|
||||
char **key = words;
|
||||
char *kp;
|
||||
int len = endfn - buf;
|
||||
unsigned len = endfn - buf;
|
||||
|
||||
while ( (kp = *key) != 0 )
|
||||
{ if ( strlen(kp) == len && !strncmp(kp, buf, len) )
|
||||
@@ -409,14 +523,16 @@ test1(buf)
|
||||
int len;
|
||||
/*
|
||||
* Check for identifier1(identifier2) and not
|
||||
* identifier1(void).
|
||||
* identifier1(void), or identifier1(identifier2, xxxx).
|
||||
*/
|
||||
|
||||
while ( isidchar(*p) )
|
||||
p++;
|
||||
len = p - id;
|
||||
p = skipspace(p, 1);
|
||||
if ( *p == ')' && (len != 4 || strncmp(id, "void", 4)) )
|
||||
if (*p == ',' ||
|
||||
(*p == ')' && (len != 4 || strncmp(id, "void", 4)))
|
||||
)
|
||||
return 0; /* not a function */
|
||||
}
|
||||
/*
|
||||
@@ -443,7 +559,7 @@ convert1(buf, out, header, convert_varargs)
|
||||
int header; /* Boolean */
|
||||
int convert_varargs; /* Boolean */
|
||||
{ char *endfn;
|
||||
register char *p;
|
||||
char *p;
|
||||
/*
|
||||
* The breaks table contains pointers to the beginning and end
|
||||
* of each argument.
|
||||
@@ -461,7 +577,7 @@ convert1(buf, out, header, convert_varargs)
|
||||
;
|
||||
top: p = endfn;
|
||||
breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
|
||||
if ( breaks == 0 )
|
||||
if ( breaks == NULL )
|
||||
{ /* Couldn't allocate break table, give up */
|
||||
fprintf(stderr, "Unable to allocate break table!\n");
|
||||
fputs(buf, out);
|
||||
@@ -473,7 +589,7 @@ top: p = endfn;
|
||||
do
|
||||
{ int level = 0;
|
||||
char *lp = NULL;
|
||||
char *rp;
|
||||
char *rp = NULL;
|
||||
char *end = NULL;
|
||||
|
||||
if ( bp >= btop )
|
||||
@@ -500,14 +616,18 @@ top: p = endfn;
|
||||
else rp = p;
|
||||
break;
|
||||
case '/':
|
||||
p = skipspace(p, 1) - 1;
|
||||
if (p[1] == '*')
|
||||
p = skipspace(p, 1) - 1;
|
||||
break;
|
||||
case '"':
|
||||
p = scanstring(p, 1) - 1;
|
||||
break;
|
||||
default:
|
||||
;
|
||||
}
|
||||
}
|
||||
/* Erase any embedded prototype parameters. */
|
||||
if ( lp )
|
||||
if ( lp && rp )
|
||||
writeblanks(lp + 1, rp);
|
||||
p--; /* back up over terminator */
|
||||
/* Find the name being declared. */
|
||||
@@ -523,9 +643,19 @@ top: p = endfn;
|
||||
while ( level )
|
||||
switch ( *--p )
|
||||
{
|
||||
case ']': case ')': level++; break;
|
||||
case '[': case '(': level--; break;
|
||||
case '/': p = skipspace(p, -1) + 1; break;
|
||||
case ']': case ')':
|
||||
level++;
|
||||
break;
|
||||
case '[': case '(':
|
||||
level--;
|
||||
break;
|
||||
case '/':
|
||||
if (p > buf && p[-1] == '*')
|
||||
p = skipspace(p, -1) + 1;
|
||||
break;
|
||||
case '"':
|
||||
p = scanstring(p, -1) + 1;
|
||||
break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* basename.c -- return the last element in a path
|
||||
Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef FILESYSTEM_PREFIX_LEN
|
||||
# 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.
|
||||
If NAME is all slashes, be sure to return `/'. */
|
||||
|
||||
char *
|
||||
base_name (char const *name)
|
||||
{
|
||||
char const *base = name += FILESYSTEM_PREFIX_LEN (name);
|
||||
int all_slashes = 1;
|
||||
char const *p;
|
||||
|
||||
for (p = name; *p; p++)
|
||||
{
|
||||
if (ISSLASH (*p))
|
||||
base = p + 1;
|
||||
else
|
||||
all_slashes = 0;
|
||||
}
|
||||
|
||||
/* If NAME is all slashes, arrange to return `/'. */
|
||||
if (*base == '\0' && ISSLASH (*name) && all_slashes)
|
||||
--base;
|
||||
|
||||
/* Make sure the last byte is not a slash. */
|
||||
assert (all_slashes || !ISSLASH (*(p - 1)));
|
||||
|
||||
return (char *) base;
|
||||
}
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
/* dirname.c -- return all but the last element in a path
|
||||
Copyright (C) 1990, 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
|
||||
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
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
#endif
|
||||
#if defined STDC_HEADERS || defined HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
# ifndef strrchr
|
||||
# define strrchr rindex
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef HAVE_DECL_MEMRCHR
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_MEMRCHR
|
||||
void *memrchr ();
|
||||
#endif
|
||||
|
||||
#include "dirname.h"
|
||||
|
||||
#ifndef FILESYSTEM_PREFIX_LEN
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
|
||||
#define BACKSLASH_IS_PATH_SEPARATOR ISSLASH ('\\')
|
||||
|
||||
/* Return the length of `dirname (PATH)' and set *RESULT to point
|
||||
to PATH or to `"."', as appropriate. Works properly even if
|
||||
there are trailing slashes (by effectively ignoring them).
|
||||
WARNING: This function doesn't work for cwd-relative names like
|
||||
`a:foo' that are specified with a drive-letter prefix. That case
|
||||
is handled in the caller. */
|
||||
static size_t
|
||||
dir_name_r (char const *path, char const **result)
|
||||
{
|
||||
char const *slash;
|
||||
size_t length; /* Length of result, not including NUL. */
|
||||
|
||||
slash = strrchr (path, '/');
|
||||
if (BACKSLASH_IS_PATH_SEPARATOR)
|
||||
{
|
||||
char const *b = strrchr (path, '\\');
|
||||
if (b && slash < b)
|
||||
slash = b;
|
||||
}
|
||||
|
||||
/* If the last byte of PATH is a slash, decrement SLASH until it's
|
||||
pointing at the leftmost in a sequence of trailing slashes. */
|
||||
if (slash && slash[1] == 0)
|
||||
{
|
||||
while (path < slash && ISSLASH (slash[-1]))
|
||||
{
|
||||
--slash;
|
||||
}
|
||||
|
||||
if (path < slash)
|
||||
{
|
||||
size_t len = slash - path;
|
||||
slash = memrchr (path, '/', len);
|
||||
if (BACKSLASH_IS_PATH_SEPARATOR)
|
||||
{
|
||||
char const *b = memrchr (path, '\\', len);
|
||||
if (b && slash < b)
|
||||
slash = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (slash == 0)
|
||||
{
|
||||
/* File is in the current directory. */
|
||||
|
||||
length = FILESYSTEM_PREFIX_LEN (path);
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
path = ".";
|
||||
length = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Remove any trailing slashes from the result. If we have a
|
||||
canonicalized "d:/path", leave alone the root case "d:/". */
|
||||
char const *lim = path + FILESYSTEM_PREFIX_LEN (path);
|
||||
|
||||
while (lim < slash && ISSLASH (*slash))
|
||||
--slash;
|
||||
|
||||
length = slash - path + 1;
|
||||
}
|
||||
|
||||
*result = path;
|
||||
return length;
|
||||
}
|
||||
|
||||
/* Return the leading directories part of PATH,
|
||||
allocated with malloc. If out of memory, return 0.
|
||||
Works properly even if there are trailing slashes
|
||||
(by effectively ignoring them). */
|
||||
|
||||
char *
|
||||
dir_name (char const *path)
|
||||
{
|
||||
char const *result;
|
||||
size_t length = dir_name_r (path, &result);
|
||||
int append_dot = (length && length == FILESYSTEM_PREFIX_LEN (newpath));
|
||||
char *newpath = (char *) malloc (length + append_dot + 1);
|
||||
if (newpath == 0)
|
||||
return 0;
|
||||
strncpy (newpath, result, length);
|
||||
/* If PATH is "d:foo", return "d:.", the CWD on drive d: */
|
||||
if (append_dot)
|
||||
newpath[length++] = '.';
|
||||
newpath[length] = 0;
|
||||
return newpath;
|
||||
}
|
||||
|
||||
#ifdef TEST_DIRNAME
|
||||
/*
|
||||
|
||||
Run the test like this (expect no output):
|
||||
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall memrchr.c dirname.c
|
||||
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
|
||||
|
||||
BEGIN-DATA
|
||||
foo//// .
|
||||
bar/foo//// bar
|
||||
foo/ .
|
||||
/ /
|
||||
. .
|
||||
a .
|
||||
END-DATA
|
||||
|
||||
*/
|
||||
|
||||
# define MAX_BUFF_LEN 1024
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
char buff[MAX_BUFF_LEN + 1];
|
||||
|
||||
buff[MAX_BUFF_LEN] = 0;
|
||||
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
|
||||
{
|
||||
char path[MAX_BUFF_LEN];
|
||||
char expected_result[MAX_BUFF_LEN];
|
||||
char const *result;
|
||||
sscanf (buff, "%s %s", path, expected_result);
|
||||
result = dir_name (path);
|
||||
if (strcmp (result, expected_result))
|
||||
printf ("%s: got %s, expected %s\n", path, result, expected_result);
|
||||
}
|
||||
exit (0);
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Copyright (C) 1998 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 DIRNAME_H_
|
||||
# define DIRNAME_H_ 1
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
char *
|
||||
dir_name PARAMS ((const char *path));
|
||||
|
||||
#endif /* not DIRNAME_H_ */
|
||||
+198
-74
@@ -1,23 +1,22 @@
|
||||
/* Error handler for noninteractive utilities
|
||||
Copyright (C) 1990-1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1990-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* Written by David MacKenzie <[email protected]>. */
|
||||
|
||||
@@ -29,6 +28,10 @@
|
||||
#if HAVE_LIBINTL_H
|
||||
# include <libintl.h>
|
||||
#endif
|
||||
#ifdef _LIBC
|
||||
# include <wchar.h>
|
||||
# define mbsrtowcs __mbsrtowcs
|
||||
#endif
|
||||
|
||||
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
||||
# if __STDC__
|
||||
@@ -52,13 +55,6 @@ void exit ();
|
||||
|
||||
#include "error.h"
|
||||
|
||||
#ifndef HAVE_DECL_STRERROR_R
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRERROR_R
|
||||
char *strerror_r ();
|
||||
#endif
|
||||
|
||||
#ifndef _
|
||||
# define _(String) String
|
||||
#endif
|
||||
@@ -83,6 +79,12 @@ unsigned int error_message_count;
|
||||
|
||||
/* In GNU libc we want do not want to use the common name `error' directly.
|
||||
Instead make it a weak alias. */
|
||||
extern void __error (int status, int errnum, const char *message, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
extern void __error_at_line (int status, int errnum, const char *file_name,
|
||||
unsigned int line_number, const char *message,
|
||||
...)
|
||||
__attribute__ ((__format__ (__printf__, 5, 6)));;
|
||||
# define error __error
|
||||
# define error_at_line __error_at_line
|
||||
|
||||
@@ -93,21 +95,30 @@ unsigned int error_message_count;
|
||||
|
||||
#else /* not _LIBC */
|
||||
|
||||
# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
|
||||
# ifndef HAVE_DECL_STRERROR_R
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
char *strerror_r ();
|
||||
# endif
|
||||
|
||||
/* The calling program should define program_name and set it to the
|
||||
name of the executing program. */
|
||||
extern char *program_name;
|
||||
|
||||
# ifdef HAVE_STRERROR_R
|
||||
# if HAVE_STRERROR_R || defined strerror_r
|
||||
# define __strerror_r strerror_r
|
||||
# else
|
||||
# if HAVE_STRERROR
|
||||
# ifndef strerror /* On some systems, strerror is a macro */
|
||||
# ifndef HAVE_DECL_STRERROR
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
# if !HAVE_DECL_STRERROR
|
||||
char *strerror ();
|
||||
# endif
|
||||
# else
|
||||
static char *
|
||||
private_strerror (errnum)
|
||||
int errnum;
|
||||
private_strerror (int errnum)
|
||||
{
|
||||
extern char *sys_errlist[];
|
||||
extern int sys_nerr;
|
||||
@@ -118,15 +129,118 @@ private_strerror (errnum)
|
||||
}
|
||||
# define strerror private_strerror
|
||||
# endif /* HAVE_STRERROR */
|
||||
# endif /* HAVE_STRERROR_R */
|
||||
# endif /* HAVE_STRERROR_R || defined strerror_r */
|
||||
#endif /* not _LIBC */
|
||||
|
||||
static void
|
||||
print_errno_message (int errnum)
|
||||
{
|
||||
char const *s;
|
||||
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if STRERROR_R_CHAR_P || _LIBC
|
||||
s = __strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
# else
|
||||
if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
|
||||
s = errbuf;
|
||||
else
|
||||
s = 0;
|
||||
# endif
|
||||
#else
|
||||
s = strerror (errnum);
|
||||
#endif
|
||||
|
||||
#if !_LIBC
|
||||
if (! s)
|
||||
s = _("Unknown system error");
|
||||
#endif
|
||||
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
{
|
||||
__fwprintf (stderr, L": %s", s);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
fprintf (stderr, ": %s", s);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
static void
|
||||
error_tail (int status, int errnum, const char *message, va_list args)
|
||||
{
|
||||
# if HAVE_VPRINTF || _LIBC
|
||||
# if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
{
|
||||
# define ALLOCA_LIMIT 2000
|
||||
size_t len = strlen (message) + 1;
|
||||
wchar_t *wmessage = NULL;
|
||||
mbstate_t st;
|
||||
size_t res;
|
||||
const char *tmp;
|
||||
|
||||
do
|
||||
{
|
||||
if (len < ALLOCA_LIMIT)
|
||||
wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
|
||||
else
|
||||
{
|
||||
if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
|
||||
wmessage = NULL;
|
||||
|
||||
wmessage = (wchar_t *) realloc (wmessage,
|
||||
len * sizeof (wchar_t));
|
||||
|
||||
if (wmessage == NULL)
|
||||
{
|
||||
fputws_unlocked (L"out of memory\n", stderr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
memset (&st, '\0', sizeof (st));
|
||||
tmp =message;
|
||||
}
|
||||
while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
|
||||
|
||||
if (res == (size_t) -1)
|
||||
/* The string cannot be converted. */
|
||||
wmessage = (wchar_t *) L"???";
|
||||
|
||||
__vfwprintf (stderr, wmessage, args);
|
||||
}
|
||||
else
|
||||
# endif
|
||||
vfprintf (stderr, message, args);
|
||||
# else
|
||||
_doprnt (message, args, stderr);
|
||||
# endif
|
||||
va_end (args);
|
||||
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
print_errno_message (errnum);
|
||||
# if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
putwc (L'\n', stderr);
|
||||
else
|
||||
# endif
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Print the program name and error message MESSAGE, which is a printf-style
|
||||
format string with optional args.
|
||||
If ERRNUM is nonzero, print its corresponding system error message.
|
||||
Exit with status STATUS if it is nonzero. */
|
||||
/* VARARGS */
|
||||
|
||||
void
|
||||
#if defined VA_START && __STDC__
|
||||
error (int status, int errnum, const char *message, ...)
|
||||
@@ -142,47 +256,48 @@ error (status, errnum, message, va_alist)
|
||||
va_list args;
|
||||
#endif
|
||||
|
||||
fflush (stdout);
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_flockfile (stderr);
|
||||
# else
|
||||
__flockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
if (error_print_progname)
|
||||
(*error_print_progname) ();
|
||||
else
|
||||
{
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s: ", program_name);
|
||||
else
|
||||
#endif
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
VA_START (args, message);
|
||||
# if HAVE_VPRINTF || _LIBC
|
||||
vfprintf (stderr, message, args);
|
||||
# else
|
||||
_doprnt (message, args, stderr);
|
||||
# endif
|
||||
va_end (args);
|
||||
error_tail (status, errnum, message, args);
|
||||
#else
|
||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
#endif
|
||||
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if HAVE_WORKING_STRERROR_R || _LIBC
|
||||
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
|
||||
# else
|
||||
/* Don't use __strerror_r's return value because on some systems
|
||||
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
|
||||
__strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
fprintf (stderr, ": %s", errbuf);
|
||||
# endif
|
||||
#else
|
||||
fprintf (stderr, ": %s", strerror (errnum));
|
||||
#endif
|
||||
}
|
||||
print_errno_message (errnum);
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_funlockfile (stderr);
|
||||
# else
|
||||
__funlockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Sometimes we want to have at most one error per line. This
|
||||
@@ -212,8 +327,9 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
|
||||
static const char *old_file_name;
|
||||
static unsigned int old_line_number;
|
||||
|
||||
if (old_line_number == line_number &&
|
||||
(file_name == old_file_name || !strcmp (old_file_name, file_name)))
|
||||
if (old_line_number == line_number
|
||||
&& (file_name == old_file_name
|
||||
|| strcmp (old_file_name, file_name) == 0))
|
||||
/* Simply return and print nothing. */
|
||||
return;
|
||||
|
||||
@@ -221,50 +337,58 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
|
||||
old_line_number = line_number;
|
||||
}
|
||||
|
||||
fflush (stdout);
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_flockfile (stderr);
|
||||
# else
|
||||
__flockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
if (error_print_progname)
|
||||
(*error_print_progname) ();
|
||||
else
|
||||
{
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s:", program_name);
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s: ", program_name);
|
||||
else
|
||||
#endif
|
||||
fprintf (stderr, "%s:", program_name);
|
||||
}
|
||||
|
||||
if (file_name != NULL)
|
||||
fprintf (stderr, "%s:%d: ", file_name, line_number);
|
||||
{
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s:%d: ", file_name, line_number);
|
||||
else
|
||||
#endif
|
||||
fprintf (stderr, "%s:%d: ", file_name, line_number);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
VA_START (args, message);
|
||||
# if HAVE_VPRINTF || _LIBC
|
||||
vfprintf (stderr, message, args);
|
||||
# else
|
||||
_doprnt (message, args, stderr);
|
||||
# endif
|
||||
va_end (args);
|
||||
error_tail (status, errnum, message, args);
|
||||
#else
|
||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
#endif
|
||||
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if HAVE_WORKING_STRERROR_R || _LIBC
|
||||
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
|
||||
# else
|
||||
/* Don't use __strerror_r's return value because on some systems
|
||||
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
|
||||
__strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
fprintf (stderr, ": %s", errbuf);
|
||||
# endif
|
||||
#else
|
||||
fprintf (stderr, ": %s", strerror (errnum));
|
||||
#endif
|
||||
}
|
||||
print_errno_message (errnum);
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_funlockfile (stderr);
|
||||
# else
|
||||
__funlockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
|
||||
+59
-40
@@ -1,23 +1,25 @@
|
||||
/* Getopt for GNU.
|
||||
NOTE: The canonical source of this file is maintained with the GNU
|
||||
C Library. Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
|
||||
NOTE: getopt is now part of the C library, so if you don't know what
|
||||
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
||||
before changing it!
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
@@ -27,13 +29,13 @@
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#else
|
||||
# if !defined __STDC__ || !__STDC__
|
||||
#endif
|
||||
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
# ifndef const
|
||||
# define const
|
||||
# endif
|
||||
# ifndef const
|
||||
# define const
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -75,11 +77,12 @@
|
||||
#endif
|
||||
|
||||
#ifndef _
|
||||
/* This is for other GNU distributions with internationalized messages.
|
||||
When compiling libc, the _ macro is predefined. */
|
||||
# ifdef HAVE_LIBINTL_H
|
||||
/* This is for other GNU distributions with internationalized messages. */
|
||||
# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||
# include <libintl.h>
|
||||
# define _(msgid) gettext (msgid)
|
||||
# ifndef _
|
||||
# define _(msgid) gettext (msgid)
|
||||
# endif
|
||||
# else
|
||||
# define _(msgid) (msgid)
|
||||
# endif
|
||||
@@ -250,11 +253,13 @@ static int last_nonopt;
|
||||
/* Bash 2.0 gives us an environment variable containing flags
|
||||
indicating ARGV elements that should not be considered arguments. */
|
||||
|
||||
#ifdef USE_NONOPTION_FLAGS
|
||||
/* Defined in getopt_init.c */
|
||||
extern char *__getopt_nonoption_flags;
|
||||
|
||||
static int nonoption_flags_max_len;
|
||||
static int nonoption_flags_len;
|
||||
#endif
|
||||
|
||||
static int original_argc;
|
||||
static char *const *original_argv;
|
||||
@@ -275,13 +280,17 @@ store_args_and_env (int argc, char *const *argv)
|
||||
text_set_element (__libc_subinit, store_args_and_env);
|
||||
# endif /* text_set_element */
|
||||
|
||||
# define SWAP_FLAGS(ch1, ch2) \
|
||||
# ifdef USE_NONOPTION_FLAGS
|
||||
# define SWAP_FLAGS(ch1, ch2) \
|
||||
if (nonoption_flags_len > 0) \
|
||||
{ \
|
||||
char __tmp = __getopt_nonoption_flags[ch1]; \
|
||||
__getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
|
||||
__getopt_nonoption_flags[ch2] = __tmp; \
|
||||
}
|
||||
# else
|
||||
# define SWAP_FLAGS(ch1, ch2)
|
||||
# endif
|
||||
#else /* !_LIBC */
|
||||
# define SWAP_FLAGS(ch1, ch2)
|
||||
#endif /* _LIBC */
|
||||
@@ -313,7 +322,7 @@ exchange (argv)
|
||||
It leaves the longer segment in the right place overall,
|
||||
but it consists of two parts that need to be swapped next. */
|
||||
|
||||
#ifdef _LIBC
|
||||
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||
/* First make sure the handling of the `__getopt_nonoption_flags'
|
||||
string can work normally. Our top argument must be in the range
|
||||
of the string. */
|
||||
@@ -417,7 +426,7 @@ _getopt_initialize (argc, argv, optstring)
|
||||
else
|
||||
ordering = PERMUTE;
|
||||
|
||||
#ifdef _LIBC
|
||||
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||
if (posixly_correct == NULL
|
||||
&& argc == original_argc && argv == original_argv)
|
||||
{
|
||||
@@ -515,6 +524,13 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
int *longind;
|
||||
int long_only;
|
||||
{
|
||||
int print_errors = opterr;
|
||||
if (optstring[0] == ':')
|
||||
print_errors = 0;
|
||||
|
||||
if (argc < 1)
|
||||
return -1;
|
||||
|
||||
optarg = NULL;
|
||||
|
||||
if (optind == 0 || !__getopt_initialized)
|
||||
@@ -529,7 +545,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
Either it does not have option syntax, or there is an environment flag
|
||||
from the shell indicating it is not an option. The later information
|
||||
is only used when the used in the GNU libc. */
|
||||
#ifdef _LIBC
|
||||
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||
# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|
||||
|| (optind < nonoption_flags_len \
|
||||
&& __getopt_nonoption_flags[optind] == '1'))
|
||||
@@ -664,14 +680,17 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
pfound = p;
|
||||
indfound = option_index;
|
||||
}
|
||||
else
|
||||
else if (long_only
|
||||
|| pfound->has_arg != p->has_arg
|
||||
|| pfound->flag != p->flag
|
||||
|| pfound->val != p->val)
|
||||
/* Second or later nonexact match found. */
|
||||
ambig = 1;
|
||||
}
|
||||
|
||||
if (ambig && !exact)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
@@ -692,7 +711,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = nameend + 1;
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
@@ -718,7 +737,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = argv[optind++];
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
@@ -745,7 +764,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
if (!long_only || argv[optind][1] == '-'
|
||||
|| my_index (optstring, *nextchar) == NULL)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
if (argv[optind][1] == '-')
|
||||
/* --option */
|
||||
@@ -775,7 +794,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
|
||||
if (temp == NULL || c == ':')
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
if (posixly_correct)
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
@@ -809,7 +828,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
else if (optind == argc)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
|
||||
@@ -858,7 +877,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
if (ambig && !exact)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
@@ -876,7 +895,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = nameend + 1;
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr, _("\
|
||||
%s: option `-W %s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
@@ -891,7 +910,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = argv[optind++];
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
@@ -938,12 +957,12 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
else if (optind == argc)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr,
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
}
|
||||
optopt = c;
|
||||
if (optstring[0] == ':')
|
||||
|
||||
+27
-16
@@ -1,21 +1,21 @@
|
||||
/* Declarations for getopt.
|
||||
Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
|
||||
@@ -23,6 +23,17 @@
|
||||
# define _GETOPT_H 1
|
||||
#endif
|
||||
|
||||
/* If __GNU_LIBRARY__ is not already defined, either we are being used
|
||||
standalone, or this is the first header included in the source file.
|
||||
If we are being used with glibc, we need to include <features.h>, but
|
||||
that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
|
||||
not defined, include <ctype.h>, which will pull in <features.h> for us
|
||||
if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
|
||||
doesn't flood the namespace with stuff the way some other headers do.) */
|
||||
#if !defined __GNU_LIBRARY__
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -82,7 +93,7 @@ extern int optopt;
|
||||
|
||||
struct option
|
||||
{
|
||||
# if defined __STDC__ && __STDC__
|
||||
# if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
const char *name;
|
||||
# else
|
||||
char *name;
|
||||
@@ -126,7 +137,7 @@ struct option
|
||||
arguments to the option '\0'. This behavior is specific to the GNU
|
||||
`getopt'. */
|
||||
|
||||
#if defined __STDC__ && __STDC__
|
||||
#if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
# ifdef __GNU_LIBRARY__
|
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation
|
||||
|
||||
+16
-16
@@ -1,26 +1,29 @@
|
||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
||||
Free Software Foundation, Inc.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#else
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
@@ -28,9 +31,6 @@
|
||||
#define const
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library 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 _LIBGETTEXT_H
|
||||
#define _LIBGETTEXT_H 1
|
||||
|
||||
/* NLS can be disabled through the configure --disable-nls option. */
|
||||
#if ENABLE_NLS
|
||||
|
||||
/* Get declarations of GNU message catalog functions. */
|
||||
# include <libintl.h>
|
||||
|
||||
#else
|
||||
|
||||
/* Disabled NLS.
|
||||
The casts to 'const char *' serve the purpose of producing warnings
|
||||
for invalid uses of the value returned from these functions.
|
||||
On pre-ANSI systems without 'const', the config.h file is supposed to
|
||||
contain "#define const". */
|
||||
# define gettext(Msgid) ((const char *) (Msgid))
|
||||
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
|
||||
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
|
||||
# define ngettext(Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define textdomain(Domainname) ((const char *) (Domainname))
|
||||
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
|
||||
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
|
||||
|
||||
#endif
|
||||
|
||||
/* A pseudo function call that serves as a marker for the automated
|
||||
extraction of messages, but does not call gettext(). The run-time
|
||||
translation is done at a different place in the code.
|
||||
The argument, String, should be a literal string. Concatenated strings
|
||||
and other string expressions won't work.
|
||||
The macro's expansion is not parenthesized, so that it is suitable as
|
||||
initializer for static 'char[]' or 'const char[]' variables. */
|
||||
#define gettext_noop(String) String
|
||||
|
||||
#endif /* _LIBGETTEXT_H */
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
/* memrchr -- find the last occurrence of a byte in a memory block
|
||||
Copyright (C) 1991, 93, 96, 97, 99, 2000 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);
|
||||
adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
|
||||
and implemented by Roland McGrath (roland@ai.mit.edu).
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#undef __ptr_t
|
||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
||||
# define __ptr_t void *
|
||||
#else /* Not C++ or ANSI C. */
|
||||
# define __ptr_t char *
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
#if defined (_LIBC)
|
||||
# include <string.h>
|
||||
# include <memcopy.h>
|
||||
#else
|
||||
# define reg_char char
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_LIMITS_H) || defined (_LIBC)
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#define LONG_MAX_32_BITS 2147483647
|
||||
|
||||
#ifndef LONG_MAX
|
||||
# define LONG_MAX LONG_MAX_32_BITS
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#undef __memrchr
|
||||
#undef memrchr
|
||||
|
||||
#ifndef weak_alias
|
||||
# define __memrchr memrchr
|
||||
#endif
|
||||
|
||||
/* Search no more than N bytes of S for C. */
|
||||
__ptr_t
|
||||
__memrchr (s, c_in, n)
|
||||
const __ptr_t s;
|
||||
int c_in;
|
||||
size_t n;
|
||||
{
|
||||
const unsigned char *char_ptr;
|
||||
const unsigned long int *longword_ptr;
|
||||
unsigned long int longword, magic_bits, charmask;
|
||||
unsigned reg_char c;
|
||||
|
||||
c = (unsigned char) c_in;
|
||||
|
||||
/* Handle the last few characters by reading one character at a time.
|
||||
Do this until CHAR_PTR is aligned on a longword boundary. */
|
||||
for (char_ptr = (const unsigned char *) s + n;
|
||||
n > 0 && ((unsigned long int) char_ptr
|
||||
& (sizeof (longword) - 1)) != 0;
|
||||
--n)
|
||||
if (*--char_ptr == c)
|
||||
return (__ptr_t) char_ptr;
|
||||
|
||||
/* All these elucidatory comments refer to 4-byte longwords,
|
||||
but the theory applies equally well to 8-byte longwords. */
|
||||
|
||||
longword_ptr = (unsigned long int *) char_ptr;
|
||||
|
||||
/* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
|
||||
the "holes." Note that there is a hole just to the left of
|
||||
each byte, with an extra at the end:
|
||||
|
||||
bits: 01111110 11111110 11111110 11111111
|
||||
bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
|
||||
|
||||
The 1-bits make sure that carries propagate to the next 0-bit.
|
||||
The 0-bits provide holes for carries to fall into. */
|
||||
|
||||
if (sizeof (longword) != 4 && sizeof (longword) != 8)
|
||||
abort ();
|
||||
|
||||
#if LONG_MAX <= LONG_MAX_32_BITS
|
||||
magic_bits = 0x7efefeff;
|
||||
#else
|
||||
magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff;
|
||||
#endif
|
||||
|
||||
/* Set up a longword, each of whose bytes is C. */
|
||||
charmask = c | (c << 8);
|
||||
charmask |= charmask << 16;
|
||||
#if LONG_MAX > LONG_MAX_32_BITS
|
||||
charmask |= charmask << 32;
|
||||
#endif
|
||||
|
||||
/* Instead of the traditional loop which tests each character,
|
||||
we will test a longword at a time. The tricky part is testing
|
||||
if *any of the four* bytes in the longword in question are zero. */
|
||||
while (n >= sizeof (longword))
|
||||
{
|
||||
/* We tentatively exit the loop if adding MAGIC_BITS to
|
||||
LONGWORD fails to change any of the hole bits of LONGWORD.
|
||||
|
||||
1) Is this safe? Will it catch all the zero bytes?
|
||||
Suppose there is a byte with all zeros. Any carry bits
|
||||
propagating from its left will fall into the hole at its
|
||||
least significant bit and stop. Since there will be no
|
||||
carry from its most significant bit, the LSB of the
|
||||
byte to the left will be unchanged, and the zero will be
|
||||
detected.
|
||||
|
||||
2) Is this worthwhile? Will it ignore everything except
|
||||
zero bytes? Suppose every byte of LONGWORD has a bit set
|
||||
somewhere. There will be a carry into bit 8. If bit 8
|
||||
is set, this will carry into bit 16. If bit 8 is clear,
|
||||
one of bits 9-15 must be set, so there will be a carry
|
||||
into bit 16. Similarly, there will be a carry into bit
|
||||
24. If one of bits 24-30 is set, there will be a carry
|
||||
into bit 31, so all of the hole bits will be changed.
|
||||
|
||||
The one misfire occurs when bits 24-30 are clear and bit
|
||||
31 is set; in this case, the hole at bit 31 is not
|
||||
changed. If we had access to the processor carry flag,
|
||||
we could close this loophole by putting the fourth hole
|
||||
at bit 32!
|
||||
|
||||
So it ignores everything except 128's, when they're aligned
|
||||
properly.
|
||||
|
||||
3) But wait! Aren't we looking for C, not zero?
|
||||
Good point. So what we do is XOR LONGWORD with a longword,
|
||||
each of whose bytes is C. This turns each byte that is C
|
||||
into a zero. */
|
||||
|
||||
longword = *--longword_ptr ^ charmask;
|
||||
|
||||
/* Add MAGIC_BITS to LONGWORD. */
|
||||
if ((((longword + magic_bits)
|
||||
|
||||
/* Set those bits that were unchanged by the addition. */
|
||||
^ ~longword)
|
||||
|
||||
/* Look at only the hole bits. If any of the hole bits
|
||||
are unchanged, most likely one of the bytes was a
|
||||
zero. */
|
||||
& ~magic_bits) != 0)
|
||||
{
|
||||
/* Which of the bytes was C? If none of them were, it was
|
||||
a misfire; continue the search. */
|
||||
|
||||
const unsigned char *cp = (const unsigned char *) longword_ptr;
|
||||
|
||||
#if LONG_MAX > 2147483647
|
||||
if (cp[7] == c)
|
||||
return (__ptr_t) &cp[7];
|
||||
if (cp[6] == c)
|
||||
return (__ptr_t) &cp[6];
|
||||
if (cp[5] == c)
|
||||
return (__ptr_t) &cp[5];
|
||||
if (cp[4] == c)
|
||||
return (__ptr_t) &cp[4];
|
||||
#endif
|
||||
if (cp[3] == c)
|
||||
return (__ptr_t) &cp[3];
|
||||
if (cp[2] == c)
|
||||
return (__ptr_t) &cp[2];
|
||||
if (cp[1] == c)
|
||||
return (__ptr_t) &cp[1];
|
||||
if (cp[0] == c)
|
||||
return (__ptr_t) cp;
|
||||
}
|
||||
|
||||
n -= sizeof (longword);
|
||||
}
|
||||
|
||||
char_ptr = (const unsigned char *) longword_ptr;
|
||||
|
||||
while (n-- > 0)
|
||||
{
|
||||
if (*--char_ptr == c)
|
||||
return (__ptr_t) char_ptr;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__memrchr, memrchr)
|
||||
#endif
|
||||
+94
-75
@@ -1,26 +1,25 @@
|
||||
/* obstack.c - subroutines used implicitly by object stack macros
|
||||
Copyright (C) 1988-1994,96,97,98,99,2000 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1988-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "obstack.h"
|
||||
@@ -40,40 +39,43 @@
|
||||
files, it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
|
||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||
#include <gnu-versions.h>
|
||||
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
||||
#define ELIDE_CODE
|
||||
#endif
|
||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||
# include <gnu-versions.h>
|
||||
# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
||||
# define ELIDE_CODE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define POINTER void *
|
||||
#else
|
||||
#define POINTER char *
|
||||
#endif
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define POINTER void *
|
||||
# else
|
||||
# define POINTER char *
|
||||
# endif
|
||||
|
||||
/* Determine default alignment. */
|
||||
struct fooalign {char x; double d;};
|
||||
#define DEFAULT_ALIGNMENT \
|
||||
# define DEFAULT_ALIGNMENT \
|
||||
((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
|
||||
/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
|
||||
But in fact it might be less smart and round addresses to as much as
|
||||
DEFAULT_ROUNDING. So we prepare for it to do that. */
|
||||
union fooround {long x; double d;};
|
||||
#define DEFAULT_ROUNDING (sizeof (union fooround))
|
||||
# define DEFAULT_ROUNDING (sizeof (union fooround))
|
||||
|
||||
/* When we copy a long block of data, this is the unit to do it with.
|
||||
On some machines, copying successive ints does not work;
|
||||
in such a case, redefine COPYING_UNIT to `long' (if that works)
|
||||
or `char' as a last resort. */
|
||||
#ifndef COPYING_UNIT
|
||||
#define COPYING_UNIT int
|
||||
#endif
|
||||
# ifndef COPYING_UNIT
|
||||
# define COPYING_UNIT int
|
||||
# endif
|
||||
|
||||
|
||||
/* The functions allocating more room by calling `obstack_chunk_alloc'
|
||||
@@ -82,21 +84,21 @@ union fooround {long x; double d;};
|
||||
abort gracefully or use longjump - but shouldn't return. This
|
||||
variable by default points to the internal function
|
||||
`print_and_abort'. */
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
static void print_and_abort (void);
|
||||
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
|
||||
#else
|
||||
# else
|
||||
static void print_and_abort ();
|
||||
void (*obstack_alloc_failed_handler) () = print_and_abort;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Exit value used when `print_and_abort' is used. */
|
||||
#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifndef EXIT_FAILURE
|
||||
#define EXIT_FAILURE 1
|
||||
#endif
|
||||
# if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
# ifndef EXIT_FAILURE
|
||||
# define EXIT_FAILURE 1
|
||||
# endif
|
||||
int obstack_exit_failure = EXIT_FAILURE;
|
||||
|
||||
/* The non-GNU-C macros copy the obstack into this global variable
|
||||
@@ -110,33 +112,33 @@ struct obstack *_obstack;
|
||||
For free, do not use ?:, since some compilers, like the MIPS compilers,
|
||||
do not allow (expr) ? void : void. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define CALL_CHUNKFUN(h, size) \
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define CALL_CHUNKFUN(h, size) \
|
||||
(((h) -> use_extra_arg) \
|
||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||
: (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
|
||||
|
||||
#define CALL_FREEFUN(h, old_chunk) \
|
||||
# define CALL_FREEFUN(h, old_chunk) \
|
||||
do { \
|
||||
if ((h) -> use_extra_arg) \
|
||||
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
||||
else \
|
||||
(*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
|
||||
} while (0)
|
||||
#else
|
||||
#define CALL_CHUNKFUN(h, size) \
|
||||
# else
|
||||
# define CALL_CHUNKFUN(h, size) \
|
||||
(((h) -> use_extra_arg) \
|
||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||
: (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
|
||||
|
||||
#define CALL_FREEFUN(h, old_chunk) \
|
||||
# define CALL_FREEFUN(h, old_chunk) \
|
||||
do { \
|
||||
if ((h) -> use_extra_arg) \
|
||||
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
||||
else \
|
||||
(*(void (*) ()) (h)->freefun) ((old_chunk)); \
|
||||
} while (0)
|
||||
#endif
|
||||
# endif
|
||||
|
||||
|
||||
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
|
||||
@@ -152,13 +154,13 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
|
||||
struct obstack *h;
|
||||
int size;
|
||||
int alignment;
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
POINTER (*chunkfun) (long);
|
||||
void (*freefun) (void *);
|
||||
#else
|
||||
# else
|
||||
POINTER (*chunkfun) ();
|
||||
void (*freefun) ();
|
||||
#endif
|
||||
# endif
|
||||
{
|
||||
register struct _obstack_chunk *chunk; /* points to new chunk */
|
||||
|
||||
@@ -181,13 +183,13 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
|
||||
size = 4096 - extra;
|
||||
}
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
|
||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||
#else
|
||||
# else
|
||||
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
||||
h->freefun = freefun;
|
||||
#endif
|
||||
# endif
|
||||
h->chunk_size = size;
|
||||
h->alignment_mask = alignment - 1;
|
||||
h->use_extra_arg = 0;
|
||||
@@ -210,13 +212,13 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
|
||||
struct obstack *h;
|
||||
int size;
|
||||
int alignment;
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
POINTER (*chunkfun) (POINTER, long);
|
||||
void (*freefun) (POINTER, POINTER);
|
||||
#else
|
||||
# else
|
||||
POINTER (*chunkfun) ();
|
||||
void (*freefun) ();
|
||||
#endif
|
||||
# endif
|
||||
POINTER arg;
|
||||
{
|
||||
register struct _obstack_chunk *chunk; /* points to new chunk */
|
||||
@@ -240,13 +242,13 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
|
||||
size = 4096 - extra;
|
||||
}
|
||||
|
||||
#if defined(__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
|
||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||
#else
|
||||
# else
|
||||
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
||||
h->freefun = freefun;
|
||||
#endif
|
||||
# endif
|
||||
h->chunk_size = size;
|
||||
h->alignment_mask = alignment - 1;
|
||||
h->extra_arg = arg;
|
||||
@@ -341,11 +343,11 @@ _obstack_newchunk (h, length)
|
||||
This is here for debugging.
|
||||
If you use it in a program, you are probably losing. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
|
||||
obstack.h because it is just for debugging. */
|
||||
int _obstack_allocated_p (struct obstack *h, POINTER obj);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
int
|
||||
_obstack_allocated_p (h, obj)
|
||||
@@ -370,7 +372,7 @@ _obstack_allocated_p (h, obj)
|
||||
/* Free objects in obstack H, including OBJ and everything allocate
|
||||
more recently than OBJ. If OBJ is zero, free everything in H. */
|
||||
|
||||
#undef obstack_free
|
||||
# undef obstack_free
|
||||
|
||||
/* This function has two names with identical definitions.
|
||||
This is the first one, called from non-ANSI code. */
|
||||
@@ -456,37 +458,54 @@ _obstack_memory_used (h)
|
||||
}
|
||||
|
||||
/* Define the error handler. */
|
||||
#ifndef _
|
||||
# if defined HAVE_LIBINTL_H || defined _LIBC
|
||||
# include <libintl.h>
|
||||
# ifndef _
|
||||
# define _(Str) gettext (Str)
|
||||
# ifndef _
|
||||
# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||
# include <libintl.h>
|
||||
# ifndef _
|
||||
# define _(Str) gettext (Str)
|
||||
# endif
|
||||
# else
|
||||
# define _(Str) (Str)
|
||||
# endif
|
||||
# endif
|
||||
# if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fputs(s, f) _IO_fputs (s, f)
|
||||
# endif
|
||||
|
||||
# ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
# else
|
||||
# define _(Str) (Str)
|
||||
# endif
|
||||
#endif
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fputs(s, f) _IO_fputs (s, f)
|
||||
#endif
|
||||
|
||||
static void
|
||||
__attribute__ ((noreturn))
|
||||
print_and_abort ()
|
||||
{
|
||||
fputs (_("memory exhausted"), stderr);
|
||||
fputc ('\n', stderr);
|
||||
/* Don't change any of these strings. Yes, it would be possible to add
|
||||
the newline to the string and use fputs or so. But this must not
|
||||
happen because the "memory exhausted" message appears in other places
|
||||
like this and the translation should be reused instead of creating
|
||||
a very similar string which requires a separate translation. */
|
||||
# if defined _LIBC && defined USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s\n", _("memory exhausted"));
|
||||
else
|
||||
# endif
|
||||
fprintf (stderr, "%s\n", _("memory exhausted"));
|
||||
exit (obstack_exit_failure);
|
||||
}
|
||||
|
||||
#if 0
|
||||
# if 0
|
||||
/* These are now turned off because the applications do not use it
|
||||
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
|
||||
|
||||
/* Now define the functional versions of the obstack macros.
|
||||
Define them to simply use the corresponding macros to do the job. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
/* These function definitions do not work with non-ANSI preprocessors;
|
||||
they won't pass through the macro names in parentheses. */
|
||||
|
||||
@@ -597,8 +616,8 @@ POINTER (obstack_copy0) (obstack, address, length)
|
||||
return obstack_copy0 (obstack, address, length);
|
||||
}
|
||||
|
||||
#endif /* __STDC__ */
|
||||
# endif /* __STDC__ */
|
||||
|
||||
#endif /* 0 */
|
||||
# endif /* 0 */
|
||||
|
||||
#endif /* !ELIDE_CODE */
|
||||
|
||||
+11
-8
@@ -4,20 +4,23 @@
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
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 distributed in the hope that it will be useful,
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
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. */
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* Summary:
|
||||
|
||||
|
||||
+22
-2
@@ -1,12 +1,32 @@
|
||||
/* quote.c - quote arguments for output
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 <[email protected]> */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDDEF_H
|
||||
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <quotearg.h>
|
||||
#include <quote.h>
|
||||
#include "quotearg.h"
|
||||
#include "quote.h"
|
||||
|
||||
/* Return an unambiguous printable representated, allocated in slot N,
|
||||
for NAME, suitable for diagnostics. */
|
||||
|
||||
+17
-1
@@ -1,4 +1,20 @@
|
||||
/* prototypes for quote.c */
|
||||
/* quote.h - prototypes for quote.c
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
|
||||
+35
-13
@@ -25,8 +25,8 @@
|
||||
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <quotearg.h>
|
||||
#include <xalloc.h>
|
||||
#include "quotearg.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -44,9 +44,15 @@
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
#ifndef UCHAR_MAX
|
||||
# define UCHAR_MAX ((unsigned char) -1)
|
||||
#endif
|
||||
#ifndef UINT_MAX
|
||||
# define UINT_MAX ((unsigned int) -1)
|
||||
#endif
|
||||
|
||||
#if HAVE_C_BACKSLASH_A
|
||||
# define ALERT_CHAR '\a'
|
||||
@@ -63,6 +69,11 @@
|
||||
#endif
|
||||
|
||||
#if HAVE_WCHAR_H
|
||||
|
||||
/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. */
|
||||
# include <stdio.h>
|
||||
# include <time.h>
|
||||
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
@@ -73,8 +84,12 @@
|
||||
# undef MB_CUR_MAX
|
||||
# define MB_CUR_MAX 1
|
||||
# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
|
||||
# define mbsinit(ps) 1
|
||||
# define iswprint(wc) ISPRINT ((unsigned char) (wc))
|
||||
# undef HAVE_MBSINIT
|
||||
#endif
|
||||
|
||||
#if !defined mbsinit && !HAVE_MBSINIT
|
||||
# define mbsinit(ps) 1
|
||||
#endif
|
||||
|
||||
#ifndef iswprint
|
||||
@@ -530,6 +545,7 @@ quotearg_n_options (int n, char const *arg,
|
||||
one small component of a "memory exhausted" message in slot 0. */
|
||||
static char slot0[256];
|
||||
static unsigned int nslots = 1;
|
||||
unsigned int n0 = n;
|
||||
struct slotvec
|
||||
{
|
||||
size_t size;
|
||||
@@ -538,20 +554,26 @@ quotearg_n_options (int n, char const *arg,
|
||||
static struct slotvec slotvec0 = {sizeof slot0, slot0};
|
||||
static struct slotvec *slotvec = &slotvec0;
|
||||
|
||||
if (nslots <= n)
|
||||
if (n < 0)
|
||||
abort ();
|
||||
|
||||
if (nslots <= n0)
|
||||
{
|
||||
int n1 = n + 1;
|
||||
size_t s = n1 * sizeof (struct slotvec);
|
||||
if (! (0 < n1 && n1 == s / sizeof (struct slotvec)))
|
||||
abort ();
|
||||
unsigned int n1 = n0 + 1;
|
||||
size_t s = n1 * sizeof *slotvec;
|
||||
|
||||
if (SIZE_MAX / UINT_MAX <= sizeof *slotvec
|
||||
&& n1 != s / sizeof *slotvec)
|
||||
xalloc_die ();
|
||||
|
||||
if (slotvec == &slotvec0)
|
||||
{
|
||||
slotvec = (struct slotvec *) xmalloc (sizeof (struct slotvec));
|
||||
slotvec = (struct slotvec *) xmalloc (sizeof *slotvec);
|
||||
*slotvec = slotvec0;
|
||||
}
|
||||
slotvec = (struct slotvec *) xrealloc (slotvec, s);
|
||||
memset (slotvec + nslots, 0, (n1 - nslots) * sizeof (struct slotvec));
|
||||
nslots = n;
|
||||
memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);
|
||||
nslots = n1;
|
||||
}
|
||||
|
||||
{
|
||||
@@ -571,7 +593,7 @@ quotearg_n_options (int n, char const *arg,
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n (unsigned int n, char const *arg)
|
||||
quotearg_n (int n, char const *arg)
|
||||
{
|
||||
return quotearg_n_options (n, arg, &default_quoting_options);
|
||||
}
|
||||
@@ -583,7 +605,7 @@ quotearg (char const *arg)
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n_style (unsigned int n, enum quoting_style s, char const *arg)
|
||||
quotearg_n_style (int n, enum quoting_style s, char const *arg)
|
||||
{
|
||||
struct quoting_options o;
|
||||
o.style = s;
|
||||
|
||||
+2
-3
@@ -89,7 +89,7 @@ size_t quotearg_buffer PARAMS ((char *buffer, size_t buffersize,
|
||||
The returned value points to static storage that can be
|
||||
reused by the next call to this function with the same value of N.
|
||||
N must be nonnegative. */
|
||||
char *quotearg_n PARAMS ((unsigned int n, char const *arg));
|
||||
char *quotearg_n PARAMS ((int n, char const *arg));
|
||||
|
||||
/* Equivalent to quotearg_n (0, ARG). */
|
||||
char *quotearg PARAMS ((char const *arg));
|
||||
@@ -97,8 +97,7 @@ 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));
|
||||
char *quotearg_n_style PARAMS ((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));
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU 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 distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place -
|
||||
Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
char *
|
||||
strchr (const char *s, int c)
|
||||
{
|
||||
return index (s, c);
|
||||
}
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/* Find the length of STRING, but scan at most MAXLEN characters.
|
||||
Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -51,7 +51,7 @@ size_t
|
||||
__strnlen (const char *string, size_t maxlen)
|
||||
{
|
||||
const char *end = memchr (string, '\0', maxlen);
|
||||
return end ? end - string : maxlen;
|
||||
return end ? (size_t) (end - string) : maxlen;
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__strnlen, strnlen)
|
||||
|
||||
+2
-2
@@ -47,11 +47,11 @@ void free ();
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DONE_WORKING_MALLOC_CHECK
|
||||
you must run the autoconf test for a properly working malloc -- see malloc.m4
|
||||
"you must run the autoconf test for a properly working malloc -- see malloc.m4"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DONE_WORKING_REALLOC_CHECK
|
||||
you must run the autoconf test for a properly working realloc -- see realloc.m4
|
||||
"you must run the autoconf test for a properly working realloc --see realloc.m4"
|
||||
#endif
|
||||
|
||||
/* Exit value when the requested amount of memory is not available.
|
||||
|
||||
+2
-10
@@ -1,5 +1,5 @@
|
||||
/* xstrdup.c -- copy a string with out of memory checking
|
||||
Copyright (C) 1990, 1996, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1996, 1998, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,14 +19,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
@@ -35,7 +27,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
char *xmalloc PARAMS ((size_t n));
|
||||
#include "xalloc.h"
|
||||
|
||||
/* Return a newly allocated copy of STRING. */
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997, 1998, 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.
|
||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
@@ -17,20 +14,20 @@
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined _LIBC || defined STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef HAVE_DECL_STRNLEN
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
@@ -38,18 +35,13 @@ char *malloc ();
|
||||
size_t strnlen ();
|
||||
#endif
|
||||
|
||||
#undef __strndup
|
||||
#undef strndup
|
||||
|
||||
#ifndef weak_alias
|
||||
# define __strndup strndup
|
||||
#endif
|
||||
char *xstrndup (const char *s, size_t n);
|
||||
|
||||
char *
|
||||
__strndup (const char *s, size_t n)
|
||||
xstrndup (const char *s, size_t n)
|
||||
{
|
||||
size_t len = strnlen (s, n);
|
||||
char *new = malloc (len + 1);
|
||||
char *new = xmalloc (len + 1);
|
||||
|
||||
if (new == NULL)
|
||||
return NULL;
|
||||
@@ -57,6 +49,3 @@ __strndup (const char *s, size_t n)
|
||||
new[len] = '\0';
|
||||
return (char *) memcpy (new, s, len);
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__strndup, strndup)
|
||||
#endif
|
||||
+3
-2
@@ -1,15 +1,16 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
EXTRA_DIST = \
|
||||
EXTRA_DIST = lib-ld.m4 lib-link.m4 lib-prefix.m4 \
|
||||
c-bs-a.m4 \
|
||||
codeset.m4 \
|
||||
dmalloc.m4 \
|
||||
error.m4 \
|
||||
gettext.m4 \
|
||||
glibc21.m4 \
|
||||
iconv.m4 \
|
||||
isc-posix.m4 \
|
||||
lcmessage.m4 \
|
||||
m4.m4 \
|
||||
malloc.m4 \
|
||||
mbrtowc.m4 \
|
||||
mbstate_t.m4 \
|
||||
prereq.m4 \
|
||||
progtest.m4 \
|
||||
|
||||
+31
-21
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -43,9 +43,12 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -57,56 +60,62 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC = @GCC@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
LIBINTL = @LIBINTL@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
EXTRA_DIST = \
|
||||
EXTRA_DIST = lib-ld.m4 lib-link.m4 lib-prefix.m4 \
|
||||
c-bs-a.m4 \
|
||||
codeset.m4 \
|
||||
dmalloc.m4 \
|
||||
error.m4 \
|
||||
gettext.m4 \
|
||||
glibc21.m4 \
|
||||
iconv.m4 \
|
||||
isc-posix.m4 \
|
||||
lcmessage.m4 \
|
||||
m4.m4 \
|
||||
malloc.m4 \
|
||||
mbrtowc.m4 \
|
||||
mbstate_t.m4 \
|
||||
prereq.m4 \
|
||||
progtest.m4 \
|
||||
@@ -127,14 +136,11 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu m4/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
@@ -142,13 +148,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
cp -pR $$d/$$file $(distdir)$$dir \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
@@ -173,6 +182,7 @@ install-am: all-am
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
#serial 3
|
||||
#serial 4
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
AC_DEFUN(AC_C_BACKSLASH_A,
|
||||
AC_DEFUN([AC_C_BACKSLASH_A],
|
||||
[
|
||||
AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
|
||||
[AC_TRY_COMPILE([],
|
||||
|
||||
+7
-1
@@ -1,4 +1,10 @@
|
||||
#serial AM1
|
||||
# codeset.m4 serial AM1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
## ----------------------------------- ##
|
||||
## Check if --with-dmalloc was given. ##
|
||||
## From Franc,ois Pinard ##
|
||||
## ----------------------------------- ##
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN([AM_WITH_DMALLOC],
|
||||
[AC_MSG_CHECKING([if malloc debugging is wanted])
|
||||
AC_ARG_WITH(dmalloc,
|
||||
[ --with-dmalloc use dmalloc, as in
|
||||
http://www.dmalloc.com/dmalloc.tar.gz],
|
||||
[if test "$withval" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(WITH_DMALLOC,1,
|
||||
[Define if using the dmalloc debugging malloc package])
|
||||
LIBS="$LIBS -ldmalloc"
|
||||
LDFLAGS="$LDFLAGS -g"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi], [AC_MSG_RESULT(no)])
|
||||
])
|
||||
+5
-4
@@ -1,12 +1,13 @@
|
||||
#serial 1
|
||||
#serial 4
|
||||
|
||||
dnl FIXME: put these prerequisite-only *.m4 files in a separate
|
||||
dnl directory -- otherwise, they'll conflict with existing files.
|
||||
|
||||
dnl These are the prerequisite macros for GNU's error.c file.
|
||||
AC_DEFUN(jm_PREREQ_ERROR,
|
||||
AC_DEFUN([jm_PREREQ_ERROR],
|
||||
[
|
||||
AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt)
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_FUNCS(strerror vprintf doprnt)
|
||||
AC_CHECK_DECLS([strerror])
|
||||
AC_FUNC_STRERROR_R
|
||||
AC_HEADER_STDC
|
||||
])
|
||||
|
||||
+446
-273
@@ -1,25 +1,40 @@
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <[email protected]>, 1995.
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
# gettext.m4 serial 13 (gettext-0.11.1)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
# serial 10
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <[email protected]>, 1995-2000.
|
||||
dnl Bruno Haible <[email protected]>, 2000-2002.
|
||||
|
||||
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
|
||||
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
|
||||
dnl Macro to add for using GNU gettext.
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
|
||||
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
|
||||
dnl default (if it is not specified or empty) is 'no-libtool'.
|
||||
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
|
||||
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
|
||||
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
|
||||
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
||||
dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
||||
dnl AM-DISABLE-SHARED). Otherwise, a static library
|
||||
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
|
||||
dnl $(top_builddir)/intl/libintl.a will be created.
|
||||
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
||||
dnl implementations (in libc or libintl) without the ngettext() function
|
||||
dnl will be ignored.
|
||||
dnl LIBDIR is used to find the intl libraries. If empty,
|
||||
dnl INTLDIR is used to find the intl libraries. If empty,
|
||||
dnl the value `$(top_builddir)/intl/' is used.
|
||||
dnl
|
||||
dnl The result of the configuration is one of three cases:
|
||||
@@ -33,29 +48,53 @@ dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||
dnl 3) No internationalization, always use English msgid.
|
||||
dnl Catalog format: none
|
||||
dnl Catalog extension: none
|
||||
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
|
||||
dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
||||
dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
||||
dnl but we keep it in order not to force irrelevant filename changes on the
|
||||
dnl maintainers.
|
||||
dnl
|
||||
AC_DEFUN([AM_WITH_NLS],
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
AC_DEFUN([AM_GNU_GETTEXT],
|
||||
[
|
||||
dnl Argument checking.
|
||||
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
|
||||
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
|
||||
])])])])])
|
||||
ifelse([$2], [], , [ifelse([$2], [need-ngettext], ,
|
||||
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
|
||||
])])])
|
||||
define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
|
||||
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
|
||||
|
||||
AC_REQUIRE([AM_PO_SUBDIRS])dnl
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_REQUIRE([AM_INTL_SUBDIR])dnl
|
||||
])
|
||||
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
BUILD_INCLUDED_LIBINTL=no
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
INTLLIBS=
|
||||
])
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
POSUB=
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS, 1,
|
||||
[Define to 1 if translation of program messages to the user's native language
|
||||
is requested.])
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
gt_use_preinstalled_gnugettext=no
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_MSG_CHECKING([whether included gettext is requested])
|
||||
AC_ARG_WITH(included-gettext,
|
||||
[ --with-included-gettext use the GNU gettext library included here],
|
||||
@@ -65,214 +104,158 @@ AC_DEFUN([AM_WITH_NLS],
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
])
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If GNU gettext is available we use this. Else we have
|
||||
dnl to fall back to GNU NLS library.
|
||||
CATOBJEXT=NONE
|
||||
|
||||
dnl Add a version number to the cache macros.
|
||||
define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
|
||||
define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
|
||||
define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1))
|
||||
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
|
||||
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||
gt_cv_func_gnugettext_libc=yes,
|
||||
gt_cv_func_gnugettext_libc=no)])
|
||||
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern int *_nl_domain_bindings;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
|
||||
gt_cv_func_gnugettext_libc=yes,
|
||||
gt_cv_func_gnugettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
||||
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||
gt_cv_func_gnugettext_libintl,
|
||||
[gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -lintl $LIBICONV"
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||
gt_cv_func_gnugettext_libintl=yes,
|
||||
gt_cv_func_gnugettext_libintl=no)
|
||||
LIBS="$gt_save_LIBS"])
|
||||
fi
|
||||
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
||||
dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
||||
ifelse(gt_included_intl, yes, , [
|
||||
AM_ICONV_LINK
|
||||
])
|
||||
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
|
||||
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
|
||||
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
|
||||
dnl even if libiconv doesn't exist.
|
||||
AC_LIB_LINKFLAGS_BODY([intl])
|
||||
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||
gt_cv_func_gnugettext_libintl,
|
||||
[gt_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $INCINTL"
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBINTL"
|
||||
dnl Now see whether libintl exists and does not depend on libiconv.
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern int *_nl_domain_bindings;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias ();],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
|
||||
gt_cv_func_gnugettext_libintl=yes,
|
||||
gt_cv_func_gnugettext_libintl=no)
|
||||
dnl Now see whether libintl exists and depends on libiconv.
|
||||
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern int *_nl_domain_bindings;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias ();],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
|
||||
[LIBINTL="$LIBINTL $LIBICONV"
|
||||
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
|
||||
gt_cv_func_gnugettext_libintl=yes
|
||||
])
|
||||
fi
|
||||
CPPFLAGS="$gt_save_CPPFLAGS"
|
||||
LIBS="$gt_save_LIBS"])
|
||||
fi
|
||||
|
||||
dnl If an already present or preinstalled GNU gettext() is found,
|
||||
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||
dnl gettext is already preinstalled in libintl, we update this
|
||||
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
||||
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
||||
&& test "$PACKAGE" != gettext; }; then
|
||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||
dnl If an already present or preinstalled GNU gettext() is found,
|
||||
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||
dnl gettext is already preinstalled in libintl, we update this
|
||||
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
||||
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
||||
&& test "$PACKAGE" != gettext; }; then
|
||||
gt_use_preinstalled_gnugettext=yes
|
||||
else
|
||||
dnl Reset the values set by searching for libintl.
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
INCINTL=
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
||||
dnl If iconv() is in a separate libiconv library, then anyone
|
||||
dnl linking with libintl{.a,.so} also needs to link with
|
||||
dnl libiconv.
|
||||
INTLLIBS="-lintl $LIBICONV"
|
||||
fi
|
||||
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
LIBS="$gt_save_LIBS"
|
||||
|
||||
dnl Search for GNU msgfmt in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
|
||||
dnl Search for GNU xgettext in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
||||
|
||||
CATOBJEXT=.gmo
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl GNU gettext is not found in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
ifelse(gt_included_intl, yes, [
|
||||
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
|
||||
dnl GNU gettext is not found in the C library.
|
||||
dnl Fall back on included GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions used to generate GNU NLS library.
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
||||
AC_SUBST(MSGFMT)
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
|
||||
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
|
||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||
fi
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions to use GNU gettext tools.
|
||||
CATOBJEXT=.gmo
|
||||
INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
|
||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||
fi
|
||||
])
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU msgfmt.
|
||||
if test "$GMSGFMT" != ":"; then
|
||||
dnl If it is no GNU msgfmt we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found msgfmt program is not GNU msgfmt; ignore it])
|
||||
GMSGFMT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl We need to process the po/ directory.
|
||||
POSUB=po
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS, 1,
|
||||
[Define to 1 if translation of program messages to the user's native language
|
||||
is requested.])
|
||||
else
|
||||
USE_NLS=no
|
||||
fi
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[for ac_file in $CONFIG_FILES; do
|
||||
# Support "outfile[:infile[:infile...]]"
|
||||
case "$ac_file" in
|
||||
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
esac
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
case "$ac_file" in */Makefile.in)
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||
rm -f "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||
sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done])
|
||||
fi
|
||||
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
||||
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
||||
AC_MSG_CHECKING([how to link with libintl])
|
||||
AC_MSG_RESULT([$LIBINTL])
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
|
||||
fi
|
||||
|
||||
dnl For backward compatibility. Some packages may be using this.
|
||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||
AC_DEFINE(HAVE_DCGETTEXT, 1,
|
||||
[Define if the GNU dcgettext() function is already present or preinstalled.])
|
||||
fi
|
||||
|
||||
dnl We need to process the po/ directory.
|
||||
POSUB=po
|
||||
fi
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
||||
dnl to 'yes' because some of the testsuite requires it.
|
||||
if test "$PACKAGE" = gettext; then
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
fi
|
||||
|
||||
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||
dnl because plural.y uses bison specific features. It requires at least
|
||||
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
||||
dnl compile.
|
||||
dnl bison is only needed for the maintainer (who touches plural.y). But in
|
||||
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
||||
dnl the rule in general Makefile. Now, some people carelessly touch the
|
||||
dnl files or have a broken "make" program, hence the plural.c rule will
|
||||
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
||||
dnl present or too old.
|
||||
AC_CHECK_PROGS([INTLBISON], [bison])
|
||||
if test -z "$INTLBISON"; then
|
||||
ac_verc_fail=yes
|
||||
else
|
||||
dnl Found it, now check the version.
|
||||
AC_MSG_CHECKING([version of bison])
|
||||
changequote(<<,>>)dnl
|
||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||
case $ac_prog_version in
|
||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||
changequote([,])dnl
|
||||
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||
esac
|
||||
AC_MSG_RESULT([$ac_prog_version])
|
||||
fi
|
||||
if test $ac_verc_fail = yes; then
|
||||
INTLBISON=:
|
||||
fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(BUILD_INCLUDED_LIBINTL)
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
|
||||
dnl For backward compatibility. Some configure.ins may be using this.
|
||||
nls_cv_header_intl=
|
||||
@@ -289,80 +272,270 @@ changequote([,])dnl
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
GENCAT=gencat
|
||||
AC_SUBST(GENCAT)
|
||||
|
||||
dnl Enable libtool support if the surrounding package wishes it.
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
|
||||
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
||||
])
|
||||
|
||||
dnl Usage: Just like AM_WITH_NLS, which see.
|
||||
AC_DEFUN([AM_GNU_GETTEXT],
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
AC_REQUIRE([jm_GLIBC21])dnl
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INTLLIBS="$LIBINTL"
|
||||
AC_SUBST(INTLLIBS)
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
||||
dnl Make all documented variables known to autoconf.
|
||||
AC_SUBST(LIBINTL)
|
||||
AC_SUBST(LTLIBINTL)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
|
||||
dnl Checks for all prerequisites of the po subdirectory,
|
||||
dnl except for USE_NLS.
|
||||
AC_DEFUN([AM_PO_SUBDIRS],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
||||
|
||||
dnl Perform the following tests also if --disable-nls has been given,
|
||||
dnl because they are needed for "make dist" to work.
|
||||
|
||||
dnl Search for GNU msgfmt in the PATH.
|
||||
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
|
||||
dnl The second test excludes FreeBSD msgfmt.
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
|
||||
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
|
||||
dnl Search for GNU xgettext 0.11 or newer in the PATH.
|
||||
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
|
||||
dnl The second test excludes FreeBSD xgettext.
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
|
||||
(if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
dnl Remove leftover from FreeBSD xgettext call.
|
||||
rm -f messages.po
|
||||
|
||||
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
|
||||
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU msgfmt.
|
||||
if test "$GMSGFMT" != ":"; then
|
||||
dnl If it is no GNU msgfmt we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
|
||||
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
||||
: ;
|
||||
else
|
||||
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
|
||||
AC_MSG_RESULT(
|
||||
[found $GMSGFMT program is not GNU msgfmt; ignore it])
|
||||
GMSGFMT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
|
||||
(if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
dnl Remove leftover from FreeBSD xgettext call.
|
||||
rm -f messages.po
|
||||
fi
|
||||
|
||||
AC_OUTPUT_COMMANDS([
|
||||
for ac_file in $CONFIG_FILES; do
|
||||
# Support "outfile[:infile[:infile...]]"
|
||||
case "$ac_file" in
|
||||
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
esac
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
case "$ac_file" in */Makefile.in)
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||
rm -f "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
|
||||
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
|
||||
# on $ac_dir but don't depend on user-specified configuration
|
||||
# parameters.
|
||||
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
||||
# The LINGUAS file contains the set of available languages.
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
||||
fi
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
# Hide the ALL_LINGUAS assigment from automake.
|
||||
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
||||
fi
|
||||
case "$ac_given_srcdir" in
|
||||
.) srcdirpre= ;;
|
||||
*) srcdirpre='$(srcdir)/' ;;
|
||||
esac
|
||||
POFILES=
|
||||
GMOFILES=
|
||||
UPDATEPOFILES=
|
||||
DUMMYPOFILES=
|
||||
for lang in $ALL_LINGUAS; do
|
||||
POFILES="$POFILES $srcdirpre$lang.po"
|
||||
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
|
||||
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
|
||||
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
|
||||
done
|
||||
# CATALOGS depends on both $ac_dir and the user's LINGUAS
|
||||
# environment variable.
|
||||
INST_LINGUAS=
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
if test "%UNSET%" != "$LINGUAS"; then
|
||||
desiredlanguages="$LINGUAS"
|
||||
else
|
||||
desiredlanguages="$ALL_LINGUAS"
|
||||
fi
|
||||
for desiredlang in $desiredlanguages; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
INST_LINGUAS="$INST_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
CATALOGS=
|
||||
if test -n "$INST_LINGUAS"; then
|
||||
for lang in $INST_LINGUAS; do
|
||||
CATALOGS="$CATALOGS $lang.gmo"
|
||||
done
|
||||
fi
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
|
||||
if test -f "$f"; then
|
||||
case "$f" in
|
||||
*.orig | *.bak | *~) ;;
|
||||
*) cat "$f" >> "$ac_dir/Makefile" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done],
|
||||
[# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
|
||||
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
|
||||
# from automake.
|
||||
eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
|
||||
# Capture the value of LINGUAS because we need it to compute CATALOGS.
|
||||
LINGUAS="${LINGUAS-%UNSET%}"
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl Checks for all prerequisites of the intl subdirectory,
|
||||
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
|
||||
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
|
||||
AC_DEFUN([AM_INTL_SUBDIR],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
AC_REQUIRE([jm_GLIBC21])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
||||
stdlib.h string.h unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
|
||||
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
|
||||
strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
||||
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
|
||||
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
|
||||
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
||||
|
||||
AM_ICONV
|
||||
AM_LANGINFO_CODESET
|
||||
AM_LC_MESSAGES
|
||||
AM_WITH_NLS([$1],[$2],[$3])
|
||||
AM_ICONV
|
||||
AM_LANGINFO_CODESET
|
||||
AM_LC_MESSAGES
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||
dnl because plural.y uses bison specific features. It requires at least
|
||||
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
||||
dnl compile.
|
||||
dnl bison is only needed for the maintainer (who touches plural.y). But in
|
||||
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
||||
dnl the rule in general Makefile. Now, some people carelessly touch the
|
||||
dnl files or have a broken "make" program, hence the plural.c rule will
|
||||
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
||||
dnl present or too old.
|
||||
AC_CHECK_PROGS([INTLBISON], [bison])
|
||||
if test -z "$INTLBISON"; then
|
||||
ac_verc_fail=yes
|
||||
else
|
||||
dnl Found it, now check the version.
|
||||
AC_MSG_CHECKING([version of bison])
|
||||
changequote(<<,>>)dnl
|
||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||
case $ac_prog_version in
|
||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||
changequote([,])dnl
|
||||
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||
esac
|
||||
AC_MSG_RESULT([$ac_prog_version])
|
||||
fi
|
||||
if test $ac_verc_fail = yes; then
|
||||
INTLBISON=:
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl Enable libtool support if the surrounding package wishes it.
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
|
||||
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
||||
])
|
||||
AC_DEFUN([AM_MKINSTALLDIRS],
|
||||
[
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
])
|
||||
|
||||
+7
-1
@@ -1,4 +1,10 @@
|
||||
#serial 2
|
||||
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
# Test for the GNU C Library, version 2.1 or newer.
|
||||
# From Bruno Haible.
|
||||
|
||||
+42
-15
@@ -1,19 +1,32 @@
|
||||
#serial AM2
|
||||
# iconv.m4 serial AM3 (gettext-0.11)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([AM_ICONV],
|
||||
AC_DEFUN([AM_ICONV_LINK],
|
||||
[
|
||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||
dnl those with the standalone portable GNU libiconv installed).
|
||||
|
||||
AC_ARG_WITH([libiconv-prefix],
|
||||
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
||||
for dir in `echo "$withval" | tr : ' '`; do
|
||||
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
||||
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
||||
done
|
||||
])
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([iconv])
|
||||
|
||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed libiconv and not disabled its use
|
||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
||||
am_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||
|
||||
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||
@@ -26,7 +39,7 @@ AC_DEFUN([AM_ICONV],
|
||||
am_cv_func_iconv=yes)
|
||||
if test "$am_cv_func_iconv" != yes; then
|
||||
am_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -liconv"
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
@@ -39,6 +52,25 @@ AC_DEFUN([AM_ICONV],
|
||||
])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
||||
fi
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
AC_MSG_CHECKING([how to link with libiconv])
|
||||
AC_MSG_RESULT([$LIBICONV])
|
||||
else
|
||||
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
||||
dnl either.
|
||||
CPPFLAGS="$am_save_CPPFLAGS"
|
||||
LIBICONV=
|
||||
LTLIBICONV=
|
||||
fi
|
||||
AC_SUBST(LIBICONV)
|
||||
AC_SUBST(LTLIBICONV)
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_ICONV],
|
||||
[
|
||||
AC_REQUIRE([AM_ICONV_LINK])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_MSG_CHECKING([for iconv declaration])
|
||||
AC_CACHE_VAL(am_cv_proto_iconv, [
|
||||
AC_TRY_COMPILE([
|
||||
@@ -61,9 +93,4 @@ size_t iconv();
|
||||
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
||||
[Define as const if the declaration of iconv() needs const.])
|
||||
fi
|
||||
LIBICONV=
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
LIBICONV="-liconv"
|
||||
fi
|
||||
AC_SUBST(LIBICONV)
|
||||
])
|
||||
|
||||
+8
-1
@@ -1,4 +1,11 @@
|
||||
#serial 1
|
||||
# isc-posix.m4 serial 1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
# This test replaces the one in autoconf.
|
||||
# Currently this macro should have the same name as the autoconf macro
|
||||
# because gettext's gettext.m4 (distributed in the automake package)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user