mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-09-23 16:57:06 +00:00
Compare commits
193
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
645ff8cdee | ||
|
|
a726df0b44 | ||
|
|
ce209526ed | ||
|
|
b94bf14aac | ||
|
|
2a4426474d | ||
|
|
9022c575cc | ||
|
|
dae9263b7b | ||
|
|
cdd11a9322 | ||
|
|
da7ab9b7b0 | ||
|
|
0899b02570 | ||
|
|
0f23d6d25b | ||
|
|
47cef7a2ff | ||
|
|
7972022dac | ||
|
|
ea4f4c4c1b | ||
|
|
d97207ad77 | ||
|
|
3068221b53 | ||
|
|
6f0d1fd89d | ||
|
|
6526f6dbf7 | ||
|
|
817e461c23 | ||
|
|
c4e3dae3ac | ||
|
|
8cedc168fa | ||
|
|
3b14996787 | ||
|
|
041cad1677 | ||
|
|
31478b7ab7 | ||
|
|
e957bbb7d4 | ||
|
|
b5f513ef2c | ||
|
|
3afa674b1d | ||
|
|
ac481f3b08 | ||
|
|
010c94a243 | ||
|
|
d37a7c45b3 | ||
|
|
d63e24071f | ||
|
|
afd36419df | ||
|
|
6918b5fcc9 | ||
|
|
38e616f0f5 | ||
|
|
db433e9db8 | ||
|
|
870f12c270 | ||
|
|
e0a53a7f4a | ||
|
|
27c1ceb8da | ||
|
|
8f5d3a2dd5 | ||
|
|
adfd774c80 | ||
|
|
057194c61e | ||
|
|
a6f622cd50 | ||
|
|
2b8ce46775 | ||
|
|
19553c4e06 | ||
|
|
b1722803ec | ||
|
|
6f5e0eea04 | ||
|
|
e4ad4676be | ||
|
|
7b50efe542 | ||
|
|
cf90ca5d46 | ||
|
|
e373aad966 | ||
|
|
3e4c37cf7b | ||
|
|
dfaa776005 | ||
|
|
aecd294cb0 | ||
|
|
52eddd8c33 | ||
|
|
60403d1bc1 | ||
|
|
dd9f12de60 | ||
|
|
6085f203e1 | ||
|
|
7a360eeaed | ||
|
|
af550e2927 | ||
|
|
78632bbcdc | ||
|
|
483c899a17 |
+2
-2
@@ -3,10 +3,10 @@ config.cache
|
|||||||
config.h
|
config.h
|
||||||
config.log
|
config.log
|
||||||
config.status
|
config.status
|
||||||
stamp-h
|
stamp-h*
|
||||||
bison-*
|
bison-*
|
||||||
patches
|
patches
|
||||||
*.patch *.log log patches applied
|
*.patch *.log log patches applied
|
||||||
*.prj
|
*.prj
|
||||||
releases
|
releases
|
||||||
*.flc
|
autom4te.cache
|
||||||
|
|||||||
@@ -164,124 +164,128 @@ Available Packages
|
|||||||
==================
|
==================
|
||||||
|
|
||||||
Languages are not equally supported in all packages. The following
|
Languages are not equally supported in all packages. The following
|
||||||
matrix shows the current state of internationalization, as of July
|
matrix shows the current state of internationalization, as of September
|
||||||
2001. The matrix shows, in regard of each package, for which languages
|
2001. The matrix shows, in regard of each package, for which languages
|
||||||
PO files have been submitted to translation coordination, with a
|
PO files have been submitted to translation coordination, with a
|
||||||
translation percentage of at least 50%.
|
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
|
Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja
|
||||||
+-------------------------------------------------+
|
+----------------------------------------------------+
|
||||||
a2ps | [] [] |
|
a2ps | [] [] [] |
|
||||||
bash | [] [] [] [] |
|
bash | [] [] [] [] |
|
||||||
bfd | |
|
bfd | |
|
||||||
binutils | |
|
binutils | [] |
|
||||||
bison | [] [] [] [] |
|
bison | [] [] [] [] [] |
|
||||||
clisp | [] [] [] [] |
|
clisp | [] [] [] [] |
|
||||||
cpio | [] [] [] [] [] |
|
cpio | [] [] [] [] [] |
|
||||||
diffutils | [] [] [] [] [] [] [] |
|
diffutils | [] [] [] [] [] [] [] |
|
||||||
enscript | [] [] |
|
enscript | [] [] |
|
||||||
error | [] [] |
|
error | [] [] |
|
||||||
fetchmail | |
|
fetchmail | |
|
||||||
fileutils | [] [] [] [] [] [] [] |
|
fileutils | [] [] [] [] [] [] [] [] |
|
||||||
findutils | [] [] [] [] [] [] [] [] |
|
findutils | [] [] [] [] [] [] [] [] |
|
||||||
flex | [] [] [] |
|
flex | [] [] [] |
|
||||||
freetype | |
|
freetype | |
|
||||||
gas | |
|
gas | |
|
||||||
gawk | [] |
|
gawk | [] [] |
|
||||||
gcal | |
|
gcal | |
|
||||||
gcc | |
|
gcc | |
|
||||||
gettext | [] [] [] [] [] [] [] [] [] |
|
gettext | [] [] [] [] [] [] [] [] [] [] |
|
||||||
gnupg | [] [] [] [] [] [] |
|
gnupg | [] [] [] [] [] [] [] |
|
||||||
gprof | |
|
gprof | |
|
||||||
grep | [] [] [] [] [] [] [] |
|
grep | [] [] [] [] [] [] [] [] |
|
||||||
hello | [] [] [] [] [] [] [] [] [] [] |
|
hello | [] [] [] [] [] [] [] [] [] [] [] |
|
||||||
id-utils | [] [] [] |
|
id-utils | [] [] [] |
|
||||||
indent | [] [] [] [] [] |
|
indent | [] [] [] [] [] |
|
||||||
jpilot | [] |
|
jpilot | [] |
|
||||||
kbd | |
|
kbd | |
|
||||||
ld | |
|
ld | [] |
|
||||||
libc | [] [] [] [] [] [] [] [] |
|
libc | [] [] [] [] [] [] [] [] |
|
||||||
lilypond | |
|
lilypond | [] |
|
||||||
lynx | [] [] [] |
|
lynx | [] [] [] [] |
|
||||||
m4 | [] [] [] [] [] [] [] |
|
m4 | [] [] [] [] [] [] [] [] |
|
||||||
make | [] [] [] [] [] |
|
make | [] [] [] [] [] [] |
|
||||||
nano | [] [] |
|
mysecretdiary | [] |
|
||||||
opcodes | |
|
nano | [] [] [] |
|
||||||
parted | [] [] |
|
opcodes | |
|
||||||
ptx | [] [] [] [] [] [] [] |
|
parted | [] [] [] |
|
||||||
python | |
|
ptx | [] [] [] [] [] [] [] |
|
||||||
recode | [] [] [] [] [] [] [] [] [] |
|
python | |
|
||||||
sed | [] [] [] [] [] [] [] [] [] [] |
|
recode | [] [] [] [] [] [] [] [] [] |
|
||||||
sh-utils | [] [] [] [] [] [] [] [] [] |
|
sed | [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||||
sharutils | [] [] [] [] [] [] [] |
|
sh-utils | [] [] [] [] [] [] [] [] [] [] |
|
||||||
soundtracker | [] |
|
sharutils | [] [] [] [] [] [] [] [] |
|
||||||
sp | |
|
sketch | |
|
||||||
tar | [] [] [] [] [] [] [] [] |
|
soundtracker | [] [] [] |
|
||||||
texinfo | [] [] [] [] [] |
|
sp | |
|
||||||
textutils | [] [] [] [] [] [] [] |
|
tar | [] [] [] [] [] [] [] [] |
|
||||||
util-linux | [] [] |
|
texinfo | [] [] [] [] [] [] |
|
||||||
wdiff | [] [] |
|
textutils | [] [] [] [] [] [] [] [] |
|
||||||
wget | [] [] [] [] [] [] [] [] [] |
|
util-linux | [] [] |
|
||||||
+-------------------------------------------------+
|
wdiff | [] [] [] |
|
||||||
bg cs da de el en eo es et fi fr gl he hr id it
|
wget | [] [] [] [] [] [] [] [] [] [] |
|
||||||
0 13 23 30 11 1 8 21 13 1 29 22 3 0 8 10
|
+----------------------------------------------------+
|
||||||
|
bg cs da de el en eo es et fi fr gl he hr id it ja
|
||||||
|
0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18
|
||||||
|
|
||||||
ja ko lv nl no pl pt pt_BR ru sk sl sv tr uk zh
|
ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
||||||
+-------------------------------------------------+
|
+----------------------------------------------------+
|
||||||
a2ps | [] [] [] | 5
|
a2ps | [] [] [] | 6
|
||||||
bash | | 4
|
bash | | 4
|
||||||
bfd | | 0
|
bfd | | 0
|
||||||
binutils | | 0
|
binutils | | 1
|
||||||
bison | [] [] [] | 7
|
bison | [] | 6
|
||||||
clisp | [] | 5
|
clisp | [] | 5
|
||||||
cpio | [] [] [] [] [] | 10
|
cpio | [] [] [] [] [] | 10
|
||||||
diffutils | [] [] [] | 10
|
diffutils | [] [] [] [] | 11
|
||||||
enscript | [] [] [] | 5
|
enscript | [] [] [] | 5
|
||||||
error | [] | 3
|
error | [] [] | 4
|
||||||
fetchmail | | 0
|
fetchmail | | 0
|
||||||
fileutils | [] [] [] [] [] [] [] [] [] [] | 17
|
fileutils | [] [] [] [] [] [] [] [] [] | 17
|
||||||
findutils | [] [] [] [] [] [] [] [] | 16
|
findutils | [] [] [] [] [] [] [] [] | 16
|
||||||
flex | [] [] [] | 6
|
flex | [] [] [] | 6
|
||||||
freetype | | 0
|
freetype | | 0
|
||||||
gas | | 0
|
gas | | 0
|
||||||
gawk | [] | 2
|
gawk | [] | 3
|
||||||
gcal | | 0
|
gcal | | 0
|
||||||
gcc | | 0
|
gcc | | 0
|
||||||
gettext | [] [] [] [] [] [] [] [] [] | 18
|
gettext | [] [] [] [] [] [] [] [] | 18
|
||||||
gnupg | [] [] [] [] | 10
|
gnupg | [] [] [] | 10
|
||||||
gprof | | 0
|
gprof | | 0
|
||||||
grep | [] [] [] | 10
|
grep | [] [] [] [] | 12
|
||||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 21
|
hello | [] [] [] [] [] [] [] [] [] [] [] | 22
|
||||||
id-utils | [] [] [] | 6
|
id-utils | [] [] [] | 6
|
||||||
indent | [] [] [] [] [] [] [] | 12
|
indent | [] [] [] [] [] [] [] | 12
|
||||||
jpilot | | 1
|
jpilot | | 1
|
||||||
kbd | [] | 1
|
kbd | [] | 1
|
||||||
ld | | 0
|
ld | | 1
|
||||||
libc | [] [] [] [] [] [] [] [] [] | 17
|
libc | [] [] [] [] [] [] [] [] | 16
|
||||||
lilypond | [] [] | 2
|
lilypond | [] [] | 3
|
||||||
lynx | [] [] [] [] [] | 8
|
lynx | [] [] [] [] | 8
|
||||||
m4 | [] [] [] [] [] | 12
|
m4 | [] [] [] [] | 12
|
||||||
make | [] [] [] [] [] [] [] | 12
|
make | [] [] [] [] [] [] | 12
|
||||||
nano | [] | 3
|
mysecretdiary | | 1
|
||||||
opcodes | | 0
|
nano | [] | 4
|
||||||
parted | [] [] [] | 5
|
opcodes | [] | 1
|
||||||
ptx | [] [] [] [] [] [] [] | 14
|
parted | [] [] | 5
|
||||||
python | | 0
|
ptx | [] [] [] [] [] [] [] [] | 15
|
||||||
recode | [] [] [] [] | 13
|
python | | 0
|
||||||
sed | [] [] [] [] [] [] [] [] | 18
|
recode | [] [] [] [] | 13
|
||||||
sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 20
|
sed | [] [] [] [] [] [] [] | 19
|
||||||
sharutils | [] [] [] [] | 11
|
sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21
|
||||||
soundtracker | | 1
|
sharutils | [] [] [] | 11
|
||||||
sp | | 0
|
sketch | | 0
|
||||||
tar | [] [] [] [] [] [] [] [] [] | 17
|
soundtracker | | 3
|
||||||
texinfo | [] [] | 7
|
sp | | 0
|
||||||
textutils | [] [] [] [] [] [] [] [] | 15
|
tar | [] [] [] [] [] [] [] | 15
|
||||||
util-linux | [] [] | 4
|
texinfo | [] | 7
|
||||||
wdiff | [] [] [] | 5
|
textutils | [] [] [] [] [] [] [] [] | 16
|
||||||
wget | [] [] [] [] [] [] [] | 16
|
util-linux | [] [] | 4
|
||||||
+-------------------------------------------------+
|
wdiff | [] [] [] [] | 7
|
||||||
31 teams ja ko lv nl no pl pt pt_BR ru sk sl sv tr uk zh
|
wget | [] [] [] [] [] [] [] | 17
|
||||||
51 domains 17 9 1 23 6 17 1 13 26 9 11 20 19 2 2 369
|
+----------------------------------------------------+
|
||||||
|
33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
||||||
|
53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387
|
||||||
|
|
||||||
Some counters in the preceding matrix are higher than the number of
|
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
|
visible blocks let us expect. This is because a few extra PO files are
|
||||||
@@ -294,9 +298,9 @@ 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
|
lag between the mere existence a PO file and its wide availability in a
|
||||||
distribution.
|
distribution.
|
||||||
|
|
||||||
If July 2001 seems to be old, you may fetch a more recent copy of
|
If September 2001 seems to be old, you may fetch a more recent copy
|
||||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
of this `ABOUT-NLS' file on most GNU archive sites. The most
|
||||||
matrix with full percentage details can be found at
|
up-to-date matrix with full percentage details can be found at
|
||||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||||
|
|
||||||
Using `gettext' in new packages
|
Using `gettext' in new packages
|
||||||
@@ -304,10 +308,11 @@ Using `gettext' in new packages
|
|||||||
|
|
||||||
If you are writing a freely available program and want to
|
If you are writing a freely available program and want to
|
||||||
internationalize it you are welcome to use GNU `gettext' in your
|
internationalize it you are welcome to use GNU `gettext' in your
|
||||||
package. Of course the GNU General Public License applies to your
|
package. Of course you have to respect the GNU Library General Public
|
||||||
sources from then on if you include `gettext' directly in your
|
License which covers the use of the GNU `gettext' library. This means
|
||||||
distribution but since you are writing free software anyway this is no
|
in particular that even non-free programs can use `libintl' as a shared
|
||||||
restriction.
|
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
|
Once the sources are changed appropriately and the setup can handle
|
||||||
to use of `gettext' the only thing missing are the translations. The
|
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
|
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.
|
those values to create a `Makefile' in each directory of the package.
|
||||||
It may also create one or more `.h' files containing system-dependent
|
It may also create one or more `.h' files containing system-dependent
|
||||||
definitions. Finally, it creates a shell script `config.status' that
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
you can run in the future to recreate the current configuration, a file
|
you can run in the future to recreate the current configuration, and a
|
||||||
`config.cache' that saves the results of its tests to speed up
|
file `config.log' containing compiler output (useful mainly for
|
||||||
reconfiguring, and a file `config.log' containing compiler output
|
debugging `configure').
|
||||||
(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
|
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
|
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
|
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'
|
be considered for the next release. If you are using the cache, and at
|
||||||
contains results you don't want to keep, you may remove or edit it.
|
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
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
called `autoconf'. You only need `configure.in' if you want to change
|
`configure' by a program called `autoconf'. You only need
|
||||||
it or regenerate `configure' using a newer version of `autoconf'.
|
`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:
|
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
|
Some systems require unusual options for compilation or linking that
|
||||||
the `configure' script does not know about. You can give `configure'
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
initial values for variables by setting them in the environment. Using
|
for details on some of the pertinent environment variables.
|
||||||
a Bourne-compatible shell, you can do that on the command line like
|
|
||||||
this:
|
|
||||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
|
||||||
|
|
||||||
Or on systems that have the `env' program, you can do it like this:
|
You can give `configure' initial values for variables by setting
|
||||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
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
|
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
|
the `configure' script. `configure' automatically checks for the
|
||||||
source code in the directory that `configure' is in and in `..'.
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
If you have to use a `make' that does not supports the `VPATH'
|
If you have to use a `make' that does not support the `VPATH'
|
||||||
variable, you have to compile the package for one architecture at a time
|
variable, you have to compile the package for one architecture at a
|
||||||
in the source code directory. After you have installed the package for
|
time in the source code directory. After you have installed the
|
||||||
one architecture, use `make distclean' before reconfiguring for another
|
package for one architecture, use `make distclean' before reconfiguring
|
||||||
architecture.
|
for another architecture.
|
||||||
|
|
||||||
Installation Names
|
Installation Names
|
||||||
==================
|
==================
|
||||||
@@ -122,22 +136,35 @@ you can use the `configure' options `--x-includes=DIR' and
|
|||||||
Specifying the System Type
|
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
|
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
|
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
|
a message saying it cannot guess the host type, give it the
|
||||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
type, such as `sun4', or a canonical name with three fields:
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
CPU-COMPANY-SYSTEM
|
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
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
need to know the host type.
|
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
|
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
|
produce code for.
|
||||||
system on which you are compiling the package.
|
|
||||||
|
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
|
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.
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
A warning: not all `configure' scripts look for a 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
|
`configure' recognizes the following options to control how it
|
||||||
operates.
|
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'
|
`--help'
|
||||||
|
`-h'
|
||||||
Print a summary of the options to `configure', and exit.
|
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'
|
`--quiet'
|
||||||
`--silent'
|
`--silent'
|
||||||
`-q'
|
`-q'
|
||||||
@@ -175,8 +226,6 @@ operates.
|
|||||||
Look for the package's source code in directory DIR. Usually
|
Look for the package's source code in directory DIR. Usually
|
||||||
`configure' can determine that directory automatically.
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
`--version'
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
Print the version of Autoconf used to generate the `configure'
|
`configure --help' for more details.
|
||||||
script, and exit.
|
|
||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options.
|
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,5 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha
|
AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha dist-bzip2
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
@@ -26,3 +26,5 @@ alpha_url_dir = gnu/bison
|
|||||||
# Files to update automatically.
|
# Files to update automatically.
|
||||||
wget_files = $(srcdir)/config/config.guess $(srcdir)/config/config.sub \
|
wget_files = $(srcdir)/config/config.guess $(srcdir)/config/config.sub \
|
||||||
$(srcdir)/config/texinfo.tex
|
$(srcdir)/config/texinfo.tex
|
||||||
|
|
||||||
|
cvs_files = $(srcdir)/config/missing
|
||||||
|
|||||||
+63
-62
@@ -1,4 +1,5 @@
|
|||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
@@ -43,6 +44,7 @@ AUTOCONF = @AUTOCONF@
|
|||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
@@ -57,8 +59,12 @@ PRE_UNINSTALL = :
|
|||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
|
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AUTOM4TE = @AUTOM4TE@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
@@ -67,10 +73,7 @@ CC = @CC@
|
|||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
DATADIRNAME = @DATADIRNAME@
|
DATADIRNAME = @DATADIRNAME@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
ECHO_C = @ECHO_C@
|
GCC = @GCC@
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
GLIBC21 = @GLIBC21@
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
@@ -81,12 +84,10 @@ INTLBISON = @INTLBISON@
|
|||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIB = @LIB@
|
||||||
LIBICONV = @LIBICONV@
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
M4 = @M4@
|
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
MSGFMT = @MSGFMT@
|
MSGFMT = @MSGFMT@
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
POFILES = @POFILES@
|
POFILES = @POFILES@
|
||||||
POSUB = @POSUB@
|
POSUB = @POSUB@
|
||||||
@@ -100,7 +101,7 @@ am__include = @am__include@
|
|||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
install_sh = @install_sh@
|
install_sh = @install_sh@
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha
|
AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha dist-bzip2
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
@@ -123,6 +124,8 @@ alpha_url_dir = gnu/bison
|
|||||||
wget_files = $(srcdir)/config/config.guess $(srcdir)/config/config.sub \
|
wget_files = $(srcdir)/config/config.guess $(srcdir)/config/config.sub \
|
||||||
$(srcdir)/config/texinfo.tex
|
$(srcdir)/config/texinfo.tex
|
||||||
|
|
||||||
|
|
||||||
|
cvs_files = $(srcdir)/config/missing
|
||||||
subdir = .
|
subdir = .
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||||
@@ -134,10 +137,9 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
|
|||||||
uninstall-info-recursive all-recursive install-data-recursive \
|
uninstall-info-recursive all-recursive install-data-recursive \
|
||||||
install-exec-recursive installdirs-recursive install-recursive \
|
install-exec-recursive installdirs-recursive install-recursive \
|
||||||
uninstall-recursive check-recursive installcheck-recursive
|
uninstall-recursive check-recursive installcheck-recursive
|
||||||
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
|
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL \
|
||||||
INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS TODO \
|
Makefile.am Makefile.in NEWS README-alpha THANKS aclocal.m4 \
|
||||||
aclocal.m4 config.hin configure configure.in missing \
|
config.hin configure configure.in
|
||||||
mkinstalldirs
|
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
all: config.h
|
all: config.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
@@ -147,44 +149,34 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
|||||||
cd $(top_srcdir) && \
|
cd $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu Makefile
|
$(AUTOMAKE) --gnu Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
cd $(top_builddir) && \
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
|
||||||
CONFIG_FILES=$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
$(SHELL) ./config.status --recheck
|
$(SHELL) ./config.status --recheck
|
||||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||||
cd $(srcdir) && $(AUTOCONF)
|
cd $(srcdir) && $(AUTOCONF)
|
||||||
|
|
||||||
$(ACLOCAL_M4): configure.in m4/atconfig.m4 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/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)
|
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
config.h: stamp-h
|
|
||||||
|
config.h: stamp-h1
|
||||||
@if test ! -f $@; then \
|
@if test ! -f $@; then \
|
||||||
rm -f stamp-h; \
|
rm -f stamp-h1; \
|
||||||
$(MAKE) stamp-h; \
|
$(MAKE) stamp-h1; \
|
||||||
else :; fi
|
else :; fi
|
||||||
stamp-h: $(srcdir)/config.hin $(top_builddir)/config.status
|
|
||||||
@rm -f stamp-h stamp-hT
|
stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status
|
||||||
@echo timestamp > stamp-hT 2> /dev/null
|
@rm -f stamp-h1
|
||||||
cd $(top_builddir) \
|
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.hin \
|
|
||||||
$(SHELL) ./config.status
|
$(srcdir)/config.hin: $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||||
@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
|
|
||||||
cd $(top_srcdir) && $(AUTOHEADER)
|
cd $(top_srcdir) && $(AUTOHEADER)
|
||||||
@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
|
touch $(srcdir)/config.hin
|
||||||
|
|
||||||
distclean-hdr:
|
distclean-hdr:
|
||||||
-rm -f config.h
|
-rm -f config.h
|
||||||
intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
|
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:
|
uninstall-info-am:
|
||||||
|
|
||||||
# This directory's subdirectories are mostly independent; you can cd
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
@@ -272,7 +264,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
|
|||||||
|| etags $(ETAGS_ARGS) $$tags config.hin $$unique $(LISP)
|
|| etags $(ETAGS_ARGS) $$tags config.hin $$unique $(LISP)
|
||||||
|
|
||||||
GTAGS:
|
GTAGS:
|
||||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
&& cd $(top_srcdir) \
|
&& cd $(top_srcdir) \
|
||||||
&& gtags -i $(GTAGS_ARGS) $$here
|
&& gtags -i $(GTAGS_ARGS) $$here
|
||||||
|
|
||||||
@@ -329,10 +321,19 @@ distdir: $(DISTFILES)
|
|||||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||||
|| chmod -R a+r $(distdir)
|
|| chmod -R a+r $(distdir)
|
||||||
dist: distdir
|
dist-gzip: distdir
|
||||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||||
|
|
||||||
|
dist-bzip2: distdir
|
||||||
|
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||||
|
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(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
|
||||||
|
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||||
|
|
||||||
# This target untars the dist file and tries a VPATH configuration. Then
|
# This target untars the dist file and tries a VPATH configuration. Then
|
||||||
# it guarantees that the distribution is self-contained by making another
|
# it guarantees that the distribution is self-contained by making another
|
||||||
# tarfile.
|
# tarfile.
|
||||||
@@ -343,7 +344,7 @@ distcheck: dist
|
|||||||
mkdir $(distdir)/=build
|
mkdir $(distdir)/=build
|
||||||
mkdir $(distdir)/=inst
|
mkdir $(distdir)/=inst
|
||||||
chmod a-w $(distdir)
|
chmod a-w $(distdir)
|
||||||
dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
|
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
|
||||||
&& cd $(distdir)/=build \
|
&& cd $(distdir)/=build \
|
||||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||||
--with-included-gettext \
|
--with-included-gettext \
|
||||||
@@ -354,14 +355,16 @@ distcheck: dist
|
|||||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||||
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|
||||||
|| (echo "Error: files left after uninstall" 1>&2; \
|
|| { echo "ERROR: files left after uninstall:" ; \
|
||||||
exit 1) ) \
|
find $$dc_install_base -type f -print ; \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
exit 1; } >&2 ) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
|
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
|
||||||
&& rm -f $(distdir).tar.gz \
|
&& rm -f $(distdir).tar.gz \
|
||||||
&& (test `find . -type f -print | wc -l` -eq 0 \
|
&& (test `find . -type f -print | wc -l` -eq 0 \
|
||||||
|| (echo "Error: files left after distclean" 1>&2; \
|
|| { echo "ERROR: files left after distclean:" ; \
|
||||||
exit 1) )
|
find . -type f -print ; \
|
||||||
|
exit 1; } >&2 )
|
||||||
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
||||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
@echo "$(distdir).tar.gz is ready for distribution" | \
|
||||||
sed 'h;s/./=/g;p;x;p;x'
|
sed 'h;s/./=/g;p;x;p;x'
|
||||||
@@ -399,9 +402,6 @@ clean: clean-recursive
|
|||||||
|
|
||||||
clean-am: clean-generic mostlyclean-am
|
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
|
distclean: distclean-recursive
|
||||||
-rm -f config.status config.cache config.log
|
-rm -f config.status config.cache config.log
|
||||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
||||||
@@ -437,19 +437,20 @@ uninstall-am: uninstall-info-am
|
|||||||
uninstall-info: uninstall-info-recursive
|
uninstall-info: uninstall-info-recursive
|
||||||
|
|
||||||
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
|
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
|
||||||
clean-generic clean-recursive dist dist-all distcheck distclean \
|
clean-generic clean-recursive dist dist-all dist-bzip2 \
|
||||||
distclean-generic distclean-hdr distclean-recursive \
|
dist-gzip distcheck distclean distclean-generic distclean-hdr \
|
||||||
distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
|
distclean-recursive distclean-tags distdir dvi dvi-am \
|
||||||
info-recursive install install-am install-data install-data-am \
|
dvi-recursive info info-am info-recursive install install-am \
|
||||||
install-data-recursive install-exec install-exec-am \
|
install-data install-data-am install-data-recursive \
|
||||||
install-exec-recursive install-info install-info-am \
|
install-exec install-exec-am install-exec-recursive \
|
||||||
install-info-recursive install-man install-recursive \
|
install-info install-info-am install-info-recursive install-man \
|
||||||
install-strip installcheck installcheck-am installdirs \
|
install-recursive install-strip installcheck installcheck-am \
|
||||||
installdirs-am installdirs-recursive maintainer-clean \
|
installdirs installdirs-am installdirs-recursive \
|
||||||
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
|
maintainer-clean maintainer-clean-generic \
|
||||||
mostlyclean-generic mostlyclean-recursive tags tags-recursive \
|
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||||
uninstall uninstall-am uninstall-info-am \
|
mostlyclean-recursive tags tags-recursive uninstall \
|
||||||
uninstall-info-recursive uninstall-recursive
|
uninstall-am uninstall-info-am uninstall-info-recursive \
|
||||||
|
uninstall-recursive
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# 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.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|||||||
+101
-50
@@ -22,9 +22,6 @@
|
|||||||
# Do not save the original name or timestamp in the .tar.gz file.
|
# Do not save the original name or timestamp in the .tar.gz file.
|
||||||
GZIP_ENV = '--no-name --best'
|
GZIP_ENV = '--no-name --best'
|
||||||
|
|
||||||
# Automake 1.4 does not define AMTAR.
|
|
||||||
AMTAR ?= $(TAR)
|
|
||||||
|
|
||||||
CVS = cvs
|
CVS = cvs
|
||||||
|
|
||||||
prev_version_file ?= .prev-version
|
prev_version_file ?= .prev-version
|
||||||
@@ -46,12 +43,101 @@ release_archive_dir ?= ../release
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## ---------------- ##
|
||||||
|
## Updating files. ##
|
||||||
|
## ---------------- ##
|
||||||
|
|
||||||
|
WGET = wget
|
||||||
|
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||||
|
|
||||||
|
# Use mv, if you don't have/want move-if-change.
|
||||||
|
move_if_change ?= move-if-change
|
||||||
|
|
||||||
|
# ------------------- #
|
||||||
|
# Updating PO files. #
|
||||||
|
# ------------------- #
|
||||||
|
|
||||||
|
po_repo = http://www.iro.umontreal.ca/contrib/po/maint/$(PACKAGE)
|
||||||
|
.PHONY: do-po-update po-update
|
||||||
|
do-po-update:
|
||||||
|
tmppo=/tmp/$(PACKAGE)-$(VERSION)-po &&\
|
||||||
|
rm -rf $$tmppo && \
|
||||||
|
mkdir $$tmppo && \
|
||||||
|
(cd $$tmppo && $(WGET) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) &&\
|
||||||
|
cp $$tmppo/*.po po
|
||||||
|
cd po && $(MAKE) update-po
|
||||||
|
$(MAKE) po-check
|
||||||
|
|
||||||
|
po-update:
|
||||||
|
if test -d "po"; then \
|
||||||
|
$(MAKE) do-po-update; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -------------------------- #
|
||||||
|
# Updating GNU build tools. #
|
||||||
|
# -------------------------- #
|
||||||
|
|
||||||
|
# The following pseudo table associates a local directory and a URL
|
||||||
|
# with each of the files that belongs to some other package and is
|
||||||
|
# regularly updated from the specified URL.
|
||||||
|
wget_files ?= $(srcdir)/config.guess $(srcdir)/config.sub \
|
||||||
|
$(srcdir)/src/ansi2knr.c \
|
||||||
|
$(srcdir)/doc/texinfo.tex
|
||||||
|
wget-targets = $(patsubst %, get-%, $(wget_files))
|
||||||
|
|
||||||
|
config.guess-url_prefix = $(ftp-gnu)/config/
|
||||||
|
config.sub-url_prefix = $(ftp-gnu)/config/
|
||||||
|
|
||||||
|
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
|
||||||
|
|
||||||
|
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
|
||||||
|
|
||||||
|
standards.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
||||||
|
make-stds.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
||||||
|
|
||||||
|
target = $(patsubst get-%, %, $@)
|
||||||
|
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
|
||||||
|
|
||||||
|
.PHONY: $(wget-targets)
|
||||||
|
$(wget-targets):
|
||||||
|
$(WGET) $(url) -O $(target).t \
|
||||||
|
&& $(move_if_change) $(target).t $(target)
|
||||||
|
|
||||||
|
.PHONY: wget-update
|
||||||
|
wget-update: $(wget-targets)
|
||||||
|
|
||||||
|
|
||||||
|
# Updating tools via CVS.
|
||||||
|
cvs_files ?= depcomp missing
|
||||||
|
cvs-targets = $(patsubst %, get-%, $(cvs_files))
|
||||||
|
|
||||||
|
automake_repo = :pserver:[email protected]:/cvs/automake
|
||||||
|
.PHONY: $(cvs-targets)
|
||||||
|
$(cvs-targets):
|
||||||
|
$(CVS) -d $(automake_repo) co -p automake/lib/$(notdir $(target)) \
|
||||||
|
>$(target).t \
|
||||||
|
&& $(move_if_change) $(target).t $(target);
|
||||||
|
|
||||||
|
.PHONY: cvs-update
|
||||||
|
cvs-update: $(cvs-targets)
|
||||||
|
|
||||||
|
|
||||||
|
# --------------------- #
|
||||||
|
# Updating everything. #
|
||||||
|
# --------------------- #
|
||||||
|
|
||||||
|
.PHONY: update
|
||||||
|
update: wget-update cvs-update po-update
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## --------------- ##
|
## --------------- ##
|
||||||
## Sanity checks. ##
|
## Sanity checks. ##
|
||||||
## --------------- ##
|
## --------------- ##
|
||||||
|
|
||||||
# Checks that don't require cvs.
|
# Checks that don't require cvs. Run `changelog-check' last as
|
||||||
local-check: changelog-check po-check writable-files copyright-check
|
# previous test may reveal problems requiring new ChangeLog entries.
|
||||||
|
local-check: po-check copyright-check writable-files changelog-check
|
||||||
|
|
||||||
changelog-check:
|
changelog-check:
|
||||||
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||||
@@ -117,10 +203,16 @@ maintainer-distcheck: changelog-check
|
|||||||
$(MAKE) my-distcheck
|
$(MAKE) my-distcheck
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## -------------- ##
|
||||||
|
## Making dists. ##
|
||||||
|
## -------------- ##
|
||||||
|
|
||||||
|
|
||||||
# Tag before making distribution. Also, don't make a distribution if
|
# Tag before making distribution. Also, don't make a distribution if
|
||||||
# checks fail. Also, make sure the NEWS file is up-to-date.
|
# checks fail. Also, make sure the NEWS file is up-to-date.
|
||||||
# FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
|
# FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
|
||||||
cvs-dist: cvs-check maintainer-distcheck
|
cvs-dist: local-check cvs-check maintainer-distcheck
|
||||||
$(CVS) update po
|
$(CVS) update po
|
||||||
$(CVS) tag -c $(this-cvs-tag)
|
$(CVS) tag -c $(this-cvs-tag)
|
||||||
$(MAKE) dist
|
$(MAKE) dist
|
||||||
@@ -130,6 +222,7 @@ cvs-dist: cvs-check maintainer-distcheck
|
|||||||
null_AM_MAKEFLAGS = \
|
null_AM_MAKEFLAGS = \
|
||||||
ACLOCAL=false \
|
ACLOCAL=false \
|
||||||
AUTOCONF=false \
|
AUTOCONF=false \
|
||||||
|
AUTOM4TE=false \
|
||||||
AUTOMAKE=false \
|
AUTOMAKE=false \
|
||||||
AUTOHEADER=false \
|
AUTOHEADER=false \
|
||||||
MAKEINFO=false
|
MAKEINFO=false
|
||||||
@@ -177,7 +270,7 @@ rel-check:
|
|||||||
md5_tmp=/tmp/rel-check-md5-$$$$; \
|
md5_tmp=/tmp/rel-check-md5-$$$$; \
|
||||||
set -e; \
|
set -e; \
|
||||||
trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
|
trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
|
||||||
wget -q --output-document=$$tarz $(url); \
|
$(WGET) -q --output-document=$$tarz $(url); \
|
||||||
echo "$(md5) -" > $$md5_tmp; \
|
echo "$(md5) -" > $$md5_tmp; \
|
||||||
md5sum -c $$md5_tmp < $$tarz
|
md5sum -c $$md5_tmp < $$tarz
|
||||||
|
|
||||||
@@ -228,48 +321,6 @@ announcement: NEWS ChangeLog $(rel-files)
|
|||||||
-e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
|
-e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
|
||||||
)
|
)
|
||||||
|
|
||||||
WGET = wget
|
|
||||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
|
||||||
|
|
||||||
# Use mv, if you don't have/want move-if-change.
|
|
||||||
move_if_change ?= move-if-change
|
|
||||||
|
|
||||||
# The following pseudo table associates a local directory and a URL
|
|
||||||
# with each of the files that belongs to some other package and is
|
|
||||||
# regularly updated from the specified URL.
|
|
||||||
wget_files ?= $(srcdir)/config.guess $(srcdir)/config.sub \
|
|
||||||
$(srcdir)/src/ansi2knr.c \
|
|
||||||
$(srcdir)/doc/texinfo.tex
|
|
||||||
get-targets = $(patsubst %, get-%, $(wget_files))
|
|
||||||
|
|
||||||
config.guess-url_prefix = $(ftp-gnu)/config/
|
|
||||||
config.sub-url_prefix = $(ftp-gnu)/config/
|
|
||||||
|
|
||||||
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
|
|
||||||
|
|
||||||
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
|
|
||||||
|
|
||||||
standards.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
|
||||||
make-stds.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
|
||||||
|
|
||||||
target = $(patsubst get-%, %, $@)
|
|
||||||
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
|
|
||||||
|
|
||||||
.PHONY: $(get-targets)
|
|
||||||
$(get-targets):
|
|
||||||
$(WGET) $(url) -O $(target).t \
|
|
||||||
&& $(move_if_change) $(target).t $(target)
|
|
||||||
|
|
||||||
automake_repo=:pserver:[email protected]:/cvs/automake
|
|
||||||
.PHONY: wget-update
|
|
||||||
wget-update: $(get-targets)
|
|
||||||
for f in depcomp missing; do \
|
|
||||||
test -f $$f || continue; \
|
|
||||||
echo checking out $$f...; \
|
|
||||||
$(CVS) -d $(automake_repo) co -p automake/lib/$$f > $$f.t \
|
|
||||||
&& $(move_if_change) $$f.t $$f; \
|
|
||||||
done
|
|
||||||
|
|
||||||
define emit-rsync-commands
|
define emit-rsync-commands
|
||||||
echo =====================================
|
echo =====================================
|
||||||
echo =====================================
|
echo =====================================
|
||||||
@@ -284,7 +335,7 @@ endef
|
|||||||
$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
|
$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
|
||||||
xdelta delta -9 $^ $@ || :
|
xdelta delta -9 $^ $@ || :
|
||||||
|
|
||||||
alpha: local-check
|
alpha:
|
||||||
$(MAKE) cvs-dist
|
$(MAKE) cvs-dist
|
||||||
$(MAKE) $(xd-delta)
|
$(MAKE) $(xd-delta)
|
||||||
$(MAKE) -s announcement > /tmp/announce-$(my_distdir)
|
$(MAKE) -s announcement > /tmp/announce-$(my_distdir)
|
||||||
|
|||||||
@@ -1,7 +1,77 @@
|
|||||||
Bison News
|
Bison News
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Changes in version 1.28c:
|
Changes in version 1.30d:
|
||||||
|
|
||||||
|
* 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 VCG output
|
||||||
|
Was broken when strings aliases for symbols were used.
|
||||||
|
|
||||||
|
Changes in version 1.30c:
|
||||||
|
|
||||||
|
* Fixed a few warnings.
|
||||||
|
|
||||||
|
* Some portability issues.
|
||||||
|
|
||||||
|
Changes in version 1.30b:
|
||||||
|
|
||||||
|
* 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
|
||||||
|
argument.
|
||||||
|
|
||||||
|
* `%source_extension' and `%header_extension' are removed, failed
|
||||||
|
experiment.
|
||||||
|
|
||||||
|
* Portability fixes.
|
||||||
|
|
||||||
|
Changes in version 1.29, 2001-09-07:
|
||||||
|
|
||||||
|
* 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'.
|
||||||
|
|
||||||
* The Bison manual is now distributed under the terms of the GNU FDL.
|
* The Bison manual is now distributed under the terms of the GNU FDL.
|
||||||
|
|
||||||
@@ -25,8 +95,11 @@ Changes in version 1.28c:
|
|||||||
* New directives.
|
* New directives.
|
||||||
`%yacc', `%fixed_output_files', `%defines', `%no_parser', `%verbose',
|
`%yacc', `%fixed_output_files', `%defines', `%no_parser', `%verbose',
|
||||||
`%debug', `%source_extension' and `%header_extension'.
|
`%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.
|
* Should compile better now with K&R compilers.
|
||||||
|
|
||||||
@@ -58,7 +131,7 @@ Changes in version 1.26:
|
|||||||
* Generated parsers should now work even on operating systems which do
|
* Generated parsers should now work even on operating systems which do
|
||||||
not provide alloca().
|
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
|
* Errors in the input grammar are not fatal; Bison keeps reading
|
||||||
the grammar file, and reports all the errors found in it.
|
the grammar file, and reports all the errors found in it.
|
||||||
@@ -99,3 +172,7 @@ Changes in version 1.22:
|
|||||||
Changes in version 1.20:
|
Changes in version 1.20:
|
||||||
|
|
||||||
Output file does not redefine const for C++.
|
Output file does not redefine const for C++.
|
||||||
|
|
||||||
|
Local Variables:
|
||||||
|
mode: outline
|
||||||
|
End:
|
||||||
|
|||||||
@@ -1,22 +1,33 @@
|
|||||||
Bison was originally written by Robert Corbett. It would not be what
|
Bison was originally written by Robert Corbett. It would not be what
|
||||||
it is today without the invaluable help of these people:
|
it is today without the invaluable help of these people:
|
||||||
|
|
||||||
Akim Demaille akim@epita.fr
|
Airy Andre Airy.Andre@edf.fr
|
||||||
Daniel Hagerty hag@gnu.org
|
Akim Demaille akim@freefriends.org
|
||||||
David J. MacKenzie [email protected]
|
Albert Chin-A-Young [email protected]
|
||||||
Fabrice Bauzac noon@cote-dazur.com
|
Alexander Belopolsky alexb@rentec.com
|
||||||
Hans Aberg [email protected]
|
Daniel Hagerty [email protected]
|
||||||
Jesse Thilo jthilo@gnu.org
|
David J. MacKenzie djm@gnu.org
|
||||||
Jim Meyering [email protected]
|
Dick Streefland [email protected]
|
||||||
Laurent Mascherpa [email protected]
|
Fabrice Bauzac [email protected]
|
||||||
|
Hans Aberg [email protected]
|
||||||
|
Jesse Thilo [email protected]
|
||||||
|
Jim Meyering [email protected]
|
||||||
|
Juan Manuel Guerrero [email protected]
|
||||||
|
Keith Browne [email protected]
|
||||||
|
Laurent Mascherpa [email protected]
|
||||||
Marc Autret [email protected]
|
Marc Autret [email protected]
|
||||||
Neil Booth [email protected]
|
Neil Booth [email protected]
|
||||||
Noah Friedman [email protected]
|
Noah Friedman [email protected]
|
||||||
Pascal Bart [email protected]
|
Pascal Bart [email protected]
|
||||||
Paul Eggert [email protected]
|
Paul Eggert [email protected]
|
||||||
Piotr Gackiewicz gacek@intertel.com.pl
|
Per Allansson per@appgate.com
|
||||||
Richard Stallman [email protected]
|
Piotr Gackiewicz [email protected]
|
||||||
|
Richard Stallman [email protected]
|
||||||
Robert Anisko [email protected]
|
Robert Anisko [email protected]
|
||||||
|
Shura [email protected]
|
||||||
|
Tom Lane [email protected]
|
||||||
|
Wolfram Wagner [email protected]
|
||||||
|
Wwp [email protected]
|
||||||
|
|
||||||
Many people are not named here because we lost track of them. We
|
Many people are not named here because we lost track of them. We
|
||||||
thank them! Please, help us keeping this list up to date.
|
thank them! Please, help us keeping this list up to date.
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
-*- outline -*-
|
|
||||||
|
|
||||||
* src/reader.c
|
|
||||||
Complete parse_skel_decl () with parse_dquoted_param (). []
|
|
||||||
Check and cleanup for CPP-out code. []
|
|
||||||
|
|
||||||
* src/output.c
|
|
||||||
Synchronize `#line' directive with user file. [ok]
|
|
||||||
|
|
||||||
Cleanup dirty CPP-out code. []
|
|
||||||
** Output sub-skeleton files. []
|
|
||||||
Useful for %no_parser. []
|
|
||||||
*** New skeleton. []
|
|
||||||
|
|
||||||
* src/getargs.c src/lex.c
|
|
||||||
Synchronize percent and command line options. [ok]
|
|
||||||
|
|
||||||
* src/macrotab.[ch]
|
|
||||||
Removing warnings when compiling. (gcc-warnings). [ok]
|
|
||||||
|
|
||||||
* src/print_graph.c
|
|
||||||
Find the best graph parameters. []
|
|
||||||
|
|
||||||
* doc/bison.texinfo
|
|
||||||
Echo modifications of prologue and epilogue. []
|
|
||||||
Add informations about YYERROR_VERBOSE. []
|
|
||||||
Add explainations about skeleton muscles. []
|
|
||||||
Add explainations about %skeleton. []
|
|
||||||
Vendored
+445
-247
@@ -1,4 +1,4 @@
|
|||||||
# aclocal.m4 generated automatically by aclocal 1.5
|
# aclocal.m4 generated automatically by aclocal 1.5a -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright 1996, 1997, 1998, 1999, 2000, 2001
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
@@ -11,11 +11,29 @@
|
|||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
# Do all the work for Automake. This macro actually does too much --
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
# some checks are only needed if your package does certain things.
|
|
||||||
# But this isn't really a big deal.
|
|
||||||
|
|
||||||
# serial 5
|
# This macro actually does too much some checks are only needed if
|
||||||
|
# your package does certain things. But this isn't really a big deal.
|
||||||
|
|
||||||
|
# Copyright 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)
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# serial 6
|
||||||
|
|
||||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||||
# written in clear, in which case automake, when reading aclocal.m4,
|
# written in clear, in which case automake, when reading aclocal.m4,
|
||||||
@@ -24,55 +42,29 @@
|
|||||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||||
|
|
||||||
|
|
||||||
# We require 2.13 because we rely on SHELL being computed by configure.
|
AC_PREREQ([2.52])
|
||||||
AC_PREREQ([2.13])
|
|
||||||
|
|
||||||
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
|
|
||||||
# -----------------------------------------------------------
|
|
||||||
# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
|
|
||||||
# The purpose of this macro is to provide the user with a means to
|
|
||||||
# check macros which are provided without letting her know how the
|
|
||||||
# information is coded.
|
|
||||||
# If this macro is not defined by Autoconf, define it here.
|
|
||||||
ifdef([AC_PROVIDE_IFELSE],
|
|
||||||
[],
|
|
||||||
[define([AC_PROVIDE_IFELSE],
|
|
||||||
[ifdef([AC_PROVIDE_$1],
|
|
||||||
[$2], [$3])])])
|
|
||||||
|
|
||||||
|
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
|
||||||
|
# the ones we care about.
|
||||||
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||||
|
|
||||||
# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
|
# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||||
[AC_REQUIRE([AC_PROG_INSTALL])dnl
|
[AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||||
# test to see if srcdir already configured
|
# test to see if srcdir already configured
|
||||||
if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
|
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||||
test -f $srcdir/config.status; then
|
test -f $srcdir/config.status; then
|
||||||
AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
|
AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE=$1
|
AC_SUBST([PACKAGE], [$1])dnl
|
||||||
AC_SUBST(PACKAGE)dnl
|
AC_SUBST([VERSION], [$2])dnl
|
||||||
VERSION=$2
|
|
||||||
AC_SUBST(VERSION)dnl
|
|
||||||
ifelse([$3],,
|
ifelse([$3],,
|
||||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
|
||||||
|
|
||||||
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
|
|
||||||
# the ones we care about.
|
|
||||||
ifdef([m4_pattern_allow],
|
|
||||||
[m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
|
|
||||||
|
|
||||||
# Autoconf 2.50 always computes EXEEXT. However we need to be
|
|
||||||
# compatible with 2.13, for now. So we always define EXEEXT, but we
|
|
||||||
# don't compute it.
|
|
||||||
AC_SUBST(EXEEXT)
|
|
||||||
# Similar for OBJEXT -- only we only use OBJEXT if the user actually
|
|
||||||
# requests that it be used. This is a bit dumb.
|
|
||||||
: ${OBJEXT=o}
|
|
||||||
AC_SUBST(OBJEXT)
|
|
||||||
|
|
||||||
# Some tools Automake needs.
|
# Some tools Automake needs.
|
||||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||||
@@ -105,6 +97,23 @@ AC_PROVIDE_IFELSE([AC_PROG_][CXX],
|
|||||||
# Check to make sure that the build environment is sane.
|
# Check to make sure that the build environment is sane.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Copyright 1996, 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.
|
||||||
|
|
||||||
# serial 3
|
# serial 3
|
||||||
|
|
||||||
# AM_SANITY_CHECK
|
# AM_SANITY_CHECK
|
||||||
@@ -148,6 +157,25 @@ Check your system clock])
|
|||||||
fi
|
fi
|
||||||
AC_MSG_RESULT(yes)])
|
AC_MSG_RESULT(yes)])
|
||||||
|
|
||||||
|
# -*- Autoconf -*-
|
||||||
|
|
||||||
|
|
||||||
|
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# 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.
|
||||||
|
|
||||||
# serial 2
|
# serial 2
|
||||||
|
|
||||||
@@ -178,6 +206,23 @@ fi
|
|||||||
|
|
||||||
# AM_AUX_DIR_EXPAND
|
# AM_AUX_DIR_EXPAND
|
||||||
|
|
||||||
|
# Copyright 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||||
@@ -216,19 +261,59 @@ fi
|
|||||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||||
# configured tree to be moved without reconfiguration.
|
# configured tree to be moved without reconfiguration.
|
||||||
|
|
||||||
|
# Rely on autoconf to set up CDPATH properly.
|
||||||
|
AC_PREREQ([2.50])
|
||||||
|
|
||||||
AC_DEFUN([AM_AUX_DIR_EXPAND], [
|
AC_DEFUN([AM_AUX_DIR_EXPAND], [
|
||||||
# expand $ac_aux_dir to an absolute path
|
# expand $ac_aux_dir to an absolute path
|
||||||
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
|
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||||
])
|
])
|
||||||
|
|
||||||
# AM_PROG_INSTALL_SH
|
# AM_PROG_INSTALL_SH
|
||||||
# ------------------
|
# ------------------
|
||||||
# Define $install_sh.
|
# Define $install_sh.
|
||||||
|
|
||||||
|
# Copyright 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||||
AC_SUBST(install_sh)])
|
AC_SUBST(install_sh)])
|
||||||
|
|
||||||
|
# AM_PROG_INSTALL_STRIP
|
||||||
|
|
||||||
|
# Copyright 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
# One issue with vendor `install' (even GNU) is that you can't
|
# One issue with vendor `install' (even GNU) is that you can't
|
||||||
# specify the program used to strip binaries. This is especially
|
# specify the program used to strip binaries. This is especially
|
||||||
# annoying in cross-compiling environments, where the build's strip
|
# annoying in cross-compiling environments, where the build's strip
|
||||||
@@ -243,6 +328,22 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
|||||||
|
|
||||||
# serial 4 -*- Autoconf -*-
|
# serial 4 -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright 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.
|
||||||
|
|
||||||
|
|
||||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||||
@@ -254,7 +355,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
|||||||
|
|
||||||
|
|
||||||
# _AM_DEPENDENCIES(NAME)
|
# _AM_DEPENDENCIES(NAME)
|
||||||
# ---------------------
|
# ----------------------
|
||||||
# See how the compiler implements dependency checking.
|
# See how the compiler implements dependency checking.
|
||||||
# NAME is "CC", "CXX" or "OBJC".
|
# NAME is "CC", "CXX" or "OBJC".
|
||||||
# We try a few techniques and use that to set a single cache variable.
|
# We try a few techniques and use that to set a single cache variable.
|
||||||
@@ -333,8 +434,7 @@ else
|
|||||||
am_cv_$1_dependencies_compiler_type=none
|
am_cv_$1_dependencies_compiler_type=none
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
|
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||||
AC_SUBST([$1DEPMODE])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@@ -352,7 +452,7 @@ else
|
|||||||
DEPDIR=_deps
|
DEPDIR=_deps
|
||||||
fi
|
fi
|
||||||
rmdir .deps 2>/dev/null
|
rmdir .deps 2>/dev/null
|
||||||
AC_SUBST(DEPDIR)
|
AC_SUBST([DEPDIR])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@@ -367,30 +467,40 @@ if test "x$enable_dependency_tracking" != xno; then
|
|||||||
AMDEPBACKSLASH='\'
|
AMDEPBACKSLASH='\'
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||||
pushdef([subst], defn([AC_SUBST]))
|
AC_SUBST([AMDEPBACKSLASH])
|
||||||
subst(AMDEPBACKSLASH)
|
|
||||||
popdef([subst])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
# Generate code to set up dependency tracking.
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
|
||||||
# Usage:
|
|
||||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
|
||||||
|
|
||||||
#
|
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
# This code is only required when automatic dependency tracking
|
|
||||||
# is enabled. FIXME. This creates each `.P' file that we will
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# need in order to bootstrap the dependency handling code.
|
# it under the terms of the GNU General Public License as published by
|
||||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
AC_OUTPUT_COMMANDS([
|
# any later version.
|
||||||
test x"$AMDEP_TRUE" != x"" ||
|
|
||||||
for mf in $CONFIG_FILES; do
|
# This program is distributed in the hope that it will be useful,
|
||||||
case "$mf" in
|
# 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.
|
||||||
|
|
||||||
|
#serial 2
|
||||||
|
|
||||||
|
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
# ------------------------------
|
||||||
|
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[for mf in $CONFIG_FILES; do
|
||||||
|
case $mf in
|
||||||
Makefile) dirpart=.;;
|
Makefile) dirpart=.;;
|
||||||
*/Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
|
*/Makefile) dirpart=`AS_DIRNAME("$mf")`;;
|
||||||
*) continue;;
|
*) continue;;
|
||||||
esac
|
esac
|
||||||
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
|
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
|
||||||
# Extract the definition of DEP_FILES from the Makefile without
|
# Extract the definition of DEP_FILES from the Makefile without
|
||||||
# running `make'.
|
# running `make'.
|
||||||
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
|
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
|
||||||
@@ -414,18 +524,49 @@ for mf in $CONFIG_FILES; do
|
|||||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||||
# Make sure the directory exists.
|
# Make sure the directory exists.
|
||||||
test -f "$dirpart/$file" && continue
|
test -f "$dirpart/$file" && continue
|
||||||
fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
|
fdir=`AS_DIRNAME(["$file"])`
|
||||||
$ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
|
AS_MKDIR_P([$dirpart/$fdir])
|
||||||
# echo "creating $dirpart/$file"
|
# echo "creating $dirpart/$file"
|
||||||
echo '# dummy' > "$dirpart/$file"
|
echo '# dummy' > "$dirpart/$file"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
], [AMDEP_TRUE="$AMDEP_TRUE"
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
ac_aux_dir="$ac_aux_dir"])])
|
|
||||||
|
|
||||||
|
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
# -----------------------------
|
||||||
|
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||||
|
#
|
||||||
|
# This code is only required when automatic dependency tracking
|
||||||
|
# is enabled. FIXME. This creates each `.P' file that we will
|
||||||
|
# need in order to bootstrap the dependency handling code.
|
||||||
|
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[AC_CONFIG_COMMANDS([depfiles],
|
||||||
|
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||||
|
])
|
||||||
|
|
||||||
# AM_MAKE_INCLUDE()
|
# AM_MAKE_INCLUDE()
|
||||||
# -----------------
|
# -----------------
|
||||||
# Check to see how make treats includes.
|
# Check to see how make treats includes.
|
||||||
|
|
||||||
|
# Copyright 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||||
[am_make=${MAKE-make}
|
[am_make=${MAKE-make}
|
||||||
cat > confinc << 'END'
|
cat > confinc << 'END'
|
||||||
@@ -464,23 +605,35 @@ AC_MSG_RESULT($_am_result)
|
|||||||
rm -f confinc confmf
|
rm -f confinc confmf
|
||||||
])
|
])
|
||||||
|
|
||||||
# serial 3
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright 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.
|
||||||
|
|
||||||
|
# serial 5
|
||||||
|
|
||||||
|
AC_PREREQ(2.52)
|
||||||
|
|
||||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
# Define a conditional.
|
# Define a conditional.
|
||||||
#
|
|
||||||
# FIXME: Once using 2.50, use this:
|
|
||||||
# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
|
|
||||||
AC_DEFUN([AM_CONDITIONAL],
|
AC_DEFUN([AM_CONDITIONAL],
|
||||||
[ifelse([$1], [TRUE],
|
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||||
[errprint(__file__:__line__: [$0: invalid condition: $1
|
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||||
])dnl
|
|
||||||
m4exit(1)])dnl
|
|
||||||
ifelse([$1], [FALSE],
|
|
||||||
[errprint(__file__:__line__: [$0: invalid condition: $1
|
|
||||||
])dnl
|
|
||||||
m4exit(1)])dnl
|
|
||||||
AC_SUBST([$1_TRUE])
|
AC_SUBST([$1_TRUE])
|
||||||
AC_SUBST([$1_FALSE])
|
AC_SUBST([$1_FALSE])
|
||||||
if $2; then
|
if $2; then
|
||||||
@@ -491,92 +644,83 @@ else
|
|||||||
$1_FALSE=
|
$1_FALSE=
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
|
||||||
|
|
||||||
# serial 3
|
# Copyright 1996, 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.
|
||||||
|
|
||||||
|
AC_PREREQ([2.52])
|
||||||
|
|
||||||
|
# serial 6
|
||||||
|
|
||||||
# When config.status generates a header, we must update the stamp-h file.
|
# When config.status generates a header, we must update the stamp-h file.
|
||||||
# This file resides in the same directory as the config header
|
# This file resides in the same directory as the config header
|
||||||
# that is generated. We must strip everything past the first ":",
|
# that is generated. We must strip everything past the first ":",
|
||||||
# and everything past the last "/".
|
# and everything past the last "/".
|
||||||
|
|
||||||
AC_PREREQ([2.12])
|
|
||||||
|
|
||||||
AC_DEFUN([AM_CONFIG_HEADER],
|
|
||||||
[ifdef([AC_FOREACH],dnl
|
|
||||||
[dnl init our file count if it isn't already
|
|
||||||
m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
|
|
||||||
dnl prepare to store our destination file list for use in config.status
|
|
||||||
AC_FOREACH([_AM_File], [$1],
|
|
||||||
[m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
|
|
||||||
m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
|
|
||||||
dnl and add it to the list of files AC keeps track of, along
|
|
||||||
dnl with our hook
|
|
||||||
AC_CONFIG_HEADERS(_AM_File,
|
|
||||||
dnl COMMANDS, [, INIT-CMDS]
|
|
||||||
[# update the timestamp
|
|
||||||
echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
|
|
||||||
][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
|
|
||||||
m4_popdef([_AM_Dest])])],dnl
|
|
||||||
[AC_CONFIG_HEADER([$1])
|
|
||||||
AC_OUTPUT_COMMANDS(
|
|
||||||
ifelse(patsubst([$1], [[^ ]], []),
|
|
||||||
[],
|
|
||||||
[test -z "$CONFIG_HEADERS" || echo timestamp >dnl
|
|
||||||
patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
|
|
||||||
[am_indx=1
|
|
||||||
for am_file in $1; do
|
|
||||||
case " \$CONFIG_HEADERS " in
|
|
||||||
*" \$am_file "*)
|
|
||||||
am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
|
|
||||||
if test -n "\$am_dir"; then
|
|
||||||
am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
|
|
||||||
for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
|
|
||||||
am_tmpdir=\$am_tmpdir\$am_subdir/
|
|
||||||
if test ! -d \$am_tmpdir; then
|
|
||||||
mkdir \$am_tmpdir
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
echo timestamp > "\$am_dir"stamp-h\$am_indx
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
am_indx=\`expr \$am_indx + 1\`
|
|
||||||
done])
|
|
||||||
])]) # AM_CONFIG_HEADER
|
|
||||||
|
|
||||||
# _AM_DIRNAME(PATH)
|
# _AM_DIRNAME(PATH)
|
||||||
# -----------------
|
# -----------------
|
||||||
# Like AS_DIRNAME, only do it during macro expansion
|
# Like AS_DIRNAME, only do it during macro expansion
|
||||||
AC_DEFUN([_AM_DIRNAME],
|
AC_DEFUN([_AM_DIRNAME],
|
||||||
[m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
|
[m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
|
||||||
m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
|
m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
|
||||||
m4_if(m4_regexp([$1], [^/.*]), -1,
|
m4_if(regexp([$1], [^/.*]), -1,
|
||||||
[.],
|
[.],
|
||||||
m4_patsubst([$1], [^\(/\).*], [\1])),
|
patsubst([$1], [^\(/\).*], [\1])),
|
||||||
m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
|
patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
|
||||||
m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
|
patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
|
||||||
]) # _AM_DIRNAME
|
])# _AM_DIRNAME
|
||||||
|
|
||||||
|
|
||||||
# serial 2
|
# The stamp files are numbered to have different names.
|
||||||
|
# We could number them on a directory basis, but that's additional
|
||||||
|
# complications, let's have a unique counter.
|
||||||
|
m4_define([_AM_STAMP_Count], [0])
|
||||||
|
|
||||||
# Single argument says where are built sources to test, relative to the
|
|
||||||
# built test directory. Maybe omitted if the same (flat distribution).
|
|
||||||
|
|
||||||
AC_DEFUN([AT_CONFIG],
|
# _AM_STAMP(HEADER)
|
||||||
[AT_TESTPATH=ifelse([$1], [], [.], [$1])
|
# -----------------
|
||||||
AC_SUBST([AT_TESTPATH])
|
# The name of the stamp file for HEADER.
|
||||||
# Try to be compatible with both Autoconf 2.13 and 2.50.
|
AC_DEFUN([_AM_STAMP],
|
||||||
if test -z "$ECHO_C$ECHO_N$ECHO_T"; then
|
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
|
||||||
ECHO_C="$ac_c"
|
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
|
||||||
ECHO_N="$ac_n"
|
[:.*])))/stamp-h[]_AM_STAMP_Count])
|
||||||
ECHO_T="$ac_t"
|
|
||||||
AC_SUBST([ECHO_C])
|
|
||||||
AC_SUBST([ECHO_N])
|
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
|
||||||
AC_SUBST([ECHO_T])
|
# ------------------------------------------------------------
|
||||||
fi
|
# We used to try to get a real timestamp in stamp-h. But the fear is that
|
||||||
])
|
# that will cause unnecessary cvs conflicts.
|
||||||
|
AC_DEFUN([_AM_CONFIG_HEADER],
|
||||||
|
[# Add the stamp file to the list of files AC keeps track of,
|
||||||
|
# along with our hook.
|
||||||
|
AC_CONFIG_HEADERS([$1],
|
||||||
|
[# update the timestamp
|
||||||
|
echo 'timestamp for $1' >"_AM_STAMP([$1])"
|
||||||
|
$2],
|
||||||
|
[$3])
|
||||||
|
])# _AM_CONFIG_HEADER
|
||||||
|
|
||||||
|
|
||||||
|
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
AC_DEFUN([AM_CONFIG_HEADER],
|
||||||
|
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
|
||||||
|
])# AM_CONFIG_HEADER
|
||||||
|
|
||||||
#serial 1
|
#serial 1
|
||||||
# This test replaces the one in autoconf.
|
# This test replaces the one in autoconf.
|
||||||
@@ -597,6 +741,23 @@ AC_DEFUN([AC_ISC_POSIX],
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# 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.
|
||||||
|
|
||||||
# serial 1
|
# serial 1
|
||||||
|
|
||||||
# @defmac AC_PROG_CC_STDC
|
# @defmac AC_PROG_CC_STDC
|
||||||
@@ -685,23 +846,6 @@ case "x$am_cv_prog_cc_stdc" in
|
|||||||
esac
|
esac
|
||||||
])
|
])
|
||||||
|
|
||||||
# serial 1 -*- Autoconf -*-
|
|
||||||
|
|
||||||
# BISON_AC_PROG_GNU_M4
|
|
||||||
# --------------------
|
|
||||||
# Check for GNU m4, at least 1.3 (supports frozen files).
|
|
||||||
AC_DEFUN([BISON_AC_PROG_GNU_M4],
|
|
||||||
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
|
|
||||||
AC_CACHE_CHECK([whether m4 supports frozen files],
|
|
||||||
[ac_cv_prog_gnu_m4],
|
|
||||||
[ac_cv_prog_gnu_m4=no
|
|
||||||
if test x"$M4" != x; then
|
|
||||||
case `$M4 --help < /dev/null 2>&1` in
|
|
||||||
*reload-state*) ac_cv_prog_gnu_m4=yes ;;
|
|
||||||
esac
|
|
||||||
fi])
|
|
||||||
])# BISON_AC_PROG_GNU_M4
|
|
||||||
|
|
||||||
AC_DEFUN(BISON_WARNING,
|
AC_DEFUN(BISON_WARNING,
|
||||||
[AC_MSG_CHECKING(whether compiler accepts $1)
|
[AC_MSG_CHECKING(whether compiler accepts $1)
|
||||||
AC_SUBST(WARNING_CFLAGS)
|
AC_SUBST(WARNING_CFLAGS)
|
||||||
@@ -715,6 +859,23 @@ AC_MSG_RESULT(no))
|
|||||||
CFLAGS="$ac_save_CFLAGS"])
|
CFLAGS="$ac_save_CFLAGS"])
|
||||||
|
|
||||||
|
|
||||||
|
# Copyright 1996, 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)
|
||||||
|
# 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.
|
||||||
|
|
||||||
# serial 1
|
# serial 1
|
||||||
|
|
||||||
AC_DEFUN([AM_C_PROTOTYPES],
|
AC_DEFUN([AM_C_PROTOTYPES],
|
||||||
@@ -736,19 +897,19 @@ AC_SUBST(U)dnl
|
|||||||
AC_SUBST(ANSI2KNR)dnl
|
AC_SUBST(ANSI2KNR)dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
#serial 3
|
#serial 5
|
||||||
|
|
||||||
dnl From Jim Meyering.
|
dnl From Jim Meyering.
|
||||||
dnl Determine whether malloc accepts 0 as its argument.
|
dnl Determine whether malloc accepts 0 as its argument.
|
||||||
dnl If it doesn't, arrange to use the replacement function.
|
dnl If it doesn't, arrange to use the replacement function.
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_DEFUN(jm_FUNC_MALLOC,
|
AC_DEFUN([jm_FUNC_MALLOC],
|
||||||
[
|
[
|
||||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||||
dnl mistakenly use a broken malloc -- as it might if this test were omitted.
|
dnl mistakenly use a broken malloc -- as it might if this test were omitted.
|
||||||
AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
|
AC_DEFINE(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
|
||||||
[Define if the malloc check has been performed. ])
|
[Define if the malloc check has been performed. ])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
|
AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
|
||||||
[AC_TRY_RUN([
|
[AC_TRY_RUN([
|
||||||
@@ -765,26 +926,25 @@ AC_DEFUN(jm_FUNC_MALLOC,
|
|||||||
jm_cv_func_working_malloc=no)
|
jm_cv_func_working_malloc=no)
|
||||||
])
|
])
|
||||||
if test $jm_cv_func_working_malloc = no; then
|
if test $jm_cv_func_working_malloc = no; then
|
||||||
AC_SUBST(LIBOBJS)
|
AC_LIBOBJ(malloc)
|
||||||
LIBOBJS="$LIBOBJS malloc.$ac_objext"
|
AC_DEFINE(malloc, rpl_malloc,
|
||||||
AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
|
|
||||||
[Define to rpl_malloc if the replacement function should be used.])
|
[Define to rpl_malloc if the replacement function should be used.])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
#serial 3
|
#serial 5
|
||||||
|
|
||||||
dnl From Jim Meyering.
|
dnl From Jim Meyering.
|
||||||
dnl Determine whether realloc works when both arguments are 0.
|
dnl Determine whether realloc works when both arguments are 0.
|
||||||
dnl If it doesn't, arrange to use the replacement function.
|
dnl If it doesn't, arrange to use the replacement function.
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_DEFUN(jm_FUNC_REALLOC,
|
AC_DEFUN([jm_FUNC_REALLOC],
|
||||||
[
|
[
|
||||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||||
dnl mistakenly use a broken realloc -- as it might if this test were omitted.
|
dnl mistakenly use a broken realloc -- as it might if this test were omitted.
|
||||||
AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
|
AC_DEFINE(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
|
||||||
[Define if the realloc check has been performed. ])
|
[Define if the realloc check has been performed. ])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
|
AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
|
||||||
[AC_TRY_RUN([
|
[AC_TRY_RUN([
|
||||||
@@ -801,33 +961,52 @@ AC_DEFUN(jm_FUNC_REALLOC,
|
|||||||
jm_cv_func_working_realloc=no)
|
jm_cv_func_working_realloc=no)
|
||||||
])
|
])
|
||||||
if test $jm_cv_func_working_realloc = no; then
|
if test $jm_cv_func_working_realloc = no; then
|
||||||
AC_SUBST(LIBOBJS)
|
AC_LIBOBJ(realloc)
|
||||||
LIBOBJS="$LIBOBJS realloc.$ac_objext"
|
AC_DEFINE(realloc, rpl_realloc,
|
||||||
AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
|
|
||||||
[Define to rpl_realloc if the replacement function should be used.])
|
[Define to rpl_realloc if the replacement function should be used.])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
#serial 1
|
#serial 2
|
||||||
|
|
||||||
dnl These are the prerequisite macros for files in the lib/
|
dnl These are the prerequisite macros for files in the lib/
|
||||||
dnl directories of Bison.
|
dnl directories of Bison.
|
||||||
|
|
||||||
AC_DEFUN([jm_PREREQ_QUOTEARG],
|
AC_DEFUN([jm_PREREQ_QUOTEARG],
|
||||||
[
|
[
|
||||||
AC_CHECK_FUNCS(isascii iswprint mbrtowc)
|
AC_CHECK_FUNCS(isascii iswprint mbsinit)
|
||||||
AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
|
jm_FUNC_MBRTOWC
|
||||||
|
AC_CHECK_HEADERS(limits.h stddef.h stdlib.h string.h wchar.h wctype.h)
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_C_BACKSLASH_A
|
AC_C_BACKSLASH_A
|
||||||
AC_MBSTATE_T
|
AC_MBSTATE_T
|
||||||
AM_C_PROTOTYPES
|
AM_C_PROTOTYPES
|
||||||
])
|
])
|
||||||
|
|
||||||
#serial 3
|
#serial 4
|
||||||
|
|
||||||
|
dnl From Paul Eggert
|
||||||
|
|
||||||
|
AC_DEFUN([jm_FUNC_MBRTOWC],
|
||||||
|
[
|
||||||
|
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
|
||||||
|
jm_cv_func_mbrtowc,
|
||||||
|
[AC_TRY_LINK(
|
||||||
|
[#include <wchar.h>],
|
||||||
|
[mbstate_t state; return ! (sizeof state && mbrtowc);],
|
||||||
|
jm_cv_func_mbrtowc=yes,
|
||||||
|
jm_cv_func_mbrtowc=no)])
|
||||||
|
if test $jm_cv_func_mbrtowc = yes; then
|
||||||
|
AC_DEFINE(HAVE_MBRTOWC, 1,
|
||||||
|
[Define to 1 if mbrtowc and mbstate_t are properly declared.])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
#serial 4
|
||||||
|
|
||||||
dnl From Paul Eggert.
|
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_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
|
||||||
[AC_TRY_COMPILE([],
|
[AC_TRY_COMPILE([],
|
||||||
@@ -847,7 +1026,7 @@ AC_DEFUN(AC_C_BACKSLASH_A,
|
|||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
# serial 8
|
# serial 9
|
||||||
|
|
||||||
# From Paul Eggert.
|
# From Paul Eggert.
|
||||||
|
|
||||||
@@ -859,7 +1038,7 @@ AC_DEFUN(AC_C_BACKSLASH_A,
|
|||||||
# (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
|
# (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
|
||||||
# a syntax error in wchar.h due to the use of undefined __int32_t.
|
# a syntax error in wchar.h due to the use of undefined __int32_t.
|
||||||
|
|
||||||
AC_DEFUN(AC_MBSTATE_T,
|
AC_DEFUN([AC_MBSTATE_T],
|
||||||
[
|
[
|
||||||
AC_CHECK_HEADERS(stdlib.h)
|
AC_CHECK_HEADERS(stdlib.h)
|
||||||
|
|
||||||
@@ -877,25 +1056,40 @@ AC_DEFUN(AC_MBSTATE_T,
|
|||||||
[Define to a type if <wchar.h> does not define.])
|
[Define to a type if <wchar.h> does not define.])
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
#serial 1
|
#serial 4
|
||||||
|
|
||||||
dnl FIXME: put these prerequisite-only *.m4 files in a separate
|
dnl FIXME: put these prerequisite-only *.m4 files in a separate
|
||||||
dnl directory -- otherwise, they'll conflict with existing files.
|
dnl directory -- otherwise, they'll conflict with existing files.
|
||||||
|
|
||||||
dnl These are the prerequisite macros for GNU's error.c file.
|
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_CHECK_FUNCS(strerror vprintf doprnt)
|
||||||
AC_HEADER_STDC
|
AC_CHECK_DECLS([strerror])
|
||||||
AC_FUNC_STRERROR_R
|
AC_FUNC_STRERROR_R
|
||||||
|
AC_HEADER_STDC
|
||||||
])
|
])
|
||||||
|
|
||||||
#serial 1002
|
#serial 1003
|
||||||
# Experimental replacement for the function in the latest CVS autoconf.
|
# Experimental replacement for the function in the latest CVS autoconf.
|
||||||
# If the compile-test says strerror_r doesn't work, then resort to a
|
|
||||||
# `run'-test that works on BeOS and segfaults on DEC Unix.
|
|
||||||
# Use with the error.c file in ../lib.
|
# Use with the error.c file in ../lib.
|
||||||
|
|
||||||
|
# Copyright 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
undefine([AC_FUNC_STRERROR_R])
|
undefine([AC_FUNC_STRERROR_R])
|
||||||
|
|
||||||
# AC_FUNC_STRERROR_R
|
# AC_FUNC_STRERROR_R
|
||||||
@@ -903,69 +1097,69 @@ undefine([AC_FUNC_STRERROR_R])
|
|||||||
AC_DEFUN([AC_FUNC_STRERROR_R],
|
AC_DEFUN([AC_FUNC_STRERROR_R],
|
||||||
[AC_CHECK_DECLS([strerror_r])
|
[AC_CHECK_DECLS([strerror_r])
|
||||||
AC_CHECK_FUNCS([strerror_r])
|
AC_CHECK_FUNCS([strerror_r])
|
||||||
if test $ac_cv_func_strerror_r = yes; then
|
AC_CACHE_CHECK([whether strerror_r returns char *],
|
||||||
AC_CHECK_HEADERS(string.h)
|
ac_cv_func_strerror_r_char_p,
|
||||||
AC_CACHE_CHECK([for working strerror_r],
|
|
||||||
ac_cv_func_strerror_r_works,
|
|
||||||
[
|
[
|
||||||
AC_TRY_COMPILE(
|
ac_cv_func_strerror_r_char_p=no
|
||||||
[
|
if test $ac_cv_have_decl_strerror_r = yes; then
|
||||||
# include <stdio.h>
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
|
||||||
# if HAVE_STRING_H
|
[[
|
||||||
# include <string.h>
|
char buf[100];
|
||||||
# endif
|
char x = *strerror_r (0, buf, sizeof buf);
|
||||||
],
|
char *p = strerror_r (0, buf, sizeof buf);
|
||||||
[
|
]])],
|
||||||
char buf[100];
|
ac_cv_func_strerror_r_char_p=yes)
|
||||||
char x = *strerror_r (0, buf, sizeof buf);
|
else
|
||||||
],
|
# strerror_r is not declared. Choose between
|
||||||
ac_cv_func_strerror_r_works=yes,
|
|
||||||
ac_cv_func_strerror_r_works=no
|
|
||||||
)
|
|
||||||
if test $ac_cv_func_strerror_r_works = no; then
|
|
||||||
# strerror_r seems not to work, but now we have to choose between
|
|
||||||
# systems that have relatively inaccessible declarations for the
|
# systems that have relatively inaccessible declarations for the
|
||||||
# function. BeOS and DEC UNIX 4.0 fall in this category, but the
|
# function. BeOS and DEC UNIX 4.0 fall in this category, but the
|
||||||
# former has a strerror_r that returns char*, while the latter
|
# former has a strerror_r that returns char*, while the latter
|
||||||
# has a strerror_r that returns `int'.
|
# has a strerror_r that returns `int'.
|
||||||
# This test should segfault on the DEC system.
|
# This test should segfault on the DEC system.
|
||||||
AC_TRY_RUN(
|
AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
|
||||||
[
|
extern char *strerror_r ();],
|
||||||
# include <stdio.h>
|
[[char buf[100];
|
||||||
# include <string.h>
|
|
||||||
# include <ctype.h>
|
|
||||||
|
|
||||||
extern char *strerror_r ();
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
char buf[100];
|
|
||||||
char x = *strerror_r (0, buf, sizeof buf);
|
char x = *strerror_r (0, buf, sizeof buf);
|
||||||
exit (!isalpha (x));
|
exit (!isalpha (x));]])],
|
||||||
}
|
ac_cv_func_strerror_r_char_p=yes, , :)
|
||||||
],
|
|
||||||
ac_cv_func_strerror_r_works=yes,
|
|
||||||
ac_cv_func_strerror_r_works=no,
|
|
||||||
ac_cv_func_strerror_r_works=no)
|
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
if test $ac_cv_func_strerror_r_works = yes; then
|
if test $ac_cv_func_strerror_r_char_p = yes; then
|
||||||
AC_DEFINE_UNQUOTED(HAVE_WORKING_STRERROR_R, 1,
|
AC_DEFINE([STRERROR_R_CHAR_P], 1,
|
||||||
[Define to 1 if `strerror_r' returns a string.])
|
[Define to 1 if strerror_r returns char *.])
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
])# AC_FUNC_STRERROR_R
|
])# AC_FUNC_STRERROR_R
|
||||||
|
|
||||||
|
|
||||||
|
# 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)])
|
||||||
|
])
|
||||||
|
|
||||||
# Macro to add for using GNU gettext.
|
# Macro to add for using GNU gettext.
|
||||||
# Ulrich Drepper <[email protected]>, 1995.
|
# Ulrich Drepper <[email protected]>, 1995.
|
||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# 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
|
# 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
|
# License or the GNU Library General Public License but which still want
|
||||||
# functionality.
|
# to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
# Please note that the actual code of the GNU gettext library is covered
|
||||||
# General Public License and is *not* in the public domain.
|
# by the GNU Library General Public License, and the rest of the GNU
|
||||||
|
# gettext package package is covered by the GNU General Public License.
|
||||||
|
# They are *not* in the public domain.
|
||||||
|
|
||||||
# serial 10
|
# serial 10
|
||||||
|
|
||||||
@@ -1200,7 +1394,7 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
|
|||||||
dnl Found it, now check the version.
|
dnl Found it, now check the version.
|
||||||
AC_MSG_CHECKING([version of bison])
|
AC_MSG_CHECKING([version of bison])
|
||||||
changequote(<<,>>)dnl
|
changequote(<<,>>)dnl
|
||||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||||
case $ac_prog_version in
|
case $ac_prog_version in
|
||||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||||
@@ -1331,10 +1525,12 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
|||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# 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
|
# 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
|
# License or the GNU Library General Public License but which still want
|
||||||
# functionality.
|
# to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
# Please note that the actual code of the GNU gettext library is covered
|
||||||
# General Public License and is *not* in the public domain.
|
# by the GNU Library General Public License, and the rest of the GNU
|
||||||
|
# gettext package package is covered by the GNU General Public License.
|
||||||
|
# They are *not* in the public domain.
|
||||||
|
|
||||||
# serial 2
|
# serial 2
|
||||||
|
|
||||||
@@ -1496,10 +1692,12 @@ AC_DEFUN([AM_LANGINFO_CODESET],
|
|||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# 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
|
# 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
|
# License or the GNU Library General Public License but which still want
|
||||||
# functionality.
|
# to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
# Please note that the actual code of the GNU gettext library is covered
|
||||||
# General Public License and is *not* in the public domain.
|
# by the GNU Library General Public License, and the rest of the GNU
|
||||||
|
# gettext package package is covered by the GNU General Public License.
|
||||||
|
# They are *not* in the public domain.
|
||||||
|
|
||||||
# serial 2
|
# serial 2
|
||||||
|
|
||||||
|
|||||||
+78
-67
@@ -1,33 +1,34 @@
|
|||||||
/* config.hin. Generated automatically from configure.in by autoheader. */
|
/* config.hin. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||||
systems. This function is required for `alloca.c' support on those systems.
|
systems. This function is required for `alloca.c' support on those systems.
|
||||||
*/
|
*/
|
||||||
#undef CRAY_STACKSEG_END
|
#undef CRAY_STACKSEG_END
|
||||||
|
|
||||||
/* Define if using `alloca.c'. */
|
/* Define to 1 if using `alloca.c'. */
|
||||||
#undef C_ALLOCA
|
#undef C_ALLOCA
|
||||||
|
|
||||||
/* Define to 1 if translation of program messages to the user's native
|
/* Define to 1 if translation of program messages to the user's native
|
||||||
language is requested. */
|
language is requested. */
|
||||||
#undef ENABLE_NLS
|
#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
|
#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
|
#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
|
#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
|
#undef HAVE_CTYPE_H
|
||||||
|
|
||||||
/* Define if backslash-a works in C strings. */
|
/* Define if backslash-a works in C strings. */
|
||||||
#undef HAVE_C_BACKSLASH_A
|
#undef HAVE_C_BACKSLASH_A
|
||||||
|
|
||||||
/* Define if you have the `dcgettext' function. */
|
/* Define to 1 if you have the `dcgettext' function. */
|
||||||
#undef HAVE_DCGETTEXT
|
#undef HAVE_DCGETTEXT
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `memchr', and to 0 if you don't.
|
/* Define to 1 if you have the declaration of `memchr', and to 0 if you don't.
|
||||||
@@ -38,6 +39,10 @@
|
|||||||
*/
|
*/
|
||||||
#undef HAVE_DECL_STPCPY
|
#undef HAVE_DECL_STPCPY
|
||||||
|
|
||||||
|
/* 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
|
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_STRERROR_R
|
#undef HAVE_DECL_STRERROR_R
|
||||||
@@ -56,46 +61,46 @@
|
|||||||
/* Define if the realloc check has been performed. */
|
/* Define if the realloc check has been performed. */
|
||||||
#undef HAVE_DONE_WORKING_REALLOC_CHECK
|
#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
|
#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
|
#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
|
#undef HAVE_FGETS_UNLOCKED
|
||||||
|
|
||||||
/* Define if you have the `getcwd' function. */
|
/* Define to 1 if you have the `getcwd' function. */
|
||||||
#undef HAVE_GETCWD
|
#undef HAVE_GETCWD
|
||||||
|
|
||||||
/* Define if you have the `getegid' function. */
|
/* Define to 1 if you have the `getegid' function. */
|
||||||
#undef HAVE_GETEGID
|
#undef HAVE_GETEGID
|
||||||
|
|
||||||
/* Define if you have the `geteuid' function. */
|
/* Define to 1 if you have the `geteuid' function. */
|
||||||
#undef HAVE_GETEUID
|
#undef HAVE_GETEUID
|
||||||
|
|
||||||
/* Define if you have the `getgid' function. */
|
/* Define to 1 if you have the `getgid' function. */
|
||||||
#undef HAVE_GETGID
|
#undef HAVE_GETGID
|
||||||
|
|
||||||
/* Define if you have the `getpagesize' function. */
|
/* Define to 1 if you have the `getpagesize' function. */
|
||||||
#undef HAVE_GETPAGESIZE
|
#undef HAVE_GETPAGESIZE
|
||||||
|
|
||||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||||
#undef HAVE_GETTEXT
|
#undef HAVE_GETTEXT
|
||||||
|
|
||||||
/* Define if you have the `getuid' function. */
|
/* Define to 1 if you have the `getuid' function. */
|
||||||
#undef HAVE_GETUID
|
#undef HAVE_GETUID
|
||||||
|
|
||||||
/* Define if you have the iconv() function. */
|
/* Define if you have the iconv() function. */
|
||||||
#undef HAVE_ICONV
|
#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
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
/* Define if you have the `isascii' function. */
|
/* Define to 1 if you have the `isascii' function. */
|
||||||
#undef HAVE_ISASCII
|
#undef HAVE_ISASCII
|
||||||
|
|
||||||
/* Define if you have the `iswprint' function. */
|
/* Define to 1 if you have the `iswprint' function. */
|
||||||
#undef HAVE_ISWPRINT
|
#undef HAVE_ISWPRINT
|
||||||
|
|
||||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||||
@@ -104,127 +109,127 @@
|
|||||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||||
#undef HAVE_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
|
#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
|
#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
|
#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
|
#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
|
#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
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
/* Define if you have the `mempcpy' function. */
|
/* Define to 1 if you have the `mempcpy' function. */
|
||||||
#undef HAVE_MEMPCPY
|
#undef HAVE_MEMPCPY
|
||||||
|
|
||||||
/* Define if you have the `mkstemp' function. */
|
/* Define to 1 if you have the `mkstemp' function. */
|
||||||
#undef HAVE_MKSTEMP
|
#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
|
#undef HAVE_MMAP
|
||||||
|
|
||||||
/* Define if you have the `munmap' function. */
|
/* Define to 1 if you have the `munmap' function. */
|
||||||
#undef HAVE_MUNMAP
|
#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
|
#undef HAVE_NL_TYPES_H
|
||||||
|
|
||||||
/* Define if you have the `putenv' function. */
|
/* Define to 1 if you have the `putenv' function. */
|
||||||
#undef HAVE_PUTENV
|
#undef HAVE_PUTENV
|
||||||
|
|
||||||
/* Define if you have the `setenv' function. */
|
/* Define to 1 if you have the `setenv' function. */
|
||||||
#undef HAVE_SETENV
|
#undef HAVE_SETENV
|
||||||
|
|
||||||
/* Define if you have the `setlocale' function. */
|
/* Define to 1 if you have the `setlocale' function. */
|
||||||
#undef HAVE_SETLOCALE
|
#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
|
#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
|
#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
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
/* Define if you have the `stpcpy' function. */
|
/* Define to 1 if you have the `stpcpy' function. */
|
||||||
#undef HAVE_STPCPY
|
#undef HAVE_STPCPY
|
||||||
|
|
||||||
/* Define if you have the `strcasecmp' function. */
|
/* Define to 1 if you have the `strcasecmp' function. */
|
||||||
#undef HAVE_STRCASECMP
|
#undef HAVE_STRCASECMP
|
||||||
|
|
||||||
/* Define if you have the `strchr' function. */
|
/* Define to 1 if you have the `strchr' function. */
|
||||||
#undef HAVE_STRCHR
|
#undef HAVE_STRCHR
|
||||||
|
|
||||||
/* Define if you have the `strdup' function. */
|
/* Define to 1 if you have the `strdup' function. */
|
||||||
#undef HAVE_STRDUP
|
#undef HAVE_STRDUP
|
||||||
|
|
||||||
/* Define if you have the `strerror' function. */
|
/* Define to 1 if you have the `strerror' function. */
|
||||||
#undef HAVE_STRERROR
|
#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
|
#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
|
#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
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
/* Define if you have the `strndup' function. */
|
/* Define to 1 if you have the `strndup' function. */
|
||||||
#undef HAVE_STRNDUP
|
#undef HAVE_STRNDUP
|
||||||
|
|
||||||
/* Define if you have the `strnlen' function. */
|
/* Define to 1 if you have the `strnlen' function. */
|
||||||
#undef HAVE_STRNLEN
|
#undef HAVE_STRNLEN
|
||||||
|
|
||||||
/* Define if you have the `strspn' function. */
|
/* Define to 1 if you have the `strspn' function. */
|
||||||
#undef HAVE_STRSPN
|
#undef HAVE_STRSPN
|
||||||
|
|
||||||
/* Define if you have the `strtoul' function. */
|
/* Define to 1 if you have the `strtoul' function. */
|
||||||
#undef HAVE_STRTOUL
|
#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
|
#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
|
#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
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
/* Define if you have the `tsearch' function. */
|
/* Define to 1 if you have the `tsearch' function. */
|
||||||
#undef HAVE_TSEARCH
|
#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
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
/* Define if you have the `vprintf' function. */
|
/* Define to 1 if you have the `vprintf' function. */
|
||||||
#undef HAVE_VPRINTF
|
#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
|
#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
|
#undef HAVE_WCTYPE_H
|
||||||
|
|
||||||
/* Define to 1 if `strerror_r' returns a string. */
|
/* Define to 1 if you have the `__argz_count' function. */
|
||||||
#undef HAVE_WORKING_STRERROR_R
|
|
||||||
|
|
||||||
/* Define if you have the `__argz_count' function. */
|
|
||||||
#undef HAVE___ARGZ_COUNT
|
#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
|
#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
|
#undef HAVE___ARGZ_STRINGIFY
|
||||||
|
|
||||||
/* Define as const if the declaration of iconv() needs const. */
|
/* Define as const if the declaration of iconv() needs const. */
|
||||||
@@ -244,23 +249,29 @@
|
|||||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||||
#undef STACK_DIRECTION
|
#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
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define to 1 if strerror_r returns char *. */
|
||||||
|
#undef STRERROR_R_CHAR_P
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Define if using the dmalloc debugging malloc package */
|
||||||
|
#undef WITH_DMALLOC
|
||||||
|
|
||||||
/* Define to 1 for GNU C library extensions. */
|
/* Define to 1 for GNU C library extensions. */
|
||||||
#undef _GNU_SOURCE
|
#undef _GNU_SOURCE
|
||||||
|
|
||||||
/* Define if on MINIX. */
|
/* Define to 1 if on MINIX. */
|
||||||
#undef _MINIX
|
#undef _MINIX
|
||||||
|
|
||||||
/* Define if the system does not provide POSIX.1 features except with this
|
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||||
defined. */
|
this defined. */
|
||||||
#undef _POSIX_1_SOURCE
|
#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
|
#undef _POSIX_SOURCE
|
||||||
|
|
||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
|||||||
+11
-12
@@ -1,4 +1,5 @@
|
|||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
@@ -43,6 +44,7 @@ AUTOCONF = @AUTOCONF@
|
|||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
@@ -57,8 +59,12 @@ PRE_UNINSTALL = :
|
|||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
|
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AUTOM4TE = @AUTOM4TE@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
@@ -67,10 +73,7 @@ CC = @CC@
|
|||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
DATADIRNAME = @DATADIRNAME@
|
DATADIRNAME = @DATADIRNAME@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
ECHO_C = @ECHO_C@
|
GCC = @GCC@
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
GLIBC21 = @GLIBC21@
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
@@ -81,12 +84,10 @@ INTLBISON = @INTLBISON@
|
|||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIB = @LIB@
|
||||||
LIBICONV = @LIBICONV@
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
M4 = @M4@
|
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
MSGFMT = @MSGFMT@
|
MSGFMT = @MSGFMT@
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
POFILES = @POFILES@
|
POFILES = @POFILES@
|
||||||
POSUB = @POSUB@
|
POSUB = @POSUB@
|
||||||
@@ -115,9 +116,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
|||||||
cd $(top_srcdir) && \
|
cd $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu config/Makefile
|
$(AUTOMAKE) --gnu config/Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
cd $(top_builddir) && \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
|
||||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
|
||||||
uninstall-info-am:
|
uninstall-info-am:
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
TAGS:
|
TAGS:
|
||||||
|
|||||||
Vendored
+65
-68
@@ -3,7 +3,7 @@
|
|||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2001-08-09'
|
timestamp='2001-11-08'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# 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
|
# under the terms of the GNU General Public License as published by
|
||||||
@@ -24,8 +24,9 @@ timestamp='2001-08-09'
|
|||||||
# configuration script generated by Autoconf, you may include it under
|
# configuration script generated by Autoconf, you may include it under
|
||||||
# the same distribution terms that you use for the rest of that program.
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
# Written by Per Bothner <[email protected]>.
|
# Originally written by Per Bothner <[email protected]>.
|
||||||
# Please send patches to <[email protected]>.
|
# 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
|
# This script attempts to guess a canonical system name similar to
|
||||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||||
@@ -127,7 +128,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
|||||||
|
|
||||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
*:NetBSD:*:*)
|
*:NetBSD:*:*)
|
||||||
# Netbsd (nbsd) targets should (where applicable) match one or
|
# NetBSD (nbsd) targets should (where applicable) match one or
|
||||||
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||||
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
||||||
# switched to ELF, *-*-netbsd* would select the old
|
# switched to ELF, *-*-netbsd* would select the old
|
||||||
@@ -144,6 +145,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||||||
macppc) machine=powerpc-apple ;;
|
macppc) machine=powerpc-apple ;;
|
||||||
hp3[0-9][05]) machine=m68k-hp ;;
|
hp3[0-9][05]) machine=m68k-hp ;;
|
||||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||||
|
sparc*) machine=`uname -p`-unknown ;;
|
||||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||||
esac
|
esac
|
||||||
# The Operating System including object format, if it has switched
|
# The Operating System including object format, if it has switched
|
||||||
@@ -172,6 +174,45 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||||
echo "${machine}-${os}${release}"
|
echo "${machine}-${os}${release}"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
amiga:OpenBSD:*:*)
|
||||||
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
arc:OpenBSD:*:*)
|
||||||
|
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
hp300:OpenBSD:*:*)
|
||||||
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
mac68k:OpenBSD:*:*)
|
||||||
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
macppc:OpenBSD:*:*)
|
||||||
|
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
mvme68k:OpenBSD:*:*)
|
||||||
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
mvme88k:OpenBSD:*:*)
|
||||||
|
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
mvmeppc:OpenBSD:*:*)
|
||||||
|
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
pmax:OpenBSD:*:*)
|
||||||
|
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
sgi:OpenBSD:*:*)
|
||||||
|
echo mipseb-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
sun3:OpenBSD:*:*)
|
||||||
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
wgrisc:OpenBSD:*:*)
|
||||||
|
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
*:OpenBSD:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
alpha:OSF1:*:*)
|
alpha:OSF1:*:*)
|
||||||
if test $UNAME_RELEASE = "V4.0"; then
|
if test $UNAME_RELEASE = "V4.0"; then
|
||||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||||
@@ -247,30 +288,9 @@ EOF
|
|||||||
Amiga*:UNIX_System_V:4.0:*)
|
Amiga*:UNIX_System_V:4.0:*)
|
||||||
echo m68k-unknown-sysv4
|
echo m68k-unknown-sysv4
|
||||||
exit 0;;
|
exit 0;;
|
||||||
amiga:OpenBSD:*:*)
|
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
*:[Aa]miga[Oo][Ss]:*:*)
|
*:[Aa]miga[Oo][Ss]:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
arc64:OpenBSD:*:*)
|
|
||||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
arc:OpenBSD:*:*)
|
|
||||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
hkmips:OpenBSD:*:*)
|
|
||||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
pmax:OpenBSD:*:*)
|
|
||||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
sgi:OpenBSD:*:*)
|
|
||||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
wgrisc:OpenBSD:*:*)
|
|
||||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
*:OS/390:*:*)
|
*:OS/390:*:*)
|
||||||
echo i370-ibm-openedition
|
echo i370-ibm-openedition
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
@@ -333,9 +353,6 @@ EOF
|
|||||||
aushp:SunOS:*:*)
|
aushp:SunOS:*:*)
|
||||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
atari*:OpenBSD:*:*)
|
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
# The situation for MiNT is a little confusing. The machine name
|
# The situation for MiNT is a little confusing. The machine name
|
||||||
# can be virtually everything (everything which is not
|
# can be virtually everything (everything which is not
|
||||||
# "atarist" or "atariste" at least should have a processor
|
# "atarist" or "atariste" at least should have a processor
|
||||||
@@ -362,18 +379,6 @@ EOF
|
|||||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
sun3*:OpenBSD:*:*)
|
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
mac68k:OpenBSD:*:*)
|
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
mvme68k:OpenBSD:*:*)
|
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
mvme88k:OpenBSD:*:*)
|
|
||||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
powerpc:machten:*:*)
|
powerpc:machten:*:*)
|
||||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
@@ -390,6 +395,7 @@ EOF
|
|||||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||||
|
eval $set_cc_for_build
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
sed 's/^ //' << EOF >$dummy.c
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include <stdio.h> /* for printf() prototype */
|
#include <stdio.h> /* for printf() prototype */
|
||||||
@@ -411,7 +417,6 @@ EOF
|
|||||||
exit (-1);
|
exit (-1);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
eval $set_cc_for_build
|
|
||||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
$CC_FOR_BUILD $dummy.c -o $dummy \
|
||||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||||
&& rm -f $dummy.c $dummy && exit 0
|
&& rm -f $dummy.c $dummy && exit 0
|
||||||
@@ -481,6 +486,7 @@ EOF
|
|||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
*:AIX:2:3)
|
*:AIX:2:3)
|
||||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||||
|
eval $set_cc_for_build
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
sed 's/^ //' << EOF >$dummy.c
|
||||||
#include <sys/systemcfg.h>
|
#include <sys/systemcfg.h>
|
||||||
|
|
||||||
@@ -492,7 +498,6 @@ EOF
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
eval $set_cc_for_build
|
|
||||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||||
rm -f $dummy.c $dummy
|
rm -f $dummy.c $dummy
|
||||||
echo rs6000-ibm-aix3.2.5
|
echo rs6000-ibm-aix3.2.5
|
||||||
@@ -543,10 +548,8 @@ EOF
|
|||||||
9000/31? ) HP_ARCH=m68000 ;;
|
9000/31? ) HP_ARCH=m68000 ;;
|
||||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||||
9000/[678][0-9][0-9])
|
9000/[678][0-9][0-9])
|
||||||
case "${HPUX_REV}" in
|
if [ -x /usr/bin/getconf ]; then
|
||||||
11.[0-9][0-9])
|
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`
|
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||||
case "${sc_cpu_version}" in
|
case "${sc_cpu_version}" in
|
||||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||||
@@ -555,12 +558,13 @@ EOF
|
|||||||
case "${sc_kernel_bits}" in
|
case "${sc_kernel_bits}" in
|
||||||
32) HP_ARCH="hppa2.0n" ;;
|
32) HP_ARCH="hppa2.0n" ;;
|
||||||
64) HP_ARCH="hppa2.0w" ;;
|
64) HP_ARCH="hppa2.0w" ;;
|
||||||
|
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||||
esac ;;
|
esac ;;
|
||||||
esac
|
esac
|
||||||
fi ;;
|
fi
|
||||||
esac
|
if [ "${HP_ARCH}" = "" ]; then
|
||||||
if [ "${HP_ARCH}" = "" ]; then
|
eval $set_cc_for_build
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
sed 's/^ //' << EOF >$dummy.c
|
||||||
|
|
||||||
#define _HPUX_SOURCE
|
#define _HPUX_SOURCE
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -593,11 +597,10 @@ EOF
|
|||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
eval $set_cc_for_build
|
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
|
||||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
rm -f $dummy.c $dummy
|
||||||
rm -f $dummy.c $dummy
|
fi ;;
|
||||||
fi ;;
|
|
||||||
esac
|
esac
|
||||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
@@ -606,6 +609,7 @@ EOF
|
|||||||
echo ia64-hp-hpux${HPUX_REV}
|
echo ia64-hp-hpux${HPUX_REV}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
3050*:HI-UX:*:*)
|
3050*:HI-UX:*:*)
|
||||||
|
eval $set_cc_for_build
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
sed 's/^ //' << EOF >$dummy.c
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
int
|
int
|
||||||
@@ -631,7 +635,6 @@ EOF
|
|||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
eval $set_cc_for_build
|
|
||||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||||
rm -f $dummy.c $dummy
|
rm -f $dummy.c $dummy
|
||||||
echo unknown-hitachi-hiuxwe2
|
echo unknown-hitachi-hiuxwe2
|
||||||
@@ -661,9 +664,6 @@ EOF
|
|||||||
parisc*:Lites*:*:*)
|
parisc*:Lites*:*:*)
|
||||||
echo hppa1.1-hp-lites
|
echo hppa1.1-hp-lites
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
hppa*:OpenBSD:*:*)
|
|
||||||
echo hppa-unknown-openbsd
|
|
||||||
exit 0 ;;
|
|
||||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||||
echo c1-convex-bsd
|
echo c1-convex-bsd
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
@@ -715,9 +715,6 @@ EOF
|
|||||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
hp300:OpenBSD:*:*)
|
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
@@ -730,9 +727,6 @@ EOF
|
|||||||
*:FreeBSD:*:*)
|
*:FreeBSD:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
*:OpenBSD:*:*)
|
|
||||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
|
||||||
exit 0 ;;
|
|
||||||
i*:CYGWIN*:*)
|
i*:CYGWIN*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-cygwin
|
echo ${UNAME_MACHINE}-pc-cygwin
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
@@ -848,6 +842,7 @@ EOF
|
|||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
esac
|
esac
|
||||||
# Determine whether the default compiler is a.out or elf
|
# Determine whether the default compiler is a.out or elf
|
||||||
|
eval $set_cc_for_build
|
||||||
cat >$dummy.c <<EOF
|
cat >$dummy.c <<EOF
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -872,7 +867,6 @@ EOF
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
eval $set_cc_for_build
|
|
||||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
$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
|
rm -f $dummy.c $dummy
|
||||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||||
@@ -953,7 +947,7 @@ EOF
|
|||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
M68*:*:R3V[567]*:*)
|
M68*:*:R3V[567]*:*)
|
||||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
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=''
|
OS_REL=''
|
||||||
test -r /etc/.relid \
|
test -r /etc/.relid \
|
||||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||||
@@ -1111,11 +1105,15 @@ EOF
|
|||||||
i*86:XTS-300:*:STOP)
|
i*86:XTS-300:*:STOP)
|
||||||
echo ${UNAME_MACHINE}-unknown-stop
|
echo ${UNAME_MACHINE}-unknown-stop
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
i*86:atheos:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-atheos
|
||||||
|
exit 0 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||||
|
|
||||||
|
eval $set_cc_for_build
|
||||||
cat >$dummy.c <<EOF
|
cat >$dummy.c <<EOF
|
||||||
#ifdef _SEQUENT_
|
#ifdef _SEQUENT_
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
@@ -1230,7 +1228,6 @@ main ()
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
eval $set_cc_for_build
|
|
||||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||||
rm -f $dummy.c $dummy
|
rm -f $dummy.c $dummy
|
||||||
|
|
||||||
|
|||||||
Vendored
+21
-14
@@ -3,7 +3,7 @@
|
|||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2001-08-13'
|
timestamp='2001-11-16'
|
||||||
|
|
||||||
# This file is (in principle) common to ALL GNU software.
|
# This file is (in principle) common to ALL GNU software.
|
||||||
# The presence of a machine in this file suggests that SOME GNU software
|
# The presence of a machine in this file suggests that SOME GNU software
|
||||||
@@ -29,7 +29,8 @@ timestamp='2001-08-13'
|
|||||||
# configuration script generated by Autoconf, you may include it under
|
# configuration script generated by Autoconf, you may include it under
|
||||||
# the same distribution terms that you use for the rest of that program.
|
# 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.
|
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||||
# Supply the specified configuration type as an argument.
|
# Supply the specified configuration type as an argument.
|
||||||
@@ -236,21 +237,21 @@ case $basic_machine in
|
|||||||
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
||||||
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
|
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
|
||||||
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
|
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
|
||||||
| mipsbe | mipsel | mipsle | mipstx39 | mipstx39el \
|
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
|
||||||
|
| mipsisa32 \
|
||||||
| mn10200 | mn10300 \
|
| mn10200 | mn10300 \
|
||||||
| ns16k | ns32k \
|
| ns16k | ns32k \
|
||||||
| openrisc \
|
| openrisc \
|
||||||
| pdp10 | pdp11 | pj | pjl \
|
| pdp10 | pdp11 | pj | pjl \
|
||||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||||
| pyramid \
|
| pyramid \
|
||||||
| s390 | s390x \
|
|
||||||
| sh | sh[34] | sh[34]eb | shbe | shle \
|
| sh | sh[34] | sh[34]eb | shbe | shle \
|
||||||
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
|
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||||
| strongarm \
|
| strongarm \
|
||||||
| tahoe | thumb | tic80 | tron \
|
| tahoe | thumb | tic80 | tron \
|
||||||
| v850 \
|
| v850 \
|
||||||
| we32k \
|
| we32k \
|
||||||
| x86 | xscale \
|
| x86 | xscale | xstormy16 \
|
||||||
| z8k)
|
| z8k)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
;;
|
;;
|
||||||
@@ -279,6 +280,7 @@ case $basic_machine in
|
|||||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||||
| alphapca5[67]-* | arc-* \
|
| alphapca5[67]-* | arc-* \
|
||||||
| arm-* | armbe-* | armle-* | armv*-* \
|
| arm-* | armbe-* | armle-* | armv*-* \
|
||||||
|
| avr-* \
|
||||||
| bs2000-* \
|
| bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c54x-* \
|
| c[123]* | c30-* | [cjt]90-* | c54x-* \
|
||||||
| clipper-* | cray2-* | cydra-* \
|
| clipper-* | cray2-* | cydra-* \
|
||||||
@@ -293,22 +295,21 @@ case $basic_machine in
|
|||||||
| m88110-* | m88k-* | mcore-* \
|
| m88110-* | m88k-* | mcore-* \
|
||||||
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
|
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
|
||||||
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
|
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
|
||||||
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipsel-* \
|
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
|
||||||
| mipsle-* | mipstx39-* | mipstx39el-* \
|
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
|
||||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||||
| orion-* \
|
| orion-* \
|
||||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||||
| pyramid-* \
|
| pyramid-* \
|
||||||
| romp-* | rs6000-* \
|
| romp-* | rs6000-* \
|
||||||
| s390-* | s390x-* \
|
|
||||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
|
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
|
||||||
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
|
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
|
||||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
|
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
|
||||||
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
||||||
| v850-* | vax-* \
|
| v850-* | vax-* \
|
||||||
| we32k-* \
|
| we32k-* \
|
||||||
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
|
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \
|
||||||
| ymp-* \
|
| ymp-* \
|
||||||
| z8k-*)
|
| z8k-*)
|
||||||
;;
|
;;
|
||||||
@@ -723,7 +724,7 @@ case $basic_machine in
|
|||||||
pc532 | pc532-*)
|
pc532 | pc532-*)
|
||||||
basic_machine=ns32k-pc532
|
basic_machine=ns32k-pc532
|
||||||
;;
|
;;
|
||||||
pentium | p5 | k5 | k6 | nexgen)
|
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||||
basic_machine=i586-pc
|
basic_machine=i586-pc
|
||||||
;;
|
;;
|
||||||
pentiumpro | p6 | 6x86 | athlon)
|
pentiumpro | p6 | 6x86 | athlon)
|
||||||
@@ -732,7 +733,7 @@ case $basic_machine in
|
|||||||
pentiumii | pentium2)
|
pentiumii | pentium2)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
;;
|
;;
|
||||||
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
|
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||||
@@ -783,6 +784,12 @@ case $basic_machine in
|
|||||||
rtpc | rtpc-*)
|
rtpc | rtpc-*)
|
||||||
basic_machine=romp-ibm
|
basic_machine=romp-ibm
|
||||||
;;
|
;;
|
||||||
|
s390 | s390-*)
|
||||||
|
basic_machine=s390-ibm
|
||||||
|
;;
|
||||||
|
s390x | s390x-*)
|
||||||
|
basic_machine=s390x-ibm
|
||||||
|
;;
|
||||||
sa29200)
|
sa29200)
|
||||||
basic_machine=a29k-amd
|
basic_machine=a29k-amd
|
||||||
os=-udi
|
os=-udi
|
||||||
@@ -794,7 +801,7 @@ case $basic_machine in
|
|||||||
basic_machine=sh-hitachi
|
basic_machine=sh-hitachi
|
||||||
os=-hms
|
os=-hms
|
||||||
;;
|
;;
|
||||||
sparclite-wrs)
|
sparclite-wrs | simso-wrs)
|
||||||
basic_machine=sparclite-wrs
|
basic_machine=sparclite-wrs
|
||||||
os=-vxworks
|
os=-vxworks
|
||||||
;;
|
;;
|
||||||
@@ -1054,7 +1061,7 @@ case $os in
|
|||||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||||
| -aos* \
|
| -aos* | -atheos* \
|
||||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||||
@@ -1067,7 +1074,7 @@ case $os in
|
|||||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||||
| -os2* | -vos*)
|
| -os2* | -vos* | -palmos* | -uclinux*)
|
||||||
# Remember, each alternative MUST END IN *, to match a version number.
|
# Remember, each alternative MUST END IN *, to match a version number.
|
||||||
;;
|
;;
|
||||||
-qnx*)
|
-qnx*)
|
||||||
|
|||||||
+6
-1
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Get modification time of a file or directory and pretty-print it.
|
# 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
|
# written by Ulrich Drepper <[email protected]>, June 1995
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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,
|
# along with this program; if not, write to the Free Software Foundation,
|
||||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# 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.
|
# Prevent date giving response in another language.
|
||||||
LANG=C
|
LANG=C
|
||||||
export LANG
|
export LANG
|
||||||
|
|||||||
+154
-8
@@ -1,7 +1,7 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Common stub for a few missing GNU programs while installing.
|
# Common stub for a few missing GNU programs while installing.
|
||||||
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||||
# Franc,ois Pinard <[email protected]>, 1996.
|
# Originally by Fran,cois Pinard <[email protected]>, 1996.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,11 +18,37 @@
|
|||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
# 02111-1307, USA.
|
# 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.
|
||||||
|
|
||||||
if test $# -eq 0; then
|
if test $# -eq 0; then
|
||||||
echo 1>&2 "Try \`$0 --help' for more information"
|
echo 1>&2 "Try \`$0 --help' for more information"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
run=:
|
||||||
|
|
||||||
|
# In the cases where this matters, `missing' is being run in the
|
||||||
|
# srcdir already.
|
||||||
|
if test -f configure.ac; then
|
||||||
|
configure_ac=configure.ac
|
||||||
|
else
|
||||||
|
configure_ac=configure.in
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--run)
|
||||||
|
# Try to run requested program, and just exit if it succeeds.
|
||||||
|
run=
|
||||||
|
shift
|
||||||
|
"$@" && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If it does not exist, or fails to run (possibly an outdated version),
|
||||||
|
# try to emulate it.
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
||||||
-h|--h|--he|--hel|--help)
|
-h|--h|--he|--hel|--help)
|
||||||
@@ -35,6 +61,7 @@ error status if there is no known handling for PROGRAM.
|
|||||||
Options:
|
Options:
|
||||||
-h, --help display this help and exit
|
-h, --help display this help and exit
|
||||||
-v, --version output version information and exit
|
-v, --version output version information and exit
|
||||||
|
--run try to run the given command, and emulate it if it fails
|
||||||
|
|
||||||
Supported PROGRAM values:
|
Supported PROGRAM values:
|
||||||
aclocal touch file \`aclocal.m4'
|
aclocal touch file \`aclocal.m4'
|
||||||
@@ -43,13 +70,15 @@ Supported PROGRAM values:
|
|||||||
automake touch all \`Makefile.in' files
|
automake touch all \`Makefile.in' files
|
||||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||||
flex create \`lex.yy.c', if possible, from existing .c
|
flex create \`lex.yy.c', if possible, from existing .c
|
||||||
|
help2man touch the output file
|
||||||
lex create \`lex.yy.c', if possible, from existing .c
|
lex create \`lex.yy.c', if possible, from existing .c
|
||||||
makeinfo touch the output file
|
makeinfo touch the output file
|
||||||
|
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||||
echo "missing - GNU libit 0.0"
|
echo "missing 0.4 - GNU automake"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-*)
|
-*)
|
||||||
@@ -59,30 +88,45 @@ Supported PROGRAM values:
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
aclocal)
|
aclocal)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo 1>&2 "\
|
echo 1>&2 "\
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
you modified \`acinclude.m4' or \`configure.in'. You might want
|
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||||
any GNU archive site."
|
any GNU archive site."
|
||||||
touch aclocal.m4
|
touch aclocal.m4
|
||||||
;;
|
;;
|
||||||
|
|
||||||
autoconf)
|
autoconf)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo 1>&2 "\
|
echo 1>&2 "\
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
you modified \`configure.in'. You might want to install the
|
you modified \`${configure_ac}'. You might want to install the
|
||||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||||
archive site."
|
archive site."
|
||||||
touch configure
|
touch configure
|
||||||
;;
|
;;
|
||||||
|
|
||||||
autoheader)
|
autoheader)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo 1>&2 "\
|
echo 1>&2 "\
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
you modified \`acconfig.h' or \`configure.in'. You might want
|
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||||
from any GNU archive site."
|
from any GNU archive site."
|
||||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
|
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||||
test -z "$files" && files="config.h"
|
test -z "$files" && files="config.h"
|
||||||
touch_files=
|
touch_files=
|
||||||
for f in $files; do
|
for f in $files; do
|
||||||
@@ -96,9 +140,14 @@ WARNING: \`$1' is missing on your system. You should only need it if
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
automake)
|
automake)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo 1>&2 "\
|
echo 1>&2 "\
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
|
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||||
You might want to install the \`Automake' and \`Perl' packages.
|
You might want to install the \`Automake' and \`Perl' packages.
|
||||||
Grab them from any GNU archive site."
|
Grab them from any GNU archive site."
|
||||||
find . -type f -name Makefile.am -print |
|
find . -type f -name Makefile.am -print |
|
||||||
@@ -106,6 +155,34 @@ WARNING: \`$1' is missing on your system. You should only need it if
|
|||||||
while read f; do touch "$f"; done
|
while read f; do touch "$f"; done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
autom4te)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||||
|
system. You might have modified some files without having the
|
||||||
|
proper tools for further handling them.
|
||||||
|
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||||
|
archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||||
|
if test -f "$file"; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo "#! /bin/sh"
|
||||||
|
echo "# Created by GNU Automake missing as a replacement of"
|
||||||
|
echo "# $ $@"
|
||||||
|
echo "exit 0"
|
||||||
|
chmod +x $file
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
bison|yacc)
|
bison|yacc)
|
||||||
echo 1>&2 "\
|
echo 1>&2 "\
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
@@ -159,7 +236,37 @@ WARNING: \`$1' is missing on your system. You should only need it if
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
help2man)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
|
you modified a dependency of a manual page. You may need the
|
||||||
|
\`Help2man' package in order for those modifications to take
|
||||||
|
effect. You can get \`Help2man' from any GNU archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||||
|
if test -z "$file"; then
|
||||||
|
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||||
|
fi
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo ".ab help2man is required to generate this page"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
makeinfo)
|
makeinfo)
|
||||||
|
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||||
|
# We have makeinfo, but it failed.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo 1>&2 "\
|
echo 1>&2 "\
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||||
@@ -175,6 +282,45 @@ WARNING: \`$1' is missing on your system. You should only need it if
|
|||||||
touch $file
|
touch $file
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
tar)
|
||||||
|
shift
|
||||||
|
if test -n "$run"; then
|
||||||
|
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We have already tried tar in the generic part.
|
||||||
|
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||||
|
# messages.
|
||||||
|
if (gnutar --version > /dev/null 2>&1); then
|
||||||
|
gnutar ${1+"$@"} && exit 0
|
||||||
|
fi
|
||||||
|
if (gtar --version > /dev/null 2>&1); then
|
||||||
|
gtar ${1+"$@"} && exit 0
|
||||||
|
fi
|
||||||
|
firstarg="$1"
|
||||||
|
if shift; then
|
||||||
|
case "$firstarg" in
|
||||||
|
*o*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/o//`
|
||||||
|
tar "$firstarg" ${1+"$@"} && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$firstarg" in
|
||||||
|
*h*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/h//`
|
||||||
|
tar "$firstarg" ${1+"$@"} && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||||
|
You may want to install GNU tar or Free paxutils, or check the
|
||||||
|
command line arguments."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo 1>&2 "\
|
echo 1>&2 "\
|
||||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||||
|
|||||||
+66
-5
@@ -7,6 +7,52 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
errstatus=0
|
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
|
for file
|
||||||
do
|
do
|
||||||
@@ -22,13 +68,24 @@ do
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if test ! -d "$pathcomp"; then
|
if test ! -d "$pathcomp"; then
|
||||||
echo "mkdir $pathcomp"
|
echo "mkdir $pathcomp"
|
||||||
|
|
||||||
mkdir "$pathcomp" || lasterr=$?
|
mkdir "$pathcomp" || lasterr=$?
|
||||||
|
|
||||||
if test ! -d "$pathcomp"; then
|
if test ! -d "$pathcomp"; then
|
||||||
errstatus=$lasterr
|
errstatus=$lasterr
|
||||||
fi
|
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
|
fi
|
||||||
|
|
||||||
pathcomp="$pathcomp/"
|
pathcomp="$pathcomp/"
|
||||||
@@ -37,4 +94,8 @@ done
|
|||||||
|
|
||||||
exit $errstatus
|
exit $errstatus
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 3
|
||||||
|
# End:
|
||||||
# mkinstalldirs ends here
|
# mkinstalldirs ends here
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.28c
|
1.30d
|
||||||
|
|||||||
+35
-17
@@ -1,12 +1,35 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||||
AC_PREREQ(2.52)
|
#
|
||||||
AC_INIT(bison, 1.28c, [email protected])
|
# 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
|
||||||
|
|
||||||
|
# We need a recent Autoconf to run a recent Autotest.
|
||||||
|
AC_PREREQ(2.52g)
|
||||||
|
|
||||||
|
AC_INIT([GNU Bison], [1.30e], [[email protected]])
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
AM_INIT_AUTOMAKE(bison, 1.28c)
|
|
||||||
|
AM_INIT_AUTOMAKE([bison], [1.30e])
|
||||||
AM_CONFIG_HEADER(config.h:config.hin)
|
AM_CONFIG_HEADER(config.h:config.hin)
|
||||||
|
|
||||||
# Initialize the test suite.
|
# Initialize the test suite.
|
||||||
AT_CONFIG(../src)
|
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.
|
# Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
@@ -14,12 +37,7 @@ AC_MINIX
|
|||||||
AC_ISC_POSIX
|
AC_ISC_POSIX
|
||||||
AM_PROG_CC_STDC
|
AM_PROG_CC_STDC
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
# GNU M4 is needed to build the testsuite.
|
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
||||||
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
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(gcc-warnings,
|
AC_ARG_ENABLE(gcc-warnings,
|
||||||
[ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)],
|
[ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)],
|
||||||
@@ -69,18 +87,18 @@ jm_FUNC_MALLOC
|
|||||||
jm_FUNC_REALLOC
|
jm_FUNC_REALLOC
|
||||||
jm_PREREQ_QUOTEARG
|
jm_PREREQ_QUOTEARG
|
||||||
jm_PREREQ_ERROR
|
jm_PREREQ_ERROR
|
||||||
|
AM_WITH_DMALLOC
|
||||||
|
|
||||||
ALL_LINGUAS="de es et fr ja nl ru"
|
ALL_LINGUAS="de es et fr ja nl ru sv tr"
|
||||||
AM_GNU_GETTEXT
|
AM_GNU_GETTEXT(, need-ngettext)
|
||||||
|
|
||||||
# This is necessary so that .o files in LIBOBJS are also built via
|
# This is necessary so that .o files in LIBOBJS are also built via
|
||||||
# the ANSI2KNR-filtering rules.
|
# the ANSI2KNR-filtering rules.
|
||||||
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
LIB@&t@OBJS=`echo $LIB@&t@OBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
||||||
AC_SUBST(LIBOBJS)
|
AC_SUBST(LIB@&t@OBJS)
|
||||||
|
|
||||||
AC_OUTPUT([Makefile
|
AC_OUTPUT([Makefile
|
||||||
config/Makefile
|
config/Makefile
|
||||||
intl/Makefile po/Makefile.in
|
intl/Makefile po/Makefile.in
|
||||||
lib/Makefile src/Makefile doc/Makefile
|
lib/Makefile src/Makefile doc/Makefile
|
||||||
m4/Makefile
|
m4/Makefile])
|
||||||
tests/Makefile tests/atconfig])
|
|
||||||
|
|||||||
+21
-20
@@ -1,4 +1,5 @@
|
|||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
@@ -43,6 +44,7 @@ AUTOCONF = @AUTOCONF@
|
|||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
@@ -57,8 +59,12 @@ PRE_UNINSTALL = :
|
|||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
|
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AUTOM4TE = @AUTOM4TE@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
@@ -67,10 +73,7 @@ CC = @CC@
|
|||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
DATADIRNAME = @DATADIRNAME@
|
DATADIRNAME = @DATADIRNAME@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
ECHO_C = @ECHO_C@
|
GCC = @GCC@
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
GLIBC21 = @GLIBC21@
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
@@ -81,12 +84,10 @@ INTLBISON = @INTLBISON@
|
|||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIB = @LIB@
|
||||||
LIBICONV = @LIBICONV@
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
M4 = @M4@
|
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
MSGFMT = @MSGFMT@
|
MSGFMT = @MSGFMT@
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
POFILES = @POFILES@
|
POFILES = @POFILES@
|
||||||
POSUB = @POSUB@
|
POSUB = @POSUB@
|
||||||
@@ -131,9 +132,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
|||||||
cd $(top_srcdir) && \
|
cd $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu doc/Makefile
|
$(AUTOMAKE) --gnu doc/Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
cd $(top_builddir) && \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
|
||||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||||
@:
|
@:
|
||||||
@@ -165,7 +164,7 @@ bison.dvi: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
|
|||||||
`echo $< | sed 's,.*/,,'`
|
`echo $< | sed 's,.*/,,'`
|
||||||
|
|
||||||
.texinfo.dvi:
|
.texinfo.dvi:
|
||||||
TEXINPUTS=$(top_srcdir)/config:$$TEXINPUTS \
|
TEXINPUTS="$(top_srcdir)/config$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||||
$(TEXI2DVI) $<
|
$(TEXI2DVI) $<
|
||||||
|
|
||||||
@@ -204,9 +203,10 @@ dist-info: $(INFO_DEPS)
|
|||||||
list='$(INFO_DEPS)'; \
|
list='$(INFO_DEPS)'; \
|
||||||
for base in $$list; do \
|
for base in $$list; do \
|
||||||
d=$(srcdir); \
|
d=$(srcdir); \
|
||||||
for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
|
for file in $$d/$$base*; do \
|
||||||
test -f $(distdir)/$$file \
|
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
test -f $(distdir)/$$relfile || \
|
||||||
|
cp -p $$file $(distdir)/$$relfile; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -348,10 +348,11 @@ install-info-am: $(INFO_DEPS)
|
|||||||
@list='$(INFO_DEPS)'; \
|
@list='$(INFO_DEPS)'; \
|
||||||
for file in $$list; do \
|
for file in $$list; do \
|
||||||
d=$(srcdir); \
|
d=$(srcdir); \
|
||||||
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
for ifile in echo $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \
|
||||||
if test -f $$d/$$ifile; then \
|
if test -f $$ifile; then \
|
||||||
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
|
relfile=`expr "$$ifile" : "$$d/\(.*\)"`; \
|
||||||
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
|
echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \
|
||||||
|
$(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \
|
||||||
else : ; fi; \
|
else : ; fi; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
|||||||
+33
-5
@@ -10,7 +10,11 @@ bison \- GNU Project parser generator (yacc replacement)
|
|||||||
] [
|
] [
|
||||||
.B \-d
|
.B \-d
|
||||||
] [
|
] [
|
||||||
.B \-\-defines
|
.BI \-\-defines= defines-file
|
||||||
|
] [
|
||||||
|
.B \-g
|
||||||
|
] [
|
||||||
|
.BI \-\-graph= graph-file
|
||||||
] [
|
] [
|
||||||
.B \-k
|
.B \-k
|
||||||
] [
|
] [
|
||||||
@@ -123,8 +127,6 @@ chosen as if the input file were named
|
|||||||
.B \-d
|
.B \-d
|
||||||
.br
|
.br
|
||||||
.ns
|
.ns
|
||||||
.TP
|
|
||||||
.B \-\-defines
|
|
||||||
Write an extra output file containing macro definitions for the token
|
Write an extra output file containing macro definitions for the token
|
||||||
type names defined in the grammar and the semantic value type
|
type names defined in the grammar and the semantic value type
|
||||||
.BR YYSTYPE ,
|
.BR YYSTYPE ,
|
||||||
@@ -145,6 +147,32 @@ in a separate source file, because
|
|||||||
needs to be able to refer to token type codes and the variable
|
needs to be able to refer to token type codes and the variable
|
||||||
.BR yylval .
|
.BR yylval .
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-\-defines= defines-file
|
||||||
|
The behaviour of
|
||||||
|
.BI \-\-defines
|
||||||
|
is the same than
|
||||||
|
.BI \-d
|
||||||
|
option.
|
||||||
|
The only difference is that it has an optionnal argument which is
|
||||||
|
the name of the output filename.
|
||||||
|
.TP
|
||||||
|
.BI \-g
|
||||||
|
.br
|
||||||
|
.ns
|
||||||
|
Output a VCG definition of the LALR(1) grammar automaton computed by
|
||||||
|
Bison. If the grammar file is
|
||||||
|
.BR foo.y
|
||||||
|
, the VCG output file will be
|
||||||
|
.BR foo.vcg .
|
||||||
|
.TP
|
||||||
|
.BI \-\-graph= graph-file
|
||||||
|
The behaviour of
|
||||||
|
.BI \-\-graph
|
||||||
|
is the same than
|
||||||
|
.BI \-g
|
||||||
|
option. The only difference is that it has an optionnal argument which
|
||||||
|
is the name of the output graph filename.
|
||||||
|
.TP
|
||||||
.B \-k
|
.B \-k
|
||||||
.br
|
.br
|
||||||
.ns
|
.ns
|
||||||
@@ -315,9 +343,9 @@ bison \-y $*
|
|||||||
.sp
|
.sp
|
||||||
.RE
|
.RE
|
||||||
.SH FILES
|
.SH FILES
|
||||||
/usr/local/lib/bison.simple simple parser
|
/usr/local/share/bison/bison.simple simple parser
|
||||||
.br
|
.br
|
||||||
/usr/local/lib/bison.hairy complicated parser
|
/usr/local/share/bison/bison.hairy complicated parser
|
||||||
.SH "ENVIRONMENT VARIABLES"
|
.SH "ENVIRONMENT VARIABLES"
|
||||||
.TP
|
.TP
|
||||||
.SM BISON_SIMPLE
|
.SM BISON_SIMPLE
|
||||||
|
|||||||
+110
-106
@@ -1,5 +1,5 @@
|
|||||||
This is bison.info, produced by makeinfo version 4.0b from
|
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
|
||||||
bison.texinfo.
|
à partir bison.texinfo.
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
@@ -30,112 +30,116 @@ instead of in the original English.
|
|||||||
|
|
||||||
|
|
||||||
Indirect:
|
Indirect:
|
||||||
bison.info-1: 1292
|
bison.info-1: 1313
|
||||||
bison.info-2: 50351
|
bison.info-2: 50632
|
||||||
bison.info-3: 99751
|
bison.info-3: 100395
|
||||||
bison.info-4: 147940
|
bison.info-4: 147417
|
||||||
bison.info-5: 190640
|
bison.info-5: 197287
|
||||||
|
|
||||||
Tag Table:
|
Tag Table:
|
||||||
(Indirect)
|
(Indirect)
|
||||||
Node: Top1292
|
Node: Top1313
|
||||||
Node: Introduction8694
|
Node: Introduction8968
|
||||||
Node: Conditions9969
|
Node: Conditions10243
|
||||||
Node: Copying11433
|
Node: Copying11707
|
||||||
Node: Concepts30636
|
Node: Concepts30910
|
||||||
Node: Language and Grammar31715
|
Node: Language and Grammar31989
|
||||||
Node: Grammar in Bison36731
|
Node: Grammar in Bison36947
|
||||||
Node: Semantic Values38655
|
Node: Semantic Values38871
|
||||||
Node: Semantic Actions40756
|
Node: Semantic Actions40972
|
||||||
Node: Locations Overview41945
|
Node: Locations Overview42161
|
||||||
Node: Bison Parser43392
|
Node: Bison Parser43608
|
||||||
Node: Stages45704
|
Node: Stages45920
|
||||||
Node: Grammar Layout46987
|
Node: Grammar Layout47203
|
||||||
Node: Examples48243
|
Node: Examples48460
|
||||||
Node: RPN Calc49378
|
Node: RPN Calc49658
|
||||||
Node: Rpcalc Decls50351
|
Node: Rpcalc Decls50632
|
||||||
Node: Rpcalc Rules51916
|
Node: Rpcalc Rules52219
|
||||||
Node: Rpcalc Input53716
|
Node: Rpcalc Input54019
|
||||||
Node: Rpcalc Line55177
|
Node: Rpcalc Line55480
|
||||||
Node: Rpcalc Expr56292
|
Node: Rpcalc Expr56595
|
||||||
Node: Rpcalc Lexer58237
|
Node: Rpcalc Lexer58540
|
||||||
Node: Rpcalc Main60809
|
Node: Rpcalc Main61112
|
||||||
Node: Rpcalc Error61207
|
Node: Rpcalc Error61510
|
||||||
Node: Rpcalc Gen62215
|
Node: Rpcalc Gen62518
|
||||||
Node: Rpcalc Compile63345
|
Node: Rpcalc Compile63667
|
||||||
Node: Infix Calc64220
|
Node: Infix Calc64542
|
||||||
Node: Simple Error Recovery66927
|
Node: Simple Error Recovery67249
|
||||||
Node: Multi-function Calc68813
|
Node: Location Tracking Calc69138
|
||||||
Node: Mfcalc Decl70379
|
Node: Ltcalc Decls69820
|
||||||
Node: Mfcalc Rules72402
|
Node: Ltcalc Rules70713
|
||||||
Node: Mfcalc Symtab73782
|
Node: Ltcalc Lexer72723
|
||||||
Node: Exercises80155
|
Node: Multi-function Calc75049
|
||||||
Node: Grammar File80661
|
Node: Mfcalc Decl76616
|
||||||
Node: Grammar Outline81509
|
Node: Mfcalc Rules78639
|
||||||
Node: Prologue82197
|
Node: Mfcalc Symtab80019
|
||||||
Node: Bison Declarations82737
|
Node: Exercises86392
|
||||||
Node: Grammar Rules83143
|
Node: Grammar File86898
|
||||||
Node: Epilogue83605
|
Node: Grammar Outline87746
|
||||||
Node: Symbols84455
|
Node: C Declarations88480
|
||||||
Node: Rules89536
|
Node: Bison Declarations89060
|
||||||
Node: Recursion91175
|
Node: Grammar Rules89472
|
||||||
Node: Semantics92894
|
Node: C Code89932
|
||||||
Node: Value Type93988
|
Node: Symbols90862
|
||||||
Node: Multiple Types94646
|
Node: Rules95943
|
||||||
Node: Actions95663
|
Node: Recursion97582
|
||||||
Node: Action Types98448
|
Node: Semantics99301
|
||||||
Node: Mid-Rule Actions99751
|
Node: Value Type100395
|
||||||
Node: Locations105321
|
Node: Multiple Types101067
|
||||||
Node: Location Type105969
|
Node: Actions102084
|
||||||
Node: Actions and Locations106527
|
Node: Action Types104869
|
||||||
Node: Location Default Action108683
|
Node: Mid-Rule Actions106172
|
||||||
Node: Declarations110146
|
Node: Locations111742
|
||||||
Node: Token Decl111465
|
Node: Location Type112390
|
||||||
Node: Precedence Decl113478
|
Node: Actions and Locations112948
|
||||||
Node: Union Decl115029
|
Node: Location Default Action115104
|
||||||
Node: Type Decl115873
|
Node: Declarations116567
|
||||||
Node: Expect Decl116779
|
Node: Token Decl117886
|
||||||
Node: Start Decl118325
|
Node: Precedence Decl119899
|
||||||
Node: Pure Decl118703
|
Node: Union Decl121450
|
||||||
Node: Decl Summary120380
|
Node: Type Decl122294
|
||||||
Node: Multiple Parsers125763
|
Node: Expect Decl123200
|
||||||
Node: Interface127257
|
Node: Start Decl124768
|
||||||
Node: Parser Function128120
|
Node: Pure Decl125146
|
||||||
Node: Lexical128955
|
Node: Decl Summary126823
|
||||||
Node: Calling Convention130361
|
Node: Multiple Parsers132951
|
||||||
Node: Token Values133132
|
Node: Interface134445
|
||||||
Node: Token Positions134281
|
Node: Parser Function135317
|
||||||
Node: Pure Calling135166
|
Node: Lexical136152
|
||||||
Node: Error Reporting138098
|
Node: Calling Convention137558
|
||||||
Node: Action Features140220
|
Node: Token Values140329
|
||||||
Node: Algorithm143515
|
Node: Token Positions141478
|
||||||
Node: Look-Ahead145808
|
Node: Pure Calling142363
|
||||||
Node: Shift/Reduce147940
|
Node: Error Reporting145295
|
||||||
Node: Precedence150852
|
Node: Action Features147417
|
||||||
Node: Why Precedence151503
|
Node: Algorithm150712
|
||||||
Node: Using Precedence153368
|
Node: Look-Ahead153005
|
||||||
Node: Precedence Examples154336
|
Node: Shift/Reduce155137
|
||||||
Node: How Precedence155037
|
Node: Precedence158049
|
||||||
Node: Contextual Precedence156186
|
Node: Why Precedence158700
|
||||||
Node: Parser States157977
|
Node: Using Precedence160565
|
||||||
Node: Reduce/Reduce159220
|
Node: Precedence Examples161533
|
||||||
Node: Mystery Conflicts162781
|
Node: How Precedence162234
|
||||||
Node: Stack Overflow166167
|
Node: Contextual Precedence163383
|
||||||
Node: Error Recovery167540
|
Node: Parser States165174
|
||||||
Node: Context Dependency172676
|
Node: Reduce/Reduce166417
|
||||||
Node: Semantic Tokens173524
|
Node: Mystery Conflicts169978
|
||||||
Node: Lexical Tie-ins176541
|
Node: Stack Overflow173364
|
||||||
Node: Tie-in Recovery178055
|
Node: Error Recovery174737
|
||||||
Node: Debugging180227
|
Node: Context Dependency179873
|
||||||
Node: Invocation183478
|
Node: Semantic Tokens180721
|
||||||
Node: Bison Options184730
|
Node: Lexical Tie-ins183738
|
||||||
Node: Environment Variables188164
|
Node: Tie-in Recovery185286
|
||||||
Node: Option Cross Key189012
|
Node: Debugging187458
|
||||||
Node: VMS Invocation189856
|
Node: Invocation190759
|
||||||
Node: Table of Symbols190640
|
Node: Bison Options192011
|
||||||
Node: Glossary198241
|
Node: Environment Variables195561
|
||||||
Node: Copying This Manual204545
|
Node: Option Cross Key196409
|
||||||
Node: GNU Free Documentation License204754
|
Node: VMS Invocation197287
|
||||||
Node: Index224619
|
Node: Table of Symbols198071
|
||||||
|
Node: Glossary206039
|
||||||
|
Node: Copying This Manual212343
|
||||||
|
Node: GNU Free Documentation License212552
|
||||||
|
Node: Index232417
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
|||||||
+35
-24
@@ -1,5 +1,5 @@
|
|||||||
This is bison.info, produced by makeinfo version 4.0b from
|
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
|
||||||
bison.texinfo.
|
à partir bison.texinfo.
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
@@ -29,9 +29,13 @@ included in translations approved by the Free Software Foundation
|
|||||||
instead of in the original English.
|
instead of in the original English.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
|
File: bison.info, Node: Top, Next: Introduction, Up: (dir)
|
||||||
|
|
||||||
This manual documents version 1.28c of Bison.
|
Bison
|
||||||
|
*****
|
||||||
|
|
||||||
|
This manual documents version 1.30e of Bison, updated 12 November
|
||||||
|
2001.
|
||||||
|
|
||||||
* Menu:
|
* Menu:
|
||||||
|
|
||||||
@@ -58,7 +62,6 @@ Reference sections:
|
|||||||
* Copying This Manual:: License for copying this manual.
|
* Copying This Manual:: License for copying this manual.
|
||||||
* Index:: Cross-references to the text.
|
* Index:: Cross-references to the text.
|
||||||
|
|
||||||
--- The Detailed Node Listing ---
|
|
||||||
|
|
||||||
The Concepts of Bison
|
The Concepts of Bison
|
||||||
|
|
||||||
@@ -81,13 +84,14 @@ Examples
|
|||||||
* Infix Calc:: Infix (algebraic) notation calculator.
|
* Infix Calc:: Infix (algebraic) notation calculator.
|
||||||
Operator precedence is introduced.
|
Operator precedence is introduced.
|
||||||
* Simple Error Recovery:: Continuing after syntax errors.
|
* Simple Error Recovery:: Continuing after syntax errors.
|
||||||
|
* Location Tracking Calc:: Demonstrating the use of @N and @$.
|
||||||
* Multi-function Calc:: Calculator with memory and trig functions.
|
* Multi-function Calc:: Calculator with memory and trig functions.
|
||||||
It uses multiple data-types for semantic values.
|
It uses multiple data-types for semantic values.
|
||||||
* Exercises:: Ideas for improving the multi-function calculator.
|
* Exercises:: Ideas for improving the multi-function calculator.
|
||||||
|
|
||||||
Reverse Polish Notation Calculator
|
Reverse Polish Notation Calculator
|
||||||
|
|
||||||
* Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
|
* Decls: Rpcalc Decls. Bison and C declarations for rpcalc.
|
||||||
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
|
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
|
||||||
* Lexer: Rpcalc Lexer. The lexical analyzer.
|
* Lexer: Rpcalc Lexer. The lexical analyzer.
|
||||||
* Main: Rpcalc Main. The controlling function.
|
* Main: Rpcalc Main. The controlling function.
|
||||||
@@ -101,6 +105,12 @@ Grammar Rules for `rpcalc'
|
|||||||
* Rpcalc Line::
|
* Rpcalc Line::
|
||||||
* Rpcalc Expr::
|
* Rpcalc Expr::
|
||||||
|
|
||||||
|
Location Tracking Calculator: `ltcalc'
|
||||||
|
|
||||||
|
* Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
|
||||||
|
* Rules: Ltcalc Rules. Grammar rules for ltcalc, with explanations.
|
||||||
|
* Lexer: Ltcalc Lexer. The lexical analyzer.
|
||||||
|
|
||||||
Multi-Function Calculator: `mfcalc'
|
Multi-Function Calculator: `mfcalc'
|
||||||
|
|
||||||
* Decl: Mfcalc Decl. Bison declarations for multi-function calculator.
|
* Decl: Mfcalc Decl. Bison declarations for multi-function calculator.
|
||||||
@@ -119,10 +129,10 @@ Bison Grammar Files
|
|||||||
|
|
||||||
Outline of a Bison Grammar
|
Outline of a Bison Grammar
|
||||||
|
|
||||||
* Prologue:: Syntax and usage of the prologue (declarations section).
|
* C Declarations:: Syntax and usage of the C declarations section.
|
||||||
* Bison Declarations:: Syntax and usage of the Bison declarations section.
|
* Bison Declarations:: Syntax and usage of the Bison declarations section.
|
||||||
* Grammar Rules:: Syntax and usage of the grammar rules section.
|
* Grammar Rules:: Syntax and usage of the grammar rules section.
|
||||||
* Epilogue:: Syntax and usage of the epilogue (additional code section).
|
* C Code:: Syntax and usage of the additional C code section.
|
||||||
|
|
||||||
Defining Language Semantics
|
Defining Language Semantics
|
||||||
|
|
||||||
@@ -228,7 +238,7 @@ Bison in detail.
|
|||||||
it Yacc-compatible. Wilfred Hansen of Carnegie Mellon University added
|
it Yacc-compatible. Wilfred Hansen of Carnegie Mellon University added
|
||||||
multi-character string literals and other features.
|
multi-character string literals and other features.
|
||||||
|
|
||||||
This edition corresponds to version 1.28c of Bison.
|
This edition corresponds to version 1.30e of Bison.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Conditions, Next: Copying, Prev: Introduction, Up: Top
|
File: bison.info, Node: Conditions, Next: Copying, Prev: Introduction, Up: Top
|
||||||
@@ -699,12 +709,11 @@ matter of lexicography, not grammar.)
|
|||||||
Here is a simple C function subdivided into tokens:
|
Here is a simple C function subdivided into tokens:
|
||||||
|
|
||||||
int /* keyword `int' */
|
int /* keyword `int' */
|
||||||
square (x) /* identifier, open-paren, */
|
square (int x) /* identifier, open-paren, identifier,
|
||||||
/* identifier, close-paren */
|
identifier, close-paren */
|
||||||
int x; /* keyword `int', identifier, semicolon */
|
|
||||||
{ /* open-brace */
|
{ /* open-brace */
|
||||||
return x * x; /* keyword `return', identifier, */
|
return x * x; /* keyword `return', identifier, asterisk,
|
||||||
/* asterisk, identifier, semicolon */
|
identifier, semicolon */
|
||||||
} /* close-brace */
|
} /* close-brace */
|
||||||
|
|
||||||
The syntactic groupings of C include the expression, the statement,
|
The syntactic groupings of C include the expression, the statement,
|
||||||
@@ -981,7 +990,7 @@ The Overall Layout of a Bison Grammar
|
|||||||
general form of a Bison grammar file is as follows:
|
general form of a Bison grammar file is as follows:
|
||||||
|
|
||||||
%{
|
%{
|
||||||
PROLOGUE (DECLARATIONS)
|
C DECLARATIONS
|
||||||
%}
|
%}
|
||||||
|
|
||||||
BISON DECLARATIONS
|
BISON DECLARATIONS
|
||||||
@@ -989,14 +998,15 @@ general form of a Bison grammar file is as follows:
|
|||||||
%%
|
%%
|
||||||
GRAMMAR RULES
|
GRAMMAR RULES
|
||||||
%%
|
%%
|
||||||
EPILOGUE (ADDITIONAL CODE)
|
ADDITIONAL C CODE
|
||||||
|
|
||||||
The `%%', `%{' and `%}' are punctuation that appears in every Bison
|
The `%%', `%{' and `%}' are punctuation that appears in every Bison
|
||||||
grammar file to separate the sections.
|
grammar file to separate the sections.
|
||||||
|
|
||||||
The prologue may define types and variables used in the actions. You
|
The C declarations may define types and variables used in the
|
||||||
can also use preprocessor commands to define macros used there, and use
|
actions. You can also use preprocessor commands to define macros used
|
||||||
`#include' to include header files that do any of these things.
|
there, and use `#include' to include header files that do any of these
|
||||||
|
things.
|
||||||
|
|
||||||
The Bison declarations declare the names of the terminal and
|
The Bison declarations declare the names of the terminal and
|
||||||
nonterminal symbols, and may also describe operator precedence and the
|
nonterminal symbols, and may also describe operator precedence and the
|
||||||
@@ -1005,10 +1015,10 @@ data types of semantic values of various symbols.
|
|||||||
The grammar rules define how to construct each nonterminal symbol
|
The grammar rules define how to construct each nonterminal symbol
|
||||||
from its parts.
|
from its parts.
|
||||||
|
|
||||||
The epilogue can contain any code you want to use. Often the
|
The additional C code can contain any C code you want to use. Often
|
||||||
definition of the lexical analyzer `yylex' goes here, plus subroutines
|
the definition of the lexical analyzer `yylex' goes here, plus
|
||||||
called by the actions in the grammar rules. In a simple program, all
|
subroutines called by the actions in the grammar rules. In a simple
|
||||||
the rest of the program can go here.
|
program, all the rest of the program can go here.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Examples, Next: Grammar File, Prev: Concepts, Up: Top
|
File: bison.info, Node: Examples, Next: Grammar File, Prev: Concepts, Up: Top
|
||||||
@@ -1033,6 +1043,7 @@ the Info file and into a source file to try them.
|
|||||||
* Infix Calc:: Infix (algebraic) notation calculator.
|
* Infix Calc:: Infix (algebraic) notation calculator.
|
||||||
Operator precedence is introduced.
|
Operator precedence is introduced.
|
||||||
* Simple Error Recovery:: Continuing after syntax errors.
|
* Simple Error Recovery:: Continuing after syntax errors.
|
||||||
|
* Location Tracking Calc:: Demonstrating the use of @N and @$.
|
||||||
* Multi-function Calc:: Calculator with memory and trig functions.
|
* Multi-function Calc:: Calculator with memory and trig functions.
|
||||||
It uses multiple data-types for semantic values.
|
It uses multiple data-types for semantic values.
|
||||||
* Exercises:: Ideas for improving the multi-function calculator.
|
* Exercises:: Ideas for improving the multi-function calculator.
|
||||||
@@ -1054,7 +1065,7 @@ extension is a convention used for Bison input files.
|
|||||||
|
|
||||||
* Menu:
|
* Menu:
|
||||||
|
|
||||||
* Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
|
* Decls: Rpcalc Decls. Bison and C declarations for rpcalc.
|
||||||
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
|
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
|
||||||
* Lexer: Rpcalc Lexer. The lexical analyzer.
|
* Lexer: Rpcalc Lexer. The lexical analyzer.
|
||||||
* Main: Rpcalc Main. The controlling function.
|
* Main: Rpcalc Main. The controlling function.
|
||||||
|
|||||||
+223
-186
@@ -1,5 +1,5 @@
|
|||||||
This is bison.info, produced by makeinfo version 4.0b from
|
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
|
||||||
bison.texinfo.
|
à partir bison.texinfo.
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
@@ -48,8 +48,8 @@ calculator. As in C, comments are placed between `/*...*/'.
|
|||||||
|
|
||||||
%% /* Grammar rules and actions follow */
|
%% /* Grammar rules and actions follow */
|
||||||
|
|
||||||
The declarations section (*note The prologue: Prologue.) contains two
|
The C declarations section (*note The C Declarations Section: C
|
||||||
preprocessor directives.
|
Declarations.) contains two preprocessor directives.
|
||||||
|
|
||||||
The `#define' directive defines the macro `YYSTYPE', thus specifying
|
The `#define' directive defines the macro `YYSTYPE', thus specifying
|
||||||
the C data type for semantic values of both tokens and groupings (*note
|
the C data type for semantic values of both tokens and groupings (*note
|
||||||
@@ -359,8 +359,8 @@ Running Bison to Make the Parser
|
|||||||
arrange all the source code in one or more source files. For such a
|
arrange all the source code in one or more source files. For such a
|
||||||
simple example, the easiest thing is to put everything in one file. The
|
simple example, the easiest thing is to put everything in one file. The
|
||||||
definitions of `yylex', `yyerror' and `main' go at the end, in the
|
definitions of `yylex', `yyerror' and `main' go at the end, in the
|
||||||
epilogue of the file (*note The Overall Layout of a Bison Grammar:
|
"additional C code" section of the file (*note The Overall Layout of a
|
||||||
Grammar Layout.).
|
Bison Grammar: Grammar Layout.).
|
||||||
|
|
||||||
For a large project, you would probably have several source files,
|
For a large project, you would probably have several source files,
|
||||||
and use `make' to arrange to recompile them.
|
and use `make' to arrange to recompile them.
|
||||||
@@ -385,21 +385,21 @@ Compiling the Parser File
|
|||||||
Here is how to compile and run the parser file:
|
Here is how to compile and run the parser file:
|
||||||
|
|
||||||
# List files in current directory.
|
# List files in current directory.
|
||||||
% ls
|
$ ls
|
||||||
rpcalc.tab.c rpcalc.y
|
rpcalc.tab.c rpcalc.y
|
||||||
|
|
||||||
# Compile the Bison parser.
|
# Compile the Bison parser.
|
||||||
# `-lm' tells compiler to search math library for `pow'.
|
# `-lm' tells compiler to search math library for `pow'.
|
||||||
% cc rpcalc.tab.c -lm -o rpcalc
|
$ cc rpcalc.tab.c -lm -o rpcalc
|
||||||
|
|
||||||
# List files again.
|
# List files again.
|
||||||
% ls
|
$ ls
|
||||||
rpcalc rpcalc.tab.c rpcalc.y
|
rpcalc rpcalc.tab.c rpcalc.y
|
||||||
|
|
||||||
The file `rpcalc' now contains the executable code. Here is an
|
The file `rpcalc' now contains the executable code. Here is an
|
||||||
example session using `rpcalc'.
|
example session using `rpcalc'.
|
||||||
|
|
||||||
% rpcalc
|
$ rpcalc
|
||||||
4 9 +
|
4 9 +
|
||||||
13
|
13
|
||||||
3 7 + 3 4 5 *+-
|
3 7 + 3 4 5 *+-
|
||||||
@@ -411,7 +411,7 @@ example session using `rpcalc'.
|
|||||||
3 4 ^ Exponentiation
|
3 4 ^ Exponentiation
|
||||||
81
|
81
|
||||||
^D End-of-file indicator
|
^D End-of-file indicator
|
||||||
%
|
$
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Infix Calc, Next: Simple Error Recovery, Prev: RPN Calc, Up: Examples
|
File: bison.info, Node: Infix Calc, Next: Simple Error Recovery, Prev: RPN Calc, Up: Examples
|
||||||
@@ -485,7 +485,7 @@ Precedence.
|
|||||||
|
|
||||||
Here is a sample run of `calc.y':
|
Here is a sample run of `calc.y':
|
||||||
|
|
||||||
% calc
|
$ calc
|
||||||
4 + 4.5 - (34/(8*3+-3))
|
4 + 4.5 - (34/(8*3+-3))
|
||||||
6.880952381
|
6.880952381
|
||||||
-56 + 2
|
-56 + 2
|
||||||
@@ -494,7 +494,7 @@ Precedence.
|
|||||||
9
|
9
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Simple Error Recovery, Next: Multi-function Calc, Prev: Infix Calc, Up: Examples
|
File: bison.info, Node: Simple Error Recovery, Next: Location Tracking Calc, Prev: Infix Calc, Up: Examples
|
||||||
|
|
||||||
Simple Error Recovery
|
Simple Error Recovery
|
||||||
=====================
|
=====================
|
||||||
@@ -533,7 +533,188 @@ the current line of input. We won't discuss this issue further because
|
|||||||
it is not specific to Bison programs.
|
it is not specific to Bison programs.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Multi-function Calc, Next: Exercises, Prev: Simple Error Recovery, Up: Examples
|
File: bison.info, Node: Location Tracking Calc, Next: Multi-function Calc, Prev: Simple Error Recovery, Up: Examples
|
||||||
|
|
||||||
|
Location Tracking Calculator: `ltcalc'
|
||||||
|
======================================
|
||||||
|
|
||||||
|
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.
|
||||||
|
* Rules: Ltcalc Rules. Grammar rules for ltcalc, with explanations.
|
||||||
|
* Lexer: Ltcalc Lexer. The lexical analyzer.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Ltcalc Decls, Next: Ltcalc Rules, Up: Location Tracking Calc
|
||||||
|
|
||||||
|
Declarations for `ltcalc'
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
The C and Bison declarations for the location tracking calculator are
|
||||||
|
the same as the declarations for the infix notation calculator.
|
||||||
|
|
||||||
|
/* Location tracking calculator. */
|
||||||
|
|
||||||
|
%{
|
||||||
|
#define YYSTYPE int
|
||||||
|
#include <math.h>
|
||||||
|
%}
|
||||||
|
|
||||||
|
/* Bison declarations. */
|
||||||
|
%token NUM
|
||||||
|
|
||||||
|
%left '-' '+'
|
||||||
|
%left '*' '/'
|
||||||
|
%left NEG
|
||||||
|
%right '^'
|
||||||
|
|
||||||
|
%% /* Grammar follows */
|
||||||
|
|
||||||
|
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 (*note Data Types of Locations: Location Type.), which is a
|
||||||
|
four member structure with the following integer fields: `first_line',
|
||||||
|
`first_column', `last_line' and `last_column'.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Ltcalc Rules, Next: Ltcalc Lexer, Prev: Ltcalc Decls, Up: Location Tracking Calc
|
||||||
|
|
||||||
|
Grammar Rules for `ltcalc'
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
input : /* empty */
|
||||||
|
| input line
|
||||||
|
;
|
||||||
|
|
||||||
|
line : '\n'
|
||||||
|
| exp '\n' { printf ("%d\n", $1); }
|
||||||
|
;
|
||||||
|
|
||||||
|
exp : NUM { $$ = $1; }
|
||||||
|
| exp '+' exp { $$ = $1 + $3; }
|
||||||
|
| exp '-' exp { $$ = $1 - $3; }
|
||||||
|
| exp '*' exp { $$ = $1 * $3; }
|
||||||
|
| exp '/' exp
|
||||||
|
{
|
||||||
|
if ($3)
|
||||||
|
$$ = $1 / $3;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$$ = 1;
|
||||||
|
fprintf (stderr, "%d.%d-%d.%d: division by zero",
|
||||||
|
@3.first_line, @3.first_column,
|
||||||
|
@3.last_line, @3.last_column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
| '-' exp %preg NEG { $$ = -$2; }
|
||||||
|
| exp '^' exp { $$ = pow ($1, $3); }
|
||||||
|
| '(' exp ')' { $$ = $2; }
|
||||||
|
|
||||||
|
This code shows how to reach locations inside of semantic actions, by
|
||||||
|
using the pseudo-variables `@N' for rule components, and the
|
||||||
|
pseudo-variable `@$' for groupings.
|
||||||
|
|
||||||
|
We don't need to assign a value to `@$': the output parser does it
|
||||||
|
automatically. By default, before executing the C code of each action,
|
||||||
|
`@$' is set to range from the beginning of `@1' to the end of `@N', for
|
||||||
|
a rule with N components. This behavior can be redefined (*note
|
||||||
|
Default Action for Locations: Location Default Action.), and for very
|
||||||
|
specific rules, `@$' can be computed by hand.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Ltcalc Lexer, Prev: Ltcalc Rules, Up: Location Tracking Calc
|
||||||
|
|
||||||
|
The `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 the token locations, as it already does for
|
||||||
|
semantic values.
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
int
|
||||||
|
yylex (void)
|
||||||
|
{
|
||||||
|
int c;
|
||||||
|
|
||||||
|
/* skip white space */
|
||||||
|
while ((c = getchar ()) == ' ' || c == '\t')
|
||||||
|
++yylloc.last_column;
|
||||||
|
|
||||||
|
/* step */
|
||||||
|
yylloc.first_line = yylloc.last_line;
|
||||||
|
yylloc.first_column = yylloc.last_column;
|
||||||
|
|
||||||
|
/* process numbers */
|
||||||
|
if (isdigit (c))
|
||||||
|
{
|
||||||
|
yylval = c - '0';
|
||||||
|
++yylloc.last_column;
|
||||||
|
while (isdigit (c = getchar ()))
|
||||||
|
{
|
||||||
|
++yylloc.last_column;
|
||||||
|
yylval = yylval * 10 + c - '0';
|
||||||
|
}
|
||||||
|
ungetc (c, stdin);
|
||||||
|
return NUM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return end-of-file */
|
||||||
|
if (c == EOF)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* return single chars and update location */
|
||||||
|
if (c == '\n')
|
||||||
|
{
|
||||||
|
++yylloc.last_line;
|
||||||
|
yylloc.last_column = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
++yylloc.last_column;
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 `yylloc', the global variable (of type
|
||||||
|
`YYLTYPE') containing the token's location.
|
||||||
|
|
||||||
|
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 `yylloc', for example in the
|
||||||
|
controlling function:
|
||||||
|
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
yylloc.first_line = yylloc.last_line = 1;
|
||||||
|
yylloc.first_column = yylloc.last_column = 0;
|
||||||
|
return yyparse ();
|
||||||
|
}
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Multi-function Calc, Next: Exercises, Prev: Location Tracking Calc, Up: Examples
|
||||||
|
|
||||||
Multi-Function Calculator: `mfcalc'
|
Multi-Function Calculator: `mfcalc'
|
||||||
===================================
|
===================================
|
||||||
@@ -556,7 +737,7 @@ At the same time, we will add memory to the calculator, by allowing you
|
|||||||
to create named variables, store values in them, and use them later.
|
to create named variables, store values in them, and use them later.
|
||||||
Here is a sample session with the multi-function calculator:
|
Here is a sample session with the multi-function calculator:
|
||||||
|
|
||||||
% mfcalc
|
$ mfcalc
|
||||||
pi = 3.141592653589
|
pi = 3.141592653589
|
||||||
3.1415926536
|
3.1415926536
|
||||||
sin(pi)
|
sin(pi)
|
||||||
@@ -569,7 +750,7 @@ Here is a sample session with the multi-function calculator:
|
|||||||
0.8329091229
|
0.8329091229
|
||||||
exp(ln(beta1))
|
exp(ln(beta1))
|
||||||
2.3000000000
|
2.3000000000
|
||||||
%
|
$
|
||||||
|
|
||||||
Note that multiple assignment and nested function calls are
|
Note that multiple assignment and nested function calls are
|
||||||
permitted.
|
permitted.
|
||||||
@@ -926,7 +1107,7 @@ Outline of a Bison Grammar
|
|||||||
appropriate delimiters:
|
appropriate delimiters:
|
||||||
|
|
||||||
%{
|
%{
|
||||||
PROLOGUE
|
C DECLARATIONS
|
||||||
%}
|
%}
|
||||||
|
|
||||||
BISON DECLARATIONS
|
BISON DECLARATIONS
|
||||||
@@ -935,33 +1116,33 @@ appropriate delimiters:
|
|||||||
GRAMMAR RULES
|
GRAMMAR RULES
|
||||||
%%
|
%%
|
||||||
|
|
||||||
EPILOGUE
|
ADDITIONAL C CODE
|
||||||
|
|
||||||
Comments enclosed in `/* ... */' may appear in any of the sections.
|
Comments enclosed in `/* ... */' may appear in any of the sections.
|
||||||
|
|
||||||
* Menu:
|
* Menu:
|
||||||
|
|
||||||
* Prologue:: Syntax and usage of the prologue.
|
* C Declarations:: Syntax and usage of the C declarations section.
|
||||||
* Bison Declarations:: Syntax and usage of the Bison declarations section.
|
* Bison Declarations:: Syntax and usage of the Bison declarations section.
|
||||||
* Grammar Rules:: Syntax and usage of the grammar rules section.
|
* Grammar Rules:: Syntax and usage of the grammar rules section.
|
||||||
* Epilogue:: Syntax and usage of the epilogue.
|
* C Code:: Syntax and usage of the additional C code section.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Prologue, Next: Bison Declarations, Up: Grammar Outline
|
File: bison.info, Node: C Declarations, Next: Bison Declarations, Up: Grammar Outline
|
||||||
|
|
||||||
The prologue
|
The C Declarations Section
|
||||||
------------
|
--------------------------
|
||||||
|
|
||||||
The PROLOGUE section contains macro definitions and declarations of
|
The C DECLARATIONS section contains macro definitions and
|
||||||
functions and variables that are used in the actions in the grammar
|
declarations of functions and variables that are used in the actions in
|
||||||
rules. These are copied to the beginning of the parser file so that
|
the grammar rules. These are copied to the beginning of the parser
|
||||||
they precede the definition of `yyparse'. You can use `#include' to
|
file so that they precede the definition of `yyparse'. You can use
|
||||||
get the declarations from a header file. If you don't need any C
|
`#include' to get the declarations from a header file. If you don't
|
||||||
declarations, you may omit the `%{' and `%}' delimiters that bracket
|
need any C declarations, you may omit the `%{' and `%}' delimiters that
|
||||||
this section.
|
bracket this section.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Bison Declarations, Next: Grammar Rules, Prev: Prologue, Up: Grammar Outline
|
File: bison.info, Node: Bison Declarations, Next: Grammar Rules, Prev: C Declarations, Up: Grammar Outline
|
||||||
|
|
||||||
The Bison Declarations Section
|
The Bison Declarations Section
|
||||||
------------------------------
|
------------------------------
|
||||||
@@ -972,7 +1153,7 @@ some simple grammars you may not need any declarations. *Note Bison
|
|||||||
Declarations: Declarations.
|
Declarations: Declarations.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Grammar Rules, Next: Epilogue, Prev: Bison Declarations, Up: Grammar Outline
|
File: bison.info, Node: Grammar Rules, Next: C Code, Prev: Bison Declarations, Up: Grammar Outline
|
||||||
|
|
||||||
The Grammar Rules Section
|
The Grammar Rules Section
|
||||||
-------------------------
|
-------------------------
|
||||||
@@ -985,17 +1166,17 @@ rules, and nothing else. *Note Syntax of Grammar Rules: Rules.
|
|||||||
the first thing in the file.
|
the first thing in the file.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Epilogue, Prev: Grammar Rules, Up: Grammar Outline
|
File: bison.info, Node: C Code, Prev: Grammar Rules, Up: Grammar Outline
|
||||||
|
|
||||||
The epilogue
|
The Additional C Code Section
|
||||||
------------
|
-----------------------------
|
||||||
|
|
||||||
The EPILOGUE is copied verbatim to the end of the parser file, just
|
The ADDITIONAL C CODE section is copied verbatim to the end of the
|
||||||
as the PROLOGUE is copied to the beginning. This is the most convenient
|
parser file, just as the C DECLARATIONS section is copied to the
|
||||||
place to put anything that you want to have in the parser file but
|
beginning. This is the most convenient place to put anything that you
|
||||||
which need not come before the definition of `yyparse'. For example,
|
want to have in the parser file but which need not come before the
|
||||||
the definitions of `yylex' and `yyerror' often go here. *Note Parser
|
definition of `yyparse'. For example, the definitions of `yylex' and
|
||||||
C-Language Interface: Interface.
|
`yyerror' often go here. *Note Parser C-Language Interface: Interface.
|
||||||
|
|
||||||
If the last section is empty, you may omit the `%%' that separates it
|
If the last section is empty, you may omit the `%%' that separates it
|
||||||
from the grammar rules.
|
from the grammar rules.
|
||||||
@@ -1003,7 +1184,7 @@ from the grammar rules.
|
|||||||
The Bison parser itself contains many static variables whose names
|
The Bison parser itself contains many static variables whose names
|
||||||
start with `yy' and many macros whose names start with `YY'. It is a
|
start with `yy' and many macros whose names start with `YY'. It is a
|
||||||
good idea to avoid using any such names (except those documented in this
|
good idea to avoid using any such names (except those documented in this
|
||||||
manual) in the epilogue of the grammar file.
|
manual) in the additional C code section of the grammar file.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Symbols, Next: Rules, Prev: Grammar Outline, Up: Grammar File
|
File: bison.info, Node: Symbols, Next: Rules, Prev: Grammar Outline, Up: Grammar File
|
||||||
@@ -1240,147 +1421,3 @@ associated with X and Y.
|
|||||||
This says when, why and how to use the exceptional
|
This says when, why and how to use the exceptional
|
||||||
action in the middle of a rule.
|
action in the middle of a rule.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Value Type, Next: Multiple Types, Up: Semantics
|
|
||||||
|
|
||||||
Data Types of Semantic Values
|
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
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 (*note Reverse Polish Notation
|
|
||||||
Calculator: RPN Calc.).
|
|
||||||
|
|
||||||
Bison's default is to use type `int' for all semantic values. To
|
|
||||||
specify some other type, define `YYSTYPE' as a macro, like this:
|
|
||||||
|
|
||||||
#define YYSTYPE double
|
|
||||||
|
|
||||||
This macro definition must go in the prologue of the grammar file
|
|
||||||
(*note Outline of a Bison Grammar: Grammar Outline.).
|
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Multiple Types, Next: Actions, Prev: Value Type, Up: Semantics
|
|
||||||
|
|
||||||
More Than One Value Type
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
In most programs, you will need different data types for different
|
|
||||||
kinds of tokens and groupings. For example, a numeric constant may
|
|
||||||
need type `int' or `long', while a string constant needs type `char *',
|
|
||||||
and an identifier might need a pointer to an entry in the symbol table.
|
|
||||||
|
|
||||||
To use more than one data type for semantic values in one parser,
|
|
||||||
Bison requires you to do two things:
|
|
||||||
|
|
||||||
* Specify the entire collection of possible data types, with the
|
|
||||||
`%union' Bison declaration (*note The Collection of Value Types:
|
|
||||||
Union Decl.).
|
|
||||||
|
|
||||||
* Choose one of those types for each symbol (terminal or
|
|
||||||
nonterminal) for which semantic values are used. This is done for
|
|
||||||
tokens with the `%token' Bison declaration (*note Token Type
|
|
||||||
Names: Token Decl.) and for groupings with the `%type' Bison
|
|
||||||
declaration (*note Nonterminal Symbols: Type Decl.).
|
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Actions, Next: Action Types, Prev: Multiple Types, Up: Semantics
|
|
||||||
|
|
||||||
Actions
|
|
||||||
-------
|
|
||||||
|
|
||||||
An action accompanies a syntactic rule and contains C code to be
|
|
||||||
executed each time an instance of that rule is recognized. The task of
|
|
||||||
most actions is to compute a semantic value for the grouping built by
|
|
||||||
the rule from the semantic values associated with tokens or smaller
|
|
||||||
groupings.
|
|
||||||
|
|
||||||
An action consists of C statements surrounded by braces, much like a
|
|
||||||
compound statement in C. It can be placed at any position in the rule;
|
|
||||||
it is executed at that position. Most rules have just one action at
|
|
||||||
the end of the rule, following all the components. Actions in the
|
|
||||||
middle of a rule are tricky and used only for special purposes (*note
|
|
||||||
Actions in Mid-Rule: Mid-Rule Actions.).
|
|
||||||
|
|
||||||
The C code in an action can refer to the semantic values of the
|
|
||||||
components matched by the rule with the construct `$N', which stands for
|
|
||||||
the value of the Nth component. The semantic value for the grouping
|
|
||||||
being constructed is `$$'. (Bison translates both of these constructs
|
|
||||||
into array element references when it copies the actions into the parser
|
|
||||||
file.)
|
|
||||||
|
|
||||||
Here is a typical example:
|
|
||||||
|
|
||||||
exp: ...
|
|
||||||
| exp '+' exp
|
|
||||||
{ $$ = $1 + $3; }
|
|
||||||
|
|
||||||
This rule constructs an `exp' from two smaller `exp' groupings
|
|
||||||
connected by a plus-sign token. In the action, `$1' and `$3' refer to
|
|
||||||
the semantic values of the two component `exp' groupings, which are the
|
|
||||||
first and third symbols on the right hand side of the rule. The sum is
|
|
||||||
stored into `$$' so that it becomes the semantic value of the
|
|
||||||
addition-expression just recognized by the rule. If there were a
|
|
||||||
useful semantic value associated with the `+' token, it could be
|
|
||||||
referred to as `$2'.
|
|
||||||
|
|
||||||
If you don't specify an action for a rule, Bison supplies a default:
|
|
||||||
`$$ = $1'. Thus, the value of the first symbol in the rule becomes the
|
|
||||||
value of the whole rule. Of course, the default rule is valid only if
|
|
||||||
the two data types match. There is no meaningful default action for an
|
|
||||||
empty rule; every empty rule must have an explicit action unless the
|
|
||||||
rule's value does not matter.
|
|
||||||
|
|
||||||
`$N' with N zero or negative is allowed for reference to tokens and
|
|
||||||
groupings on the stack _before_ those that match the current rule.
|
|
||||||
This is a very risky practice, and to use it reliably you must be
|
|
||||||
certain of the context in which the rule is applied. Here is a case in
|
|
||||||
which you can use this reliably:
|
|
||||||
|
|
||||||
foo: expr bar '+' expr { ... }
|
|
||||||
| expr bar '-' expr { ... }
|
|
||||||
;
|
|
||||||
|
|
||||||
bar: /* empty */
|
|
||||||
{ previous_expr = $0; }
|
|
||||||
;
|
|
||||||
|
|
||||||
As long as `bar' is used only in the fashion shown here, `$0' always
|
|
||||||
refers to the `expr' which precedes `bar' in the definition of `foo'.
|
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Action Types, Next: Mid-Rule Actions, Prev: Actions, Up: Semantics
|
|
||||||
|
|
||||||
Data Types of Values in Actions
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
If you have chosen a single data type for semantic values, the `$$'
|
|
||||||
and `$N' constructs always have that data type.
|
|
||||||
|
|
||||||
If you have used `%union' to specify a variety of data types, then
|
|
||||||
you must declare a choice among these types for each terminal or
|
|
||||||
nonterminal symbol that can have a semantic value. Then each time you
|
|
||||||
use `$$' or `$N', its data type is determined by which symbol it refers
|
|
||||||
to in the rule. In this example,
|
|
||||||
|
|
||||||
exp: ...
|
|
||||||
| exp '+' exp
|
|
||||||
{ $$ = $1 + $3; }
|
|
||||||
|
|
||||||
`$1' and `$3' refer to instances of `exp', so they all have the data
|
|
||||||
type declared for the nonterminal symbol `exp'. If `$2' were used, it
|
|
||||||
would have the data type declared for the terminal symbol `'+'',
|
|
||||||
whatever that might be.
|
|
||||||
|
|
||||||
Alternatively, you can specify the data type when you refer to the
|
|
||||||
value, by inserting `<TYPE>' after the `$' at the beginning of the
|
|
||||||
reference. For example, if you have defined types as shown here:
|
|
||||||
|
|
||||||
%union {
|
|
||||||
int itype;
|
|
||||||
double dtype;
|
|
||||||
}
|
|
||||||
|
|
||||||
then you can write `$<itype>1' to refer to the first subunit of the
|
|
||||||
rule as an integer, or `$<dtype>1' to refer to it as a double.
|
|
||||||
|
|
||||||
|
|||||||
+219
-251
@@ -1,5 +1,5 @@
|
|||||||
This is bison.info, produced by makeinfo version 4.0b from
|
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
|
||||||
bison.texinfo.
|
à partir bison.texinfo.
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
@@ -28,6 +28,150 @@ License", "Conditions for Using Bison" and this permission notice may be
|
|||||||
included in translations approved by the Free Software Foundation
|
included in translations approved by the Free Software Foundation
|
||||||
instead of in the original English.
|
instead of in the original English.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Value Type, Next: Multiple Types, Up: Semantics
|
||||||
|
|
||||||
|
Data Types of Semantic Values
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
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 (*note Reverse Polish Notation
|
||||||
|
Calculator: RPN Calc.).
|
||||||
|
|
||||||
|
Bison's default is to use type `int' for all semantic values. To
|
||||||
|
specify some other type, define `YYSTYPE' as a macro, like this:
|
||||||
|
|
||||||
|
#define YYSTYPE double
|
||||||
|
|
||||||
|
This macro definition must go in the C declarations section of the
|
||||||
|
grammar file (*note Outline of a Bison Grammar: Grammar Outline.).
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Multiple Types, Next: Actions, Prev: Value Type, Up: Semantics
|
||||||
|
|
||||||
|
More Than One Value Type
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
In most programs, you will need different data types for different
|
||||||
|
kinds of tokens and groupings. For example, a numeric constant may
|
||||||
|
need type `int' or `long', while a string constant needs type `char *',
|
||||||
|
and an identifier might need a pointer to an entry in the symbol table.
|
||||||
|
|
||||||
|
To use more than one data type for semantic values in one parser,
|
||||||
|
Bison requires you to do two things:
|
||||||
|
|
||||||
|
* Specify the entire collection of possible data types, with the
|
||||||
|
`%union' Bison declaration (*note The Collection of Value Types:
|
||||||
|
Union Decl.).
|
||||||
|
|
||||||
|
* Choose one of those types for each symbol (terminal or
|
||||||
|
nonterminal) for which semantic values are used. This is done for
|
||||||
|
tokens with the `%token' Bison declaration (*note Token Type
|
||||||
|
Names: Token Decl.) and for groupings with the `%type' Bison
|
||||||
|
declaration (*note Nonterminal Symbols: Type Decl.).
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Actions, Next: Action Types, Prev: Multiple Types, Up: Semantics
|
||||||
|
|
||||||
|
Actions
|
||||||
|
-------
|
||||||
|
|
||||||
|
An action accompanies a syntactic rule and contains C code to be
|
||||||
|
executed each time an instance of that rule is recognized. The task of
|
||||||
|
most actions is to compute a semantic value for the grouping built by
|
||||||
|
the rule from the semantic values associated with tokens or smaller
|
||||||
|
groupings.
|
||||||
|
|
||||||
|
An action consists of C statements surrounded by braces, much like a
|
||||||
|
compound statement in C. It can be placed at any position in the rule;
|
||||||
|
it is executed at that position. Most rules have just one action at
|
||||||
|
the end of the rule, following all the components. Actions in the
|
||||||
|
middle of a rule are tricky and used only for special purposes (*note
|
||||||
|
Actions in Mid-Rule: Mid-Rule Actions.).
|
||||||
|
|
||||||
|
The C code in an action can refer to the semantic values of the
|
||||||
|
components matched by the rule with the construct `$N', which stands for
|
||||||
|
the value of the Nth component. The semantic value for the grouping
|
||||||
|
being constructed is `$$'. (Bison translates both of these constructs
|
||||||
|
into array element references when it copies the actions into the parser
|
||||||
|
file.)
|
||||||
|
|
||||||
|
Here is a typical example:
|
||||||
|
|
||||||
|
exp: ...
|
||||||
|
| exp '+' exp
|
||||||
|
{ $$ = $1 + $3; }
|
||||||
|
|
||||||
|
This rule constructs an `exp' from two smaller `exp' groupings
|
||||||
|
connected by a plus-sign token. In the action, `$1' and `$3' refer to
|
||||||
|
the semantic values of the two component `exp' groupings, which are the
|
||||||
|
first and third symbols on the right hand side of the rule. The sum is
|
||||||
|
stored into `$$' so that it becomes the semantic value of the
|
||||||
|
addition-expression just recognized by the rule. If there were a
|
||||||
|
useful semantic value associated with the `+' token, it could be
|
||||||
|
referred to as `$2'.
|
||||||
|
|
||||||
|
If you don't specify an action for a rule, Bison supplies a default:
|
||||||
|
`$$ = $1'. Thus, the value of the first symbol in the rule becomes the
|
||||||
|
value of the whole rule. Of course, the default rule is valid only if
|
||||||
|
the two data types match. There is no meaningful default action for an
|
||||||
|
empty rule; every empty rule must have an explicit action unless the
|
||||||
|
rule's value does not matter.
|
||||||
|
|
||||||
|
`$N' with N zero or negative is allowed for reference to tokens and
|
||||||
|
groupings on the stack _before_ those that match the current rule.
|
||||||
|
This is a very risky practice, and to use it reliably you must be
|
||||||
|
certain of the context in which the rule is applied. Here is a case in
|
||||||
|
which you can use this reliably:
|
||||||
|
|
||||||
|
foo: expr bar '+' expr { ... }
|
||||||
|
| expr bar '-' expr { ... }
|
||||||
|
;
|
||||||
|
|
||||||
|
bar: /* empty */
|
||||||
|
{ previous_expr = $0; }
|
||||||
|
;
|
||||||
|
|
||||||
|
As long as `bar' is used only in the fashion shown here, `$0' always
|
||||||
|
refers to the `expr' which precedes `bar' in the definition of `foo'.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Action Types, Next: Mid-Rule Actions, Prev: Actions, Up: Semantics
|
||||||
|
|
||||||
|
Data Types of Values in Actions
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
If you have chosen a single data type for semantic values, the `$$'
|
||||||
|
and `$N' constructs always have that data type.
|
||||||
|
|
||||||
|
If you have used `%union' to specify a variety of data types, then
|
||||||
|
you must declare a choice among these types for each terminal or
|
||||||
|
nonterminal symbol that can have a semantic value. Then each time you
|
||||||
|
use `$$' or `$N', its data type is determined by which symbol it refers
|
||||||
|
to in the rule. In this example,
|
||||||
|
|
||||||
|
exp: ...
|
||||||
|
| exp '+' exp
|
||||||
|
{ $$ = $1 + $3; }
|
||||||
|
|
||||||
|
`$1' and `$3' refer to instances of `exp', so they all have the data
|
||||||
|
type declared for the nonterminal symbol `exp'. If `$2' were used, it
|
||||||
|
would have the data type declared for the terminal symbol `'+'',
|
||||||
|
whatever that might be.
|
||||||
|
|
||||||
|
Alternatively, you can specify the data type when you refer to the
|
||||||
|
value, by inserting `<TYPE>' after the `$' at the beginning of the
|
||||||
|
reference. For example, if you have defined types as shown here:
|
||||||
|
|
||||||
|
%union {
|
||||||
|
int itype;
|
||||||
|
double dtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
then you can write `$<itype>1' to refer to the first subunit of the
|
||||||
|
rule as an integer, or `$<dtype>1' to refer to it as a double.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Mid-Rule Actions, Prev: Action Types, Up: Semantics
|
File: bison.info, Node: Mid-Rule Actions, Prev: Action Types, Up: Semantics
|
||||||
|
|
||||||
@@ -479,19 +623,20 @@ Suppressing Conflict Warnings
|
|||||||
|
|
||||||
Bison normally warns if there are any conflicts in the grammar
|
Bison normally warns if there are any conflicts in the grammar
|
||||||
(*note Shift/Reduce Conflicts: Shift/Reduce.), but most real grammars
|
(*note Shift/Reduce Conflicts: Shift/Reduce.), but most real grammars
|
||||||
have harmless shift/reduce conflicts which are resolved in a
|
have harmless shift/reduce conflicts which are resolved in a predictable
|
||||||
predictable way and would be difficult to eliminate. It is desirable
|
way and would be difficult to eliminate. It is desirable to suppress
|
||||||
to suppress the warning about these conflicts unless the number of
|
the warning about these conflicts unless the number of conflicts
|
||||||
conflicts changes. You can do this with the `%expect' declaration.
|
changes. You can do this with the `%expect' declaration.
|
||||||
|
|
||||||
The declaration looks like this:
|
The declaration looks like this:
|
||||||
|
|
||||||
%expect N
|
%expect N
|
||||||
|
|
||||||
Here N is a decimal integer. The declaration says there should be no
|
Here N is a decimal integer. The declaration says there should be
|
||||||
warning if there are N shift/reduce conflicts and no reduce/reduce
|
no warning if there are N shift/reduce conflicts and no reduce/reduce
|
||||||
conflicts. The usual warning is given if there are either more or fewer
|
conflicts. An error, instead of the usual warning, is given if there
|
||||||
conflicts, or if there are any reduce/reduce conflicts.
|
are either more or fewer conflicts, or if there are any reduce/reduce
|
||||||
|
conflicts.
|
||||||
|
|
||||||
In general, using `%expect' involves these steps:
|
In general, using `%expect' involves these steps:
|
||||||
|
|
||||||
@@ -566,7 +711,7 @@ File: bison.info, Node: Decl Summary, Prev: Pure Decl, Up: Declarations
|
|||||||
Bison Declaration Summary
|
Bison Declaration Summary
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Here is a summary of all Bison declarations:
|
Here is a summary of the declarations used to define a grammar:
|
||||||
|
|
||||||
`%union'
|
`%union'
|
||||||
Declare the collection of data types that semantic values may have
|
Declare the collection of data types that semantic values may have
|
||||||
@@ -601,38 +746,9 @@ Bison Declaration Summary
|
|||||||
Declare the expected number of shift-reduce conflicts (*note
|
Declare the expected number of shift-reduce conflicts (*note
|
||||||
Suppressing Conflict Warnings: Expect Decl.).
|
Suppressing Conflict Warnings: Expect Decl.).
|
||||||
|
|
||||||
`%yacc'
|
|
||||||
`%fixed_output_files'
|
|
||||||
Pretend the option `--yacc' was given, i.e., imitate Yacc,
|
|
||||||
including its naming conventions. *Note Bison Options::, for more.
|
|
||||||
|
|
||||||
`%locations'
|
In order to change the behavior of `bison', use the following
|
||||||
Generate the code processing the locations (*note Special Features
|
directives:
|
||||||
for Use in Actions: Action Features.). This mode is enabled as
|
|
||||||
soon as the grammar uses the special `@N' tokens, but if your
|
|
||||||
grammar does not use it, using `%locations' allows for more
|
|
||||||
accurate parse error messages.
|
|
||||||
|
|
||||||
`%pure_parser'
|
|
||||||
Request a pure (reentrant) parser program (*note A Pure
|
|
||||||
(Reentrant) Parser: Pure Decl.).
|
|
||||||
|
|
||||||
`%no_parser'
|
|
||||||
Do not include any C code in the parser file; generate tables
|
|
||||||
only. The parser file contains just `#define' directives and
|
|
||||||
static variable declarations.
|
|
||||||
|
|
||||||
This option also tells Bison to write the C code for the grammar
|
|
||||||
actions into a file named `FILENAME.act', in the form of a
|
|
||||||
brace-surrounded body fit for a `switch' statement.
|
|
||||||
|
|
||||||
`%no_lines'
|
|
||||||
Don't generate any `#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.
|
|
||||||
|
|
||||||
`%debug'
|
`%debug'
|
||||||
Output a definition of the macro `YYDEBUG' into the parser file, so
|
Output a definition of the macro `YYDEBUG' into the parser file, so
|
||||||
@@ -652,20 +768,48 @@ Bison Declaration Summary
|
|||||||
able to refer to token type codes and the variable `yylval'.
|
able to refer to token type codes and the variable `yylval'.
|
||||||
*Note Semantic Values of Tokens: Token Values.
|
*Note Semantic Values of Tokens: Token Values.
|
||||||
|
|
||||||
`%verbose'
|
`%file-prefix="PREFIX"'
|
||||||
Write an extra output file containing verbose descriptions of the
|
Specify a prefix to use for all Bison output file names. The
|
||||||
parser states and what is done for each type of look-ahead token in
|
names are chosen as if the input file were named `PREFIX.y'.
|
||||||
that state.
|
|
||||||
|
|
||||||
This file also describes all the conflicts, both those resolved by
|
`%locations'
|
||||||
operator precedence and the unresolved ones.
|
Generate the code processing the locations (*note Special Features
|
||||||
|
for Use in Actions: Action Features.). This mode is enabled as
|
||||||
|
soon as the grammar uses the special `@N' tokens, but if your
|
||||||
|
grammar does not use it, using `%locations' allows for more
|
||||||
|
accurate parse error messages.
|
||||||
|
|
||||||
The file's name is made by removing `.tab.c' or `.c' from the
|
`%name-prefix="PREFIX"'
|
||||||
parser output file name, and adding `.output' instead.
|
Rename the external symbols used in the parser so that they start
|
||||||
|
with PREFIX instead of `yy'. The precise list of symbols renamed
|
||||||
|
is `yyparse', `yylex', `yyerror', `yynerrs', `yylval', `yychar'
|
||||||
|
and `yydebug'. For example, if you use `%name-prefix="c_"', the
|
||||||
|
names become `c_parse', `c_lex', and so on. *Note Multiple
|
||||||
|
Parsers in the Same Program: Multiple Parsers.
|
||||||
|
|
||||||
Therefore, if the input file is `foo.y', then the parser file is
|
`%no-parser'
|
||||||
called `foo.tab.c' by default. As a consequence, the verbose
|
Do not include any C code in the parser file; generate tables
|
||||||
output file is called `foo.output'.
|
only. The parser file contains just `#define' directives and
|
||||||
|
static variable declarations.
|
||||||
|
|
||||||
|
This option also tells Bison to write the C code for the grammar
|
||||||
|
actions into a file named `FILENAME.act', in the form of a
|
||||||
|
brace-surrounded body fit for a `switch' statement.
|
||||||
|
|
||||||
|
`%no-lines'
|
||||||
|
Don't generate any `#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.
|
||||||
|
|
||||||
|
`%output="FILENAME"'
|
||||||
|
Specify the FILENAME for the parser file.
|
||||||
|
|
||||||
|
`%pure-parser'
|
||||||
|
Request a pure (reentrant) parser program (*note A Pure
|
||||||
|
(Reentrant) Parser: Pure Decl.).
|
||||||
|
|
||||||
`%token_table'
|
`%token_table'
|
||||||
Generate an array of token names in the parser file. The name of
|
Generate an array of token names in the parser file. The name of
|
||||||
@@ -701,6 +845,26 @@ Bison Declaration Summary
|
|||||||
`YYNSTATES'
|
`YYNSTATES'
|
||||||
The number of parser states (*note Parser States::).
|
The number of parser states (*note Parser States::).
|
||||||
|
|
||||||
|
`%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 `.tab.c' or `.c' from the
|
||||||
|
parser output file name, and adding `.output' instead.
|
||||||
|
|
||||||
|
Therefore, if the input file is `foo.y', then the parser file is
|
||||||
|
called `foo.tab.c' by default. As a consequence, the verbose
|
||||||
|
output file is called `foo.output'.
|
||||||
|
|
||||||
|
`%yacc'
|
||||||
|
`%fixed-output-files'
|
||||||
|
Pretend the option `--yacc' was given, i.e., imitate Yacc,
|
||||||
|
including its naming conventions. *Note Bison Options::, for more.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Multiple Parsers, Prev: Declarations, Up: Grammar File
|
File: bison.info, Node: Multiple Parsers, Prev: Declarations, Up: Grammar File
|
||||||
|
|
||||||
@@ -746,8 +910,8 @@ that it needs to use.
|
|||||||
|
|
||||||
Keep in mind that the parser uses many C identifiers starting with
|
Keep in mind that the parser uses many C identifiers starting with
|
||||||
`yy' and `YY' for internal purposes. If you use such an identifier
|
`yy' and `YY' for internal purposes. If you use such an identifier
|
||||||
(aside from those in this manual) in an action or in epilogue in the
|
(aside from those in this manual) in an action or in additional C code
|
||||||
grammar file, you are likely to run into trouble.
|
in the grammar file, you are likely to run into trouble.
|
||||||
|
|
||||||
* Menu:
|
* Menu:
|
||||||
|
|
||||||
@@ -1082,199 +1246,3 @@ encountered so far. Normally this variable is global; but if you
|
|||||||
request a pure parser (*note A Pure (Reentrant) Parser: Pure Decl.)
|
request a pure parser (*note A Pure (Reentrant) Parser: Pure Decl.)
|
||||||
then it is a local variable which only the actions can access.
|
then it is a local variable which only the actions can access.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Action Features, Prev: Error Reporting, Up: Interface
|
|
||||||
|
|
||||||
Special Features for Use in Actions
|
|
||||||
===================================
|
|
||||||
|
|
||||||
Here is a table of Bison constructs, variables and macros that are
|
|
||||||
useful in actions.
|
|
||||||
|
|
||||||
`$$'
|
|
||||||
Acts like a variable that contains the semantic value for the
|
|
||||||
grouping made by the current rule. *Note Actions::.
|
|
||||||
|
|
||||||
`$N'
|
|
||||||
Acts like a variable that contains the semantic value for the Nth
|
|
||||||
component of the current rule. *Note Actions::.
|
|
||||||
|
|
||||||
`$<TYPEALT>$'
|
|
||||||
Like `$$' but specifies alternative TYPEALT in the union specified
|
|
||||||
by the `%union' declaration. *Note Data Types of Values in
|
|
||||||
Actions: Action Types.
|
|
||||||
|
|
||||||
`$<TYPEALT>N'
|
|
||||||
Like `$N' but specifies alternative TYPEALT in the union specified
|
|
||||||
by the `%union' declaration. *Note Data Types of Values in
|
|
||||||
Actions: Action Types.
|
|
||||||
|
|
||||||
`YYABORT;'
|
|
||||||
Return immediately from `yyparse', indicating failure. *Note The
|
|
||||||
Parser Function `yyparse': Parser Function.
|
|
||||||
|
|
||||||
`YYACCEPT;'
|
|
||||||
Return immediately from `yyparse', indicating success. *Note The
|
|
||||||
Parser Function `yyparse': Parser Function.
|
|
||||||
|
|
||||||
`YYBACKUP (TOKEN, VALUE);'
|
|
||||||
Unshift a token. This macro is allowed only for rules that reduce
|
|
||||||
a single value, and only when there is no look-ahead token. It
|
|
||||||
installs a look-ahead token with token type TOKEN and semantic
|
|
||||||
value VALUE; then it discards the value that was going to be
|
|
||||||
reduced by this rule.
|
|
||||||
|
|
||||||
If the macro is used when it is not valid, such as when there is a
|
|
||||||
look-ahead token already, then it reports a syntax error with a
|
|
||||||
message `cannot back up' and performs ordinary error recovery.
|
|
||||||
|
|
||||||
In either case, the rest of the action is not executed.
|
|
||||||
|
|
||||||
`YYEMPTY'
|
|
||||||
Value stored in `yychar' when there is no look-ahead token.
|
|
||||||
|
|
||||||
`YYERROR;'
|
|
||||||
Cause an immediate syntax error. This statement initiates error
|
|
||||||
recovery just as if the parser itself had detected an error;
|
|
||||||
however, it does not call `yyerror', and does not print any
|
|
||||||
message. If you want to print an error message, call `yyerror'
|
|
||||||
explicitly before the `YYERROR;' statement. *Note Error
|
|
||||||
Recovery::.
|
|
||||||
|
|
||||||
`YYRECOVERING'
|
|
||||||
This macro stands for an expression that has the value 1 when the
|
|
||||||
parser is recovering from a syntax error, and 0 the rest of the
|
|
||||||
time. *Note Error Recovery::.
|
|
||||||
|
|
||||||
`yychar'
|
|
||||||
Variable containing the current look-ahead token. (In a pure
|
|
||||||
parser, this is actually a local variable within `yyparse'.) When
|
|
||||||
there is no look-ahead token, the value `YYEMPTY' is stored in the
|
|
||||||
variable. *Note Look-Ahead Tokens: Look-Ahead.
|
|
||||||
|
|
||||||
`yyclearin;'
|
|
||||||
Discard the current look-ahead token. This is useful primarily in
|
|
||||||
error rules. *Note Error Recovery::.
|
|
||||||
|
|
||||||
`yyerrok;'
|
|
||||||
Resume generating error messages immediately for subsequent syntax
|
|
||||||
errors. This is useful primarily in error rules. *Note Error
|
|
||||||
Recovery::.
|
|
||||||
|
|
||||||
`@$'
|
|
||||||
Acts like a structure variable containing information on the
|
|
||||||
textual position of the grouping made by the current rule. *Note
|
|
||||||
Tracking Locations: Locations.
|
|
||||||
|
|
||||||
`@N'
|
|
||||||
Acts like a structure variable containing information on the
|
|
||||||
textual position of the Nth component of the current rule. *Note
|
|
||||||
Tracking Locations: Locations.
|
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Algorithm, Next: Error Recovery, Prev: Interface, Up: Top
|
|
||||||
|
|
||||||
The Bison Parser Algorithm
|
|
||||||
**************************
|
|
||||||
|
|
||||||
As Bison reads tokens, it pushes them onto a stack along with their
|
|
||||||
semantic values. The stack is called the "parser stack". Pushing a
|
|
||||||
token is traditionally called "shifting".
|
|
||||||
|
|
||||||
For example, suppose the infix calculator has read `1 + 5 *', with a
|
|
||||||
`3' to come. The stack will have four elements, one for each token
|
|
||||||
that was shifted.
|
|
||||||
|
|
||||||
But the stack does not always have an element for each token read.
|
|
||||||
When the last N tokens and groupings shifted match the components of a
|
|
||||||
grammar rule, they can be combined according to that rule. This is
|
|
||||||
called "reduction". Those tokens and groupings are replaced on the
|
|
||||||
stack by a single grouping whose symbol is the result (left hand side)
|
|
||||||
of that rule. Running the rule's action is part of the process of
|
|
||||||
reduction, because this is what computes the semantic value of the
|
|
||||||
resulting grouping.
|
|
||||||
|
|
||||||
For example, if the infix calculator's parser stack contains this:
|
|
||||||
|
|
||||||
1 + 5 * 3
|
|
||||||
|
|
||||||
and the next input token is a newline character, then the last three
|
|
||||||
elements can be reduced to 15 via the rule:
|
|
||||||
|
|
||||||
expr: expr '*' expr;
|
|
||||||
|
|
||||||
Then the stack contains just these three elements:
|
|
||||||
|
|
||||||
1 + 15
|
|
||||||
|
|
||||||
At this point, another reduction can be made, resulting in the single
|
|
||||||
value 16. Then the newline token can be shifted.
|
|
||||||
|
|
||||||
The parser tries, by shifts and reductions, to reduce the entire
|
|
||||||
input down to a single grouping whose symbol is the grammar's
|
|
||||||
start-symbol (*note Languages and Context-Free Grammars: Language and
|
|
||||||
Grammar.).
|
|
||||||
|
|
||||||
This kind of parser is known in the literature as a bottom-up parser.
|
|
||||||
|
|
||||||
* Menu:
|
|
||||||
|
|
||||||
* Look-Ahead:: Parser looks one token ahead when deciding what to do.
|
|
||||||
* Shift/Reduce:: Conflicts: when either shifting or reduction is valid.
|
|
||||||
* Precedence:: Operator precedence works by resolving conflicts.
|
|
||||||
* Contextual Precedence:: When an operator's precedence depends on context.
|
|
||||||
* Parser States:: The parser is a finite-state-machine with stack.
|
|
||||||
* Reduce/Reduce:: When two rules are applicable in the same situation.
|
|
||||||
* Mystery Conflicts:: Reduce/reduce conflicts that look unjustified.
|
|
||||||
* Stack Overflow:: What happens when stack gets full. How to avoid it.
|
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Look-Ahead, Next: Shift/Reduce, Up: Algorithm
|
|
||||||
|
|
||||||
Look-Ahead Tokens
|
|
||||||
=================
|
|
||||||
|
|
||||||
The Bison parser does _not_ always reduce immediately as soon as the
|
|
||||||
last N tokens and groupings match a rule. This is because such a
|
|
||||||
simple strategy is inadequate to handle most languages. Instead, when a
|
|
||||||
reduction is possible, the parser sometimes "looks ahead" at the next
|
|
||||||
token in order to decide what to do.
|
|
||||||
|
|
||||||
When a token is read, it is not immediately shifted; first it
|
|
||||||
becomes the "look-ahead token", which is not on the stack. Now the
|
|
||||||
parser can perform one or more reductions of tokens and groupings on
|
|
||||||
the stack, while the look-ahead token remains off to the side. When no
|
|
||||||
more reductions should take place, the look-ahead token is shifted onto
|
|
||||||
the stack. This does not mean that all possible reductions have been
|
|
||||||
done; depending on the token type of the look-ahead token, some rules
|
|
||||||
may choose to delay their application.
|
|
||||||
|
|
||||||
Here is a simple case where look-ahead is needed. These three rules
|
|
||||||
define expressions which contain binary addition operators and postfix
|
|
||||||
unary factorial operators (`!'), and allow parentheses for grouping.
|
|
||||||
|
|
||||||
expr: term '+' expr
|
|
||||||
| term
|
|
||||||
;
|
|
||||||
|
|
||||||
term: '(' expr ')'
|
|
||||||
| term '!'
|
|
||||||
| NUMBER
|
|
||||||
;
|
|
||||||
|
|
||||||
Suppose that the tokens `1 + 2' have been read and shifted; what
|
|
||||||
should be done? If the following token is `)', then the first three
|
|
||||||
tokens must be reduced to form an `expr'. This is the only valid
|
|
||||||
course, because shifting the `)' would produce a sequence of symbols
|
|
||||||
`term ')'', and no rule allows this.
|
|
||||||
|
|
||||||
If the following token is `!', then it must be shifted immediately so
|
|
||||||
that `2 !' can be reduced to make a `term'. If instead the parser were
|
|
||||||
to reduce before shifting, `1 + 2' would become an `expr'. It would
|
|
||||||
then be impossible to shift the `!' because doing so would produce on
|
|
||||||
the stack the sequence of symbols `expr '!''. No rule allows that
|
|
||||||
sequence.
|
|
||||||
|
|
||||||
The current look-ahead token is stored in the variable `yychar'.
|
|
||||||
*Note Special Features for Use in Actions: Action Features.
|
|
||||||
|
|
||||||
|
|||||||
+238
-56
@@ -1,5 +1,5 @@
|
|||||||
This is bison.info, produced by makeinfo version 4.0b from
|
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
|
||||||
bison.texinfo.
|
à partir bison.texinfo.
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
@@ -28,6 +28,202 @@ License", "Conditions for Using Bison" and this permission notice may be
|
|||||||
included in translations approved by the Free Software Foundation
|
included in translations approved by the Free Software Foundation
|
||||||
instead of in the original English.
|
instead of in the original English.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Action Features, Prev: Error Reporting, Up: Interface
|
||||||
|
|
||||||
|
Special Features for Use in Actions
|
||||||
|
===================================
|
||||||
|
|
||||||
|
Here is a table of Bison constructs, variables and macros that are
|
||||||
|
useful in actions.
|
||||||
|
|
||||||
|
`$$'
|
||||||
|
Acts like a variable that contains the semantic value for the
|
||||||
|
grouping made by the current rule. *Note Actions::.
|
||||||
|
|
||||||
|
`$N'
|
||||||
|
Acts like a variable that contains the semantic value for the Nth
|
||||||
|
component of the current rule. *Note Actions::.
|
||||||
|
|
||||||
|
`$<TYPEALT>$'
|
||||||
|
Like `$$' but specifies alternative TYPEALT in the union specified
|
||||||
|
by the `%union' declaration. *Note Data Types of Values in
|
||||||
|
Actions: Action Types.
|
||||||
|
|
||||||
|
`$<TYPEALT>N'
|
||||||
|
Like `$N' but specifies alternative TYPEALT in the union specified
|
||||||
|
by the `%union' declaration. *Note Data Types of Values in
|
||||||
|
Actions: Action Types.
|
||||||
|
|
||||||
|
`YYABORT;'
|
||||||
|
Return immediately from `yyparse', indicating failure. *Note The
|
||||||
|
Parser Function `yyparse': Parser Function.
|
||||||
|
|
||||||
|
`YYACCEPT;'
|
||||||
|
Return immediately from `yyparse', indicating success. *Note The
|
||||||
|
Parser Function `yyparse': Parser Function.
|
||||||
|
|
||||||
|
`YYBACKUP (TOKEN, VALUE);'
|
||||||
|
Unshift a token. This macro is allowed only for rules that reduce
|
||||||
|
a single value, and only when there is no look-ahead token. It
|
||||||
|
installs a look-ahead token with token type TOKEN and semantic
|
||||||
|
value VALUE; then it discards the value that was going to be
|
||||||
|
reduced by this rule.
|
||||||
|
|
||||||
|
If the macro is used when it is not valid, such as when there is a
|
||||||
|
look-ahead token already, then it reports a syntax error with a
|
||||||
|
message `cannot back up' and performs ordinary error recovery.
|
||||||
|
|
||||||
|
In either case, the rest of the action is not executed.
|
||||||
|
|
||||||
|
`YYEMPTY'
|
||||||
|
Value stored in `yychar' when there is no look-ahead token.
|
||||||
|
|
||||||
|
`YYERROR;'
|
||||||
|
Cause an immediate syntax error. This statement initiates error
|
||||||
|
recovery just as if the parser itself had detected an error;
|
||||||
|
however, it does not call `yyerror', and does not print any
|
||||||
|
message. If you want to print an error message, call `yyerror'
|
||||||
|
explicitly before the `YYERROR;' statement. *Note Error
|
||||||
|
Recovery::.
|
||||||
|
|
||||||
|
`YYRECOVERING'
|
||||||
|
This macro stands for an expression that has the value 1 when the
|
||||||
|
parser is recovering from a syntax error, and 0 the rest of the
|
||||||
|
time. *Note Error Recovery::.
|
||||||
|
|
||||||
|
`yychar'
|
||||||
|
Variable containing the current look-ahead token. (In a pure
|
||||||
|
parser, this is actually a local variable within `yyparse'.) When
|
||||||
|
there is no look-ahead token, the value `YYEMPTY' is stored in the
|
||||||
|
variable. *Note Look-Ahead Tokens: Look-Ahead.
|
||||||
|
|
||||||
|
`yyclearin;'
|
||||||
|
Discard the current look-ahead token. This is useful primarily in
|
||||||
|
error rules. *Note Error Recovery::.
|
||||||
|
|
||||||
|
`yyerrok;'
|
||||||
|
Resume generating error messages immediately for subsequent syntax
|
||||||
|
errors. This is useful primarily in error rules. *Note Error
|
||||||
|
Recovery::.
|
||||||
|
|
||||||
|
`@$'
|
||||||
|
Acts like a structure variable containing information on the
|
||||||
|
textual position of the grouping made by the current rule. *Note
|
||||||
|
Tracking Locations: Locations.
|
||||||
|
|
||||||
|
`@N'
|
||||||
|
Acts like a structure variable containing information on the
|
||||||
|
textual position of the Nth component of the current rule. *Note
|
||||||
|
Tracking Locations: Locations.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Algorithm, Next: Error Recovery, Prev: Interface, Up: Top
|
||||||
|
|
||||||
|
The Bison Parser Algorithm
|
||||||
|
**************************
|
||||||
|
|
||||||
|
As Bison reads tokens, it pushes them onto a stack along with their
|
||||||
|
semantic values. The stack is called the "parser stack". Pushing a
|
||||||
|
token is traditionally called "shifting".
|
||||||
|
|
||||||
|
For example, suppose the infix calculator has read `1 + 5 *', with a
|
||||||
|
`3' to come. The stack will have four elements, one for each token
|
||||||
|
that was shifted.
|
||||||
|
|
||||||
|
But the stack does not always have an element for each token read.
|
||||||
|
When the last N tokens and groupings shifted match the components of a
|
||||||
|
grammar rule, they can be combined according to that rule. This is
|
||||||
|
called "reduction". Those tokens and groupings are replaced on the
|
||||||
|
stack by a single grouping whose symbol is the result (left hand side)
|
||||||
|
of that rule. Running the rule's action is part of the process of
|
||||||
|
reduction, because this is what computes the semantic value of the
|
||||||
|
resulting grouping.
|
||||||
|
|
||||||
|
For example, if the infix calculator's parser stack contains this:
|
||||||
|
|
||||||
|
1 + 5 * 3
|
||||||
|
|
||||||
|
and the next input token is a newline character, then the last three
|
||||||
|
elements can be reduced to 15 via the rule:
|
||||||
|
|
||||||
|
expr: expr '*' expr;
|
||||||
|
|
||||||
|
Then the stack contains just these three elements:
|
||||||
|
|
||||||
|
1 + 15
|
||||||
|
|
||||||
|
At this point, another reduction can be made, resulting in the single
|
||||||
|
value 16. Then the newline token can be shifted.
|
||||||
|
|
||||||
|
The parser tries, by shifts and reductions, to reduce the entire
|
||||||
|
input down to a single grouping whose symbol is the grammar's
|
||||||
|
start-symbol (*note Languages and Context-Free Grammars: Language and
|
||||||
|
Grammar.).
|
||||||
|
|
||||||
|
This kind of parser is known in the literature as a bottom-up parser.
|
||||||
|
|
||||||
|
* Menu:
|
||||||
|
|
||||||
|
* Look-Ahead:: Parser looks one token ahead when deciding what to do.
|
||||||
|
* Shift/Reduce:: Conflicts: when either shifting or reduction is valid.
|
||||||
|
* Precedence:: Operator precedence works by resolving conflicts.
|
||||||
|
* Contextual Precedence:: When an operator's precedence depends on context.
|
||||||
|
* Parser States:: The parser is a finite-state-machine with stack.
|
||||||
|
* Reduce/Reduce:: When two rules are applicable in the same situation.
|
||||||
|
* Mystery Conflicts:: Reduce/reduce conflicts that look unjustified.
|
||||||
|
* Stack Overflow:: What happens when stack gets full. How to avoid it.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: Look-Ahead, Next: Shift/Reduce, Up: Algorithm
|
||||||
|
|
||||||
|
Look-Ahead Tokens
|
||||||
|
=================
|
||||||
|
|
||||||
|
The Bison parser does _not_ always reduce immediately as soon as the
|
||||||
|
last N tokens and groupings match a rule. This is because such a
|
||||||
|
simple strategy is inadequate to handle most languages. Instead, when a
|
||||||
|
reduction is possible, the parser sometimes "looks ahead" at the next
|
||||||
|
token in order to decide what to do.
|
||||||
|
|
||||||
|
When a token is read, it is not immediately shifted; first it
|
||||||
|
becomes the "look-ahead token", which is not on the stack. Now the
|
||||||
|
parser can perform one or more reductions of tokens and groupings on
|
||||||
|
the stack, while the look-ahead token remains off to the side. When no
|
||||||
|
more reductions should take place, the look-ahead token is shifted onto
|
||||||
|
the stack. This does not mean that all possible reductions have been
|
||||||
|
done; depending on the token type of the look-ahead token, some rules
|
||||||
|
may choose to delay their application.
|
||||||
|
|
||||||
|
Here is a simple case where look-ahead is needed. These three rules
|
||||||
|
define expressions which contain binary addition operators and postfix
|
||||||
|
unary factorial operators (`!'), and allow parentheses for grouping.
|
||||||
|
|
||||||
|
expr: term '+' expr
|
||||||
|
| term
|
||||||
|
;
|
||||||
|
|
||||||
|
term: '(' expr ')'
|
||||||
|
| term '!'
|
||||||
|
| NUMBER
|
||||||
|
;
|
||||||
|
|
||||||
|
Suppose that the tokens `1 + 2' have been read and shifted; what
|
||||||
|
should be done? If the following token is `)', then the first three
|
||||||
|
tokens must be reduced to form an `expr'. This is the only valid
|
||||||
|
course, because shifting the `)' would produce a sequence of symbols
|
||||||
|
`term ')'', and no rule allows this.
|
||||||
|
|
||||||
|
If the following token is `!', then it must be shifted immediately so
|
||||||
|
that `2 !' can be reduced to make a `term'. If instead the parser were
|
||||||
|
to reduce before shifting, `1 + 2' would become an `expr'. It would
|
||||||
|
then be impossible to shift the `!' because doing so would produce on
|
||||||
|
the stack the sequence of symbols `expr '!''. No rule allows that
|
||||||
|
sequence.
|
||||||
|
|
||||||
|
The current look-ahead token is stored in the variable `yychar'.
|
||||||
|
*Note Special Features for Use in Actions: Action Features.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Shift/Reduce, Next: Precedence, Prev: Look-Ahead, Up: Algorithm
|
File: bison.info, Node: Shift/Reduce, Next: Precedence, Prev: Look-Ahead, Up: Algorithm
|
||||||
|
|
||||||
@@ -787,9 +983,10 @@ Here we assume that `yylex' looks at the value of `hexflag'; when it is
|
|||||||
nonzero, all integers are parsed in hexadecimal, and tokens starting
|
nonzero, all integers are parsed in hexadecimal, and tokens starting
|
||||||
with letters are parsed as integers if possible.
|
with letters are parsed as integers if possible.
|
||||||
|
|
||||||
The declaration of `hexflag' shown in the prologue of the parser file
|
The declaration of `hexflag' shown in the C declarations section of
|
||||||
is needed to make it accessible to the actions (*note The Prologue:
|
the parser file is needed to make it accessible to the actions (*note
|
||||||
Prologue.). You must also write the code in `yylex' to obey the flag.
|
The C Declarations Section: C Declarations.). You must also write the
|
||||||
|
code in `yylex' to obey the flag.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Tie-in Recovery, Prev: Lexical Tie-ins, Up: Context Dependency
|
File: bison.info, Node: Tie-in Recovery, Prev: Lexical Tie-ins, Up: Context Dependency
|
||||||
@@ -858,13 +1055,15 @@ out why.
|
|||||||
|
|
||||||
To enable compilation of trace facilities, you must define the macro
|
To enable compilation of trace facilities, you must define the macro
|
||||||
`YYDEBUG' when you compile the parser. You could use `-DYYDEBUG=1' as
|
`YYDEBUG' when you compile the parser. You could use `-DYYDEBUG=1' as
|
||||||
a compiler option or you could put `#define YYDEBUG 1' in the prologue
|
a compiler option or you could put `#define YYDEBUG 1' in the C
|
||||||
of the grammar file (*note The Prologue: Prologue.). Alternatively, use
|
declarations section of the grammar file (*note The C Declarations
|
||||||
the `-t' option when you run Bison (*note Invoking Bison: Invocation.).
|
Section: C Declarations.). Alternatively, use the `-t' option when you
|
||||||
We always define `YYDEBUG' so that debugging is always possible.
|
run Bison (*note Invoking Bison: Invocation.). We always define
|
||||||
|
`YYDEBUG' so that debugging is always possible.
|
||||||
|
|
||||||
The trace facility uses `stderr', so you must add
|
The trace facility uses `stderr', so you must add
|
||||||
`#include <stdio.h>' to the prologue unless it is already there.
|
`#include <stdio.h>' to the C declarations section unless it is already
|
||||||
|
there.
|
||||||
|
|
||||||
Once you have compiled the program with trace facilities, the way to
|
Once you have compiled the program with trace facilities, the way to
|
||||||
request a trace is to store a nonzero value in the variable `yydebug'.
|
request a trace is to store a nonzero value in the variable `yydebug'.
|
||||||
@@ -1008,19 +1207,12 @@ Tuning the parser:
|
|||||||
Parser: Debugging.
|
Parser: Debugging.
|
||||||
|
|
||||||
`--locations'
|
`--locations'
|
||||||
Pretend that `%locactions' was specified. *Note Decl Summary::.
|
Pretend that `%locations' was specified. *Note Decl Summary::.
|
||||||
|
|
||||||
`-p PREFIX'
|
`-p PREFIX'
|
||||||
`--name-prefix=PREFIX'
|
`--name-prefix=PREFIX'
|
||||||
Rename the external symbols used in the parser so that they start
|
Pretend that `%name-prefix="PREFIX"' was specified. *Note Decl
|
||||||
with PREFIX instead of `yy'. The precise list of symbols renamed
|
Summary::.
|
||||||
is `yyparse', `yylex', `yyerror', `yynerrs', `yylval', `yychar'
|
|
||||||
and `yydebug'.
|
|
||||||
|
|
||||||
For example, if you use `-p c', the names become `cparse', `clex',
|
|
||||||
and so on.
|
|
||||||
|
|
||||||
*Note Multiple Parsers in the Same Program: Multiple Parsers.
|
|
||||||
|
|
||||||
`-l'
|
`-l'
|
||||||
`--no-lines'
|
`--no-lines'
|
||||||
@@ -1033,39 +1225,52 @@ Tuning the parser:
|
|||||||
|
|
||||||
`-n'
|
`-n'
|
||||||
`--no-parser'
|
`--no-parser'
|
||||||
Pretend that `%no_parser' was specified. *Note Decl Summary::.
|
Pretend that `%no-parser' was specified. *Note Decl Summary::.
|
||||||
|
|
||||||
`-k'
|
`-k'
|
||||||
`--token-table'
|
`--token-table'
|
||||||
Pretend that `%token_table' was specified. *Note Decl Summary::.
|
Pretend that `%token-table' was specified. *Note Decl Summary::.
|
||||||
|
|
||||||
Adjust the output:
|
Adjust the output:
|
||||||
|
|
||||||
`-d'
|
`-d'
|
||||||
`--defines'
|
`--defines'
|
||||||
Pretend that `%verbose' was specified, i.e., write an extra output
|
Pretend that `%defines' was specified, i.e., write an extra output
|
||||||
file containing macro definitions for the token type names defined
|
file containing macro definitions for the token type names defined
|
||||||
in the grammar and the semantic value type `YYSTYPE', as well as a
|
in the grammar and the semantic value type `YYSTYPE', as well as a
|
||||||
few `extern' variable declarations. *Note Decl Summary::.
|
few `extern' variable declarations. *Note Decl Summary::.
|
||||||
|
|
||||||
|
`--defines=DEFINES-FILE'
|
||||||
|
Same as above, but save in the file DEFINES-FILE.
|
||||||
|
|
||||||
`-b FILE-PREFIX'
|
`-b FILE-PREFIX'
|
||||||
`--file-prefix=PREFIX'
|
`--file-prefix=PREFIX'
|
||||||
Specify a prefix to use for all Bison output file names. The
|
Pretend that `%verbose' was specified, i.e, specify prefix to use
|
||||||
names are chosen as if the input file were named `PREFIX.c'.
|
for all Bison output file names. *Note Decl Summary::.
|
||||||
|
|
||||||
`-v'
|
`-v'
|
||||||
`--verbose'
|
`--verbose'
|
||||||
Pretend that `%verbose' was specified, i.e, write an extra output
|
Pretend that `%verbose' was specified, i.e, write an extra output
|
||||||
file containing verbose descriptions of the grammar and parser.
|
file containing verbose descriptions of the grammar and parser.
|
||||||
*Note Decl Summary::, for more.
|
*Note Decl Summary::.
|
||||||
|
|
||||||
`-o OUTFILE'
|
`-o FILENAME'
|
||||||
`--output-file=OUTFILE'
|
`--output=FILENAME'
|
||||||
Specify the name OUTFILE for the parser file.
|
Specify the FILENAME for the parser file.
|
||||||
|
|
||||||
The other output files' names are constructed from OUTFILE as
|
The other output files' names are constructed from FILENAME as
|
||||||
described under the `-v' and `-d' options.
|
described under the `-v' and `-d' options.
|
||||||
|
|
||||||
|
`-g'
|
||||||
|
Output a VCG definition of the LALR(1) grammar automaton computed
|
||||||
|
by Bison. If the grammar file is `foo.y', the VCG output file will
|
||||||
|
be `foo.vcg'.
|
||||||
|
|
||||||
|
`--graph=GRAPH-FILE'
|
||||||
|
The behaviour of -GRAPH is the same than `-g'. The only difference
|
||||||
|
is that it has an optionnal argument which is the name of the
|
||||||
|
output graph filename.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Environment Variables, Next: Option Cross Key, Prev: Bison Options, Up: Invocation
|
File: bison.info, Node: Environment Variables, Next: Option Cross Key, Prev: Bison Options, Up: Invocation
|
||||||
|
|
||||||
@@ -1098,39 +1303,16 @@ Option Cross Key
|
|||||||
find the corresponding short option.
|
find the corresponding short option.
|
||||||
|
|
||||||
--debug -t
|
--debug -t
|
||||||
--defines -d
|
--defines=DEFINES-FILE -d
|
||||||
--file-prefix=PREFIX -b FILE-PREFIX
|
--file-prefix=PREFIX -b FILE-PREFIX
|
||||||
--fixed-output-files --yacc -y
|
--fixed-output-files --yacc -y
|
||||||
|
--graph=GRAPH-FILE -d
|
||||||
--help -h
|
--help -h
|
||||||
--name-prefix=PREFIX -p NAME-PREFIX
|
--name-prefix=PREFIX -p NAME-PREFIX
|
||||||
--no-lines -l
|
--no-lines -l
|
||||||
--no-parser -n
|
--no-parser -n
|
||||||
--output-file=OUTFILE -o OUTFILE
|
--output=OUTFILE -o OUTFILE
|
||||||
--token-table -k
|
--token-table -k
|
||||||
--verbose -v
|
--verbose -v
|
||||||
--version -V
|
--version -V
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: VMS Invocation, Prev: Option Cross Key, Up: Invocation
|
|
||||||
|
|
||||||
Invoking Bison under VMS
|
|
||||||
========================
|
|
||||||
|
|
||||||
The command line syntax for Bison on VMS is a variant of the usual
|
|
||||||
Bison command syntax--adapted to fit VMS conventions.
|
|
||||||
|
|
||||||
To find the VMS equivalent for any Bison option, start with the long
|
|
||||||
option, and substitute a `/' for the leading `--', and substitute a `_'
|
|
||||||
for each `-' in the name of the long option. For example, the
|
|
||||||
following invocation under VMS:
|
|
||||||
|
|
||||||
bison /debug/name_prefix=bar foo.y
|
|
||||||
|
|
||||||
is equivalent to the following command under POSIX.
|
|
||||||
|
|
||||||
bison --debug --name-prefix=bar foo.y
|
|
||||||
|
|
||||||
The VMS file system does not permit filenames such as `foo.tab.c'.
|
|
||||||
In the above example, the output file would instead be named
|
|
||||||
`foo_tab.c'.
|
|
||||||
|
|
||||||
|
|||||||
+60
-22
@@ -1,5 +1,5 @@
|
|||||||
This is bison.info, produced by makeinfo version 4.0b from
|
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
|
||||||
bison.texinfo.
|
à partir bison.texinfo.
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
@@ -28,6 +28,30 @@ License", "Conditions for Using Bison" and this permission notice may be
|
|||||||
included in translations approved by the Free Software Foundation
|
included in translations approved by the Free Software Foundation
|
||||||
instead of in the original English.
|
instead of in the original English.
|
||||||
|
|
||||||
|
|
||||||
|
File: bison.info, Node: VMS Invocation, Prev: Option Cross Key, Up: Invocation
|
||||||
|
|
||||||
|
Invoking Bison under VMS
|
||||||
|
========================
|
||||||
|
|
||||||
|
The command line syntax for Bison on VMS is a variant of the usual
|
||||||
|
Bison command syntax--adapted to fit VMS conventions.
|
||||||
|
|
||||||
|
To find the VMS equivalent for any Bison option, start with the long
|
||||||
|
option, and substitute a `/' for the leading `--', and substitute a `_'
|
||||||
|
for each `-' in the name of the long option. For example, the
|
||||||
|
following invocation under VMS:
|
||||||
|
|
||||||
|
bison /debug/name_prefix=bar foo.y
|
||||||
|
|
||||||
|
is equivalent to the following command under POSIX.
|
||||||
|
|
||||||
|
bison --debug --name-prefix=bar foo.y
|
||||||
|
|
||||||
|
The VMS file system does not permit filenames such as `foo.tab.c'.
|
||||||
|
In the above example, the output file would instead be named
|
||||||
|
`foo_tab.c'.
|
||||||
|
|
||||||
|
|
||||||
File: bison.info, Node: Table of Symbols, Next: Glossary, Prev: Invocation, Up: Top
|
File: bison.info, Node: Table of Symbols, Next: Glossary, Prev: Invocation, Up: Top
|
||||||
|
|
||||||
@@ -172,11 +196,19 @@ Bison Symbols
|
|||||||
Bison declaration to create a header file meant for the scanner.
|
Bison declaration to create a header file meant for the scanner.
|
||||||
*Note Decl Summary::.
|
*Note Decl Summary::.
|
||||||
|
|
||||||
|
`%file-prefix="PREFIX"'
|
||||||
|
Bison declaration to set tge prefix of the output files. *Note
|
||||||
|
Decl Summary::.
|
||||||
|
|
||||||
`%left'
|
`%left'
|
||||||
Bison declaration to assign left associativity to token(s). *Note
|
Bison declaration to assign left associativity to token(s). *Note
|
||||||
Operator Precedence: Precedence Decl.
|
Operator Precedence: Precedence Decl.
|
||||||
|
|
||||||
`%no_lines'
|
`%name-prefix="PREFIX"'
|
||||||
|
Bison declaration to rename the external symbols. *Note Decl
|
||||||
|
Summary::.
|
||||||
|
|
||||||
|
`%no-lines'
|
||||||
Bison declaration to avoid generating `#line' directives in the
|
Bison declaration to avoid generating `#line' directives in the
|
||||||
parser file. *Note Decl Summary::.
|
parser file. *Note Decl Summary::.
|
||||||
|
|
||||||
@@ -184,11 +216,15 @@ Bison Symbols
|
|||||||
Bison declaration to assign non-associativity to token(s). *Note
|
Bison declaration to assign non-associativity to token(s). *Note
|
||||||
Operator Precedence: Precedence Decl.
|
Operator Precedence: Precedence Decl.
|
||||||
|
|
||||||
|
`%output="FILENAME"'
|
||||||
|
Bison declaration to set the name of the parser file. *Note Decl
|
||||||
|
Summary::.
|
||||||
|
|
||||||
`%prec'
|
`%prec'
|
||||||
Bison declaration to assign a precedence to a specific rule.
|
Bison declaration to assign a precedence to a specific rule.
|
||||||
*Note Context-Dependent Precedence: Contextual Precedence.
|
*Note Context-Dependent Precedence: Contextual Precedence.
|
||||||
|
|
||||||
`%pure_parser'
|
`%pure-parser'
|
||||||
Bison declaration to request a pure (reentrant) parser. *Note A
|
Bison declaration to request a pure (reentrant) parser. *Note A
|
||||||
Pure (Reentrant) Parser: Pure Decl.
|
Pure (Reentrant) Parser: Pure Decl.
|
||||||
|
|
||||||
@@ -204,7 +240,7 @@ Bison Symbols
|
|||||||
Bison declaration to declare token(s) without specifying
|
Bison declaration to declare token(s) without specifying
|
||||||
precedence. *Note Token Type Names: Token Decl.
|
precedence. *Note Token Type Names: Token Decl.
|
||||||
|
|
||||||
`%token_table'
|
`%token-table'
|
||||||
Bison declaration to include a token name table in the parser file.
|
Bison declaration to include a token name table in the parser file.
|
||||||
*Note Decl Summary::.
|
*Note Decl Summary::.
|
||||||
|
|
||||||
@@ -220,13 +256,14 @@ Bison Symbols
|
|||||||
|
|
||||||
`%%'
|
`%%'
|
||||||
Delimiter used to separate the grammar rule section from the Bison
|
Delimiter used to separate the grammar rule section from the Bison
|
||||||
declarations section or the epilogue. *Note The Overall Layout of
|
declarations section or the additional C code section. *Note The
|
||||||
a Bison Grammar: Grammar Layout.
|
Overall Layout of a Bison Grammar: Grammar Layout.
|
||||||
|
|
||||||
`%{ %}'
|
`%{ %}'
|
||||||
All code listed between `%{' and `%}' is copied directly to the
|
All code listed between `%{' and `%}' is copied directly to the
|
||||||
output file uninterpreted. Such code forms the prologue of the
|
output file uninterpreted. Such code forms the "C declarations"
|
||||||
input file. *Note Outline of a Bison Grammar: Grammar Outline.
|
section of the input file. *Note Outline of a Bison Grammar:
|
||||||
|
Grammar Outline.
|
||||||
|
|
||||||
`/*...*/'
|
`/*...*/'
|
||||||
Comment delimiters, as in C.
|
Comment delimiters, as in C.
|
||||||
@@ -823,17 +860,17 @@ Index
|
|||||||
* %token: Token Decl.
|
* %token: Token Decl.
|
||||||
* %type: Type Decl.
|
* %type: Type Decl.
|
||||||
* %union: Union Decl.
|
* %union: Union Decl.
|
||||||
* @$ <1>: Actions and Locations.
|
* @$ <1>: Action Features.
|
||||||
* @$: Action Features.
|
* @$: Actions and Locations.
|
||||||
* @N <1>: Actions and Locations.
|
* @N <1>: Action Features.
|
||||||
* @N: Action Features.
|
* @N: Actions and Locations.
|
||||||
* action: Actions.
|
* action: Actions.
|
||||||
* action data types: Action Types.
|
* action data types: Action Types.
|
||||||
* action features summary: Action Features.
|
* action features summary: Action Features.
|
||||||
* actions in mid-rule: Mid-Rule Actions.
|
* actions in mid-rule: Mid-Rule Actions.
|
||||||
* actions, location: Actions and Locations.
|
* actions, location: Actions and Locations.
|
||||||
* actions, semantic: Semantic Actions.
|
* actions, semantic: Semantic Actions.
|
||||||
* additional C code section: Epilogue.
|
* additional C code section: C Code.
|
||||||
* algorithm of parser: Algorithm.
|
* algorithm of parser: Algorithm.
|
||||||
* associativity: Why Precedence.
|
* associativity: Why Precedence.
|
||||||
* Backus-Naur form: Language and Grammar.
|
* Backus-Naur form: Language and Grammar.
|
||||||
@@ -849,10 +886,12 @@ Index
|
|||||||
* BISON_HAIRY: Environment Variables.
|
* BISON_HAIRY: Environment Variables.
|
||||||
* BISON_SIMPLE: Environment Variables.
|
* BISON_SIMPLE: Environment Variables.
|
||||||
* BNF: Language and Grammar.
|
* BNF: Language and Grammar.
|
||||||
* C code, section for additional: Epilogue.
|
* C code, section for additional: C Code.
|
||||||
|
* C declarations section: C Declarations.
|
||||||
* C-language interface: Interface.
|
* C-language interface: Interface.
|
||||||
* calc: Infix Calc.
|
* calc: Infix Calc.
|
||||||
* calculator, infix notation: Infix Calc.
|
* calculator, infix notation: Infix Calc.
|
||||||
|
* calculator, location tracking: Location Tracking Calc.
|
||||||
* calculator, multi-function: Multi-function Calc.
|
* calculator, multi-function: Multi-function Calc.
|
||||||
* calculator, simple: RPN Calc.
|
* calculator, simple: RPN Calc.
|
||||||
* character token: Symbols.
|
* character token: Symbols.
|
||||||
@@ -869,10 +908,9 @@ Index
|
|||||||
* data types of semantic values: Value Type.
|
* data types of semantic values: Value Type.
|
||||||
* debugging: Debugging.
|
* debugging: Debugging.
|
||||||
* declaration summary: Decl Summary.
|
* declaration summary: Decl Summary.
|
||||||
* declarations: Prologue.
|
|
||||||
* declarations section: Prologue.
|
|
||||||
* declarations, Bison: Declarations.
|
* declarations, Bison: Declarations.
|
||||||
* declarations, Bison (introduction): Bison Declarations.
|
* declarations, Bison (introduction): Bison Declarations.
|
||||||
|
* declarations, C: C Declarations.
|
||||||
* declaring literal string tokens: Token Decl.
|
* declaring literal string tokens: Token Decl.
|
||||||
* declaring operator precedence: Precedence Decl.
|
* declaring operator precedence: Precedence Decl.
|
||||||
* declaring the start symbol: Start Decl.
|
* declaring the start symbol: Start Decl.
|
||||||
@@ -887,7 +925,6 @@ Index
|
|||||||
* defining language semantics: Semantics.
|
* defining language semantics: Semantics.
|
||||||
* else, dangling: Shift/Reduce.
|
* else, dangling: Shift/Reduce.
|
||||||
* environment variables: Environment Variables.
|
* environment variables: Environment Variables.
|
||||||
* epilogue: Epilogue.
|
|
||||||
* error: Error Recovery.
|
* error: Error Recovery.
|
||||||
* error recovery: Error Recovery.
|
* error recovery: Error Recovery.
|
||||||
* error recovery, simple: Simple Error Recovery.
|
* error recovery, simple: Simple Error Recovery.
|
||||||
@@ -925,8 +962,10 @@ Index
|
|||||||
* location <1>: Locations.
|
* location <1>: Locations.
|
||||||
* location: Locations Overview.
|
* location: Locations Overview.
|
||||||
* location actions: Actions and Locations.
|
* location actions: Actions and Locations.
|
||||||
|
* location tracking calculator: Location Tracking Calc.
|
||||||
* look-ahead token: Look-Ahead.
|
* look-ahead token: Look-Ahead.
|
||||||
* LR(1): Mystery Conflicts.
|
* LR(1): Mystery Conflicts.
|
||||||
|
* ltcalc: Location Tracking Calc.
|
||||||
* main function in simple example: Rpcalc Main.
|
* main function in simple example: Rpcalc Main.
|
||||||
* mfcalc: Multi-function Calc.
|
* mfcalc: Multi-function Calc.
|
||||||
* mid-rule actions: Mid-Rule Actions.
|
* mid-rule actions: Mid-Rule Actions.
|
||||||
@@ -944,14 +983,13 @@ Index
|
|||||||
* parser stack overflow: Stack Overflow.
|
* parser stack overflow: Stack Overflow.
|
||||||
* parser state: Parser States.
|
* parser state: Parser States.
|
||||||
* polish notation calculator: RPN Calc.
|
* polish notation calculator: RPN Calc.
|
||||||
* position, textual <1>: Locations Overview.
|
* position, textual <1>: Locations.
|
||||||
* position, textual: Locations.
|
* position, textual: Locations Overview.
|
||||||
* precedence declarations: Precedence Decl.
|
* precedence declarations: Precedence Decl.
|
||||||
* precedence of operators: Precedence.
|
* precedence of operators: Precedence.
|
||||||
* precedence, context-dependent: Contextual Precedence.
|
* precedence, context-dependent: Contextual Precedence.
|
||||||
* precedence, unary operator: Contextual Precedence.
|
* precedence, unary operator: Contextual Precedence.
|
||||||
* preventing warnings about conflicts: Expect Decl.
|
* preventing warnings about conflicts: Expect Decl.
|
||||||
* Prologue: Prologue.
|
|
||||||
* pure parser: Pure Decl.
|
* pure parser: Pure Decl.
|
||||||
* recovery from errors: Error Recovery.
|
* recovery from errors: Error Recovery.
|
||||||
* recursive rule: Recursion.
|
* recursive rule: Recursion.
|
||||||
@@ -1009,8 +1047,8 @@ Index
|
|||||||
* YYBACKUP: Action Features.
|
* YYBACKUP: Action Features.
|
||||||
* yychar: Look-Ahead.
|
* yychar: Look-Ahead.
|
||||||
* yyclearin: Error Recovery.
|
* yyclearin: Error Recovery.
|
||||||
* YYDEBUG: Debugging.
|
|
||||||
* yydebug: Debugging.
|
* yydebug: Debugging.
|
||||||
|
* YYDEBUG: Debugging.
|
||||||
* YYEMPTY: Action Features.
|
* YYEMPTY: Action Features.
|
||||||
* yyerrok: Error Recovery.
|
* yyerrok: Error Recovery.
|
||||||
* YYERROR: Action Features.
|
* YYERROR: Action Features.
|
||||||
|
|||||||
+551
-281
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
@node GNU Free Documentation License
|
@node GNU Free Documentation License
|
||||||
@appendixsec GNU Free Documentation License
|
@appendixsec GNU Free Documentation License
|
||||||
|
|
||||||
@@ -400,4 +399,3 @@ to permit their use in free software.
|
|||||||
@c Local Variables:
|
@c Local Variables:
|
||||||
@c ispell-local-pdict: "ispell-dict"
|
@c ispell-local-pdict: "ispell-dict"
|
||||||
@c End:
|
@c End:
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
@node Copying, Concepts, Conditions, Top
|
@node Copying
|
||||||
@unnumbered GNU GENERAL PUBLIC LICENSE
|
@unnumbered GNU GENERAL PUBLIC LICENSE
|
||||||
@center Version 2, June 1991
|
@center Version 2, June 1991
|
||||||
|
|
||||||
|
|||||||
+19
-13
@@ -19,7 +19,7 @@
|
|||||||
\def\finalout{\overfullrule=0pt}
|
\def\finalout{\overfullrule=0pt}
|
||||||
%\finalout
|
%\finalout
|
||||||
|
|
||||||
% Copyright (c) 1998 Free Software Foundation, Inc.
|
% Copyright (c) 1998, 2001 Free Software Foundation, Inc.
|
||||||
%
|
%
|
||||||
% This file is part of Bison.
|
% This file is part of Bison.
|
||||||
%
|
%
|
||||||
@@ -66,11 +66,11 @@
|
|||||||
% We only change the following to change the version numbers and
|
% We only change the following to change the version numbers and
|
||||||
% such.
|
% such.
|
||||||
|
|
||||||
\def\bisonversion{1.20} % the bison version
|
\def\bisonversion{1.31} % the bison version
|
||||||
|
|
||||||
\def\refcardversion{0.4a} % reference card version
|
\def\refcardversion{0.5} % reference card version
|
||||||
\def\month{August} % month
|
\def\month{November} % month
|
||||||
\def\year{1998} % year
|
\def\year{2001} % year
|
||||||
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
|
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
|
||||||
|
|
||||||
% for copyright notices
|
% for copyright notices
|
||||||
@@ -316,10 +316,13 @@ Options can be used as: \kbd{bison {\it options} {\it filename}}
|
|||||||
\section{Command Line Options}
|
\section{Command Line Options}
|
||||||
%*****************************
|
%*****************************
|
||||||
|
|
||||||
|
\key{Display usage information.} {-h}
|
||||||
|
\key{Display version information.} {-V}
|
||||||
\key{Generate token and {\tt YYSTYPE} definitions.} {-d}
|
\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{Don't put {\tt \#line} directives in the parser.} {-l}
|
||||||
\key{Specify the output file.} {-o {\it filename}}
|
\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{Verbose description of the parser.} {-v}
|
||||||
\key{Emulate {\tt yacc} (generate {\tt y.tab.*} files).} {-y}
|
\key{Emulate {\tt yacc} (generate {\tt y.tab.*} files).} {-y}
|
||||||
|
|
||||||
@@ -362,8 +365,8 @@ definition, {\it n} is a {\it terminal} symbol name, {\it m} is a
|
|||||||
\vskip .10truein
|
\vskip .10truein
|
||||||
|
|
||||||
The {\tt <{\it t\/}>} after {\tt \%token, \%left, \%right} and {\tt
|
The {\tt <{\it t\/}>} after {\tt \%token, \%left, \%right} and {\tt
|
||||||
\%nonassoc} is optional. Additionally, precedence may be overridden with
|
\%nonassoc} is optional. Additionally, precedence may be overridden
|
||||||
embedded {\tt \%prec} commands.
|
in the rules with {\tt \%prec} commands.
|
||||||
|
|
||||||
\section{Parser Definition Files}
|
\section{Parser Definition Files}
|
||||||
%*********************************
|
%*********************************
|
||||||
@@ -397,6 +400,7 @@ The general form for a parser definition is:
|
|||||||
|
|
||||||
Rules take the form:
|
Rules take the form:
|
||||||
|
|
||||||
|
\vskip -\baselineskip
|
||||||
\beginexample
|
\beginexample
|
||||||
non-terminal : {\it statement} 1
|
non-terminal : {\it statement} 1
|
||||||
| {\it statement} 2
|
| {\it statement} 2
|
||||||
@@ -439,15 +443,17 @@ For example:
|
|||||||
\key{Access data associated with a symbol.} {\$\$, \$0\dots\${\it n}}
|
\key{Access data associated with a symbol.} {\$\$, \$0\dots\${\it n}}
|
||||||
\key{Access a field of the data union.} {\$\$.{\it t},
|
\key{Access a field of the data union.} {\$\$.{\it t},
|
||||||
\$0.{\it t}\dots\${\it n}.{\it t}}
|
\$0.{\it t}\dots\${\it n}.{\it t}}
|
||||||
\key{Access data's line position.} {@{\it n}.{\it line\_spec}}
|
\key{Access symbol's location.} {@\$, @0\dots@{\it n}}
|
||||||
\key{Access data's column position.} {@{\it n}.{\it column\_spec}}
|
\key{Access data's line location.} {@{\it x}.{\it line\_spec}}
|
||||||
|
\key{Access data's column location.} {@{\it x}.{\it column\_spec}}
|
||||||
|
|
||||||
|
|
||||||
\vskip .10truein
|
\vskip .10truein
|
||||||
|
%
|
||||||
Where {\it t} is a type defined in the {\tt \%union}, {\it n} is a
|
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},
|
number, {\it x} is a number or \$, {\it line\_spec} one of {\tt
|
||||||
and {\it column\_spec} is specified as either {\tt first_column} or {\tt
|
first_line} and {\tt last_line}, and {\it column\_spec} is specified
|
||||||
last_column}.
|
as either {\tt first_column} or {\tt last_column}.
|
||||||
|
|
||||||
\section {Variables and Types}
|
\section {Variables and Types}
|
||||||
%*****************************
|
%*****************************
|
||||||
|
|||||||
+4
-3
@@ -1,3 +1,4 @@
|
|||||||
@set UPDATED 15 August 2001
|
@set UPDATED 12 November 2001
|
||||||
@set EDITION 1.28c
|
@set UPDATED-MONTH November 2001
|
||||||
@set VERSION 1.28c
|
@set EDITION 1.30e
|
||||||
|
@set VERSION 1.30e
|
||||||
|
|||||||
+4
-3
@@ -1,3 +1,4 @@
|
|||||||
@set UPDATED 15 August 2001
|
@set UPDATED 12 November 2001
|
||||||
@set EDITION 1.28c
|
@set UPDATED-MONTH November 2001
|
||||||
@set VERSION 1.28c
|
@set EDITION 1.30e
|
||||||
|
@set VERSION 1.30e
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
2001-07-24 GNU <[email protected]>
|
2001-09-13 GNU <[email protected]>
|
||||||
|
|
||||||
* Version 0.10.39 released.
|
* Version 0.10.40 released.
|
||||||
|
|
||||||
|
|||||||
+12
-11
@@ -1,19 +1,20 @@
|
|||||||
# Makefile for directory with message catalog handling in GNU NLS Utilities.
|
# 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, 2001 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
# it under the terms of the GNU General Public License as published by
|
# under the terms of the GNU Library General Public License as published
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# by the Free Software Foundation; either version 2, or (at your option)
|
||||||
# any later version.
|
# any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
# GNU General Public License for more details.
|
# Library General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU Library General Public
|
||||||
# along with this program; if not, write to the Free Software
|
# License along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA.
|
||||||
|
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
@@ -74,7 +75,7 @@ DISTFILES.common = Makefile.in \
|
|||||||
config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
|
config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
|
||||||
DISTFILES.generated = plural.c
|
DISTFILES.generated = plural.c
|
||||||
DISTFILES.normal = VERSION
|
DISTFILES.normal = VERSION
|
||||||
DISTFILES.gettext = libintl.glibc
|
DISTFILES.gettext = COPYING.LIB-2 COPYING.LIB-2.1 libintl.glibc
|
||||||
DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
|
DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
|
||||||
|
|
||||||
# Libtool's library version information for libintl.
|
# Libtool's library version information for libintl.
|
||||||
@@ -184,7 +185,7 @@ install-data: all
|
|||||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||||
$(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
|
$(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
|
||||||
$(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
|
$(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
|
||||||
dists="$(DISTFILES.common)"; \
|
dists="COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common)"; \
|
||||||
for file in $$dists; do \
|
for file in $$dists; do \
|
||||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||||
@@ -243,7 +244,7 @@ uninstall:
|
|||||||
: ; \
|
: ; \
|
||||||
fi
|
fi
|
||||||
if test "$(PACKAGE)" = "gettext"; then \
|
if test "$(PACKAGE)" = "gettext"; then \
|
||||||
for file in VERSION ChangeLog $(DISTFILES.common) $(DISTFILES.generated); do \
|
for file in VERSION ChangeLog COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
|
||||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||||
done; \
|
done; \
|
||||||
else \
|
else \
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
GNU gettext library from gettext-0.10.39
|
GNU gettext library from gettext-0.10.40
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Implementation of the bindtextdomain(3) function
|
/* Implementation of the bindtextdomain(3) function
|
||||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Implementation of the dcgettext(3) function.
|
/* Implementation of the dcgettext(3) function.
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Implementation of the internal dcigettext function.
|
/* Implementation of the internal dcigettext function.
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||||
This must come before <config.h> because <config.h> may include
|
This must come before <config.h> because <config.h> may include
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Implementation of the dcngettext(3) function.
|
/* Implementation of the dcngettext(3) function.
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Implementation of the dgettext(3) function.
|
/* Implementation of the dgettext(3) function.
|
||||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Implementation of the dngettext(3) function.
|
/* Implementation of the dngettext(3) function.
|
||||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+9
-8
@@ -2,19 +2,20 @@
|
|||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
|
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Implementation of gettext(3) function.
|
/* Implementation of gettext(3) function.
|
||||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Description of GNU message catalog format: general file layout.
|
/* Description of GNU message catalog format: general file layout.
|
||||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifndef _GETTEXT_H
|
#ifndef _GETTEXT_H
|
||||||
#define _GETTEXT_H 1
|
#define _GETTEXT_H 1
|
||||||
|
|||||||
+9
-8
@@ -2,19 +2,20 @@
|
|||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifndef _GETTEXTP_H
|
#ifndef _GETTEXTP_H
|
||||||
#define _GETTEXTP_H
|
#define _GETTEXTP_H
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Description of GNU message catalog format: string hashing function.
|
/* Description of GNU message catalog format: string hashing function.
|
||||||
Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
|
|||||||
+12
-11
@@ -2,19 +2,20 @@
|
|||||||
Library.
|
Library.
|
||||||
Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
|
Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
/* Tell glibc's <string.h> to provide a prototype for stpcpy().
|
/* Tell glibc's <string.h> to provide a prototype for stpcpy().
|
||||||
This must come before <config.h> because <config.h> may include
|
This must come before <config.h> because <config.h> may include
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifndef _LIBGETTEXT_H
|
#ifndef _LIBGETTEXT_H
|
||||||
#define _LIBGETTEXT_H 1
|
#define _LIBGETTEXT_H 1
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Message catalogs for internationalization.
|
/* Message catalogs for internationalization.
|
||||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifndef _LIBINTL_H
|
#ifndef _LIBINTL_H
|
||||||
#define _LIBINTL_H 1
|
#define _LIBINTL_H 1
|
||||||
|
|||||||
+9
-8
@@ -2,19 +2,20 @@
|
|||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifndef _LOADINFO_H
|
#ifndef _LOADINFO_H
|
||||||
#define _LOADINFO_H 1
|
#define _LOADINFO_H 1
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Load needed message catalogs.
|
/* Load needed message catalogs.
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||||
This must come before <config.h> because <config.h> may include
|
This must come before <config.h> because <config.h> may include
|
||||||
|
|||||||
+10
-9
@@ -1,19 +1,20 @@
|
|||||||
# Locale name alias data base.
|
# Locale name alias data base.
|
||||||
# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
# it under the terms of the GNU General Public License as published by
|
# under the terms of the GNU Library General Public License as published
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# by the Free Software Foundation; either version 2, or (at your option)
|
||||||
# any later version.
|
# any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
# GNU General Public License for more details.
|
# Library General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU Library General Public
|
||||||
# along with this program; if not, write to the Free Software
|
# License along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# 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 format of this file is the same as for the corresponding file of
|
||||||
# the X Window System, which normally can be found in
|
# 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
|
galician gl_ES.ISO-8859-1
|
||||||
german de_DE.ISO-8859-1
|
german de_DE.ISO-8859-1
|
||||||
greek el_GR.ISO-8859-7
|
greek el_GR.ISO-8859-7
|
||||||
hebrew iw_IL.ISO-8859-8
|
hebrew he_IL.ISO-8859-8
|
||||||
hrvatski hr_HR.ISO-8859-2
|
hrvatski hr_HR.ISO-8859-2
|
||||||
hungarian hu_HU.ISO-8859-2
|
hungarian hu_HU.ISO-8859-2
|
||||||
icelandic is_IS.ISO-8859-1
|
icelandic is_IS.ISO-8859-1
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Handle aliases for locale names.
|
/* Handle aliases for locale names.
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||||
This must come before <config.h> because <config.h> may include
|
This must come before <config.h> because <config.h> may include
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Implementation of ngettext(3) function.
|
/* Implementation of ngettext(3) function.
|
||||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+26
-25
@@ -23,19 +23,20 @@
|
|||||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
|
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
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
|
/* 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
|
declaration at the beginning of the file. The declaration in bison's
|
||||||
@@ -66,13 +67,13 @@
|
|||||||
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
||||||
#define YYPARSE_PARAM arg
|
#define YYPARSE_PARAM arg
|
||||||
|
|
||||||
#line 52 "plural.y"
|
#line 53 "plural.y"
|
||||||
typedef union {
|
typedef union {
|
||||||
unsigned long int num;
|
unsigned long int num;
|
||||||
enum operator op;
|
enum operator op;
|
||||||
struct expression *exp;
|
struct expression *exp;
|
||||||
} YYSTYPE;
|
} YYSTYPE;
|
||||||
#line 58 "plural.y"
|
#line 59 "plural.y"
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
/* Prototypes for local functions. */
|
||||||
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
|
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
|
||||||
@@ -234,8 +235,8 @@ static const short yyrhs[] = { 17,
|
|||||||
|
|
||||||
#if YYDEBUG != 0
|
#if YYDEBUG != 0
|
||||||
static const short yyrline[] = { 0,
|
static const short yyrline[] = { 0,
|
||||||
177, 185, 189, 193, 197, 201, 205, 209, 213, 217,
|
178, 186, 190, 194, 198, 202, 206, 210, 214, 218,
|
||||||
221, 226
|
222, 227
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -845,7 +846,7 @@ yyreduce:
|
|||||||
switch (yyn) {
|
switch (yyn) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
#line 178 "plural.y"
|
#line 179 "plural.y"
|
||||||
{
|
{
|
||||||
if (yyvsp[0].exp == NULL)
|
if (yyvsp[0].exp == NULL)
|
||||||
YYABORT;
|
YYABORT;
|
||||||
@@ -853,68 +854,68 @@ case 1:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 2:
|
case 2:
|
||||||
#line 186 "plural.y"
|
#line 187 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
|
yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 3:
|
case 3:
|
||||||
#line 190 "plural.y"
|
#line 191 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
|
yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 4:
|
case 4:
|
||||||
#line 194 "plural.y"
|
#line 195 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
|
yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 5:
|
case 5:
|
||||||
#line 198 "plural.y"
|
#line 199 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 6:
|
case 6:
|
||||||
#line 202 "plural.y"
|
#line 203 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 7:
|
case 7:
|
||||||
#line 206 "plural.y"
|
#line 207 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 8:
|
case 8:
|
||||||
#line 210 "plural.y"
|
#line 211 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 9:
|
case 9:
|
||||||
#line 214 "plural.y"
|
#line 215 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
|
yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 10:
|
case 10:
|
||||||
#line 218 "plural.y"
|
#line 219 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = new_exp_0 (var);
|
yyval.exp = new_exp_0 (var);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 11:
|
case 11:
|
||||||
#line 222 "plural.y"
|
#line 223 "plural.y"
|
||||||
{
|
{
|
||||||
if ((yyval.exp = new_exp_0 (num)) != NULL)
|
if ((yyval.exp = new_exp_0 (num)) != NULL)
|
||||||
yyval.exp->val.num = yyvsp[0].num;
|
yyval.exp->val.num = yyvsp[0].num;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 12:
|
case 12:
|
||||||
#line 227 "plural.y"
|
#line 228 "plural.y"
|
||||||
{
|
{
|
||||||
yyval.exp = yyvsp[-1].exp;
|
yyval.exp = yyvsp[-1].exp;
|
||||||
;
|
;
|
||||||
@@ -1141,7 +1142,7 @@ yyerrhandle:
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#line 232 "plural.y"
|
#line 233 "plural.y"
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
+9
-8
@@ -3,19 +3,20 @@
|
|||||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <[email protected]>, 2000.
|
Written by Ulrich Drepper <[email protected]>, 2000.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
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
|
/* 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
|
declaration at the beginning of the file. The declaration in bison's
|
||||||
|
|||||||
+9
-8
@@ -1,19 +1,20 @@
|
|||||||
/* Implementation of the textdomain(3) function.
|
/* Implementation of the textdomain(3) function.
|
||||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify it
|
||||||
it under the terms of the GNU General Public License as published by
|
under the terms of the GNU Library General Public License as published
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Library General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with this program; if not, write to the Free Software
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
+1
-2
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = ansi2knr
|
|||||||
|
|
||||||
noinst_LIBRARIES = libbison.a
|
noinst_LIBRARIES = libbison.a
|
||||||
|
|
||||||
INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl
|
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||||
|
|
||||||
# Heck, we are still using an old version of Automake which does not
|
# Heck, we are still using an old version of Automake which does not
|
||||||
# understand LIBOBJ additions using $objext...
|
# understand LIBOBJ additions using $objext...
|
||||||
@@ -14,7 +14,6 @@ EXTRA_DIST = malloc.c realloc.c
|
|||||||
libbison_a_SOURCES = \
|
libbison_a_SOURCES = \
|
||||||
error.c error.h \
|
error.c error.h \
|
||||||
getopt.h getopt.c getopt1.c \
|
getopt.h getopt.c getopt1.c \
|
||||||
hash.h hash.c \
|
|
||||||
obstack.h obstack.c \
|
obstack.h obstack.c \
|
||||||
quote.h quote.c quotearg.h quotearg.c \
|
quote.h quote.c quotearg.h quotearg.c \
|
||||||
xalloc.h xmalloc.c xstrdup.c
|
xalloc.h xmalloc.c xstrdup.c
|
||||||
|
|||||||
+27
-33
@@ -1,4 +1,5 @@
|
|||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
@@ -43,6 +44,7 @@ AUTOCONF = @AUTOCONF@
|
|||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
@@ -57,8 +59,12 @@ PRE_UNINSTALL = :
|
|||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
|
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AUTOM4TE = @AUTOM4TE@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
@@ -67,10 +73,7 @@ CC = @CC@
|
|||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
DATADIRNAME = @DATADIRNAME@
|
DATADIRNAME = @DATADIRNAME@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
ECHO_C = @ECHO_C@
|
GCC = @GCC@
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
GLIBC21 = @GLIBC21@
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
@@ -81,12 +84,10 @@ INTLBISON = @INTLBISON@
|
|||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIB = @LIB@
|
||||||
LIBICONV = @LIBICONV@
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
M4 = @M4@
|
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
MSGFMT = @MSGFMT@
|
MSGFMT = @MSGFMT@
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
POFILES = @POFILES@
|
POFILES = @POFILES@
|
||||||
POSUB = @POSUB@
|
POSUB = @POSUB@
|
||||||
@@ -104,7 +105,7 @@ AUTOMAKE_OPTIONS = ansi2knr
|
|||||||
|
|
||||||
noinst_LIBRARIES = libbison.a
|
noinst_LIBRARIES = libbison.a
|
||||||
|
|
||||||
INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl
|
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||||
|
|
||||||
|
|
||||||
# Heck, we are still using an old version of Automake which does not
|
# Heck, we are still using an old version of Automake which does not
|
||||||
@@ -114,7 +115,6 @@ EXTRA_DIST = malloc.c realloc.c
|
|||||||
libbison_a_SOURCES = \
|
libbison_a_SOURCES = \
|
||||||
error.c error.h \
|
error.c error.h \
|
||||||
getopt.h getopt.c getopt1.c \
|
getopt.h getopt.c getopt1.c \
|
||||||
hash.h hash.c \
|
|
||||||
obstack.h obstack.c \
|
obstack.h obstack.c \
|
||||||
quote.h quote.c quotearg.h quotearg.c \
|
quote.h quote.c quotearg.h quotearg.c \
|
||||||
xalloc.h xmalloc.c xstrdup.c
|
xalloc.h xmalloc.c xstrdup.c
|
||||||
@@ -130,9 +130,8 @@ LIBRARIES = $(noinst_LIBRARIES)
|
|||||||
|
|
||||||
libbison_a_AR = $(AR) cru
|
libbison_a_AR = $(AR) cru
|
||||||
am_libbison_a_OBJECTS = error$U.$(OBJEXT) getopt$U.$(OBJEXT) \
|
am_libbison_a_OBJECTS = error$U.$(OBJEXT) getopt$U.$(OBJEXT) \
|
||||||
getopt1$U.$(OBJEXT) hash$U.$(OBJEXT) obstack$U.$(OBJEXT) \
|
getopt1$U.$(OBJEXT) obstack$U.$(OBJEXT) quote$U.$(OBJEXT) \
|
||||||
quote$U.$(OBJEXT) quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) \
|
quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) xstrdup$U.$(OBJEXT)
|
||||||
xstrdup$U.$(OBJEXT)
|
|
||||||
libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
|
libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
|
||||||
|
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
@@ -142,13 +141,13 @@ LDFLAGS = @LDFLAGS@
|
|||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||||
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error$U.Po $(DEPDIR)/getopt$U.Po \
|
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error$U.Po $(DEPDIR)/getopt$U.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/getopt1$U.Po $(DEPDIR)/hash$U.Po \
|
@AMDEP_TRUE@ $(DEPDIR)/getopt1$U.Po $(DEPDIR)/malloc.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/malloc.Po $(DEPDIR)/memchr.Po \
|
@AMDEP_TRUE@ $(DEPDIR)/memchr.Po $(DEPDIR)/obstack$U.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/obstack$U.Po $(DEPDIR)/quote$U.Po \
|
@AMDEP_TRUE@ $(DEPDIR)/quote$U.Po $(DEPDIR)/quotearg$U.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/quotearg$U.Po $(DEPDIR)/realloc.Po \
|
@AMDEP_TRUE@ $(DEPDIR)/realloc.Po $(DEPDIR)/stpcpy.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/stpcpy.Po $(DEPDIR)/strndup.Po \
|
@AMDEP_TRUE@ $(DEPDIR)/strndup.Po $(DEPDIR)/strnlen.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/strnlen.Po $(DEPDIR)/strspn.Po \
|
@AMDEP_TRUE@ $(DEPDIR)/strspn.Po $(DEPDIR)/xmalloc$U.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/xmalloc$U.Po $(DEPDIR)/xstrdup$U.Po
|
@AMDEP_TRUE@ $(DEPDIR)/xstrdup$U.Po
|
||||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
CCLD = $(CC)
|
CCLD = $(CC)
|
||||||
@@ -167,9 +166,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
|||||||
cd $(top_srcdir) && \
|
cd $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu lib/Makefile
|
$(AUTOMAKE) --gnu lib/Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
cd $(top_builddir) && \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
|
||||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
AR = ar
|
AR = ar
|
||||||
|
|
||||||
@@ -195,12 +192,11 @@ clean-krextra:
|
|||||||
-rm -f ansi2knr
|
-rm -f ansi2knr
|
||||||
|
|
||||||
mostlyclean-kr:
|
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)/error$U.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt$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)/getopt1$U.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hash$U.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.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)/memchr.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack$U.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack$U.Po@am__quote@
|
||||||
@@ -237,8 +233,6 @@ 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
|
$(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)
|
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
|
$(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
|
||||||
hash_.c: hash.c $(ANSI2KNR)
|
|
||||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hash.c; then echo $(srcdir)/hash.c; else echo hash.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hash_.c || rm -f hash_.c
|
|
||||||
malloc_.c: malloc.c $(ANSI2KNR)
|
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
|
$(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)
|
memchr_.c: memchr.c $(ANSI2KNR)
|
||||||
@@ -264,10 +258,10 @@ xmalloc_.c: xmalloc.c $(ANSI2KNR)
|
|||||||
xstrdup_.c: xstrdup.c $(ANSI2KNR)
|
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
|
$(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) \
|
alloca_.$(OBJEXT) error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) \
|
||||||
hash_.$(OBJEXT) malloc_.$(OBJEXT) memchr_.$(OBJEXT) obstack_.$(OBJEXT) \
|
malloc_.$(OBJEXT) memchr_.$(OBJEXT) obstack_.$(OBJEXT) quote_.$(OBJEXT) \
|
||||||
quote_.$(OBJEXT) quotearg_.$(OBJEXT) realloc_.$(OBJEXT) \
|
quotearg_.$(OBJEXT) realloc_.$(OBJEXT) stpcpy_.$(OBJEXT) \
|
||||||
stpcpy_.$(OBJEXT) strndup_.$(OBJEXT) strnlen_.$(OBJEXT) \
|
strndup_.$(OBJEXT) strnlen_.$(OBJEXT) strspn_.$(OBJEXT) \
|
||||||
strspn_.$(OBJEXT) xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) : $(ANSI2KNR)
|
xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) : $(ANSI2KNR)
|
||||||
uninstall-info-am:
|
uninstall-info-am:
|
||||||
|
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
@@ -295,7 +289,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
||||||
|
|
||||||
GTAGS:
|
GTAGS:
|
||||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
&& cd $(top_srcdir) \
|
&& cd $(top_srcdir) \
|
||||||
&& gtags -i $(GTAGS_ARGS) $$here
|
&& gtags -i $(GTAGS_ARGS) $$here
|
||||||
|
|
||||||
|
|||||||
+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$*/
|
/*$Id$*/
|
||||||
/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
|
/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
|
||||||
@@ -37,27 +37,62 @@ program under the GPL.
|
|||||||
* There are no error messages.
|
* There are no error messages.
|
||||||
*
|
*
|
||||||
* ansi2knr recognizes function definitions by seeing a non-keyword
|
* ansi2knr recognizes function definitions by seeing a non-keyword
|
||||||
* identifier at the left margin, followed by a left parenthesis,
|
* identifier at the left margin, followed by a left parenthesis, with a
|
||||||
* with a right parenthesis as the last character on the line,
|
* right parenthesis as the last character on the line, and with a left
|
||||||
* and with a left brace as the first token on the following line
|
* brace as the first token on the following line (ignoring possible
|
||||||
* (ignoring possible intervening comments), except that a line
|
* intervening comments and/or preprocessor directives), except that a line
|
||||||
* consisting of only
|
* consisting of only
|
||||||
* identifier1(identifier2)
|
* identifier1(identifier2)
|
||||||
* will not be considered a function definition unless identifier2 is
|
* will not be considered a function definition unless identifier2 is
|
||||||
* the word "void". ansi2knr will recognize a multi-line header provided
|
* the word "void", and a line consisting of
|
||||||
* that no intervening line ends with a left or right brace or a semicolon.
|
* identifier1(identifier2, <<arbitrary>>)
|
||||||
* These algorithms ignore whitespace and comments, except that
|
* will not be considered a function definition.
|
||||||
* the function name must be the first thing on the line.
|
* ansi2knr will recognize a multi-line header provided that no intervening
|
||||||
* The following constructs will confuse it:
|
* 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
|
* - Any other construct that starts at the left margin and
|
||||||
* follows the above syntax (such as a macro or function call).
|
* 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
|
* The original and principal author of ansi2knr is L. Peter Deutsch
|
||||||
* <ghost@aladdin.com>. Other authors are noted in the change history
|
* <ghost@aladdin.com>. Other authors are noted in the change history
|
||||||
* that follows (in reverse chronological order):
|
* 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)
|
lpd 1998-11-09 added further hack to recognize identifier(void)
|
||||||
as being a procedure
|
as being a procedure
|
||||||
lpd 1998-10-23 added hack to recognize lines consisting of
|
lpd 1998-10-23 added hack to recognize lines consisting of
|
||||||
@@ -153,19 +188,24 @@ program under the GPL.
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Define NULL (for *very* old compilers). */
|
||||||
|
#ifndef NULL
|
||||||
|
# define NULL (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The ctype macros don't always handle 8-bit characters correctly.
|
* The ctype macros don't always handle 8-bit characters correctly.
|
||||||
* Compensate for this here.
|
* Compensate for this here.
|
||||||
*/
|
*/
|
||||||
#ifdef isascii
|
#ifdef isascii
|
||||||
# undef HAVE_ISASCII /* just in case */
|
# undef HAVE_ISASCII /* just in case */
|
||||||
# define HAVE_ISASCII 1
|
# define HAVE_ISASCII 1
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
#if STDC_HEADERS || !HAVE_ISASCII
|
#if STDC_HEADERS || !HAVE_ISASCII
|
||||||
# define is_ascii(c) 1
|
# define is_ascii(c) 1
|
||||||
#else
|
#else
|
||||||
# define is_ascii(c) isascii(c)
|
# define is_ascii(c) isascii(c)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define is_space(c) (is_ascii(c) && isspace(c))
|
#define is_space(c) (is_ascii(c) && isspace(c))
|
||||||
@@ -177,7 +217,10 @@ program under the GPL.
|
|||||||
#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
|
#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
|
||||||
|
|
||||||
/* Forward references */
|
/* Forward references */
|
||||||
|
char *ppdirforward();
|
||||||
|
char *ppdirbackward();
|
||||||
char *skipspace();
|
char *skipspace();
|
||||||
|
char *scanstring();
|
||||||
int writeblanks();
|
int writeblanks();
|
||||||
int test1();
|
int test1();
|
||||||
int convert1();
|
int convert1();
|
||||||
@@ -190,6 +233,8 @@ main(argc, argv)
|
|||||||
{ FILE *in = stdin;
|
{ FILE *in = stdin;
|
||||||
FILE *out = stdout;
|
FILE *out = stdout;
|
||||||
char *filename = 0;
|
char *filename = 0;
|
||||||
|
char *program_name = argv[0];
|
||||||
|
char *output_name = 0;
|
||||||
#define bufsize 5000 /* arbitrary size */
|
#define bufsize 5000 /* arbitrary size */
|
||||||
char *buf;
|
char *buf;
|
||||||
char *line;
|
char *line;
|
||||||
@@ -205,6 +250,7 @@ main(argc, argv)
|
|||||||
* check for this switch for backward compatibility.
|
* check for this switch for backward compatibility.
|
||||||
*/
|
*/
|
||||||
int convert_varargs = 1;
|
int convert_varargs = 1;
|
||||||
|
int output_error;
|
||||||
|
|
||||||
while ( argc > 1 && argv[1][0] == '-' ) {
|
while ( argc > 1 && argv[1][0] == '-' ) {
|
||||||
if ( !strcmp(argv[1], "--varargs") ) {
|
if ( !strcmp(argv[1], "--varargs") ) {
|
||||||
@@ -219,7 +265,8 @@ main(argc, argv)
|
|||||||
argv += 2;
|
argv += 2;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "Unrecognized switch: %s\n", argv[1]);
|
fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
|
||||||
|
argv[1]);
|
||||||
fprintf(stderr, usage);
|
fprintf(stderr, usage);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -229,16 +276,19 @@ main(argc, argv)
|
|||||||
fprintf(stderr, usage);
|
fprintf(stderr, usage);
|
||||||
exit(0);
|
exit(0);
|
||||||
case 3:
|
case 3:
|
||||||
out = fopen(argv[2], "w");
|
output_name = argv[2];
|
||||||
|
out = fopen(output_name, "w");
|
||||||
if ( out == NULL ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
/* falls through */
|
/* falls through */
|
||||||
case 2:
|
case 2:
|
||||||
in = fopen(argv[1], "r");
|
in = fopen(argv[1], "r");
|
||||||
if ( in == NULL ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
if ( filename == 0 )
|
if ( filename == 0 )
|
||||||
@@ -250,6 +300,11 @@ main(argc, argv)
|
|||||||
if ( filename )
|
if ( filename )
|
||||||
fprintf(out, "#line 1 \"%s\"\n", filename);
|
fprintf(out, "#line 1 \"%s\"\n", filename);
|
||||||
buf = malloc(bufsize);
|
buf = malloc(bufsize);
|
||||||
|
if ( buf == NULL )
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Unable to allocate read buffer!\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
line = buf;
|
line = buf;
|
||||||
while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
|
while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
|
||||||
{
|
{
|
||||||
@@ -266,7 +321,7 @@ f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
|
|||||||
goto wl;
|
goto wl;
|
||||||
if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
|
if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
|
||||||
goto wl;
|
goto wl;
|
||||||
switch ( *skipspace(more, 1) )
|
switch ( *skipspace(ppdirforward(more), 1) )
|
||||||
{
|
{
|
||||||
case '{':
|
case '{':
|
||||||
/* Definitely a function header. */
|
/* Definitely a function header. */
|
||||||
@@ -300,32 +355,91 @@ wl: fputs(buf, out);
|
|||||||
if ( line != buf )
|
if ( line != buf )
|
||||||
fputs(buf, out);
|
fputs(buf, out);
|
||||||
free(buf);
|
free(buf);
|
||||||
if ( out != stdout )
|
if ( output_name ) {
|
||||||
fclose(out);
|
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 )
|
if ( in != stdin )
|
||||||
fclose(in);
|
fclose(in);
|
||||||
return 0;
|
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 *
|
char *
|
||||||
skipspace(p, dir)
|
skipspace(p, dir)
|
||||||
register char *p;
|
char *p;
|
||||||
register int dir; /* 1 for forward, -1 for backward */
|
int dir; /* 1 for forward, -1 for backward */
|
||||||
{ for ( ; ; )
|
{
|
||||||
{ while ( is_space(*p) )
|
for ( ; ; ) {
|
||||||
p += dir;
|
while ( is_space(*p) )
|
||||||
if ( !(*p == '/' && p[dir] == '*') )
|
p += dir;
|
||||||
break;
|
if ( !(*p == '/' && p[dir] == '*') )
|
||||||
p += dir; p += dir;
|
break;
|
||||||
while ( !(*p == '*' && p[dir] == '/') )
|
p += dir; p += dir;
|
||||||
{ if ( *p == 0 )
|
while ( !(*p == '*' && p[dir] == '/') ) {
|
||||||
return p; /* multi-line comment?? */
|
if ( *p == 0 )
|
||||||
p += dir;
|
return p; /* multi-line comment?? */
|
||||||
}
|
p += dir;
|
||||||
p += dir; p += dir;
|
}
|
||||||
}
|
p += dir; p += dir;
|
||||||
return p;
|
}
|
||||||
|
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
|
int
|
||||||
test1(buf)
|
test1(buf)
|
||||||
char *buf;
|
char *buf;
|
||||||
{ register char *p = buf;
|
{ char *p = buf;
|
||||||
char *bend;
|
char *bend;
|
||||||
char *endfn;
|
char *endfn;
|
||||||
int contin;
|
int contin;
|
||||||
|
|
||||||
if ( !isidfirstchar(*p) )
|
if ( !isidfirstchar(*p) )
|
||||||
return 0; /* no name at left margin */
|
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 )
|
switch ( *bend )
|
||||||
{
|
{
|
||||||
case ';': contin = 0 /*2*/; break;
|
case ';': contin = 0 /*2*/; break;
|
||||||
@@ -396,7 +510,7 @@ test1(buf)
|
|||||||
};
|
};
|
||||||
char **key = words;
|
char **key = words;
|
||||||
char *kp;
|
char *kp;
|
||||||
int len = endfn - buf;
|
unsigned len = endfn - buf;
|
||||||
|
|
||||||
while ( (kp = *key) != 0 )
|
while ( (kp = *key) != 0 )
|
||||||
{ if ( strlen(kp) == len && !strncmp(kp, buf, len) )
|
{ if ( strlen(kp) == len && !strncmp(kp, buf, len) )
|
||||||
@@ -409,14 +523,16 @@ test1(buf)
|
|||||||
int len;
|
int len;
|
||||||
/*
|
/*
|
||||||
* Check for identifier1(identifier2) and not
|
* Check for identifier1(identifier2) and not
|
||||||
* identifier1(void).
|
* identifier1(void), or identifier1(identifier2, xxxx).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
while ( isidchar(*p) )
|
while ( isidchar(*p) )
|
||||||
p++;
|
p++;
|
||||||
len = p - id;
|
len = p - id;
|
||||||
p = skipspace(p, 1);
|
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 */
|
return 0; /* not a function */
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@@ -443,7 +559,7 @@ convert1(buf, out, header, convert_varargs)
|
|||||||
int header; /* Boolean */
|
int header; /* Boolean */
|
||||||
int convert_varargs; /* Boolean */
|
int convert_varargs; /* Boolean */
|
||||||
{ char *endfn;
|
{ char *endfn;
|
||||||
register char *p;
|
char *p;
|
||||||
/*
|
/*
|
||||||
* The breaks table contains pointers to the beginning and end
|
* The breaks table contains pointers to the beginning and end
|
||||||
* of each argument.
|
* of each argument.
|
||||||
@@ -461,7 +577,7 @@ convert1(buf, out, header, convert_varargs)
|
|||||||
;
|
;
|
||||||
top: p = endfn;
|
top: p = endfn;
|
||||||
breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
|
breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
|
||||||
if ( breaks == 0 )
|
if ( breaks == NULL )
|
||||||
{ /* Couldn't allocate break table, give up */
|
{ /* Couldn't allocate break table, give up */
|
||||||
fprintf(stderr, "Unable to allocate break table!\n");
|
fprintf(stderr, "Unable to allocate break table!\n");
|
||||||
fputs(buf, out);
|
fputs(buf, out);
|
||||||
@@ -473,7 +589,7 @@ top: p = endfn;
|
|||||||
do
|
do
|
||||||
{ int level = 0;
|
{ int level = 0;
|
||||||
char *lp = NULL;
|
char *lp = NULL;
|
||||||
char *rp;
|
char *rp = NULL;
|
||||||
char *end = NULL;
|
char *end = NULL;
|
||||||
|
|
||||||
if ( bp >= btop )
|
if ( bp >= btop )
|
||||||
@@ -500,14 +616,18 @@ top: p = endfn;
|
|||||||
else rp = p;
|
else rp = p;
|
||||||
break;
|
break;
|
||||||
case '/':
|
case '/':
|
||||||
p = skipspace(p, 1) - 1;
|
if (p[1] == '*')
|
||||||
|
p = skipspace(p, 1) - 1;
|
||||||
break;
|
break;
|
||||||
|
case '"':
|
||||||
|
p = scanstring(p, 1) - 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Erase any embedded prototype parameters. */
|
/* Erase any embedded prototype parameters. */
|
||||||
if ( lp )
|
if ( lp && rp )
|
||||||
writeblanks(lp + 1, rp);
|
writeblanks(lp + 1, rp);
|
||||||
p--; /* back up over terminator */
|
p--; /* back up over terminator */
|
||||||
/* Find the name being declared. */
|
/* Find the name being declared. */
|
||||||
@@ -523,9 +643,19 @@ top: p = endfn;
|
|||||||
while ( level )
|
while ( level )
|
||||||
switch ( *--p )
|
switch ( *--p )
|
||||||
{
|
{
|
||||||
case ']': case ')': level++; break;
|
case ']': case ')':
|
||||||
case '[': case '(': level--; break;
|
level++;
|
||||||
case '/': p = skipspace(p, -1) + 1; break;
|
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: ;
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+198
-74
@@ -1,23 +1,22 @@
|
|||||||
/* Error handler for noninteractive utilities
|
/* 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
|
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 C library, however. The master source lives in /gd/gnu/lib.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
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
|
modify it under the terms of the GNU Lesser General Public
|
||||||
published by the Free Software Foundation; either version 2 of the
|
License as published by the Free Software Foundation; either
|
||||||
License, or (at your option) any later version.
|
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,
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
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
|
You should have received a copy of the GNU Lesser General Public
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
License along with the GNU C Library; if not, write to the Free
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
Boston, MA 02111-1307, USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
/* Written by David MacKenzie <[email protected]>. */
|
/* Written by David MacKenzie <[email protected]>. */
|
||||||
|
|
||||||
@@ -29,6 +28,10 @@
|
|||||||
#if HAVE_LIBINTL_H
|
#if HAVE_LIBINTL_H
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _LIBC
|
||||||
|
# include <wchar.h>
|
||||||
|
# define mbsrtowcs __mbsrtowcs
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
||||||
# if __STDC__
|
# if __STDC__
|
||||||
@@ -52,13 +55,6 @@ void exit ();
|
|||||||
|
|
||||||
#include "error.h"
|
#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 _
|
#ifndef _
|
||||||
# define _(String) String
|
# define _(String) String
|
||||||
#endif
|
#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.
|
/* In GNU libc we want do not want to use the common name `error' directly.
|
||||||
Instead make it a weak alias. */
|
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 __error
|
||||||
# define error_at_line __error_at_line
|
# define error_at_line __error_at_line
|
||||||
|
|
||||||
@@ -93,21 +95,30 @@ unsigned int error_message_count;
|
|||||||
|
|
||||||
#else /* not _LIBC */
|
#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
|
/* The calling program should define program_name and set it to the
|
||||||
name of the executing program. */
|
name of the executing program. */
|
||||||
extern char *program_name;
|
extern char *program_name;
|
||||||
|
|
||||||
# ifdef HAVE_STRERROR_R
|
# if HAVE_STRERROR_R || defined strerror_r
|
||||||
# define __strerror_r strerror_r
|
# define __strerror_r strerror_r
|
||||||
# else
|
# else
|
||||||
# if HAVE_STRERROR
|
# 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 ();
|
char *strerror ();
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
static char *
|
static char *
|
||||||
private_strerror (errnum)
|
private_strerror (int errnum)
|
||||||
int errnum;
|
|
||||||
{
|
{
|
||||||
extern char *sys_errlist[];
|
extern char *sys_errlist[];
|
||||||
extern int sys_nerr;
|
extern int sys_nerr;
|
||||||
@@ -118,15 +129,118 @@ private_strerror (errnum)
|
|||||||
}
|
}
|
||||||
# define strerror private_strerror
|
# define strerror private_strerror
|
||||||
# endif /* HAVE_STRERROR */
|
# endif /* HAVE_STRERROR */
|
||||||
# endif /* HAVE_STRERROR_R */
|
# endif /* HAVE_STRERROR_R || defined strerror_r */
|
||||||
#endif /* not _LIBC */
|
#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
|
/* Print the program name and error message MESSAGE, which is a printf-style
|
||||||
format string with optional args.
|
format string with optional args.
|
||||||
If ERRNUM is nonzero, print its corresponding system error message.
|
If ERRNUM is nonzero, print its corresponding system error message.
|
||||||
Exit with status STATUS if it is nonzero. */
|
Exit with status STATUS if it is nonzero. */
|
||||||
/* VARARGS */
|
/* VARARGS */
|
||||||
|
|
||||||
void
|
void
|
||||||
#if defined VA_START && __STDC__
|
#if defined VA_START && __STDC__
|
||||||
error (int status, int errnum, const char *message, ...)
|
error (int status, int errnum, const char *message, ...)
|
||||||
@@ -142,47 +256,48 @@ error (status, errnum, message, va_alist)
|
|||||||
va_list args;
|
va_list args;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
fflush (stdout);
|
||||||
|
#ifdef _LIBC
|
||||||
|
# ifdef USE_IN_LIBIO
|
||||||
|
_IO_flockfile (stderr);
|
||||||
|
# else
|
||||||
|
__flockfile (stderr);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
if (error_print_progname)
|
if (error_print_progname)
|
||||||
(*error_print_progname) ();
|
(*error_print_progname) ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fflush (stdout);
|
#if _LIBC && USE_IN_LIBIO
|
||||||
fprintf (stderr, "%s: ", program_name);
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
|
__fwprintf (stderr, L"%s: ", program_name);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
fprintf (stderr, "%s: ", program_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VA_START
|
#ifdef VA_START
|
||||||
VA_START (args, message);
|
VA_START (args, message);
|
||||||
# if HAVE_VPRINTF || _LIBC
|
error_tail (status, errnum, message, args);
|
||||||
vfprintf (stderr, message, args);
|
|
||||||
# else
|
|
||||||
_doprnt (message, args, stderr);
|
|
||||||
# endif
|
|
||||||
va_end (args);
|
|
||||||
#else
|
#else
|
||||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||||
#endif
|
|
||||||
|
|
||||||
++error_message_count;
|
++error_message_count;
|
||||||
if (errnum)
|
if (errnum)
|
||||||
{
|
print_errno_message (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
|
|
||||||
}
|
|
||||||
putc ('\n', stderr);
|
putc ('\n', stderr);
|
||||||
fflush (stderr);
|
fflush (stderr);
|
||||||
if (status)
|
if (status)
|
||||||
exit (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
|
/* 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 const char *old_file_name;
|
||||||
static unsigned int old_line_number;
|
static unsigned int old_line_number;
|
||||||
|
|
||||||
if (old_line_number == line_number &&
|
if (old_line_number == line_number
|
||||||
(file_name == old_file_name || !strcmp (old_file_name, file_name)))
|
&& (file_name == old_file_name
|
||||||
|
|| strcmp (old_file_name, file_name) == 0))
|
||||||
/* Simply return and print nothing. */
|
/* Simply return and print nothing. */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -221,50 +337,58 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
|
|||||||
old_line_number = line_number;
|
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)
|
if (error_print_progname)
|
||||||
(*error_print_progname) ();
|
(*error_print_progname) ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fflush (stdout);
|
#if _LIBC && USE_IN_LIBIO
|
||||||
fprintf (stderr, "%s:", program_name);
|
if (_IO_fwide (stderr, 0) > 0)
|
||||||
|
__fwprintf (stderr, L"%s: ", program_name);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
fprintf (stderr, "%s:", program_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_name != NULL)
|
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
|
#ifdef VA_START
|
||||||
VA_START (args, message);
|
VA_START (args, message);
|
||||||
# if HAVE_VPRINTF || _LIBC
|
error_tail (status, errnum, message, args);
|
||||||
vfprintf (stderr, message, args);
|
|
||||||
# else
|
|
||||||
_doprnt (message, args, stderr);
|
|
||||||
# endif
|
|
||||||
va_end (args);
|
|
||||||
#else
|
#else
|
||||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||||
#endif
|
|
||||||
|
|
||||||
++error_message_count;
|
++error_message_count;
|
||||||
if (errnum)
|
if (errnum)
|
||||||
{
|
print_errno_message (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
|
|
||||||
}
|
|
||||||
putc ('\n', stderr);
|
putc ('\n', stderr);
|
||||||
fflush (stderr);
|
fflush (stderr);
|
||||||
if (status)
|
if (status)
|
||||||
exit (status);
|
exit (status);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
# ifdef USE_IN_LIBIO
|
||||||
|
_IO_funlockfile (stderr);
|
||||||
|
# else
|
||||||
|
__funlockfile (stderr);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#ifndef __attribute__
|
#ifndef __attribute__
|
||||||
/* This feature is available in gcc versions 2.5 and later. */
|
/* 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 */
|
# define __attribute__(Spec) /* empty */
|
||||||
# endif
|
# endif
|
||||||
/* The __-protected variants of `format' and `printf' attributes
|
/* The __-protected variants of `format' and `printf' attributes
|
||||||
|
|||||||
+59
-40
@@ -1,23 +1,25 @@
|
|||||||
/* Getopt for GNU.
|
/* Getopt for GNU.
|
||||||
NOTE: The canonical source of this file is maintained with the GNU
|
NOTE: getopt is now part of the C library, so if you don't know what
|
||||||
C Library. Bugs can be reported to bug-glibc@gnu.org.
|
"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, 97, 98, 99
|
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
|
||||||
Free Software Foundation, Inc.
|
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
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
under the terms of the GNU General Public License as published by the
|
modify it under the terms of the GNU Lesser General Public
|
||||||
Free Software Foundation; either version 2, or (at your option) any
|
License as published by the Free Software Foundation; either
|
||||||
later version.
|
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
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Lesser General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with the GNU C Library; if not, write to the Free
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
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>.
|
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||||
@@ -27,13 +29,13 @@
|
|||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#else
|
#endif
|
||||||
# if !defined __STDC__ || !__STDC__
|
|
||||||
|
#if !defined __STDC__ || !__STDC__
|
||||||
/* This is a separate conditional since some stdc systems
|
/* This is a separate conditional since some stdc systems
|
||||||
reject `defined (const)'. */
|
reject `defined (const)'. */
|
||||||
# ifndef const
|
# ifndef const
|
||||||
# define const
|
# define const
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -75,11 +77,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _
|
#ifndef _
|
||||||
/* This is for other GNU distributions with internationalized messages.
|
/* This is for other GNU distributions with internationalized messages. */
|
||||||
When compiling libc, the _ macro is predefined. */
|
# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||||
# ifdef HAVE_LIBINTL_H
|
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
# define _(msgid) gettext (msgid)
|
# ifndef _
|
||||||
|
# define _(msgid) gettext (msgid)
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
# define _(msgid) (msgid)
|
# define _(msgid) (msgid)
|
||||||
# endif
|
# endif
|
||||||
@@ -250,11 +253,13 @@ static int last_nonopt;
|
|||||||
/* Bash 2.0 gives us an environment variable containing flags
|
/* Bash 2.0 gives us an environment variable containing flags
|
||||||
indicating ARGV elements that should not be considered arguments. */
|
indicating ARGV elements that should not be considered arguments. */
|
||||||
|
|
||||||
|
#ifdef USE_NONOPTION_FLAGS
|
||||||
/* Defined in getopt_init.c */
|
/* Defined in getopt_init.c */
|
||||||
extern char *__getopt_nonoption_flags;
|
extern char *__getopt_nonoption_flags;
|
||||||
|
|
||||||
static int nonoption_flags_max_len;
|
static int nonoption_flags_max_len;
|
||||||
static int nonoption_flags_len;
|
static int nonoption_flags_len;
|
||||||
|
#endif
|
||||||
|
|
||||||
static int original_argc;
|
static int original_argc;
|
||||||
static char *const *original_argv;
|
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);
|
text_set_element (__libc_subinit, store_args_and_env);
|
||||||
# endif /* text_set_element */
|
# endif /* text_set_element */
|
||||||
|
|
||||||
# define SWAP_FLAGS(ch1, ch2) \
|
# ifdef USE_NONOPTION_FLAGS
|
||||||
|
# define SWAP_FLAGS(ch1, ch2) \
|
||||||
if (nonoption_flags_len > 0) \
|
if (nonoption_flags_len > 0) \
|
||||||
{ \
|
{ \
|
||||||
char __tmp = __getopt_nonoption_flags[ch1]; \
|
char __tmp = __getopt_nonoption_flags[ch1]; \
|
||||||
__getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
|
__getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
|
||||||
__getopt_nonoption_flags[ch2] = __tmp; \
|
__getopt_nonoption_flags[ch2] = __tmp; \
|
||||||
}
|
}
|
||||||
|
# else
|
||||||
|
# define SWAP_FLAGS(ch1, ch2)
|
||||||
|
# endif
|
||||||
#else /* !_LIBC */
|
#else /* !_LIBC */
|
||||||
# define SWAP_FLAGS(ch1, ch2)
|
# define SWAP_FLAGS(ch1, ch2)
|
||||||
#endif /* _LIBC */
|
#endif /* _LIBC */
|
||||||
@@ -313,7 +322,7 @@ exchange (argv)
|
|||||||
It leaves the longer segment in the right place overall,
|
It leaves the longer segment in the right place overall,
|
||||||
but it consists of two parts that need to be swapped next. */
|
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'
|
/* First make sure the handling of the `__getopt_nonoption_flags'
|
||||||
string can work normally. Our top argument must be in the range
|
string can work normally. Our top argument must be in the range
|
||||||
of the string. */
|
of the string. */
|
||||||
@@ -417,7 +426,7 @@ _getopt_initialize (argc, argv, optstring)
|
|||||||
else
|
else
|
||||||
ordering = PERMUTE;
|
ordering = PERMUTE;
|
||||||
|
|
||||||
#ifdef _LIBC
|
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||||
if (posixly_correct == NULL
|
if (posixly_correct == NULL
|
||||||
&& argc == original_argc && argv == original_argv)
|
&& argc == original_argc && argv == original_argv)
|
||||||
{
|
{
|
||||||
@@ -515,6 +524,13 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
int *longind;
|
int *longind;
|
||||||
int long_only;
|
int long_only;
|
||||||
{
|
{
|
||||||
|
int print_errors = opterr;
|
||||||
|
if (optstring[0] == ':')
|
||||||
|
print_errors = 0;
|
||||||
|
|
||||||
|
if (argc < 1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
optarg = NULL;
|
optarg = NULL;
|
||||||
|
|
||||||
if (optind == 0 || !__getopt_initialized)
|
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
|
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
|
from the shell indicating it is not an option. The later information
|
||||||
is only used when the used in the GNU libc. */
|
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' \
|
# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|
||||||
|| (optind < nonoption_flags_len \
|
|| (optind < nonoption_flags_len \
|
||||||
&& __getopt_nonoption_flags[optind] == '1'))
|
&& __getopt_nonoption_flags[optind] == '1'))
|
||||||
@@ -664,14 +680,17 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
pfound = p;
|
pfound = p;
|
||||||
indfound = option_index;
|
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. */
|
/* Second or later nonexact match found. */
|
||||||
ambig = 1;
|
ambig = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ambig && !exact)
|
if (ambig && !exact)
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
|
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
|
||||||
argv[0], argv[optind]);
|
argv[0], argv[optind]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
@@ -692,7 +711,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
optarg = nameend + 1;
|
optarg = nameend + 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
{
|
{
|
||||||
if (argv[optind - 1][1] == '-')
|
if (argv[optind - 1][1] == '-')
|
||||||
/* --option */
|
/* --option */
|
||||||
@@ -718,7 +737,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
optarg = argv[optind++];
|
optarg = argv[optind++];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `%s' requires an argument\n"),
|
_("%s: option `%s' requires an argument\n"),
|
||||||
argv[0], argv[optind - 1]);
|
argv[0], argv[optind - 1]);
|
||||||
@@ -745,7 +764,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
if (!long_only || argv[optind][1] == '-'
|
if (!long_only || argv[optind][1] == '-'
|
||||||
|| my_index (optstring, *nextchar) == NULL)
|
|| my_index (optstring, *nextchar) == NULL)
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
{
|
{
|
||||||
if (argv[optind][1] == '-')
|
if (argv[optind][1] == '-')
|
||||||
/* --option */
|
/* --option */
|
||||||
@@ -775,7 +794,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
|
|
||||||
if (temp == NULL || c == ':')
|
if (temp == NULL || c == ':')
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
{
|
{
|
||||||
if (posixly_correct)
|
if (posixly_correct)
|
||||||
/* 1003.2 specifies the format of this message. */
|
/* 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)
|
else if (optind == argc)
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
{
|
{
|
||||||
/* 1003.2 specifies the format of this message. */
|
/* 1003.2 specifies the format of this message. */
|
||||||
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
|
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 (ambig && !exact)
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
|
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
|
||||||
argv[0], argv[optind]);
|
argv[0], argv[optind]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
@@ -876,7 +895,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
optarg = nameend + 1;
|
optarg = nameend + 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
fprintf (stderr, _("\
|
fprintf (stderr, _("\
|
||||||
%s: option `-W %s' doesn't allow an argument\n"),
|
%s: option `-W %s' doesn't allow an argument\n"),
|
||||||
argv[0], pfound->name);
|
argv[0], pfound->name);
|
||||||
@@ -891,7 +910,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
optarg = argv[optind++];
|
optarg = argv[optind++];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `%s' requires an argument\n"),
|
_("%s: option `%s' requires an argument\n"),
|
||||||
argv[0], argv[optind - 1]);
|
argv[0], argv[optind - 1]);
|
||||||
@@ -938,12 +957,12 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
}
|
}
|
||||||
else if (optind == argc)
|
else if (optind == argc)
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (print_errors)
|
||||||
{
|
{
|
||||||
/* 1003.2 specifies the format of this message. */
|
/* 1003.2 specifies the format of this message. */
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option requires an argument -- %c\n"),
|
_("%s: option requires an argument -- %c\n"),
|
||||||
argv[0], c);
|
argv[0], c);
|
||||||
}
|
}
|
||||||
optopt = c;
|
optopt = c;
|
||||||
if (optstring[0] == ':')
|
if (optstring[0] == ':')
|
||||||
|
|||||||
+27
-16
@@ -1,21 +1,21 @@
|
|||||||
/* Declarations for getopt.
|
/* Declarations for getopt.
|
||||||
Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
|
Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
|
||||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Bugs can be reported to bug-glibc@gnu.org.
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2, or (at your option) any
|
|
||||||
later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
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
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Lesser General Public
|
||||||
along with this program; if not, write to the Free Software
|
License along with the GNU C Library; if not, write to the Free
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
#ifndef _GETOPT_H
|
#ifndef _GETOPT_H
|
||||||
|
|
||||||
@@ -23,6 +23,17 @@
|
|||||||
# define _GETOPT_H 1
|
# define _GETOPT_H 1
|
||||||
#endif
|
#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
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -82,7 +93,7 @@ extern int optopt;
|
|||||||
|
|
||||||
struct option
|
struct option
|
||||||
{
|
{
|
||||||
# if defined __STDC__ && __STDC__
|
# if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||||
const char *name;
|
const char *name;
|
||||||
# else
|
# else
|
||||||
char *name;
|
char *name;
|
||||||
@@ -126,7 +137,7 @@ struct option
|
|||||||
arguments to the option '\0'. This behavior is specific to the GNU
|
arguments to the option '\0'. This behavior is specific to the GNU
|
||||||
`getopt'. */
|
`getopt'. */
|
||||||
|
|
||||||
#if defined __STDC__ && __STDC__
|
#if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||||
# ifdef __GNU_LIBRARY__
|
# ifdef __GNU_LIBRARY__
|
||||||
/* Many other libraries have conflicting prototypes for getopt, with
|
/* Many other libraries have conflicting prototypes for getopt, with
|
||||||
differences in the consts, in stdlib.h. To avoid compilation
|
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.
|
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||||
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
This file is part of 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
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
under the terms of the GNU General Public License as published by the
|
modify it under the terms of the GNU Lesser General Public
|
||||||
Free Software Foundation; either version 2, or (at your option) any
|
License as published by the Free Software Foundation; either
|
||||||
later version.
|
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
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
GNU General Public License for more details.
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Lesser General Public
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
License along with the GNU C Library; if not, write to the Free
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
|
02111-1307 USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
|
#include "getopt.h"
|
||||||
|
|
||||||
#if !defined __STDC__ || !__STDC__
|
#if !defined __STDC__ || !__STDC__
|
||||||
/* This is a separate conditional since some stdc systems
|
/* This is a separate conditional since some stdc systems
|
||||||
reject `defined (const)'. */
|
reject `defined (const)'. */
|
||||||
@@ -28,9 +31,6 @@
|
|||||||
#define const
|
#define const
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "getopt.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|||||||
-293
@@ -1,293 +0,0 @@
|
|||||||
/* hash.c -- hash table maintenance
|
|
||||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
|
||||||
Written by Greg McGary <gkm@gnu.ai.mit.edu>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "hash.h"
|
|
||||||
#include "error.h"
|
|
||||||
#include "system.h"
|
|
||||||
#include "xalloc.h"
|
|
||||||
|
|
||||||
static void hash_rehash __P((struct hash_table* ht));
|
|
||||||
static unsigned long round_up_2 __P((unsigned long rough));
|
|
||||||
|
|
||||||
/* Implement double hashing with open addressing. The table size is
|
|
||||||
always a power of two. The secondary (`increment') hash function
|
|
||||||
is forced to return an odd-value, in order to be relatively prime
|
|
||||||
to the table size. This guarantees that the increment can
|
|
||||||
potentially hit every slot in the table during collision
|
|
||||||
resolution. */
|
|
||||||
|
|
||||||
void *hash_deleted_item = &hash_deleted_item;
|
|
||||||
|
|
||||||
/* Force the table size to be a power of two, possibly rounding up the
|
|
||||||
given size. */
|
|
||||||
|
|
||||||
void
|
|
||||||
hash_init (struct hash_table* ht, unsigned long size,
|
|
||||||
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp)
|
|
||||||
{
|
|
||||||
ht->ht_size = round_up_2 (size);
|
|
||||||
if (ht->ht_size > (128 * 1024)) /* prevent size from getting out of hand */
|
|
||||||
ht->ht_size /= 2;
|
|
||||||
ht->ht_vec = (void**) XCALLOC (struct token *, ht->ht_size);
|
|
||||||
if (ht->ht_vec == 0)
|
|
||||||
error (1, 0, _("can't allocate %ld bytes for hash table: memory exhausted"),
|
|
||||||
ht->ht_size * sizeof(struct token *));
|
|
||||||
ht->ht_capacity = ht->ht_size * 15 / 16; /* 93.75% loading factor */
|
|
||||||
ht->ht_fill = 0;
|
|
||||||
ht->ht_collisions = 0;
|
|
||||||
ht->ht_lookups = 0;
|
|
||||||
ht->ht_rehashes = 0;
|
|
||||||
ht->ht_hash_1 = hash_1;
|
|
||||||
ht->ht_hash_2 = hash_2;
|
|
||||||
ht->ht_compare = hash_cmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Load an array of items into `ht'. */
|
|
||||||
|
|
||||||
void
|
|
||||||
hash_load (struct hash_table* ht, void *item_table, unsigned long cardinality, unsigned long size)
|
|
||||||
{
|
|
||||||
char *items = (char *) item_table;
|
|
||||||
while (cardinality--)
|
|
||||||
{
|
|
||||||
hash_insert (ht, items);
|
|
||||||
items += size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns the address of the table slot matching `key'. If `key' is
|
|
||||||
not found, return the address of an empty slot suitable for
|
|
||||||
inserting `key'. The caller is responsible for incrementing
|
|
||||||
ht_fill on insertion. */
|
|
||||||
|
|
||||||
void **
|
|
||||||
hash_find_slot (struct hash_table* ht, void const *key)
|
|
||||||
{
|
|
||||||
void **slot;
|
|
||||||
void **deleted_slot = 0;
|
|
||||||
unsigned int hash_2 = 0;
|
|
||||||
unsigned int hash_1 = (*ht->ht_hash_1) (key);
|
|
||||||
|
|
||||||
ht->ht_lookups++;
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
hash_1 %= ht->ht_size;
|
|
||||||
slot = &ht->ht_vec[hash_1];
|
|
||||||
|
|
||||||
if (*slot == 0)
|
|
||||||
return slot;
|
|
||||||
if (*slot == hash_deleted_item)
|
|
||||||
{
|
|
||||||
if (deleted_slot == 0)
|
|
||||||
deleted_slot = slot;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (key == *slot)
|
|
||||||
return slot;
|
|
||||||
if ((*ht->ht_compare) (key, *slot) == 0)
|
|
||||||
return slot;
|
|
||||||
ht->ht_collisions++;
|
|
||||||
}
|
|
||||||
if (!hash_2)
|
|
||||||
hash_2 = (*ht->ht_hash_2) (key) | 1;
|
|
||||||
hash_1 += hash_2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
|
||||||
hash_find_item (struct hash_table* ht, void const *key)
|
|
||||||
{
|
|
||||||
void **slot = hash_find_slot (ht, key);
|
|
||||||
return ((HASH_VACANT (*slot)) ? 0 : *slot);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
|
||||||
hash_insert (struct hash_table* ht, void *item)
|
|
||||||
{
|
|
||||||
void **slot = hash_find_slot (ht, item);
|
|
||||||
return hash_insert_at (ht, item, slot);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
|
||||||
hash_insert_at (struct hash_table* ht, void *item, void const *slot)
|
|
||||||
{
|
|
||||||
void *old_item = *(void **) slot;
|
|
||||||
if (HASH_VACANT (old_item))
|
|
||||||
{
|
|
||||||
ht->ht_fill++;
|
|
||||||
old_item = item;
|
|
||||||
}
|
|
||||||
*(void const **) slot = item;
|
|
||||||
if (ht->ht_fill >= ht->ht_capacity)
|
|
||||||
hash_rehash (ht);
|
|
||||||
return old_item;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
|
||||||
hash_delete (struct hash_table* ht, void const *item)
|
|
||||||
{
|
|
||||||
void **slot = hash_find_slot (ht, item);
|
|
||||||
return hash_delete_at (ht, slot);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
|
||||||
hash_delete_at (struct hash_table* ht, void const *slot)
|
|
||||||
{
|
|
||||||
void *item = *(void **) slot;
|
|
||||||
if (!HASH_VACANT (item))
|
|
||||||
{
|
|
||||||
*(void const **) slot = hash_deleted_item;
|
|
||||||
ht->ht_fill--;
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
hash_free_items (struct hash_table* ht)
|
|
||||||
{
|
|
||||||
void **vec = ht->ht_vec;
|
|
||||||
void **end = &vec[ht->ht_size];
|
|
||||||
for (; vec < end; vec++)
|
|
||||||
{
|
|
||||||
void *item = *vec;
|
|
||||||
if (!HASH_VACANT (item))
|
|
||||||
free (item);
|
|
||||||
*vec = 0;
|
|
||||||
}
|
|
||||||
ht->ht_fill = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
hash_delete_items (struct hash_table* ht)
|
|
||||||
{
|
|
||||||
void **vec = ht->ht_vec;
|
|
||||||
void **end = &vec[ht->ht_size];
|
|
||||||
for (; vec < end; vec++)
|
|
||||||
*vec = 0;
|
|
||||||
ht->ht_fill = 0;
|
|
||||||
ht->ht_collisions = 0;
|
|
||||||
ht->ht_lookups = 0;
|
|
||||||
ht->ht_rehashes = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
hash_free (struct hash_table* ht, int free_items)
|
|
||||||
{
|
|
||||||
if (free_items)
|
|
||||||
hash_free_items (ht);
|
|
||||||
free (ht->ht_vec);
|
|
||||||
ht->ht_vec = 0;
|
|
||||||
ht->ht_fill = 0;
|
|
||||||
ht->ht_capacity = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
hash_map (struct hash_table *ht, hash_map_func_t map)
|
|
||||||
{
|
|
||||||
void **slot;
|
|
||||||
void **end = &ht->ht_vec[ht->ht_size];
|
|
||||||
|
|
||||||
for (slot = ht->ht_vec; slot < end; slot++)
|
|
||||||
{
|
|
||||||
if (!HASH_VACANT (*slot))
|
|
||||||
(*map) (*slot);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Double the size of the hash table in the event of overflow... */
|
|
||||||
|
|
||||||
static void
|
|
||||||
hash_rehash (struct hash_table* ht)
|
|
||||||
{
|
|
||||||
unsigned long old_ht_size = ht->ht_size;
|
|
||||||
void **old_vec = ht->ht_vec;
|
|
||||||
void **ovp;
|
|
||||||
void **slot;
|
|
||||||
|
|
||||||
ht->ht_size *= 2;
|
|
||||||
ht->ht_rehashes++;
|
|
||||||
ht->ht_capacity = ht->ht_size - (ht->ht_size >> 4);
|
|
||||||
ht->ht_vec = (void **) XCALLOC (struct token *, ht->ht_size);
|
|
||||||
|
|
||||||
for (ovp = old_vec; ovp < &old_vec[old_ht_size]; ovp++)
|
|
||||||
{
|
|
||||||
if (*ovp == 0)
|
|
||||||
continue;
|
|
||||||
slot = hash_find_slot (ht, *ovp);
|
|
||||||
*slot = *ovp;
|
|
||||||
}
|
|
||||||
free (old_vec);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
hash_print_stats (struct hash_table *ht, FILE *out_FILE)
|
|
||||||
{
|
|
||||||
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
|
||||||
100.0 * (double) ht->ht_fill / (double) ht->ht_size);
|
|
||||||
fprintf (out_FILE, _("Rehash=%d, "), ht->ht_rehashes);
|
|
||||||
fprintf (out_FILE, _("Collisions=%ld/%ld=%.0f%%"), ht->ht_collisions, ht->ht_lookups,
|
|
||||||
(ht->ht_lookups
|
|
||||||
? (100.0 * (double) ht->ht_collisions / (double) ht->ht_lookups)
|
|
||||||
: 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dump all items into a NULL-terminated vector. Use the
|
|
||||||
user-supplied vector, or malloc one. */
|
|
||||||
|
|
||||||
void**
|
|
||||||
hash_dump (struct hash_table *ht, void **vector_0, qsort_cmp_t compare)
|
|
||||||
{
|
|
||||||
void **vector;
|
|
||||||
void **slot;
|
|
||||||
void **end = &ht->ht_vec[ht->ht_size];
|
|
||||||
|
|
||||||
if (vector_0 == 0)
|
|
||||||
vector_0 = XMALLOC (void *, ht->ht_fill + 1);
|
|
||||||
vector = vector_0;
|
|
||||||
|
|
||||||
for (slot = ht->ht_vec; slot < end; slot++)
|
|
||||||
if (!HASH_VACANT (*slot))
|
|
||||||
*vector++ = *slot;
|
|
||||||
*vector = 0;
|
|
||||||
|
|
||||||
if (compare)
|
|
||||||
qsort (vector_0, ht->ht_fill, sizeof (void *), compare);
|
|
||||||
return vector_0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Round a given number up to the nearest power of 2. */
|
|
||||||
|
|
||||||
static unsigned long
|
|
||||||
round_up_2 (unsigned long rough)
|
|
||||||
{
|
|
||||||
int round;
|
|
||||||
|
|
||||||
round = 1;
|
|
||||||
while (rough)
|
|
||||||
{
|
|
||||||
round <<= 1;
|
|
||||||
rough >>= 1;
|
|
||||||
}
|
|
||||||
return round;
|
|
||||||
}
|
|
||||||
-144
@@ -1,144 +0,0 @@
|
|||||||
/* hash.h -- decls for hash table
|
|
||||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
|
||||||
Written by Greg McGary <gkm@gnu.ai.mit.edu>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is 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 _hash_h_
|
|
||||||
#define _hash_h_
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
typedef unsigned long (*hash_func_t) __P((void const *key));
|
|
||||||
typedef int (*hash_cmp_func_t) __P((void const *x, void const *y));
|
|
||||||
typedef void (*hash_map_func_t) __P((void const *item));
|
|
||||||
|
|
||||||
struct hash_table
|
|
||||||
{
|
|
||||||
void **ht_vec;
|
|
||||||
unsigned long ht_size; /* total number of slots (power of 2) */
|
|
||||||
unsigned long ht_capacity; /* usable slots, limited by loading-factor */
|
|
||||||
unsigned long ht_fill; /* items in table */
|
|
||||||
unsigned long ht_collisions; /* # of failed calls to comparison function */
|
|
||||||
unsigned long ht_lookups; /* # of queries */
|
|
||||||
unsigned int ht_rehashes; /* # of times we've expanded table */
|
|
||||||
hash_func_t ht_hash_1; /* primary hash function */
|
|
||||||
hash_func_t ht_hash_2; /* secondary hash function */
|
|
||||||
hash_cmp_func_t ht_compare; /* comparison function */
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef int (*qsort_cmp_t) __P((void const *, void const *));
|
|
||||||
|
|
||||||
void hash_init __P((struct hash_table *ht, unsigned long size,
|
|
||||||
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp));
|
|
||||||
void hash_load __P((struct hash_table *ht, void *item_table,
|
|
||||||
unsigned long cardinality, unsigned long size));
|
|
||||||
void **hash_find_slot __P((struct hash_table *ht, void const *key));
|
|
||||||
void *hash_find_item __P((struct hash_table *ht, void const *key));
|
|
||||||
void *hash_insert __P((struct hash_table *ht, void *item));
|
|
||||||
void *hash_insert_at __P((struct hash_table *ht, void *item, void const *slot));
|
|
||||||
void *hash_delete __P((struct hash_table *ht, void const *item));
|
|
||||||
void *hash_delete_at __P((struct hash_table *ht, void const *slot));
|
|
||||||
void hash_delete_items __P((struct hash_table *ht));
|
|
||||||
void hash_free_items __P((struct hash_table *ht));
|
|
||||||
void hash_free __P((struct hash_table *ht, int free_items));
|
|
||||||
void hash_map __P((struct hash_table *ht, hash_map_func_t map));
|
|
||||||
void hash_print_stats __P((struct hash_table *ht, FILE *out_FILE));
|
|
||||||
void **hash_dump __P((struct hash_table *ht, void **vector_0, qsort_cmp_t compare));
|
|
||||||
|
|
||||||
extern void *hash_deleted_item;
|
|
||||||
#define HASH_VACANT(item) ((item) == 0 || (void *) (item) == hash_deleted_item)
|
|
||||||
|
|
||||||
|
|
||||||
/* hash and comparison macros for string keys. */
|
|
||||||
|
|
||||||
#define STRING_HASH_1(_key_, _result_) { \
|
|
||||||
unsigned char const *kk = (unsigned char const *) (_key_) - 1; \
|
|
||||||
while (*++kk) \
|
|
||||||
(_result_) += (*kk << (kk[1] & 0xf)); \
|
|
||||||
} while (0)
|
|
||||||
#define return_STRING_HASH_1(_key_) do { \
|
|
||||||
unsigned long result = 0; \
|
|
||||||
STRING_HASH_1 ((_key_), result); \
|
|
||||||
return result; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define STRING_HASH_2(_key_, _result_) do { \
|
|
||||||
unsigned char const *kk = (unsigned char const *) (_key_) - 1; \
|
|
||||||
while (*++kk) \
|
|
||||||
(_result_) += (*kk << (kk[1] & 0x7)); \
|
|
||||||
} while (0)
|
|
||||||
#define return_STRING_HASH_2(_key_) do { \
|
|
||||||
unsigned long result = 0; \
|
|
||||||
STRING_HASH_2 ((_key_), result); \
|
|
||||||
return result; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define STRING_COMPARE(_x_, _y_, _result_) do { \
|
|
||||||
unsigned char const *xx = (unsigned char const *) (_x_) - 1; \
|
|
||||||
unsigned char const *yy = (unsigned char const *) (_y_) - 1; \
|
|
||||||
do { \
|
|
||||||
if (*++xx == '\0') { \
|
|
||||||
yy++; \
|
|
||||||
break; \
|
|
||||||
} \
|
|
||||||
} while (*xx == *++yy); \
|
|
||||||
(_result_) = *xx - *yy; \
|
|
||||||
} while (0)
|
|
||||||
#define return_STRING_COMPARE(_x_, _y_) do { \
|
|
||||||
int result; \
|
|
||||||
STRING_COMPARE (_x_, _y_, result); \
|
|
||||||
return result; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/* hash and comparison macros for integer keys. */
|
|
||||||
|
|
||||||
#define INTEGER_HASH_1(_key_, _result_) do { \
|
|
||||||
(_result_) += ((unsigned long)(_key_)); \
|
|
||||||
} while (0)
|
|
||||||
#define return_INTEGER_HASH_1(_key_) do { \
|
|
||||||
unsigned long result = 0; \
|
|
||||||
INTEGER_HASH_1 ((_key_), result); \
|
|
||||||
return result; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define INTEGER_HASH_2(_key_, _result_) do { \
|
|
||||||
(_result_) += ~((unsigned long)(_key_)); \
|
|
||||||
} while (0)
|
|
||||||
#define return_INTEGER_HASH_2(_key_) do { \
|
|
||||||
unsigned long result = 0; \
|
|
||||||
INTEGER_HASH_2 ((_key_), result); \
|
|
||||||
return result; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define INTEGER_COMPARE(_x_, _y_, _result_) do { \
|
|
||||||
(_result_) = _x_ - _y_; \
|
|
||||||
} while (0)
|
|
||||||
#define return_INTEGER_COMPARE(_x_, _y_) do { \
|
|
||||||
int result; \
|
|
||||||
INTEGER_COMPARE (_x_, _y_, result); \
|
|
||||||
return result; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/* hash and comparison macros for address keys. */
|
|
||||||
|
|
||||||
#define ADDRESS_HASH_1(_key_, _result_) INTEGER_HASH_1 (((unsigned long)(_key_)) >> 3, (_result_))
|
|
||||||
#define ADDRESS_HASH_2(_key_, _result_) INTEGER_HASH_2 (((unsigned long)(_key_)) >> 3, (_result_))
|
|
||||||
#define ADDRESS_COMPARE(_x_, _y_, _result_) INTEGER_COMPARE ((_x_), (_y_), (_result_))
|
|
||||||
#define return_ADDRESS_HASH_1(_key_) return_INTEGER_HASH_1 (((unsigned long)(_key_)) >> 3)
|
|
||||||
#define return_ADDRESS_HASH_2(_key_) return_INTEGER_HASH_2 (((unsigned long)(_key_)) >> 3)
|
|
||||||
#define return_ADDRESS_COMPARE(_x_, _y_) return_INTEGER_COMPARE ((_x_), (_y_))
|
|
||||||
|
|
||||||
#endif /* not _hash_h_ */
|
|
||||||
+94
-75
@@ -1,26 +1,25 @@
|
|||||||
/* obstack.c - subroutines used implicitly by object stack macros
|
/* 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
|
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 C library, however. The master source lives in /gd/gnu/lib.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
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
|
modify it under the terms of the GNU Lesser General Public
|
||||||
published by the Free Software Foundation; either version 2 of the
|
License as published by the Free Software Foundation; either
|
||||||
License, or (at your option) any later version.
|
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,
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
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
|
You should have received a copy of the GNU Lesser General Public
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
License along with the GNU C Library; if not, write to the Free
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
Boston, MA 02111-1307, USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "obstack.h"
|
#include "obstack.h"
|
||||||
@@ -40,40 +39,43 @@
|
|||||||
files, it is simpler to just do this in the source for each such file. */
|
files, it is simpler to just do this in the source for each such file. */
|
||||||
|
|
||||||
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
|
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
|
||||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||||
#include <gnu-versions.h>
|
# include <gnu-versions.h>
|
||||||
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
||||||
#define ELIDE_CODE
|
# define ELIDE_CODE
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined _LIBC && defined USE_IN_LIBIO
|
||||||
|
# include <wchar.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef ELIDE_CODE
|
#ifndef ELIDE_CODE
|
||||||
|
|
||||||
|
|
||||||
#if defined (__STDC__) && __STDC__
|
# if defined __STDC__ && __STDC__
|
||||||
#define POINTER void *
|
# define POINTER void *
|
||||||
#else
|
# else
|
||||||
#define POINTER char *
|
# define POINTER char *
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
/* Determine default alignment. */
|
/* Determine default alignment. */
|
||||||
struct fooalign {char x; double d;};
|
struct fooalign {char x; double d;};
|
||||||
#define DEFAULT_ALIGNMENT \
|
# define DEFAULT_ALIGNMENT \
|
||||||
((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
|
((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
|
||||||
/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
|
/* 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
|
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. */
|
DEFAULT_ROUNDING. So we prepare for it to do that. */
|
||||||
union fooround {long x; double d;};
|
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.
|
/* 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;
|
On some machines, copying successive ints does not work;
|
||||||
in such a case, redefine COPYING_UNIT to `long' (if that works)
|
in such a case, redefine COPYING_UNIT to `long' (if that works)
|
||||||
or `char' as a last resort. */
|
or `char' as a last resort. */
|
||||||
#ifndef COPYING_UNIT
|
# ifndef COPYING_UNIT
|
||||||
#define COPYING_UNIT int
|
# define COPYING_UNIT int
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
/* The functions allocating more room by calling `obstack_chunk_alloc'
|
/* 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
|
abort gracefully or use longjump - but shouldn't return. This
|
||||||
variable by default points to the internal function
|
variable by default points to the internal function
|
||||||
`print_and_abort'. */
|
`print_and_abort'. */
|
||||||
#if defined (__STDC__) && __STDC__
|
# if defined __STDC__ && __STDC__
|
||||||
static void print_and_abort (void);
|
static void print_and_abort (void);
|
||||||
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
|
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
|
||||||
#else
|
# else
|
||||||
static void print_and_abort ();
|
static void print_and_abort ();
|
||||||
void (*obstack_alloc_failed_handler) () = print_and_abort;
|
void (*obstack_alloc_failed_handler) () = print_and_abort;
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
/* Exit value used when `print_and_abort' is used. */
|
/* Exit value used when `print_and_abort' is used. */
|
||||||
#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
|
# if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
|
||||||
#include <stdlib.h>
|
# include <stdlib.h>
|
||||||
#endif
|
# endif
|
||||||
#ifndef EXIT_FAILURE
|
# ifndef EXIT_FAILURE
|
||||||
#define EXIT_FAILURE 1
|
# define EXIT_FAILURE 1
|
||||||
#endif
|
# endif
|
||||||
int obstack_exit_failure = EXIT_FAILURE;
|
int obstack_exit_failure = EXIT_FAILURE;
|
||||||
|
|
||||||
/* The non-GNU-C macros copy the obstack into this global variable
|
/* 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,
|
For free, do not use ?:, since some compilers, like the MIPS compilers,
|
||||||
do not allow (expr) ? void : void. */
|
do not allow (expr) ? void : void. */
|
||||||
|
|
||||||
#if defined (__STDC__) && __STDC__
|
# if defined __STDC__ && __STDC__
|
||||||
#define CALL_CHUNKFUN(h, size) \
|
# define CALL_CHUNKFUN(h, size) \
|
||||||
(((h) -> use_extra_arg) \
|
(((h) -> use_extra_arg) \
|
||||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||||
: (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
|
: (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
|
||||||
|
|
||||||
#define CALL_FREEFUN(h, old_chunk) \
|
# define CALL_FREEFUN(h, old_chunk) \
|
||||||
do { \
|
do { \
|
||||||
if ((h) -> use_extra_arg) \
|
if ((h) -> use_extra_arg) \
|
||||||
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
||||||
else \
|
else \
|
||||||
(*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
|
(*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
# else
|
||||||
#define CALL_CHUNKFUN(h, size) \
|
# define CALL_CHUNKFUN(h, size) \
|
||||||
(((h) -> use_extra_arg) \
|
(((h) -> use_extra_arg) \
|
||||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||||
: (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
|
: (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
|
||||||
|
|
||||||
#define CALL_FREEFUN(h, old_chunk) \
|
# define CALL_FREEFUN(h, old_chunk) \
|
||||||
do { \
|
do { \
|
||||||
if ((h) -> use_extra_arg) \
|
if ((h) -> use_extra_arg) \
|
||||||
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
||||||
else \
|
else \
|
||||||
(*(void (*) ()) (h)->freefun) ((old_chunk)); \
|
(*(void (*) ()) (h)->freefun) ((old_chunk)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
|
/* 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;
|
struct obstack *h;
|
||||||
int size;
|
int size;
|
||||||
int alignment;
|
int alignment;
|
||||||
#if defined (__STDC__) && __STDC__
|
# if defined __STDC__ && __STDC__
|
||||||
POINTER (*chunkfun) (long);
|
POINTER (*chunkfun) (long);
|
||||||
void (*freefun) (void *);
|
void (*freefun) (void *);
|
||||||
#else
|
# else
|
||||||
POINTER (*chunkfun) ();
|
POINTER (*chunkfun) ();
|
||||||
void (*freefun) ();
|
void (*freefun) ();
|
||||||
#endif
|
# endif
|
||||||
{
|
{
|
||||||
register struct _obstack_chunk *chunk; /* points to new chunk */
|
register struct _obstack_chunk *chunk; /* points to new chunk */
|
||||||
|
|
||||||
@@ -181,13 +183,13 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
|
|||||||
size = 4096 - extra;
|
size = 4096 - extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (__STDC__) && __STDC__
|
# if defined __STDC__ && __STDC__
|
||||||
h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
|
h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
|
||||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||||
#else
|
# else
|
||||||
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
||||||
h->freefun = freefun;
|
h->freefun = freefun;
|
||||||
#endif
|
# endif
|
||||||
h->chunk_size = size;
|
h->chunk_size = size;
|
||||||
h->alignment_mask = alignment - 1;
|
h->alignment_mask = alignment - 1;
|
||||||
h->use_extra_arg = 0;
|
h->use_extra_arg = 0;
|
||||||
@@ -210,13 +212,13 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
|
|||||||
struct obstack *h;
|
struct obstack *h;
|
||||||
int size;
|
int size;
|
||||||
int alignment;
|
int alignment;
|
||||||
#if defined (__STDC__) && __STDC__
|
# if defined __STDC__ && __STDC__
|
||||||
POINTER (*chunkfun) (POINTER, long);
|
POINTER (*chunkfun) (POINTER, long);
|
||||||
void (*freefun) (POINTER, POINTER);
|
void (*freefun) (POINTER, POINTER);
|
||||||
#else
|
# else
|
||||||
POINTER (*chunkfun) ();
|
POINTER (*chunkfun) ();
|
||||||
void (*freefun) ();
|
void (*freefun) ();
|
||||||
#endif
|
# endif
|
||||||
POINTER arg;
|
POINTER arg;
|
||||||
{
|
{
|
||||||
register struct _obstack_chunk *chunk; /* points to new chunk */
|
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;
|
size = 4096 - extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__STDC__) && __STDC__
|
# if defined __STDC__ && __STDC__
|
||||||
h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
|
h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
|
||||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||||
#else
|
# else
|
||||||
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
||||||
h->freefun = freefun;
|
h->freefun = freefun;
|
||||||
#endif
|
# endif
|
||||||
h->chunk_size = size;
|
h->chunk_size = size;
|
||||||
h->alignment_mask = alignment - 1;
|
h->alignment_mask = alignment - 1;
|
||||||
h->extra_arg = arg;
|
h->extra_arg = arg;
|
||||||
@@ -341,11 +343,11 @@ _obstack_newchunk (h, length)
|
|||||||
This is here for debugging.
|
This is here for debugging.
|
||||||
If you use it in a program, you are probably losing. */
|
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
|
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
|
||||||
obstack.h because it is just for debugging. */
|
obstack.h because it is just for debugging. */
|
||||||
int _obstack_allocated_p (struct obstack *h, POINTER obj);
|
int _obstack_allocated_p (struct obstack *h, POINTER obj);
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
int
|
int
|
||||||
_obstack_allocated_p (h, obj)
|
_obstack_allocated_p (h, obj)
|
||||||
@@ -370,7 +372,7 @@ _obstack_allocated_p (h, obj)
|
|||||||
/* Free objects in obstack H, including OBJ and everything allocate
|
/* Free objects in obstack H, including OBJ and everything allocate
|
||||||
more recently than OBJ. If OBJ is zero, free everything in H. */
|
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 function has two names with identical definitions.
|
||||||
This is the first one, called from non-ANSI code. */
|
This is the first one, called from non-ANSI code. */
|
||||||
@@ -456,37 +458,54 @@ _obstack_memory_used (h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Define the error handler. */
|
/* Define the error handler. */
|
||||||
#ifndef _
|
# ifndef _
|
||||||
# if defined HAVE_LIBINTL_H || defined _LIBC
|
# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
# ifndef _
|
# ifndef _
|
||||||
# define _(Str) gettext (Str)
|
# 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
|
# endif
|
||||||
# else
|
|
||||||
# define _(Str) (Str)
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
|
||||||
#if defined _LIBC && defined USE_IN_LIBIO
|
|
||||||
# include <libio/iolibio.h>
|
|
||||||
# define fputs(s, f) _IO_fputs (s, f)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
__attribute__ ((noreturn))
|
||||||
print_and_abort ()
|
print_and_abort ()
|
||||||
{
|
{
|
||||||
fputs (_("memory exhausted"), stderr);
|
/* Don't change any of these strings. Yes, it would be possible to add
|
||||||
fputc ('\n', stderr);
|
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);
|
exit (obstack_exit_failure);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
# if 0
|
||||||
/* These are now turned off because the applications do not use it
|
/* These are now turned off because the applications do not use it
|
||||||
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
|
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
|
||||||
|
|
||||||
/* Now define the functional versions of the obstack macros.
|
/* Now define the functional versions of the obstack macros.
|
||||||
Define them to simply use the corresponding macros to do the job. */
|
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;
|
/* These function definitions do not work with non-ANSI preprocessors;
|
||||||
they won't pass through the macro names in parentheses. */
|
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);
|
return obstack_copy0 (obstack, address, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __STDC__ */
|
# endif /* __STDC__ */
|
||||||
|
|
||||||
#endif /* 0 */
|
# endif /* 0 */
|
||||||
|
|
||||||
#endif /* !ELIDE_CODE */
|
#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
|
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 C library, however. The master source lives in /gd/gnu/lib.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||||
modify it under the terms of the GNU Library General Public License as
|
Bugs can be reported to bug-glibc@gnu.org.
|
||||||
published by the Free Software Foundation; either version 2 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The GNU C Library is distributed in the hope that it will be useful,
|
This program is 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
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
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,
|
License along with this program; if not, write to the Free Software
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
Boston, MA 02111-1307, USA. */
|
USA. */
|
||||||
|
|
||||||
/* Summary:
|
/* Summary:
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_STDDEF_H
|
||||||
|
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
|
||||||
|
#endif
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <quotearg.h>
|
#include <quotearg.h>
|
||||||
#include <quote.h>
|
#include <quote.h>
|
||||||
|
|||||||
+10
-1
@@ -63,6 +63,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_WCHAR_H
|
#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>
|
# include <wchar.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -73,8 +78,12 @@
|
|||||||
# undef MB_CUR_MAX
|
# undef MB_CUR_MAX
|
||||||
# define MB_CUR_MAX 1
|
# define MB_CUR_MAX 1
|
||||||
# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
|
# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
|
||||||
# define mbsinit(ps) 1
|
|
||||||
# define iswprint(wc) ISPRINT ((unsigned char) (wc))
|
# define iswprint(wc) ISPRINT ((unsigned char) (wc))
|
||||||
|
# undef HAVE_MBSINIT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined mbsinit && !HAVE_MBSINIT
|
||||||
|
# define mbsinit(ps) 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef iswprint
|
#ifndef iswprint
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
/* Find the length of STRING, but scan at most MAXLEN characters.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
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)
|
__strnlen (const char *string, size_t maxlen)
|
||||||
{
|
{
|
||||||
const char *end = memchr (string, '\0', maxlen);
|
const char *end = memchr (string, '\0', maxlen);
|
||||||
return end ? end - string : maxlen;
|
return end ? (size_t) (end - string) : maxlen;
|
||||||
}
|
}
|
||||||
#ifdef weak_alias
|
#ifdef weak_alias
|
||||||
weak_alias (__strnlen, strnlen)
|
weak_alias (__strnlen, strnlen)
|
||||||
|
|||||||
+2
-2
@@ -47,11 +47,11 @@ void free ();
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_DONE_WORKING_MALLOC_CHECK
|
#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
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_DONE_WORKING_REALLOC_CHECK
|
#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
|
#endif
|
||||||
|
|
||||||
/* Exit value when the requested amount of memory is not available.
|
/* Exit value when the requested amount of memory is not available.
|
||||||
|
|||||||
+2
-2
@@ -1,16 +1,16 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
atconfig.m4 \
|
|
||||||
c-bs-a.m4 \
|
c-bs-a.m4 \
|
||||||
codeset.m4 \
|
codeset.m4 \
|
||||||
|
dmalloc.m4 \
|
||||||
error.m4 \
|
error.m4 \
|
||||||
gettext.m4 \
|
gettext.m4 \
|
||||||
glibc21.m4 \
|
glibc21.m4 \
|
||||||
iconv.m4 \
|
iconv.m4 \
|
||||||
isc-posix.m4 \
|
isc-posix.m4 \
|
||||||
lcmessage.m4 \
|
lcmessage.m4 \
|
||||||
m4.m4 \
|
|
||||||
malloc.m4 \
|
malloc.m4 \
|
||||||
|
mbrtowc.m4 \
|
||||||
mbstate_t.m4 \
|
mbstate_t.m4 \
|
||||||
prereq.m4 \
|
prereq.m4 \
|
||||||
progtest.m4 \
|
progtest.m4 \
|
||||||
|
|||||||
+13
-14
@@ -1,4 +1,5 @@
|
|||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
@@ -43,6 +44,7 @@ AUTOCONF = @AUTOCONF@
|
|||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
@@ -57,8 +59,12 @@ PRE_UNINSTALL = :
|
|||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
|
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AUTOM4TE = @AUTOM4TE@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
@@ -67,10 +73,7 @@ CC = @CC@
|
|||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
DATADIRNAME = @DATADIRNAME@
|
DATADIRNAME = @DATADIRNAME@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
ECHO_C = @ECHO_C@
|
GCC = @GCC@
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
GLIBC21 = @GLIBC21@
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
@@ -81,12 +84,10 @@ INTLBISON = @INTLBISON@
|
|||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIB = @LIB@
|
||||||
LIBICONV = @LIBICONV@
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
M4 = @M4@
|
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
MSGFMT = @MSGFMT@
|
MSGFMT = @MSGFMT@
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
POFILES = @POFILES@
|
POFILES = @POFILES@
|
||||||
POSUB = @POSUB@
|
POSUB = @POSUB@
|
||||||
@@ -101,17 +102,17 @@ am__quote = @am__quote@
|
|||||||
install_sh = @install_sh@
|
install_sh = @install_sh@
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
atconfig.m4 \
|
|
||||||
c-bs-a.m4 \
|
c-bs-a.m4 \
|
||||||
codeset.m4 \
|
codeset.m4 \
|
||||||
|
dmalloc.m4 \
|
||||||
error.m4 \
|
error.m4 \
|
||||||
gettext.m4 \
|
gettext.m4 \
|
||||||
glibc21.m4 \
|
glibc21.m4 \
|
||||||
iconv.m4 \
|
iconv.m4 \
|
||||||
isc-posix.m4 \
|
isc-posix.m4 \
|
||||||
lcmessage.m4 \
|
lcmessage.m4 \
|
||||||
m4.m4 \
|
|
||||||
malloc.m4 \
|
malloc.m4 \
|
||||||
|
mbrtowc.m4 \
|
||||||
mbstate_t.m4 \
|
mbstate_t.m4 \
|
||||||
prereq.m4 \
|
prereq.m4 \
|
||||||
progtest.m4 \
|
progtest.m4 \
|
||||||
@@ -132,9 +133,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
|||||||
cd $(top_srcdir) && \
|
cd $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu m4/Makefile
|
$(AUTOMAKE) --gnu m4/Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
cd $(top_builddir) && \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
|
||||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
|
||||||
uninstall-info-am:
|
uninstall-info-am:
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
TAGS:
|
TAGS:
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
## ----------------------##
|
|
||||||
## Prepare for testing. ##
|
|
||||||
## ----------------------##
|
|
||||||
|
|
||||||
# serial 2
|
|
||||||
|
|
||||||
# Single argument says where are built sources to test, relative to the
|
|
||||||
# built test directory. Maybe omitted if the same (flat distribution).
|
|
||||||
|
|
||||||
AC_DEFUN([AT_CONFIG],
|
|
||||||
[AT_TESTPATH=ifelse([$1], [], [.], [$1])
|
|
||||||
AC_SUBST([AT_TESTPATH])
|
|
||||||
# Try to be compatible with both Autoconf 2.13 and 2.50.
|
|
||||||
if test -z "$ECHO_C$ECHO_N$ECHO_T"; then
|
|
||||||
ECHO_C="$ac_c"
|
|
||||||
ECHO_N="$ac_n"
|
|
||||||
ECHO_T="$ac_t"
|
|
||||||
AC_SUBST([ECHO_C])
|
|
||||||
AC_SUBST([ECHO_N])
|
|
||||||
AC_SUBST([ECHO_T])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
#serial 3
|
#serial 4
|
||||||
|
|
||||||
dnl From Paul Eggert.
|
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_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
|
||||||
[AC_TRY_COMPILE([],
|
[AC_TRY_COMPILE([],
|
||||||
|
|||||||
@@ -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 FIXME: put these prerequisite-only *.m4 files in a separate
|
||||||
dnl directory -- otherwise, they'll conflict with existing files.
|
dnl directory -- otherwise, they'll conflict with existing files.
|
||||||
|
|
||||||
dnl These are the prerequisite macros for GNU's error.c file.
|
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_CHECK_FUNCS(strerror vprintf doprnt)
|
||||||
AC_HEADER_STDC
|
AC_CHECK_DECLS([strerror])
|
||||||
AC_FUNC_STRERROR_R
|
AC_FUNC_STRERROR_R
|
||||||
|
AC_HEADER_STDC
|
||||||
])
|
])
|
||||||
|
|||||||
+7
-5
@@ -3,10 +3,12 @@
|
|||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# 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
|
# 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
|
# License or the GNU Library General Public License but which still want
|
||||||
# functionality.
|
# to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
# Please note that the actual code of the GNU gettext library is covered
|
||||||
# General Public License and is *not* in the public domain.
|
# by the GNU Library General Public License, and the rest of the GNU
|
||||||
|
# gettext package package is covered by the GNU General Public License.
|
||||||
|
# They are *not* in the public domain.
|
||||||
|
|
||||||
# serial 10
|
# serial 10
|
||||||
|
|
||||||
@@ -241,7 +243,7 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
|
|||||||
dnl Found it, now check the version.
|
dnl Found it, now check the version.
|
||||||
AC_MSG_CHECKING([version of bison])
|
AC_MSG_CHECKING([version of bison])
|
||||||
changequote(<<,>>)dnl
|
changequote(<<,>>)dnl
|
||||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||||
case $ac_prog_version in
|
case $ac_prog_version in
|
||||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||||
|
|||||||
+6
-4
@@ -3,10 +3,12 @@
|
|||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# 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
|
# 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
|
# License or the GNU Library General Public License but which still want
|
||||||
# functionality.
|
# to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
# Please note that the actual code of the GNU gettext library is covered
|
||||||
# General Public License and is *not* in the public domain.
|
# by the GNU Library General Public License, and the rest of the GNU
|
||||||
|
# gettext package package is covered by the GNU General Public License.
|
||||||
|
# They are *not* in the public domain.
|
||||||
|
|
||||||
# serial 2
|
# serial 2
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
# serial 1 -*- Autoconf -*-
|
|
||||||
|
|
||||||
# BISON_AC_PROG_GNU_M4
|
|
||||||
# --------------------
|
|
||||||
# Check for GNU m4, at least 1.3 (supports frozen files).
|
|
||||||
AC_DEFUN([BISON_AC_PROG_GNU_M4],
|
|
||||||
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
|
|
||||||
AC_CACHE_CHECK([whether m4 supports frozen files],
|
|
||||||
[ac_cv_prog_gnu_m4],
|
|
||||||
[ac_cv_prog_gnu_m4=no
|
|
||||||
if test x"$M4" != x; then
|
|
||||||
case `$M4 --help < /dev/null 2>&1` in
|
|
||||||
*reload-state*) ac_cv_prog_gnu_m4=yes ;;
|
|
||||||
esac
|
|
||||||
fi])
|
|
||||||
])# BISON_AC_PROG_GNU_M4
|
|
||||||
+6
-7
@@ -1,16 +1,16 @@
|
|||||||
#serial 3
|
#serial 5
|
||||||
|
|
||||||
dnl From Jim Meyering.
|
dnl From Jim Meyering.
|
||||||
dnl Determine whether malloc accepts 0 as its argument.
|
dnl Determine whether malloc accepts 0 as its argument.
|
||||||
dnl If it doesn't, arrange to use the replacement function.
|
dnl If it doesn't, arrange to use the replacement function.
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_DEFUN(jm_FUNC_MALLOC,
|
AC_DEFUN([jm_FUNC_MALLOC],
|
||||||
[
|
[
|
||||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||||
dnl mistakenly use a broken malloc -- as it might if this test were omitted.
|
dnl mistakenly use a broken malloc -- as it might if this test were omitted.
|
||||||
AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
|
AC_DEFINE(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
|
||||||
[Define if the malloc check has been performed. ])
|
[Define if the malloc check has been performed. ])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
|
AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
|
||||||
[AC_TRY_RUN([
|
[AC_TRY_RUN([
|
||||||
@@ -27,9 +27,8 @@ AC_DEFUN(jm_FUNC_MALLOC,
|
|||||||
jm_cv_func_working_malloc=no)
|
jm_cv_func_working_malloc=no)
|
||||||
])
|
])
|
||||||
if test $jm_cv_func_working_malloc = no; then
|
if test $jm_cv_func_working_malloc = no; then
|
||||||
AC_SUBST(LIBOBJS)
|
AC_LIBOBJ(malloc)
|
||||||
LIBOBJS="$LIBOBJS malloc.$ac_objext"
|
AC_DEFINE(malloc, rpl_malloc,
|
||||||
AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
|
|
||||||
[Define to rpl_malloc if the replacement function should be used.])
|
[Define to rpl_malloc if the replacement function should be used.])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#serial 4
|
||||||
|
|
||||||
|
dnl From Paul Eggert
|
||||||
|
|
||||||
|
AC_DEFUN([jm_FUNC_MBRTOWC],
|
||||||
|
[
|
||||||
|
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
|
||||||
|
jm_cv_func_mbrtowc,
|
||||||
|
[AC_TRY_LINK(
|
||||||
|
[#include <wchar.h>],
|
||||||
|
[mbstate_t state; return ! (sizeof state && mbrtowc);],
|
||||||
|
jm_cv_func_mbrtowc=yes,
|
||||||
|
jm_cv_func_mbrtowc=no)])
|
||||||
|
if test $jm_cv_func_mbrtowc = yes; then
|
||||||
|
AC_DEFINE(HAVE_MBRTOWC, 1,
|
||||||
|
[Define to 1 if mbrtowc and mbstate_t are properly declared.])
|
||||||
|
fi
|
||||||
|
])
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
# serial 8
|
# serial 9
|
||||||
|
|
||||||
# From Paul Eggert.
|
# From Paul Eggert.
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
# (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
|
# (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
|
||||||
# a syntax error in wchar.h due to the use of undefined __int32_t.
|
# a syntax error in wchar.h due to the use of undefined __int32_t.
|
||||||
|
|
||||||
AC_DEFUN(AC_MBSTATE_T,
|
AC_DEFUN([AC_MBSTATE_T],
|
||||||
[
|
[
|
||||||
AC_CHECK_HEADERS(stdlib.h)
|
AC_CHECK_HEADERS(stdlib.h)
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -1,12 +1,13 @@
|
|||||||
#serial 1
|
#serial 2
|
||||||
|
|
||||||
dnl These are the prerequisite macros for files in the lib/
|
dnl These are the prerequisite macros for files in the lib/
|
||||||
dnl directories of Bison.
|
dnl directories of Bison.
|
||||||
|
|
||||||
AC_DEFUN([jm_PREREQ_QUOTEARG],
|
AC_DEFUN([jm_PREREQ_QUOTEARG],
|
||||||
[
|
[
|
||||||
AC_CHECK_FUNCS(isascii iswprint mbrtowc)
|
AC_CHECK_FUNCS(isascii iswprint mbsinit)
|
||||||
AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
|
jm_FUNC_MBRTOWC
|
||||||
|
AC_CHECK_HEADERS(limits.h stddef.h stdlib.h string.h wchar.h wctype.h)
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_C_BACKSLASH_A
|
AC_C_BACKSLASH_A
|
||||||
AC_MBSTATE_T
|
AC_MBSTATE_T
|
||||||
|
|||||||
+6
-4
@@ -3,10 +3,12 @@
|
|||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# 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
|
# 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
|
# License or the GNU Library General Public License but which still want
|
||||||
# functionality.
|
# to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
# Please note that the actual code of the GNU gettext library is covered
|
||||||
# General Public License and is *not* in the public domain.
|
# by the GNU Library General Public License, and the rest of the GNU
|
||||||
|
# gettext package package is covered by the GNU General Public License.
|
||||||
|
# They are *not* in the public domain.
|
||||||
|
|
||||||
# serial 2
|
# serial 2
|
||||||
|
|
||||||
|
|||||||
+6
-7
@@ -1,16 +1,16 @@
|
|||||||
#serial 3
|
#serial 5
|
||||||
|
|
||||||
dnl From Jim Meyering.
|
dnl From Jim Meyering.
|
||||||
dnl Determine whether realloc works when both arguments are 0.
|
dnl Determine whether realloc works when both arguments are 0.
|
||||||
dnl If it doesn't, arrange to use the replacement function.
|
dnl If it doesn't, arrange to use the replacement function.
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_DEFUN(jm_FUNC_REALLOC,
|
AC_DEFUN([jm_FUNC_REALLOC],
|
||||||
[
|
[
|
||||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||||
dnl mistakenly use a broken realloc -- as it might if this test were omitted.
|
dnl mistakenly use a broken realloc -- as it might if this test were omitted.
|
||||||
AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
|
AC_DEFINE(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
|
||||||
[Define if the realloc check has been performed. ])
|
[Define if the realloc check has been performed. ])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
|
AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
|
||||||
[AC_TRY_RUN([
|
[AC_TRY_RUN([
|
||||||
@@ -27,9 +27,8 @@ AC_DEFUN(jm_FUNC_REALLOC,
|
|||||||
jm_cv_func_working_realloc=no)
|
jm_cv_func_working_realloc=no)
|
||||||
])
|
])
|
||||||
if test $jm_cv_func_working_realloc = no; then
|
if test $jm_cv_func_working_realloc = no; then
|
||||||
AC_SUBST(LIBOBJS)
|
AC_LIBOBJ(realloc)
|
||||||
LIBOBJS="$LIBOBJS realloc.$ac_objext"
|
AC_DEFINE(realloc, rpl_realloc,
|
||||||
AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
|
|
||||||
[Define to rpl_realloc if the replacement function should be used.])
|
[Define to rpl_realloc if the replacement function should be used.])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|||||||
+38
-45
@@ -1,9 +1,23 @@
|
|||||||
#serial 1002
|
#serial 1003
|
||||||
# Experimental replacement for the function in the latest CVS autoconf.
|
# Experimental replacement for the function in the latest CVS autoconf.
|
||||||
# If the compile-test says strerror_r doesn't work, then resort to a
|
|
||||||
# `run'-test that works on BeOS and segfaults on DEC Unix.
|
|
||||||
# Use with the error.c file in ../lib.
|
# Use with the error.c file in ../lib.
|
||||||
|
|
||||||
|
# Copyright 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
undefine([AC_FUNC_STRERROR_R])
|
undefine([AC_FUNC_STRERROR_R])
|
||||||
|
|
||||||
# AC_FUNC_STRERROR_R
|
# AC_FUNC_STRERROR_R
|
||||||
@@ -11,56 +25,35 @@ undefine([AC_FUNC_STRERROR_R])
|
|||||||
AC_DEFUN([AC_FUNC_STRERROR_R],
|
AC_DEFUN([AC_FUNC_STRERROR_R],
|
||||||
[AC_CHECK_DECLS([strerror_r])
|
[AC_CHECK_DECLS([strerror_r])
|
||||||
AC_CHECK_FUNCS([strerror_r])
|
AC_CHECK_FUNCS([strerror_r])
|
||||||
if test $ac_cv_func_strerror_r = yes; then
|
AC_CACHE_CHECK([whether strerror_r returns char *],
|
||||||
AC_CHECK_HEADERS(string.h)
|
ac_cv_func_strerror_r_char_p,
|
||||||
AC_CACHE_CHECK([for working strerror_r],
|
|
||||||
ac_cv_func_strerror_r_works,
|
|
||||||
[
|
[
|
||||||
AC_TRY_COMPILE(
|
ac_cv_func_strerror_r_char_p=no
|
||||||
[
|
if test $ac_cv_have_decl_strerror_r = yes; then
|
||||||
# include <stdio.h>
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
|
||||||
# if HAVE_STRING_H
|
[[
|
||||||
# include <string.h>
|
char buf[100];
|
||||||
# endif
|
char x = *strerror_r (0, buf, sizeof buf);
|
||||||
],
|
char *p = strerror_r (0, buf, sizeof buf);
|
||||||
[
|
]])],
|
||||||
char buf[100];
|
ac_cv_func_strerror_r_char_p=yes)
|
||||||
char x = *strerror_r (0, buf, sizeof buf);
|
else
|
||||||
],
|
# strerror_r is not declared. Choose between
|
||||||
ac_cv_func_strerror_r_works=yes,
|
|
||||||
ac_cv_func_strerror_r_works=no
|
|
||||||
)
|
|
||||||
if test $ac_cv_func_strerror_r_works = no; then
|
|
||||||
# strerror_r seems not to work, but now we have to choose between
|
|
||||||
# systems that have relatively inaccessible declarations for the
|
# systems that have relatively inaccessible declarations for the
|
||||||
# function. BeOS and DEC UNIX 4.0 fall in this category, but the
|
# function. BeOS and DEC UNIX 4.0 fall in this category, but the
|
||||||
# former has a strerror_r that returns char*, while the latter
|
# former has a strerror_r that returns char*, while the latter
|
||||||
# has a strerror_r that returns `int'.
|
# has a strerror_r that returns `int'.
|
||||||
# This test should segfault on the DEC system.
|
# This test should segfault on the DEC system.
|
||||||
AC_TRY_RUN(
|
AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
|
||||||
[
|
extern char *strerror_r ();],
|
||||||
# include <stdio.h>
|
[[char buf[100];
|
||||||
# include <string.h>
|
|
||||||
# include <ctype.h>
|
|
||||||
|
|
||||||
extern char *strerror_r ();
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
char buf[100];
|
|
||||||
char x = *strerror_r (0, buf, sizeof buf);
|
char x = *strerror_r (0, buf, sizeof buf);
|
||||||
exit (!isalpha (x));
|
exit (!isalpha (x));]])],
|
||||||
}
|
ac_cv_func_strerror_r_char_p=yes, , :)
|
||||||
],
|
|
||||||
ac_cv_func_strerror_r_works=yes,
|
|
||||||
ac_cv_func_strerror_r_works=no,
|
|
||||||
ac_cv_func_strerror_r_works=no)
|
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
if test $ac_cv_func_strerror_r_works = yes; then
|
if test $ac_cv_func_strerror_r_char_p = yes; then
|
||||||
AC_DEFINE_UNQUOTED(HAVE_WORKING_STRERROR_R, 1,
|
AC_DEFINE([STRERROR_R_CHAR_P], 1,
|
||||||
[Define to 1 if `strerror_r' returns a string.])
|
[Define to 1 if strerror_r returns char *.])
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
])# AC_FUNC_STRERROR_R
|
])# AC_FUNC_STRERROR_R
|
||||||
|
|||||||
@@ -1,283 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# Common stub for a few missing GNU programs while installing.
|
|
||||||
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
|
||||||
# Originally by Fran,cois Pinard <[email protected]>, 1996.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
||||||
# 02111-1307, USA.
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
echo 1>&2 "Try \`$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
run=:
|
|
||||||
|
|
||||||
# In the cases where this matters, `missing' is being run in the
|
|
||||||
# srcdir already.
|
|
||||||
if test -f configure.ac; then
|
|
||||||
configure_ac=configure.ac
|
|
||||||
else
|
|
||||||
configure_ac=configure.in
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
--run)
|
|
||||||
# Try to run requested program, and just exit if it succeeds.
|
|
||||||
run=
|
|
||||||
shift
|
|
||||||
"$@" && exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# If it does not exist, or fails to run (possibly an outdated version),
|
|
||||||
# try to emulate it.
|
|
||||||
case "$1" in
|
|
||||||
|
|
||||||
-h|--h|--he|--hel|--help)
|
|
||||||
echo "\
|
|
||||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
|
||||||
|
|
||||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
|
||||||
error status if there is no known handling for PROGRAM.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-h, --help display this help and exit
|
|
||||||
-v, --version output version information and exit
|
|
||||||
--run try to run the given command, and emulate it if it fails
|
|
||||||
|
|
||||||
Supported PROGRAM values:
|
|
||||||
aclocal touch file \`aclocal.m4'
|
|
||||||
autoconf touch file \`configure'
|
|
||||||
autoheader touch file \`config.h.in'
|
|
||||||
automake touch all \`Makefile.in' files
|
|
||||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
|
||||||
flex create \`lex.yy.c', if possible, from existing .c
|
|
||||||
help2man touch the output file
|
|
||||||
lex create \`lex.yy.c', if possible, from existing .c
|
|
||||||
makeinfo touch the output file
|
|
||||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
|
||||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
|
||||||
echo "missing 0.3 - GNU automake"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-*)
|
|
||||||
echo 1>&2 "$0: Unknown \`$1' option"
|
|
||||||
echo 1>&2 "Try \`$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
aclocal)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
|
||||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
|
||||||
any GNU archive site."
|
|
||||||
touch aclocal.m4
|
|
||||||
;;
|
|
||||||
|
|
||||||
autoconf)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified \`${configure_ac}'. You might want to install the
|
|
||||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
|
||||||
archive site."
|
|
||||||
touch configure
|
|
||||||
;;
|
|
||||||
|
|
||||||
autoheader)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
|
||||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
|
||||||
from any GNU archive site."
|
|
||||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
|
||||||
test -z "$files" && files="config.h"
|
|
||||||
touch_files=
|
|
||||||
for f in $files; do
|
|
||||||
case "$f" in
|
|
||||||
*:*) touch_files="$touch_files "`echo "$f" |
|
|
||||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
|
||||||
*) touch_files="$touch_files $f.in";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
touch $touch_files
|
|
||||||
;;
|
|
||||||
|
|
||||||
automake)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
|
||||||
You might want to install the \`Automake' and \`Perl' packages.
|
|
||||||
Grab them from any GNU archive site."
|
|
||||||
find . -type f -name Makefile.am -print |
|
|
||||||
sed 's/\.am$/.in/' |
|
|
||||||
while read f; do touch "$f"; done
|
|
||||||
;;
|
|
||||||
|
|
||||||
bison|yacc)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified a \`.y' file. You may need the \`Bison' package
|
|
||||||
in order for those modifications to take effect. You can get
|
|
||||||
\`Bison' from any GNU archive site."
|
|
||||||
rm -f y.tab.c y.tab.h
|
|
||||||
if [ $# -ne 1 ]; then
|
|
||||||
eval LASTARG="\${$#}"
|
|
||||||
case "$LASTARG" in
|
|
||||||
*.y)
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
|
||||||
if [ -f "$SRCFILE" ]; then
|
|
||||||
cp "$SRCFILE" y.tab.c
|
|
||||||
fi
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
|
||||||
if [ -f "$SRCFILE" ]; then
|
|
||||||
cp "$SRCFILE" y.tab.h
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
if [ ! -f y.tab.h ]; then
|
|
||||||
echo >y.tab.h
|
|
||||||
fi
|
|
||||||
if [ ! -f y.tab.c ]; then
|
|
||||||
echo 'main() { return 0; }' >y.tab.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
lex|flex)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified a \`.l' file. You may need the \`Flex' package
|
|
||||||
in order for those modifications to take effect. You can get
|
|
||||||
\`Flex' from any GNU archive site."
|
|
||||||
rm -f lex.yy.c
|
|
||||||
if [ $# -ne 1 ]; then
|
|
||||||
eval LASTARG="\${$#}"
|
|
||||||
case "$LASTARG" in
|
|
||||||
*.l)
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
|
||||||
if [ -f "$SRCFILE" ]; then
|
|
||||||
cp "$SRCFILE" lex.yy.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
if [ ! -f lex.yy.c ]; then
|
|
||||||
echo 'main() { return 0; }' >lex.yy.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
help2man)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified a dependency of a manual page. You may need the
|
|
||||||
\`Help2man' package in order for those modifications to take
|
|
||||||
effect. You can get \`Help2man' from any GNU archive site."
|
|
||||||
|
|
||||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
|
||||||
if test -z "$file"; then
|
|
||||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
|
||||||
fi
|
|
||||||
if [ -f "$file" ]; then
|
|
||||||
touch $file
|
|
||||||
else
|
|
||||||
test -z "$file" || exec >$file
|
|
||||||
echo ".ab help2man is required to generate this page"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
makeinfo)
|
|
||||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
|
||||||
# We have makeinfo, but it failed.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
|
||||||
indirectly affecting the aspect of the manual. The spurious
|
|
||||||
call might also be the consequence of using a buggy \`make' (AIX,
|
|
||||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
|
||||||
the \`GNU make' package. Grab either from any GNU archive site."
|
|
||||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
|
||||||
if test -z "$file"; then
|
|
||||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
|
||||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
|
||||||
fi
|
|
||||||
touch $file
|
|
||||||
;;
|
|
||||||
|
|
||||||
tar)
|
|
||||||
shift
|
|
||||||
if test -n "$run"; then
|
|
||||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We have already tried tar in the generic part.
|
|
||||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
|
||||||
# messages.
|
|
||||||
if (gnutar --version > /dev/null 2>&1); then
|
|
||||||
gnutar ${1+"$@"} && exit 0
|
|
||||||
fi
|
|
||||||
if (gtar --version > /dev/null 2>&1); then
|
|
||||||
gtar ${1+"$@"} && exit 0
|
|
||||||
fi
|
|
||||||
firstarg="$1"
|
|
||||||
if shift; then
|
|
||||||
case "$firstarg" in
|
|
||||||
*o*)
|
|
||||||
firstarg=`echo "$firstarg" | sed s/o//`
|
|
||||||
tar "$firstarg" ${1+"$@"} && exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case "$firstarg" in
|
|
||||||
*h*)
|
|
||||||
firstarg=`echo "$firstarg" | sed s/h//`
|
|
||||||
tar "$firstarg" ${1+"$@"} && exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
|
||||||
You may want to install GNU tar or Free paxutils, or check the
|
|
||||||
command line arguments."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
|
||||||
system. You might have modified some files without having the
|
|
||||||
proper tools for further handling them. Check the \`README' file,
|
|
||||||
it often tells you about the needed prerequirements for installing
|
|
||||||
this package. You may also peek at any GNU archive site, in case
|
|
||||||
some other package would contain this missing \`$1' program."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# mkinstalldirs --- make directory hierarchy
|
|
||||||
# Author: Noah Friedman <[email protected]>
|
|
||||||
# Created: 1993-05-16
|
|
||||||
# Public domain
|
|
||||||
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
errstatus=0
|
|
||||||
|
|
||||||
for file
|
|
||||||
do
|
|
||||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
|
||||||
shift
|
|
||||||
|
|
||||||
pathcomp=
|
|
||||||
for d
|
|
||||||
do
|
|
||||||
pathcomp="$pathcomp$d"
|
|
||||||
case "$pathcomp" in
|
|
||||||
-* ) pathcomp=./$pathcomp ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test ! -d "$pathcomp"; then
|
|
||||||
echo "mkdir $pathcomp"
|
|
||||||
|
|
||||||
mkdir "$pathcomp" || lasterr=$?
|
|
||||||
|
|
||||||
if test ! -d "$pathcomp"; then
|
|
||||||
errstatus=$lasterr
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
pathcomp="$pathcomp/"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
exit $errstatus
|
|
||||||
|
|
||||||
# mkinstalldirs ends here
|
|
||||||
@@ -4,3 +4,4 @@ Makefile.in
|
|||||||
POTFILES
|
POTFILES
|
||||||
bison.pot
|
bison.pot
|
||||||
stamp-cat-id
|
stamp-cat-id
|
||||||
|
*.gmo
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2001-09-27 gettextize <[email protected]>
|
||||||
|
|
||||||
|
* Makefile.in.in: Upgrade to gettext-0.10.40.
|
||||||
|
* cat-id-tbl.c: Remove file.
|
||||||
|
|
||||||
2001-08-03 gettextize <[email protected]>
|
2001-08-03 gettextize <[email protected]>
|
||||||
|
|
||||||
* Makefile.in.in: Upgrade to gettext-0.10.39.
|
* Makefile.in.in: Upgrade to gettext-0.10.39.
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
src/LR0.c
|
src/LR0.c
|
||||||
src/complain.c
|
src/complain.c
|
||||||
src/conflicts.c
|
src/conflicts.c
|
||||||
src/derives.c
|
|
||||||
src/files.c
|
src/files.c
|
||||||
src/getargs.c
|
src/getargs.c
|
||||||
src/lalr.c
|
src/lalr.c
|
||||||
src/lex.c
|
src/lex.c
|
||||||
src/main.c
|
src/main.c
|
||||||
src/nullable.c
|
|
||||||
src/output.c
|
src/output.c
|
||||||
src/print.c
|
src/print.c
|
||||||
src/print_graph.c
|
src/print_graph.c
|
||||||
src/reader.c
|
src/reader.c
|
||||||
src/reduce.c
|
src/reduce.c
|
||||||
src/vcg.c
|
|
||||||
|
|
||||||
lib/error.c
|
lib/error.c
|
||||||
lib/getopt.c
|
lib/getopt.c
|
||||||
|
|||||||
-188
@@ -1,188 +0,0 @@
|
|||||||
/* Automatically generated by po2tbl.sed from bison.pot. */
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "libgettext.h"
|
|
||||||
|
|
||||||
const struct _msg_ent _msg_tbl[] = {
|
|
||||||
{"", 1},
|
|
||||||
{"too many states (max %d)", 2},
|
|
||||||
{"Conflict in state %d between rule %d and token %s resolved as %s.\n", 3},
|
|
||||||
{"reduce", 4},
|
|
||||||
{"shift", 5},
|
|
||||||
{"an error", 6},
|
|
||||||
{" 1 shift/reduce conflict", 7},
|
|
||||||
{" %d shift/reduce conflicts", 8},
|
|
||||||
{" and", 9},
|
|
||||||
{" 1 reduce/reduce conflict", 10},
|
|
||||||
{" %d reduce/reduce conflicts", 11},
|
|
||||||
{"State %d contains", 12},
|
|
||||||
{"conflicts: ", 13},
|
|
||||||
{" %d shift/reduce", 14},
|
|
||||||
{" %d reduce/reduce", 15},
|
|
||||||
{"%s contains", 16},
|
|
||||||
{" %-4s\t[reduce using rule %d (%s)]\n", 17},
|
|
||||||
{"\
|
|
||||||
$default\treduce using rule %d (%s)\n\
|
|
||||||
\n", 18},
|
|
||||||
{" %-4s\treduce using rule %d (%s)\n", 19},
|
|
||||||
{" $default\treduce using rule %d (%s)\n", 20},
|
|
||||||
{"DERIVES", 21},
|
|
||||||
{"%s derives", 22},
|
|
||||||
{"GNU bison generates parsers for LALR(1) grammars.\n", 23},
|
|
||||||
{"Usage: %s [OPTION]... FILE\n", 24},
|
|
||||||
{"\
|
|
||||||
If a long option shows an argument as mandatory, then it is mandatory\n\
|
|
||||||
for the equivalent short option also. Similarly for optional arguments.\n", 25},
|
|
||||||
{"\
|
|
||||||
Operation modes:\n\
|
|
||||||
-h, --help display this help and exit\n\
|
|
||||||
-V, --version output version information and exit\n\
|
|
||||||
-y, --yacc emulate POSIX yacc\n", 26},
|
|
||||||
{"\
|
|
||||||
Parser:\n\
|
|
||||||
-S, --skeleton=FILE specify the skeleton to use\n\
|
|
||||||
-t, --debug instrument the parser for debugging\n\
|
|
||||||
--locations enable locations computation\n\
|
|
||||||
-p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n\
|
|
||||||
-l, --no-lines don't generate `#line' directives\n\
|
|
||||||
-n, --no-parser generate the tables only\n\
|
|
||||||
-r, --raw number the tokens from 3\n\
|
|
||||||
-k, --token-table include a table of token names\n", 27},
|
|
||||||
{"\
|
|
||||||
Output:\n\
|
|
||||||
-d, --defines also produce a header file\n\
|
|
||||||
-v, --verbose also produce an explanation of the automaton\n\
|
|
||||||
-b, --file-prefix=PREFIX specify a PREFIX for output files\n\
|
|
||||||
-o, --output-file=FILE leave output to FILE\n", 28},
|
|
||||||
{"Report bugs to <[email protected]>.\n", 29},
|
|
||||||
{"bison (GNU Bison) %s", 30},
|
|
||||||
{"\
|
|
||||||
Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n", 31},
|
|
||||||
{"\
|
|
||||||
This is free software; see the source for copying conditions. There is NO\n\
|
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", 32},
|
|
||||||
{"Try `%s --help' for more information.\n", 33},
|
|
||||||
{"%s: no grammar file given\n", 34},
|
|
||||||
{"%s: extra arguments ignored after `%s'\n", 35},
|
|
||||||
{"too many gotos (max %d)", 36},
|
|
||||||
{"unexpected `/' found and ignored", 37},
|
|
||||||
{"unterminated comment", 38},
|
|
||||||
{"unexpected end of file", 39},
|
|
||||||
{"unescaped newline in constant", 40},
|
|
||||||
{"octal value outside range 0...255: `\\%o'", 41},
|
|
||||||
{"hexadecimal value above 255: `\\x%x'", 42},
|
|
||||||
{"unknown escape sequence: `\\' followed by `%s'", 43},
|
|
||||||
{"unterminated type name at end of file", 44},
|
|
||||||
{"unterminated type name", 45},
|
|
||||||
{"use \"...\" for multi-character literal tokens", 46},
|
|
||||||
{"%s: internal error: %s\n", 47},
|
|
||||||
{"Entering set_nullable", 48},
|
|
||||||
{"maximum table size (%d) exceeded", 49},
|
|
||||||
{" type %d is %s\n", 50},
|
|
||||||
{" (rule %d)", 51},
|
|
||||||
{" $default\taccept\n", 52},
|
|
||||||
{" NO ACTIONS\n", 53},
|
|
||||||
{" $ \tgo to state %d\n", 54},
|
|
||||||
{" %-4s\tshift, and go to state %d\n", 55},
|
|
||||||
{" %-4s\terror (nonassociative)\n", 56},
|
|
||||||
{" %-4s\tgo to state %d\n", 57},
|
|
||||||
{"state %d", 58},
|
|
||||||
{"Grammar", 59},
|
|
||||||
{"rule %-4d %s ->", 60},
|
|
||||||
{"\t\t/* empty */", 61},
|
|
||||||
{"Terminals, with rules where they appear", 62},
|
|
||||||
{"Nonterminals, with rules where they appear", 63},
|
|
||||||
{" on left:", 64},
|
|
||||||
{" on right:", 65},
|
|
||||||
{" Skipping to next \\n", 66},
|
|
||||||
{" Skipping to next %c", 67},
|
|
||||||
{"invalid $ value", 68},
|
|
||||||
{"unterminated string at end of file", 69},
|
|
||||||
{"unterminated string", 70},
|
|
||||||
{"%s is invalid", 71},
|
|
||||||
{"$$ of `%s' has no declared type", 72},
|
|
||||||
{"$%d of `%s' has no declared type", 73},
|
|
||||||
{"unterminated `%{' definition", 74},
|
|
||||||
{"Premature EOF after %s", 75},
|
|
||||||
{"symbol `%s' used more than once as a literal string", 76},
|
|
||||||
{"symbol `%s' given more than one literal string", 77},
|
|
||||||
{"symbol %s redefined", 78},
|
|
||||||
{"type redeclaration for %s", 79},
|
|
||||||
{"`%s' is invalid in %s", 80},
|
|
||||||
{"multiple %s declarations", 81},
|
|
||||||
{"invalid %s declaration", 82},
|
|
||||||
{"%type declaration has no <typename>", 83},
|
|
||||||
{"invalid %%type declaration due to item: %s", 84},
|
|
||||||
{"redefining precedence of %s", 85},
|
|
||||||
{"invalid text (%s) - number should be after identifier", 86},
|
|
||||||
{"unexpected item: %s", 87},
|
|
||||||
{"unmatched %s", 88},
|
|
||||||
{"argument of %%expect is not an integer", 89},
|
|
||||||
{"unrecognized item %s, expected an identifier", 90},
|
|
||||||
{"expected string constant instead of %s", 91},
|
|
||||||
{"unrecognized: %s", 92},
|
|
||||||
{"no input grammar", 93},
|
|
||||||
{"unknown character: %s", 94},
|
|
||||||
{"unterminated %guard clause", 95},
|
|
||||||
{"ill-formed rule: initial symbol not followed by colon", 96},
|
|
||||||
{"grammar starts with vertical bar", 97},
|
|
||||||
{"rule given for %s, which is a token", 98},
|
|
||||||
{"two @prec's in a row", 99},
|
|
||||||
{"%%guard present but %%semantic_parser not specified", 100},
|
|
||||||
{"two actions at end of one rule", 101},
|
|
||||||
{"type clash (`%s' `%s') on default action", 102},
|
|
||||||
{"empty rule for typed nonterminal, and no action", 103},
|
|
||||||
{"invalid input: %s", 104},
|
|
||||||
{"too many symbols (tokens plus nonterminals); maximum %d", 105},
|
|
||||||
{"no rules in the input grammar", 106},
|
|
||||||
{"symbol %s is used, but is not defined as a token and has no rules", 107},
|
|
||||||
{"conflicting precedences for %s and %s", 108},
|
|
||||||
{"conflicting assoc values for %s and %s", 109},
|
|
||||||
{"tokens %s and %s both assigned number %d", 110},
|
|
||||||
{"the start symbol %s is undefined", 111},
|
|
||||||
{"the start symbol %s is a token", 112},
|
|
||||||
{"Useless nonterminals:", 113},
|
|
||||||
{"Terminals which are not used:", 114},
|
|
||||||
{"Useless rules:", 115},
|
|
||||||
{"\
|
|
||||||
Variables\n\
|
|
||||||
---------\n\
|
|
||||||
\n", 116},
|
|
||||||
{"Value Sprec Sassoc Tag\n", 117},
|
|
||||||
{"\
|
|
||||||
Rules\n\
|
|
||||||
-----\n\
|
|
||||||
\n", 118},
|
|
||||||
{"\
|
|
||||||
Rules interpreted\n\
|
|
||||||
-----------------\n\
|
|
||||||
\n", 119},
|
|
||||||
{"%d rules never reduced\n", 120},
|
|
||||||
{"%s contains ", 121},
|
|
||||||
{"%d useless nonterminal%s", 122},
|
|
||||||
{" and ", 123},
|
|
||||||
{"%d useless rule%s", 124},
|
|
||||||
{"Start symbol %s does not derive any sentence", 125},
|
|
||||||
{"\
|
|
||||||
reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n", 126},
|
|
||||||
{"Unknown system error", 127},
|
|
||||||
{"%s: option `%s' is ambiguous\n", 128},
|
|
||||||
{"%s: option `--%s' doesn't allow an argument\n", 129},
|
|
||||||
{"%s: option `%c%s' doesn't allow an argument\n", 130},
|
|
||||||
{"%s: option `%s' requires an argument\n", 131},
|
|
||||||
{"%s: unrecognized option `--%s'\n", 132},
|
|
||||||
{"%s: unrecognized option `%c%s'\n", 133},
|
|
||||||
{"%s: illegal option -- %c\n", 134},
|
|
||||||
{"%s: invalid option -- %c\n", 135},
|
|
||||||
{"%s: option requires an argument -- %c\n", 136},
|
|
||||||
{"%s: option `-W %s' is ambiguous\n", 137},
|
|
||||||
{"%s: option `-W %s' doesn't allow an argument\n", 138},
|
|
||||||
{"memory exhausted", 139},
|
|
||||||
{"`", 140},
|
|
||||||
{"'", 141},
|
|
||||||
};
|
|
||||||
|
|
||||||
int _msg_tbl_length = 141;
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user