This commit was generated by cvs2svn to compensate for changes in r67064,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
David E. O'Brien 2000-10-13 12:04:55 +00:00
commit 8c91c0948a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67065
39 changed files with 8876 additions and 1092 deletions

2
contrib/gperf/AUTHORS Normal file
View File

@ -0,0 +1,2 @@
Douglas C. Schmidt <schmidt@ics.uci.edu>
Bruno Haible <haible@clisp.cons.org>

View File

@ -1,38 +1,41 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307,
USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
Preamble
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of a such a program, whether
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
@ -45,120 +48,207 @@ want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
2. You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following:
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
exchange for a fee.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
7. The Free Software Foundation may publish revised and/or new versions
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
this License, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
@ -166,9 +256,9 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
@ -178,7 +268,7 @@ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
@ -188,27 +278,26 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
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
@ -217,33 +306,35 @@ the exclusion of warranty; and each file should have at least the
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
That's all there is to it!
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@ -1,3 +1,229 @@
2000-09-26 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
* gperf-2.7.2 released.
* doc/gperf.texi: Add a second bug report address
<gperf-bugs@lists.sourceforge.net>.
* README: Updated.
2000-08-28 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
* lib/getopt.h (struct option): Use "const" also when compiling in
C++ mode. Avoids warnings from Sun CC and HP-UX aCC.
* doc/Makefile.in (docdir): Change from $(datadir)/doc/@PACKAGE@ to
$(prefix)/doc/@PACKAGE@, following the newest GNU standards.
2000-08-20 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
* src/version.cc: Bump version number to 2.7.2.
* doc/gperf.texi: Likewise.
* doc/texinfo.tex: Update to post-texinfo-4.0 version. @code in the
title page now chooses a larger font. The overall layout of the
text is denser.
* AUTHORS: New file.
* tests/Makefile.in (all): Add check-lang-utf8 and check-lang-ucs2.
(check-lang-utf8, check-lang-ucs2): New targets.
(clean): Remove lu8out and lu2out.
* tests/lang-utf8.gperf, tests/lang-utf8.exp: New files.
* tests/lang-ucs2.gperf, tests/test2.c, tests/lang-ucs2.in,
tests/lang-ucs2.exp: New files.
Allow the use of embedded NULs in keys.
* lib/hash.h (hashpjw): Add a length argument.
* lib/hash.cc (hashpjw): Likewise. Don't stop when encountering a NUL
character.
* src/hash-table.h (Hash_Table constructor): Add ignore_len argument.
(Hash_Table::ignore_length): New field.
(Hash_Table::insert): Renamed from Hash_Table::operator(). Remove
ignore_length argument.
* src/hash-table.cc (NIL): Remove macro.
(Hash_Table constructor): Add ignore_len argument. Use it to
initialize ignore_length.
(Hash_Table destructor): Specify explicit length of char_set and
key.
(Hash_Table::insert): Renamed from Hash_Table::operator(). Remove
ignore_length argument. Pass explicit length to hashpjw. Compare
char_set using memcmp, not strcmp.
* src/list-node.h (List_Node): Rename field length to key_length.
New field char_set_length.
(List_Node constructor): Accept key and rest, not the entire line.
* src/list-node.cc (List_Node constructor): Accept key and rest, not
the entire line. Don't NUL terminate key and char_set. Specify
explicit length of key. Initialize char_set_length field.
* src/key-list.cc: Include <ctype.h>.
(parse_line): New function.
(Key_List::read_keys): Call parse_line instead of new List_Node.
Pass option[NOLENGTH] to Hash_Table constructor, not
Hash_Table::insert. Specify explicit length of key and char_set.
(Key_List::get_occurrence): Use explicit length of char_set.
(Key_List::set_determined): Likewise.
(Key_List::already_determined): Likewise.
(output_string): Add length argument. Output unprintable characters
using octal escape sequence.
(output_keyword_entry): Use explicit length of key.
(Key_List::output_lookup_array): Specify explicit length of key.
(output_switch_case): Likewise.
(Key_List::dump): Likewise.
* src/gen-perf.h (Gen_Perf::compute_disjoint_union): Add two length
arguments.
* src/gen-perf.cc (Gen_Perf::compute_disjoint_union): Likewise. Don't
stop when encountering NUL characters. Don't NUL terminate the
result.
(Gen_Perf::hash): Use explicit length of char_set.
(Gen_Perf::change): Specify explicit length of key.
* doc/gperf.texi: Document it.
* doc/help2man: New file, help2man version 1.022.
* Makefile.devel (all): Add doc/gperf.1.
(doc/gperf.1): New target.
* doc/gperf.1: Automatically generated.
* mkinstalldirs: New file, from automake-1.4, grep-2.4.1, guile-1.4,
libtool-1.3.3, make-3.79.1, tar-1.13.
* src/Makefile.in (MKINSTALLDIRS): New variable.
(install, installdirs): Use it instead of mkdir.
* doc/Makefile.in (MKINSTALLDIRS): New variable.
(install, installdirs): Use it instead of mkdir.
* INSTALL: Update.
2000-08-19 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
* src/key-list.cc (Output_Compare_Memcmp): New class.
(Key_List::output_lookup_function): When option -l is given, use
memcmp instead of strcmp or strncmp.
* doc/gperf.texi: The bug report address is <bug-gnu-utils@gnu.org>.
The download address is ftp.gnu.org. Remove mention of -a and -g
options (now nops). Explain effect of -c option.
* doc/configure.in (PACKAGE): New variable.
* doc/Makefile.in (datadir, docdir): New variables.
(dvidir, htmldir): Change values.
(install, installdirs): Update.
* src/configure.in: Rename cache variable gp_cxx_throw_decl to
gp_cv_cxx_throw_decl.
* src/key-list.cc (Key_List::output_hash_function): When outputting
__inline, take advantage of C++ compilers which have inline.
* src/key-list.cc (Output_Compare_Strncmp::output_comparison):
After the call to strncmp, verify that expr2 is not longer than
`len'.
Reported by Carlo Wood <carlo@runaway.xs4all.nl>.
* src/key-list.cc (Key_List::output_lookup_function_body): Avoid
emitting the loop for dealing with duplicates if
total_duplicates == 0.
* src/key-list.cc (Key_List::read_keys): Don't accept an empty key.
* src/Makefile.in (install, installdirs, uninstall): Respect
$(DESTDIR).
* doc/Makefile.in (install, installdirs, uninstall): Likewise.
* src/options.cc (Options::print_options): Escape the arguments which
contain special characters.
* tests/c-parse.gperf: Updated from gcc-2.95.2/gcc/c-parse.gperf.
* tests/objc.gperf: New file, from gcc-2.95.2/gcc/objc/objc.gperf.
* tests/chill.gperf: New file, from gcc-2.95.2/gcc/ch/gperf.
* tests/cplusplus.gperf: New file, from gcc-2.95.2/gcc/cp/gxx.gperf.
* tests/gplus.gperf: Remove file.
* tests/java.gperf: New file, from gcc-2.95.2/gcc/java/keyword.gperf.
* tests/Makefile: Check them all.
* tests/c-parse.exp: Renamed from tests/test-1.exp.
* tests/modula2.exp: Renamed from tests/test-2.exp.
* tests/cplusplus.exp: Renamed from tests/test-3.exp.
* tests/gpc.exp: Renamed from tests/test-5.exp.
* src/key-list.cc (output_switch_case): Add trailing semicolon to
lengthptr assignment line. Fixes bug with -D and -S.
From Reini Urban <rurban@sbox.tu-graz.ac.at>. Also reported by
David Hunter.
* tests/Makefile.in (check-lang-syntax): Perform each test with -D
once without and once with duplicates.
* src/key-list.cc (output_keyword_entry): Avoid outputting a struct
initializer of the form {"key",}.
* src/iterator.cc: Don't include <stream.h>.
From Michael Deutschmann <ldeutsch@mail.netshop.net>.
* tests/Makefile.in (VALIDATE, check-lang-syntax): Use $(srcdir) where
appropriate.
Reported by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
* tests/validate: Don't run -traditional tests by default.
* src/main.cc (main): Check for write error on stdout before returning.
* src/Makefile.in (LDFLAGS): New definition, to catch the value given
at configure time.
Make the structure initializers customizable. Based on a patch by
Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
* src/options.h (Options::get_initializer_suffix,
Options::initializer_suffix): New declarations.
* src/options.icc (Options::get_initializer_suffix): New function.
* src/options.cc (DEFAULT_INITIALIZER_SUFFIX): New constant.
(Options::initializer_suffix): New variable.
(Options::short_usage): Document option "-F".
(Options::long_usage): Document option "-F".
(Options constructor): Initialize initializer_suffix.
(Options destructor): Dump initializer_suffix.
(long_options): Add option "-F".
(Options::operator()): Accept option "-F". Sets initializer_suffix.
* src/key-list.cc (output_keyword_blank_entries): Output
initializer_suffix.
* doc/gperf.texi: Document option "-F".
* COPYING: Replace with GPL version 2 (with new FSF address and Y2K
safe year format).
* doc/gpl.texinfo: New file.
* doc/gperf.texi: Document it.
* doc/Makefile.in (gperf.info, gperf.dvi, gperf.html, gperf_toc.html):
Update dependencies.
* doc/Makefile.in (MAKEINFO): Unset LANG while running makeinfo.
1998-05-20 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
* doc/Makefile.in (gperf.dvi, clean): Remove gperf.cps.
(install, installdirs, uninstall): Don't install gperf.dvi. The
info and HTML documentations are sufficient for on-line use, and
users who wish to print the documentation (in PS or DVI format)
can do this directly off the source distribution.
(DVIPS): Use "-D600" instead of "-Pljfour", for portability.
1998-05-20 Akim Demaille <demaille@inf.enst.fr>
* doc/gperf.texi: Many modifications:
(Output Format): Declare `hash' and `in_word_set' as functions.
(Concept Index): New section.
(Title page): Use standard presentation.
(Top): Use @top instead of @unnumbered so that automatic master
update works.
(Motivation): Avoid spaces in @var.
(Options): Use the standard name ``Invoking ...''.
(Options): Declare also the long form of the options.
(Options): Remove redundant @itemize when @table is used.
1998-05-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* aclocal.m4 (CL_PROG_INSTALL): Set cl_cv_path_install, not
ac_cv_path_install.
Sat May 2 13:20:54 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
* gperf-2.7 released.
Sat May 2 12:31:51 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
* src/version.cc (version_string): Remove the "(C++ version)" suffix.

View File

@ -31,7 +31,7 @@ The simplest way to compile this package is:
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
@ -167,7 +167,9 @@ operates.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually

View File

@ -4,7 +4,7 @@
SHELL = /bin/sh
MAKE = make
all : configures src/config.h.in
all : configures src/config.h.in doc/gperf.1
CONFIGURES = configure lib/configure src/configure tests/configure doc/configure
@ -31,5 +31,8 @@ check-configures : $(CONFIGURES)
src/config.h.in : src/configure.in aclocal.m4
cd src && autoheader -l ..
doc/gperf.1 : force
prog=`PATH=build/src:src:$$PATH which gperf`; if test -n "$$prog"; then doc/help2man --name='generate a perfect hash function from a key set' --section=1 $$prog > doc/gperf.1; fi
force :

View File

@ -1,3 +1,13 @@
New in 2.7.2:
* Keywords may now be enclosed in double quotes; this permits the use of
'#', ',', space or NUL inside keywords.
* Bug fixes.
New in 2.7.1:
* Added option "-F" for gcc.
New in 2.7:
* gperf is now a stand-alone package, untied from libg++.

View File

@ -1,24 +1,29 @@
While teaching a data structures course at University of California,
Irvine, I developed a program called GPERF that generates perfect hash
functions for sets of key words. A perfect hash function is simply:
This is GNU gperf. It is a program that generates perfect hash
functions for sets of key words. A perfect hash function is:
A hash function and a data structure that allows
recognition of a key word in a set of words using
exactly 1 probe into the data structure.
The gperf.texinfo file explains how the program works, the form of the
input, what options are available, and hints on choosing the best
options for particular key word sets. The texinfo file is readable
both via the GNU emacs `info' command, and is also suitable for
typesetting with TeX.
The doc/gperf.html file explains how the program works, the form of
the input, what options are available, and hints on choosing the best
options for particular key words set.
The enclosed Makefile creates the executable program ``gperf'' and
also runs some tests.
See the file NEWS for a list of major changes in the current release.
See the file INSTALL for compilation and installation instructions.
Output from the GPERF program is used to recognize reserved words in
the GNU C, GNU C++, and GNU Pascal compilers, as well as with the GNU
indent program.
Happy hacking!
For general documentation on the coding and usage standards
this distribution follows, see the GNU standards document
ftp://ftp.gnu.org/pub/gnu/standards.*, especially the 'Makefile
Conventions', 'Configuration', and 'User Interfaces' sections.
Mail suggestions and bug reports to both <bug-gnu-utils@gnu.org> and
<gperf-bugs@lists.sourceforge.net>. When reporting bugs, please
include in the subject line the package name and version (output of
'gperf --version') for which you found a problem.
Douglas C. Schmidt

View File

@ -37,7 +37,7 @@ AC_CACHE_VAL(cl_cv_path_install,
# AIX installbsd doesn't work without option "-g".
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
cl_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi

View File

@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@ -49,6 +49,7 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
@ -332,7 +333,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.12"
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@ -502,9 +503,11 @@ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@ -519,7 +522,7 @@ fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:523: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:526: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -586,7 +589,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set) 2>&1` in
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@ -665,7 +668,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.12"
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@ -684,9 +687,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g

View File

@ -1,6 +1,6 @@
# Makefile for gperf/doc
# Copyright (C) 1998 Free Software Foundation, Inc.
# Copyright (C) 1998, 2000 Free Software Foundation, Inc.
#
# This file is part of GNU GPERF.
#
@ -27,11 +27,14 @@ srcdir = @srcdir@
prefix = @prefix@
local_prefix = /usr/local
exec_prefix = @exec_prefix@
datadir = @datadir@
infodir = @infodir@
mandir = @mandir@
man1dir = $(mandir)/man1
dvidir = $(mandir)/dvi
htmldir = $(mandir)/html
docdir = $(prefix)/doc/@PACKAGE@
dvidir = $(docdir)
psdir = $(docdir)
htmldir = $(docdir)
# Programs used by "make":
RM = rm -f
@ -40,14 +43,15 @@ RM = rm -f
# Programs used by "make" if you have changed the documentation files:
TEX = tex
TEXI2DVI = texi2dvi
DVIPS = dvips -Pljfour
MAKEINFO = LANGUAGE= makeinfo
DVIPS = dvips -D600
MAKEINFO = LANG= LANGUAGE= makeinfo
TEXI2HTML = texi2html
# Programs used by "make install":
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(SHELL) $(srcdir)/../mkinstalldirs
#### End of system configuration section. ####
@ -60,16 +64,16 @@ all : info dvi ps html
info : $(srcdir)/gperf.info
$(srcdir)/gperf.info : $(srcdir)/gperf.texi
$(srcdir)/gperf.info : $(srcdir)/gperf.texi $(srcdir)/gpl.texinfo
cd $(srcdir) && $(MAKEINFO) --no-split gperf.texi
dvi : $(srcdir)/gperf.dvi
$(srcdir)/gperf.dvi : $(srcdir)/gperf.texi
cd $(srcdir) && $(RM) gperf.aux gperf.toc gperf.cp gperf.fn gperf.ky gperf.pg gperf.tp gperf.vr gperf.log
$(srcdir)/gperf.dvi : $(srcdir)/gperf.texi $(srcdir)/gpl.texinfo
cd $(srcdir) && $(RM) gperf.aux gperf.toc gperf.cp gperf.fn gperf.ky gperf.pg gperf.tp gperf.vr gperf.log gperf.cps
cd $(srcdir) && $(TEXI2DVI) gperf.texi
cd $(srcdir) && $(RM) gperf.aux gperf.toc gperf.cp gperf.fn gperf.ky gperf.pg gperf.tp gperf.vr gperf.log
cd $(srcdir) && $(RM) gperf.aux gperf.toc gperf.cp gperf.fn gperf.ky gperf.pg gperf.tp gperf.vr gperf.log gperf.cps
ps : $(srcdir)/gperf.ps
@ -80,44 +84,46 @@ $(srcdir)/gperf.ps : $(srcdir)/gperf.dvi
html : gperf.html gperf_toc.html
gperf.html : $(srcdir)/gperf.texi
gperf.html : $(srcdir)/gperf.texi $(srcdir)/gpl.texinfo
cd $(srcdir) && $(TEXI2HTML) -expandinfo -number -monolithic gperf.texi
gperf_toc.html : $(srcdir)/gperf.texi
gperf_toc.html : $(srcdir)/gperf.texi $(srcdir)/gpl.texinfo
cd $(srcdir) && $(RM) gperf_*.html
cd $(srcdir) && $(TEXI2HTML) -expandinfo -number -split_chapter gperf.texi
install : all force
if [ ! -d $(infodir) ] ; then mkdir $(infodir) ; fi
$(INSTALL_DATA) $(srcdir)/gperf.info $(infodir)/gperf.info
if [ ! -d $(mandir) ] ; then mkdir $(mandir) ; fi
if [ ! -d $(man1dir) ] ; then mkdir $(man1dir) ; fi
$(INSTALL_DATA) $(srcdir)/gperf.1 $(man1dir)/gperf.1
if [ ! -d $(dvidir) ] ; then mkdir $(dvidir) ; fi
$(INSTALL_DATA) $(srcdir)/gperf.dvi $(dvidir)/gperf.dvi
if [ ! -d $(htmldir) ] ; then mkdir $(htmldir) ; fi
$(INSTALL_DATA) $(srcdir)/gperf.html $(htmldir)/gperf.html
$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
$(INSTALL_DATA) $(srcdir)/gperf.info $(DESTDIR)$(infodir)/gperf.info
$(MKINSTALLDIRS) $(DESTDIR)$(man1dir)
$(INSTALL_DATA) $(srcdir)/gperf.1 $(DESTDIR)$(man1dir)/gperf.1
# $(MKINSTALLDIRS) $(DESTDIR)$(dvidir)
# $(INSTALL_DATA) $(srcdir)/gperf.dvi $(DESTDIR)$(dvidir)/gperf.dvi
# $(MKINSTALLDIRS) $(DESTDIR)$(psdir)
# $(INSTALL_DATA) $(srcdir)/gperf.ps $(DESTDIR)$(dvidir)/gperf.ps
$(MKINSTALLDIRS) $(DESTDIR)$(htmldir)
$(INSTALL_DATA) $(srcdir)/gperf.html $(DESTDIR)$(htmldir)/gperf.html
installdirs : force
if [ ! -d $(infodir) ] ; then mkdir $(infodir) ; fi
if [ ! -d $(mandir) ] ; then mkdir $(mandir) ; fi
if [ ! -d $(man1dir) ] ; then mkdir $(man1dir) ; fi
if [ ! -d $(dvidir) ] ; then mkdir $(dvidir) ; fi
if [ ! -d $(htmldir) ] ; then mkdir $(htmldir) ; fi
$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
$(MKINSTALLDIRS) $(DESTDIR)$(man1dir)
# $(MKINSTALLDIRS) $(DESTDIR)$(dvidir)
# $(MKINSTALLDIRS) $(DESTDIR)$(psdir)
$(MKINSTALLDIRS) $(DESTDIR)$(htmldir)
uninstall : force
$(RM) $(infodir)/gperf.info
$(RM) $(man1dir)/gperf.1
$(RM) $(dvidir)/gperf.dvi
$(RM) $(htmldir)/gperf.html
$(RM) $(DESTDIR)$(infodir)/gperf.info
$(RM) $(DESTDIR)$(man1dir)/gperf.1
# $(RM) $(DESTDIR)$(dvidir)/gperf.dvi
# $(RM) $(DESTDIR)$(psdir)/gperf.ps
$(RM) $(DESTDIR)$(htmldir)/gperf.html
check : all
mostlyclean : clean
clean : force
$(RM) *~ *.aux *.toc *.cp *.fn *.ky *.pg *.tp *.vr *.my *.log core
$(RM) *~ *.aux *.toc *.cp *.fn *.ky *.pg *.tp *.vr *.my *.log *.cps core
distclean : clean
$(RM) config.status config.log config.cache Makefile

View File

@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@ -49,6 +49,7 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
@ -332,7 +333,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.12"
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@ -502,9 +503,11 @@ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@ -518,8 +521,10 @@ else
fi
PACKAGE=gperf
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:523: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:528: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -556,7 +561,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:560: checking for a BSD compatible install" >&5
echo "configure:565: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'cl_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -581,7 +586,7 @@ else
# AIX installbsd doesn't work without option "-g".
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
cl_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
@ -631,7 +636,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set) 2>&1` in
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@ -710,7 +715,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.12"
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@ -729,9 +734,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
@ -750,6 +757,7 @@ s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@PACKAGE@%$PACKAGE%g
s%@SET_MAKE@%$SET_MAKE%g
s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g

View File

@ -1,6 +1,6 @@
dnl autoconf configuration for gperf/doc
dnl Copyright (C) 1998 Free Software Foundation, Inc.
dnl Copyright (C) 1998, 2000 Free Software Foundation, Inc.
dnl written by Douglas C. Schmidt (schmidt@ics.uci.edu)
dnl
dnl This file is part of GNU GPERF.
@ -21,6 +21,8 @@ dnl Free Software Foundation, 59 Temple Place - Suite 330, Boston,
dnl MA 02111-1307, USA.
AC_INIT(gperf.1)
PACKAGE=gperf
AC_SUBST(PACKAGE)
AC_PROG_MAKE_SET
dnl
dnl checks for programs

View File

@ -1,23 +1,187 @@
.TH GPERF 1 "March 7, 1998
.UC 4
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022.
.TH GPERF "1" "September 2000" "GNU gperf 2.7.2" FSF
.SH NAME
gperf \- generate a perfect hash function from a key set
.SH SYNOPSIS
.B gperf
[
.B \-adghijklnoprsStv
] [
.I keyfile
]
.B gperf
[\fIOPTION\fR]... [\fIINPUT-FILE\fR]
.SH DESCRIPTION
\fIgperf\fP reads a set of ``keys'' from \fIkeyfile\fP (or, by
default, from the standard input) and attempts to find a non-minimal
perfect hashing function that recognizes a member of the key set in
constant, i.e., O(1), time. If such a function is found the program
generates a pair of \fIC\fP source code routines that perform the
hashing and table lookup. All generated code is directed to the
standard output.
Please refer to the \fIgperf.texi\fP file for more information.
This file is distributed with \fIgperf\fP release.
GNU `gperf' generates perfect hash functions.
.PP
If a long option shows an argument as mandatory, then it is mandatory
for the equivalent short option also.
.SS "Input file interpretation:"
.TP
\fB\-e\fR, \fB\-\-delimiters\fR=\fIDELIMITER\-LIST\fR
Allow user to provide a string containing delimiters
used to separate keywords from their attributes.
Default is ",\en".
.TP
\fB\-t\fR, \fB\-\-struct\-type\fR
Allows the user to include a structured type
declaration for generated code. Any text before %%
is considered part of the type declaration. Key
words and additional fields may follow this, one
group of fields per line.
.SS "Language for the output code:"
.TP
\fB\-L\fR, \fB\-\-language\fR=\fILANGUAGE\-NAME\fR
Generates code in the specified language. Languages
handled are currently C++, ANSI-C, C, and KR-C. The
default is C.
.SS "Details in the output code:"
.TP
\fB\-K\fR, \fB\-\-slot\-name\fR=\fINAME\fR
Select name of the keyword component in the keyword
structure.
.TP
\fB\-F\fR, \fB\-\-initializer\-suffix\fR=\fIINITIALIZERS\fR
Initializers for additional components in the keyword
structure.
.TP
\fB\-H\fR, \fB\-\-hash\-fn\-name\fR=\fINAME\fR
Specify name of generated hash function. Default is
`hash'.
.TP
\fB\-N\fR, \fB\-\-lookup\-fn\-name\fR=\fINAME\fR
Specify name of generated lookup function. Default
name is `in_word_set'.
.TP
\fB\-Z\fR, \fB\-\-class\-name\fR=\fINAME\fR
Specify name of generated C++ class. Default name is
`Perfect_Hash'.
.TP
\fB\-7\fR, \fB\-\-seven\-bit\fR
Assume 7-bit characters.
.TP
\fB\-c\fR, \fB\-\-compare\-strncmp\fR
Generate comparison code using strncmp rather than
strcmp.
.TP
\fB\-C\fR, \fB\-\-readonly\-tables\fR
Make the contents of generated lookup tables
constant, i.e., readonly.
.TP
\fB\-E\fR, \fB\-\-enum\fR
Define constant values using an enum local to the
lookup function rather than with defines.
.TP
\fB\-I\fR, \fB\-\-includes\fR
Include the necessary system include file <string.h>
at the beginning of the code.
.TP
\fB\-G\fR, \fB\-\-global\fR
Generate the static table of keywords as a static
global variable, rather than hiding it inside of the
lookup function (which is the default behavior).
.TP
\fB\-W\fR, \fB\-\-word\-array\-name\fR=\fINAME\fR
Specify name of word list array. Default name is
`wordlist'.
.TP
\fB\-S\fR, \fB\-\-switch\fR=\fICOUNT\fR
Causes the generated C code to use a switch
statement scheme, rather than an array lookup table.
This can lead to a reduction in both time and space
requirements for some keyfiles. The COUNT argument
determines how many switch statements are generated.
A value of 1 generates 1 switch containing all the
elements, a value of 2 generates 2 tables with 1/2
the elements in each table, etc. If COUNT is very
large, say 1000000, the generated C code does a
binary search.
.TP
\fB\-T\fR, \fB\-\-omit\-struct\-type\fR
Prevents the transfer of the type declaration to the
output file. Use this option if the type is already
defined elsewhere.
.SS "Algorithm employed by gperf:"
.TP
\fB\-k\fR, \fB\-\-key\-positions\fR=\fIKEYS\fR
Select the key positions used in the hash function.
The allowable choices range between 1-126, inclusive.
The positions are separated by commas, ranges may be
used, and key positions may occur in any order.
Also, the meta-character '*' causes the generated
hash function to consider ALL key positions, and $
indicates the ``final character'' of a key, e.g.,
$,1,2,4,6-10.
.TP
\fB\-l\fR, \fB\-\-compare\-strlen\fR
Compare key lengths before trying a string
comparison. This helps cut down on the number of
string comparisons made during the lookup.
.TP
\fB\-D\fR, \fB\-\-duplicates\fR
Handle keywords that hash to duplicate values. This
is useful for certain highly redundant keyword sets.
.TP
\fB\-f\fR, \fB\-\-fast\fR=\fIITERATIONS\fR
Generate the gen-perf.hash function ``fast''. This
decreases gperf's running time at the cost of
minimizing generated table size. The numeric
argument represents the number of times to iterate
when resolving a collision. `0' means ``iterate by
the number of keywords''.
.TP
\fB\-i\fR, \fB\-\-initial\-asso\fR=\fIN\fR
Provide an initial value for the associate values
array. Default is 0. Setting this value larger helps
inflate the size of the final table.
.TP
\fB\-j\fR, \fB\-\-jump\fR=\fIJUMP\-VALUE\fR
Affects the ``jump value'', i.e., how far to advance
the associated character value upon collisions. Must
be an odd number, default is 5.
.TP
\fB\-n\fR, \fB\-\-no\-strlen\fR
Do not include the length of the keyword when
computing the hash function.
.TP
\fB\-o\fR, \fB\-\-occurrence\-sort\fR
Reorders input keys by frequency of occurrence of
the key sets. This should decrease the search time
dramatically.
.TP
\fB\-r\fR, \fB\-\-random\fR
Utilizes randomness to initialize the associated
values table.
.TP
\fB\-s\fR, \fB\-\-size\-multiple\fR=\fIN\fR
Affects the size of the generated hash table. The
numeric argument N indicates ``how many times larger
or smaller'' the associated value range should be,
in relationship to the number of keys, e.g. a value
of 3 means ``allow the maximum associated value to
be about 3 times larger than the number of input
keys.'' Conversely, a value of \fB\-3\fR means ``make the
maximum associated value about 3 times smaller than
the number of input keys. A larger table should
decrease the time required for an unsuccessful
search, at the expense of extra table space. Default
value is 1.
.SS "Informative output:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print this message.
.TP
\fB\-v\fR, \fB\-\-version\fR
Print the gperf version number.
.TP
\fB\-d\fR, \fB\-\-debug\fR
Enables the debugging option (produces verbose
output to the standard error).
.SH "REPORTING BUGS"
Report bugs to <bug-gnu-utils@gnu.org>.
.SH "SEE ALSO"
The full documentation for
.B gperf
is maintained as a Texinfo manual. If the
.B info
and
.B gperf
programs are properly installed at your site, the command
.IP
.B info gperf
.PP
should give you access to the complete manual.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,398 @@
@c This GPL is meant to be included from other files.
@c To format a standalone GPL, use license.texi.
@center Version 2, June 1991
@display
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@end display
@unnumberedsec Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software---to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
@iftex
@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@end iftex
@ifinfo
@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@end ifinfo
@enumerate 0
@item
This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The ``Program'', below,
refers to any such program or work, and a ``work based on the Program''
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term ``modification''.) Each licensee is addressed as ``you''.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
@item
You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
@item
You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
@enumerate a
@item
You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
@item
You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
@item
If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
@end enumerate
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
@item
You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
@enumerate a
@item
Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
@item
Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
@item
Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
@end enumerate
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
@item
You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
@item
You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
@item
Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
@item
If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
@item
If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
@item
The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and ``any
later version'', you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
@item
If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
@iftex
@vskip -@baselineskip
@vskip -@baselineskip
@heading NO WARRANTY
@end iftex
@ifinfo
@center NO WARRANTY
@end ifinfo
@item
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
@item
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
@end enumerate
@iftex
@heading END OF TERMS AND CONDITIONS
@end iftex
@ifinfo
@center END OF TERMS AND CONDITIONS
@end ifinfo
@page
@unnumberedsec How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the ``copyright'' line and a pointer to where the full notice is found.
@smallexample
@var{one line to give the program's name and an idea of what it does.}
Copyright (C) @var{year} @var{name of author}
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by 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.
@end smallexample
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
@smallexample
Gnomovision version 69, Copyright (C) @var{year} @var{name of author}
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
@end smallexample
The hypothetical commands @samp{show w} and @samp{show c} should show
the appropriate parts of the General Public License. Of course, the
commands you use may be called something other than @samp{show w} and
@samp{show c}; they could even be mouse-clicks or menu items---whatever
suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a ``copyright disclaimer'' for the program, if
necessary. Here is a sample; alter the names:
@example
@group
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
@var{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
@end group
@end example
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

513
contrib/gperf/doc/help2man Executable file
View File

@ -0,0 +1,513 @@
#!/usr/bin/perl -w
# Generate a short man page from --help and --version output.
# Copyright © 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Written by Brendan O'Dea <bod@compusol.com.au>
# Available from ftp://ftp.gnu.org/gnu/help2man/
use 5.004;
use strict;
use Getopt::Long;
use Text::Tabs qw(expand);
use POSIX qw(strftime setlocale LC_TIME);
my $this_program = 'help2man';
my $this_version = '1.022';
my $version_info = <<EOT;
GNU $this_program $this_version
Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Brendan O'Dea <bod\@compusol.com.au>
EOT
my $help_info = <<EOT;
`$this_program' generates a man page out of `--help' and `--version' output.
Usage: $this_program [OPTION]... EXECUTABLE
-n, --name=STRING use `STRING' as the description for the NAME paragraph
-s, --section=SECTION use `SECTION' as the section for the man page
-i, --include=FILE include material from `FILE'
-I, --opt-include=FILE include material from `FILE' if it exists
-o, --output=FILE send output to `FILE'
-N, --no-info suppress pointer to Texinfo manual
--help print this help, then exit
--version print version number, then exit
EXECUTABLE should accept `--help' and `--version' options.
Report bugs to <bug-help2man\@gnu.org>.
EOT
my $section = 1;
my ($opt_name, @opt_include, $opt_output, $opt_no_info);
# Parse options.
Getopt::Long::config('bundling');
GetOptions (
'n|name=s' => \$opt_name,
's|section=s' => \$section,
'i|include=s' => sub { push @opt_include, [ pop, 1 ] },
'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] },
'o|output=s' => \$opt_output,
'N|no-info' => \$opt_no_info,
help => sub { print $help_info; exit },
version => sub { print $version_info; exit },
) or die $help_info;
die $help_info unless @ARGV == 1;
my %include = ();
my %append = ();
my @include = (); # retain order given in include file
# Provide replacement `quote-regex' operator for pre-5.005.
BEGIN { eval q(sub qr { '' =~ $_[0]; $_[0] }) if $] < 5.005 }
# Process include file (if given). Format is:
#
# [section name]
# verbatim text
#
# or
#
# /pattern/
# verbatim text
#
for (@opt_include)
{
my ($inc, $required) = @$_;
next unless -f $inc or $required;
die "$this_program: can't open `$inc' ($!)\n"
unless open INC, $inc;
my $key;
my $hash = \%include;
while (<INC>)
{
# [section]
if (/^\[([^]]+)\]/)
{
$key = uc $1;
$key =~ s/^\s+//;
$key =~ s/\s+$//;
$hash = \%include;
push @include, $key unless $include{$key};
next;
}
# /pattern/
if (m!^/(.*)/([ims]*)!)
{
my $pat = $2 ? "(?$2)$1" : $1;
# Check pattern.
eval { $key = qr($pat) };
if ($@)
{
$@ =~ s/ at .*? line \d.*//;
die "$inc:$.:$@";
}
$hash = \%append;
next;
}
# Silently ignore anything before the first
# section--allows for comments and revision info.
next unless $key;
$hash->{$key} ||= '';
$hash->{$key} .= $_;
}
close INC;
die "$this_program: no valid information found in `$inc'\n"
unless $key;
}
# Compress trailing blank lines.
for my $hash (\(%include, %append))
{
for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
}
# Turn off localisation of executable's ouput.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
# Turn off localisation of date (for strftime).
setlocale LC_TIME, 'C';
# Grab help and version info from executable.
my ($help_text, $version_text) = map {
join '', map { s/ +$//; expand $_ } `$ARGV[0] --$_ 2>/dev/null`
or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
} qw(help version);
my $date = strftime "%B %Y", localtime;
(my $program = $ARGV[0]) =~ s!.*/!!;
my $package = $program;
my $version;
if ($opt_output)
{
unlink $opt_output
or die "$this_program: can't unlink $opt_output ($!)\n"
if -e $opt_output;
open STDOUT, ">$opt_output"
or die "$this_program: can't create $opt_output ($!)\n";
}
# The first line of the --version information is assumed to be in one
# of the following formats:
#
# <version>
# <program> <version>
# {GNU,Free} <program> <version>
# <program> ({GNU,Free} <package>) <version>
# <program> - {GNU,Free} <package> <version>
#
# and seperated from any copyright/author details by a blank line.
($_, $version_text) = split /\n+/, $version_text, 2;
if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or
/^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/)
{
$program = $1;
$package = $2;
$version = $3;
}
elsif (/^((?:GNU|Free) +)?(\S+) +(.*)/)
{
$program = $2;
$package = $1 ? "$1$2" : $2;
$version = $3;
}
else
{
$version = $_;
}
$program =~ s!.*/!!;
# No info for `info' itself.
$opt_no_info = 1 if $program eq 'info';
# --name overrides --include contents.
$include{NAME} = "$program \\- $opt_name\n" if $opt_name;
# Default (useless) NAME paragraph.
$include{NAME} ||= "$program \\- manual page for $program $version\n";
# Man pages traditionally have the page title in caps.
my $PROGRAM = uc $program;
# Extract usage clause(s) [if any] for SYNOPSIS.
if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m)
{
my @syn = $2 . $3;
if ($_ = $4)
{
s/^\n//;
for (split /\n/) { s/^ *(or: +)?//; push @syn, $_ }
}
my $synopsis = '';
for (@syn)
{
$synopsis .= ".br\n" if $synopsis;
s!^\S*/!!;
s/^(\S+) *//;
$synopsis .= ".B $1\n";
s/\s+$//;
s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
s/^/\\fI/ unless s/^\\fR//;
$_ .= '\fR';
s/(\\fI)( *)/$2$1/g;
s/\\fI\\fR//g;
s/^\\fR//;
s/\\fI$//;
s/^\./\\&./;
$synopsis .= "$_\n";
}
$include{SYNOPSIS} ||= $synopsis;
}
# Process text, initial section is DESCRIPTION.
my $sect = 'DESCRIPTION';
$_ = "$help_text\n\n$version_text";
# Normalise paragraph breaks.
s/^\n+//;
s/\n*$/\n/;
s/\n\n+/\n\n/g;
# Temporarily exchange leading dots and backslashes for tokens.
s/^\./\x80/mg;
s/\\/\x81/g;
# Start a new paragraph (if required) for these.
s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g;
sub convert_option;
while (length)
{
# Convert some standard paragraph names.
if (s/^(Options|Examples): *\n//)
{
$sect = uc $1;
next;
}
# Copyright section
if (/^Copyright +[(\xa9]/)
{
$sect = 'COPYRIGHT';
$include{$sect} ||= '';
$include{$sect} .= ".PP\n" if $include{$sect};
my $copy;
($copy, $_) = split /\n\n/, $_, 2;
for ($copy)
{
# Add back newline
s/\n*$/\n/;
# Convert iso9959-1 copyright symbol or (c) to nroff
# character.
s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
# Insert line breaks before additional copyright messages
# and the disclaimer.
s/(.)\n(Copyright |This +is +free +software)/$1\n.br\n$2/g;
# Join hyphenated lines.
s/([A-Za-z])-\n */$1/g;
}
$include{$sect} .= $copy;
$_ ||= '';
next;
}
# Catch bug report text.
if (/^(Report +bugs|Email +bug +reports +to) /)
{
$sect = 'REPORTING BUGS';
}
# Author section.
elsif (/^Written +by/)
{
$sect = 'AUTHOR';
}
# Examples, indicated by an indented leading $, % or > are
# rendered in a constant width font.
if (/^( +)([\$\%>] )\S/)
{
my $indent = $1;
my $prefix = $2;
my $break = '.IP';
$include{$sect} ||= '';
while (s/^$indent\Q$prefix\E(\S.*)\n*//)
{
$include{$sect} .= "$break\n\\f(CW$prefix$1\\fR\n";
$break = '.br';
}
next;
}
my $matched = '';
$include{$sect} ||= '';
# Sub-sections have a trailing colon and the second line indented.
if (s/^(\S.*:) *\n / /)
{
$matched .= $& if %append;
$include{$sect} .= qq(.SS "$1"\n);
}
my $indent = 0;
my $content = '';
# Option with description.
if (s/^( {1,10}([+-]\S.*?))(?:( +)|\n( {20,}))(\S.*)\n//)
{
$matched .= $& if %append;
$indent = length ($4 || "$1$3");
$content = ".TP\n\x82$2\n\x82$5\n";
unless ($4)
{
# Indent may be different on second line.
$indent = length $& if /^ {20,}/;
}
}
# Option without description.
elsif (s/^ {1,10}([+-]\S.*)\n//)
{
$matched .= $& if %append;
$content = ".HP\n\x82$1\n";
$indent = 80; # not continued
}
# Indented paragraph with tag.
elsif (s/^( +(\S.*?) +)(\S.*)\n//)
{
$matched .= $& if %append;
$indent = length $1;
$content = ".TP\n\x82$2\n\x82$3\n";
}
# Indented paragraph.
elsif (s/^( +)(\S.*)\n//)
{
$matched .= $& if %append;
$indent = length $1;
$content = ".IP\n\x82$2\n";
}
# Left justified paragraph.
else
{
s/(.*)\n//;
$matched .= $& if %append;
$content = ".PP\n" if $include{$sect};
$content .= "$1\n";
}
# Append continuations.
while (s/^ {$indent}(\S.*)\n//)
{
$matched .= $& if %append;
$content .= "\x82$1\n"
}
# Move to next paragraph.
s/^\n+//;
for ($content)
{
# Leading dot protection.
s/\x82\./\x80/g;
s/\x82//g;
# Convert options.
s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge;
}
# Check if matched paragraph contains /pat/.
if (%append)
{
for my $pat (keys %append)
{
if ($matched =~ $pat)
{
$content .= ".PP\n" unless $append{$pat} =~ /^\./;
$content .= $append{$pat};
}
}
}
$include{$sect} .= $content;
}
# Refer to the real documentation.
unless ($opt_no_info)
{
$sect = 'SEE ALSO';
$include{$sect} ||= '';
$include{$sect} .= ".PP\n" if $include{$sect};
$include{$sect} .= <<EOT;
The full documentation for
.B $program
is maintained as a Texinfo manual. If the
.B info
and
.B $program
programs are properly installed at your site, the command
.IP
.B info $program
.PP
should give you access to the complete manual.
EOT
}
# Output header.
print <<EOT;
.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
.TH $PROGRAM "$section" "$date" "$package $version" FSF
EOT
# Section ordering.
my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES);
my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO');
my $filter = join '|', @pre, @post;
# Output content.
for (@pre, (grep ! /^($filter)$/o, @include), @post)
{
if ($include{$_})
{
my $quote = /\W/ ? '"' : '';
print ".SH $quote$_$quote\n";
for ($include{$_})
{
# Replace leading dot an backslash tokens.
s/\x80/\\&./g;
s/\x81/\\e/g;
print;
}
}
}
exit;
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
# embolden. Option arguments get italicised.
sub convert_option
{
local $_ = '\fB' . shift;
s/-/\\-/g;
unless (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
{
s/=(.)/\\fR=\\fI$1/;
s/ (.)/ \\fI$1/;
$_ .= '\fR';
}
$_;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@ -49,6 +49,7 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
@ -332,7 +333,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.12"
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@ -502,9 +503,11 @@ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@ -519,7 +522,7 @@ fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:523: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:526: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -548,15 +551,16 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:552: checking for $ac_word" >&5
echo "configure:555: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
@ -577,16 +581,17 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:581: checking for $ac_word" >&5
echo "configure:585: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
for ac_dir in $PATH; do
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
@ -621,25 +626,61 @@ else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:636: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="cl"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
;;
esac
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:629: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:668: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 639 "configure"
cat > conftest.$ac_ext << EOF
#line 679 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -653,18 +694,24 @@ else
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:710: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:668: checking whether we are using GNU C" >&5
echo "configure:715: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -673,7 +720,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -684,11 +731,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:692: checking whether ${CC-cc} accepts -g" >&5
else
GCC=
fi
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:743: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -703,20 +754,24 @@ rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-O2"
CFLAGS="-g"
fi
else
GCC=
test "${CFLAGS+set}" = set || CFLAGS="-g"
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:720: checking how to run the C preprocessor" >&5
echo "configure:775: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -731,14 +786,14 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 735 "configure"
#line 790 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
{ (eval echo configure:796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
@ -748,14 +803,31 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 752 "configure"
#line 807 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
{ (eval echo configure:813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 824 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
@ -767,6 +839,8 @@ else
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
@ -776,20 +850,21 @@ else
fi
echo "$ac_t""$CPP" 1>&6
for ac_prog in $CCC c++ g++ gcc CC cxx cc++
for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:785: checking for $ac_word" >&5
echo "configure:859: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CXX="$ac_prog"
@ -812,21 +887,23 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:816: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
echo "configure:891: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 826 "configure"
cat > conftest.$ac_ext << EOF
#line 902 "configure"
#include "confdefs.h"
main(){return(0);}
int main(){return(0);}
EOF
if { (eval echo configure:830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -844,7 +921,7 @@ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
@ -852,12 +929,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:856: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:933: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:861: checking whether we are using GNU C++" >&5
echo "configure:938: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -866,7 +943,7 @@ else
yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@ -877,11 +954,15 @@ echo "$ac_t""$ac_cv_prog_gxx" 1>&6
if test $ac_cv_prog_gxx = yes; then
GXX=yes
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:885: checking whether ${CXX-g++} accepts -g" >&5
else
GXX=
fi
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:966: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -896,20 +977,24 @@ rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
CXXFLAGS="-g -O2"
else
CXXFLAGS="-O2"
CXXFLAGS="-g"
fi
else
GXX=
test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
if test "$GXX" = yes; then
CXXFLAGS="-O2"
else
CXXFLAGS=
fi
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
echo "configure:913: checking how to run the C++ preprocessor" >&5
echo "configure:998: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -918,17 +1003,17 @@ else
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
#line 926 "configure"
#line 1011 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
{ (eval echo configure:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
@ -944,7 +1029,7 @@ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
fi
@ -954,15 +1039,16 @@ echo "$ac_t""$CXXCPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:958: checking for $ac_word" >&5
echo "configure:1043: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
@ -991,7 +1077,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:995: checking for a BSD compatible install" >&5
echo "configure:1081: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'cl_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1016,7 +1102,7 @@ else
# AIX installbsd doesn't work without option "-g".
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
cl_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
@ -1066,7 +1152,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set) 2>&1` in
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@ -1145,7 +1231,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.12"
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@ -1164,9 +1250,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g

View File

@ -1,5 +1,5 @@
/* Declarations for getopt.
Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -78,7 +78,7 @@ extern int optopt;
struct option
{
#if defined (__STDC__) && __STDC__
#if (defined (__STDC__) && __STDC__) || defined (__cplusplus)
const char *name;
#else
char *name;

View File

@ -4,7 +4,37 @@ maintainer has been informed of these patches.
diff -c3 getopt.h.orig getopt.h
*** getopt.h.orig Sat Jun 21 03:01:53 1997
--- getopt.h Thu Apr 16 00:17:42 1998
--- getopt.h Mon Aug 28 12:36:27 2000
***************
*** 1,5 ****
/* Declarations for getopt.
! Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
--- 1,5 ----
/* Declarations for getopt.
! Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
***************
*** 78,84 ****
struct option
{
! #if defined (__STDC__) && __STDC__
const char *name;
#else
char *name;
--- 78,84 ----
struct option
{
! #if (defined (__STDC__) && __STDC__) || defined (__cplusplus)
const char *name;
#else
char *name;
***************
*** 96,102 ****
#define required_argument 1

View File

@ -1,36 +1,27 @@
/*
Copyright (C) 1990 Free Software Foundation
Copyright (C) 1990, 2000 Free Software Foundation
written by Doug Lea (dl@rocky.oswego.edu)
This file is part of the GNU C++ Library. This library is free
software; you can redistribute it and/or modify it under the terms of
the GNU Library General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your
option) any later version. This library is distributed in the hope
that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <hash.h>
/*
some useful hash functions
Some useful hash function.
It's not a particularly good hash function (<< 5 would be better than << 4),
but people believe in it because it comes from Dragon book.
*/
unsigned int hashpjw (const char* x) // From Dragon book, p436
unsigned int
hashpjw (const char *x, unsigned int len) // From Dragon book, p436
{
unsigned int h = 0;
unsigned int g;
while (*x != 0)
{
h = (h << 4) + (unsigned char) *x++;
if ((g = h & 0xf0000000) != 0)
h = (h ^ (g >> 24)) ^ g;
}
for (; len > 0; len--)
{
h = (h << 4) + (unsigned char) *x++;
if ((g = h & 0xf0000000) != 0)
h = (h ^ (g >> 24)) ^ g;
}
return h;
}

View File

@ -1,27 +1,15 @@
// This may look like C code, but it is really -*- C++ -*-
/*
Copyright (C) 1988, 1992 Free Software Foundation
Copyright (C) 1988, 1992, 2000 Free Software Foundation
written by Doug Lea (dl@rocky.oswego.edu)
This file is part of the GNU C++ Library. This library is free
software; you can redistribute it and/or modify it under the terms of
the GNU Library General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your
option) any later version. This library is distributed in the hope
that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _hash_h
#define _hash_h 1
/* a hash function for null-terminated char* strings using the
/* a hash function for char[] arrays using the
method described in Aho, Sethi, & Ullman, p 436. */
extern unsigned int hashpjw (const char*);
extern unsigned int hashpjw (const char *string, unsigned int len);
#endif

40
contrib/gperf/mkinstalldirs Executable file
View File

@ -0,0 +1,40 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
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

View File

@ -1,6 +1,6 @@
# Makefile for gperf/src
# Copyright (C) 1989, 1992, 1993, 1998 Free Software Foundation, Inc.
# Copyright (C) 1989, 1992, 1993, 1998, 2000 Free Software Foundation, Inc.
# written by Douglas C. Schmidt (schmidt@ics.uci.edu)
#
# This file is part of GNU GPERF.
@ -39,6 +39,8 @@ CPP = @CPP@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
CXXCPP = @CXXCPP@
# Both C and C++ compiler
LDFLAGS = @LDFLAGS@
# Other
MV = mv
LN = ln
@ -49,6 +51,7 @@ RM = rm -f
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(SHELL) $(srcdir)/../mkinstalldirs
#### End of system configuration section. ####
@ -119,14 +122,14 @@ version.o : version.cc $(VERSION_H)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/version.cc
install : all force
if [ ! -d $(bindir) ] ; then mkdir $(bindir) ; fi
$(INSTALL_PROGRAM) $(TARGETPROG) $(bindir)/$(TARGETPROG)
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) $(TARGETPROG) $(DESTDIR)$(bindir)/$(TARGETPROG)
installdirs : force
if [ ! -d $(bindir) ] ; then mkdir $(bindir) ; fi
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
uninstall : force
$(RM) $(bindir)/$(TARGETPROG)
$(RM) $(DESTDIR)$(bindir)/$(TARGETPROG)
check : all

View File

@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@ -49,6 +49,7 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
@ -332,7 +333,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.12"
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@ -502,9 +503,11 @@ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@ -520,7 +523,7 @@ fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:524: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:527: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -549,15 +552,16 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:553: checking for $ac_word" >&5
echo "configure:556: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
@ -578,16 +582,17 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:582: checking for $ac_word" >&5
echo "configure:586: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
for ac_dir in $PATH; do
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
@ -622,25 +627,61 @@ else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:637: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="cl"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
;;
esac
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:630: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:669: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 640 "configure"
cat > conftest.$ac_ext << EOF
#line 680 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -654,18 +695,24 @@ else
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:664: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:711: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:669: checking whether we are using GNU C" >&5
echo "configure:716: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -674,7 +721,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -685,11 +732,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:693: checking whether ${CC-cc} accepts -g" >&5
else
GCC=
fi
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:744: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -704,20 +755,24 @@ rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-O2"
CFLAGS="-g"
fi
else
GCC=
test "${CFLAGS+set}" = set || CFLAGS="-g"
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:721: checking how to run the C preprocessor" >&5
echo "configure:776: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -732,14 +787,14 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 736 "configure"
#line 791 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
{ (eval echo configure:797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
@ -749,14 +804,31 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 753 "configure"
#line 808 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
{ (eval echo configure:814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 825 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
@ -768,6 +840,8 @@ else
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
@ -777,20 +851,21 @@ else
fi
echo "$ac_t""$CPP" 1>&6
for ac_prog in $CCC c++ g++ gcc CC cxx cc++
for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:786: checking for $ac_word" >&5
echo "configure:860: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CXX="$ac_prog"
@ -813,21 +888,23 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:817: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
echo "configure:892: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 827 "configure"
cat > conftest.$ac_ext << EOF
#line 903 "configure"
#include "confdefs.h"
main(){return(0);}
int main(){return(0);}
EOF
if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -845,7 +922,7 @@ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
@ -853,12 +930,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:857: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:934: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:862: checking whether we are using GNU C++" >&5
echo "configure:939: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -867,7 +944,7 @@ else
yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@ -878,11 +955,15 @@ echo "$ac_t""$ac_cv_prog_gxx" 1>&6
if test $ac_cv_prog_gxx = yes; then
GXX=yes
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:886: checking whether ${CXX-g++} accepts -g" >&5
else
GXX=
fi
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:967: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -897,20 +978,24 @@ rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
CXXFLAGS="-g -O2"
else
CXXFLAGS="-O2"
CXXFLAGS="-g"
fi
else
GXX=
test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
if test "$GXX" = yes; then
CXXFLAGS="-O2"
else
CXXFLAGS=
fi
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
echo "configure:914: checking how to run the C++ preprocessor" >&5
echo "configure:999: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -919,17 +1004,17 @@ else
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
#line 927 "configure"
#line 1012 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
{ (eval echo configure:1017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
@ -945,7 +1030,7 @@ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
fi
@ -963,7 +1048,7 @@ echo "$ac_t""$CXXCPP" 1>&6
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:967: checking for a BSD compatible install" >&5
echo "configure:1052: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'cl_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -988,7 +1073,7 @@ else
# AIX installbsd doesn't work without option "-g".
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
cl_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
@ -1016,8 +1101,8 @@ if test -z "$INSTALL_DATA"; then
fi
echo $ac_n "checking for working throw()""... $ac_c" 1>&6
echo "configure:1020: checking for working throw()" >&5
if eval "test \"`echo '$''{'gp_cxx_throw_decl'+set}'`\" = set"; then
echo "configure:1105: checking for working throw()" >&5
if eval "test \"`echo '$''{'gp_cv_cxx_throw_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1026,11 +1111,11 @@ ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 1034 "configure"
#line 1119 "configure"
#include "confdefs.h"
#include <stdlib.h>
void operator delete (void* ptr) throw() {}
@ -1038,28 +1123,28 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:1042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gp_cxx_throw_decl=yes
gp_cv_cxx_throw_decl=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gp_cxx_throw_decl=no
gp_cv_cxx_throw_decl=no
fi
rm -f conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$gp_cxx_throw_decl" 1>&6
if test $gp_cxx_throw_decl = yes; then
echo "$ac_t""$gp_cv_cxx_throw_decl" 1>&6
if test $gp_cv_cxx_throw_decl = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_THROW_DECL 1
EOF
@ -1069,18 +1154,18 @@ for ac_hdr in unistd.h sys/time.h sys/resource.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1073: checking for $ac_hdr" >&5
echo "configure:1158: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1078 "configure"
#line 1163 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
{ (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
@ -1109,12 +1194,12 @@ done
for ac_func in getrlimit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1113: checking for $ac_func" >&5
echo "configure:1198: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1118 "configure"
#line 1203 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1137,7 +1222,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -1165,12 +1250,12 @@ done
for ac_func in setrlimit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1169: checking for $ac_func" >&5
echo "configure:1254: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1174 "configure"
#line 1259 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1193,7 +1278,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -1242,7 +1327,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set) 2>&1` in
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@ -1309,7 +1394,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.12"
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@ -1328,9 +1413,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g

View File

@ -1,6 +1,6 @@
dnl autoconf configuration for gperf/src
dnl Copyright (C) 1998 Free Software Foundation, Inc.
dnl Copyright (C) 1998, 2000 Free Software Foundation, Inc.
dnl written by Douglas C. Schmidt (schmidt@ics.uci.edu)
dnl
dnl This file is part of GNU GPERF.
@ -40,16 +40,16 @@ dnl
dnl checks for compiler characteristics
dnl
AC_MSG_CHECKING([for working throw()])
AC_CACHE_VAL(gp_cxx_throw_decl,[
AC_CACHE_VAL(gp_cv_cxx_throw_decl,[
AC_LANG_SAVE()
AC_LANG_CPLUSPLUS()
AC_TRY_COMPILE([#include <stdlib.h>
void operator delete (void* ptr) throw() {}], [],
gp_cxx_throw_decl=yes, gp_cxx_throw_decl=no)
gp_cv_cxx_throw_decl=yes, gp_cv_cxx_throw_decl=no)
AC_LANG_RESTORE()
])
AC_MSG_RESULT([$]gp_cxx_throw_decl)
if test [$]gp_cxx_throw_decl = yes; then
AC_MSG_RESULT([$]gp_cv_cxx_throw_decl)
if test [$]gp_cv_cxx_throw_decl = yes; then
AC_DEFINE(HAVE_THROW_DECL)
fi
dnl

View File

@ -1,6 +1,6 @@
/* Provides high-level routines to manipulate the keywork list
structures the code generation output.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -81,37 +81,45 @@ Gen_Perf::Gen_Perf (void)
}
/* Merge two disjoint hash key multisets to form the ordered disjoint union of the sets.
(In a multiset, an element can occur multiple times).
(In a multiset, an element can occur multiple times.)
Precondition: both set_1 and set_2 must be ordered. Returns the length
of the combined set. */
inline int
Gen_Perf::compute_disjoint_union (const char *set_1, const char *set_2, char *set_3)
Gen_Perf::compute_disjoint_union (const char *set_1, int size_1, const char *set_2, int size_2, char *set_3)
{
T (Trace t ("Gen_Perf::compute_disjoint_union");)
char *base = set_3;
while (*set_1 && *set_2)
while (size_1 > 0 && size_2 > 0)
if (*set_1 == *set_2)
set_1++, set_2++;
set_1++, size_1--, set_2++, size_2--;
else
{
*set_3 = *set_1 < *set_2 ? *set_1++ : *set_2++;
if (set_3 == base || *set_3 != *(set_3-1)) set_3++;
char next;
if (*set_1 < *set_2)
next = *set_1++, size_1--;
else
next = *set_2++, size_2--;
if (set_3 == base || next != set_3[-1])
*set_3++ = next;
}
while (*set_1)
while (size_1 > 0)
{
*set_3 = *set_1++;
if (set_3 == base || *set_3 != *(set_3-1)) set_3++;
char next;
next = *set_1++, size_1--;
if (set_3 == base || next != set_3[-1])
*set_3++ = next;
}
while (*set_2)
while (size_2 > 0)
{
*set_3 = *set_2++;
if (set_3 == base || *set_3 != *(set_3-1)) set_3++;
char next;
next = *set_2++, size_2--;
if (set_3 == base || next != set_3[-1])
*set_3++ = next;
}
*set_3 = '\0';
return set_3 - base;
}
@ -146,10 +154,12 @@ inline int
Gen_Perf::hash (List_Node *key_node)
{
T (Trace t ("Gen_Perf::hash");)
int sum = option[NOLENGTH] ? 0 : key_node->length;
int sum = option[NOLENGTH] ? 0 : key_node->key_length;
for (const char *ptr = key_node->char_set; *ptr; ptr++)
sum += asso_values[(unsigned char)(*ptr)];
const char *p = key_node->char_set;
int i = key_node->char_set_length;
for (; i > 0; p++, i--)
sum += asso_values[(unsigned char)(*p)];
return key_node->hash_value = sum;
}
@ -209,28 +219,35 @@ Gen_Perf::change (List_Node *prior, List_Node *curr)
{
T (Trace t ("Gen_Perf::change");)
static char *union_set;
int union_set_length;
if (!union_set)
union_set = new char [2 * option.get_max_keysig_size () + 1];
union_set = new char [2 * option.get_max_keysig_size ()];
if (option[DEBUG])
{
fprintf (stderr, "collision on keyword #%d, prior = \"%s\", curr = \"%s\" hash = %d\n",
num_done, prior->key, curr->key, curr->hash_value);
fprintf (stderr, "collision on keyword #%d, prior = \"%.*s\", curr = \"%.*s\" hash = %d\n",
num_done,
prior->key_length, prior->key,
curr->key_length, curr->key,
curr->hash_value);
fflush (stderr);
}
sort_set (union_set, compute_disjoint_union (prior->char_set, curr->char_set, union_set));
union_set_length = compute_disjoint_union (prior->char_set, prior->char_set_length, curr->char_set, curr->char_set_length, union_set);
sort_set (union_set, union_set_length);
/* Try changing some values, if change doesn't alter other values continue normal action. */
fewest_collisions++;
for (char *temp = union_set; *temp; temp++)
if (!affects_prev (*temp, curr))
const char *p = union_set;
int i = union_set_length;
for (; i > 0; p++, i--)
if (!affects_prev (*p, curr))
{
if (option[DEBUG])
{
fprintf (stderr, " by changing asso_value['%c'] (char #%d) to %d\n",
*temp, temp - union_set + 1, asso_values[(unsigned char)(*temp)]);
*p, p - union_set + 1, asso_values[(unsigned char)(*p)]);
fflush (stderr);
}
return; /* Good, doesn't affect previous hash values, we'll take it. */

View File

@ -3,7 +3,7 @@
/* Provides high-level routines to manipulate the keyword list
structures the code generation output.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -38,7 +38,7 @@ private:
void change (List_Node *prior, List_Node *curr);
int affects_prev (char c, List_Node *curr);
static int hash (List_Node *key_node);
static int compute_disjoint_union (const char *set_1, const char *set_2, char *set_3);
static int compute_disjoint_union (const char *set_1, int size_1, const char *set_2, int size_2, char *set_3);
static void sort_set (char *union_set, int len);
public:

View File

@ -1,5 +1,5 @@
/* Hash table for checking keyword links. Implemented using double hashing.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -26,8 +26,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
#include "options.h"
#include "trace.h"
#define NIL(TYPE) (TYPE *)0
/* The size of the hash table is always the smallest power of 2 >= the size
indicated by the user. This allows several optimizations, including
the use of double hashing and elimination of the mod instruction.
@ -37,8 +35,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
This compromises information hiding somewhat, but greatly reduces
memory fragmentation, since we can now use alloca! */
Hash_Table::Hash_Table (List_Node **table_ptr, int s):
table (table_ptr), size (s), collisions (0)
Hash_Table::Hash_Table (List_Node **table_ptr, int s, int ignore_len):
table (table_ptr), size (s), collisions (0), ignore_length (ignore_len)
{
T (Trace t ("Hash_Table::Hash_Table");)
memset ((char *) table, 0, size * sizeof (*table));
@ -60,8 +58,10 @@ Hash_Table::~Hash_Table (void)
for (int i = size - 1; i >= 0; i--)
if (table[i])
fprintf (stderr, "%8d, %*s, %s\n",
i, field_width, table[i]->char_set, table[i]->key);
fprintf (stderr, "%8d, %*.*s, %.*s\n",
i,
field_width, table[i]->char_set_length, table[i]->char_set,
table[i]->key_length, table[i]->key);
fprintf (stderr, "\nend dumping hash table\n\n");
}
@ -72,20 +72,24 @@ Hash_Table::~Hash_Table (void)
Uses double hashing. */
List_Node *
Hash_Table::operator() (List_Node *item, int ignore_length)
Hash_Table::insert (List_Node *item)
{
T (Trace t ("Hash_Table::operator()");)
unsigned hash_val = hashpjw (item->char_set);
int probe = hash_val & size - 1;
int increment = (hash_val ^ item->length | 1) & size - 1;
unsigned hash_val = hashpjw (item->char_set, item->char_set_length);
int probe = hash_val & (size - 1);
int increment = ((hash_val ^ item->key_length) | 1) & (size - 1);
while (table[probe]
&& (strcmp (table[probe]->char_set, item->char_set)
|| (!ignore_length && table[probe]->length != item->length)))
while (table[probe])
{
if (table[probe]->char_set_length == item->char_set_length
&& memcmp (table[probe]->char_set, item->char_set, item->char_set_length) == 0
&& (ignore_length || table[probe]->key_length == item->key_length))
return table[probe];
collisions++;
probe = probe + increment & size - 1;
probe = (probe + increment) & (size - 1);
}
return table[probe] ? table[probe] : (table[probe] = item, NIL (List_Node));
table[probe] = item;
return (List_Node *) 0;
}

View File

@ -2,7 +2,7 @@
/* Hash table used to check for duplicate keyword entries.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -32,11 +32,12 @@ private:
List_Node **table; /* Vector of pointers to linked lists of List_Node's. */
int size; /* Size of the vector. */
int collisions; /* Find out how well our double hashing is working! */
int ignore_length;
public:
Hash_Table (List_Node **t, int s);
Hash_Table (List_Node **t, int s, int ignore_len);
~Hash_Table (void);
List_Node *operator () (List_Node *item, int ignore_length);
List_Node *insert (List_Node *item);
};
#endif

View File

@ -1,5 +1,5 @@
/* Provides an Iterator for keyword characters.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -20,7 +20,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
#include "iterator.h"
#include <stream.h>
#include <ctype.h>
#include "trace.h"

View File

@ -1,5 +1,5 @@
/* Routines for building, ordering, and printing the keyword list.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -21,6 +21,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
#include <stdio.h>
#include <string.h> /* declares strncpy(), strchr() */
#include <stdlib.h> /* declares malloc(), free(), abs(), exit(), abort() */
#include <ctype.h> /* declares isprint() */
#include <assert.h> /* defines assert() */
#include <limits.h> /* defines SCHAR_MAX etc. */
#include "options.h"
@ -209,6 +210,144 @@ Key_List::set_output_types (void)
}
}
/* Extracts a key from an input line and creates a new List_Node for it. */
static List_Node *
parse_line (const char *line, const char *delimiters)
{
if (*line == '"')
{
/* Parse a string in ANSI C syntax. */
char *key = new char[strlen(line)];
char *kp = key;
const char *lp = line + 1;
for (; *lp;)
{
char c = *lp;
if (c == '\0')
{
fprintf (stderr, "unterminated string: %s\n", line);
exit (1);
}
else if (c == '\\')
{
c = *++lp;
switch (c)
{
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
{
int code = 0;
int count = 0;
while (count < 3 && *lp >= '0' && *lp <= '7')
{
code = (code << 3) + (*lp - '0');
lp++;
count++;
}
if (code > UCHAR_MAX)
fprintf (stderr, "octal escape out of range: %s\n", line);
*kp = (char) code;
break;
}
case 'x':
{
int code = 0;
int count = 0;
lp++;
while ((*lp >= '0' && *lp <= '9')
|| (*lp >= 'A' && *lp <= 'F')
|| (*lp >= 'a' && *lp <= 'f'))
{
code = (code << 4)
+ (*lp >= 'A' && *lp <= 'F' ? *lp - 'A' + 10 :
*lp >= 'a' && *lp <= 'f' ? *lp - 'a' + 10 :
*lp - '0');
lp++;
count++;
}
if (count == 0)
fprintf (stderr, "hexadecimal escape without any hex digits: %s\n", line);
if (code > UCHAR_MAX)
fprintf (stderr, "hexadecimal escape out of range: %s\n", line);
*kp = (char) code;
break;
}
case '\\': case '\'': case '"':
*kp = c;
lp++;
break;
case 'n':
*kp = '\n';
lp++;
break;
case 't':
*kp = '\t';
lp++;
break;
case 'r':
*kp = '\r';
lp++;
break;
case 'f':
*kp = '\f';
lp++;
break;
case 'b':
*kp = '\b';
lp++;
break;
case 'a':
*kp = '\a';
lp++;
break;
case 'v':
*kp = '\v';
lp++;
break;
default:
fprintf (stderr, "invalid escape sequence in string: %s\n", line);
exit (1);
}
}
else if (c == '"')
break;
else
{
*kp = c;
lp++;
}
kp++;
}
lp++;
if (*lp != '\0')
{
if (strchr (delimiters, *lp) == NULL)
{
fprintf (stderr, "string not followed by delimiter: %s\n", line);
exit (1);
}
lp++;
}
return new List_Node (key, kp - key, option[TYPE] ? lp : "");
}
else
{
/* Not a string. Look for the delimiter. */
int len = strcspn (line, delimiters);
const char *rest;
if (line[len] == '\0')
rest = "";
else
/* Skip the first delimiter. */
rest = &line[len + 1];
return new List_Node (line, len, option[TYPE] ? rest : "");
}
}
/* Reads in all keys from standard input and creates a linked list pointed
to by Head. This list is then quickly checked for ``links,'' i.e.,
unhashable elements possessing identical key sets and lengths. */
@ -235,13 +374,13 @@ Key_List::read_keys (void)
const char *delimiter = option.get_delimiter ();
List_Node *temp, *trail = 0;
head = new List_Node (ptr, strcspn (ptr, delimiter));
head = parse_line (ptr, delimiter);
for (temp = head;
(ptr = Read_Line::get_line ()) && strcmp (ptr, "%%");
temp = temp->next)
{
temp->next = new List_Node (ptr, strcspn (ptr, delimiter));
temp->next = parse_line (ptr, delimiter);
total_keys++;
}
@ -266,14 +405,14 @@ Key_List::read_keys (void)
#endif
/* Make large hash table for efficiency. */
Hash_Table found_link (table, table_size);
Hash_Table found_link (table, table_size, option[NOLENGTH]);
/* Test whether there are any links and also set the maximum length of
an identifier in the keyword list. */
for (temp = head; temp; temp = temp->next)
{
List_Node *ptr = found_link (temp, option[NOLENGTH]);
List_Node *ptr = found_link.insert (temp);
/* Check for links. We deal with these by building an equivalence class
of all duplicate values (i.e., links) so that only 1 keyword is
@ -290,17 +429,19 @@ Key_List::read_keys (void)
/* Complain if user hasn't enabled the duplicate option. */
if (!option[DUP] || option[DEBUG])
fprintf (stderr, "Key link: \"%s\" = \"%s\", with key set \"%s\".\n",
temp->key, ptr->key, temp->char_set);
fprintf (stderr, "Key link: \"%.*s\" = \"%.*s\", with key set \"%.*s\".\n",
temp->key_length, temp->key,
ptr->key_length, ptr->key,
temp->char_set_length, temp->char_set);
}
else
trail = temp;
/* Update minimum and maximum keyword length, if needed. */
if (max_key_len < temp->length)
max_key_len = temp->length;
if (min_key_len > temp->length)
min_key_len = temp->length;
if (max_key_len < temp->key_length)
max_key_len = temp->key_length;
if (min_key_len > temp->key_length)
min_key_len = temp->key_length;
}
#if !LARGE_STACK_ARRAYS
@ -320,6 +461,13 @@ Key_List::read_keys (void)
exit (1);
}
}
/* Exit program if an empty string is used as key, since the comparison
expressions don't work correctly for looking up an empty string. */
if (min_key_len == 0)
{
fprintf (stderr, "Empty input key is not allowed.\nTo recognize an empty input key, your code should check for\nlen == 0 before calling the gperf generated lookup function.\n");
exit (1);
}
if (option[ALLCHARS])
option.set_keysig_size (max_key_len);
}
@ -400,8 +548,10 @@ Key_List::get_occurrence (List_Node *ptr)
T (Trace t ("Key_List::get_occurrence");)
int value = 0;
for (const char *temp = ptr->char_set; *temp; temp++)
value += occurrences[(unsigned char)(*temp)];
const char *p = ptr->char_set;
unsigned int i = ptr->char_set_length;
for (; i > 0; p++, i--)
value += occurrences[(unsigned char)(*p)];
return value;
}
@ -413,8 +563,11 @@ inline void
Key_List::set_determined (List_Node *ptr)
{
T (Trace t ("Key_List::set_determined");)
for (const char *temp = ptr->char_set; *temp; temp++)
determined[(unsigned char)(*temp)] = 1;
const char *p = ptr->char_set;
unsigned int i = ptr->char_set_length;
for (; i > 0; p++, i--)
determined[(unsigned char)(*p)] = 1;
}
/* Returns TRUE if PTR's key set is already completely determined. */
@ -425,8 +578,10 @@ Key_List::already_determined (List_Node *ptr)
T (Trace t ("Key_List::already_determined");)
int is_determined = 1;
for (const char *temp = ptr->char_set; is_determined && *temp; temp++)
is_determined = determined[(unsigned char)(*temp)];
const char *p = ptr->char_set;
unsigned int i = ptr->char_set_length;
for (; is_determined && i > 0; p++, i--)
is_determined = determined[(unsigned char)(*p)];
return is_determined;
}
@ -653,20 +808,34 @@ Key_List::output_constants (struct Output_Constants& style)
/* ------------------------------------------------------------------------- */
/* Outputs a keyword, as a string: enclosed in double quotes, escaping
backslashes and double quote characters. */
backslashes, double quote and unprintable characters. */
static void
output_string (const char *key)
output_string (const char *key, int len)
{
T (Trace t ("output_string");)
char c;
putchar ('"');
while (c = *key++, c != '\0')
for (; len > 0; len--)
{
if (c == '"' || c == '\\')
putchar ('\\');
putchar (c);
unsigned char c = (unsigned char) *key++;
if (isprint (c))
{
if (c == '"' || c == '\\')
putchar ('\\');
putchar (c);
}
else
{
/* Use octal escapes, not hexadecimal escapes, because some old
C compilers didn't understand hexadecimal escapes, and because
hexadecimal escapes are not limited to 2 digits, thus needing
special care if the following character happens to be a digit. */
putchar ('\\');
putchar ('0' + ((c >> 6) & 7));
putchar ('0' + ((c >> 3) & 7));
putchar ('0' + (c & 7));
}
}
putchar ('"');
}
@ -798,6 +967,36 @@ void Output_Compare_Strncmp::output_comparison (const Output_Expr& expr1,
expr1.output_expr ();
printf (" + 1, ");
expr2.output_expr ();
printf (" + 1, len - 1) && ");
expr2.output_expr ();
printf ("[len] == '\\0'");
}
/* This class outputs a comparison using memcmp.
Note that the length of expr1 (available through the local variable `len')
must be verified to be equal to the length of expr2 prior to this
comparison. */
struct Output_Compare_Memcmp : public Output_Compare
{
virtual void output_comparison (const Output_Expr& expr1,
const Output_Expr& expr2) const;
Output_Compare_Memcmp () {}
virtual ~Output_Compare_Memcmp () {}
};
void Output_Compare_Memcmp::output_comparison (const Output_Expr& expr1,
const Output_Expr& expr2) const
{
T (Trace t ("Output_Compare_Memcmp::output_comparison");)
printf ("*");
expr1.output_expr ();
printf (" == *");
expr2.output_expr ();
printf (" && !memcmp (");
expr1.output_expr ();
printf (" + 1, ");
expr2.output_expr ();
printf (" + 1, len - 1)");
}
@ -824,6 +1023,10 @@ Key_List::output_hash_function (void)
else if (option[KRC] | option[C] | option[ANSIC])
printf ("#ifdef __GNUC__\n"
"__inline\n"
"#else\n"
"#ifdef __cplusplus\n"
"inline\n"
"#endif\n"
"#endif\n");
if (option[KRC] | option[C] | option[ANSIC])
@ -1013,7 +1216,7 @@ Key_List::output_keylength_table (void)
printf (",");
if ((column++ % columns) == 0)
printf("\n%s ", indent);
printf ("%3d", temp->length);
printf ("%3d", temp->key_length);
/* Deal with links specially. */
if (temp->link) // implies option[DUP]
@ -1023,7 +1226,7 @@ Key_List::output_keylength_table (void)
printf (",");
if ((column++ % columns) == 0)
printf("\n%s ", indent);
printf ("%3d", links->length);
printf ("%3d", links->key_length);
}
index++;
@ -1042,9 +1245,13 @@ output_keyword_entry (List_Node *temp, const char *indent)
printf ("%s ", indent);
if (option[TYPE])
printf ("{");
output_string (temp->key);
output_string (temp->key, temp->key_length);
if (option[TYPE])
printf (",%s}", temp->rest);
{
if (strlen (temp->rest) > 0)
printf (",%s", temp->rest);
printf ("}");
}
if (option[DEBUG])
printf (" /* hash value = %d, index = %d */",
temp->hash_value, temp->index);
@ -1053,7 +1260,17 @@ output_keyword_entry (List_Node *temp, const char *indent)
static void
output_keyword_blank_entries (int count, const char *indent)
{
const int columns = 9;
int columns;
if (option[TYPE])
{
columns = 58 / (6 + strlen (option.get_initializer_suffix()));
if (columns == 0)
columns = 1;
}
else
{
columns = 9;
}
int column = 0;
for (int i = 0; i < count; i++)
{
@ -1069,7 +1286,7 @@ output_keyword_blank_entries (int count, const char *indent)
printf (", ");
}
if (option[TYPE])
printf ("{\"\"}");
printf ("{\"\"%s}", option.get_initializer_suffix());
else
printf ("\"\"");
column++;
@ -1183,8 +1400,8 @@ Key_List::output_lookup_array (void)
int hash_value = temp->hash_value;
lookup_array[hash_value] = temp->index;
if (option[DEBUG])
fprintf (stderr, "keyword = %s, index = %d\n",
temp->key, temp->index);
fprintf (stderr, "keyword = %.*s, index = %d\n",
temp->key_length, temp->key, temp->index);
if (temp->link
|| (temp->next && hash_value == temp->next->hash_value))
{
@ -1200,8 +1417,8 @@ Key_List::output_lookup_array (void)
dup_ptr->count++;
if (option[DEBUG])
fprintf (stderr,
"static linked keyword = %s, index = %d\n",
ptr->key, ptr->index);
"static linked keyword = %.*s, index = %d\n",
ptr->key_length, ptr->key, ptr->index);
}
if (!(temp->next && hash_value == temp->next->hash_value))
@ -1211,8 +1428,8 @@ Key_List::output_lookup_array (void)
dup_ptr->count++;
if (option[DEBUG])
fprintf (stderr, "dynamic linked keyword = %s, index = %d\n",
temp->key, temp->index);
fprintf (stderr, "dynamic linked keyword = %.*s, index = %d\n",
temp->key_length, temp->key, temp->index);
}
assert (dup_ptr->count >= 2);
dup_ptr++;
@ -1349,15 +1566,15 @@ output_switch_case (List_Node *list, int indent, int *jumps_away)
T (Trace t ("output_switch_case");)
if (option[DEBUG])
printf ("%*s/* hash value = %4d, keyword = \"%s\" */\n",
indent, "", list->hash_value, list->key);
printf ("%*s/* hash value = %4d, keyword = \"%.*s\" */\n",
indent, "", list->hash_value, list->key_length, list->key);
if (option[DUP]
&& (list->link
|| (list->next && list->hash_value == list->next->hash_value)))
{
if (option[LENTABLE])
printf ("%*slengthptr = &lengthtable[%d]\n",
printf ("%*slengthptr = &lengthtable[%d];\n",
indent, "", list->index);
printf ("%*swordptr = &%s[%d];\n",
indent, "", option.get_wordlist_name (), list->index);
@ -1383,7 +1600,7 @@ output_switch_case (List_Node *list, int indent, int *jumps_away)
{
printf ("%*sif (len == %d)\n"
"%*s {\n",
indent, "", list->length,
indent, "", list->key_length,
indent, "");
indent += 4;
}
@ -1392,7 +1609,7 @@ output_switch_case (List_Node *list, int indent, int *jumps_away)
if (option[TYPE])
printf ("&%s[%d]", option.get_wordlist_name (), list->index);
else
output_string (list->key);
output_string (list->key, list->key_length);
printf (";\n");
printf ("%*sgoto compare;\n",
indent, "");
@ -1654,60 +1871,64 @@ Key_List::output_lookup_function_body (const Output_Compare& comparison)
indent -= 4;
printf ("%*s }\n", indent, "");
}
printf ("%*s else if (index < -TOTAL_KEYWORDS)\n"
"%*s {\n"
"%*s register int offset = - 1 - TOTAL_KEYWORDS - index;\n",
indent, "", indent, "", indent, "");
if (option[LENTABLE])
printf ("%*s register %s%s *lengthptr = &lengthtable[TOTAL_KEYWORDS + lookup[offset]];\n",
indent, "", const_always, smallest_integral_type (max_key_len));
printf ("%*s register ",
indent, "");
output_const_type (const_readonly_array, struct_tag);
printf ("*wordptr = &%s[TOTAL_KEYWORDS + lookup[offset]];\n",
option.get_wordlist_name ());
printf ("%*s register ",
indent, "");
output_const_type (const_readonly_array, struct_tag);
printf ("*wordendptr = wordptr + -lookup[offset + 1];\n\n");
printf ("%*s while (wordptr < wordendptr)\n"
"%*s {\n",
indent, "", indent, "");
if (option[LENTABLE])
if (total_duplicates > 0)
{
printf ("%*s if (len == *lengthptr)\n"
"%*s {\n",
indent, "", indent, "");
indent += 4;
}
printf ("%*s register %schar *s = ",
indent, "", const_always);
if (option[TYPE])
printf ("wordptr->%s", option.get_key_name ());
else
printf ("*wordptr");
printf (";\n\n"
"%*s if (",
indent, "");
comparison.output_comparison (Output_Expr1 ("str"), Output_Expr1 ("s"));
printf (")\n"
"%*s return %s;\n",
indent, "",
option[TYPE] ? "wordptr" : "s");
if (option[LENTABLE])
{
indent -= 4;
printf ("%*s }\n",
printf ("%*s else if (index < -TOTAL_KEYWORDS)\n"
"%*s {\n"
"%*s register int offset = - 1 - TOTAL_KEYWORDS - index;\n",
indent, "", indent, "", indent, "");
if (option[LENTABLE])
printf ("%*s register %s%s *lengthptr = &lengthtable[TOTAL_KEYWORDS + lookup[offset]];\n",
indent, "", const_always, smallest_integral_type (max_key_len));
printf ("%*s register ",
indent, "");
output_const_type (const_readonly_array, struct_tag);
printf ("*wordptr = &%s[TOTAL_KEYWORDS + lookup[offset]];\n",
option.get_wordlist_name ());
printf ("%*s register ",
indent, "");
output_const_type (const_readonly_array, struct_tag);
printf ("*wordendptr = wordptr + -lookup[offset + 1];\n\n");
printf ("%*s while (wordptr < wordendptr)\n"
"%*s {\n",
indent, "", indent, "");
if (option[LENTABLE])
{
printf ("%*s if (len == *lengthptr)\n"
"%*s {\n",
indent, "", indent, "");
indent += 4;
}
printf ("%*s register %schar *s = ",
indent, "", const_always);
if (option[TYPE])
printf ("wordptr->%s", option.get_key_name ());
else
printf ("*wordptr");
printf (";\n\n"
"%*s if (",
indent, "");
comparison.output_comparison (Output_Expr1 ("str"), Output_Expr1 ("s"));
printf (")\n"
"%*s return %s;\n",
indent, "",
option[TYPE] ? "wordptr" : "s");
if (option[LENTABLE])
{
indent -= 4;
printf ("%*s }\n",
indent, "");
}
if (option[LENTABLE])
printf ("%*s lengthptr++;\n",
indent, "");
printf ("%*s wordptr++;\n"
"%*s }\n"
"%*s }\n",
indent, "", indent, "", indent, "");
}
if (option[LENTABLE])
printf ("%*s lengthptr++;\n",
indent, "");
printf ("%*s wordptr++;\n"
"%*s }\n"
"%*s }\n"
"%*s}\n",
indent, "", indent, "", indent, "", indent, "");
printf ("%*s}\n",
indent, "");
}
else
{
@ -1789,10 +2010,15 @@ Key_List::output_lookup_function (void)
if (!option[GLOBAL])
output_lookup_tables ();
if (option[COMP])
output_lookup_function_body (Output_Compare_Strncmp ());
if (option[LENTABLE])
output_lookup_function_body (Output_Compare_Memcmp ());
else
output_lookup_function_body (Output_Compare_Strcmp ());
{
if (option[COMP])
output_lookup_function_body (Output_Compare_Strncmp ());
else
output_lookup_function_body (Output_Compare_Strcmp ());
}
printf ("}\n");
}
@ -1916,9 +2142,10 @@ Key_List::dump ()
field_width, "char_set");
for (List_Node *ptr = head; ptr; ptr = ptr->next)
fprintf (stderr, "%11d,%11d,%6d, %*s, %s\n",
ptr->hash_value, ptr->length, ptr->index,
field_width, ptr->char_set, ptr->key);
fprintf (stderr, "%11d,%11d,%6d, %*.*s, %.*s\n",
ptr->hash_value, ptr->key_length, ptr->index,
field_width, ptr->char_set_length, ptr->char_set,
ptr->key_length, ptr->key);
}
/* Simple-minded constructor action here... */

View File

@ -1,5 +1,5 @@
/* Creates and initializes a new list node.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -57,23 +57,21 @@ List_Node::set_sort (char *base, int len)
of the total number of keys seen so far. This is used to initialize
the INDEX field to some useful value. */
List_Node::List_Node (char *k, int len): link (0), next (0),
key (k), rest (option[TYPE] ? k + len + 1 : ""), length (len), index (0)
List_Node::List_Node (const char *k, int len, const char *r):
link (0), next (0), key (k), key_length (len), rest (r), index (0)
{
T (Trace t ("List_Node::List_Node");)
char *ptr = new char[(option[ALLCHARS] ? len : option.get_max_keysig_size ()) + 1];
char *key_set = ptr;
k[len] = '\0'; /* Null terminate KEY to separate it from REST. */
char *key_set = new char[(option[ALLCHARS] ? len : option.get_max_keysig_size ())];
char *ptr = key_set;
int i;
if (option[ALLCHARS]) /* Use all the character position in the KEY. */
for (; *k; k++, ptr++)
if (option[ALLCHARS]) /* Use all the character positions in the KEY. */
for (i = len; i > 0; k++, ptr++, i--)
++occurrences[(unsigned char)(*ptr = *k)];
else /* Only use those character positions specified by the user. */
{
int i;
/* Iterate thru the list of key_positions, initializing occurrences table
and char_set (via char * pointer ptr). */
/* Iterate through the list of key_positions, initializing occurrences table
and char_set (via char * pointer ptr). */
for (option.reset (); (i = option.get ()) != EOS; )
{
@ -90,12 +88,15 @@ List_Node::List_Node (char *k, int len): link (0), next (0),
keylength, so there are essentially no usable hash positions! */
if (ptr == char_set && option[NOLENGTH])
{
fprintf (stderr, "Can't hash keyword %s with chosen key positions.\n", key);
fprintf (stderr, "Can't hash keyword %.*s with chosen key positions.\n",
key_length, key);
exit (1);
}
}
*ptr = '\0'; /* Terminate this bastard.... */
/* Sort the KEY_SET items alphabetically. */
set_sort (key_set, ptr - key_set);
char_set = key_set;
char_set_length = ptr - key_set;
}

View File

@ -2,7 +2,7 @@
/* Data and function members for defining values and operations of a list node.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -31,14 +31,15 @@ struct List_Node : private Vectors
List_Node *link; /* TRUE if key has an identical KEY_SET as another key. */
List_Node *next; /* Points to next element on the list. */
const char *key; /* Each keyword string stored here. */
int key_length; /* Length of the key. */
const char *rest; /* Additional information for building hash function. */
const char *char_set; /* Set of characters to hash, specified by user. */
int length; /* Length of the key. */
int char_set_length; /* Length of char_set. */
int hash_value; /* Hash value for the key. */
int occurrence; /* A metric for frequency of key set occurrences. */
int index; /* Position of this node relative to other nodes. */
List_Node (char *key, int len);
List_Node (const char *key, int len, const char *rest);
static void set_sort (char *base, int len);
};

View File

@ -1,5 +1,5 @@
/* Driver program for the Gen_Perf hash function generator
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -67,6 +67,10 @@ main (int argc, char *argv[])
/* Generates and prints the Gen_Perf hash table. */
int status = generate_table ();
/* Check for write error on stdout. */
if (fflush (stdout) || ferror (stdout))
status = 1;
/* Don't use exit() here, it skips the destructors. */
return status;
}

View File

@ -1,5 +1,5 @@
/* Handles parsing the Options provided to the user.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -43,6 +43,9 @@ static const char *const DEFAULT_NAME = "in_word_set";
/* Default name for the key component. */
static const char *const DEFAULT_KEY = "name";
/* Default struct initializer suffix. */
static const char *const DEFAULT_INITIALIZER_SUFFIX = "";
/* Default name for the generated class. */
static const char *const DEFAULT_CLASS_NAME = "Perfect_Hash";
@ -67,6 +70,7 @@ int Options::iterations;
char **Options::argument_vector;
const char *Options::function_name;
const char *Options::key_name;
const char *Options::initializer_suffix;
const char *Options::class_name;
const char *Options::hash_name;
const char *Options::wordlist_name;
@ -79,7 +83,7 @@ void
Options::short_usage (FILE * strm)
{
T (Trace t ("Options::short_usage");)
fprintf (strm, "Usage: %s [-cCdDef[num]GhH<hashname>i<init>Ijk<keys>K<keyname>lL<language>nN<function name>ors<size>S<switches>tTvW<wordlistname>Z<class name>7] [input-file]\n"
fprintf (strm, "Usage: %s [-cCdDef[num]F<initializers>GhH<hashname>i<init>Ijk<keys>K<keyname>lL<language>nN<function name>ors<size>S<switches>tTvW<wordlistname>Z<class name>7] [input-file]\n"
"Try `%s --help' for more information.\n",
program_name, program_name);
}
@ -116,6 +120,9 @@ Options::long_usage (FILE * strm)
"Details in the output code:\n"
" -K, --slot-name=NAME Select name of the keyword component in the keyword\n"
" structure.\n"
" -F, --initializer-suffix=INITIALIZERS\n"
" Initializers for additional components in the keyword\n"
" structure.\n"
" -H, --hash-fn-name=NAME\n"
" Specify name of generated hash function. Default is\n"
" `hash'.\n"
@ -222,7 +229,50 @@ Options::print_options (void)
printf ("/* Command-line: ");
for (i = 0; i < argument_count; i++)
printf ("%s ", argument_vector[i]);
{
const char *arg = argument_vector[i];
/* Escape arg if it contains shell metacharacters. */
if (*arg == '-')
{
putchar (*arg);
arg++;
if (*arg >= 'A' && *arg <= 'Z' || *arg >= 'a' && *arg <= 'z')
{
putchar (*arg);
arg++;
}
}
if (strpbrk (arg, "\t\n !\"#$&'()*;<>?[\\]`{|}~") != NULL)
{
if (strchr (arg, '\'') != NULL)
{
putchar ('"');
for (; *arg; arg++)
{
if (*arg == '\"' || *arg == '\\' || *arg == '$')
putchar ('\\');
putchar (*arg);
}
putchar ('"');
}
else
{
putchar ('\'');
for (; *arg; arg++)
{
if (*arg == '\\')
putchar ('\\');
putchar (*arg);
}
putchar ('\'');
}
}
else
printf ("%s", arg);
printf (" ");
}
printf (" */");
}
@ -266,6 +316,7 @@ Options::Options (void)
option_word = DEFAULTCHARS | C;
function_name = DEFAULT_NAME;
key_name = DEFAULT_KEY;
initializer_suffix = DEFAULT_INITIALIZER_SUFFIX;
hash_name = DEFAULT_HASH_NAME;
wordlist_name = DEFAULT_WORDLIST_NAME;
class_name = DEFAULT_CLASS_NAME;
@ -309,6 +360,7 @@ Options::~Options (void)
"\nhash function name = %s"
"\nword list name = %s"
"\nkey name = %s"
"\ninitializer suffix = %s"
"\njump value = %d"
"\nmax associated value = %d"
"\ninitial associated value = %d"
@ -337,7 +389,8 @@ Options::~Options (void)
option_word & SEVENBIT ? "enabled" : "disabled",
iterations,
function_name, hash_name, wordlist_name, key_name,
jump, size - 1, initial_asso_value, delimiters, total_switches);
initializer_suffix, jump, size - 1, initial_asso_value,
delimiters, total_switches);
if (option_word & ALLCHARS)
fprintf (stderr, "all characters are used in the hash function\n");
@ -363,6 +416,7 @@ static const struct option long_options[] =
{ "struct-type", no_argument, 0, 't' },
{ "language", required_argument, 0, 'L' },
{ "slot-name", required_argument, 0, 'K' },
{ "initializer-suffix", required_argument, 0, 'F' },
{ "hash-fn-name", required_argument, 0, 'H' },
{ "lookup-fn-name", required_argument, 0, 'N' },
{ "class-name", required_argument, 0, 'Z' },
@ -403,7 +457,7 @@ Options::operator() (int argc, char *argv[])
while ((option_char =
getopt_long (argument_count, argument_vector,
"adcCDe:Ef:gGhH:i:Ij:k:K:lL:nN:oprs:S:tTvW:Z:7",
"adcCDe:Ef:F:gGhH:i:Ij:k:K:lL:nN:oprs:S:tTvW:Z:7",
long_options, (int *)0))
!= -1)
{
@ -453,11 +507,16 @@ Options::operator() (int argc, char *argv[])
}
break;
}
case 'F':
{
initializer_suffix = /*getopt*/optarg;
break;
}
case 'g': /* Use the ``inline'' keyword for generated sub-routines, ifdef __GNUC__. */
break; /* This is now the default. */
case 'G': /* Make the keyword table a global variable. */
{
option_word |= GLOBAL;
option_word |= GLOBAL;
break;
}
case 'h': /* Displays a list of helpful Options to the user. */

View File

@ -2,7 +2,7 @@
/* Handles parsing the Options provided to the user.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -98,6 +98,7 @@ public:
static int get_total_switches (void);
static const char *get_function_name (void);
static const char *get_key_name (void);
static const char *get_initializer_suffix (void);
static const char *get_class_name (void);
static const char *get_hash_name (void);
static const char *get_wordlist_name (void);
@ -116,6 +117,7 @@ private:
static char **argument_vector; /* Stores a pointer to command-line vector. */
static const char *function_name; /* Names used for generated lookup function. */
static const char *key_name; /* Name used for keyword key. */
static const char *initializer_suffix; /* Suffix for empty struct initializers. */
static const char *class_name; /* Name used for generated C++ class. */
static const char *hash_name; /* Name used for generated hash function. */
static const char *wordlist_name; /* Name used for hash table array. */

View File

@ -1,6 +1,6 @@
/* Inline Functions for options.{h,cc}.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -118,6 +118,14 @@ Options::get_key_name (void)
return key_name;
}
/* Returns the struct initializer suffix. */
INLINE const char *
Options::get_initializer_suffix (void)
{
T (Trace t ("Options::get_initializer_suffix");)
return initializer_suffix;
}
/* Returns the hash function name. */
INLINE const char *
Options::get_hash_name (void)

View File

@ -1,6 +1,6 @@
/* Current program version number.
Copyright (C) 1989-1998 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
@ -19,4 +19,4 @@ You should have received a copy of the GNU General Public License
along with GNU GPERF; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
const char *version_string = "2.7";
const char *version_string = "2.7.2";