build mac-arm

This commit is contained in:
2023-06-02 14:55:44 +08:00
commit d3f04c58d6
1036 changed files with 816321 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
<https://www.gnu.org/software/gettext/manual/html_node/Users.html>
+1
View File
@@ -0,0 +1 @@
Bruno Haible <bruno@clisp.org>
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
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
state 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) <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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU 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 Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+502
View File
@@ -0,0 +1,502 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
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 and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, 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 library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete 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 distribute a copy of this License along with the
Library.
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.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
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 Library, 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 Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you 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.
If distribution of 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 satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be 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.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library 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.
9. 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 Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
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 with
this License.
11. 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 Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library 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 Library.
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.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library 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.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser 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 Library
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 Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
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.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "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
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. 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 LIBRARY 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
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
+5838
View File
File diff suppressed because it is too large Load Diff
+76
View File
@@ -0,0 +1,76 @@
The following packages should be installed before GNU libiconv is installed
(runtime dependencies that are also build dependencies):
None.
The following packages should be installed when GNU libiconv is installed
(runtime dependencies, but not build dependencies):
None.
The following should be installed when GNU libiconv is built, but are not
needed later, once it is installed (build dependencies, but not runtime
dependencies):
* A C runtime, compiler, linker, etc.
+ Mandatory.
Either the platform's native 'cc', or GCC 3.1 or newer.
+ GCC Homepage:
https://gcc.gnu.org/
+ Download:
https://ftp.gnu.org/gnu/gcc/
* A 'make' utility.
+ Mandatory.
Either the platform's native 'make' (for in-tree builds only),
or GNU Make 3.79.1 or newer.
+ GNU Make Homepage:
https://www.gnu.org/software/make/
+ Download:
https://ftp.gnu.org/gnu/make/
* A shell
+ Mandatory.
Either the platform's native 'sh', or Bash.
+ Homepage:
https://www.gnu.org/software/bash/
+ Download:
https://ftp.gnu.org/gnu/bash/
* Core POSIX utilities, including:
[ basename cat chgrp chmod chown cp dd echo expand expr
false hostname install kill ln ls md5sum mkdir mkfifo
mknod mv printenv pwd rm rmdir sleep sort tee test touch
true uname
+ Mandatory.
Either the platform's native utilities, or GNU coreutils.
+ Homepage:
https://www.gnu.org/software/coreutils/
+ Download:
https://ftp.gnu.org/gnu/coreutils/
* The comparison utilities 'cmp' and 'diff'.
+ Mandatory.
Either the platform's native utilities, or GNU diffutils.
+ Homepage:
https://www.gnu.org/software/diffutils/
+ Download:
https://ftp.gnu.org/gnu/diffutils/
* Grep.
+ Mandatory.
Either the platform's native grep, or GNU grep.
+ Homepage:
https://www.gnu.org/software/grep/
+ Download:
https://ftp.gnu.org/gnu/grep/
* Awk.
+ Mandatory.
Either the platform's native awk, mawk, or nawk, or GNU awk.
+ Homepage:
https://www.gnu.org/software/gawk/
+ Download:
https://ftp.gnu.org/gnu/gawk/
+64
View File
@@ -0,0 +1,64 @@
While some other iconv(3) implementations - like FreeBSD iconv(3) - choose
the "many small shared libraries" and dlopen(3) approach, this implementation
packs everything into a single shared library. Here is a comparison of the
two designs.
* Run-time efficiency
1. A dlopen() based approach needs a cache of loaded shared libraries.
Otherwise, every iconv_open() call will result in a call to dlopen()
and thus to file system related system calls - which is prohibitive
because some applications use the iconv_open/iconv/iconv_close sequence
for every single filename, string, or piece of text.
2. In terms of virtual memory use, both approaches are on par. Being shared
libraries, the tables are shared between any processes that use them.
And because of the demand loading used by Unix systems (and because libiconv
does not have initialization functions), only those parts of the tables
which are needed (typically very few kilobytes) will be read from disk and
paged into main memory.
3. Even with a cache of loaded shared libraries, the dlopen() based approach
makes more system calls, because it has to load one or two shared libraries
for every encoding in use.
* Total size
In the dlopen(3) approach, every shared library has a symbol table and
relocation offset. All together, FreeBSD iconv installs more than 200 shared
libraries with a total size of 2.3 MB. Whereas libiconv installs 0.45 MB.
* Extensibility
The dlopen(3) approach is good for guaranteeing extensibility if the iconv
implementation is distributed without source. (Or when, as in glibc, you
cannot rebuild iconv without rebuilding your libc, thus possibly
destabilizing your system.)
The libiconv package achieves extensibility through the LGPL license:
Every user has access to the source of the package and can extend and
replace just libiconv.so.
The places which have to be modified when a new encoding is added are as
follows: add an #include statement in iconv.c, add an entry in the table in
iconv.c, and of course, update the README and iconv_open.3 manual page.
* Use within other packages
If you want to incorporate an iconv implementation into another package
(such as a mail user agent or web browser), the single library approach
is easier, because:
1. In the shared library approach you have to provide the right directory
prefix which will be used at run time.
2. Incorporating iconv as a static library into the executable is easy -
it won't need dynamic loading. (This assumes that your package is under
the LGPL or GPL license.)
All conversions go through Unicode. This is possible because most of the
world's characters have already been allocated in the Unicode standard.
Therefore we have for each encoding two functions:
- For conversion from the encoding to Unicode, a function called xxx_mbtowc.
- For conversion from Unicode to the encoding, a function called xxx_wctomb,
and for stateful encodings, a function called xxx_reset which returns to
the initial shift state.
All our functions operate on a single Unicode character at a time. This is
obviously less efficient than operating on an entire buffer of characters at
a time, but it makes the coding considerably easier and less bug-prone. Those
who wish best performance should install the Real Thing (TM): GNU libc 2.1
or newer.
+72
View File
@@ -0,0 +1,72 @@
All you need to know when hacking (modifying) GNU libiconv or when building
it off the Git repository.
Requirements
============
You will need reasonably recent versions of the build tools:
* A C compiler. Such as GNU GCC.
+ Homepage:
https://gcc.gnu.org/
* GNU automake 1.16.x
+ Homepage:
https://www.gnu.org/software/automake/
* GNU autoconf 2.69 or newer
+ Homepage:
https://www.gnu.org/software/autoconf/
* GNU m4
+ Homepage:
https://www.gnu.org/software/m4/
* GNU gperf
+ Homepage:
https://www.gnu.org/software/gperf/
* GNU groff 1.17 or newer
+ Homepage:
https://www.gnu.org/software/groff/
* Perl
+ Homepage:
https://www.perl.org/
* Either an internet connection or a recent copy of GNU gnulib.
+ Homepage:
https://www.gnu.org/software/gnulib/
And, of course, the packages listed in the DEPENDENCIES file.
Building off the Git repository
===============================
Access to the Git repository is described at
https://savannah.gnu.org/git/?group=libiconv .
After fetching the sources from the Git repository, peek at the comments in
autogen.sh, then run
./gitsub.sh pull
./autogen.sh
Then you can proceed with "./configure" as usual.
Each time you want to update the source, do not only "git pull". Instead do
git pull && ./gitsub.sh pull
./autogen.sh
Adding new encodings
====================
For an indication which encodings are acceptable in the official version of
GNU libiconv, take a look at NOTES.
For an indication which files need to be modified when adding a new encoding,
look for example at the 2007-05-25 ChangeLog entry for RK1048. The lib/*.h
file for an encoding is usually generated by one of the tools in the tools/
directory. All you need to provide is the conversion table in the format of
the many *.TXT files.
+262
View File
@@ -0,0 +1,262 @@
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.ac' is used to create `configure' by a program
called `autoconf'. You only need `configure.ac' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple '-arch' options to the
compiler but only a single '-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases. You
may have to build one architecture at a time and combine the results
using the 'lipo' tool if you have problems.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Relocatable Installation
========================
By default, `make install' will install a package with hardwired
file names, and the package will not work correctly when copied or
moved to a different location in the filesystem.
Some packages pay attention to the `--enable-relocatable' option to
`configure'. This option makes the entire installed package
relocatable. This means, it can be moved or copied to a different
location on the filesystem. It is possible to make symlinks to the
installed and moved programs, and invoke them through the symlink. It
is possible to do the same thing with a hard link _only_ if the hard
linked file is in the same directory as the real program.
For reliability it is best to give together with --enable-relocatable
a `--prefix' option pointing to an otherwise unused (and never used
again) directory, for example, `--prefix=/tmp/inst$$'. This is
recommended because on some OSes the executables remember the location
of shared libraries (and prefer them over LD_LIBRARY_PATH !), therefore
such an executable will look for its shared libraries first in the
original installation directory and only then in the current
installation directory.
Installation with `--enable-relocatable' will not work for setuid /
setgid executables. (This is because such an executable kills its
LD_LIBRARY_PATH variable when it is launched.)
The runtime penalty and size penalty are nearly zero on Linux 2.2 or
newer (just one system call more when an executable is launched), and
small on other systems (the wrapper program just sets an environment
variable and execs the real program).
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
For packages that use the GNU libiconv library, you can use the
`configure' option `--with-libiconv-prefix' to specify the prefix you
used while installing GNU libiconv. This option is not necessary if
that other prefix is the same as the one now specified through --prefix.
For packages that use the GNU libintl library, you can use the
`configure' option `--with-libintl-prefix' to specify the prefix you
used while installing GNU gettext-runtime. This option is not necessary if
that other prefix is the same as the one now specified through --prefix.
Particular Systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
is not installed, it is recommended to use the following options in order
to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On AIX 3, the C include files by default don't define some necessary
prototype declarations. If GNU CC is not installed, it is recommended to
use the following options:
./configure CC="xlc -D_ALL_SOURCE"
On BeOS, user installed software goes in /boot/home/config, not
/usr/local. It is recommended to use the following options:
./configure --prefix=/boot/home/config
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
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
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
+255
View File
@@ -0,0 +1,255 @@
Installation on Microsoft Windows:
There are three ways to create binaries of this package for Microsoft Windows:
1) Native binaries, built using the mingw tool chain.
2) Native binaries, built using the MS Visual C/C++ tool chain.
3) Binaries for the Cygwin environment.
===============================================================================
1) Native binaries, built using the mingw tool chain.
I recommend to use the Cygwin environment as the development environment
and mingw only as the target (runtime, deployment) environment.
For this, you need to install
* Cygwin (from https://cygwin.com/),
* some packages available from the Cygwin package installer:
make
* the mingw cross-compilation tools and runtime package, available from
the Cygwin package installer (setup-x86_64.exe):
- for creating 32-bit binaries: packages
mingw64-i686-gcc-core,
mingw64-i686-headers,
mingw64-i686-runtime
- for creating 64-bit binaries: packages
mingw64-x86_64-gcc-core,
mingw64-x86_64-headers,
mingw64-x86_64-runtime
Building 32-bit binaries for mingw is achieved through the following
preparation, configure, and build commands:
PATH=/usr/local/mingw32/bin:$PATH
export PATH
./configure --host=i686-w64-mingw32 --prefix=/usr/local/mingw32 \
CC=i686-w64-mingw32-gcc \
CPPFLAGS="-I/usr/local/mingw32/include -Wall" \
LDFLAGS="-L/usr/local/mingw32/lib"
make
make check
Building 64-bit binaries for mingw is achieved through the following
preparation, configure, and build commands:
PATH=/usr/local/mingw64/bin:$PATH
export PATH
./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/mingw64 \
CC=x86_64-w64-mingw32-gcc \
CPPFLAGS="-I/usr/local/mingw64/include -Wall" \
LDFLAGS="-L/usr/local/mingw64/lib"
make
make check
Installation:
make install
===============================================================================
2) Native binaries, built using the MS Visual C/C++ tool chain.
Note that binaries created with MSVC have a distribution constraint: They
depend on a closed-source library ('msvcr90.dll' for MSVC 9.0,
'vcruntime140.dll' for MSVC 14.0, and so on) which is not normally part of
a Windows installation.
You cannot distribute 'vcruntime*.dll' with the binaries - this would be a
violation of the GPL and of the Microsoft EULA.
You can distribute the binaries without including 'vcruntime*.dll'. Users
who don't have this library on their system will require to pull some files
(api-ms-win*.dll) through the Windows Update mechanism, see
https://support.microsoft.com/en-us/kb/2999226 .
This recipe requires MS Visual C/C++ 9.0 or newer.
You don't need the Visual Studio IDE, just the C/C++ tool chain.
As of 2016, you can install the MS Visual C/C++ 14.0 tool chain from
http://landinghub.visualstudio.com/visual-cpp-build-tools (it's the file
visualcppbuildtools_full.exe).
This recipe requires also a Cygwin environment (with 'bash', the common POSIX
commands, and 'make') as a build environment. Building with 'nmake' is not
supported.
For this, you need to install
* Cygwin (from https://cygwin.com/),
* some packages available from the Cygwin package installer:
make
You also need the scripts 'ar-lib' and 'compile' from
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;f=lib/ar-lib;hb=HEAD
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;f=lib/compile;hb=HEAD
respectively.
They may also be included in this package, in directory 'build-aux/'.
Save them; the instructions below assume that you stored them in $HOME/msvc/.
Make them executable:
chmod a+x ar-lib compile
Start a bash (from Cygwin).
Make sure that the MSVC tools ("cl" etc.) are found in PATH and the
environment variables INCLUDE and LIB are set appropriately.
In a typical MSVC 9.0 installation, it can be achieved by running
C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat
In a typical MSVC 14.0 installation on Windows 10, it can be achieved
- for creating 32-bit binaries: through the following bash commands:
# Set environment variables for using MSVC 14,
# for creating native 32-bit Windows executables.
# Windows C library headers and libraries.
WindowsCrtIncludeDir='C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt'
WindowsCrtLibDir='C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\'
INCLUDE="${WindowsCrtIncludeDir};$INCLUDE"
LIB="${WindowsCrtLibDir}x86;$LIB"
# Windows API headers and libraries.
WindowsSdkIncludeDir='C:\Program Files (x86)\Windows Kits\8.1\Include\'
WindowsSdkLibDir='C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\'
INCLUDE="${WindowsSdkIncludeDir}um;${WindowsSdkIncludeDir}shared;$INCLUDE"
LIB="${WindowsSdkLibDir}x86;$LIB"
# Visual C++ tools, headers and libraries.
VSINSTALLDIR='C:\Program Files (x86)\Microsoft Visual Studio 14.0'
VCINSTALLDIR="${VSINSTALLDIR}"'\VC'
PATH=`cygpath -u "${VCINSTALLDIR}"`/bin:"$PATH"
INCLUDE="${VCINSTALLDIR}"'\include;'"${INCLUDE}"
LIB="${VCINSTALLDIR}"'\lib;'"${LIB}"
export INCLUDE LIB
- for creating 64-bit binaries: through the following bash commands:
# Set environment variables for using MSVC 14,
# for creating native 64-bit Windows executables.
# Windows C library headers and libraries.
WindowsCrtIncludeDir='C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt'
WindowsCrtLibDir='C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\'
INCLUDE="${WindowsCrtIncludeDir};$INCLUDE"
LIB="${WindowsCrtLibDir}x64;$LIB"
# Windows API headers and libraries.
WindowsSdkIncludeDir='C:\Program Files (x86)\Windows Kits\8.1\Include\'
WindowsSdkLibDir='C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\'
INCLUDE="${WindowsSdkIncludeDir}um;${WindowsSdkIncludeDir}shared;$INCLUDE"
LIB="${WindowsSdkLibDir}x64;$LIB"
# Visual C++ tools, headers and libraries.
VSINSTALLDIR='C:\Program Files (x86)\Microsoft Visual Studio 14.0'
VCINSTALLDIR="${VSINSTALLDIR}"'\VC'
PATH=`cygpath -u "${VCINSTALLDIR}"`/bin/amd64:"$PATH"
INCLUDE="${VCINSTALLDIR}"'\include;'"${INCLUDE}"
LIB="${VCINSTALLDIR}"'\lib\amd64;'"${LIB}"
export INCLUDE LIB
Building 32-bit binaries with MSVC is achieved through the following
preparation, configure, and build commands:
PATH=/usr/local/msvc32/bin:$PATH
export PATH
win32_target=_WIN32_WINNT_WINXP # for MSVC 9.0
win32_target=_WIN32_WINNT_VISTA # possibly for MSVC >= 10.0
win32_target=_WIN32_WINNT_WIN7 # possibly for MSVC >= 10.0
win32_target=_WIN32_WINNT_WIN8 # possibly for MSVC >= 10.0
./configure --host=i686-w64-mingw32 --prefix=/usr/local/msvc32 \
CC="$HOME/msvc/compile cl -nologo" \
CFLAGS="-MD" \
CXX="$HOME/msvc/compile cl -nologo" \
CXXFLAGS="-MD" \
CPPFLAGS="-D_WIN32_WINNT=$win32_target -I/usr/local/msvc32/include" \
LDFLAGS="-L/usr/local/msvc32/lib" \
LD="link" \
NM="dumpbin -symbols" \
STRIP=":" \
AR="$HOME/msvc/ar-lib lib" \
RANLIB=":"
make
make check
Building 64-bit binaries with MSVC is achieved through the following
preparation, configure, and build commands:
PATH=/usr/local/msvc64/bin:$PATH
export PATH
win32_target=_WIN32_WINNT_WINXP # for MSVC 9.0
win32_target=_WIN32_WINNT_VISTA # possibly for MSVC >= 10.0
win32_target=_WIN32_WINNT_WIN7 # possibly for MSVC >= 10.0
win32_target=_WIN32_WINNT_WIN8 # possibly for MSVC >= 10.0
./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/msvc64 \
CC="$HOME/msvc/compile cl -nologo" \
CFLAGS="-MD" \
CXX="$HOME/msvc/compile cl -nologo" \
CXXFLAGS="-MD" \
CPPFLAGS="-D_WIN32_WINNT=$win32_target -I/usr/local/msvc64/include" \
LDFLAGS="-L/usr/local/msvc64/lib" \
LD="link" \
NM="dumpbin -symbols" \
STRIP=":" \
AR="$HOME/msvc/ar-lib lib" \
RANLIB=":"
make
make check
Installation:
make install
===============================================================================
3) Binaries for the Cygwin environment.
The generic instructions in the INSTALL file apply. But here are more
specific ones.
You need to install
* Cygwin (from https://cygwin.com/),
* some packages available from the Cygwin package installer:
make
* the Cygwin [cross-]compilation tools package, available from
the Cygwin package installer (setup-x86_64.exe):
- for creating 32-bit binaries: packages
cygwin32-gcc-core,
cygwin32
- for creating 64-bit binaries: packages
gcc-core
Building 32-bit binaries for Cygwin must be done in a directory *outside*
the Cygwin /home and /usr hierarchies. It is achieved through the following
preparation, configure, and build commands:
PATH=/usr/local/cygwin32/bin:/usr/i686-pc-cygwin/sys-root/usr/bin:$PATH
export PATH
./configure --host=i686-pc-cygwin --prefix=/usr/local/cygwin32 \
CC=i686-pc-cygwin-gcc \
CPPFLAGS="-I/usr/local/cygwin32/include -Wall" \
LDFLAGS="-L/usr/local/cygwin32/lib"
make
make check
Building 64-bit binaries for Cygwin is achieved through the following
preparation, configure, and build commands:
PATH=/usr/local/cygwin64/bin:$PATH
export PATH
./configure --host=x86_64-pc-cygwin --prefix=/usr/local/cygwin64 \
CC=x86_64-pc-cygwin-gcc \
CPPFLAGS="-I/usr/local/cygwin64/include -Wall" \
LDFLAGS="-L/usr/local/cygwin64/lib"
make
make check
Installation:
make install
===============================================================================
+255
View File
@@ -0,0 +1,255 @@
# -*- makefile -*-
# This is the developer's makefile, not the user's makefile.
# Don't use it unless you know exactly what you do!
SHELL = /bin/sh
MAKE = make
AUTOCONF = autoconf
AUTOHEADER = autoheader
AUTOMAKE = automake-1.16
ACLOCAL = aclocal-1.16
GPERF = gperf
CC = gcc -Wall
CFLAGS = -O
MAN2HTML = groff -mandoc -Thtml
CP = cp
RM = rm -f
all : srclib/Makefile.gnulib srclib/Makefile.in \
configures config.h.in \
include/iconv.h.build.in \
lib/aliases.h lib/aliases_sysaix.h lib/aliases_syshpux.h lib/aliases_sysosf1.h lib/aliases_syssolaris.h \
lib/aliases_aix.h lib/aliases_aix_sysaix.h \
lib/aliases_osf1.h lib/aliases_osf1_sysosf1.h \
lib/aliases_dos.h \
lib/aliases_zos.h \
lib/aliases_extra.h \
lib/flags.h lib/translit.h \
man/iconv.1.html man/iconv.3.html man/iconv_close.3.html man/iconv_open.3.html man/iconvctl.3.html man/iconv_open_into.3.html \
force
cd libcharset && $(MAKE) -f Makefile.devel all
# Before making a new release:
# - check that the encoding lists in README and man/iconv_open.3 are up to date,
# - check that the files in libcharset/lib/ are in sync with the gnulib module
# 'localcharset',
# - increment the version number in
# configure.ac
# include/iconv.h.in
# README
# - update the version info in lib/Makefile.in,
# - $ ./autogen.sh
# Making a new release:
# - $ ./configure CPPFLAGS=-Wall; make; make check
# - $ make dist
GNULIB_MODULES = \
binary-io \
error \
gettext \
gettext-h \
lib-symbol-visibility \
mbstate \
progname \
relocatable-prog \
safe-read \
sigpipe \
stdbool \
stdio \
stdlib \
strerror \
unistd \
uniwidth/width \
unlocked-io \
xalloc \
libiconv-misc
srclib/Makefile.gnulib :
if test -n "$$GNULIB_TOOL"; then \
$$GNULIB_TOOL --copy-file m4/codeset.m4 srcm4/codeset.m4 || exit $$?; \
$$GNULIB_TOOL --lib=libicrt --source-base=srclib --m4-base=srcm4 --makefile-name=Makefile.gnulib --no-libtool --local-dir=gnulib-local --no-vc-files \
--import $(GNULIB_MODULES); \
fi
gnulib-imported-files : force
if test -n "$$GNULIB_TOOL"; then \
for file in config.guess config.sub; do \
$$GNULIB_TOOL --copy-file build-aux/$$file || exit $$?; \
chmod a+x build-aux/$$file || exit $$?; \
done; \
$$GNULIB_TOOL --copy-file tests/qemu.h || exit $$?; \
fi
srclib/Makefile.in : srclib/Makefile.am srclib/Makefile.gnulib aclocal.m4
# Make sure we get new versions of files brought in by automake.
(cd build-aux && rm -f depcomp install-sh mdate-sh missing test-driver)
$(AUTOMAKE) --gnits --add-missing --copy srclib/Makefile && rm -rf autom4te.cache
CONFIGURES = configure
CONFIGURES_IN = configure.ac
aclocal.m4 : $(CONFIGURES_IN) srclib/Makefile.gnulib $(wildcard m4/*.m4) $(wildcard srcm4/*.m4)
$(ACLOCAL) -I m4 -I srcm4 --output=$@ && touch $@ && rm -rf autom4te.cache
configures : $(CONFIGURES)
AUTOCONF_FILES = aclocal.m4 $(wildcard m4/*.m4) $(wildcard srcm4/*.m4)
configure : configure.ac $(AUTOCONF_FILES)
$(AUTOCONF) && rm -rf autom4te.cache
check-configures : $(CONFIGURES)
set -e; for f in $(CONFIGURES); do bash -x -n $$f; done
config.h.in : configure.ac $(AUTOCONF_FILES)
$(AUTOHEADER) && rm -rf autom4te.cache
touch $@
include/iconv.h.build.in : include/iconv.h.in include/export.h
sed -e 's/extern \([^"]\)/extern LIBICONV_DLL_EXPORTED \1/' \
-e '/_LIBICONV_VERSION/r include/export.h' \
< $< > $@
lib/aliases.h lib/canonical.h lib/canonical_local.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
$(CC) $(CFLAGS) lib/genaliases.c -o genaliases
./genaliases lib/aliases.gperf canonical.sh canonical_local.sh
$(RM) genaliases
$(GPERF) -m 10 lib/aliases.gperf > tmp.h
sed -e 's/^\(const struct alias \)/static \1/' < tmp.h > lib/aliases.h
sh canonical.sh > lib/canonical.h
sh canonical_local.sh > lib/canonical_local.h
$(RM) tmp.h canonical.sh canonical_local.sh
lib/aliases_sysaix.h lib/canonical_sysaix.h lib/canonical_local_sysaix.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
$(CC) $(CFLAGS) -DUSE_AIX_ALIASES lib/genaliases.c -o genaliases
./genaliases lib/aliases_sysaix.gperf canonical.sh canonical_local.sh
$(RM) genaliases
$(GPERF) -m 10 lib/aliases_sysaix.gperf > tmp.h
sed -e 's/^\(const struct alias \)/static \1/' < tmp.h > lib/aliases_sysaix.h
sh canonical.sh > lib/canonical_sysaix.h
sh canonical_local.sh > lib/canonical_local_sysaix.h
$(RM) tmp.h canonical.sh canonical_local.sh
lib/aliases_syshpux.h lib/canonical_syshpux.h lib/canonical_local_syshpux.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
$(CC) $(CFLAGS) -DUSE_HPUX_ALIASES lib/genaliases.c -o genaliases
./genaliases lib/aliases_syshpux.gperf canonical.sh canonical_local.sh
$(RM) genaliases
$(GPERF) -m 10 lib/aliases_syshpux.gperf > tmp.h
sed -e 's/^\(const struct alias \)/static \1/' < tmp.h > lib/aliases_syshpux.h
sh canonical.sh > lib/canonical_syshpux.h
sh canonical_local.sh > lib/canonical_local_syshpux.h
$(RM) tmp.h canonical.sh canonical_local.sh
lib/aliases_sysosf1.h lib/canonical_sysosf1.h lib/canonical_local_sysosf1.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
$(CC) $(CFLAGS) -DUSE_OSF1_ALIASES lib/genaliases.c -o genaliases
./genaliases lib/aliases_sysosf1.gperf canonical.sh canonical_local.sh
$(RM) genaliases
$(GPERF) -m 10 lib/aliases_sysosf1.gperf > tmp.h
sed -e 's/^\(const struct alias \)/static \1/' < tmp.h > lib/aliases_sysosf1.h
sh canonical.sh > lib/canonical_sysosf1.h
sh canonical_local.sh > lib/canonical_local_sysosf1.h
$(RM) tmp.h canonical.sh canonical_local.sh
lib/aliases_syssolaris.h lib/canonical_syssolaris.h lib/canonical_local_syssolaris.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
$(CC) $(CFLAGS) -DUSE_SOLARIS_ALIASES lib/genaliases.c -o genaliases
./genaliases lib/aliases_syssolaris.gperf canonical.sh canonical_local.sh
$(RM) genaliases
$(GPERF) -m 10 lib/aliases_syssolaris.gperf > tmp.h
sed -e 's/^\(const struct alias \)/static \1/' < tmp.h > lib/aliases_syssolaris.h
sh canonical.sh > lib/canonical_syssolaris.h
sh canonical_local.sh > lib/canonical_local_syssolaris.h
$(RM) tmp.h canonical.sh canonical_local.sh
lib/aliases_aix.h lib/canonical_aix.h : lib/encodings_aix.def lib/genaliases2.c
$(CC) $(CFLAGS) -DUSE_AIX lib/genaliases2.c -o genaliases
./genaliases aix lib/aliases_aix.h lib/canonical_aix.h
$(RM) genaliases
lib/aliases_aix_sysaix.h lib/canonical_aix_sysaix.h : lib/encodings_aix.def lib/genaliases2.c
$(CC) $(CFLAGS) -DUSE_AIX -DUSE_AIX_ALIASES lib/genaliases2.c -o genaliases
./genaliases aix lib/aliases_aix_sysaix.h lib/canonical_aix_sysaix.h
$(RM) genaliases
lib/aliases_osf1.h lib/canonical_osf1.h : lib/encodings_osf1.def lib/genaliases2.c
$(CC) $(CFLAGS) -DUSE_OSF1 lib/genaliases2.c -o genaliases
./genaliases osf1 lib/aliases_osf1.h lib/canonical_osf1.h
$(RM) genaliases
lib/aliases_osf1_sysosf1.h lib/canonical_osf1_sysosf1.h : lib/encodings_osf1.def lib/genaliases2.c
$(CC) $(CFLAGS) -DUSE_OSF1 -DUSE_OSF1_ALIASES lib/genaliases2.c -o genaliases
./genaliases osf1 lib/aliases_osf1_sysosf1.h lib/canonical_osf1_sysosf1.h
$(RM) genaliases
lib/aliases_dos.h lib/canonical_dos.h : lib/encodings_dos.def lib/genaliases2.c
$(CC) $(CFLAGS) -DUSE_DOS lib/genaliases2.c -o genaliases
./genaliases dos lib/aliases_dos.h lib/canonical_dos.h
$(RM) genaliases
lib/aliases_zos.h lib/canonical_zos.h : lib/encodings_zos.def lib/genaliases2.c
$(CC) $(CFLAGS) -DUSE_ZOS lib/genaliases2.c -o genaliases
./genaliases zos lib/aliases_zos.h lib/canonical_zos.h
$(RM) genaliases
lib/aliases_extra.h lib/canonical_extra.h : lib/encodings_extra.def lib/genaliases2.c
$(CC) $(CFLAGS) -DUSE_EXTRA lib/genaliases2.c -o genaliases
./genaliases extra lib/aliases_extra.h lib/canonical_extra.h
$(RM) genaliases
lib/flags.h : lib/encodings.def lib/encodings_aix.def lib/encodings_osf1.def lib/encodings_dos.def lib/encodings_zos.def lib/encodings_extra.def lib/converters.h lib/genflags.c
$(CC) $(CFLAGS) lib/genflags.c -o genflags
./genflags > lib/flags.h
$(RM) genflags
lib/translit.h : lib/translit.def lib/gentranslit.c
$(CC) $(CFLAGS) lib/gentranslit.c -o gentranslit
./gentranslit < lib/translit.def > lib/translit.h
$(RM) gentranslit
man/%.html : man/%
$(MAN2HTML) $< > $@-t
grep -v '<!-- CreationDate' < $@-t > $@
$(RM) $@-t
gnulib-clean : force
# Move srclib/Makefile.gnulib away, so that the target 'srclib/Makefile.gnulib' will actually do something.
if test -f srclib/Makefile.gnulib; then \
mv srclib/Makefile.gnulib srclib/Makefile.gnulib~; \
fi
# No need to remove the stale files. gnulib-tool does this itself, thanks to srcm4/gnulib-comp.m4.
# find srclib '(' -name '*.h' -o -name '*.c' -o -name '*.valgrind' ')' -exec rm -f '{}' ';'
# rm -rf srcm4
totally-clean : force
rm -f srclib/Makefile.in
rm -f aclocal.m4 $(CONFIGURES) config.h.in include/iconv.h.build.in
rm -f lib/aliases.gperf lib/aliases_sysaix.gperf lib/aliases_syshpux.gperf lib/aliases_sysosf1.gperf lib/aliases_syssolaris.gperf
rm -f lib/aliases.h lib/aliases_sysaix.h lib/aliases_syshpux.h lib/aliases_sysosf1.h lib/aliases_syssolaris.h
rm -f lib/aliases_aix.h lib/aliases_aix_sysaix.h
rm -f lib/aliases_osf1.h lib/aliases_osf1_sysosf1.h
rm -f lib/aliases_dos.h
rm -f lib/aliases_zos.h
rm -f lib/aliases_extra.h
rm -f lib/canonical.h lib/canonical_sysaix.h lib/canonical_syshpux.h lib/canonical_sysosf1.h lib/canonical_syssolaris.h
rm -f lib/canonical_aix.h lib/canonical_aix_sysaix.h
rm -f lib/canonical_osf1.h lib/canonical_osf1_sysosf1.h
rm -f lib/canonical_dos.h
rm -f lib/canonical_zos.h
rm -f lib/canonical_extra.h
rm -f lib/canonical_local.h lib/canonical_local_sysaix.h lib/canonical_local_syshpux.h lib/canonical_local_sysosf1.h lib/canonical_local_syssolaris.h
rm -f lib/flags.h
rm -f lib/translit.h
rm -f man/iconv.1.html man/iconv.3.html man/iconv_close.3.html man/iconv_open.3.html man/iconvctl.3.html man/iconv_open_into.3.html
cd libcharset && $(MAKE) -f Makefile.devel totally-clean
force :
+253
View File
@@ -0,0 +1,253 @@
# Makefile for libiconv
#### Start of system configuration section. ####
# Directories used by "make":
srcdir = @srcdir@
# Directories used by "make install":
prefix = @prefix@
local_prefix = /usr/local
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
datadir = @datadir@
libdir = @libdir@
includedir = @includedir@
mandir = @mandir@
# Programs used by "make":
RM = rm -f
@SET_MAKE@
# Programs used by "make install":
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
mkinstalldirs = $(SHELL) @top_srcdir@/build-aux/mkinstalldirs
#### End of system configuration section. ####
SHELL = @SHELL@
all : lib/localcharset.h force
cd lib && $(MAKE) all
cd srclib && $(MAKE) all
cd src && $(MAKE) all
cd po && $(MAKE) all
cd man && $(MAKE) all
if test -d tests; then cd tests && $(MAKE) all; fi
lib/localcharset.h :
builddir="`pwd`"; cd libcharset && $(MAKE) all && $(MAKE) install-lib libdir="$$builddir/lib" includedir="$$builddir/lib"
# Installs the library and include files only. Typically called with only
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
cd lib && $(MAKE) install-lib libdir='$(libdir)' includedir='$(includedir)'
if [ ! -d $(includedir) ] ; then $(mkinstalldirs) $(includedir) ; fi
$(INSTALL_DATA) include/iconv.h.inst $(includedir)/iconv.h
install : lib/localcharset.h force
cd libcharset && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd lib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd srclib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd src && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
$(INSTALL_DATA) include/iconv.h.inst $(DESTDIR)$(includedir)/iconv.h
cd po && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
cd man && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
install-strip : lib/localcharset.h force
cd libcharset && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd lib && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd srclib && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd src && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
$(INSTALL_DATA) include/iconv.h.inst $(DESTDIR)$(includedir)/iconv.h
cd po && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
cd man && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
installdirs : force
cd libcharset && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd lib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd srclib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd src && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
cd po && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
cd man && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
uninstall : force
cd libcharset && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd lib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd srclib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd src && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
$(RM) $(DESTDIR)$(includedir)/iconv.h
cd po && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
cd man && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
check : all force
cd libcharset && $(MAKE) check
cd lib && $(MAKE) check
cd srclib && $(MAKE) check
cd src && $(MAKE) check
cd po && $(MAKE) check
cd man && $(MAKE) check
if test -d tests; then cd tests && $(MAKE) check; fi
mostlyclean : force
cd libcharset && $(MAKE) mostlyclean
$(RM) lib/libcharset.* lib/localcharset.h
cd lib && $(MAKE) mostlyclean
cd srclib && $(MAKE) mostlyclean
cd src && $(MAKE) mostlyclean
cd po && $(MAKE) mostlyclean
cd man && $(MAKE) mostlyclean
if test -d tests; then cd tests && $(MAKE) mostlyclean; fi
rm -rf bin
clean : force
cd libcharset && $(MAKE) clean
$(RM) lib/libcharset.* lib/localcharset.h
cd lib && $(MAKE) clean
cd srclib && $(MAKE) clean
cd src && $(MAKE) clean
cd po && $(MAKE) clean
cd man && $(MAKE) clean
if test -d tests; then cd tests && $(MAKE) clean; fi
rm -rf bin
distclean : force
cd libcharset && if test -f Makefile; then $(MAKE) distclean; fi
$(RM) lib/libcharset.* lib/localcharset.h
cd lib && if test -f Makefile; then $(MAKE) distclean; fi
cd srclib && if test -f Makefile; then $(MAKE) distclean; fi
cd src && if test -f Makefile; then $(MAKE) distclean; fi
cd po && if test -f Makefile; then $(MAKE) distclean; fi
cd man && if test -f Makefile; then $(MAKE) distclean; fi
if test -d tests; then cd tests && if test -f Makefile; then $(MAKE) distclean; fi; fi
$(RM) config.status config.log config.cache Makefile libtool
$(RM) config.h stamp-h1 lib/stamp-h2
$(RM) include/iconv.h include/iconv.h.inst
rm -rf bin
maintainer-clean : force
cd libcharset && if test -f Makefile; then $(MAKE) maintainer-clean; fi
$(RM) lib/libcharset.* lib/localcharset.h
cd lib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
cd srclib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
cd src && if test -f Makefile; then $(MAKE) maintainer-clean; fi
cd po && if test -f Makefile; then $(MAKE) maintainer-clean; fi
cd man && if test -f Makefile; then $(MAKE) maintainer-clean; fi
if test -d tests; then cd tests && if test -f Makefile; then $(MAKE) maintainer-clean; fi; fi
$(RM) config.status config.log config.cache Makefile libtool
$(RM) config.h stamp-h1 lib/stamp-h2
$(RM) include/iconv.h include/iconv.h.inst
rm -rf bin
# List of source files.
SOURCE_FILES = \
README DEPENDENCIES INSTALL.windows HACKING AUTHORS NEWS DESIGN NOTES THANKS \
ChangeLog Makefile.devel configure.ac Makefile.in \
include/export.h include/iconv.h.in \
gnulib-local/lib/alloca.in.h \
gnulib-local/lib/error.h.diff \
gnulib-local/lib/progname.h.diff \
gnulib-local/lib/xalloc.h \
gnulib-local/lib/xmalloc.c \
gnulib-local/lib/xstrdup.c \
gnulib-local/m4/alloca.m4 \
gnulib-local/modules/libiconv-misc \
gnulib-local/modules/mbstate \
gnulib-local/modules/xalloc \
m4/cp.m4 \
m4/eilseq.m4 \
m4/general.m4 \
m4/ln.m4 \
m4/proto.m4 \
windows/iconv.rc windows/libiconv.rc windows/windres-options \
woe32dll/export.h woe32dll/iconv-exports.c \
os2/iconv.def \
extras/ChangeLog extras/iconv_string.h extras/iconv_string.c \
tools/Makefile \
tools/8bit_tab_to_h.c tools/cjk_tab_to_h.c tools/cjk_variants.c \
tools/CP50221-0208-EXT.TXT tools/CP50221-0212-EXT.TXT tools/JISX0213.TXT
# List of distributed files imported from other packages.
LIBTOOL_IMPORTED_FILES = \
build-aux/ltmain.sh \
m4/libtool.m4 \
m4/lt~obsolete.m4 \
m4/ltoptions.m4 \
m4/ltsugar.m4 \
m4/ltversion.m4
AUTOMAKE_OLD_IMPORTED_FILES = \
build-aux/mkinstalldirs
AUTOMAKE_IMPORTED_FILES = \
build-aux/install-sh \
build-aux/missing
GNULIB_IMPORTED_FILES = \
doc/relocatable.texi \
build-aux/config.guess \
build-aux/config.libpath \
build-aux/config.rpath \
build-aux/config.sub \
build-aux/install-reloc \
build-aux/reloc-ldflags
IMPORTED_FILES = \
COPYING COPYING.LIB \
ABOUT-NLS INSTALL.generic \
build-aux/compile \
build-aux/ar-lib \
$(LIBTOOL_IMPORTED_FILES) $(AUTOMAKE_OLD_IMPORTED_FILES) $(AUTOMAKE_IMPORTED_FILES) $(GNULIB_IMPORTED_FILES)
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES = \
aclocal.m4 configure config.h.in \
include/iconv.h.build.in
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
destdir=`echo '$(distdir)'/$$file | sed -e 's|//*[^/]*$$||'`; \
test -d "$$destdir" || $(mkinstalldirs) "$$destdir" >/dev/null; \
cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
done
for sdir in srcm4; do \
mkdir -p '$(distdir)'/$$sdir; \
for file in '$(srcdir)'/$$sdir/*.m4; do \
cp -p "$$file" '$(distdir)'/$$sdir/ || exit 1; \
done; \
done
test -d '$(distdir)'/libcharset || mkdir '$(distdir)'/libcharset; cd libcharset && $(MAKE) distdir distdir='$(distdir)'/libcharset
test -d '$(distdir)'/lib || mkdir '$(distdir)'/lib; cd lib && $(MAKE) distdir distdir='$(distdir)'/lib
test -d '$(distdir)'/srclib || mkdir '$(distdir)'/srclib; cd srclib && $(MAKE) distdir distdir='$(distdir)'/srclib
test -d '$(distdir)'/src || mkdir '$(distdir)'/src; cd src && $(MAKE) distdir distdir='$(distdir)'/src
test -d '$(distdir)'/tests || mkdir '$(distdir)'/tests; cd tests && $(MAKE) distdir distdir='$(distdir)'/tests
test -d '$(distdir)'/po || mkdir '$(distdir)'/po; cd po && $(MAKE) distdir distdir='$(distdir)'/po
test -d '$(distdir)'/man || mkdir '$(distdir)'/man; cd man && $(MAKE) distdir distdir='$(distdir)'/man
# Creating a distribution tarball.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
TAR = tar
GZIP = gzip
dist : force
tmpdistdir=$(PACKAGE)-$(VERSION); \
abstmpdistdir=`pwd`/$$tmpdistdir; \
rm -rf $$tmpdistdir $$tmpdistdir.tar $$tmpdistdir.tar.gz \
&& mkdir $$tmpdistdir \
&& $(MAKE) distdir distdir="$$abstmpdistdir" \
&& $(TAR) chof $$tmpdistdir.tar --owner=root --group=root $$tmpdistdir \
&& $(GZIP) -9 $$tmpdistdir.tar \
&& rm -rf $$tmpdistdir
force :
# Work around an automake-1.8 bug.
am--refresh:
+204
View File
@@ -0,0 +1,204 @@
New in 1.17:
* The libiconv library is now licensed under the LGPL version 2.1, instead of
the LGPL version 2.0. The iconv program continues to be licensed under GPL
version 3.
* Added converters for many single-byte EBCDIC encodings:
IBM-{037,273,277,278,280,282,284,285,297,423,424,425,500,838,870,871,875},
IBM-{880,905,924,1025,1026,1047,1097,1112,1122,1123,1130,1132,1137,1140},
IBM-{1141,1142,1143,1144,1145,1146,1147,1148,1149,1153,1154,1155,1156,1157},
IBM-{1158,1160,1164,1165,1166,4971,12712,16804}.
They are available through the configure option '--enable-extra-encodings'.
New in 1.16:
* The preloadable library has been removed.
New in 1.15:
* The UTF-8 converter now rejects surrogates and out-of-range code points.
* Added ISO-2022-JP-MS converter.
* Updated the CP1255 converter to map one more character.
* The functions now support strings longer than 2 GB.
New in 1.14:
* The 'iconv' program now produces its output as soon as it can. It no longer
unnecessarily waits for more input.
* Updated the GB18030 converter to map 25 characters to code points that have
been to Unicode since 2000, rather than to code points in the Private Use
Area.
* Updated the BIG5-HKSCS converter. The old BIG5-HKSCS converter is renamed to
BIG5-HKSCS:2004. A new converter BIG5-HKSCS:2008 is added. BIG5-HKSCS is now
an alias for BIG5-HKSCS:2008.
* Fixed a bug in the conversion to wchar_t.
* Fixed a small bug in the CP1258 converter.
New in 1.13:
* The library and the iconv program now understand platform dependent aliases,
for better compatibility with the platform's own iconv_open function.
Examples: "646" on Solaris, "iso88591" on HP-UX, "IBM-1252" on AIX.
* For stateful encodings, when the input ends with a shift sequence followed
by invalid input, the iconv function now increments the input pointer past
the shift sequence before returning (size_t)(-1) with errno = EILSEQ. This
is also like GNU libc's iconv() behaves.
* The library exports a new function iconv_open_into() that stores the
conversion descriptor in pre-allocated memory, rather than allocating fresh
memory for it.
* Added CP1131 converter.
New in 1.12:
* The iconv program is now licensed under the GPL version 3, instead of the
GPL version 2. The libiconv library continues to be licensed under LGPL.
* Added RK1048 converter.
* On AIX, an existing system libiconv no longer causes setlocale() to fail.
* Upgraded EUC-KR, JOHAB to include the Korean postal code sign.
New in 1.11:
* The iconv program has new options --unicode-subst, --byte-subst,
--widechar-subst that allow to specify substitutions for characters that
cannot be converted.
* The iconv program now understands long options:
long option equivalent to
--from-code -f
--to-code -t
--list -l
--silent -s
* The CP936 converter is now different from the GBK converter: it has changed
to include the Euro sign and private area characters. CP936 is no longer an
alias of GBK.
* Updated GB18030 converter to include all private area characters.
* Updated CP950 converter to include the Euro sign and private area characters.
* Updated CP949 converter to include private area characters.
* Updated the BIG5-HKSCS converter. The old BIG5-HKSCS converter is renamed to
BIG5-HKSCS:1999 and updated to Unicode 4. New converters BIG5-HKSCS:2001 and
BIG5-HKSCS:2004 are added. BIG5-HKSCS is now an alias for BIG5-HKSCS:2004.
* Added a few irreversible mappings to the CP932 converter.
* Tidy up the list of symbols exported from libiconv (assumes gcc >= 4.0).
New in 1.10:
* Added ISO-8859-11 converter.
* Updated the ISO-8859-7 converter.
* Added ATARIST converter, available through --enable-extra-encodings.
* Added BIG5-2003 converter (experimental), available through
--enable-extra-encodings.
* Updated EUC-TW converter to include the Euro sign.
* The preloadable library has been renamed from libiconv_plug.so to
preloadable_libiconv.so.
* Portability to mingw.
New in 1.9:
* Many more transliterations.
* New configuration option --enable-relocatable. See the INSTALL.generic file
for details.
New in 1.8:
* The iconv program has new options -l, -c, -s.
* The iconv program is internationalized.
* Added C99 converter.
* Added KOI8-T converter.
* New configuration option --enable-extra-encodings that enables a bunch of
additional encodings; see the README for details.
* Updated the ISO-8859-16 converter.
* Upgraded BIG5-HKSCS, EUC-TW, ISO-2022-CN, ISO-2022-CN-EXT converters to
Unicode 3.2.
* Upgraded EUC-KR, CP949, JOHAB converters to include the Euro sign.
* Changed the ARMSCII-8 converter.
* Extended the EUC-JP encoder so that YEN SIGN characters don't cause failures
in Shift_JIS to EUC-JP conversion.
* The JAVA converter now handles characters outside the Unicode BMP correctly.
* Fixed a bug in the CP1255, CP1258, TCVN decoders: The base characters of
combining characters could be dropped at the end of the conversion buffer.
* Fixed a bug in the transliteration that could lead to excessive memory
allocations in libintl when transliteration was needed.
* Portability to BSD/OS and SCO 3.2.5.
New in 1.7:
* Added UTF-32, UTF-32BE, UTF-32LE converters.
* Changed CP1255, CP1258 and TCVN converters to handle combining characters.
* Changed EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1
converters to use fullwidth Yen sign instead of halfwidth Yen sign, and
fullwidth tilde instead of halfwidth tilde.
* Upgraded EUC-TW, ISO-2022-CN, ISO-2022-CN-EXT converters to Unicode 3.1.
* Changed the GB18030 converter to not reject unassigned and private-use
Unicode characters.
* Fixed a bug in the byte order mark treatment of the UCS-4 decoder.
* The manual pages are now distributed also in HTML format.
New in 1.6:
* The iconv program's -f and -t options are now optional.
* Many more transliterations.
* Added CP862 converter.
* Changed the GB18030 converter.
* Portability to DOS with DJGPP.
New in 1.5:
* Added an iconv(1) program.
* New locale dependent encodings "char", "wchar_t".
* Transliteration is now off by default. Use a //TRANSLIT suffix to enable it.
* The JOHAB encoding is documented again.
* Changed a few mappings in the CP950 converter.
New in 1.4:
* Added GB18030, BIG5HKSCS converters.
* Portability to OS/2 with emx+gcc.
New in 1.3:
* Added UCS-2BE, UCS-2LE, UCS-4BE, UCS-4LE converters.
* Fixed the definition of EILSEQ on SunOS4.
* Fixed a build problem on OSF/1.
* Support for building as a shared library on Woe32.
New in 1.2:
* Added UTF-16BE and UTF-16LE converters.
* Changed the UTF-16 encoder.
* Fixed the treatment of tab characters in the UTF-7 converter.
* Fixed an internal error when output buffer was not large enough.
New in 1.1:
* Added ISO-8859-16 converter.
* Added CP932 converter, a variant of SHIFT_JIS.
* Added CP949 converter, a variant of EUC-KR.
* Improved the ISO-2022-CN-EXT converter: It now covers the ISO-IR-165 range.
* Updated the ISO-8859-8 conversion table.
* The JOHAB encoding is deprecated and not documented any more.
* Fixed two build problems: 1. "make -n check" failed. 2. When libiconv was
already installed, "make" failed.
New in 1.0:
* Added transliteration facilities.
* Added a test suite.
* Fixed the iconv(3) manual page and function: the return value was not
described correctly.
* Fixed a bug in the CP1258 decoder: invalid bytes now yield EILSEQ instead of
U+FFFD.
* Fixed a bug in the Georgian-PS encoder: accept U+00E6.
* Fixed a bug in the EUC-JP encoder: reject 0x8E5C and 0x8E7E.
* Fixed a bug in the KSC5601 and JOHAB converters: they recognized some Hangul
characters at some invalid code positions.
* Fixed a bug in the EUC-TW decoder; it was severely broken.
* Fixed a bug in the CP950 converter: it recognized a dubious BIG5 range.
New in 0.3:
* Reduced the size of the tables needed for the JOHAB converter.
* Portability to Woe32.
New in 0.2:
* Added KOI8-RU, CP850, CP866, CP874, CP950, ISO-2022-CN-EXT, GBK and
ISO-2022-JP-1 converters.
* Added MACINTOSH as an alias for MAC-ROMAN.
* Added ASMO-708 as an alias for ISO-8859-6.
* Added ELOT_928 as an alias for ISO-8859-7.
* Improved the EUC-TW converter: Treat CNS 11643 plane 3.
* Improved the ISO-2022-KR and EUC-KR converters: Hangul characters are
decomposed into Jamo when needed.
* Improved the CP932 converter.
* Updated the CP1133, MULELAO-1 and ARMSCII-8 mappings.
* The EUC-JP and SHIFT_JIS converters now cover the user-defined range.
* Fixed a possible buffer overrun in the JOHAB converter.
* Fixed a bug in the UTF-7, ISO-2022-*, HZ decoders: a shift sequence a the
end of the input no longer gives an error.
* The HZ encoder now always terminates its output in the ASCII state.
* Use a perfect hash table for looking up the aliases.
New in 0.1:
* Portability to Linux/glibc-2.0.x, Linux/libc5, OSF/1, FreeBSD.
* Fixed a bug in the EUC-JP decoder. Extended the ISO-2022-JP-2 converter.
* Made TIS-620 mapping consistent with glibc-2.1.
+404
View File
@@ -0,0 +1,404 @@
Q: Why does libiconv support encoding XXX? Why does libiconv not support
encoding ZZZ?
A: libiconv, as an internationalization library, supports those character
sets and encodings which are in wide-spread use in at least one territory
of the world.
Hint1: On http://www.w3c.org/International/O-charset-lang.html you find a
page "Languages, countries, and the charsets typically used for them".
From this table, we can conclude that the following are in active use:
ISO-8859-1, CP1252 Afrikaans, Albanian, Basque, Catalan, Danish, Dutch,
English, Faroese, Finnish, French, Galician, German,
Icelandic, Irish, Italian, Norwegian, Portuguese,
Scottish, Spanish, Swedish
ISO-8859-2 Croatian, Czech, Hungarian, Polish, Romanian, Slovak,
Slovenian
ISO-8859-3 Esperanto, Maltese
ISO-8859-5 Bulgarian, Byelorussian, Macedonian, Russian,
Serbian, Ukrainian
ISO-8859-6 Arabic
ISO-8859-7 Greek
ISO-8859-8 Hebrew
ISO-8859-9, CP1254 Turkish
ISO-8859-10 Inuit, Lapp
ISO-8859-13 Latvian, Lithuanian
ISO-8859-15 Estonian
KOI8-R Russian
SHIFT_JIS Japanese
ISO-2022-JP Japanese
EUC-JP Japanese
Ordered by frequency on the web (1997):
ISO-8859-1, CP1252 96%
SHIFT_JIS 1.6%
ISO-2022-JP 1.2%
EUC-JP 0.4%
CP1250 0.3%
CP1251 0.2%
CP850 0.1%
MACINTOSH 0.1%
ISO-8859-5 0.1%
ISO-8859-2 0.0%
Hint2: The character sets mentioned in the XFree86 4.0 locale.alias file.
ISO-8859-1 Afrikaans, Basque, Breton, Catalan, Danish, Dutch,
English, Estonian, Faroese, Finnish, French,
Galician, German, Greenlandic, Icelandic,
Indonesian, Irish, Italian, Lithuanian, Norwegian,
Occitan, Portuguese, Scottish, Spanish, Swedish,
Walloon, Welsh
ISO-8859-2 Albanian, Croatian, Czech, Hungarian, Polish,
Romanian, Serbian, Slovak, Slovenian
ISO-8859-3 Esperanto
ISO-8859-4 Estonian, Latvian, Lithuanian
ISO-8859-5 Bulgarian, Byelorussian, Macedonian, Russian,
Serbian, Ukrainian
ISO-8859-6 Arabic
ISO-8859-7 Greek
ISO-8859-8 Hebrew
ISO-8859-9 Turkish
ISO-8859-14 Breton, Irish, Scottish, Welsh
ISO-8859-15 Basque, Breton, Catalan, Danish, Dutch, Estonian,
Faroese, Finnish, French, Galician, German,
Greenlandic, Icelandic, Irish, Italian, Lithuanian,
Norwegian, Occitan, Portuguese, Scottish, Spanish,
Swedish, Walloon, Welsh
KOI8-R Russian
KOI8-U Russian, Ukrainian
EUC-JP (alias eucJP) Japanese
ISO-2022-JP (alias JIS7) Japanese
SHIFT_JIS (alias SJIS) Japanese
U90 Japanese
S90 Japanese
EUC-CN (alias eucCN) Chinese
EUC-TW (alias eucTW) Chinese
BIG5 Chinese
EUC-KR (alias eucKR) Korean
ARMSCII-8 Armenian
GEORGIAN-ACADEMY Georgian
GEORGIAN-PS Georgian
TIS-620 (alias TACTIS) Thai
MULELAO-1 Laothian
IBM-CP1133 Laothian
VISCII Vietnamese
TCVN Vietnamese
NUNACOM-8 Inuktitut
Hint3: The character sets supported by Netscape Communicator 4.
Where is this documented? For the complete picture, I had to use
"strings netscape" and then a lot of guesswork. For a quick take,
look at the "View - Character set" menu of Netscape Communicator 4.6:
ISO-8859-{1,2,5,7,9,15}
WINDOWS-{1250,1251,1253}
KOI8-R Cyrillic
CP866 Cyrillic
Autodetect Japanese (EUC-JP, ISO-2022-JP, ISO-2022-JP-2, SJIS)
EUC-JP Japanese
SHIFT_JIS Japanese
GB2312 Chinese
BIG5 Chinese
EUC-TW Chinese
Autodetect Korean (EUC-KR, ISO-2022-KR, but not JOHAB)
UTF-8
UTF-7
Hint4: The character sets supported by Microsoft Internet Explorer 4.
ISO-8859-{1,2,3,4,5,6,7,8,9}
WINDOWS-{1250,1251,1252,1253,1254,1255,1256,1257}
KOI8-R Cyrillic
KOI8-RU Ukrainian
ASMO-708 Arabic
EUC-JP Japanese
ISO-2022-JP Japanese
SHIFT_JIS Japanese
GB2312 Chinese
HZ-GB-2312 Chinese
BIG5 Chinese
EUC-KR Korean
ISO-2022-KR Korean
WINDOWS-874 Thai
WINDOWS-1258 Vietnamese
UTF-8
UTF-7
UNICODE actually UNICODE-LITTLE
UNICODEFEFF actually UNICODE-BIG
and various DOS character sets: DOS-720, DOS-862, IBM852, CP866.
We take the union of all these four sets. The result is:
European and Semitic languages
* ASCII.
We implement this because it is occasionally useful to know or to
check whether some text is entirely ASCII (i.e. if the conversion
ISO-8859-x -> UTF-8 is trivial).
* ISO-8859-{1,2,3,4,5,6,7,8,9,10}
We implement this because they are widely used. Except ISO-8859-4
which appears to have been superseded by ISO-8859-13 in the baltic
countries. But it's an ISO standard anyway.
* ISO-8859-13
We implement this because it's a standard in Lithuania and Latvia.
* ISO-8859-14
We implement this because it's an ISO standard.
* ISO-8859-15
We implement this because it's increasingly used in Europe, because
of the Euro symbol.
* ISO-8859-16
We implement this because it's an ISO standard.
* KOI8-R, KOI8-U
We implement this because it appears to be the predominant encoding
on Unix in Russia and Ukraine, respectively.
* KOI8-RU
We implement this because MSIE4 supports it.
* KOI8-T
We implement this because it is the locale encoding in glibc's Tajik
locale.
* PT154
We implement this because it is the locale encoding in glibc's Kazakh
locale.
* RK1048
We implement this because it's a standard in Kazakhstan.
* CP{1250,1251,1252,1253,1254,1255,1256,1257}
We implement these because they are the predominant Windows encodings
in Europe.
* CP850
We implement this because it is mentioned as occurring in the web
in the aforementioned statistics.
* CP862
We implement this because Ron Aaron says it is sometimes used in web
pages and emails.
* CP866
We implement this because Netscape Communicator does.
* CP1131
We implement this because it is the locale encoding of a Belorusian
locale in FreeBSD and MacOS X.
* Mac{Roman,CentralEurope,Croatian,Romania,Cyrillic,Greek,Turkish} and
Mac{Hebrew,Arabic}
We implement these because the Sun JDK does, and because Mac users
don't deserve to be punished.
* Macintosh
We implement this because it is mentioned as occurring in the web
in the aforementioned statistics.
Japanese
* EUC-JP, SHIFT_JIS, ISO-2022-JP
We implement these because they are widely used. EUC-JP and SHIFT_JIS
are more used for files, whereas ISO-2022-JP is recommended for email.
* CP932
We implement this because it is the Microsoft variant of SHIFT_JIS,
used on Windows.
* ISO-2022-JP-2
We implement this because it's the common way to represent mails which
make use of JIS X 0212 characters.
* ISO-2022-JP-1
We implement this because it's in the RFCs, but I don't think it is
really used.
* ISO-2022-JP-MS
We implement this because Microsoft Outlook Express / Microsoft MimeOLE
sends emails in this encoding.
* U90, S90
We DON'T implement this because I have no informations about what it
is or who uses it.
Simplified Chinese
* EUC-CN = GB2312
We implement this because it is the widely used representation
of simplified Chinese.
* GBK
We implement this because it appears to be used on Solaris and Windows.
* GB18030
We implement this because it is an official requirement in the
People's Republic of China.
* ISO-2022-CN
We implement this because it is in the RFCs, but I have no idea
whether it is really used.
* ISO-2022-CN-EXT
We implement this because it's in the RFCs, but I don't think it is
really used.
* HZ = HZ-GB-2312
We implement this because the RFCs recommend it for Usenet postings,
and because MSIE4 supports it.
Traditional Chinese
* EUC-TW
We implement it because it appears to be used on Unix.
* BIG5
We implement it because it is the de-facto standard for traditional
Chinese.
* CP950
We implement this because it is the Microsoft variant of BIG5, used
on Windows.
* BIG5+
We DON'T implement this because it doesn't appear to be in wide use.
Only the CWEX fonts use this encoding. Furthermore, the conversion
tables in the big5p package are not coherent: If you convert directly,
you get different results than when you convert via GBK.
* BIG5-HKSCS
We implement it because it is the de-facto standard for traditional
Chinese in Hongkong.
Korean
* EUC-KR
We implement these because they appear to be the widely used
representations for Korean.
* CP949
We implement this because it is the Microsoft variant of EUC-KR, used
on Windows.
* ISO-2022-KR
We implement it because it is in the RFCs and because MSIE4 supports
it, but I have no idea whether it's really used.
* JOHAB
We implement this because it is apparently used on Windows as a locale
encoding (codepage 1361).
* ISO-646-KR
We DON'T implement this because although an old ASCII variant, its
glyph for 0x7E is not clear: RFC 1345 and unicode.org's JOHAB.TXT
say it's a tilde, but Ken Lunde's "CJKV information processing" says
it's an overline. And it is not ISO-IR registered.
Armenian
* ARMSCII-8
We implement it because XFree86 supports it.
Georgian
* Georgian-Academy, Georgian-PS
We implement these because they appear to be both used for Georgian;
Xfree86 supports them.
Thai
* ISO-8859-11, TIS-620
We implement these because it seems to be standard for Thai.
* CP874
We implement this because MSIE4 supports it.
* MacThai
We implement this because the Sun JDK does, and because Mac users
don't deserve to be punished.
Laotian
* MuleLao-1, CP1133
We implement these because XFree86 supports them. I have no idea which
one is used more widely.
Vietnamese
* VISCII, TCVN
We implement these because XFree86 supports them.
* CP1258
We implement this because MSIE4 supports it.
Other languages
* NUNACOM-8 (Inuktitut)
We DON'T implement this because it isn't part of Unicode yet, and
therefore doesn't convert to anything except itself.
Platform specifics
* HP-ROMAN8, NEXTSTEP
We implement these because they were the native character set on HPs
and NeXTs for a long time, and libiconv is intended to be usable on
these old machines.
Full Unicode
* UTF-8, UCS-2, UCS-4
We implement these. Obviously.
* UCS-2BE, UCS-2LE, UCS-4BE, UCS-4LE
We implement these because they are the preferred internal
representation of strings in Unicode aware applications. These are
non-ambiguous names, known to glibc. (glibc doesn't have
UCS-2-INTERNAL and UCS-4-INTERNAL.)
* UTF-16, UTF-16BE, UTF-16LE
We implement these, because UTF-16 is still the favourite encoding of
the president of the Unicode Consortium (for political reasons), and
because they appear in RFC 2781.
* UTF-32, UTF-32BE, UTF-32LE
We implement these because they are part of Unicode 3.1.
* UTF-7
We implement this because it is essential functionality for mail
applications.
* C99
We implement it because it's used for C and C++ programs and because
it's a nice encoding for debugging.
* JAVA
We implement it because it's used for Java programs and because it's
a nice encoding for debugging.
* UNICODE (big endian), UNICODEFEFF (little endian)
We DON'T implement these because they are stupid and not standardized.
Full Unicode, in terms of 'uint16_t' or 'uint32_t'
(with machine dependent endianness and alignment)
* UCS-2-INTERNAL, UCS-4-INTERNAL
We implement these because they are the preferred internal
representation of strings in Unicode aware applications.
Q: Support encodings mentioned in RFC 1345 ?
A: No, they are not in use any more. Supporting ISO-646 variants is pointless
since ISO-8859-* have been adopted.
Q: Support EBCDIC ?
A: Available through --enable-extra-encodings.
Why? Because several people (Ulrich Schwab, Calvin Buckley) have shown
interest in these encodings, by preparing forks of GNU libiconv.
Q: How do I add a new character set?
A: 1. Explain the "why" in this file, above.
2. You need to have a conversion table from/to Unicode. Transform it into
the format used by the mapping tables found on ftp.unicode.org: each line
contains the character code, in hex, with 0x prefix, then whitespace,
then the Unicode code point, in hex, 4 hex digits, with 0x prefix. '#'
counts as a comment delimiter until end of line.
Please also send your table to Mark Leisher <mleisher@crl.nmsu.edu> so he
can include it in his collection.
3. If it's an 8-bit character set, use the '8bit_tab_to_h' program in the
tools directory to generate the C code for the conversion. You may tweak
the resulting C code if you are not satisfied with its quality, but this
is rarely needed.
If it's a two-dimensional character set (with rows and columns), use the
'cjk_tab_to_h' program in the tools directory to generate the C code for
the conversion. You will need to modify the main() function to recognize
the new character set name, with the proper dimensions, but that shouldn't
be too hard. This yields the CCS. The CES you have to write by hand.
4. Store the resulting C code file in the lib directory. Add a #include
directive to converters.h, and add an entry to the encodings.def file.
5. Compile the package, and test your new encoding using a program like
iconv(1) or clisp(1).
6. Augment the testsuite: Add a line to tests/Makefile.in. For a stateless
encoding, create the complete table as a TXT file. For a stateful encoding,
provide a text snippet encoded using your new encoding and its UTF-8
equivalent.
7. Update the README and man/iconv_open.3, to mention the new encoding.
Add a note in the NEWS file.
Q: What about bidirectional text? Should it be tagged or reversed when
converting from ISO-8859-8 or ISO-8859-6 to Unicode? Qt appears to do
this, see qt-2.0.1/src/tools/qrtlcodec.cpp.
A: After reading RFC 1556: I don't think so. Support for ISO-8859-8-I and
ISO-8859-E remains to be implemented.
On the other hand, a page on www.w3c.org says that ISO-8859-8 in *email*
is visually encoded, ISO-8859-8 in *HTML* is logically encoded, i.e.
the same as ISO-8859-8-I. I'm confused.
Other character sets not implemented:
"MNEMONIC" = "csMnemonic"
"MNEM" = "csMnem"
"ISO-10646-UCS-Basic" = "csUnicodeASCII"
"ISO-10646-Unicode-Latin1" = "csUnicodeLatin1" = "ISO-10646"
"ISO-10646-J-1"
"UNICODE-1-1" = "csUnicode11"
"csWindows31Latin5"
Other aliases not implemented (and not implemented in glibc-2.1 either):
From MSIE4:
ISO-8859-1: alias ISO8859-1
ISO-8859-2: alias ISO8859-2
KSC_5601: alias KS_C_5601
UTF-8: aliases UNICODE-1-1-UTF-8 UNICODE-2-0-UTF-8
Q: How can I integrate libiconv into my package?
A: Just copy the entire libiconv package into a subdirectory of your package.
At configuration time, call libiconv's configure script with the
appropriate --srcdir option and maybe --enable-static or --disable-shared.
Then "cd libiconv && make && make install-lib libdir=... includedir=...".
'install-lib' is a special (not GNU standardized) target which installs
only the include file - in $(includedir) - and the library - in $(libdir) -
and does not use other directory variables. After "installing" libiconv
in your package's build directory, building of your package can proceed.
Q: Why is the testsuite so big?
A: Because some of the tests are very comprehensive.
If you don't feel like using the testsuite, you can simply remove the
tests/ directory.
+173
View File
@@ -0,0 +1,173 @@
GNU LIBICONV - character set conversion library
This library provides an iconv() implementation, for use on systems which
don't have one, or whose implementation cannot convert from/to Unicode.
It provides support for the encodings:
European languages
ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16},
KOI8-R, KOI8-U, KOI8-RU,
CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
Mac{Cyrillic,Ukraine,Greek,Turkish},
Macintosh
Semitic languages
ISO-8859-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}
Japanese
EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1,
ISO-2022-JP-MS
Chinese
EUC-CN, HZ, GBK, CP936, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS,
BIG5-HKSCS:2004, BIG5-HKSCS:2001, BIG5-HKSCS:1999, ISO-2022-CN,
ISO-2022-CN-EXT
Korean
EUC-KR, CP949, ISO-2022-KR, JOHAB
Armenian
ARMSCII-8
Georgian
Georgian-Academy, Georgian-PS
Tajik
KOI8-T
Kazakh
PT154, RK1048
Thai
ISO-8859-11, TIS-620, CP874, MacThai
Laotian
MuleLao-1, CP1133
Vietnamese
VISCII, TCVN, CP1258
Platform specifics
HP-ROMAN8, NEXTSTEP
Full Unicode
UTF-8
UCS-2, UCS-2BE, UCS-2LE
UCS-4, UCS-4BE, UCS-4LE
UTF-16, UTF-16BE, UTF-16LE
UTF-32, UTF-32BE, UTF-32LE
UTF-7
C99, JAVA
Full Unicode, in terms of 'uint16_t' or 'uint32_t'
(with machine dependent endianness and alignment)
UCS-2-INTERNAL, UCS-4-INTERNAL
Locale dependent, in terms of 'char' or 'wchar_t'
(with machine dependent endianness and alignment, and with OS and
locale dependent semantics)
char, wchar_t
The empty encoding name "" is equivalent to "char": it denotes the
locale dependent character encoding.
When configured with the option --enable-extra-encodings, it also provides
support for a few extra encodings:
European languages
CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
Semitic languages
CP864
Japanese
EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3
Chinese
BIG5-2003 (experimental)
Turkmen
TDS565
Platform specifics
ATARIST, RISCOS-LATIN1
EBCDIC compatible (not ASCII compatible, very rarely used)
European languages
IBM-{037,273,277,278,280,282,284,285,297,423,500,870,871,875,880},
IBM-{905,924,1025,1026,1047,1112,1122,1123,1140,1141,1142,1143},
IBM-{1144,1145,1146,1147,1148,1149,1153,1154,1155,1156,1157,1158},
IBM-{1165,1166,4971}
Semitic languages
IBM-{424,425,12712,16804}
Persian
IBM-1097
Thai
IBM-{838,1160}
Laotian
IBM-1132
Vietnamese
IBM-{1130,1164}
Indic languages
IBM-1137
It can convert from any of these encodings to any other, through Unicode
conversion.
It has also some limited support for transliteration, i.e. when a character
cannot be represented in the target character set, it can be approximated
through one or several similarly looking characters. Transliteration is
activated when "//TRANSLIT" is appended to the target encoding name.
libiconv is for you if your application needs to support multiple character
encodings, but that support lacks from your system.
Installation
------------
As usual for GNU packages:
$ ./configure --prefix=[[PREFIX]] where [[PREFIX]] is e.g. $HOME/local
$ make
$ make install
After installing GNU libiconv for the first time, it is recommended to
recompile and reinstall GNU gettext, so that it can take advantage of
libiconv.
On systems other than GNU/Linux, the iconv program will be internationalized
only if GNU gettext has been built and installed before GNU libiconv. This
means that the first time GNU libiconv is installed, we have a circular
dependency between the GNU libiconv and GNU gettext packages, which can be
resolved by building and installing either
- first libiconv, then gettext, then libiconv again,
or (on systems supporting shared libraries, excluding AIX)
- first gettext, then libiconv, then gettext again.
Recall that before building a package for the second time, you need to erase
the traces of the first build by running "make distclean".
This library installs:
- a library 'libiconv.so',
- a header file '<iconv.h>'.
To use it, simply #include <iconv.h> and use the functions.
To use it in a package that uses GNU autoconf and GNU automake:
- Use gnulib-tool to import the Gnulib module 'iconv'. It consists
of a couple of *.m4 files (iconv.m4 and its dependencies) and a
file 'build-aux/config.rpath'.
- Add to the link command line of libraries and executables that use
the functions the placeholder @LIBICONV@ (or, if using libtool for
the link, @LTLIBICONV@). In Makefile.am files, the right place for
these additions are the *_LDADD variables.
Copyright
---------
The libiconv and libcharset _libraries_ and their header files are under LGPL,
see file COPYING.LIB.
The iconv _program_ and the documentation are under GPL, see file COPYING.
Download
--------
https://ftp.gnu.org/gnu/libiconv/libiconv-1.17.tar.gz
Homepage
--------
https://www.gnu.org/software/libiconv/
Bug reports
-----------
Report bugs
- in the bug tracker at <https://savannah.gnu.org/projects/libiconv>
- or by email to <bug-gnu-libiconv@gnu.org>.
Bruno Haible <bruno@clisp.org>
+15
View File
@@ -0,0 +1,15 @@
Thanks to for
Edmund Grimley Evans <edmundo@rano.org> bug reports
Taro Muraoka <koron@tka.att.ne.jp> Woe32 DLL support
Akira Hatakeyama <akira@sra.co.jp> OS/2 support
Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>
DOS/DJGPP support
Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> advice on EUC-JP and JISX0213
Ken Lunde <lunde@adobe.com> detailed information about GB18030
Vendored
+1288
View File
File diff suppressed because it is too large Load Diff
+275
View File
@@ -0,0 +1,275 @@
#! /bin/sh
# Wrapper for Microsoft lib.exe
me=ar-lib
scriptversion=2019-07-04.01; # UTC
# Copyright (C) 2010-2022 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>.
#
# 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, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# func_error message
func_error ()
{
echo "$me: $1" 1>&2
exit 1
}
file_conv=
# func_file_conv build_file
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv in
mingw)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin | msys)
file=`cygpath -m "$file" || echo "$file"`
;;
wine)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_at_file at_file operation archive
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
# for each of them.
# When interpreting the content of the @FILE, do NOT use func_file_conv,
# since the user would need to supply preconverted file names to
# binutils ar, at least for MinGW.
func_at_file ()
{
operation=$2
archive=$3
at_file_contents=`cat "$1"`
eval set x "$at_file_contents"
shift
for member
do
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
done
}
case $1 in
'')
func_error "no command. Try '$0 --help' for more information."
;;
-h | --h*)
cat <<EOF
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
Members may be specified in a file named with @FILE.
EOF
exit $?
;;
-v | --v*)
echo "$me, version $scriptversion"
exit $?
;;
esac
if test $# -lt 3; then
func_error "you must specify a program, an action and an archive"
fi
AR=$1
shift
while :
do
if test $# -lt 2; then
func_error "you must specify a program, an action and an archive"
fi
case $1 in
-lib | -LIB \
| -ltcg | -LTCG \
| -machine* | -MACHINE* \
| -subsystem* | -SUBSYSTEM* \
| -verbose | -VERBOSE \
| -wx* | -WX* )
AR="$AR $1"
shift
;;
-nologo | -NOLOGO)
# We always invoke AR with -nologo, so don't need to add it again.
shift
;;
*)
action=$1
shift
break
;;
esac
done
orig_archive=$1
shift
func_file_conv "$orig_archive"
archive=$file
# strip leading dash in $action
action=${action#-}
delete=
extract=
list=
quick=
replace=
index=
create=
while test -n "$action"
do
case $action in
d*) delete=yes ;;
x*) extract=yes ;;
t*) list=yes ;;
q*) quick=yes ;;
r*) replace=yes ;;
s*) index=yes ;;
S*) ;; # the index is always updated implicitly
c*) create=yes ;;
u*) ;; # TODO: don't ignore the update modifier
v*) ;; # TODO: don't ignore the verbose modifier
*)
func_error "unknown action specified"
;;
esac
action=${action#?}
done
case $delete$extract$list$quick$replace,$index in
yes,* | ,yes)
;;
yesyes*)
func_error "more than one action specified"
;;
*)
func_error "no action specified"
;;
esac
if test -n "$delete"; then
if test ! -f "$orig_archive"; then
func_error "archive not found"
fi
for member
do
case $1 in
@*)
func_at_file "${1#@}" -REMOVE "$archive"
;;
*)
func_file_conv "$1"
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
;;
esac
done
elif test -n "$extract"; then
if test ! -f "$orig_archive"; then
func_error "archive not found"
fi
if test $# -gt 0; then
for member
do
case $1 in
@*)
func_at_file "${1#@}" -EXTRACT "$archive"
;;
*)
func_file_conv "$1"
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
;;
esac
done
else
$AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
| while read member
do
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
done
fi
elif test -n "$quick$replace"; then
if test ! -f "$orig_archive"; then
if test -z "$create"; then
echo "$me: creating $orig_archive"
fi
orig_archive=
else
orig_archive=$archive
fi
for member
do
case $1 in
@*)
func_file_conv "${1#@}"
set x "$@" "@$file"
;;
*)
func_file_conv "$1"
set x "$@" "$file"
;;
esac
shift
shift
done
if test -n "$orig_archive"; then
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
else
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
fi
elif test -n "$list"; then
if test ! -f "$orig_archive"; then
func_error "archive not found"
fi
$AR -NOLOGO -LIST "$archive" || exit $?
fi
+348
View File
@@ -0,0 +1,348 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2022 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
Vendored Executable
+1765
View File
File diff suppressed because it is too large Load Diff
+152
View File
@@ -0,0 +1,152 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable at run time.
#
# Copyright 1996-2022 Free Software Foundation, Inc.
# Taken from GNU libtool, 2003
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 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, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variable LD should be set by the caller.
#
# The set of defined variables is at the end of this script.
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
shlibpath_var=
case $host_os in
aix3*)
shlibpath_var=LIBPATH
;;
aix[4-9]*)
if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
shlibpath_var=LD_LIBRARY_PATH
else
shlibpath_var=LIBPATH
fi
;;
beos*)
shlibpath_var=LIBRARY_PATH
;;
bsdi[45]*)
shlibpath_var=LD_LIBRARY_PATH
;;
cygwin* | mingw* | pw32* | cegcc*)
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
darwin* | rhapsody*)
shlibpath_var=DYLD_LIBRARY_PATH
;;
dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
freebsd* | dragonfly* | midnightbsd*)
shlibpath_var=LD_LIBRARY_PATH
;;
gnu*)
shlibpath_var=LD_LIBRARY_PATH
;;
hpux9* | hpux10* | hpux11*)
case "$host_cpu" in
ia64* | hppa*64*) shlibpath_var=LD_LIBRARY_PATH ;;
*) shlibpath_var=SHLIB_PATH ;;
esac
;;
interix[3-9]*)
shlibpath_var=LD_LIBRARY_PATH
;;
irix5* | irix6* | nonstopux*)
case $host_os in
irix5* | nonstopux*)
shlibsuff=
;;
*)
case $LD in # libtool.m4 will add one of these switches to LD
*-32|*"-32 ") shlibsuff= ;;
*-n32|*"-n32 ") shlibsuff=N32 ;;
*-64|*"-64 ") shlibsuff=64 ;;
*) shlibsuff= ;;
esac
;;
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux* | k*bsd*-gnu)
shlibpath_var=LD_LIBRARY_PATH
;;
netbsd*)
shlibpath_var=LD_LIBRARY_PATH
;;
newsos6)
shlibpath_var=LD_LIBRARY_PATH
;;
nto-qnx*)
shlibpath_var=LD_LIBRARY_PATH
;;
openbsd*)
shlibpath_var=LD_LIBRARY_PATH
;;
os2*)
shlibpath_var=LIBPATH
;;
osf3* | osf4* | osf5*)
shlibpath_var=LD_LIBRARY_PATH
;;
rdos*)
;;
solaris*)
shlibpath_var=LD_LIBRARY_PATH
;;
sunos4*)
shlibpath_var=LD_LIBRARY_PATH
;;
sysv4 | sysv4.3*)
shlibpath_var=LD_LIBRARY_PATH
;;
sysv4*MP*)
if test -d /usr/nec ;then
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
shlibpath_var=LD_LIBRARY_PATH
;;
uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;
esac
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# This is the shared library path variable.
shlibpath_var=$shlibpath_var
EOF
+684
View File
@@ -0,0 +1,684 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2022 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# Code taken from libtool.m4's _LT_CC_BASENAME.
for cc_temp in $CC""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's _LT_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
mingw* | cygwin* | pw32* | os2* | cegcc*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
ecc*)
wl='-Wl,'
;;
icc* | ifort*)
wl='-Wl,'
;;
lf95*)
wl='-Wl,'
;;
nagfor*)
wl='-Wl,-Wl,,'
;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
xl* | bgxl* | bgf* | mpixl*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ F* | *Sun*Fortran*)
wl=
;;
*Sun\ C*)
wl='-Wl,'
;;
esac
;;
esac
;;
newsos6)
;;
*nto* | *qnx*)
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
rdos*)
;;
solaris*)
case $cc_basename in
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
wl='-Qoption ld '
;;
*)
wl='-Wl,'
;;
esac
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3*)
wl='-Wl,'
;;
sysv4*MP*)
;;
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
wl='-Wl,'
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
interix*)
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
case "$host_os" in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
case "$host_cpu" in
powerpc)
;;
m68k)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
esac
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32* | cegcc*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
haiku*)
;;
interix[3-9]*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
ld_shlibs=no
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
else
ld_shlibs=no
fi
;;
esac
;;
sunos4*)
hardcode_direct=yes
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = no; then
hardcode_libdir_flag_spec=
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
;;
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
:
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
;;
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
amigaos*)
case "$host_cpu" in
powerpc)
;;
m68k)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
esac
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=no
if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
:
else
ld_shlibs=no
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd2.[01]*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | dragonfly* | midnightbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
fi
;;
hpux11*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
case $host_cpu in
hppa*64*|ia64*)
hardcode_direct=no
;;
*)
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
*nto* | *qnx*)
;;
openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
else
ld_shlibs=no
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
;;
sysv5* | sco3.2v5* | sco5v6*)
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
hardcode_libdir_separator=':'
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
# only about the one the linker finds when passed -lNAME. This is the last
# element of library_names_spec in libtool.m4, or possibly two of them if the
# linker has special search rules.
library_names_spec= # the last element of library_names_spec in libtool.m4
libname_spec='lib$name'
case "$host_os" in
aix3*)
library_names_spec='$libname.a'
;;
aix[4-9]*)
library_names_spec='$libname$shrext'
;;
amigaos*)
case "$host_cpu" in
powerpc*)
library_names_spec='$libname$shrext' ;;
m68k)
library_names_spec='$libname.a' ;;
esac
;;
beos*)
library_names_spec='$libname$shrext'
;;
bsdi[45]*)
library_names_spec='$libname$shrext'
;;
cygwin* | mingw* | pw32* | cegcc*)
shrext=.dll
library_names_spec='$libname.dll.a $libname.lib'
;;
darwin* | rhapsody*)
shrext=.dylib
library_names_spec='$libname$shrext'
;;
dgux*)
library_names_spec='$libname$shrext'
;;
freebsd[23].*)
library_names_spec='$libname$shrext$versuffix'
;;
freebsd* | dragonfly* | midnightbsd*)
library_names_spec='$libname$shrext'
;;
gnu*)
library_names_spec='$libname$shrext'
;;
haiku*)
library_names_spec='$libname$shrext'
;;
hpux9* | hpux10* | hpux11*)
case $host_cpu in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
library_names_spec='$libname$shrext'
;;
interix[3-9]*)
library_names_spec='$libname$shrext'
;;
irix5* | irix6* | nonstopux*)
library_names_spec='$libname$shrext'
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux* | k*bsd*-gnu | kopensolaris*-gnu)
library_names_spec='$libname$shrext'
;;
knetbsd*-gnu)
library_names_spec='$libname$shrext'
;;
netbsd*)
library_names_spec='$libname$shrext'
;;
newsos6)
library_names_spec='$libname$shrext'
;;
*nto* | *qnx*)
library_names_spec='$libname$shrext'
;;
openbsd*)
library_names_spec='$libname$shrext$versuffix'
;;
os2*)
libname_spec='$name'
shrext=.dll
library_names_spec='$libname.a'
;;
osf3* | osf4* | osf5*)
library_names_spec='$libname$shrext'
;;
rdos*)
;;
solaris*)
library_names_spec='$libname$shrext'
;;
sunos4*)
library_names_spec='$libname$shrext$versuffix'
;;
sysv4 | sysv4.3*)
library_names_spec='$libname$shrext'
;;
sysv4*MP*)
library_names_spec='$libname$shrext'
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
library_names_spec='$libname$shrext'
;;
tpf*)
library_names_spec='$libname$shrext'
;;
uts4*)
library_names_spec='$libname$shrext'
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Format of library name prefix.
libname_spec="$escaped_libname_spec"
# Library names that the linker finds when passed -lNAME.
library_names_spec="$escaped_library_names_spec"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
EOF
Vendored Executable
+1890
View File
File diff suppressed because it is too large Load Diff
+296
View File
@@ -0,0 +1,296 @@
#!/bin/sh
# install-reloc - install a program including a relocating wrapper
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
# Written by Bruno Haible <bruno@clisp.org>, 2003.
#
# 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 3 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, see <https://www.gnu.org/licenses/>.
# Usage 1:
# install-reloc -- library_path_var library_path_value prefix destdir \
# compile_command srcdir builddir config_h_dir exeext \
# strip_command \
# install_command... destprog
# where
# - library_path_var is the platform dependent runtime library path variable
# - library_path_value is a colon separated list of directories that contain
# the libraries at installation time (use this instead of -rpath)
# - prefix is the base directory at installation time
# - destdir is a string that is prepended to all file names at installation
# time; it is already prepended to destprog but not to library_path_value
# and prefix
# - compile_command is a C compiler compilation and linking command
# - srcdir is the directory where to find relocwrapper.c and its dependencies
# - builddir is the directory where to find built dependencies (namely,
# alloca.h and stdbool.h)
# - config_h_dir is the directory where to find config.h
# - exeext is platform dependent suffix of executables
# - strip_command is the command for stripping executables, or : if no
# stripping is desired
# - install_command is the install command line, excluding the final destprog
# - destprog is the destination program name
# Usage 2:
# env RELOC_LIBRARY_PATH_VAR=library_path_var \
# RELOC_LIBRARY_PATH_VALUE=library_path_value \
# RELOC_PREFIX=prefix \
# RELOC_DESTDIR=destdir \
# RELOC_COMPILE_COMMAND=compile_command \
# RELOC_SRCDIR=srcdir \
# RELOC_BUILDDIR=builddir \
# RELOC_CONFIG_H_DIR=config_h_dir \
# RELOC_EXEEXT=exeext \
# RELOC_STRIP_PROG=strip_command \
# RELOC_INSTALL_PROG=install_command... \
# install-reloc prog1 ... destprog
# where destprog is either the destination program name (when only one program
# is specified) or the destination directory for all programs.
# install-reloc renames destprog to destprog.bin and installs a relocating
# wrapper in the place of destprog.
progname=$0
if test $# -ge 12 && test "x$1" = "x--"; then
# Get fixed position arguments.
shift
library_path_var=$1
library_path_value=$2
prefix=$3
destdir=$4
shift
shift
shift
shift
compile_command=$1
srcdir=$2
builddir=$3
config_h_dir=$4
exeext=$5
shift
shift
shift
shift
shift
strip_prog=$1
shift
install_prog=$1 # maybe not including the "-c" option
shift
else
if test $# -ge 2; then
# Get arguments from environment variables.
library_path_var=$RELOC_LIBRARY_PATH_VAR
library_path_value=$RELOC_LIBRARY_PATH_VALUE
prefix=$RELOC_PREFIX
destdir=$RELOC_DESTDIR
compile_command=$RELOC_COMPILE_COMMAND
srcdir=$RELOC_SRCDIR
builddir=$RELOC_BUILDDIR
config_h_dir=$RELOC_CONFIG_H_DIR
exeext=$RELOC_EXEEXT
strip_prog=$RELOC_STRIP_PROG
install_prog=$RELOC_INSTALL_PROG # including the "-c" option
else
echo "Usage: $0 -- library_path_var library_path_value prefix destdir" \
"compile_command srcdir builddir config_h_dir exeext" \
"strip_command" \
"install_command... destprog" 1>&2
exit 1
fi
fi
# Get destprog, last argument.
destprog=
for arg
do
destprog=$arg
done
# Determine whether destprog is a program name or a directory name.
if test -d "$destprog"; then
sed_remove_trailing_slashes='s|//*$||'
destprog_directory=`echo "$destprog" | sed -e "$sed_remove_trailing_slashes"`
if test -z "$destprog_directory"; then
destprog_directory='/'
fi
else
destprog_directory=
fi
# Prepare for remove trailing $exeext, if present.
if test -n "$exeext"; then
sed_quote='s,\.,\\.,g'
sed_remove_exeext='s|'`echo "$exeext" | sed -e "$sed_quote"`'$||'
fi
if test -z "$destprog_directory"; then
# Remove trailing $exeext, if present.
if test -n "$exeext"; then
destprog=`echo "$destprog" | sed -e "$sed_remove_exeext"`
fi
fi
# Outputs a command and runs it.
func_verbose ()
{
# Make it easy to copy&paste the printed command into a shell in most cases,
# by escaping '\\', '"', and '$'. This is not perfect, just good enough.
echo "$@" | sed -e 's/\([\\"$]\)/\\\1/g'
"$@"
}
# Run install_command.
func_verbose $install_prog "$@" || exit $?
# Iterate over all destination program names.
# func_iterate f
# applies f to each destination program names, after setting destprog.
sed_basename_of_file='s|^.*/||'
func_iterate ()
{
if test -n "$destprog_directory"; then
prev_arg=
for arg
do
if test -n "prev_arg"; then
destprog="$destprog_directory"/`echo "$prev_arg" | sed -e "$sed_basename_of_file"`
$1
fi
prev_arg="$arg"
done
else
$1
fi
}
# Run strip_command.
func_strip ()
{
# Remove trailing $exeext, if present.
if test -n "$exeext"; then
destprog=`echo "$destprog" | sed -e "$sed_remove_exeext"`
fi
func_verbose "$strip_prog" "$destprog$exeext" || exit $?
}
if test "$strip_prog" != ':'; then
func_iterate func_strip
fi
# If the platform doesn't support LD_LIBRARY_PATH or similar, we cannot build
# a wrapper.
test -n "$library_path_var" || exit 0
libdirs=
save_IFS="$IFS"; IFS=":"
for dir in $library_path_value; do
IFS="$save_IFS"
if test -n "$dir"; then
case "$libdirs" in
*"\"$dir\""*) ;; # remove duplicate
*) libdirs="$libdirs\"$dir\"," ;;
esac
fi
done
IFS="$save_IFS"
# If there are no library directories to add at runtime, we don't need a
# wrapper.
test -n "$libdirs" || exit 0
# Determine installdir from destprog, removing a leading destdir if present.
if test -n "$destprog_directory"; then
installdir="$destprog_directory"
else
installdir=`echo "$destprog" | sed -e 's,/[^/]*$,,'`
fi
if test -n "$destdir"; then
sed_quote='s,\([|.\*^$[]\),\\\1,g'
sed_remove_destdir='s|^'`echo "$destdir" | sed -e "$sed_quote"`'||'
installdir=`echo "$installdir" | sed -e "$sed_remove_destdir"`
fi
# Compile and install wrapper.
func_create_wrapper ()
{
# Remove trailing $exeext, if present.
if test -n "$exeext"; then
destprog=`echo "$destprog" | sed -e "$sed_remove_exeext"`
fi
# Compile wrapper.
func_verbose $compile_command \
-I"$builddir" -I"$srcdir" -I"$config_h_dir" \
-DHAVE_CONFIG_H -DIN_RELOCWRAPPER -DNO_XMALLOC \
-D"INSTALLPREFIX=\"$prefix\"" -D"INSTALLDIR=\"$installdir\"" \
-D"LIBPATHVAR=\"$library_path_var\"" -D"LIBDIRS=$libdirs" \
-D"EXEEXT=\"$exeext\"" \
"$srcdir"/relocwrapper.c \
"$srcdir"/progname.c \
"$srcdir"/progreloc.c \
"$srcdir"/areadlink.c \
"$srcdir"/careadlinkat.c \
"$srcdir"/allocator.c \
"$srcdir"/readlink.c \
"$srcdir"/stat.c \
"$srcdir"/canonicalize-lgpl.c \
"$srcdir"/malloc/scratch_buffer_dupfree.c \
"$srcdir"/malloc/scratch_buffer_grow.c \
"$srcdir"/malloc/scratch_buffer_grow_preserve.c \
"$srcdir"/malloc/scratch_buffer_set_array_size.c \
"$srcdir"/malloc.c \
"$srcdir"/realloc.c \
"$srcdir"/free.c \
"$srcdir"/mempcpy.c \
"$srcdir"/rawmemchr.c \
"$srcdir"/malloca.c \
"$srcdir"/relocatable.c \
"$srcdir"/setenv.c \
"$srcdir"/c-ctype.c \
-o "$destprog.wrapper$exeext"
rc=$?
# Clean up object files left over in the current directory by the native C
# compilers on Solaris, HP-UX, OSF/1, IRIX.
rm -f relocwrapper.o \
progname.o \
progreloc.o \
areadlink.o \
careadlinkat.o \
allocator.o \
readlink.o \
stat.o \
canonicalize-lgpl.o \
scratch_buffer_dupfree.o \
scratch_buffer_grow.o \
scratch_buffer_grow_preserve.o \
scratch_buffer_set_array_size.o \
malloc.o \
realloc.o \
free.o \
mempcpy.o \
rawmemchr.o \
malloca.o \
relocatable.o \
setenv.o \
c-ctype.o
test $rc = 0 || exit $?
# Clean up debugging information left over by the native C compiler on MacOS X.
rm -rf "$destprog.wrapper$exeext.dSYM"
test $rc = 0 || exit $?
# Strip wrapper.
test "$strip_prog" = ':' || func_verbose "$strip_prog" "$destprog.wrapper$exeext" || exit $?
# Rename $destprog.wrapper -> $destprog -> $destprog.bin.
ln -f "$destprog$exeext" "$destprog.bin$exeext" \
|| { rm -f "$destprog.bin$exeext" \
&& cp -p "$destprog$exeext" "$destprog.bin$exeext"; } \
|| exit 1
mv "$destprog.wrapper$exeext" "$destprog$exeext" || exit 1
}
func_iterate func_create_wrapper
exit 0
+541
View File
@@ -0,0 +1,541 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
tab=' '
nl='
'
IFS=" $tab$nl"
# Set DOITPROG to "echo" to test this script.
doit=${DOITPROG-}
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_mkdir=
# Desired mode of installed file.
mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;;
-S) backupsuffix="$2"
shift;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
# The $RANDOM variable is not portable (e.g., dash). Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
oIFS=$IFS
IFS=/
set -f
set fnord $dstdir
shift
set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=${dstdirslash}_inst.$$_
rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
+89
View File
@@ -0,0 +1,89 @@
#!/bin/sh
# libtool-reloc - libtool wrapper with support for relocatable programs
# Copyright (C) 2019-2022 Free Software Foundation, Inc.
# Written by Bruno Haible <bruno@clisp.org>, 2019.
#
# 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 3 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, see <https://www.gnu.org/licenses/>.
# Usage: libtool-reloc libtool LIBTOOL_ARGUMENTS
# Outputs a command and runs it.
func_verbose ()
{
# Make it easy to copy&paste the printed command into a shell in most cases,
# by escaping '\\', '"', and '$'. This is not perfect, just good enough.
echo "$@" | sed -e 's/\([\\"$]\)/\\\1/g'
"$@"
}
# Determine the mode from the arguments.
mode=
for arg
do
case "$arg" in
--mode=link) mode=link ;;
esac
done
if test "$mode" = link; then
# Determine the target from the arguments.
target=
next_is_target=false
for arg
do
if $next_is_target; then
target="$arg"
next_is_target=false
else
case "$arg" in
-o) next_is_target=true ;;
*) next_is_target=false ;;
esac
fi
done
case "$target" in
*.la)
# When creating a library:
# 1. Add a '-Wl,-rpath,@loader_path' option.
# (A '-R @loader_path' option does not work: libtool produces
# an error "error: only absolute run-paths are allowed".)
# (Also note that 'install_name_tool -add_rpath @loader_path ...'
# does not work on Mac OS X 10.5.)
# This is done through the RELOCATABLE_LDFLAGS macro.
# 2. After creating the library, run
# install_name_tool -id @rpath/$dlname $target_dir/.libs/$dlname
# (This is easier than to modify the libtool script to emit a different
# install_name. Also, an option '-Wl,-install_name,@rpath/$dlname' does
# not work since libtool emits another option '-Wl,-install_name,...'
# after it.
"$@" && {
dlname_assignment=`grep '^dlname=' "$target"`
dlname=
eval "$dlname_assignment"
# Nothing to do when --disable-shared was specified.
if test -n "$dlname"; then
target_dir=`dirname "$target"`
if test -f "$target_dir/.libs/$dlname"; then
func_verbose install_name_tool -id "@rpath/$dlname" "$target_dir/.libs/$dlname"
fi
fi
}
;;
*)
"$@"
;;
esac
else
"$@"
fi
+11438
View File
File diff suppressed because it is too large Load Diff
+215
View File
@@ -0,0 +1,215 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
case $1 in
--is-lightweight)
# Used by our autoconf macros to check whether the available missing
# script is modern enough.
exit 0
;;
--run)
# Back-compat with the calling convention used by older automake.
shift
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported PROGRAM values:
aclocal autoconf autoheader autom4te automake makeinfo
bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
# Run the given program, remember its exit status.
"$@"; st=$?
# If it succeeded, we are done.
test $st -eq 0 && exit 0
# Also exit now if we it failed (or wasn't found), and '--version' was
# passed; such an option is passed most likely to detect whether the
# program is present and works.
case $2 in --version|--help) exit $st;; esac
# Exit code 63 means version mismatch. This often happens when the user
# tries to use an ancient version of a tool on a file that requires a
# minimum version.
if test $st -eq 63; then
msg="probably too old"
elif test $st -eq 127; then
# Program was missing.
msg="missing on your system"
else
# Program was found and executed, but failed. Give up.
exit $st
fi
perl_URL=https://www.perl.org/
flex_URL=https://github.com/westes/flex
gnu_software_URL=https://www.gnu.org/software
program_details ()
{
case $1 in
aclocal|automake)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/autoconf>"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
autoconf|autom4te|autoheader)
echo "The '$1' program is part of the GNU Autoconf package:"
echo "<$gnu_software_URL/autoconf/>"
echo "It also requires GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
esac
}
give_advice ()
{
# Normalize program name to check for.
normalized_program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
case $normalized_program in
autoconf*)
echo "You should only need it if you modified 'configure.ac',"
echo "or m4 files included by it."
program_details 'autoconf'
;;
autoheader*)
echo "You should only need it if you modified 'acconfig.h' or"
echo "$configure_deps."
program_details 'autoheader'
;;
automake*)
echo "You should only need it if you modified 'Makefile.am' or"
echo "$configure_deps."
program_details 'automake'
;;
aclocal*)
echo "You should only need it if you modified 'acinclude.m4' or"
echo "$configure_deps."
program_details 'aclocal'
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
lex*|flex*)
echo "You should only need it if you modified a '.l' file."
echo "You may want to install the Fast Lexical Analyzer package:"
echo "<$flex_URL>"
;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
echo "You might want to install the Texinfo package:"
echo "<$gnu_software_URL/texinfo/>"
echo "The spurious makeinfo call might also be the consequence of"
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
echo "often tells you about the needed prerequisites for installing"
echo "this package. You may also peek at any GNU archive site, in"
echo "case some other package contains this missing '$1' program."
;;
esac
}
give_advice "$1" | sed -e '1s/^/WARNING: /' \
-e '2,$s/^/ /' >&2
# Propagate the correct exit status (expected to be 127 for a program
# not found, 63 for a program that failed due to version mismatch).
exit $st
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
+150
View File
@@ -0,0 +1,150 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2005-02-02.21
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
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
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
+120
View File
@@ -0,0 +1,120 @@
#! /bin/sh
# Output a system dependent linker command for putting a relocatable library
# search path into an executable.
#
# Copyright 2003-2022 Free Software Foundation, Inc.
# Written by Bruno Haible <bruno@clisp.org>, 2003.
#
# 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 3 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, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variable LD should be set by the caller.
#
# The second argument is a colon separated list of directories that contain
# the libraries at installation time.
#
# The third argument is the directory into which the executable is going to be
# installed.
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
library_path_value=$2
installdir=$3
# Verify that installdir is absolute.
case "$installdir" in
/*) ;;
*)
echo "installdir is not absolute: $installdir" 1>&2
exit 1
;;
esac
origin_token=
case "$host_os" in
linux* | gnu* | kfreebsd* | \
freebsd* | dragonfly* | midnightbsd* | \
netbsd* | \
openbsd* | \
solaris* | \
haiku*)
origin_token='$ORIGIN'
;;
darwin*)
origin_token='@loader_path'
;;
esac
if test -n "$origin_token"; then
# We are not on AIX, HP-UX, or IRIX. Therefore the -rpath options are
# cumulative.
rpath_options=
save_IFS="$IFS"; IFS=":"
for dir in $library_path_value; do
IFS="$save_IFS"
case "$dir" in
/*)
# Make dir relative to installdir. (Works only if dir is absolute.)
idir="$installdir"
while true; do
dfirst=`echo "$dir" | sed -n -e 's,^//*\([^/]*\).*$,/\1,p'`
ifirst=`echo "$idir" | sed -n -e 's,^//*\([^/]*\).*$,/\1,p'`
if test -z "$dfirst" || test -z "$ifirst"; then
break
fi
if test "$dfirst" != "$ifirst"; then
break
fi
dir=`echo "$dir" | sed -e 's,^//*[^/]*,,'`
idir=`echo "$idir" | sed -e 's,^//*[^/]*,,'`
done
dir="$origin_token"`echo "$idir" | sed -e 's,//*[^/]*,/..,g'`"$dir"
# Augment rpath_options with dir.
rpath_options="${rpath_options}${rpath_options:+ }-Wl,-rpath,$dir"
;;
*)
if test -n "$dir"; then
echo "libdir is not absolute: $dir" 1>&2
fi
;;
esac
done
IFS="$save_IFS"
# Output it.
if test -n "$rpath_options"; then
case "$host_os" in
# At least some versions of FreeBSD, DragonFly, and OpenBSD need the
# linker option "-z origin". See <https://lekensteyn.nl/rpath.html>.
freebsd* | dragonfly* | openbsd*)
rpath_options="-Wl,-z,origin $rpath_options" ;;
esac
echo "$rpath_options"
fi
else
echo "relocation via rpath not supported on this system: $host" 1>&2
exit 1
fi
exit 0
+1465
View File
File diff suppressed because it is too large Load Diff
Vendored Executable
+33549
View File
File diff suppressed because it is too large Load Diff
+214
View File
@@ -0,0 +1,214 @@
dnl Copyright (C) 1999-2011, 2016, 2018-2022 Free Software Foundation, Inc.
dnl This file is part of the GNU LIBICONV Library.
dnl
dnl The GNU LIBICONV Library is free software; you can redistribute it
dnl and/or modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either version 2.1
dnl of the License, or (at your option) any later version.
dnl
dnl The GNU LIBICONV Library is distributed in the hope that it will be
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with the GNU LIBICONV Library; see the file COPYING.LIB.
dnl If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.64])
AC_INIT([libiconv], [1.17])
AC_CONFIG_SRCDIR([lib/iconv.c])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h lib/config.h])
AC_PROG_MAKE_SET
dnl checks for basic programs
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PATH_PROG([STRIP], [strip], [:]) dnl sets STRIP
AM_PROG_INSTALL_STRIP dnl overrides STRIP when cross-compiling,
dnl sets INSTALL_STRIP_PROGRAM
dnl check for host type
AC_CANONICAL_HOST
dnl hack
dnl Hack to work around limitations of automake and error.m4 regarding LIBOBJS.
dnl "srclib/Makefile.am:32: automatically discovered file `error.h' should not be explicitly mentioned"
AC_DEFUN([my_SRCLIB_OBJ],[SRCLIBOBJS="$SRCLIBOBJS $1.$ac_objext"])
AC_DEFUN([my_SRCLIB_REPLACE_FUNCS], [AC_CHECK_FUNCS([$1], , [my_SRCLIB_OBJ($ac_func)])])
m4_pushdef([AC_LIBOBJ], m4_defn([my_SRCLIB_OBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([my_SRCLIB_REPLACE_FUNCS]))
dnl checks for UNIX variants that set DEFS
gl_EARLY
dnl checks for build configuration
LT_INIT([disable-static win32-dll])
gl_RELOCATABLE
AC_ARG_ENABLE([extra-encodings],
[AS_HELP_STRING([--enable-extra-encodings],
[add support for a few rarely used encodings])],
[AC_DEFINE([ENABLE_EXTRA], 1,
[Define to 1 to enable a few rarely used encodings.])
USE_EXTRA_ENCODINGS=yes],
[USE_EXTRA_ENCODINGS=no])
AC_SUBST([USE_EXTRA_ENCODINGS])
dnl checks for programs
CL_PROG_CP
CL_PROG_LN
AC_PROG_LN_S
dnl checks for compiler output filename suffixes
AC_OBJEXT
AC_EXEEXT
dnl checks for build configuration
dnl Prepares the libtool configuration for handling of Windows resources, and
dnl sets the RC variable to a program that compiles Windows resource files.
LT_LANG([Windows Resource])
dnl On mingw and Cygwin, we can activate special Makefile rules which add
dnl version information to the executables.
case "$host_os" in
mingw* | cygwin*) is_woe32=yes ;;
*) is_woe32=no ;;
esac
WOE32=$is_woe32
AC_SUBST([WOE32])
if test $WOE32 = yes; then
dnl Check for a program that compiles Windows resource files.
AC_CHECK_TOOL([WINDRES], [windres])
fi
gl_VISIBILITY
AM_ICONV
AM_GNU_GETTEXT([external], [need-ngettext])
dnl checks for typedefs
AC_TYPE_MBSTATE_T
gt_TYPE_WCHAR_T
dnl checks for header files, functions and declarations
if test "$am_cv_func_iconv" = yes -a -n "$iconv_arg1"; then
ICONV_CONST="const"
else
ICONV_CONST=""
fi
AC_SUBST([ICONV_CONST])
if test $gt_cv_c_wchar_t = yes; then
HAVE_WCHAR_T=1
else
HAVE_WCHAR_T=0
fi
AC_SUBST([HAVE_WCHAR_T])
AC_CHECK_FUNCS([getc_unlocked mbrtowc wcrtomb mbsinit setlocale])
dnl mbstate_t is used if HAVE_WCRTOMB || HAVE_MBRTOWC, see lib/loop_wchar.h.
if test $ac_cv_func_wcrtomb = yes || test $ac_cv_func_mbrtowc = yes; then
USE_MBSTATE_T=1
else
USE_MBSTATE_T=0
fi
AC_SUBST([USE_MBSTATE_T])
AC_CACHE_CHECK([whether <wchar.h> is standalone],
[gl_cv_header_wchar_h_standalone],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <wchar.h>
wchar_t w;]],
[[]])],
[gl_cv_header_wchar_h_standalone=yes],
[gl_cv_header_wchar_h_standalone=no])])
if test $gl_cv_header_wchar_h_standalone = yes; then
BROKEN_WCHAR_H=0
else
BROKEN_WCHAR_H=1
fi
AC_SUBST([BROKEN_WCHAR_H])
AC_REPLACE_FUNCS([memmove])
AM_LANGINFO_CODESET
gl_FCNTL_O_FLAGS
AC_EILSEQ
AC_C_BIGENDIAN([],
[AC_DEFINE([WORDS_LITTLEENDIAN], [1],
[Define if the machine's byte ordering is little endian.])
])
gl_INIT
dnl hack
dnl End of hack to work around limitations of automake and error.m4.
m4_popdef([AC_REPLACE_FUNCS])
m4_popdef([AC_LIBOBJ])
AC_SUBST([SRCLIBOBJS])
dnl Compilation on mingw and Cygwin needs special Makefile rules, because
dnl 1. when we install a shared library, we must arrange to export
dnl auxiliary pointer variables for every exported variable,
dnl 2. when we install a shared library and a static library simultaneously,
dnl the include file specifies __declspec(dllimport) and therefore we
dnl must arrange to define the auxiliary pointer variables for the
dnl exported variables _also_ in the static library.
if test "$enable_shared" = yes; then
case "$host_os" in
mingw* | cygwin*) is_woe32dll=yes ;;
*) is_woe32dll=no ;;
esac
else
is_woe32dll=no
fi
WOE32DLL=$is_woe32dll
AC_SUBST([WOE32DLL])
if test $is_woe32dll = yes; then
DLL_VARIABLE='__declspec (dllimport)'
else
DLL_VARIABLE=
fi
AC_SUBST([DLL_VARIABLE])
AH_BOTTOM([
/* On Windows, variables that may be in a DLL must be marked specially. */
#if defined _MSC_VER && defined _DLL
# define DLL_VARIABLE __declspec (dllimport)
#else
# define DLL_VARIABLE
#endif
])
AC_CONFIG_SUBDIRS([libcharset])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([lib/Makefile])
AC_CONFIG_FILES([srclib/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_CONFIG_FILES([man/Makefile])
if test -d "${srcdir}/tests"; then
AC_CONFIG_FILES([tests/Makefile])
fi
AC_CONFIG_FILES([include/iconv.h:include/iconv.h.build.in])
AC_CONFIG_FILES([include/iconv.h.inst:include/iconv.h.in])
AC_OUTPUT
+61
View File
@@ -0,0 +1,61 @@
@node Enabling Relocatability
@section Enabling Relocatability
It has been a pain for many users of GNU packages for a long time that
packages are not relocatable. It means a user cannot copy a program,
installed by another user on the same machine, to his home directory,
and have it work correctly (including i18n). So many users need to go
through @code{configure; make; make install} with all its
dependencies, options, and hurdles.
Most package management systems, that allow the user to install
pre-built binaries of the packages, solve the ``ease of
installation'' problem, but they hardwire path names, usually to
@file{/usr} or @file{/usr/local}. This means that users need root
privileges to install a binary package, and prevents installing two
different versions of the same binary package.
A relocatable program can be moved or copied to a different location
on the file system. It is possible to make symlinks to the installed
and moved programs, and invoke them through the symlink. It is
possible to do the same thing with a hard link @emph{only} if the hard
link file is in the same directory as the real program.
To configure a program to be relocatable, add
@option{--enable-relocatable} to the @command{configure} command line.
On some OSes the executables remember the location of shared libraries
and prefer them over any other search path. Therefore, such an
executable will look for its shared libraries first in the original
installation directory and only then in the current installation
directory. Thus, for reliability, it is best to also give a
@option{--prefix} option pointing to a directory that does not exist
now and which never will be created, e.g.@:
@option{--prefix=/nonexistent}. You may use
@code{DESTDIR=@var{dest-dir}} on the @command{make} command line to
avoid installing into that directory.
We do not recommend using a prefix writable by unprivileged users
(e.g.@: @file{/tmp/inst$$}) because such a directory can be recreated
by an unprivileged user after the original directory has been removed.
We also do not recommend prefixes that might be behind an automounter
(e.g.@: @file{$HOME/inst$$}) because of the performance impact of
directory searching.
Here's a sample installation run that takes into account all these
recommendations:
@example
./configure --enable-relocatable --prefix=/nonexistent
make
make install DESTDIR=/tmp/inst$$
@end example
Installation with @option{--enable-relocatable} will not work for
setuid or setgid executables, because such executables search only
system library paths for security reasons.
The runtime penalty and size penalty are negligible on GNU/Linux (just
one system call more when an executable is launched), and small on
other systems (the wrapper program just sets an environment variable
and executes the real program).
+70
View File
@@ -0,0 +1,70 @@
2011-06-04 Bruno Haible <bruno@clisp.org>
* iconv_string.c (iconv_string): Treat incomplete byte sequence like
invalid byte sequence.
Reported by shosas at <https://savannah.gnu.org/bugs/?32399>.
2003-05-10 Bruno Haible <bruno@clisp.org>
* iconv_string.c (iconv_string): Don't return -1 just because the
string is longer than 4 KB.
2002-02-13 Bruno Haible <bruno@clisp.org>
* iconv.m4: Remove file. Obsoleted by m4/iconv.m4.
2000-06-16 Bruno Haible <haible@clisp.cons.org>
* iconv.m4: Change prefix to AM.
2001-05-23 Bruno Haible <haible@clisp.cons.org>
* iconv.m4 (jm_ICONV): Accept --with-libiconv-prefix option.
2001-03-23 Bruno Haible <haible@clisp.cons.org>
* iconv.m4 (jm_ICONV): Tweak printing of prototype.
2001-03-20 Bruno Haible <haible@clisp.cons.org>
* iconv.m4 (jm_ICONV): Recommend GNU libiconv.
2001-01-03 Bruno Haible <haible@clisp.cons.org>
* iconv.m4 (jm_ICONV): Also check whether the iconv declaration
has const.
2000-02-02 Bruno Haible <haible@clisp.cons.org>
* iconv.m4: New file.
2001-01-29 Bruno Haible <haible@clisp.cons.org>
* locale_charset.c: Remove file. Obsoleted by libcharset.
2000-10-22 Bruno Haible <haible@clisp.cons.org>
* locale_charset.c (get_locale_charset): Accept french and spanish
names in both ISO-8859-1 and UTF-8.
2000-08-24 Jim Blackson <blackson@ontrack-japan.com>
* iconv_string.c (iconv_string): Fix return value for autodetect.
2000-01-24 Bruno Haible <haible@clisp.cons.org>
* iconv_string.c (iconv_string): Stop recognizing JOHAB.
Fix typo for EUC-JP.
1999-12-18 Bruno Haible <haible@clisp.cons.org>
* locale_charset.c (get_locale_charset): Recognize more language codes:
"af" (afrikaans), "ca" (catalan), "eu" (basque), "fo" (faeroese),
"ga" (irish), "gd" (scottish), "gl" (galician), "sq" (albanian),
"eo" (esperanto), "mt" (maltese), "be" (byelorussian),
"et" (estonian), "lt" (lithuanian), "lv" (latvian), "uk" (ukrainian).
Recognize more aliases: "english", "slovenian", "macedonian",
"serbian", "arabic".
Change default: KOI8-R for "ru" (russian) instead of ISO-8859-5,
ISO-8859-5 for "sr" instead of ISO-8859-2.
+150
View File
@@ -0,0 +1,150 @@
/* Copyright (C) 1999-2001, 2003, 2011 Bruno Haible.
This file is not part of the GNU LIBICONV Library.
This file is put into the public domain. */
#include "iconv_string.h"
#include <iconv.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#define tmpbufsize 4096
int iconv_string (const char* tocode, const char* fromcode,
const char* start, const char* end,
char** resultp, size_t* lengthp)
{
iconv_t cd = iconv_open(tocode,fromcode);
size_t length;
char* result;
if (cd == (iconv_t)(-1)) {
if (errno != EINVAL)
return -1;
/* Unsupported fromcode or tocode. Check whether the caller requested
autodetection. */
if (!strcmp(fromcode,"autodetect_utf8")) {
int ret;
/* Try UTF-8 first. There are very few ISO-8859-1 inputs that would
be valid UTF-8, but many UTF-8 inputs are valid ISO-8859-1. */
ret = iconv_string(tocode,"UTF-8",start,end,resultp,lengthp);
if (!(ret < 0 && errno == EILSEQ))
return ret;
ret = iconv_string(tocode,"ISO-8859-1",start,end,resultp,lengthp);
return ret;
}
if (!strcmp(fromcode,"autodetect_jp")) {
int ret;
/* Try 7-bit encoding first. If the input contains bytes >= 0x80,
it will fail. */
ret = iconv_string(tocode,"ISO-2022-JP-2",start,end,resultp,lengthp);
if (!(ret < 0 && errno == EILSEQ))
return ret;
/* Try EUC-JP next. Short SHIFT_JIS inputs may come out wrong. This
is unavoidable. People will condemn SHIFT_JIS.
If we tried SHIFT_JIS first, then some short EUC-JP inputs would
come out wrong, and people would condemn EUC-JP and Unix, which
would not be good. */
ret = iconv_string(tocode,"EUC-JP",start,end,resultp,lengthp);
if (!(ret < 0 && errno == EILSEQ))
return ret;
/* Finally try SHIFT_JIS. */
ret = iconv_string(tocode,"SHIFT_JIS",start,end,resultp,lengthp);
return ret;
}
if (!strcmp(fromcode,"autodetect_kr")) {
int ret;
/* Try 7-bit encoding first. If the input contains bytes >= 0x80,
it will fail. */
ret = iconv_string(tocode,"ISO-2022-KR",start,end,resultp,lengthp);
if (!(ret < 0 && errno == EILSEQ))
return ret;
/* Finally try EUC-KR. */
ret = iconv_string(tocode,"EUC-KR",start,end,resultp,lengthp);
return ret;
}
errno = EINVAL;
return -1;
}
/* Determine the length we need. */
{
size_t count = 0;
char tmpbuf[tmpbufsize];
const char* inptr = start;
size_t insize = end-start;
while (insize > 0) {
char* outptr = tmpbuf;
size_t outsize = tmpbufsize;
size_t res = iconv(cd,&inptr,&insize,&outptr,&outsize);
if (res == (size_t)(-1) && errno != E2BIG) {
int saved_errno = (errno == EINVAL ? EILSEQ : errno);
iconv_close(cd);
errno = saved_errno;
return -1;
}
count += outptr-tmpbuf;
}
{
char* outptr = tmpbuf;
size_t outsize = tmpbufsize;
size_t res = iconv(cd,NULL,NULL,&outptr,&outsize);
if (res == (size_t)(-1)) {
int saved_errno = errno;
iconv_close(cd);
errno = saved_errno;
return -1;
}
count += outptr-tmpbuf;
}
length = count;
}
if (lengthp != NULL)
*lengthp = length;
if (resultp == NULL) {
iconv_close(cd);
return 0;
}
result = (*resultp == NULL ? malloc(length) : realloc(*resultp,length));
*resultp = result;
if (length == 0) {
iconv_close(cd);
return 0;
}
if (result == NULL) {
iconv_close(cd);
errno = ENOMEM;
return -1;
}
iconv(cd,NULL,NULL,NULL,NULL); /* return to the initial state */
/* Do the conversion for real. */
{
const char* inptr = start;
size_t insize = end-start;
char* outptr = result;
size_t outsize = length;
while (insize > 0) {
size_t res = iconv(cd,&inptr,&insize,&outptr,&outsize);
if (res == (size_t)(-1)) {
if (errno == EINVAL)
break;
else {
int saved_errno = errno;
iconv_close(cd);
errno = saved_errno;
return -1;
}
}
}
{
size_t res = iconv(cd,NULL,NULL,&outptr,&outsize);
if (res == (size_t)(-1)) {
int saved_errno = errno;
iconv_close(cd);
errno = saved_errno;
return -1;
}
}
if (outsize != 0) abort();
}
iconv_close(cd);
return 0;
}
+47
View File
@@ -0,0 +1,47 @@
/* Copyright (C) 1999-2001 Bruno Haible.
This file is not part of the GNU LIBICONV Library.
This file is put into the public domain. */
/*
* This C function converts an entire string from one encoding to another,
* using iconv. Easier to use than iconv() itself, and supports autodetect
* encodings on input.
*
* int iconv_string (const char* tocode, const char* fromcode,
* const char* start, const char* end,
* char** resultp, size_t* lengthp)
*
* Converts a memory region given in encoding FROMCODE to a new memory
* region in encoding TOCODE. FROMCODE and TOCODE are as for iconv_open(3),
* except that FROMCODE may be one of the values
* "autodetect_utf8" supports ISO-8859-1 and UTF-8
* "autodetect_jp" supports EUC-JP, ISO-2022-JP-2 and SHIFT_JIS
* "autodetect_kr" supports EUC-KR and ISO-2022-KR
* The input is in the memory region between start (inclusive) and end
* (exclusive). If resultp is not NULL, the output string is stored in
* *resultp; malloc/realloc is used to allocate the result.
*
* This function does not treat zero characters specially.
*
* Return value: 0 if successful, otherwise -1 and errno set. Particular
* errno values: EILSEQ and ENOMEM.
*
* Example:
* const char* s = ...;
* char* result = NULL;
* if (iconv_string("UCS-4-INTERNAL", "autodetect_utf8",
* s, s+strlen(s)+1, &result, NULL) < 0)
* perror("iconv_string");
*
*/
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
extern int iconv_string (const char* tocode, const char* fromcode, const char* start, const char* end, char** resultp, size_t* lengthp);
#ifdef __cplusplus
}
#endif
+68
View File
@@ -0,0 +1,68 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2007 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* When this file is included, it may be preceded only by preprocessor
declarations. Thanks to AIX. Therefore we include it right after
"config.h", not later. */
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
means there is a real alloca function. */
#ifndef _GL_ALLOCA_H
#define _GL_ALLOCA_H
/* alloca(N) returns a pointer (void* or char*) to N bytes of memory
allocated on the stack, and which will last until the function returns.
Use of alloca should be avoided:
- inside arguments of function calls - undefined behaviour,
- in inline functions - the allocation may actually last until the
calling function returns,
- for huge N (say, N >= 65536) - you never know how large (or small)
the stack is, and when the stack cannot fulfill the memory allocation
request, the program just crashes.
*/
#ifndef alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# else
# ifdef _MSC_VER
# include <malloc.h>
# define alloca _alloca
# else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifdef __hpux /* This section must match that of bison generated files. */
# ifdef __cplusplus
extern "C" void *alloca (unsigned int);
# else /* not __cplusplus */
extern void *alloca ();
# endif /* not __cplusplus */
# else /* not __hpux */
# ifndef alloca
extern char *alloca ();
# endif
# endif /* __hpux */
# endif
# endif
# endif
# endif
#endif
#endif /* _GL_ALLOCA_H */
+33
View File
@@ -0,0 +1,33 @@
*** gnulib/lib/error.h 2005-05-14 08:03:58.000000000 +0200
--- srclib/error.h 2005-05-20 23:06:02.000000000 +0200
***************
*** 50,63 ****
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
! extern void (*error_print_progname) (void);
/* This variable is incremented each time 'error' is called. */
! extern unsigned int error_message_count;
/* Sometimes we want to have at most one error per line. This
variable controls whether this mode is selected or not. */
! extern int error_one_per_line;
#ifdef __cplusplus
}
--- 50,63 ----
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
! extern DLL_VARIABLE void (*error_print_progname) (void);
/* This variable is incremented each time 'error' is called. */
! extern DLL_VARIABLE unsigned int error_message_count;
/* Sometimes we want to have at most one error per line. This
variable controls whether this mode is selected or not. */
! extern DLL_VARIABLE int error_one_per_line;
#ifdef __cplusplus
}
+19
View File
@@ -0,0 +1,19 @@
*** gnulib/lib/progname.h 2005-05-14 08:03:58.000000000 +0200
--- srclib/progname.h 2005-05-20 23:06:02.000000000 +0200
***************
*** 30,36 ****
/* String containing name the program is called with. */
! extern const char *program_name;
/* Set program_name, based on argv[0]. */
extern void set_program_name (const char *argv0);
--- 30,36 ----
/* String containing name the program is called with. */
! extern DLL_VARIABLE const char *program_name;
/* Set program_name, based on argv[0]. */
extern void set_program_name (const char *argv0);
+158
View File
@@ -0,0 +1,158 @@
/* malloc with out of memory checking.
Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
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 3 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, see <https://www.gnu.org/licenses/>. */
#ifndef _XALLOC_H
#define _XALLOC_H
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Defined in xmalloc.c. */
/* Allocate SIZE bytes of memory dynamically, with error checking. */
extern void *xmalloc (size_t size);
/* Allocate memory for NMEMB elements of SIZE bytes, with error checking.
SIZE must be > 0. */
extern void *xnmalloc (size_t nmemb, size_t size);
/* Allocate SIZE bytes of memory dynamically, with error checking,
and zero it. */
extern void *xzalloc (size_t size);
/* Allocate memory for NMEMB elements of SIZE bytes, with error checking,
and zero it. */
extern void *xcalloc (size_t nmemb, size_t size);
/* Change the size of an allocated block of memory PTR to SIZE bytes,
with error checking. If PTR is NULL, run xmalloc. */
extern void *xrealloc (void *ptr, size_t size);
#ifdef __cplusplus
}
template <typename T>
inline T * xrealloc (T * ptr, size_t size)
{
return (T *) xrealloc ((void *) ptr, size);
}
extern "C" {
#endif
/* This function is always triggered when memory is exhausted. It is
in charge of honoring the three previous items. This is the
function to call when one wants the program to die because of a
memory allocation failure. */
extern void xalloc_die (void)
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) && !__STRICT_ANSI__
__attribute__ ((__noreturn__))
#endif
;
/* In the following macros, T must be an elementary or structure/union or
typedef'ed type, or a pointer to such a type. To apply one of the
following macros to a function pointer or array type, you need to typedef
it first and use the typedef name. */
/* Allocate an object of type T dynamically, with error checking. */
/* extern T *XMALLOC (typename T); */
#define XMALLOC(T) \
((T *) xmalloc (sizeof (T)))
/* Allocate memory for NMEMB elements of type T, with error checking. */
/* extern T *XNMALLOC (size_t nmemb, typename T); */
#if HAVE_INLINE
/* xnmalloc performs a division and multiplication by sizeof (T). Arrange to
perform the division at compile-time and the multiplication with a factor
known at compile-time. */
# define XNMALLOC(N,T) \
((T *) (sizeof (T) == 1 \
? xmalloc (N) \
: xnboundedmalloc(N, (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / sizeof (T), sizeof (T))))
static inline void *
xnboundedmalloc (size_t n, size_t bound, size_t s)
{
if (n > bound)
xalloc_die ();
return xmalloc (n * s);
}
#else
# define XNMALLOC(N,T) \
((T *) (sizeof (T) == 1 ? xmalloc (N) : xnmalloc (N, sizeof (T))))
#endif
/* Allocate an object of type T dynamically, with error checking,
and zero it. */
/* extern T *XZALLOC (typename T); */
#define XZALLOC(T) \
((T *) xzalloc (sizeof (T)))
/* Allocate memory for NMEMB elements of type T, with error checking,
and zero it. */
/* extern T *XCALLOC (size_t nmemb, typename T); */
#define XCALLOC(N,T) \
((T *) xcalloc (N, sizeof (T)))
/* Return a pointer to a new buffer of N bytes. This is like xmalloc,
except it returns char *. */
#define xcharalloc(N) \
XNMALLOC (N, char)
/* Defined in xstrdup.c. */
/* Return a newly allocated copy of the N bytes of memory starting at P. */
extern void *xmemdup (const void *p, size_t n);
#ifdef __cplusplus
}
template <typename T>
inline T * xmemdup (const T * p, size_t n)
{
return (T *) xmemdup ((const void *) p, n);
}
extern "C" {
#endif
/* Return a newly allocated copy of STRING. */
extern char *xstrdup (const char *string);
/* Return 1 if an array of N objects, each of size S, cannot exist due
to size arithmetic overflow. S must be positive and N must be
nonnegative. This is a macro, not an inline function, so that it
works correctly even when SIZE_MAX < N.
By gnulib convention, SIZE_MAX represents overflow in size
calculations, so the conservative dividend to use here is
SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
However, malloc (SIZE_MAX) fails on all known hosts where
sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
exactly-SIZE_MAX allocations on such hosts; this avoids a test and
branch when S is known to be 1. */
# define xalloc_oversized(n, s) \
((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
#ifdef __cplusplus
}
#endif
#endif /* _XALLOC_H */
+128
View File
@@ -0,0 +1,128 @@
/* xmalloc.c -- malloc with out of memory checking
Copyright (C) 1990-1996, 2000-2003, 2005-2007 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 3 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, see <https://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include "xalloc.h"
#include <stdlib.h>
#include "error.h"
#include "gettext.h"
#define _(str) gettext (str)
/* Exit value when the requested amount of memory is not available.
The caller may set it to some other value. */
int xmalloc_exit_failure = EXIT_FAILURE;
void
xalloc_die ()
{
error (xmalloc_exit_failure, 0, _("memory exhausted"));
/* _Noreturn cannot be given to error, since it may return if
its first argument is 0. To help compilers understand the
xalloc_die does terminate, call exit. */
exit (EXIT_FAILURE);
}
static void *
fixup_null_alloc (size_t n)
{
void *p;
p = NULL;
if (n == 0)
p = malloc ((size_t) 1);
if (p == NULL)
xalloc_die ();
return p;
}
/* Allocate N bytes of memory dynamically, with error checking. */
void *
xmalloc (size_t n)
{
void *p;
p = malloc (n);
if (p == NULL)
p = fixup_null_alloc (n);
return p;
}
/* Allocate memory for NMEMB elements of SIZE bytes, with error checking.
SIZE must be > 0. */
void *
xnmalloc (size_t nmemb, size_t size)
{
size_t n;
void *p;
if (xalloc_oversized (nmemb, size))
xalloc_die ();
n = nmemb * size;
p = malloc (n);
if (p == NULL)
p = fixup_null_alloc (n);
return p;
}
/* Allocate SIZE bytes of memory dynamically, with error checking,
and zero it. */
void *
xzalloc (size_t size)
{
void *p;
p = xmalloc (size);
memset (p, 0, size);
return p;
}
/* Allocate memory for N elements of S bytes, with error checking,
and zero it. */
void *
xcalloc (size_t n, size_t s)
{
void *p;
p = calloc (n, s);
if (p == NULL)
p = fixup_null_alloc (n);
return p;
}
/* Change the size of an allocated block of memory P to N bytes,
with error checking.
If P is NULL, run xmalloc. */
void *
xrealloc (void *p, size_t n)
{
if (p == NULL)
return xmalloc (n);
p = realloc (p, n);
if (p == NULL)
p = fixup_null_alloc (n);
return p;
}
+40
View File
@@ -0,0 +1,40 @@
/* xstrdup.c -- copy a string with out of memory checking
Copyright (C) 1990, 1996, 2000-2003, 2005-2006 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 3 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, see <https://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include "xalloc.h"
#include <string.h>
/* Return a newly allocated copy of the N bytes of memory starting at P. */
void *
xmemdup (const void *p, size_t n)
{
void *q = xmalloc (n);
memcpy (q, p, n);
return q;
}
/* Return a newly allocated copy of STRING. */
char *
xstrdup (const char *string)
{
return strcpy (XNMALLOC (strlen (string) + 1, char), string);
}
+34
View File
@@ -0,0 +1,34 @@
# alloca.m4 serial 5
dnl Copyright (C) 2002-2003, 2006, 2011, 2021-2022 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_ALLOCA],
[
dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
AC_REQUIRE([AC_PROG_CPP])
AC_REQUIRE([AC_PROG_EGREP])
AC_REQUIRE([AC_FUNC_ALLOCA])
if test $ac_cv_func_alloca_works = no; then
gl_PREREQ_ALLOCA
fi
# Define an additional variable used in the Makefile substitution.
AC_EGREP_CPP([Need own alloca], [
#if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H
Need own alloca
#endif
],
[GL_GENERATE_ALLOCA_H=true],
[GL_GENERATE_ALLOCA_H=false])
])
# Prerequisites of lib/alloca.c.
# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
AC_DEFUN([gl_PREREQ_ALLOCA], [
AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
:
])
+20
View File
@@ -0,0 +1,20 @@
Description:
Files:
Depends-on:
configure.ac:
Makefile.am:
# Parametrization of the 'relocatable' module.
AM_CPPFLAGS += -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1
Include:
License:
GPL
Maintainer:
Bruno Haible
+21
View File
@@ -0,0 +1,21 @@
Description:
mbstate_t type.
Files:
m4/mbstate_t.m4
Depends-on:
configure.ac:
AC_TYPE_MBSTATE_T
Makefile.am:
Include:
License:
LGPLv2+
Maintainer:
Bruno Haible
+23
View File
@@ -0,0 +1,23 @@
Description:
Memory allocation with out-of-memory checking.
Files:
lib/xalloc.h
lib/xmalloc.c
lib/xstrdup.c
Depends-on:
configure.ac:
Makefile.am:
lib_SOURCES += xalloc.h xmalloc.c xstrdup.c
Include:
"xalloc.h"
License:
GPL
Maintainer:
all
+8
View File
@@ -0,0 +1,8 @@
#if @HAVE_VISIBILITY@ && BUILDING_LIBICONV
#define LIBICONV_DLL_EXPORTED __attribute__((__visibility__("default")))
#elif defined _MSC_VER && BUILDING_LIBICONV
#define LIBICONV_DLL_EXPORTED __declspec(dllexport)
#else
#define LIBICONV_DLL_EXPORTED
#endif
+249
View File
@@ -0,0 +1,249 @@
/* Copyright (C) 1999-2022 Free Software Foundation, Inc.
This file is part of the GNU LIBICONV Library.
The GNU LIBICONV Library is free software; you can redistribute it
and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
The GNU LIBICONV Library is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU LIBICONV Library; see the file COPYING.LIB.
If not, see <https://www.gnu.org/licenses/>. */
/* When installed, this file is called "iconv.h". */
#ifndef _LIBICONV_H
#define _LIBICONV_H
#define _LIBICONV_VERSION 0x0111 /* version number: (major<<8) + minor */
#if @HAVE_VISIBILITY@ && BUILDING_LIBICONV
#define LIBICONV_DLL_EXPORTED __attribute__((__visibility__("default")))
#elif defined _MSC_VER && BUILDING_LIBICONV
#define LIBICONV_DLL_EXPORTED __declspec(dllexport)
#else
#define LIBICONV_DLL_EXPORTED
#endif
extern LIBICONV_DLL_EXPORTED @DLL_VARIABLE@ int _libiconv_version; /* Likewise */
/* We would like to #include any system header file which could define
iconv_t, 1. in order to eliminate the risk that the user gets compilation
errors because some other system header file includes /usr/include/iconv.h
which defines iconv_t or declares iconv after this file, 2. when compiling
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
binary compatible code.
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
has been installed in /usr/local/include, there is no way any more to
include the original /usr/include/iconv.h. We simply have to get away
without it.
Ad 1. The risk that a system header file does
#include "iconv.h" or #include_next "iconv.h"
is small. They all do #include <iconv.h>.
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
has to be a scalar type because (iconv_t)(-1) is a possible return value
from iconv_open().) */
/* Define iconv_t ourselves. */
#undef iconv_t
#define iconv_t libiconv_t
typedef void* iconv_t;
/* Get size_t declaration.
Get wchar_t declaration if it exists. */
#include <stddef.h>
/* Get errno declaration and values. */
#include <errno.h>
/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
have EILSEQ in a different header. On these systems, define EILSEQ
ourselves. */
#ifndef EILSEQ
#define EILSEQ @EILSEQ@
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode. */
#ifndef LIBICONV_PLUG
#define iconv_open libiconv_open
#endif
extern LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode);
/* Converts, using conversion descriptor cd, at most *inbytesleft bytes
starting at *inbuf, writing at most *outbytesleft bytes starting at
*outbuf.
Decrements *inbytesleft and increments *inbuf by the same amount.
Decrements *outbytesleft and increments *outbuf by the same amount. */
#ifndef LIBICONV_PLUG
#define iconv libiconv
#endif
extern LIBICONV_DLL_EXPORTED size_t iconv (iconv_t cd, @ICONV_CONST@ char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
/* Frees resources allocated for conversion descriptor cd. */
#ifndef LIBICONV_PLUG
#define iconv_close libiconv_close
#endif
extern LIBICONV_DLL_EXPORTED int iconv_close (iconv_t cd);
#ifdef __cplusplus
}
#endif
#ifndef LIBICONV_PLUG
/* Nonstandard extensions. */
#if @USE_MBSTATE_T@
#if @BROKEN_WCHAR_H@
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#endif
#include <wchar.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* A type that holds all memory needed by a conversion descriptor.
A pointer to such an object can be used as an iconv_t. */
typedef struct {
void* dummy1[28];
#if @USE_MBSTATE_T@
mbstate_t dummy2;
#endif
} iconv_allocation_t;
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode into preallocated memory. Returns an error indicator
(0 or -1 with errno set). */
#define iconv_open_into libiconv_open_into
extern LIBICONV_DLL_EXPORTED int iconv_open_into (const char* tocode, const char* fromcode,
iconv_allocation_t* resultp);
/* Control of attributes. */
#define iconvctl libiconvctl
extern LIBICONV_DLL_EXPORTED int iconvctl (iconv_t cd, int request, void* argument);
/* Hook performed after every successful conversion of a Unicode character. */
typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
/* Hook performed after every successful conversion of a wide character. */
typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
/* Set of hooks. */
struct iconv_hooks {
iconv_unicode_char_hook uc_hook;
iconv_wide_char_hook wc_hook;
void* data;
};
/* Fallback function. Invoked when a small number of bytes could not be
converted to a Unicode character. This function should process all
bytes from inbuf and may produce replacement Unicode characters by calling
the write_replacement callback repeatedly. */
typedef void (*iconv_unicode_mb_to_uc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const unsigned int *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a Unicode character could not be converted
to the target encoding. This function should process the character and
may produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_unicode_uc_to_mb_fallback)
(unsigned int code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#if @HAVE_WCHAR_T@
/* Fallback function. Invoked when a number of bytes could not be converted to
a wide character. This function should process all bytes from inbuf and may
produce replacement wide characters by calling the write_replacement
callback repeatedly. */
typedef void (*iconv_wchar_mb_to_wc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const wchar_t *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a wide character could not be converted to
the target encoding. This function should process the character and may
produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_wchar_wc_to_mb_fallback)
(wchar_t code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#else
/* If the wchar_t type does not exist, these two fallback functions are never
invoked. Their argument list therefore does not matter. */
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
#endif
/* Set of fallbacks. */
struct iconv_fallbacks {
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
void* data;
};
/* Requests for iconvctl. */
#define ICONV_TRIVIALP 0 /* int *argument */
#define ICONV_GET_TRANSLITERATE 1 /* int *argument */
#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
#define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
/* Listing of locale independent encodings. */
#define iconvlist libiconvlist
extern LIBICONV_DLL_EXPORTED void iconvlist (int (*do_one) (unsigned int namescount,
const char * const * names,
void* data),
void* data);
/* Canonicalize an encoding name.
The result is either a canonical encoding name, or name itself. */
extern LIBICONV_DLL_EXPORTED const char * iconv_canonicalize (const char * name);
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
extern LIBICONV_DLL_EXPORTED void libiconv_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif
#endif /* _LIBICONV_H */
+241
View File
@@ -0,0 +1,241 @@
/* Copyright (C) 1999-2022 Free Software Foundation, Inc.
This file is part of the GNU LIBICONV Library.
The GNU LIBICONV Library is free software; you can redistribute it
and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
The GNU LIBICONV Library is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU LIBICONV Library; see the file COPYING.LIB.
If not, see <https://www.gnu.org/licenses/>. */
/* When installed, this file is called "iconv.h". */
#ifndef _LIBICONV_H
#define _LIBICONV_H
#define _LIBICONV_VERSION 0x0111 /* version number: (major<<8) + minor */
extern @DLL_VARIABLE@ int _libiconv_version; /* Likewise */
/* We would like to #include any system header file which could define
iconv_t, 1. in order to eliminate the risk that the user gets compilation
errors because some other system header file includes /usr/include/iconv.h
which defines iconv_t or declares iconv after this file, 2. when compiling
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
binary compatible code.
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
has been installed in /usr/local/include, there is no way any more to
include the original /usr/include/iconv.h. We simply have to get away
without it.
Ad 1. The risk that a system header file does
#include "iconv.h" or #include_next "iconv.h"
is small. They all do #include <iconv.h>.
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
has to be a scalar type because (iconv_t)(-1) is a possible return value
from iconv_open().) */
/* Define iconv_t ourselves. */
#undef iconv_t
#define iconv_t libiconv_t
typedef void* iconv_t;
/* Get size_t declaration.
Get wchar_t declaration if it exists. */
#include <stddef.h>
/* Get errno declaration and values. */
#include <errno.h>
/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
have EILSEQ in a different header. On these systems, define EILSEQ
ourselves. */
#ifndef EILSEQ
#define EILSEQ @EILSEQ@
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode. */
#ifndef LIBICONV_PLUG
#define iconv_open libiconv_open
#endif
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
/* Converts, using conversion descriptor cd, at most *inbytesleft bytes
starting at *inbuf, writing at most *outbytesleft bytes starting at
*outbuf.
Decrements *inbytesleft and increments *inbuf by the same amount.
Decrements *outbytesleft and increments *outbuf by the same amount. */
#ifndef LIBICONV_PLUG
#define iconv libiconv
#endif
extern size_t iconv (iconv_t cd, @ICONV_CONST@ char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
/* Frees resources allocated for conversion descriptor cd. */
#ifndef LIBICONV_PLUG
#define iconv_close libiconv_close
#endif
extern int iconv_close (iconv_t cd);
#ifdef __cplusplus
}
#endif
#ifndef LIBICONV_PLUG
/* Nonstandard extensions. */
#if @USE_MBSTATE_T@
#if @BROKEN_WCHAR_H@
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#endif
#include <wchar.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* A type that holds all memory needed by a conversion descriptor.
A pointer to such an object can be used as an iconv_t. */
typedef struct {
void* dummy1[28];
#if @USE_MBSTATE_T@
mbstate_t dummy2;
#endif
} iconv_allocation_t;
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode into preallocated memory. Returns an error indicator
(0 or -1 with errno set). */
#define iconv_open_into libiconv_open_into
extern int iconv_open_into (const char* tocode, const char* fromcode,
iconv_allocation_t* resultp);
/* Control of attributes. */
#define iconvctl libiconvctl
extern int iconvctl (iconv_t cd, int request, void* argument);
/* Hook performed after every successful conversion of a Unicode character. */
typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
/* Hook performed after every successful conversion of a wide character. */
typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
/* Set of hooks. */
struct iconv_hooks {
iconv_unicode_char_hook uc_hook;
iconv_wide_char_hook wc_hook;
void* data;
};
/* Fallback function. Invoked when a small number of bytes could not be
converted to a Unicode character. This function should process all
bytes from inbuf and may produce replacement Unicode characters by calling
the write_replacement callback repeatedly. */
typedef void (*iconv_unicode_mb_to_uc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const unsigned int *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a Unicode character could not be converted
to the target encoding. This function should process the character and
may produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_unicode_uc_to_mb_fallback)
(unsigned int code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#if @HAVE_WCHAR_T@
/* Fallback function. Invoked when a number of bytes could not be converted to
a wide character. This function should process all bytes from inbuf and may
produce replacement wide characters by calling the write_replacement
callback repeatedly. */
typedef void (*iconv_wchar_mb_to_wc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const wchar_t *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a wide character could not be converted to
the target encoding. This function should process the character and may
produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_wchar_wc_to_mb_fallback)
(wchar_t code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#else
/* If the wchar_t type does not exist, these two fallback functions are never
invoked. Their argument list therefore does not matter. */
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
#endif
/* Set of fallbacks. */
struct iconv_fallbacks {
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
void* data;
};
/* Requests for iconvctl. */
#define ICONV_TRIVIALP 0 /* int *argument */
#define ICONV_GET_TRANSLITERATE 1 /* int *argument */
#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
#define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
/* Listing of locale independent encodings. */
#define iconvlist libiconvlist
extern void iconvlist (int (*do_one) (unsigned int namescount,
const char * const * names,
void* data),
void* data);
/* Canonicalize an encoding name.
The result is either a canonical encoding name, or name itself. */
extern const char * iconv_canonicalize (const char * name);
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
extern void libiconv_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif
#endif /* _LIBICONV_H */
+434
View File
@@ -0,0 +1,434 @@
# Makefile for libiconv/lib
#### Start of system configuration section. ####
# Directories used by "make":
srcdir = @srcdir@
# Directories used by "make install":
prefix = @prefix@
local_prefix = /usr/local
exec_prefix = @exec_prefix@
libdir = @libdir@
# Programs used by "make":
CC = @CC@
CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@ $(LDFLAGS_@WOE32DLL@)
LDFLAGS_yes = -Wl,--export-all-symbols
LDFLAGS_no =
INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include -I.. -I$(srcdir)/..
# -DBUILDING_LIBICONV: Change expansion of LIBICONV_DLL_EXPORTED macro.
# -DBUILDING_LIBCHARSET: Change expansion of LIBCHARSET_DLL_EXPORTED macro in
# localcharset.h.
# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
DEFS = \
-DLIBDIR=\"$(libdir)\" \
-DBUILDING_LIBICONV -DBUILDING_LIBCHARSET -DBUILDING_DLL \
-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
-Dset_relocation_prefix=libiconv_set_relocation_prefix \
-Drelocate=libiconv_relocate \
-Drelocate2=libiconv_relocate2 @DEFS@
LIBTOOL = @LIBTOOL@
LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
LIBTOOL_LINK = $(LIBTOOL) --mode=link
LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
AR = @AR@
# Windows resource compiler (windres). Used via libtool.
RC = @RC@
CP = cp
MV = mv
LN = @LN@
LN_S = @LN_S@
RM = rm -f
# Programs used by "make install":
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
mkinstalldirs = $(SHELL) @top_srcdir@/build-aux/mkinstalldirs
#### End of system configuration section. ####
SHELL = @SHELL@
# Before making a release, change this according to the libtool documentation,
# section "Library interface versions".
LIBICONV_VERSION_INFO = 8:1:6
PACKAGE_VERSION = @VERSION@
# Needed by $(LIBTOOL).
top_builddir = ..
SOURCES = $(srcdir)/iconv.c $(srcdir)/../libcharset/lib/localcharset.c $(srcdir)/relocatable.c
OBJECTS = iconv.lo localcharset.lo relocatable.lo $(OBJECTS_EXP_@WOE32DLL@) $(OBJECTS_RES_@WOE32@)
OBJECTS_EXP_yes = iconv-exports.lo
OBJECTS_EXP_no =
OBJECTS_RES_yes = libiconv.res.lo
OBJECTS_RES_no =
all : libiconv.la
libiconv.la : $(OBJECTS)
$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libiconv.la -rpath $(libdir) -version-info $(LIBICONV_VERSION_INFO) -no-undefined $(OBJECTS)
iconv.lo : $(srcdir)/iconv.c $(srcdir)/converters.h \
$(srcdir)/encodings.def $(srcdir)/encodings_aix.def $(srcdir)/encodings_osf1.def $(srcdir)/encodings_dos.def $(srcdir)/encodings_local.def \
$(srcdir)/aliases.h $(srcdir)/aliases_sysaix.h $(srcdir)/aliases_syshpux.h $(srcdir)/aliases_sysosf1.h $(srcdir)/aliases_syssolaris.h \
$(srcdir)/aliases_aix.h $(srcdir)/aliases_aix_sysaix.h \
$(srcdir)/aliases_osf1.h $(srcdir)/aliases_osf1_sysosf1.h \
$(srcdir)/aliases_dos.h \
$(srcdir)/aliases_extra.h \
$(srcdir)/flags.h $(srcdir)/translit.h
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/iconv.c
localcharset.lo : $(srcdir)/../libcharset/lib/localcharset.c $(srcdir)/relocatable.h
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/../libcharset/lib/localcharset.c
relocatable.lo : $(srcdir)/relocatable.c $(srcdir)/relocatable.h
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/relocatable.c
iconv-exports.lo : $(srcdir)/../woe32dll/iconv-exports.c
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/../woe32dll/iconv-exports.c
libiconv.res.lo : $(srcdir)/../windows/libiconv.rc
$(LIBTOOL_COMPILE) --tag=RC $(RC) `$(SHELL) $(srcdir)/../windows/windres-options --escape $(PACKAGE_VERSION)` -i $(srcdir)/../windows/libiconv.rc -o libiconv.res.lo --output-format=coff
# Installs the library and include files only. Typically called with only
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
if [ ! -d $(libdir) ] ; then $(mkinstalldirs) $(libdir) ; fi
$(LIBTOOL_INSTALL) $(INSTALL) libiconv.la $(libdir)/libiconv.la
# On AIX, libiconv.a must include the object files of /lib/libiconv.a,
# otherwise the setlocale() call fails when invoked from executables linked
# with -rpath $(libdir), even if linked without -liconv.
install : all force
if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
$(LIBTOOL_INSTALL) $(INSTALL) libiconv.la $(DESTDIR)$(libdir)/libiconv.la
case "@host_os@" in \
aix*) (cd $(DESTDIR)$(libdir) && \
objects=`$(AR) t libiconv.a`" "`$(AR) t /lib/libiconv.a` && \
$(AR) x libiconv.a && $(AR) x /lib/libiconv.a && \
$(AR) q libiconv.new.a $$objects && \
rm -f $$objects && \
mv -f libiconv.new.a libiconv.a) ;; \
esac
install-strip : install
installdirs : force
if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
uninstall : force
$(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libiconv.la
check : all
mostlyclean : clean
clean : force
$(RM) *.o *.lo *.a *.la core *.stackdump so_locations
$(RM) -r .libs _libs
distclean : clean
$(RM) Makefile config.h
maintainer-clean : distclean
# List of source files.
SOURCE_FILES = \
Makefile.in config.h.in \
encodings.def \
encodings_aix.def \
encodings_osf1.def \
encodings_dos.def \
encodings_zos.def \
encodings_extra.def \
encodings_local.def \
translit.def \
genaliases.c \
genaliases2.c \
genflags.c \
gentranslit.c \
iconv.c \
converters.h \
ascii.h \
utf8.h \
ucs2.h \
ucs2be.h \
ucs2le.h \
ucs4.h \
ucs4be.h \
ucs4le.h \
utf16.h \
utf16be.h \
utf16le.h \
utf32.h \
utf32be.h \
utf32le.h \
utf7.h \
ucs2internal.h \
ucs2swapped.h \
ucs4internal.h \
ucs4swapped.h \
c99.h \
java.h \
iso8859_1.h \
iso8859_2.h \
iso8859_3.h \
iso8859_4.h \
iso8859_5.h \
iso8859_6.h \
iso8859_7.h \
iso8859_8.h \
iso8859_9.h \
iso8859_10.h \
iso8859_11.h \
iso8859_13.h \
iso8859_14.h \
iso8859_15.h \
iso8859_16.h \
koi8_r.h \
koi8_u.h \
koi8_ru.h \
cp1250.h \
cp1251.h \
cp1252.h \
cp1253.h \
cp1254.h \
cp1255.h \
cp1256.h \
cp1257.h \
cp1258.h \
vietcomb.h \
cp850.h \
cp862.h \
cp866.h \
cp1131.h \
mac_roman.h \
mac_centraleurope.h \
mac_iceland.h \
mac_croatian.h \
mac_romania.h \
mac_cyrillic.h \
mac_ukraine.h \
mac_greek.h \
mac_turkish.h \
mac_hebrew.h \
mac_arabic.h \
mac_thai.h \
hp_roman8.h \
nextstep.h \
armscii_8.h \
georgian_academy.h \
georgian_ps.h \
koi8_t.h \
pt154.h \
rk1048.h \
mulelao.h \
cp1133.h \
tis620.h \
cp874.h \
viscii.h \
tcvn.h \
iso646_jp.h \
jisx0201.h \
jisx0208.h \
jisx0212.h \
iso646_cn.h \
gb2312.h \
isoir165.h \
isoir165ext.h \
gb12345.h \
gb12345ext.h \
gbk.h \
gbkext1.h \
gbkext2.h \
gbkext_inv.h \
cp936ext.h \
cns11643.h \
cns11643_1.h \
cns11643_2.h \
cns11643_3.h \
cns11643_4.h \
cns11643_4a.h \
cns11643_4b.h \
cns11643_5.h \
cns11643_6.h \
cns11643_7.h \
cns11643_15.h \
cns11643_inv.h \
big5.h \
ksc5601.h \
johab_hangul.h \
euc_jp.h \
sjis.h \
cp932.h \
cp932ext.h \
iso2022_jp.h \
iso2022_jp1.h \
iso2022_jp2.h \
iso2022_jpms.h \
cp50221_0208_ext.h \
cp50221_0212_ext.h \
euc_cn.h \
ces_gbk.h \
cp936.h \
gb18030.h \
gb18030ext.h \
gb18030uni.h \
iso2022_cn.h \
iso2022_cnext.h \
hz.h \
euc_tw.h \
ces_big5.h \
cp950.h \
cp950ext.h \
big5hkscs1999.h \
hkscs1999.h \
big5hkscs2001.h \
hkscs2001.h \
big5hkscs2004.h \
hkscs2004.h \
big5hkscs2008.h \
hkscs2008.h \
euc_kr.h \
cp949.h \
uhc_1.h \
uhc_2.h \
johab.h \
iso2022_kr.h \
cp856.h \
cp922.h \
cp943.h \
cp1046.h \
cp1124.h \
cp1129.h \
cp1161.h \
cp1162.h \
cp1163.h \
dec_kanji.h \
dec_hanyu.h \
cp437.h \
cp737.h \
cp775.h \
cp852.h \
cp853.h \
cp855.h \
cp857.h \
cp858.h \
cp860.h \
cp861.h \
cp863.h \
cp864.h \
cp865.h \
cp869.h \
cp1125.h \
ebcdic037.h \
ebcdic273.h \
ebcdic277.h \
ebcdic278.h \
ebcdic280.h \
ebcdic282.h \
ebcdic284.h \
ebcdic285.h \
ebcdic297.h \
ebcdic423.h \
ebcdic424.h \
ebcdic425.h \
ebcdic500.h \
ebcdic838.h \
ebcdic870.h \
ebcdic871.h \
ebcdic875.h \
ebcdic880.h \
ebcdic905.h \
ebcdic924.h \
ebcdic1025.h \
ebcdic1026.h \
ebcdic1047.h \
ebcdic1097.h \
ebcdic1112.h \
ebcdic1122.h \
ebcdic1123.h \
ebcdic1130.h \
ebcdic1132.h \
ebcdic1137.h \
ebcdic1140.h \
ebcdic1141.h \
ebcdic1142.h \
ebcdic1143.h \
ebcdic1144.h \
ebcdic1145.h \
ebcdic1146.h \
ebcdic1147.h \
ebcdic1148.h \
ebcdic1149.h \
ebcdic1153.h \
ebcdic1154.h \
ebcdic1155.h \
ebcdic1156.h \
ebcdic1157.h \
ebcdic1158.h \
ebcdic1160.h \
ebcdic1164.h \
ebcdic1165.h \
ebcdic1166.h \
ebcdic4971.h \
ebcdic12712.h \
ebcdic16804.h \
euc_jisx0213.h \
jisx0213.h \
shift_jisx0213.h \
iso2022_jp3.h \
big5_2003.h \
tds565.h \
atarist.h \
riscos1.h \
flushwc.h \
cjk_variants.h \
loops.h \
loop_unicode.h \
loop_wchar.h \
aliases2.h \
iconv_open1.h \
iconv_open2.h \
relocatable.h relocatable.c
# List of distributed files imported from other packages.
IMPORTED_FILES =
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES = \
aliases.gperf aliases_sysaix.gperf aliases_syshpux.gperf aliases_sysosf1.gperf aliases_syssolaris.gperf \
aliases.h aliases_sysaix.h aliases_syshpux.h aliases_sysosf1.h aliases_syssolaris.h \
aliases_aix.h aliases_aix_sysaix.h \
aliases_osf1.h aliases_osf1_sysosf1.h \
aliases_dos.h \
aliases_zos.h \
aliases_extra.h \
canonical.h canonical_sysaix.h canonical_syshpux.h canonical_sysosf1.h canonical_syssolaris.h \
canonical_aix.h canonical_aix_sysaix.h \
canonical_osf1.h canonical_osf1_sysosf1.h \
canonical_dos.h \
canonical_zos.h \
canonical_extra.h \
canonical_local.h canonical_local_sysaix.h canonical_local_syshpux.h canonical_local_sysosf1.h canonical_local_syssolaris.h \
flags.h \
translit.h
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
done
force :
+360
View File
@@ -0,0 +1,360 @@
struct alias { int name; unsigned int encoding_index; };
%struct-type
%language=ANSI-C
%define hash-function-name aliases_hash
%define lookup-function-name aliases_lookup
%7bit
%readonly-tables
%global-table
%define word-array-name aliases
%pic
%%
US-ASCII, ei_ascii
ASCII, ei_ascii
ISO646-US, ei_ascii
ISO_646.IRV:1991, ei_ascii
ISO-IR-6, ei_ascii
ANSI_X3.4-1968, ei_ascii
ANSI_X3.4-1986, ei_ascii
CP367, ei_ascii
IBM367, ei_ascii
US, ei_ascii
CSASCII, ei_ascii
UTF-8, ei_utf8
UCS-2, ei_ucs2
ISO-10646-UCS-2, ei_ucs2
CSUNICODE, ei_ucs2
UCS-2BE, ei_ucs2be
UNICODEBIG, ei_ucs2be
UNICODE-1-1, ei_ucs2be
CSUNICODE11, ei_ucs2be
UCS-2LE, ei_ucs2le
UNICODELITTLE, ei_ucs2le
UCS-4, ei_ucs4
ISO-10646-UCS-4, ei_ucs4
CSUCS4, ei_ucs4
UCS-4BE, ei_ucs4be
UCS-4LE, ei_ucs4le
UTF-16, ei_utf16
UTF-16BE, ei_utf16be
UTF-16LE, ei_utf16le
UTF-32, ei_utf32
UTF-32BE, ei_utf32be
UTF-32LE, ei_utf32le
UTF-7, ei_utf7
UNICODE-1-1-UTF-7, ei_utf7
CSUNICODE11UTF7, ei_utf7
UCS-2-INTERNAL, ei_ucs2internal
UCS-2-SWAPPED, ei_ucs2swapped
UCS-4-INTERNAL, ei_ucs4internal
UCS-4-SWAPPED, ei_ucs4swapped
C99, ei_c99
JAVA, ei_java
ISO-8859-1, ei_iso8859_1
ISO_8859-1, ei_iso8859_1
ISO_8859-1:1987, ei_iso8859_1
ISO-IR-100, ei_iso8859_1
CP819, ei_iso8859_1
IBM819, ei_iso8859_1
LATIN1, ei_iso8859_1
L1, ei_iso8859_1
CSISOLATIN1, ei_iso8859_1
ISO8859-1, ei_iso8859_1
ISO-8859-2, ei_iso8859_2
ISO_8859-2, ei_iso8859_2
ISO_8859-2:1987, ei_iso8859_2
ISO-IR-101, ei_iso8859_2
LATIN2, ei_iso8859_2
L2, ei_iso8859_2
CSISOLATIN2, ei_iso8859_2
ISO8859-2, ei_iso8859_2
ISO-8859-3, ei_iso8859_3
ISO_8859-3, ei_iso8859_3
ISO_8859-3:1988, ei_iso8859_3
ISO-IR-109, ei_iso8859_3
LATIN3, ei_iso8859_3
L3, ei_iso8859_3
CSISOLATIN3, ei_iso8859_3
ISO8859-3, ei_iso8859_3
ISO-8859-4, ei_iso8859_4
ISO_8859-4, ei_iso8859_4
ISO_8859-4:1988, ei_iso8859_4
ISO-IR-110, ei_iso8859_4
LATIN4, ei_iso8859_4
L4, ei_iso8859_4
CSISOLATIN4, ei_iso8859_4
ISO8859-4, ei_iso8859_4
ISO-8859-5, ei_iso8859_5
ISO_8859-5, ei_iso8859_5
ISO_8859-5:1988, ei_iso8859_5
ISO-IR-144, ei_iso8859_5
CYRILLIC, ei_iso8859_5
CSISOLATINCYRILLIC, ei_iso8859_5
ISO8859-5, ei_iso8859_5
ISO-8859-6, ei_iso8859_6
ISO_8859-6, ei_iso8859_6
ISO_8859-6:1987, ei_iso8859_6
ISO-IR-127, ei_iso8859_6
ECMA-114, ei_iso8859_6
ASMO-708, ei_iso8859_6
ARABIC, ei_iso8859_6
CSISOLATINARABIC, ei_iso8859_6
ISO8859-6, ei_iso8859_6
ISO-8859-7, ei_iso8859_7
ISO_8859-7, ei_iso8859_7
ISO_8859-7:1987, ei_iso8859_7
ISO_8859-7:2003, ei_iso8859_7
ISO-IR-126, ei_iso8859_7
ECMA-118, ei_iso8859_7
ELOT_928, ei_iso8859_7
GREEK8, ei_iso8859_7
GREEK, ei_iso8859_7
CSISOLATINGREEK, ei_iso8859_7
ISO8859-7, ei_iso8859_7
ISO-8859-8, ei_iso8859_8
ISO_8859-8, ei_iso8859_8
ISO_8859-8:1988, ei_iso8859_8
ISO-IR-138, ei_iso8859_8
HEBREW, ei_iso8859_8
CSISOLATINHEBREW, ei_iso8859_8
ISO8859-8, ei_iso8859_8
ISO-8859-9, ei_iso8859_9
ISO_8859-9, ei_iso8859_9
ISO_8859-9:1989, ei_iso8859_9
ISO-IR-148, ei_iso8859_9
LATIN5, ei_iso8859_9
L5, ei_iso8859_9
CSISOLATIN5, ei_iso8859_9
ISO8859-9, ei_iso8859_9
ISO-8859-10, ei_iso8859_10
ISO_8859-10, ei_iso8859_10
ISO_8859-10:1992, ei_iso8859_10
ISO-IR-157, ei_iso8859_10
LATIN6, ei_iso8859_10
L6, ei_iso8859_10
CSISOLATIN6, ei_iso8859_10
ISO8859-10, ei_iso8859_10
ISO-8859-11, ei_iso8859_11
ISO_8859-11, ei_iso8859_11
ISO8859-11, ei_iso8859_11
ISO-8859-13, ei_iso8859_13
ISO_8859-13, ei_iso8859_13
ISO-IR-179, ei_iso8859_13
LATIN7, ei_iso8859_13
L7, ei_iso8859_13
ISO8859-13, ei_iso8859_13
ISO-8859-14, ei_iso8859_14
ISO_8859-14, ei_iso8859_14
ISO_8859-14:1998, ei_iso8859_14
ISO-IR-199, ei_iso8859_14
LATIN8, ei_iso8859_14
L8, ei_iso8859_14
ISO-CELTIC, ei_iso8859_14
ISO8859-14, ei_iso8859_14
ISO-8859-15, ei_iso8859_15
ISO_8859-15, ei_iso8859_15
ISO_8859-15:1998, ei_iso8859_15
ISO-IR-203, ei_iso8859_15
LATIN-9, ei_iso8859_15
ISO8859-15, ei_iso8859_15
ISO-8859-16, ei_iso8859_16
ISO_8859-16, ei_iso8859_16
ISO_8859-16:2001, ei_iso8859_16
ISO-IR-226, ei_iso8859_16
LATIN10, ei_iso8859_16
L10, ei_iso8859_16
ISO8859-16, ei_iso8859_16
KOI8-R, ei_koi8_r
CSKOI8R, ei_koi8_r
KOI8-U, ei_koi8_u
KOI8-RU, ei_koi8_ru
CP1250, ei_cp1250
WINDOWS-1250, ei_cp1250
MS-EE, ei_cp1250
CP1251, ei_cp1251
WINDOWS-1251, ei_cp1251
MS-CYRL, ei_cp1251
CP1252, ei_cp1252
WINDOWS-1252, ei_cp1252
MS-ANSI, ei_cp1252
CP1253, ei_cp1253
WINDOWS-1253, ei_cp1253
MS-GREEK, ei_cp1253
CP1254, ei_cp1254
WINDOWS-1254, ei_cp1254
MS-TURK, ei_cp1254
CP1255, ei_cp1255
WINDOWS-1255, ei_cp1255
MS-HEBR, ei_cp1255
CP1256, ei_cp1256
WINDOWS-1256, ei_cp1256
MS-ARAB, ei_cp1256
CP1257, ei_cp1257
WINDOWS-1257, ei_cp1257
WINBALTRIM, ei_cp1257
CP1258, ei_cp1258
WINDOWS-1258, ei_cp1258
CP850, ei_cp850
IBM850, ei_cp850
850, ei_cp850
CSPC850MULTILINGUAL, ei_cp850
CP862, ei_cp862
IBM862, ei_cp862
862, ei_cp862
CSPC862LATINHEBREW, ei_cp862
CP866, ei_cp866
IBM866, ei_cp866
866, ei_cp866
CSIBM866, ei_cp866
CP1131, ei_cp1131
MACROMAN, ei_mac_roman
MACINTOSH, ei_mac_roman
MAC, ei_mac_roman
CSMACINTOSH, ei_mac_roman
MACCENTRALEUROPE, ei_mac_centraleurope
MACICELAND, ei_mac_iceland
MACCROATIAN, ei_mac_croatian
MACROMANIA, ei_mac_romania
MACCYRILLIC, ei_mac_cyrillic
MACUKRAINE, ei_mac_ukraine
MACGREEK, ei_mac_greek
MACTURKISH, ei_mac_turkish
MACHEBREW, ei_mac_hebrew
MACARABIC, ei_mac_arabic
MACTHAI, ei_mac_thai
HP-ROMAN8, ei_hp_roman8
ROMAN8, ei_hp_roman8
R8, ei_hp_roman8
CSHPROMAN8, ei_hp_roman8
NEXTSTEP, ei_nextstep
ARMSCII-8, ei_armscii_8
GEORGIAN-ACADEMY, ei_georgian_academy
GEORGIAN-PS, ei_georgian_ps
KOI8-T, ei_koi8_t
PT154, ei_pt154
PTCP154, ei_pt154
CP154, ei_pt154
CYRILLIC-ASIAN, ei_pt154
CSPTCP154, ei_pt154
RK1048, ei_rk1048
STRK1048-2002, ei_rk1048
KZ-1048, ei_rk1048
CSKZ1048, ei_rk1048
MULELAO-1, ei_mulelao
CP1133, ei_cp1133
IBM-CP1133, ei_cp1133
TIS-620, ei_tis620
TIS620, ei_tis620
TIS620-0, ei_tis620
TIS620.2529-1, ei_tis620
TIS620.2533-0, ei_tis620
TIS620.2533-1, ei_tis620
ISO-IR-166, ei_tis620
CP874, ei_cp874
WINDOWS-874, ei_cp874
VISCII, ei_viscii
VISCII1.1-1, ei_viscii
CSVISCII, ei_viscii
TCVN, ei_tcvn
TCVN-5712, ei_tcvn
TCVN5712-1, ei_tcvn
TCVN5712-1:1993, ei_tcvn
JIS_C6220-1969-RO, ei_iso646_jp
ISO646-JP, ei_iso646_jp
ISO-IR-14, ei_iso646_jp
JP, ei_iso646_jp
CSISO14JISC6220RO, ei_iso646_jp
JIS_X0201, ei_jisx0201
JISX0201-1976, ei_jisx0201
X0201, ei_jisx0201
CSHALFWIDTHKATAKANA, ei_jisx0201
JIS_X0208, ei_jisx0208
JIS_X0208-1983, ei_jisx0208
JIS_X0208-1990, ei_jisx0208
JIS0208, ei_jisx0208
X0208, ei_jisx0208
ISO-IR-87, ei_jisx0208
JIS_C6226-1983, ei_jisx0208
CSISO87JISX0208, ei_jisx0208
JIS_X0212, ei_jisx0212
JIS_X0212.1990-0, ei_jisx0212
JIS_X0212-1990, ei_jisx0212
X0212, ei_jisx0212
ISO-IR-159, ei_jisx0212
CSISO159JISX02121990, ei_jisx0212
GB_1988-80, ei_iso646_cn
ISO646-CN, ei_iso646_cn
ISO-IR-57, ei_iso646_cn
CN, ei_iso646_cn
CSISO57GB1988, ei_iso646_cn
GB_2312-80, ei_gb2312
ISO-IR-58, ei_gb2312
CSISO58GB231280, ei_gb2312
CHINESE, ei_gb2312
ISO-IR-165, ei_isoir165
CN-GB-ISOIR165, ei_isoir165
KSC_5601, ei_ksc5601
KS_C_5601-1987, ei_ksc5601
KS_C_5601-1989, ei_ksc5601
ISO-IR-149, ei_ksc5601
CSKSC56011987, ei_ksc5601
KOREAN, ei_ksc5601
EUC-JP, ei_euc_jp
EUCJP, ei_euc_jp
EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE, ei_euc_jp
CSEUCPKDFMTJAPANESE, ei_euc_jp
SHIFT_JIS, ei_sjis
SHIFT-JIS, ei_sjis
SJIS, ei_sjis
MS_KANJI, ei_sjis
CSSHIFTJIS, ei_sjis
CP932, ei_cp932
ISO-2022-JP, ei_iso2022_jp
CSISO2022JP, ei_iso2022_jp
ISO-2022-JP-1, ei_iso2022_jp1
ISO-2022-JP-2, ei_iso2022_jp2
CSISO2022JP2, ei_iso2022_jp2
ISO-2022-JP-MS, ei_iso2022_jpms
CP50221, ei_iso2022_jpms
EUC-CN, ei_euc_cn
EUCCN, ei_euc_cn
GB2312, ei_euc_cn
CN-GB, ei_euc_cn
CSGB2312, ei_euc_cn
GBK, ei_ces_gbk
CP936, ei_cp936
MS936, ei_cp936
WINDOWS-936, ei_cp936
GB18030, ei_gb18030
ISO-2022-CN, ei_iso2022_cn
CSISO2022CN, ei_iso2022_cn
ISO-2022-CN-EXT, ei_iso2022_cn_ext
HZ, ei_hz
HZ-GB-2312, ei_hz
EUC-TW, ei_euc_tw
EUCTW, ei_euc_tw
CSEUCTW, ei_euc_tw
BIG5, ei_ces_big5
BIG-5, ei_ces_big5
BIG-FIVE, ei_ces_big5
BIGFIVE, ei_ces_big5
CN-BIG5, ei_ces_big5
CSBIG5, ei_ces_big5
CP950, ei_cp950
BIG5-HKSCS:1999, ei_big5hkscs1999
BIG5-HKSCS:2001, ei_big5hkscs2001
BIG5-HKSCS:2004, ei_big5hkscs2004
BIG5-HKSCS, ei_big5hkscs2008
BIG5HKSCS, ei_big5hkscs2008
BIG5-HKSCS:2008, ei_big5hkscs2008
EUC-KR, ei_euc_kr
EUCKR, ei_euc_kr
CSEUCKR, ei_euc_kr
CP949, ei_cp949
UHC, ei_cp949
JOHAB, ei_johab
CP1361, ei_johab
ISO-2022-KR, ei_iso2022_kr
CSISO2022KR, ei_iso2022_kr
CHAR, ei_local_char
WCHAR_T, ei_local_wchar_t
+1777
View File
File diff suppressed because it is too large Load Diff
+42
View File
@@ -0,0 +1,42 @@
/*
* Copyright (C) 1999-2003, 2008, 2022 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
#ifdef USE_AIX
# if defined _AIX
# include "aliases_aix_sysaix.h"
# else
# include "aliases_aix.h"
# endif
#endif
#ifdef USE_OSF1
# if defined __osf__
# include "aliases_osf1_sysosf1.h"
# else
# include "aliases_osf1.h"
# endif
#endif
#ifdef USE_DOS
# include "aliases_dos.h"
#endif
#ifdef USE_ZOS
# include "aliases_zos.h"
#endif
#ifdef USE_EXTRA
# include "aliases_extra.h"
#endif
+18
View File
@@ -0,0 +1,18 @@
S(aix_0, "CP856", ei_cp856 )
S(aix_1, "CP922", ei_cp922 )
S(aix_2, "CP943", ei_cp943 )
S(aix_3, "CP1046", ei_cp1046 )
S(aix_4, "CP1124", ei_cp1124 )
S(aix_5, "CP1129", ei_cp1129 )
S(aix_6, "CP1161", ei_cp1161 )
S(aix_7, "IBM1161", ei_cp1161 )
S(aix_8, "IBM-1161", ei_cp1161 )
S(aix_9, "CSIBM1161", ei_cp1161 )
S(aix_10, "CP1162", ei_cp1162 )
S(aix_11, "IBM1162", ei_cp1162 )
S(aix_12, "IBM-1162", ei_cp1162 )
S(aix_13, "CSIBM1162", ei_cp1162 )
S(aix_14, "CP1163", ei_cp1163 )
S(aix_15, "IBM1163", ei_cp1163 )
S(aix_16, "IBM-1163", ei_cp1163 )
S(aix_17, "CSIBM1163", ei_cp1163 )
+24
View File
@@ -0,0 +1,24 @@
S(aix_0, "CP856", ei_cp856 )
S(aix_1, "IBM-856", ei_cp856 )
S(aix_2, "CP922", ei_cp922 )
S(aix_3, "IBM-922", ei_cp922 )
S(aix_4, "CP943", ei_cp943 )
S(aix_5, "IBM-943", ei_cp943 )
S(aix_6, "CP1046", ei_cp1046 )
S(aix_7, "IBM-1046", ei_cp1046 )
S(aix_8, "CP1124", ei_cp1124 )
S(aix_9, "IBM-1124", ei_cp1124 )
S(aix_10, "CP1129", ei_cp1129 )
S(aix_11, "IBM-1129", ei_cp1129 )
S(aix_12, "CP1161", ei_cp1161 )
S(aix_13, "IBM1161", ei_cp1161 )
S(aix_14, "IBM-1161", ei_cp1161 )
S(aix_15, "CSIBM1161", ei_cp1161 )
S(aix_16, "CP1162", ei_cp1162 )
S(aix_17, "IBM1162", ei_cp1162 )
S(aix_18, "IBM-1162", ei_cp1162 )
S(aix_19, "CSIBM1162", ei_cp1162 )
S(aix_20, "CP1163", ei_cp1163 )
S(aix_21, "IBM1163", ei_cp1163 )
S(aix_22, "IBM-1163", ei_cp1163 )
S(aix_23, "CSIBM1163", ei_cp1163 )
+48
View File
@@ -0,0 +1,48 @@
S(dos_0, "CP437", ei_cp437 )
S(dos_1, "IBM437", ei_cp437 )
S(dos_2, "437", ei_cp437 )
S(dos_3, "CSPC8CODEPAGE437", ei_cp437 )
S(dos_4, "CP737", ei_cp737 )
S(dos_5, "CP775", ei_cp775 )
S(dos_6, "IBM775", ei_cp775 )
S(dos_7, "CSPC775BALTIC", ei_cp775 )
S(dos_8, "CP852", ei_cp852 )
S(dos_9, "IBM852", ei_cp852 )
S(dos_10, "852", ei_cp852 )
S(dos_11, "CSPCP852", ei_cp852 )
S(dos_12, "CP853", ei_cp853 )
S(dos_13, "CP855", ei_cp855 )
S(dos_14, "IBM855", ei_cp855 )
S(dos_15, "855", ei_cp855 )
S(dos_16, "CSIBM855", ei_cp855 )
S(dos_17, "CP857", ei_cp857 )
S(dos_18, "IBM857", ei_cp857 )
S(dos_19, "857", ei_cp857 )
S(dos_20, "CSIBM857", ei_cp857 )
S(dos_21, "CP858", ei_cp858 )
S(dos_22, "CP860", ei_cp860 )
S(dos_23, "IBM860", ei_cp860 )
S(dos_24, "860", ei_cp860 )
S(dos_25, "CSIBM860", ei_cp860 )
S(dos_26, "CP861", ei_cp861 )
S(dos_27, "IBM861", ei_cp861 )
S(dos_28, "861", ei_cp861 )
S(dos_29, "CP-IS", ei_cp861 )
S(dos_30, "CSIBM861", ei_cp861 )
S(dos_31, "CP863", ei_cp863 )
S(dos_32, "IBM863", ei_cp863 )
S(dos_33, "863", ei_cp863 )
S(dos_34, "CSIBM863", ei_cp863 )
S(dos_35, "CP864", ei_cp864 )
S(dos_36, "IBM864", ei_cp864 )
S(dos_37, "CSIBM864", ei_cp864 )
S(dos_38, "CP865", ei_cp865 )
S(dos_39, "IBM865", ei_cp865 )
S(dos_40, "865", ei_cp865 )
S(dos_41, "CSIBM865", ei_cp865 )
S(dos_42, "CP869", ei_cp869 )
S(dos_43, "IBM869", ei_cp869 )
S(dos_44, "869", ei_cp869 )
S(dos_45, "CP-GR", ei_cp869 )
S(dos_46, "CSIBM869", ei_cp869 )
S(dos_47, "CP1125", ei_cp1125 )
+12
View File
@@ -0,0 +1,12 @@
S(extra_0, "EUC-JISX0213", ei_euc_jisx0213 )
S(extra_1, "EUC-JIS-2004", ei_euc_jisx0213 )
S(extra_2, "SHIFT_JISX0213", ei_shift_jisx0213 )
S(extra_3, "SHIFT_JIS-2004", ei_shift_jisx0213 )
S(extra_4, "ISO-2022-JP-3", ei_iso2022_jp3 )
S(extra_5, "ISO-2022-JP-2004", ei_iso2022_jp3 )
S(extra_6, "BIG5-2003", ei_big5_2003 )
S(extra_7, "TDS565", ei_tds565 )
S(extra_8, "ISO-IR-230", ei_tds565 )
S(extra_9, "ATARIST", ei_atarist )
S(extra_10, "ATARI", ei_atarist )
S(extra_11, "RISCOS-LATIN1", ei_riscos1 )
+2
View File
@@ -0,0 +1,2 @@
S(osf1_0, "DEC-KANJI", ei_dec_kanji )
S(osf1_1, "DEC-HANYU", ei_dec_hanyu )
+4
View File
@@ -0,0 +1,4 @@
S(osf1_0, "DEC-KANJI", ei_dec_kanji )
S(osf1_1, "DECKANJI", ei_dec_kanji )
S(osf1_2, "DEC-HANYU", ei_dec_hanyu )
S(osf1_3, "DECHANYU", ei_dec_hanyu )
+369
View File
@@ -0,0 +1,369 @@
struct alias { int name; unsigned int encoding_index; };
%struct-type
%language=ANSI-C
%define hash-function-name aliases_hash
%define lookup-function-name aliases_lookup
%7bit
%readonly-tables
%global-table
%define word-array-name aliases
%pic
%%
US-ASCII, ei_ascii
ASCII, ei_ascii
ISO646-US, ei_ascii
ISO_646.IRV:1991, ei_ascii
ISO-IR-6, ei_ascii
ANSI_X3.4-1968, ei_ascii
ANSI_X3.4-1986, ei_ascii
CP367, ei_ascii
IBM367, ei_ascii
US, ei_ascii
CSASCII, ei_ascii
UTF-8, ei_utf8
UCS-2, ei_ucs2
ISO-10646-UCS-2, ei_ucs2
CSUNICODE, ei_ucs2
UCS-2BE, ei_ucs2be
UNICODEBIG, ei_ucs2be
UNICODE-1-1, ei_ucs2be
CSUNICODE11, ei_ucs2be
UCS-2LE, ei_ucs2le
UNICODELITTLE, ei_ucs2le
UCS-4, ei_ucs4
ISO-10646-UCS-4, ei_ucs4
CSUCS4, ei_ucs4
UCS-4BE, ei_ucs4be
UCS-4LE, ei_ucs4le
UTF-16, ei_utf16
UTF-16BE, ei_utf16be
UTF-16LE, ei_utf16le
UTF-32, ei_utf32
UTF-32BE, ei_utf32be
UTF-32LE, ei_utf32le
UTF-7, ei_utf7
UNICODE-1-1-UTF-7, ei_utf7
CSUNICODE11UTF7, ei_utf7
UCS-2-INTERNAL, ei_ucs2internal
UCS-2-SWAPPED, ei_ucs2swapped
UCS-4-INTERNAL, ei_ucs4internal
UCS-4-SWAPPED, ei_ucs4swapped
C99, ei_c99
JAVA, ei_java
ISO-8859-1, ei_iso8859_1
ISO_8859-1, ei_iso8859_1
ISO_8859-1:1987, ei_iso8859_1
ISO-IR-100, ei_iso8859_1
CP819, ei_iso8859_1
IBM819, ei_iso8859_1
LATIN1, ei_iso8859_1
L1, ei_iso8859_1
CSISOLATIN1, ei_iso8859_1
ISO8859-1, ei_iso8859_1
ISO-8859-2, ei_iso8859_2
ISO_8859-2, ei_iso8859_2
ISO_8859-2:1987, ei_iso8859_2
ISO-IR-101, ei_iso8859_2
LATIN2, ei_iso8859_2
L2, ei_iso8859_2
CSISOLATIN2, ei_iso8859_2
ISO8859-2, ei_iso8859_2
ISO-8859-3, ei_iso8859_3
ISO_8859-3, ei_iso8859_3
ISO_8859-3:1988, ei_iso8859_3
ISO-IR-109, ei_iso8859_3
LATIN3, ei_iso8859_3
L3, ei_iso8859_3
CSISOLATIN3, ei_iso8859_3
ISO8859-3, ei_iso8859_3
ISO-8859-4, ei_iso8859_4
ISO_8859-4, ei_iso8859_4
ISO_8859-4:1988, ei_iso8859_4
ISO-IR-110, ei_iso8859_4
LATIN4, ei_iso8859_4
L4, ei_iso8859_4
CSISOLATIN4, ei_iso8859_4
ISO8859-4, ei_iso8859_4
ISO-8859-5, ei_iso8859_5
ISO_8859-5, ei_iso8859_5
ISO_8859-5:1988, ei_iso8859_5
ISO-IR-144, ei_iso8859_5
CYRILLIC, ei_iso8859_5
CSISOLATINCYRILLIC, ei_iso8859_5
ISO8859-5, ei_iso8859_5
ISO-8859-6, ei_iso8859_6
ISO_8859-6, ei_iso8859_6
ISO_8859-6:1987, ei_iso8859_6
ISO-IR-127, ei_iso8859_6
ECMA-114, ei_iso8859_6
ASMO-708, ei_iso8859_6
ARABIC, ei_iso8859_6
CSISOLATINARABIC, ei_iso8859_6
ISO8859-6, ei_iso8859_6
ISO-8859-7, ei_iso8859_7
ISO_8859-7, ei_iso8859_7
ISO_8859-7:1987, ei_iso8859_7
ISO_8859-7:2003, ei_iso8859_7
ISO-IR-126, ei_iso8859_7
ECMA-118, ei_iso8859_7
ELOT_928, ei_iso8859_7
GREEK8, ei_iso8859_7
GREEK, ei_iso8859_7
CSISOLATINGREEK, ei_iso8859_7
ISO8859-7, ei_iso8859_7
ISO-8859-8, ei_iso8859_8
ISO_8859-8, ei_iso8859_8
ISO_8859-8:1988, ei_iso8859_8
ISO-IR-138, ei_iso8859_8
HEBREW, ei_iso8859_8
CSISOLATINHEBREW, ei_iso8859_8
ISO8859-8, ei_iso8859_8
ISO-8859-9, ei_iso8859_9
ISO_8859-9, ei_iso8859_9
ISO_8859-9:1989, ei_iso8859_9
ISO-IR-148, ei_iso8859_9
LATIN5, ei_iso8859_9
L5, ei_iso8859_9
CSISOLATIN5, ei_iso8859_9
ISO8859-9, ei_iso8859_9
ISO-8859-10, ei_iso8859_10
ISO_8859-10, ei_iso8859_10
ISO_8859-10:1992, ei_iso8859_10
ISO-IR-157, ei_iso8859_10
LATIN6, ei_iso8859_10
L6, ei_iso8859_10
CSISOLATIN6, ei_iso8859_10
ISO8859-10, ei_iso8859_10
ISO-8859-11, ei_iso8859_11
ISO_8859-11, ei_iso8859_11
ISO8859-11, ei_iso8859_11
ISO-8859-13, ei_iso8859_13
ISO_8859-13, ei_iso8859_13
ISO-IR-179, ei_iso8859_13
LATIN7, ei_iso8859_13
L7, ei_iso8859_13
ISO8859-13, ei_iso8859_13
IBM-921, ei_iso8859_13
ISO-8859-14, ei_iso8859_14
ISO_8859-14, ei_iso8859_14
ISO_8859-14:1998, ei_iso8859_14
ISO-IR-199, ei_iso8859_14
LATIN8, ei_iso8859_14
L8, ei_iso8859_14
ISO-CELTIC, ei_iso8859_14
ISO8859-14, ei_iso8859_14
ISO-8859-15, ei_iso8859_15
ISO_8859-15, ei_iso8859_15
ISO_8859-15:1998, ei_iso8859_15
ISO-IR-203, ei_iso8859_15
LATIN-9, ei_iso8859_15
ISO8859-15, ei_iso8859_15
ISO-8859-16, ei_iso8859_16
ISO_8859-16, ei_iso8859_16
ISO_8859-16:2001, ei_iso8859_16
ISO-IR-226, ei_iso8859_16
LATIN10, ei_iso8859_16
L10, ei_iso8859_16
ISO8859-16, ei_iso8859_16
KOI8-R, ei_koi8_r
CSKOI8R, ei_koi8_r
KOI8-U, ei_koi8_u
KOI8-RU, ei_koi8_ru
CP1250, ei_cp1250
WINDOWS-1250, ei_cp1250
MS-EE, ei_cp1250
CP1251, ei_cp1251
WINDOWS-1251, ei_cp1251
MS-CYRL, ei_cp1251
CP1252, ei_cp1252
WINDOWS-1252, ei_cp1252
MS-ANSI, ei_cp1252
IBM-1252, ei_cp1252
CP1253, ei_cp1253
WINDOWS-1253, ei_cp1253
MS-GREEK, ei_cp1253
CP1254, ei_cp1254
WINDOWS-1254, ei_cp1254
MS-TURK, ei_cp1254
CP1255, ei_cp1255
WINDOWS-1255, ei_cp1255
MS-HEBR, ei_cp1255
CP1256, ei_cp1256
WINDOWS-1256, ei_cp1256
MS-ARAB, ei_cp1256
CP1257, ei_cp1257
WINDOWS-1257, ei_cp1257
WINBALTRIM, ei_cp1257
CP1258, ei_cp1258
WINDOWS-1258, ei_cp1258
CP850, ei_cp850
IBM850, ei_cp850
850, ei_cp850
CSPC850MULTILINGUAL, ei_cp850
IBM-850, ei_cp850
CP862, ei_cp862
IBM862, ei_cp862
862, ei_cp862
CSPC862LATINHEBREW, ei_cp862
CP866, ei_cp866
IBM866, ei_cp866
866, ei_cp866
CSIBM866, ei_cp866
CP1131, ei_cp1131
IBM-1131, ei_cp1131
MACROMAN, ei_mac_roman
MACINTOSH, ei_mac_roman
MAC, ei_mac_roman
CSMACINTOSH, ei_mac_roman
MACCENTRALEUROPE, ei_mac_centraleurope
MACICELAND, ei_mac_iceland
MACCROATIAN, ei_mac_croatian
MACROMANIA, ei_mac_romania
MACCYRILLIC, ei_mac_cyrillic
MACUKRAINE, ei_mac_ukraine
MACGREEK, ei_mac_greek
MACTURKISH, ei_mac_turkish
MACHEBREW, ei_mac_hebrew
MACARABIC, ei_mac_arabic
MACTHAI, ei_mac_thai
HP-ROMAN8, ei_hp_roman8
ROMAN8, ei_hp_roman8
R8, ei_hp_roman8
CSHPROMAN8, ei_hp_roman8
NEXTSTEP, ei_nextstep
ARMSCII-8, ei_armscii_8
GEORGIAN-ACADEMY, ei_georgian_academy
GEORGIAN-PS, ei_georgian_ps
KOI8-T, ei_koi8_t
PT154, ei_pt154
PTCP154, ei_pt154
CP154, ei_pt154
CYRILLIC-ASIAN, ei_pt154
CSPTCP154, ei_pt154
RK1048, ei_rk1048
STRK1048-2002, ei_rk1048
KZ-1048, ei_rk1048
CSKZ1048, ei_rk1048
MULELAO-1, ei_mulelao
CP1133, ei_cp1133
IBM-CP1133, ei_cp1133
TIS-620, ei_tis620
TIS620, ei_tis620
TIS620-0, ei_tis620
TIS620.2529-1, ei_tis620
TIS620.2533-0, ei_tis620
TIS620.2533-1, ei_tis620
ISO-IR-166, ei_tis620
CP874, ei_cp874
WINDOWS-874, ei_cp874
VISCII, ei_viscii
VISCII1.1-1, ei_viscii
CSVISCII, ei_viscii
TCVN, ei_tcvn
TCVN-5712, ei_tcvn
TCVN5712-1, ei_tcvn
TCVN5712-1:1993, ei_tcvn
JIS_C6220-1969-RO, ei_iso646_jp
ISO646-JP, ei_iso646_jp
ISO-IR-14, ei_iso646_jp
JP, ei_iso646_jp
CSISO14JISC6220RO, ei_iso646_jp
JIS_X0201, ei_jisx0201
JISX0201-1976, ei_jisx0201
X0201, ei_jisx0201
CSHALFWIDTHKATAKANA, ei_jisx0201
JIS_X0208, ei_jisx0208
JIS_X0208-1983, ei_jisx0208
JIS_X0208-1990, ei_jisx0208
JIS0208, ei_jisx0208
X0208, ei_jisx0208
ISO-IR-87, ei_jisx0208
JIS_C6226-1983, ei_jisx0208
CSISO87JISX0208, ei_jisx0208
JIS_X0212, ei_jisx0212
JIS_X0212.1990-0, ei_jisx0212
JIS_X0212-1990, ei_jisx0212
X0212, ei_jisx0212
ISO-IR-159, ei_jisx0212
CSISO159JISX02121990, ei_jisx0212
GB_1988-80, ei_iso646_cn
ISO646-CN, ei_iso646_cn
ISO-IR-57, ei_iso646_cn
CN, ei_iso646_cn
CSISO57GB1988, ei_iso646_cn
GB_2312-80, ei_gb2312
ISO-IR-58, ei_gb2312
CSISO58GB231280, ei_gb2312
CHINESE, ei_gb2312
ISO-IR-165, ei_isoir165
CN-GB-ISOIR165, ei_isoir165
KSC_5601, ei_ksc5601
KS_C_5601-1987, ei_ksc5601
KS_C_5601-1989, ei_ksc5601
ISO-IR-149, ei_ksc5601
CSKSC56011987, ei_ksc5601
KOREAN, ei_ksc5601
EUC-JP, ei_euc_jp
EUCJP, ei_euc_jp
EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE, ei_euc_jp
CSEUCPKDFMTJAPANESE, ei_euc_jp
IBM-EUCJP, ei_euc_jp
SHIFT_JIS, ei_sjis
SHIFT-JIS, ei_sjis
SJIS, ei_sjis
MS_KANJI, ei_sjis
CSSHIFTJIS, ei_sjis
CP932, ei_cp932
IBM-932, ei_cp932
ISO-2022-JP, ei_iso2022_jp
CSISO2022JP, ei_iso2022_jp
ISO-2022-JP-1, ei_iso2022_jp1
ISO-2022-JP-2, ei_iso2022_jp2
CSISO2022JP2, ei_iso2022_jp2
ISO-2022-JP-MS, ei_iso2022_jpms
CP50221, ei_iso2022_jpms
EUC-CN, ei_euc_cn
EUCCN, ei_euc_cn
GB2312, ei_euc_cn
CN-GB, ei_euc_cn
CSGB2312, ei_euc_cn
IBM-EUCCN, ei_euc_cn
GBK, ei_ces_gbk
CP936, ei_cp936
MS936, ei_cp936
WINDOWS-936, ei_cp936
GB18030, ei_gb18030
ISO-2022-CN, ei_iso2022_cn
CSISO2022CN, ei_iso2022_cn
ISO-2022-CN-EXT, ei_iso2022_cn_ext
HZ, ei_hz
HZ-GB-2312, ei_hz
EUC-TW, ei_euc_tw
EUCTW, ei_euc_tw
CSEUCTW, ei_euc_tw
IBM-EUCTW, ei_euc_tw
BIG5, ei_ces_big5
BIG-5, ei_ces_big5
BIG-FIVE, ei_ces_big5
BIGFIVE, ei_ces_big5
CN-BIG5, ei_ces_big5
CSBIG5, ei_ces_big5
CP950, ei_cp950
BIG5-HKSCS:1999, ei_big5hkscs1999
BIG5-HKSCS:2001, ei_big5hkscs2001
BIG5-HKSCS:2004, ei_big5hkscs2004
BIG5-HKSCS, ei_big5hkscs2008
BIG5HKSCS, ei_big5hkscs2008
BIG5-HKSCS:2008, ei_big5hkscs2008
EUC-KR, ei_euc_kr
EUCKR, ei_euc_kr
CSEUCKR, ei_euc_kr
IBM-EUCKR, ei_euc_kr
CP949, ei_cp949
UHC, ei_cp949
JOHAB, ei_johab
CP1361, ei_johab
ISO-2022-KR, ei_iso2022_kr
CSISO2022KR, ei_iso2022_kr
CHAR, ei_local_char
WCHAR_T, ei_local_wchar_t
+1814
View File
File diff suppressed because it is too large Load Diff
+370
View File
@@ -0,0 +1,370 @@
struct alias { int name; unsigned int encoding_index; };
%struct-type
%language=ANSI-C
%define hash-function-name aliases_hash
%define lookup-function-name aliases_lookup
%7bit
%readonly-tables
%global-table
%define word-array-name aliases
%pic
%%
US-ASCII, ei_ascii
ASCII, ei_ascii
ISO646-US, ei_ascii
ISO_646.IRV:1991, ei_ascii
ISO-IR-6, ei_ascii
ANSI_X3.4-1968, ei_ascii
ANSI_X3.4-1986, ei_ascii
CP367, ei_ascii
IBM367, ei_ascii
US, ei_ascii
CSASCII, ei_ascii
UTF-8, ei_utf8
UTF8, ei_utf8
UCS-2, ei_ucs2
ISO-10646-UCS-2, ei_ucs2
CSUNICODE, ei_ucs2
UCS-2BE, ei_ucs2be
UNICODEBIG, ei_ucs2be
UNICODE-1-1, ei_ucs2be
CSUNICODE11, ei_ucs2be
UCS-2LE, ei_ucs2le
UNICODELITTLE, ei_ucs2le
UCS-4, ei_ucs4
ISO-10646-UCS-4, ei_ucs4
CSUCS4, ei_ucs4
UCS-4BE, ei_ucs4be
UCS-4LE, ei_ucs4le
UTF-16, ei_utf16
UTF-16BE, ei_utf16be
UTF-16LE, ei_utf16le
UTF-32, ei_utf32
UTF-32BE, ei_utf32be
UTF-32LE, ei_utf32le
UTF-7, ei_utf7
UNICODE-1-1-UTF-7, ei_utf7
CSUNICODE11UTF7, ei_utf7
UCS-2-INTERNAL, ei_ucs2internal
UCS-2-SWAPPED, ei_ucs2swapped
UCS-4-INTERNAL, ei_ucs4internal
UCS-4-SWAPPED, ei_ucs4swapped
C99, ei_c99
JAVA, ei_java
ISO-8859-1, ei_iso8859_1
ISO_8859-1, ei_iso8859_1
ISO_8859-1:1987, ei_iso8859_1
ISO-IR-100, ei_iso8859_1
CP819, ei_iso8859_1
IBM819, ei_iso8859_1
LATIN1, ei_iso8859_1
L1, ei_iso8859_1
CSISOLATIN1, ei_iso8859_1
ISO8859-1, ei_iso8859_1
ISO88591, ei_iso8859_1
ISO-8859-2, ei_iso8859_2
ISO_8859-2, ei_iso8859_2
ISO_8859-2:1987, ei_iso8859_2
ISO-IR-101, ei_iso8859_2
LATIN2, ei_iso8859_2
L2, ei_iso8859_2
CSISOLATIN2, ei_iso8859_2
ISO8859-2, ei_iso8859_2
ISO88592, ei_iso8859_2
ISO-8859-3, ei_iso8859_3
ISO_8859-3, ei_iso8859_3
ISO_8859-3:1988, ei_iso8859_3
ISO-IR-109, ei_iso8859_3
LATIN3, ei_iso8859_3
L3, ei_iso8859_3
CSISOLATIN3, ei_iso8859_3
ISO8859-3, ei_iso8859_3
ISO-8859-4, ei_iso8859_4
ISO_8859-4, ei_iso8859_4
ISO_8859-4:1988, ei_iso8859_4
ISO-IR-110, ei_iso8859_4
LATIN4, ei_iso8859_4
L4, ei_iso8859_4
CSISOLATIN4, ei_iso8859_4
ISO8859-4, ei_iso8859_4
ISO-8859-5, ei_iso8859_5
ISO_8859-5, ei_iso8859_5
ISO_8859-5:1988, ei_iso8859_5
ISO-IR-144, ei_iso8859_5
CYRILLIC, ei_iso8859_5
CSISOLATINCYRILLIC, ei_iso8859_5
ISO8859-5, ei_iso8859_5
ISO88595, ei_iso8859_5
ISO-8859-6, ei_iso8859_6
ISO_8859-6, ei_iso8859_6
ISO_8859-6:1987, ei_iso8859_6
ISO-IR-127, ei_iso8859_6
ECMA-114, ei_iso8859_6
ASMO-708, ei_iso8859_6
ARABIC, ei_iso8859_6
CSISOLATINARABIC, ei_iso8859_6
ISO8859-6, ei_iso8859_6
ISO88596, ei_iso8859_6
ISO-8859-7, ei_iso8859_7
ISO_8859-7, ei_iso8859_7
ISO_8859-7:1987, ei_iso8859_7
ISO_8859-7:2003, ei_iso8859_7
ISO-IR-126, ei_iso8859_7
ECMA-118, ei_iso8859_7
ELOT_928, ei_iso8859_7
GREEK8, ei_iso8859_7
GREEK, ei_iso8859_7
CSISOLATINGREEK, ei_iso8859_7
ISO8859-7, ei_iso8859_7
ISO88597, ei_iso8859_7
ISO-8859-8, ei_iso8859_8
ISO_8859-8, ei_iso8859_8
ISO_8859-8:1988, ei_iso8859_8
ISO-IR-138, ei_iso8859_8
HEBREW, ei_iso8859_8
CSISOLATINHEBREW, ei_iso8859_8
ISO8859-8, ei_iso8859_8
ISO88598, ei_iso8859_8
ISO-8859-9, ei_iso8859_9
ISO_8859-9, ei_iso8859_9
ISO_8859-9:1989, ei_iso8859_9
ISO-IR-148, ei_iso8859_9
LATIN5, ei_iso8859_9
L5, ei_iso8859_9
CSISOLATIN5, ei_iso8859_9
ISO8859-9, ei_iso8859_9
ISO88599, ei_iso8859_9
ISO-8859-10, ei_iso8859_10
ISO_8859-10, ei_iso8859_10
ISO_8859-10:1992, ei_iso8859_10
ISO-IR-157, ei_iso8859_10
LATIN6, ei_iso8859_10
L6, ei_iso8859_10
CSISOLATIN6, ei_iso8859_10
ISO8859-10, ei_iso8859_10
ISO-8859-11, ei_iso8859_11
ISO_8859-11, ei_iso8859_11
ISO8859-11, ei_iso8859_11
ISO-8859-13, ei_iso8859_13
ISO_8859-13, ei_iso8859_13
ISO-IR-179, ei_iso8859_13
LATIN7, ei_iso8859_13
L7, ei_iso8859_13
ISO8859-13, ei_iso8859_13
ISO-8859-14, ei_iso8859_14
ISO_8859-14, ei_iso8859_14
ISO_8859-14:1998, ei_iso8859_14
ISO-IR-199, ei_iso8859_14
LATIN8, ei_iso8859_14
L8, ei_iso8859_14
ISO-CELTIC, ei_iso8859_14
ISO8859-14, ei_iso8859_14
ISO-8859-15, ei_iso8859_15
ISO_8859-15, ei_iso8859_15
ISO_8859-15:1998, ei_iso8859_15
ISO-IR-203, ei_iso8859_15
LATIN-9, ei_iso8859_15
ISO8859-15, ei_iso8859_15
ISO885915, ei_iso8859_15
ISO-8859-16, ei_iso8859_16
ISO_8859-16, ei_iso8859_16
ISO_8859-16:2001, ei_iso8859_16
ISO-IR-226, ei_iso8859_16
LATIN10, ei_iso8859_16
L10, ei_iso8859_16
ISO8859-16, ei_iso8859_16
KOI8-R, ei_koi8_r
CSKOI8R, ei_koi8_r
KOI8-U, ei_koi8_u
KOI8-RU, ei_koi8_ru
CP1250, ei_cp1250
WINDOWS-1250, ei_cp1250
MS-EE, ei_cp1250
CP1251, ei_cp1251
WINDOWS-1251, ei_cp1251
MS-CYRL, ei_cp1251
CP1252, ei_cp1252
WINDOWS-1252, ei_cp1252
MS-ANSI, ei_cp1252
CP1253, ei_cp1253
WINDOWS-1253, ei_cp1253
MS-GREEK, ei_cp1253
CP1254, ei_cp1254
WINDOWS-1254, ei_cp1254
MS-TURK, ei_cp1254
CP1255, ei_cp1255
WINDOWS-1255, ei_cp1255
MS-HEBR, ei_cp1255
CP1256, ei_cp1256
WINDOWS-1256, ei_cp1256
MS-ARAB, ei_cp1256
CP1257, ei_cp1257
WINDOWS-1257, ei_cp1257
WINBALTRIM, ei_cp1257
CP1258, ei_cp1258
WINDOWS-1258, ei_cp1258
CP850, ei_cp850
IBM850, ei_cp850
850, ei_cp850
CSPC850MULTILINGUAL, ei_cp850
CP862, ei_cp862
IBM862, ei_cp862
862, ei_cp862
CSPC862LATINHEBREW, ei_cp862
CP866, ei_cp866
IBM866, ei_cp866
866, ei_cp866
CSIBM866, ei_cp866
CP1131, ei_cp1131
MACROMAN, ei_mac_roman
MACINTOSH, ei_mac_roman
MAC, ei_mac_roman
CSMACINTOSH, ei_mac_roman
MACCENTRALEUROPE, ei_mac_centraleurope
MACICELAND, ei_mac_iceland
MACCROATIAN, ei_mac_croatian
MACROMANIA, ei_mac_romania
MACCYRILLIC, ei_mac_cyrillic
MACUKRAINE, ei_mac_ukraine
MACGREEK, ei_mac_greek
MACTURKISH, ei_mac_turkish
MACHEBREW, ei_mac_hebrew
MACARABIC, ei_mac_arabic
MACTHAI, ei_mac_thai
HP-ROMAN8, ei_hp_roman8
ROMAN8, ei_hp_roman8
R8, ei_hp_roman8
CSHPROMAN8, ei_hp_roman8
NEXTSTEP, ei_nextstep
ARMSCII-8, ei_armscii_8
GEORGIAN-ACADEMY, ei_georgian_academy
GEORGIAN-PS, ei_georgian_ps
KOI8-T, ei_koi8_t
PT154, ei_pt154
PTCP154, ei_pt154
CP154, ei_pt154
CYRILLIC-ASIAN, ei_pt154
CSPTCP154, ei_pt154
RK1048, ei_rk1048
STRK1048-2002, ei_rk1048
KZ-1048, ei_rk1048
CSKZ1048, ei_rk1048
MULELAO-1, ei_mulelao
CP1133, ei_cp1133
IBM-CP1133, ei_cp1133
TIS-620, ei_tis620
TIS620, ei_tis620
TIS620-0, ei_tis620
TIS620.2529-1, ei_tis620
TIS620.2533-0, ei_tis620
TIS620.2533-1, ei_tis620
ISO-IR-166, ei_tis620
CP874, ei_cp874
WINDOWS-874, ei_cp874
VISCII, ei_viscii
VISCII1.1-1, ei_viscii
CSVISCII, ei_viscii
TCVN, ei_tcvn
TCVN-5712, ei_tcvn
TCVN5712-1, ei_tcvn
TCVN5712-1:1993, ei_tcvn
JIS_C6220-1969-RO, ei_iso646_jp
ISO646-JP, ei_iso646_jp
ISO-IR-14, ei_iso646_jp
JP, ei_iso646_jp
CSISO14JISC6220RO, ei_iso646_jp
JIS_X0201, ei_jisx0201
JISX0201-1976, ei_jisx0201
X0201, ei_jisx0201
CSHALFWIDTHKATAKANA, ei_jisx0201
JIS_X0208, ei_jisx0208
JIS_X0208-1983, ei_jisx0208
JIS_X0208-1990, ei_jisx0208
JIS0208, ei_jisx0208
X0208, ei_jisx0208
ISO-IR-87, ei_jisx0208
JIS_C6226-1983, ei_jisx0208
CSISO87JISX0208, ei_jisx0208
JIS_X0212, ei_jisx0212
JIS_X0212.1990-0, ei_jisx0212
JIS_X0212-1990, ei_jisx0212
X0212, ei_jisx0212
ISO-IR-159, ei_jisx0212
CSISO159JISX02121990, ei_jisx0212
GB_1988-80, ei_iso646_cn
ISO646-CN, ei_iso646_cn
ISO-IR-57, ei_iso646_cn
CN, ei_iso646_cn
CSISO57GB1988, ei_iso646_cn
GB_2312-80, ei_gb2312
ISO-IR-58, ei_gb2312
CSISO58GB231280, ei_gb2312
CHINESE, ei_gb2312
ISO-IR-165, ei_isoir165
CN-GB-ISOIR165, ei_isoir165
KSC_5601, ei_ksc5601
KS_C_5601-1987, ei_ksc5601
KS_C_5601-1989, ei_ksc5601
ISO-IR-149, ei_ksc5601
CSKSC56011987, ei_ksc5601
KOREAN, ei_ksc5601
EUC-JP, ei_euc_jp
EUCJP, ei_euc_jp
EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE, ei_euc_jp
CSEUCPKDFMTJAPANESE, ei_euc_jp
SHIFT_JIS, ei_sjis
SHIFT-JIS, ei_sjis
SJIS, ei_sjis
MS_KANJI, ei_sjis
CSSHIFTJIS, ei_sjis
CP932, ei_cp932
ISO-2022-JP, ei_iso2022_jp
CSISO2022JP, ei_iso2022_jp
ISO-2022-JP-1, ei_iso2022_jp1
ISO-2022-JP-2, ei_iso2022_jp2
CSISO2022JP2, ei_iso2022_jp2
ISO-2022-JP-MS, ei_iso2022_jpms
CP50221, ei_iso2022_jpms
EUC-CN, ei_euc_cn
EUCCN, ei_euc_cn
GB2312, ei_euc_cn
CN-GB, ei_euc_cn
CSGB2312, ei_euc_cn
HP15CN, ei_euc_cn
GBK, ei_ces_gbk
CP936, ei_cp936
MS936, ei_cp936
WINDOWS-936, ei_cp936
GB18030, ei_gb18030
ISO-2022-CN, ei_iso2022_cn
CSISO2022CN, ei_iso2022_cn
ISO-2022-CN-EXT, ei_iso2022_cn_ext
HZ, ei_hz
HZ-GB-2312, ei_hz
EUC-TW, ei_euc_tw
EUCTW, ei_euc_tw
CSEUCTW, ei_euc_tw
BIG5, ei_ces_big5
BIG-5, ei_ces_big5
BIG-FIVE, ei_ces_big5
BIGFIVE, ei_ces_big5
CN-BIG5, ei_ces_big5
CSBIG5, ei_ces_big5
CP950, ei_cp950
BIG5-HKSCS:1999, ei_big5hkscs1999
BIG5-HKSCS:2001, ei_big5hkscs2001
BIG5-HKSCS:2004, ei_big5hkscs2004
BIG5-HKSCS, ei_big5hkscs2008
BIG5HKSCS, ei_big5hkscs2008
BIG5-HKSCS:2008, ei_big5hkscs2008
EUC-KR, ei_euc_kr
EUCKR, ei_euc_kr
CSEUCKR, ei_euc_kr
CP949, ei_cp949
UHC, ei_cp949
JOHAB, ei_johab
CP1361, ei_johab
ISO-2022-KR, ei_iso2022_kr
CSISO2022KR, ei_iso2022_kr
CHAR, ei_local_char
WCHAR_T, ei_local_wchar_t
File diff suppressed because it is too large Load Diff
+365
View File
@@ -0,0 +1,365 @@
struct alias { int name; unsigned int encoding_index; };
%struct-type
%language=ANSI-C
%define hash-function-name aliases_hash
%define lookup-function-name aliases_lookup
%7bit
%readonly-tables
%global-table
%define word-array-name aliases
%pic
%%
US-ASCII, ei_ascii
ASCII, ei_ascii
ISO646-US, ei_ascii
ISO_646.IRV:1991, ei_ascii
ISO-IR-6, ei_ascii
ANSI_X3.4-1968, ei_ascii
ANSI_X3.4-1986, ei_ascii
CP367, ei_ascii
IBM367, ei_ascii
US, ei_ascii
CSASCII, ei_ascii
UTF-8, ei_utf8
UCS-2, ei_ucs2
ISO-10646-UCS-2, ei_ucs2
CSUNICODE, ei_ucs2
UCS-2BE, ei_ucs2be
UNICODEBIG, ei_ucs2be
UNICODE-1-1, ei_ucs2be
CSUNICODE11, ei_ucs2be
UCS-2LE, ei_ucs2le
UNICODELITTLE, ei_ucs2le
UCS-4, ei_ucs4
ISO-10646-UCS-4, ei_ucs4
CSUCS4, ei_ucs4
UCS-4BE, ei_ucs4be
UCS-4LE, ei_ucs4le
UTF-16, ei_utf16
UTF-16BE, ei_utf16be
UTF-16LE, ei_utf16le
UTF-32, ei_utf32
UTF-32BE, ei_utf32be
UTF-32LE, ei_utf32le
UTF-7, ei_utf7
UNICODE-1-1-UTF-7, ei_utf7
CSUNICODE11UTF7, ei_utf7
UCS-2-INTERNAL, ei_ucs2internal
UCS-2-SWAPPED, ei_ucs2swapped
UCS-4-INTERNAL, ei_ucs4internal
UCS-4-SWAPPED, ei_ucs4swapped
C99, ei_c99
JAVA, ei_java
ISO-8859-1, ei_iso8859_1
ISO_8859-1, ei_iso8859_1
ISO_8859-1:1987, ei_iso8859_1
ISO-IR-100, ei_iso8859_1
CP819, ei_iso8859_1
IBM819, ei_iso8859_1
LATIN1, ei_iso8859_1
L1, ei_iso8859_1
CSISOLATIN1, ei_iso8859_1
ISO8859-1, ei_iso8859_1
ISO-8859-2, ei_iso8859_2
ISO_8859-2, ei_iso8859_2
ISO_8859-2:1987, ei_iso8859_2
ISO-IR-101, ei_iso8859_2
LATIN2, ei_iso8859_2
L2, ei_iso8859_2
CSISOLATIN2, ei_iso8859_2
ISO8859-2, ei_iso8859_2
ISO-8859-3, ei_iso8859_3
ISO_8859-3, ei_iso8859_3
ISO_8859-3:1988, ei_iso8859_3
ISO-IR-109, ei_iso8859_3
LATIN3, ei_iso8859_3
L3, ei_iso8859_3
CSISOLATIN3, ei_iso8859_3
ISO8859-3, ei_iso8859_3
ISO-8859-4, ei_iso8859_4
ISO_8859-4, ei_iso8859_4
ISO_8859-4:1988, ei_iso8859_4
ISO-IR-110, ei_iso8859_4
LATIN4, ei_iso8859_4
L4, ei_iso8859_4
CSISOLATIN4, ei_iso8859_4
ISO8859-4, ei_iso8859_4
ISO-8859-5, ei_iso8859_5
ISO_8859-5, ei_iso8859_5
ISO_8859-5:1988, ei_iso8859_5
ISO-IR-144, ei_iso8859_5
CYRILLIC, ei_iso8859_5
CSISOLATINCYRILLIC, ei_iso8859_5
ISO8859-5, ei_iso8859_5
ISO-8859-6, ei_iso8859_6
ISO_8859-6, ei_iso8859_6
ISO_8859-6:1987, ei_iso8859_6
ISO-IR-127, ei_iso8859_6
ECMA-114, ei_iso8859_6
ASMO-708, ei_iso8859_6
ARABIC, ei_iso8859_6
CSISOLATINARABIC, ei_iso8859_6
ISO8859-6, ei_iso8859_6
ISO-8859-7, ei_iso8859_7
ISO_8859-7, ei_iso8859_7
ISO_8859-7:1987, ei_iso8859_7
ISO_8859-7:2003, ei_iso8859_7
ISO-IR-126, ei_iso8859_7
ECMA-118, ei_iso8859_7
ELOT_928, ei_iso8859_7
GREEK8, ei_iso8859_7
GREEK, ei_iso8859_7
CSISOLATINGREEK, ei_iso8859_7
ISO8859-7, ei_iso8859_7
ISO-8859-8, ei_iso8859_8
ISO_8859-8, ei_iso8859_8
ISO_8859-8:1988, ei_iso8859_8
ISO-IR-138, ei_iso8859_8
HEBREW, ei_iso8859_8
CSISOLATINHEBREW, ei_iso8859_8
ISO8859-8, ei_iso8859_8
ISO-8859-9, ei_iso8859_9
ISO_8859-9, ei_iso8859_9
ISO_8859-9:1989, ei_iso8859_9
ISO-IR-148, ei_iso8859_9
LATIN5, ei_iso8859_9
L5, ei_iso8859_9
CSISOLATIN5, ei_iso8859_9
ISO8859-9, ei_iso8859_9
ISO-8859-10, ei_iso8859_10
ISO_8859-10, ei_iso8859_10
ISO_8859-10:1992, ei_iso8859_10
ISO-IR-157, ei_iso8859_10
LATIN6, ei_iso8859_10
L6, ei_iso8859_10
CSISOLATIN6, ei_iso8859_10
ISO8859-10, ei_iso8859_10
ISO-8859-11, ei_iso8859_11
ISO_8859-11, ei_iso8859_11
ISO8859-11, ei_iso8859_11
ISO-8859-13, ei_iso8859_13
ISO_8859-13, ei_iso8859_13
ISO-IR-179, ei_iso8859_13
LATIN7, ei_iso8859_13
L7, ei_iso8859_13
ISO8859-13, ei_iso8859_13
ISO-8859-14, ei_iso8859_14
ISO_8859-14, ei_iso8859_14
ISO_8859-14:1998, ei_iso8859_14
ISO-IR-199, ei_iso8859_14
LATIN8, ei_iso8859_14
L8, ei_iso8859_14
ISO-CELTIC, ei_iso8859_14
ISO8859-14, ei_iso8859_14
ISO-8859-15, ei_iso8859_15
ISO_8859-15, ei_iso8859_15
ISO_8859-15:1998, ei_iso8859_15
ISO-IR-203, ei_iso8859_15
LATIN-9, ei_iso8859_15
ISO8859-15, ei_iso8859_15
ISO-8859-16, ei_iso8859_16
ISO_8859-16, ei_iso8859_16
ISO_8859-16:2001, ei_iso8859_16
ISO-IR-226, ei_iso8859_16
LATIN10, ei_iso8859_16
L10, ei_iso8859_16
ISO8859-16, ei_iso8859_16
KOI8-R, ei_koi8_r
CSKOI8R, ei_koi8_r
KOI8-U, ei_koi8_u
KOI8-RU, ei_koi8_ru
CP1250, ei_cp1250
WINDOWS-1250, ei_cp1250
MS-EE, ei_cp1250
CP1251, ei_cp1251
WINDOWS-1251, ei_cp1251
MS-CYRL, ei_cp1251
CP1252, ei_cp1252
WINDOWS-1252, ei_cp1252
MS-ANSI, ei_cp1252
CP1253, ei_cp1253
WINDOWS-1253, ei_cp1253
MS-GREEK, ei_cp1253
CP1254, ei_cp1254
WINDOWS-1254, ei_cp1254
MS-TURK, ei_cp1254
CP1255, ei_cp1255
WINDOWS-1255, ei_cp1255
MS-HEBR, ei_cp1255
CP1256, ei_cp1256
WINDOWS-1256, ei_cp1256
MS-ARAB, ei_cp1256
CP1257, ei_cp1257
WINDOWS-1257, ei_cp1257
WINBALTRIM, ei_cp1257
CP1258, ei_cp1258
WINDOWS-1258, ei_cp1258
CP850, ei_cp850
IBM850, ei_cp850
850, ei_cp850
CSPC850MULTILINGUAL, ei_cp850
CP862, ei_cp862
IBM862, ei_cp862
862, ei_cp862
CSPC862LATINHEBREW, ei_cp862
CP866, ei_cp866
IBM866, ei_cp866
866, ei_cp866
CSIBM866, ei_cp866
CP1131, ei_cp1131
MACROMAN, ei_mac_roman
MACINTOSH, ei_mac_roman
MAC, ei_mac_roman
CSMACINTOSH, ei_mac_roman
MACCENTRALEUROPE, ei_mac_centraleurope
MACICELAND, ei_mac_iceland
MACCROATIAN, ei_mac_croatian
MACROMANIA, ei_mac_romania
MACCYRILLIC, ei_mac_cyrillic
MACUKRAINE, ei_mac_ukraine
MACGREEK, ei_mac_greek
MACTURKISH, ei_mac_turkish
MACHEBREW, ei_mac_hebrew
MACARABIC, ei_mac_arabic
MACTHAI, ei_mac_thai
HP-ROMAN8, ei_hp_roman8
ROMAN8, ei_hp_roman8
R8, ei_hp_roman8
CSHPROMAN8, ei_hp_roman8
NEXTSTEP, ei_nextstep
ARMSCII-8, ei_armscii_8
GEORGIAN-ACADEMY, ei_georgian_academy
GEORGIAN-PS, ei_georgian_ps
KOI8-T, ei_koi8_t
PT154, ei_pt154
PTCP154, ei_pt154
CP154, ei_pt154
CYRILLIC-ASIAN, ei_pt154
CSPTCP154, ei_pt154
RK1048, ei_rk1048
STRK1048-2002, ei_rk1048
KZ-1048, ei_rk1048
CSKZ1048, ei_rk1048
MULELAO-1, ei_mulelao
CP1133, ei_cp1133
IBM-CP1133, ei_cp1133
TIS-620, ei_tis620
TIS620, ei_tis620
TIS620-0, ei_tis620
TIS620.2529-1, ei_tis620
TIS620.2533-0, ei_tis620
TIS620.2533-1, ei_tis620
ISO-IR-166, ei_tis620
TACTIS, ei_tis620
CP874, ei_cp874
WINDOWS-874, ei_cp874
VISCII, ei_viscii
VISCII1.1-1, ei_viscii
CSVISCII, ei_viscii
TCVN, ei_tcvn
TCVN-5712, ei_tcvn
TCVN5712-1, ei_tcvn
TCVN5712-1:1993, ei_tcvn
JIS_C6220-1969-RO, ei_iso646_jp
ISO646-JP, ei_iso646_jp
ISO-IR-14, ei_iso646_jp
JP, ei_iso646_jp
CSISO14JISC6220RO, ei_iso646_jp
JIS_X0201, ei_jisx0201
JISX0201-1976, ei_jisx0201
X0201, ei_jisx0201
CSHALFWIDTHKATAKANA, ei_jisx0201
JIS_X0208, ei_jisx0208
JIS_X0208-1983, ei_jisx0208
JIS_X0208-1990, ei_jisx0208
JIS0208, ei_jisx0208
X0208, ei_jisx0208
ISO-IR-87, ei_jisx0208
JIS_C6226-1983, ei_jisx0208
CSISO87JISX0208, ei_jisx0208
JIS_X0212, ei_jisx0212
JIS_X0212.1990-0, ei_jisx0212
JIS_X0212-1990, ei_jisx0212
X0212, ei_jisx0212
ISO-IR-159, ei_jisx0212
CSISO159JISX02121990, ei_jisx0212
GB_1988-80, ei_iso646_cn
ISO646-CN, ei_iso646_cn
ISO-IR-57, ei_iso646_cn
CN, ei_iso646_cn
CSISO57GB1988, ei_iso646_cn
GB_2312-80, ei_gb2312
ISO-IR-58, ei_gb2312
CSISO58GB231280, ei_gb2312
CHINESE, ei_gb2312
ISO-IR-165, ei_isoir165
CN-GB-ISOIR165, ei_isoir165
KSC_5601, ei_ksc5601
KS_C_5601-1987, ei_ksc5601
KS_C_5601-1989, ei_ksc5601
ISO-IR-149, ei_ksc5601
CSKSC56011987, ei_ksc5601
KOREAN, ei_ksc5601
EUC-JP, ei_euc_jp
EUCJP, ei_euc_jp
EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE, ei_euc_jp
CSEUCPKDFMTJAPANESE, ei_euc_jp
SDECKANJI, ei_euc_jp
SHIFT_JIS, ei_sjis
SHIFT-JIS, ei_sjis
SJIS, ei_sjis
MS_KANJI, ei_sjis
CSSHIFTJIS, ei_sjis
CP932, ei_cp932
ISO-2022-JP, ei_iso2022_jp
CSISO2022JP, ei_iso2022_jp
ISO-2022-JP-1, ei_iso2022_jp1
ISO-2022-JP-2, ei_iso2022_jp2
CSISO2022JP2, ei_iso2022_jp2
ISO-2022-JP-MS, ei_iso2022_jpms
CP50221, ei_iso2022_jpms
EUC-CN, ei_euc_cn
EUCCN, ei_euc_cn
GB2312, ei_euc_cn
CN-GB, ei_euc_cn
CSGB2312, ei_euc_cn
DECHANZI, ei_euc_cn
GBK, ei_ces_gbk
CP936, ei_cp936
MS936, ei_cp936
WINDOWS-936, ei_cp936
GB18030, ei_gb18030
ISO-2022-CN, ei_iso2022_cn
CSISO2022CN, ei_iso2022_cn
ISO-2022-CN-EXT, ei_iso2022_cn_ext
HZ, ei_hz
HZ-GB-2312, ei_hz
EUC-TW, ei_euc_tw
EUCTW, ei_euc_tw
CSEUCTW, ei_euc_tw
BIG5, ei_ces_big5
BIG-5, ei_ces_big5
BIG-FIVE, ei_ces_big5
BIGFIVE, ei_ces_big5
CN-BIG5, ei_ces_big5
CSBIG5, ei_ces_big5
CP950, ei_cp950
BIG5-HKSCS:1999, ei_big5hkscs1999
BIG5-HKSCS:2001, ei_big5hkscs2001
BIG5-HKSCS:2004, ei_big5hkscs2004
BIG5-HKSCS, ei_big5hkscs2008
BIG5HKSCS, ei_big5hkscs2008
BIG5-HKSCS:2008, ei_big5hkscs2008
EUC-KR, ei_euc_kr
EUCKR, ei_euc_kr
CSEUCKR, ei_euc_kr
DECKOREAN, ei_euc_kr
CP949, ei_cp949
UHC, ei_cp949
KSC5601, ei_cp949
JOHAB, ei_johab
CP1361, ei_johab
ISO-2022-KR, ei_iso2022_kr
CSISO2022KR, ei_iso2022_kr
CHAR, ei_local_char
WCHAR_T, ei_local_wchar_t
File diff suppressed because it is too large Load Diff
+367
View File
@@ -0,0 +1,367 @@
struct alias { int name; unsigned int encoding_index; };
%struct-type
%language=ANSI-C
%define hash-function-name aliases_hash
%define lookup-function-name aliases_lookup
%7bit
%readonly-tables
%global-table
%define word-array-name aliases
%pic
%%
US-ASCII, ei_ascii
ASCII, ei_ascii
ISO646-US, ei_ascii
ISO_646.IRV:1991, ei_ascii
ISO-IR-6, ei_ascii
ANSI_X3.4-1968, ei_ascii
ANSI_X3.4-1986, ei_ascii
CP367, ei_ascii
IBM367, ei_ascii
US, ei_ascii
CSASCII, ei_ascii
646, ei_ascii
UTF-8, ei_utf8
UCS-2, ei_ucs2
ISO-10646-UCS-2, ei_ucs2
CSUNICODE, ei_ucs2
UCS-2BE, ei_ucs2be
UNICODEBIG, ei_ucs2be
UNICODE-1-1, ei_ucs2be
CSUNICODE11, ei_ucs2be
UCS-2LE, ei_ucs2le
UNICODELITTLE, ei_ucs2le
UCS-4, ei_ucs4
ISO-10646-UCS-4, ei_ucs4
CSUCS4, ei_ucs4
UCS-4BE, ei_ucs4be
UCS-4LE, ei_ucs4le
UTF-16, ei_utf16
UTF-16BE, ei_utf16be
UTF-16LE, ei_utf16le
UTF-32, ei_utf32
UTF-32BE, ei_utf32be
UTF-32LE, ei_utf32le
UTF-7, ei_utf7
UNICODE-1-1-UTF-7, ei_utf7
CSUNICODE11UTF7, ei_utf7
UCS-2-INTERNAL, ei_ucs2internal
UCS-2-SWAPPED, ei_ucs2swapped
UCS-4-INTERNAL, ei_ucs4internal
UCS-4-SWAPPED, ei_ucs4swapped
C99, ei_c99
JAVA, ei_java
ISO-8859-1, ei_iso8859_1
ISO_8859-1, ei_iso8859_1
ISO_8859-1:1987, ei_iso8859_1
ISO-IR-100, ei_iso8859_1
CP819, ei_iso8859_1
IBM819, ei_iso8859_1
LATIN1, ei_iso8859_1
L1, ei_iso8859_1
CSISOLATIN1, ei_iso8859_1
ISO8859-1, ei_iso8859_1
ISO-8859-2, ei_iso8859_2
ISO_8859-2, ei_iso8859_2
ISO_8859-2:1987, ei_iso8859_2
ISO-IR-101, ei_iso8859_2
LATIN2, ei_iso8859_2
L2, ei_iso8859_2
CSISOLATIN2, ei_iso8859_2
ISO8859-2, ei_iso8859_2
ISO-8859-3, ei_iso8859_3
ISO_8859-3, ei_iso8859_3
ISO_8859-3:1988, ei_iso8859_3
ISO-IR-109, ei_iso8859_3
LATIN3, ei_iso8859_3
L3, ei_iso8859_3
CSISOLATIN3, ei_iso8859_3
ISO8859-3, ei_iso8859_3
ISO-8859-4, ei_iso8859_4
ISO_8859-4, ei_iso8859_4
ISO_8859-4:1988, ei_iso8859_4
ISO-IR-110, ei_iso8859_4
LATIN4, ei_iso8859_4
L4, ei_iso8859_4
CSISOLATIN4, ei_iso8859_4
ISO8859-4, ei_iso8859_4
ISO-8859-5, ei_iso8859_5
ISO_8859-5, ei_iso8859_5
ISO_8859-5:1988, ei_iso8859_5
ISO-IR-144, ei_iso8859_5
CYRILLIC, ei_iso8859_5
CSISOLATINCYRILLIC, ei_iso8859_5
ISO8859-5, ei_iso8859_5
ISO-8859-6, ei_iso8859_6
ISO_8859-6, ei_iso8859_6
ISO_8859-6:1987, ei_iso8859_6
ISO-IR-127, ei_iso8859_6
ECMA-114, ei_iso8859_6
ASMO-708, ei_iso8859_6
ARABIC, ei_iso8859_6
CSISOLATINARABIC, ei_iso8859_6
ISO8859-6, ei_iso8859_6
ISO-8859-7, ei_iso8859_7
ISO_8859-7, ei_iso8859_7
ISO_8859-7:1987, ei_iso8859_7
ISO_8859-7:2003, ei_iso8859_7
ISO-IR-126, ei_iso8859_7
ECMA-118, ei_iso8859_7
ELOT_928, ei_iso8859_7
GREEK8, ei_iso8859_7
GREEK, ei_iso8859_7
CSISOLATINGREEK, ei_iso8859_7
ISO8859-7, ei_iso8859_7
ISO-8859-8, ei_iso8859_8
ISO_8859-8, ei_iso8859_8
ISO_8859-8:1988, ei_iso8859_8
ISO-IR-138, ei_iso8859_8
HEBREW, ei_iso8859_8
CSISOLATINHEBREW, ei_iso8859_8
ISO8859-8, ei_iso8859_8
ISO-8859-9, ei_iso8859_9
ISO_8859-9, ei_iso8859_9
ISO_8859-9:1989, ei_iso8859_9
ISO-IR-148, ei_iso8859_9
LATIN5, ei_iso8859_9
L5, ei_iso8859_9
CSISOLATIN5, ei_iso8859_9
ISO8859-9, ei_iso8859_9
ISO-8859-10, ei_iso8859_10
ISO_8859-10, ei_iso8859_10
ISO_8859-10:1992, ei_iso8859_10
ISO-IR-157, ei_iso8859_10
LATIN6, ei_iso8859_10
L6, ei_iso8859_10
CSISOLATIN6, ei_iso8859_10
ISO8859-10, ei_iso8859_10
ISO-8859-11, ei_iso8859_11
ISO_8859-11, ei_iso8859_11
ISO8859-11, ei_iso8859_11
ISO-8859-13, ei_iso8859_13
ISO_8859-13, ei_iso8859_13
ISO-IR-179, ei_iso8859_13
LATIN7, ei_iso8859_13
L7, ei_iso8859_13
ISO8859-13, ei_iso8859_13
ISO-8859-14, ei_iso8859_14
ISO_8859-14, ei_iso8859_14
ISO_8859-14:1998, ei_iso8859_14
ISO-IR-199, ei_iso8859_14
LATIN8, ei_iso8859_14
L8, ei_iso8859_14
ISO-CELTIC, ei_iso8859_14
ISO8859-14, ei_iso8859_14
ISO-8859-15, ei_iso8859_15
ISO_8859-15, ei_iso8859_15
ISO_8859-15:1998, ei_iso8859_15
ISO-IR-203, ei_iso8859_15
LATIN-9, ei_iso8859_15
ISO8859-15, ei_iso8859_15
ISO-8859-16, ei_iso8859_16
ISO_8859-16, ei_iso8859_16
ISO_8859-16:2001, ei_iso8859_16
ISO-IR-226, ei_iso8859_16
LATIN10, ei_iso8859_16
L10, ei_iso8859_16
ISO8859-16, ei_iso8859_16
KOI8-R, ei_koi8_r
CSKOI8R, ei_koi8_r
KOI8-U, ei_koi8_u
KOI8-RU, ei_koi8_ru
CP1250, ei_cp1250
WINDOWS-1250, ei_cp1250
MS-EE, ei_cp1250
CP1251, ei_cp1251
WINDOWS-1251, ei_cp1251
MS-CYRL, ei_cp1251
ANSI-1251, ei_cp1251
CP1252, ei_cp1252
WINDOWS-1252, ei_cp1252
MS-ANSI, ei_cp1252
CP1253, ei_cp1253
WINDOWS-1253, ei_cp1253
MS-GREEK, ei_cp1253
CP1254, ei_cp1254
WINDOWS-1254, ei_cp1254
MS-TURK, ei_cp1254
CP1255, ei_cp1255
WINDOWS-1255, ei_cp1255
MS-HEBR, ei_cp1255
CP1256, ei_cp1256
WINDOWS-1256, ei_cp1256
MS-ARAB, ei_cp1256
CP1257, ei_cp1257
WINDOWS-1257, ei_cp1257
WINBALTRIM, ei_cp1257
CP1258, ei_cp1258
WINDOWS-1258, ei_cp1258
CP850, ei_cp850
IBM850, ei_cp850
850, ei_cp850
CSPC850MULTILINGUAL, ei_cp850
CP862, ei_cp862
IBM862, ei_cp862
862, ei_cp862
CSPC862LATINHEBREW, ei_cp862
CP866, ei_cp866
IBM866, ei_cp866
866, ei_cp866
CSIBM866, ei_cp866
CP1131, ei_cp1131
MACROMAN, ei_mac_roman
MACINTOSH, ei_mac_roman
MAC, ei_mac_roman
CSMACINTOSH, ei_mac_roman
MACCENTRALEUROPE, ei_mac_centraleurope
MACICELAND, ei_mac_iceland
MACCROATIAN, ei_mac_croatian
MACROMANIA, ei_mac_romania
MACCYRILLIC, ei_mac_cyrillic
MACUKRAINE, ei_mac_ukraine
MACGREEK, ei_mac_greek
MACTURKISH, ei_mac_turkish
MACHEBREW, ei_mac_hebrew
MACARABIC, ei_mac_arabic
MACTHAI, ei_mac_thai
HP-ROMAN8, ei_hp_roman8
ROMAN8, ei_hp_roman8
R8, ei_hp_roman8
CSHPROMAN8, ei_hp_roman8
NEXTSTEP, ei_nextstep
ARMSCII-8, ei_armscii_8
GEORGIAN-ACADEMY, ei_georgian_academy
GEORGIAN-PS, ei_georgian_ps
KOI8-T, ei_koi8_t
PT154, ei_pt154
PTCP154, ei_pt154
CP154, ei_pt154
CYRILLIC-ASIAN, ei_pt154
CSPTCP154, ei_pt154
RK1048, ei_rk1048
STRK1048-2002, ei_rk1048
KZ-1048, ei_rk1048
CSKZ1048, ei_rk1048
MULELAO-1, ei_mulelao
CP1133, ei_cp1133
IBM-CP1133, ei_cp1133
TIS-620, ei_tis620
TIS620, ei_tis620
TIS620-0, ei_tis620
TIS620.2529-1, ei_tis620
TIS620.2533-0, ei_tis620
TIS620.2533-1, ei_tis620
ISO-IR-166, ei_tis620
TIS620.2533, ei_tis620
CP874, ei_cp874
WINDOWS-874, ei_cp874
VISCII, ei_viscii
VISCII1.1-1, ei_viscii
CSVISCII, ei_viscii
TCVN, ei_tcvn
TCVN-5712, ei_tcvn
TCVN5712-1, ei_tcvn
TCVN5712-1:1993, ei_tcvn
JIS_C6220-1969-RO, ei_iso646_jp
ISO646-JP, ei_iso646_jp
ISO-IR-14, ei_iso646_jp
JP, ei_iso646_jp
CSISO14JISC6220RO, ei_iso646_jp
JIS_X0201, ei_jisx0201
JISX0201-1976, ei_jisx0201
X0201, ei_jisx0201
CSHALFWIDTHKATAKANA, ei_jisx0201
JIS_X0208, ei_jisx0208
JIS_X0208-1983, ei_jisx0208
JIS_X0208-1990, ei_jisx0208
JIS0208, ei_jisx0208
X0208, ei_jisx0208
ISO-IR-87, ei_jisx0208
JIS_C6226-1983, ei_jisx0208
CSISO87JISX0208, ei_jisx0208
JIS_X0212, ei_jisx0212
JIS_X0212.1990-0, ei_jisx0212
JIS_X0212-1990, ei_jisx0212
X0212, ei_jisx0212
ISO-IR-159, ei_jisx0212
CSISO159JISX02121990, ei_jisx0212
GB_1988-80, ei_iso646_cn
ISO646-CN, ei_iso646_cn
ISO-IR-57, ei_iso646_cn
CN, ei_iso646_cn
CSISO57GB1988, ei_iso646_cn
GB_2312-80, ei_gb2312
ISO-IR-58, ei_gb2312
CSISO58GB231280, ei_gb2312
CHINESE, ei_gb2312
ISO-IR-165, ei_isoir165
CN-GB-ISOIR165, ei_isoir165
KSC_5601, ei_ksc5601
KS_C_5601-1987, ei_ksc5601
KS_C_5601-1989, ei_ksc5601
ISO-IR-149, ei_ksc5601
CSKSC56011987, ei_ksc5601
KOREAN, ei_ksc5601
EUC-JP, ei_euc_jp
EUCJP, ei_euc_jp
EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE, ei_euc_jp
CSEUCPKDFMTJAPANESE, ei_euc_jp
SHIFT_JIS, ei_sjis
SHIFT-JIS, ei_sjis
SJIS, ei_sjis
MS_KANJI, ei_sjis
CSSHIFTJIS, ei_sjis
PCK, ei_sjis
CP932, ei_cp932
ISO-2022-JP, ei_iso2022_jp
CSISO2022JP, ei_iso2022_jp
ISO-2022-JP-1, ei_iso2022_jp1
ISO-2022-JP-2, ei_iso2022_jp2
CSISO2022JP2, ei_iso2022_jp2
ISO-2022-JP-MS, ei_iso2022_jpms
CP50221, ei_iso2022_jpms
EUC-CN, ei_euc_cn
EUCCN, ei_euc_cn
GB2312, ei_euc_cn
CN-GB, ei_euc_cn
CSGB2312, ei_euc_cn
GBK, ei_ces_gbk
CP936, ei_cp936
MS936, ei_cp936
WINDOWS-936, ei_cp936
GB18030, ei_gb18030
ISO-2022-CN, ei_iso2022_cn
CSISO2022CN, ei_iso2022_cn
ISO-2022-CN-EXT, ei_iso2022_cn_ext
HZ, ei_hz
HZ-GB-2312, ei_hz
EUC-TW, ei_euc_tw
EUCTW, ei_euc_tw
CSEUCTW, ei_euc_tw
CNS11643, ei_euc_tw
BIG5, ei_ces_big5
BIG-5, ei_ces_big5
BIG-FIVE, ei_ces_big5
BIGFIVE, ei_ces_big5
CN-BIG5, ei_ces_big5
CSBIG5, ei_ces_big5
CP950, ei_cp950
BIG5-HKSCS:1999, ei_big5hkscs1999
BIG5-HKSCS:2001, ei_big5hkscs2001
BIG5-HKSCS:2004, ei_big5hkscs2004
BIG5-HKSCS, ei_big5hkscs2008
BIG5HKSCS, ei_big5hkscs2008
BIG5-HKSCS:2008, ei_big5hkscs2008
EUC-KR, ei_euc_kr
EUCKR, ei_euc_kr
CSEUCKR, ei_euc_kr
5601, ei_euc_kr
CP949, ei_cp949
UHC, ei_cp949
JOHAB, ei_johab
CP1361, ei_johab
KO_KR.JOHAP92, ei_johab
ISO-2022-KR, ei_iso2022_kr
CSISO2022KR, ei_iso2022_kr
CHAR, ei_local_char
WCHAR_T, ei_local_wchar_t
File diff suppressed because it is too large Load Diff
+241
View File
@@ -0,0 +1,241 @@
S(zos_0, "IBM-037", ei_ebcdic037 )
S(zos_1, "IBM037", ei_ebcdic037 )
S(zos_2, "CP037", ei_ebcdic037 )
S(zos_3, "EBCDIC-CP-US", ei_ebcdic037 )
S(zos_4, "EBCDIC-CP-CA", ei_ebcdic037 )
S(zos_5, "EBCDIC-CP-WT", ei_ebcdic037 )
S(zos_6, "EBCDIC-CP-NL", ei_ebcdic037 )
S(zos_7, "CSIBM037", ei_ebcdic037 )
S(zos_8, "IBM-273", ei_ebcdic273 )
S(zos_9, "IBM273", ei_ebcdic273 )
S(zos_10, "CP273", ei_ebcdic273 )
S(zos_11, "CSIBM273", ei_ebcdic273 )
S(zos_12, "IBM-277", ei_ebcdic277 )
S(zos_13, "IBM277", ei_ebcdic277 )
S(zos_14, "EBCDIC-CP-DK", ei_ebcdic277 )
S(zos_15, "EBCDIC-CP-NO", ei_ebcdic277 )
S(zos_16, "CSIBM277", ei_ebcdic277 )
S(zos_17, "IBM-278", ei_ebcdic278 )
S(zos_18, "IBM278", ei_ebcdic278 )
S(zos_19, "CP278", ei_ebcdic278 )
S(zos_20, "EBCDIC-CP-FI", ei_ebcdic278 )
S(zos_21, "EBCDIC-CP-SE", ei_ebcdic278 )
S(zos_22, "CSIBM278", ei_ebcdic278 )
S(zos_23, "IBM-280", ei_ebcdic280 )
S(zos_24, "IBM280", ei_ebcdic280 )
S(zos_25, "CP280", ei_ebcdic280 )
S(zos_26, "EBCDIC-CP-IT", ei_ebcdic280 )
S(zos_27, "CSIBM280", ei_ebcdic280 )
S(zos_28, "IBM-282", ei_ebcdic282 )
S(zos_29, "IBM282", ei_ebcdic282 )
S(zos_30, "IBM-284", ei_ebcdic284 )
S(zos_31, "IBM284", ei_ebcdic284 )
S(zos_32, "CP284", ei_ebcdic284 )
S(zos_33, "EBCDIC-CP-ES", ei_ebcdic284 )
S(zos_34, "CSIBM284", ei_ebcdic284 )
S(zos_35, "IBM-285", ei_ebcdic285 )
S(zos_36, "IBM285", ei_ebcdic285 )
S(zos_37, "CP285", ei_ebcdic285 )
S(zos_38, "EBCDIC-CP-GB", ei_ebcdic285 )
S(zos_39, "CSIBM285", ei_ebcdic285 )
S(zos_40, "IBM-297", ei_ebcdic297 )
S(zos_41, "IBM297", ei_ebcdic297 )
S(zos_42, "CP297", ei_ebcdic297 )
S(zos_43, "EBCDIC-CP-FR", ei_ebcdic297 )
S(zos_44, "CSIBM297", ei_ebcdic297 )
S(zos_45, "IBM-423", ei_ebcdic423 )
S(zos_46, "IBM423", ei_ebcdic423 )
S(zos_47, "CP423", ei_ebcdic423 )
S(zos_48, "EBCDIC-CP-GR", ei_ebcdic423 )
S(zos_49, "CSIBM423", ei_ebcdic423 )
S(zos_50, "IBM-424", ei_ebcdic424 )
S(zos_51, "IBM424", ei_ebcdic424 )
S(zos_52, "CP424", ei_ebcdic424 )
S(zos_53, "EBCDIC-CP-HE", ei_ebcdic424 )
S(zos_54, "CSIBM424", ei_ebcdic424 )
S(zos_55, "IBM-425", ei_ebcdic425 )
S(zos_56, "IBM425", ei_ebcdic425 )
S(zos_57, "IBM-500", ei_ebcdic500 )
S(zos_58, "IBM500", ei_ebcdic500 )
S(zos_59, "CP500", ei_ebcdic500 )
S(zos_60, "EBCDIC-CP-BE", ei_ebcdic500 )
S(zos_61, "EBCDIC-CP-CH", ei_ebcdic500 )
S(zos_62, "CSIBM500", ei_ebcdic500 )
S(zos_63, "IBM-838", ei_ebcdic838 )
S(zos_64, "IBM838", ei_ebcdic838 )
S(zos_65, "IBM-THAI", ei_ebcdic838 )
S(zos_66, "CSIBMTHAI", ei_ebcdic838 )
S(zos_67, "IBM-870", ei_ebcdic870 )
S(zos_68, "IBM870", ei_ebcdic870 )
S(zos_69, "CP870", ei_ebcdic870 )
S(zos_70, "EBCDIC-CP-ROECE", ei_ebcdic870 )
S(zos_71, "EBCDIC-CP-YU", ei_ebcdic870 )
S(zos_72, "CSIBM870", ei_ebcdic870 )
S(zos_73, "IBM-871", ei_ebcdic871 )
S(zos_74, "IBM871", ei_ebcdic871 )
S(zos_75, "CP871", ei_ebcdic871 )
S(zos_76, "EBCDIC-CP-IS", ei_ebcdic871 )
S(zos_77, "CSIBM871", ei_ebcdic871 )
S(zos_78, "IBM-875", ei_ebcdic875 )
S(zos_79, "IBM875", ei_ebcdic875 )
S(zos_80, "CP875", ei_ebcdic875 )
S(zos_81, "EBCDIC-GREEK", ei_ebcdic875 )
S(zos_82, "IBM-880", ei_ebcdic880 )
S(zos_83, "IBM880", ei_ebcdic880 )
S(zos_84, "CP880", ei_ebcdic880 )
S(zos_85, "EBCDIC-CYRILLIC", ei_ebcdic880 )
S(zos_86, "CSIBM880", ei_ebcdic880 )
S(zos_87, "IBM-905", ei_ebcdic905 )
S(zos_88, "IBM905", ei_ebcdic905 )
S(zos_89, "CP905", ei_ebcdic905 )
S(zos_90, "EBCDIC-CP-TR", ei_ebcdic905 )
S(zos_91, "CSIBM905", ei_ebcdic905 )
S(zos_92, "IBM-924", ei_ebcdic924 )
S(zos_93, "IBM924", ei_ebcdic924 )
S(zos_94, "IBM00924", ei_ebcdic924 )
S(zos_95, "CCSID00924", ei_ebcdic924 )
S(zos_96, "CP00924", ei_ebcdic924 )
S(zos_97, "EBCDIC-LATIN9-EURO", ei_ebcdic924 )
S(zos_98, "CSIBM00924", ei_ebcdic924 )
S(zos_99, "IBM-1025", ei_ebcdic1025 )
S(zos_100, "IBM1025", ei_ebcdic1025 )
S(zos_101, "CP1025", ei_ebcdic1025 )
S(zos_102, "IBM-1026", ei_ebcdic1026 )
S(zos_103, "IBM1026", ei_ebcdic1026 )
S(zos_104, "CP1026", ei_ebcdic1026 )
S(zos_105, "CSIBM1026", ei_ebcdic1026 )
S(zos_106, "IBM-1047", ei_ebcdic1047 )
S(zos_107, "IBM1047", ei_ebcdic1047 )
S(zos_108, "CP1047", ei_ebcdic1047 )
S(zos_109, "CSIBM1047", ei_ebcdic1047 )
S(zos_110, "IBM-1097", ei_ebcdic1097 )
S(zos_111, "IBM1097", ei_ebcdic1097 )
S(zos_112, "CP1097", ei_ebcdic1097 )
S(zos_113, "IBM-1112", ei_ebcdic1112 )
S(zos_114, "IBM1112", ei_ebcdic1112 )
S(zos_115, "CP1112", ei_ebcdic1112 )
S(zos_116, "IBM-1122", ei_ebcdic1122 )
S(zos_117, "IBM1122", ei_ebcdic1122 )
S(zos_118, "CP1122", ei_ebcdic1122 )
S(zos_119, "IBM-1123", ei_ebcdic1123 )
S(zos_120, "IBM1123", ei_ebcdic1123 )
S(zos_121, "CP1123", ei_ebcdic1123 )
S(zos_122, "IBM-1130", ei_ebcdic1130 )
S(zos_123, "IBM1130", ei_ebcdic1130 )
S(zos_124, "CP1130", ei_ebcdic1130 )
S(zos_125, "IBM-1132", ei_ebcdic1132 )
S(zos_126, "IBM1132", ei_ebcdic1132 )
S(zos_127, "CP1132", ei_ebcdic1132 )
S(zos_128, "IBM-1137", ei_ebcdic1137 )
S(zos_129, "IBM1137", ei_ebcdic1137 )
S(zos_130, "CP1137", ei_ebcdic1137 )
S(zos_131, "IBM-1140", ei_ebcdic1140 )
S(zos_132, "IBM1140", ei_ebcdic1140 )
S(zos_133, "IBM01140", ei_ebcdic1140 )
S(zos_134, "CCSID01140", ei_ebcdic1140 )
S(zos_135, "CP01140", ei_ebcdic1140 )
S(zos_136, "EBCDIC-US-37+EURO", ei_ebcdic1140 )
S(zos_137, "CSIBM01140", ei_ebcdic1140 )
S(zos_138, "IBM-1141", ei_ebcdic1141 )
S(zos_139, "IBM1141", ei_ebcdic1141 )
S(zos_140, "IBM01141", ei_ebcdic1141 )
S(zos_141, "CCSID01141", ei_ebcdic1141 )
S(zos_142, "CP01141", ei_ebcdic1141 )
S(zos_143, "EBCDIC-DE-273+EURO", ei_ebcdic1141 )
S(zos_144, "CSIBM01141", ei_ebcdic1141 )
S(zos_145, "IBM-1142", ei_ebcdic1142 )
S(zos_146, "IBM1142", ei_ebcdic1142 )
S(zos_147, "IBM01142", ei_ebcdic1142 )
S(zos_148, "CCSID01142", ei_ebcdic1142 )
S(zos_149, "CP01142", ei_ebcdic1142 )
S(zos_150, "EBCDIC-DK-277+EURO", ei_ebcdic1142 )
S(zos_151, "EBCDIC-NO-277+EURO", ei_ebcdic1142 )
S(zos_152, "CSIBM01142", ei_ebcdic1142 )
S(zos_153, "IBM-1143", ei_ebcdic1143 )
S(zos_154, "IBM1143", ei_ebcdic1143 )
S(zos_155, "IBM01143", ei_ebcdic1143 )
S(zos_156, "CCSID01143", ei_ebcdic1143 )
S(zos_157, "CP01143", ei_ebcdic1143 )
S(zos_158, "EBCDIC-FI-278+EURO", ei_ebcdic1143 )
S(zos_159, "EBCDIC-SE-278+EURO", ei_ebcdic1143 )
S(zos_160, "CSIBM01143", ei_ebcdic1143 )
S(zos_161, "IBM-1144", ei_ebcdic1144 )
S(zos_162, "IBM1144", ei_ebcdic1144 )
S(zos_163, "IBM01144", ei_ebcdic1144 )
S(zos_164, "CCSID01144", ei_ebcdic1144 )
S(zos_165, "CP01144", ei_ebcdic1144 )
S(zos_166, "EBCDIC-IT-280+EURO", ei_ebcdic1144 )
S(zos_167, "CSPC8CODEPAGE1144", ei_ebcdic1144 )
S(zos_168, "IBM-1145", ei_ebcdic1145 )
S(zos_169, "IBM1145", ei_ebcdic1145 )
S(zos_170, "IBM01145", ei_ebcdic1145 )
S(zos_171, "CCSID01145", ei_ebcdic1145 )
S(zos_172, "CP01145", ei_ebcdic1145 )
S(zos_173, "EBCDIC-ES-284+EURO", ei_ebcdic1145 )
S(zos_174, "CSIBM01145", ei_ebcdic1145 )
S(zos_175, "IBM-1146", ei_ebcdic1146 )
S(zos_176, "IBM1146", ei_ebcdic1146 )
S(zos_177, "IBM01146", ei_ebcdic1146 )
S(zos_178, "CCSID01146", ei_ebcdic1146 )
S(zos_179, "CP01146", ei_ebcdic1146 )
S(zos_180, "EBCDIC-GB-285+EURO", ei_ebcdic1146 )
S(zos_181, "CSPC8CODEPAGE1146", ei_ebcdic1146 )
S(zos_182, "IBM-1147", ei_ebcdic1147 )
S(zos_183, "IBM1147", ei_ebcdic1147 )
S(zos_184, "IBM01147", ei_ebcdic1147 )
S(zos_185, "CCSID01147", ei_ebcdic1147 )
S(zos_186, "CP01147", ei_ebcdic1147 )
S(zos_187, "EBCDIC-FR-297+EURO", ei_ebcdic1147 )
S(zos_188, "CSIBM01147", ei_ebcdic1147 )
S(zos_189, "IBM-1148", ei_ebcdic1148 )
S(zos_190, "IBM1148", ei_ebcdic1148 )
S(zos_191, "IBM01148", ei_ebcdic1148 )
S(zos_192, "CCSID01148", ei_ebcdic1148 )
S(zos_193, "CP01148", ei_ebcdic1148 )
S(zos_194, "EBCDIC-INTERNATIONAL-500+EURO", ei_ebcdic1148 )
S(zos_195, "CSIBM01148", ei_ebcdic1148 )
S(zos_196, "IBM-1149", ei_ebcdic1149 )
S(zos_197, "IBM1149", ei_ebcdic1149 )
S(zos_198, "IBM01149", ei_ebcdic1149 )
S(zos_199, "CCSID01149", ei_ebcdic1149 )
S(zos_200, "CP01149", ei_ebcdic1149 )
S(zos_201, "EBCDIC-IS-871+EURO", ei_ebcdic1149 )
S(zos_202, "CSIBM01149", ei_ebcdic1149 )
S(zos_203, "IBM-1153", ei_ebcdic1153 )
S(zos_204, "IBM1153", ei_ebcdic1153 )
S(zos_205, "CP1153", ei_ebcdic1153 )
S(zos_206, "IBM-1154", ei_ebcdic1154 )
S(zos_207, "IBM1154", ei_ebcdic1154 )
S(zos_208, "CP1154", ei_ebcdic1154 )
S(zos_209, "IBM-1155", ei_ebcdic1155 )
S(zos_210, "IBM1155", ei_ebcdic1155 )
S(zos_211, "CP1155", ei_ebcdic1155 )
S(zos_212, "IBM-1156", ei_ebcdic1156 )
S(zos_213, "IBM1156", ei_ebcdic1156 )
S(zos_214, "CP1156", ei_ebcdic1156 )
S(zos_215, "IBM-1157", ei_ebcdic1157 )
S(zos_216, "IBM1157", ei_ebcdic1157 )
S(zos_217, "CP1157", ei_ebcdic1157 )
S(zos_218, "IBM-1158", ei_ebcdic1158 )
S(zos_219, "IBM1158", ei_ebcdic1158 )
S(zos_220, "CP1158", ei_ebcdic1158 )
S(zos_221, "IBM-1160", ei_ebcdic1160 )
S(zos_222, "IBM1160", ei_ebcdic1160 )
S(zos_223, "CP1160", ei_ebcdic1160 )
S(zos_224, "IBM-1164", ei_ebcdic1164 )
S(zos_225, "IBM1164", ei_ebcdic1164 )
S(zos_226, "CP1164", ei_ebcdic1164 )
S(zos_227, "IBM-1165", ei_ebcdic1165 )
S(zos_228, "IBM1165", ei_ebcdic1165 )
S(zos_229, "IBM-1166", ei_ebcdic1166 )
S(zos_230, "IBM1166", ei_ebcdic1166 )
S(zos_231, "CP1166", ei_ebcdic1166 )
S(zos_232, "IBM-4971", ei_ebcdic4971 )
S(zos_233, "IBM4971", ei_ebcdic4971 )
S(zos_234, "CP4971", ei_ebcdic4971 )
S(zos_235, "IBM-12712", ei_ebcdic12712 )
S(zos_236, "IBM12712", ei_ebcdic12712 )
S(zos_237, "CP12712", ei_ebcdic12712 )
S(zos_238, "IBM-16804", ei_ebcdic16804 )
S(zos_239, "IBM16804", ei_ebcdic16804 )
S(zos_240, "CP16804", ei_ebcdic16804 )
+115
View File
@@ -0,0 +1,115 @@
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* ARMSCII-8
*/
static const unsigned short armscii_8_2uni[96] = {
/* 0xa0 */
0x00a0, 0xfffd, 0x0587, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab,
0x2014, 0x002e, 0x055d, 0x002c, 0x002d, 0x058a, 0x2026, 0x055c,
/* 0xb0 */
0x055b, 0x055e, 0x0531, 0x0561, 0x0532, 0x0562, 0x0533, 0x0563,
0x0534, 0x0564, 0x0535, 0x0565, 0x0536, 0x0566, 0x0537, 0x0567,
/* 0xc0 */
0x0538, 0x0568, 0x0539, 0x0569, 0x053a, 0x056a, 0x053b, 0x056b,
0x053c, 0x056c, 0x053d, 0x056d, 0x053e, 0x056e, 0x053f, 0x056f,
/* 0xd0 */
0x0540, 0x0570, 0x0541, 0x0571, 0x0542, 0x0572, 0x0543, 0x0573,
0x0544, 0x0574, 0x0545, 0x0575, 0x0546, 0x0576, 0x0547, 0x0577,
/* 0xe0 */
0x0548, 0x0578, 0x0549, 0x0579, 0x054a, 0x057a, 0x054b, 0x057b,
0x054c, 0x057c, 0x054d, 0x057d, 0x054e, 0x057e, 0x054f, 0x057f,
/* 0xf0 */
0x0550, 0x0580, 0x0551, 0x0581, 0x0552, 0x0582, 0x0553, 0x0583,
0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x055a, 0xfffd,
};
static int
armscii_8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = armscii_8_2uni[c-0xa0];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char armscii_8_page00[8] = {
0xa5, 0xa4, 0x2a, 0x2b, 0xab, 0xac, 0xa9, 0x2f, /* 0x28-0x2f */
};
static const unsigned char armscii_8_page00_1[32] = {
0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
};
static const unsigned char armscii_8_page05[96] = {
0x00, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, /* 0x30-0x37 */
0xc0, 0xc2, 0xc4, 0xc6, 0xc8, 0xca, 0xcc, 0xce, /* 0x38-0x3f */
0xd0, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde, /* 0x40-0x47 */
0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, /* 0x48-0x4f */
0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0xfe, 0xb0, 0xaf, 0xaa, 0xb1, 0x00, /* 0x58-0x5f */
0x00, 0xb3, 0xb5, 0xb7, 0xb9, 0xbb, 0xbd, 0xbf, /* 0x60-0x67 */
0xc1, 0xc3, 0xc5, 0xc7, 0xc9, 0xcb, 0xcd, 0xcf, /* 0x68-0x6f */
0xd1, 0xd3, 0xd5, 0xd7, 0xd9, 0xdb, 0xdd, 0xdf, /* 0x70-0x77 */
0xe1, 0xe3, 0xe5, 0xe7, 0xe9, 0xeb, 0xed, 0xef, /* 0x78-0x7f */
0xf1, 0xf3, 0xf5, 0xf7, 0xf9, 0xfb, 0xfd, 0xa2, /* 0x80-0x87 */
0x00, 0xa3, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
};
static const unsigned char armscii_8_page20[24] = {
0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00, /* 0x20-0x27 */
};
static int
armscii_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0028) {
*r = wc;
return 1;
}
else if (wc >= 0x0028 && wc < 0x0030)
c = armscii_8_page00[wc-0x0028];
else if (wc >= 0x0030 && wc < 0x00a0)
c = wc;
else if (wc >= 0x00a0 && wc < 0x00c0)
c = armscii_8_page00_1[wc-0x00a0];
else if (wc >= 0x0530 && wc < 0x0590)
c = armscii_8_page05[wc-0x0530];
else if (wc >= 0x2010 && wc < 0x2028)
c = armscii_8_page20[wc-0x2010];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
+43
View File
@@ -0,0 +1,43 @@
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* ASCII
*/
static int
ascii_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
return RET_ILSEQ;
}
static int
ascii_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
if (wc < 0x0080) {
*r = wc;
return 1;
}
return RET_ILUNI;
}
+157
View File
@@ -0,0 +1,157 @@
/*
* Copyright (C) 1999-2005, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* Atari ST
*/
static const unsigned short atarist_2uni[128] = {
/* 0x80 */
0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7,
0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5,
/* 0x90 */
0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9,
0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3, 0x00a5, 0x00df, 0x0192,
/* 0xa0 */
0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba,
0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb,
/* 0xb0 */
0x00e3, 0x00f5, 0x00d8, 0x00f8, 0x0153, 0x0152, 0x00c0, 0x00c3,
0x00d5, 0x00a8, 0x00b4, 0x2020, 0x00b6, 0x00a9, 0x00ae, 0x2122,
/* 0xc0 */
0x0133, 0x0132, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5,
0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05db, 0x05dc, 0x05de, 0x05e0,
/* 0xd0 */
0x05e1, 0x05e2, 0x05e4, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea,
0x05df, 0x05da, 0x05dd, 0x05e3, 0x05e5, 0x00a7, 0x2227, 0x221e,
/* 0xe0 */
0x03b1, 0x03b2, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4,
0x03a6, 0x0398, 0x03a9, 0x03b4, 0x222e, 0x03c6, 0x2208, 0x2229,
/* 0xf0 */
0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248,
0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x00b3, 0x00af,
};
static int
atarist_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80)
*pwc = (ucs4_t) c;
else
*pwc = (ucs4_t) atarist_2uni[c-0x80];
return 1;
}
static const unsigned char atarist_page00[96] = {
0x00, 0xad, 0x9b, 0x9c, 0x00, 0x9d, 0x00, 0xdd, /* 0xa0-0xa7 */
0xb9, 0xbd, 0xa6, 0xae, 0xaa, 0x00, 0xbe, 0xff, /* 0xa8-0xaf */
0xf8, 0xf1, 0xfd, 0xfe, 0xba, 0xe6, 0xbc, 0xfa, /* 0xb0-0xb7 */
0x00, 0x00, 0xa7, 0xaf, 0xac, 0xab, 0x00, 0xa8, /* 0xb8-0xbf */
0xb6, 0x00, 0x00, 0xb7, 0x8e, 0x8f, 0x92, 0x80, /* 0xc0-0xc7 */
0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
0x00, 0xa5, 0x00, 0x00, 0x00, 0xb8, 0x99, 0x00, /* 0xd0-0xd7 */
0xb2, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x9e, /* 0xd8-0xdf */
0x85, 0xa0, 0x83, 0xb0, 0x84, 0x86, 0x91, 0x87, /* 0xe0-0xe7 */
0x8a, 0x82, 0x88, 0x89, 0x8d, 0xa1, 0x8c, 0x8b, /* 0xe8-0xef */
0x00, 0xa4, 0x95, 0xa2, 0x93, 0xb1, 0x94, 0xf6, /* 0xf0-0xf7 */
0xb3, 0x97, 0xa3, 0x96, 0x81, 0x00, 0x00, 0x98, /* 0xf8-0xff */
};
static const unsigned char atarist_page01[104] = {
0x00, 0x00, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0x00, 0x00, 0xb5, 0xb4, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char atarist_page03[56] = {
0x00, 0x00, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0xe8, 0x00, /* 0xa0-0xa7 */
0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0xe0, 0xe1, 0x00, 0xeb, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
0xe3, 0x00, 0x00, 0xe5, 0xe7, 0x00, 0xed, 0x00, /* 0xc0-0xc7 */
};
static const unsigned char atarist_page05[32] = {
0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, /* 0xd0-0xd7 */
0xca, 0xcb, 0xd9, 0xcc, 0xcd, 0xda, 0xce, 0xd8, /* 0xd8-0xdf */
0xcf, 0xd0, 0xd1, 0xdb, 0xd2, 0xdc, 0xd3, 0xd4, /* 0xe0-0xe7 */
0xd5, 0xd6, 0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
};
static const unsigned char atarist_page22[96] = {
0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0xf9, 0xfb, 0x00, 0x00, 0x00, 0xdf, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, /* 0x20-0x27 */
0x00, 0xef, 0x00, 0x00, 0x00, 0x00, 0xec, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0xf0, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */
};
static const unsigned char atarist_page23[24] = {
0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0xf4, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
};
static int
atarist_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x0100)
c = atarist_page00[wc-0x00a0];
else if (wc >= 0x0130 && wc < 0x0198)
c = atarist_page01[wc-0x0130];
else if (wc >= 0x0390 && wc < 0x03c8)
c = atarist_page03[wc-0x0390];
else if (wc >= 0x05d0 && wc < 0x05f0)
c = atarist_page05[wc-0x05d0];
else if (wc == 0x2020)
c = 0xbb;
else if (wc == 0x207f)
c = 0xfc;
else if (wc == 0x2122)
c = 0xbf;
else if (wc >= 0x2208 && wc < 0x2268)
c = atarist_page22[wc-0x2208];
else if (wc >= 0x2310 && wc < 0x2328)
c = atarist_page23[wc-0x2310];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
+4159
View File
File diff suppressed because it is too large Load Diff
+475
View File
@@ -0,0 +1,475 @@
/*
* Copyright (C) 1999-2001, 2005, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* BIG5-2003
*/
/*
* BIG5-2003 is a slightly extended and slightly modified version of BIG5.
* It is actually nearer to Microsoft CP950 than to BIG5. The differences
* between EASTASIA/OTHER/BIG5.TXT found on ftp.unicode.org and BIG5-2003.TXT
* are as follows:
*
* 1. Some characters in the symbols area (0xA140..0xA2CE) are defined
* differently:
*
* code BIG5.TXT BIG5-2003.TXT
* 0xA145 0x2022 # BULLET 0x2027 # HYPHENATION POINT
* 0xA14E 0xFF64 # HALFWIDTH IDEOGRAPHIC COMMA
* 0xFE51 # SMALL IDEOGRAPHIC COMMA
* 0xA156 0x2013 # EN DASH 0x2015 # HORIZONTAL BAR
* 0xA15A --- 0x2574 # BOX DRAWINGS LIGHT LEFT
* 0xA1C3 --- 0xFFE3 # FULLWIDTH MACRON
* 0xA1C5 --- 0x02CD # MODIFIER LETTER LOW MACRON
* 0xA1E3 0x223C # TILDE OPERATOR 0xFF5E # FULLWIDTH TILDE
* 0xA1F2 0x2641 # EARTH 0x2295 # CIRCLED PLUS
* 0xA1F3 0x2609 # SUN 0x2299 # CIRCLED DOT OPERATOR
* 0xA1FE --- 0xFF0F # FULLWIDTH SOLIDUS
* 0xA240 --- 0xFF3C # FULLWIDTH REVERSE SOLIDUS
* 0xA241 0xFF0F # FULLWIDTH SOLIDUS 0x2215 # DIVISION SLASH
* 0xA242 0xFF3C # FULLWIDTH REVERSE SOLIDUS
* 0xFE68 # SMALL REVERSE SOLIDUS
* 0xA244 0x00A5 # YEN SIGN 0xFFE5 # FULLWIDTH YEN SIGN
* 0xA246 0x00A2 # CENT SIGN 0xFFE0 # FULLWIDTH CENT SIGN
* 0xA247 0x00A3 # POUND SIGN 0xFFE1 # FULLWIDTH POUND SIGN
* 0xA2A4 0x2550 # BOX DRAWINGS DOUBLE HORIZONTAL
* 0x2501 # BOX DRAWINGS HEAVY HORIZONTAL
* 0xA2A5 0x255E # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
* 0x251D # BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY
* 0xA2A6 0x256A # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
* 0x253F # BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY
* 0xA2A7 0x2561 # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
* 0x2525 # BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY
* 0xA2CC --- 0x3038 # HANGZHOU NUMERAL TEN
* 0xA2CD 0x5344 0x3039 # HANGZHOU NUMERAL TWENTY
* 0xA2CE --- 0x303A # HANGZHOU NUMERAL THIRTY
*
* 2. A control symbols area is added:
*
* code
* 0xA3C0..0xA3E0 U+2400..U+2421
*
* 3. The Euro sign is added:
*
* code
* 0xA3E1 0x20AC # EURO SIGN
*
* 4. Some characters in the main area are defined differently:
*
* code BIG5.TXT BIG5-2003.TXT
* 0xC255 0x5F5D 0x5F5E
*
* 5. The area 0xC6A1..0xC7FE is organized differently:
*
* code
* 0xC6A1..0xC6BE numerals (was in BIG5.TXT at 0xC7E9..0xC7FC)
* 0xC6BF..0xC6D7 radicals
* 0xC6D8..0xC6E6 rarely used symbols
* 0xC6E7..0xC77A hiragana (U+3041..U+3093, was in BIG5.TXT at 0xC6A5..0xC6F7)
* 0xC77B..0xC7F2 katakana (U+30A1..U+30F6, was in BIG5.TXT at 0xC6F8..0xC7B0)
*
* 6. Some characters are added at 0xF9D6..0xF9DC.
*
* 7. Box drawing characters are added at 0xF9DD..0xF9FE.
*
* Note: 4 of these characters are mapped in a non-inversible way, because
* Unicode does not yet include the corresponding characters:
*
* code Unicode approximation
* 0xF9FA BOX DRAWINGS DOUBLE ARC DOWN AND RIGHT 0x2554
* 0xF9FB BOX DRAWINGS DOUBLE ARC DOWN AND LEFT 0x2557
* 0xF9FC BOX DRAWINGS DOUBLE ARC UP AND RIGHT 0x255A
* 0xF9FD BOX DRAWINGS DOUBLE ARC UP AND LEFT 0x255D
*
* 8. Private area mappings are added:
*
* code Unicode
* 0x{81..8D}{40..7E,A1..FE} U+EEB8..U+F6B0
* 0x{8E..A0}{40..7E,A1..FE} U+E311..U+EEB7
* 0x{FA..FE}{40..7E,A1..FE} U+E000..U+E310
*
* These mappings are not contained in the BSMI Big5-2003 standard. However,
* they were contained in a draft of it.
*/
static const unsigned short big5_2003_2uni_pagea1[314] = {
/* 0xa1 */
0x3000, 0xff0c, 0x3001, 0x3002, 0xff0e, 0x2027, 0xff1b, 0xff1a,
0xff1f, 0xff01, 0xfe30, 0x2026, 0x2025, 0xfe50, 0xfe51, 0xfe52,
0x00b7, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xff5c, 0x2015, 0xfe31,
0x2014, 0xfe33, 0x2574, 0xfe34, 0xfe4f, 0xff08, 0xff09, 0xfe35,
0xfe36, 0xff5b, 0xff5d, 0xfe37, 0xfe38, 0x3014, 0x3015, 0xfe39,
0xfe3a, 0x3010, 0x3011, 0xfe3b, 0xfe3c, 0x300a, 0x300b, 0xfe3d,
0xfe3e, 0x3008, 0x3009, 0xfe3f, 0xfe40, 0x300c, 0x300d, 0xfe41,
0xfe42, 0x300e, 0x300f, 0xfe43, 0xfe44, 0xfe59, 0xfe5a, 0xfe5b,
0xfe5c, 0xfe5d, 0xfe5e, 0x2018, 0x2019, 0x201c, 0x201d, 0x301d,
0x301e, 0x2035, 0x2032, 0xff03, 0xff06, 0xff0a, 0x203b, 0x00a7,
0x3003, 0x25cb, 0x25cf, 0x25b3, 0x25b2, 0x25ce, 0x2606, 0x2605,
0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25bd, 0x25bc, 0x32a3, 0x2105,
0x203e, 0xffe3, 0xff3f, 0x02cd, 0xfe49, 0xfe4a, 0xfe4d, 0xfe4e,
0xfe4b, 0xfe4c, 0xfe5f, 0xfe60, 0xfe61, 0xff0b, 0xff0d, 0x00d7,
0x00f7, 0x00b1, 0x221a, 0xff1c, 0xff1e, 0xff1d, 0x2266, 0x2267,
0x2260, 0x221e, 0x2252, 0x2261, 0xfe62, 0xfe63, 0xfe64, 0xfe65,
0xfe66, 0xff5e, 0x2229, 0x222a, 0x22a5, 0x2220, 0x221f, 0x22bf,
0x33d2, 0x33d1, 0x222b, 0x222e, 0x2235, 0x2234, 0x2640, 0x2642,
0x2295, 0x2299, 0x2191, 0x2193, 0x2190, 0x2192, 0x2196, 0x2197,
0x2199, 0x2198, 0x2225, 0x2223, 0xff0f,
/* 0xa2 */
0xff3c, 0x2215, 0xfe68, 0xff04, 0xffe5, 0x3012, 0xffe0, 0xffe1,
0xff05, 0xff20, 0x2103, 0x2109, 0xfe69, 0xfe6a, 0xfe6b, 0x33d5,
0x339c, 0x339d, 0x339e, 0x33ce, 0x33a1, 0x338e, 0x338f, 0x33c4,
0x00b0, 0x5159, 0x515b, 0x515e, 0x515d, 0x5161, 0x5163, 0x55e7,
0x74e9, 0x7cce, 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586,
0x2587, 0x2588, 0x258f, 0x258e, 0x258d, 0x258c, 0x258b, 0x258a,
0x2589, 0x253c, 0x2534, 0x252c, 0x2524, 0x251c, 0x2594, 0x2500,
0x2502, 0x2595, 0x250c, 0x2510, 0x2514, 0x2518, 0x256d, 0x256e,
0x2570, 0x256f, 0x2501, 0x251d, 0x253f, 0x2525, 0x25e2, 0x25e3,
0x25e5, 0x25e4, 0x2571, 0x2572, 0x2573, 0xff10, 0xff11, 0xff12,
0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0x2160,
0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168,
0x2169, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027,
0x3028, 0x3029, 0x3038, 0x3039, 0x303a, 0xff21, 0xff22, 0xff23,
0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29, 0xff2a, 0xff2b,
0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31, 0xff32, 0xff33,
0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, 0xff3a, 0xff41,
0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49,
0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51,
0xff52, 0xff53, 0xff54, 0xff55, 0xff56,
};
static const unsigned short big5_2003_2uni_pagec6[70] = {
/* 0xc6a1 */
0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467,
0x2468, 0x2469, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479,
0x247a, 0x247b, 0x247c, 0x247d, 0x2170, 0x2171, 0x2172, 0x2173,
0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x2f02, 0x2f03,
0x2f05, 0x2f07, 0x2f0c, 0x2f0d, 0x2f0e, 0x2f13, 0x2f16, 0x2f19,
0x2f1b, 0x2f22, 0x2f27, 0x2f2e, 0x2f33, 0x2f34, 0x2f35, 0x2f39,
0x2f3a, 0x2f41, 0x2f46, 0x2f67, 0x2f68, 0x2fa1, 0x2faa, 0x00a8,
0xff3e, 0x30fd, 0x30fe, 0x309d, 0x309e, 0xfffd, 0xfffd, 0x3005,
0x3006, 0x3007, 0x30fc, 0xff3b, 0xff3d, 0x273d,
};
static const unsigned short big5_2003_2uni_pagef9[41] = {
/* 0xf9d6 */
0x7881, 0x92b9, 0x88cf, 0x58bb, 0x6052, 0x7ca7, 0x5afa,
/* 0xf9dd */
0x2554, 0x2566, 0x2557, 0x2560, 0x256c, 0x2563, 0x255a, 0x2569,
0x255d, 0x2552, 0x2564, 0x2555, 0x255e, 0x256a, 0x2561, 0x2558,
0x2567, 0x255b, 0x2553, 0x2565, 0x2556, 0x255f, 0x256b, 0x2562,
0x2559, 0x2568, 0x255c, 0x2551, 0x2550,
0x2554, 0x2557, 0x255a, 0x255d, /* not invertible */
0x2593,
};
static int
big5_2003_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0x81 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (c >= 0xa1) {
if (c < 0xa3) {
unsigned int i = 157 * (c - 0xa1) + (c2 - (c2 >= 0xa1 ? 0x62 : 0x40));
unsigned short wc = big5_2003_2uni_pagea1[i];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 2;
}
}
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
if (!(c == 0xc2 && c2 == 0x55)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
if (c == 0xa3) {
if (c2 >= 0xc0 && c2 <= 0xe1) {
*pwc = (c2 == 0xe1 ? 0x20ac : c2 == 0xe0 ? 0x2421 : 0x2340 + c2);
return 2;
}
} else if (c == 0xf9) {
if (c2 >= 0xd6) {
*pwc = big5_2003_2uni_pagef9[c2-0xd6];
return 2;
}
} else if (c >= 0xfa) {
*pwc = 0xe000 + 157 * (c - 0xfa) + (c2 - (c2 >= 0xa1 ? 0x62 : 0x40));
return 2;
}
} else {
/* c == 0xc2 && c2 == 0x55. */
*pwc = 0x5f5e;
return 2;
}
} else {
/* (c == 0xc6 && c2 >= 0xa1) || c == 0xc7. */
unsigned int i = 157 * (c - 0xc6) + (c2 - (c2 >= 0xa1 ? 0x62 : 0x40));
if (i < 133) {
/* 63 <= i < 133. */
unsigned short wc = big5_2003_2uni_pagec6[i-63];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 2;
}
} else if (i < 216) {
/* 133 <= i < 216. Hiragana. */
*pwc = 0x3041 - 133 + i;
return 2;
} else if (i < 302) {
/* 216 <= i < 302. Katakana. */
*pwc = 0x30a1 - 216 + i;
return 2;
}
}
} else {
/* 0x81 <= c < 0xa1. */
*pwc = (c >= 0x8e ? 0xdb18 : 0xeeb8) + 157 * (c - 0x81)
+ (c2 - (c2 >= 0xa1 ? 0x62 : 0x40));
return 2;
}
}
}
}
return RET_ILSEQ;
}
static const unsigned char big5_2003_2charset_page25[29] = {
/* 0x2550 */
0xf9, 0xf8, 0xe6, 0xef, 0xdd, 0xe8, 0xf1, 0xdf,
0xec, 0xf5, 0xe3, 0xee, 0xf7, 0xe5, 0xe9, 0xf2,
0xe0, 0xeb, 0xf4, 0xe2, 0xe7, 0xf0, 0xde, 0xed,
0xf6, 0xe4, 0xea, 0xf3, 0xe1,
};
static int
big5_2003_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char buf[2];
int ret;
/* Code set 0 (ASCII) */
ret = ascii_wctomb(conv,r,wc,n);
if (ret != RET_ILUNI)
return ret;
/* Code set 1 (BIG5 extended) */
switch (wc >> 8) {
case 0x00:
if (wc == 0x00a8) { buf[0] = 0xc6; buf[1] = 0xd8; ret = 2; break; }
if (wc == 0x00a2 || wc == 0x00a3 || wc == 0x00a5)
return RET_ILUNI;
break;
case 0x02:
if (wc == 0x02cd) { buf[0] = 0xa1; buf[1] = 0xc5; ret = 2; break; }
break;
case 0x04:
return RET_ILUNI;
case 0x20:
if (wc == 0x2015) { buf[0] = 0xa1; buf[1] = 0x56; ret = 2; break; }
if (wc == 0x2027) { buf[0] = 0xa1; buf[1] = 0x45; ret = 2; break; }
if (wc == 0x20ac) { buf[0] = 0xa3; buf[1] = 0xe1; ret = 2; break; }
if (wc == 0x2013 || wc == 0x2022)
return RET_ILUNI;
break;
case 0x21:
if (wc >= 0x2170 && wc <= 0x2179) {
buf[0] = 0xc6; buf[1] = wc - 0x20bb; ret = 2;
break;
}
break;
case 0x22:
if (wc == 0x2215) { buf[0] = 0xa2; buf[1] = 0x41; ret = 2; break; }
if (wc == 0x2295) { buf[0] = 0xa1; buf[1] = 0xf2; ret = 2; break; }
if (wc == 0x2299) { buf[0] = 0xa1; buf[1] = 0xf3; ret = 2; break; }
if (wc == 0x223c)
return RET_ILUNI;
break;
case 0x24:
if (wc <= 0x241f) { buf[0] = 0xa3; buf[1] = wc - 0x2340; ret = 2; break; }
if (wc == 0x2421) { buf[0] = 0xa3; buf[1] = 0xe0; ret = 2; break; }
if (wc >= 0x2460 && wc <= 0x2469) {
buf[0] = 0xc6; buf[1] = wc - 0x23bf; ret = 2;
break;
}
if (wc >= 0x2474 && wc <= 0x247d) {
buf[0] = 0xc6; buf[1] = wc - 0x23c9; ret = 2;
break;
}
break;
case 0x25:
if (wc == 0x2501) { buf[0] = 0xa2; buf[1] = 0xa4; ret = 2; break; }
if (wc == 0x251d) { buf[0] = 0xa2; buf[1] = 0xa5; ret = 2; break; }
if (wc == 0x2525) { buf[0] = 0xa2; buf[1] = 0xa7; ret = 2; break; }
if (wc == 0x253f) { buf[0] = 0xa2; buf[1] = 0xa6; ret = 2; break; }
if (wc >= 0x2550 && wc <= 0x256c) {
buf[0] = 0xf9; buf[1] = big5_2003_2charset_page25[wc-0x2550]; ret = 2;
break;
}
if (wc == 0x2574) { buf[0] = 0xa1; buf[1] = 0x5a; ret = 2; break; }
if (wc == 0x2593) { buf[0] = 0xf9; buf[1] = 0xfe; ret = 2; break; }
break;
case 0x26:
if (wc == 0x2609 || wc == 0x2641)
return RET_ILUNI;
break;
case 0x27:
if (wc == 0x273d) { buf[0] = 0xc6; buf[1] = 0xe6; ret = 2; break; }
break;
case 0x2f:
if (wc == 0x2f02) { buf[0] = 0xc6; buf[1] = 0xbf; ret = 2; break; }
if (wc == 0x2f03) { buf[0] = 0xc6; buf[1] = 0xc0; ret = 2; break; }
if (wc == 0x2f05) { buf[0] = 0xc6; buf[1] = 0xc1; ret = 2; break; }
if (wc == 0x2f07) { buf[0] = 0xc6; buf[1] = 0xc2; ret = 2; break; }
if (wc == 0x2f0c) { buf[0] = 0xc6; buf[1] = 0xc3; ret = 2; break; }
if (wc == 0x2f0d) { buf[0] = 0xc6; buf[1] = 0xc4; ret = 2; break; }
if (wc == 0x2f0e) { buf[0] = 0xc6; buf[1] = 0xc5; ret = 2; break; }
if (wc == 0x2f13) { buf[0] = 0xc6; buf[1] = 0xc6; ret = 2; break; }
if (wc == 0x2f16) { buf[0] = 0xc6; buf[1] = 0xc7; ret = 2; break; }
if (wc == 0x2f19) { buf[0] = 0xc6; buf[1] = 0xc8; ret = 2; break; }
if (wc == 0x2f1b) { buf[0] = 0xc6; buf[1] = 0xc9; ret = 2; break; }
if (wc == 0x2f22) { buf[0] = 0xc6; buf[1] = 0xca; ret = 2; break; }
if (wc == 0x2f27) { buf[0] = 0xc6; buf[1] = 0xcb; ret = 2; break; }
if (wc == 0x2f2e) { buf[0] = 0xc6; buf[1] = 0xcc; ret = 2; break; }
if (wc == 0x2f33) { buf[0] = 0xc6; buf[1] = 0xcd; ret = 2; break; }
if (wc == 0x2f34) { buf[0] = 0xc6; buf[1] = 0xce; ret = 2; break; }
if (wc == 0x2f35) { buf[0] = 0xc6; buf[1] = 0xcf; ret = 2; break; }
if (wc == 0x2f39) { buf[0] = 0xc6; buf[1] = 0xd0; ret = 2; break; }
if (wc == 0x2f3a) { buf[0] = 0xc6; buf[1] = 0xd1; ret = 2; break; }
if (wc == 0x2f41) { buf[0] = 0xc6; buf[1] = 0xd2; ret = 2; break; }
if (wc == 0x2f46) { buf[0] = 0xc6; buf[1] = 0xd3; ret = 2; break; }
if (wc == 0x2f67) { buf[0] = 0xc6; buf[1] = 0xd4; ret = 2; break; }
if (wc == 0x2f68) { buf[0] = 0xc6; buf[1] = 0xd5; ret = 2; break; }
if (wc == 0x2fa1) { buf[0] = 0xc6; buf[1] = 0xd6; ret = 2; break; }
if (wc == 0x2faa) { buf[0] = 0xc6; buf[1] = 0xd7; ret = 2; break; }
break;
case 0x30:
if (wc >= 0x3005 && wc <= 0x3007) {
buf[0] = 0xc6; buf[1] = wc - 0x2f25; ret = 2;
break;
}
if (wc >= 0x3038 && wc <= 0x303a) {
buf[0] = 0xa2; buf[1] = wc - 0x2f6c; ret = 2;
break;
}
if (wc >= 0x3041 && wc <= 0x3093) {
if (wc < 0x3059) {
buf[0] = 0xc6; buf[1] = wc - 0x2f5a;
} else {
buf[0] = 0xc7; buf[1] = wc - 0x3019;
}
ret = 2;
break;
}
if (wc == 0x309d) { buf[0] = 0xc6; buf[1] = 0xdc; ret = 2; break; }
if (wc == 0x309e) { buf[0] = 0xc6; buf[1] = 0xdd; ret = 2; break; }
if (wc >= 0x30a1 && wc <= 0x30f6) {
buf[0] = 0xc7; buf[1] = wc - (wc < 0x30a5 ? 0x3026 : 0x3004); ret = 2;
break;
}
if (wc == 0x30fc) { buf[0] = 0xc6; buf[1] = 0xe3; ret = 2; break; }
if (wc == 0x30fd) { buf[0] = 0xc6; buf[1] = 0xda; ret = 2; break; }
if (wc == 0x30fe) { buf[0] = 0xc6; buf[1] = 0xdb; ret = 2; break; }
break;
case 0x53:
if (wc == 0x5344)
return RET_ILUNI;
break;
case 0x58:
if (wc == 0x58bb) { buf[0] = 0xf9; buf[1] = 0xd9; ret = 2; break; }
break;
case 0x5a:
if (wc == 0x5afa) { buf[0] = 0xf9; buf[1] = 0xdc; ret = 2; break; }
break;
case 0x5f:
if (wc == 0x5f5e) { buf[0] = 0xc2; buf[1] = 0x55; ret = 2; break; }
if (wc == 0x5f5d)
return RET_ILUNI;
break;
case 0x60:
if (wc == 0x6052) { buf[0] = 0xf9; buf[1] = 0xda; ret = 2; break; }
break;
case 0x78:
if (wc == 0x7881) { buf[0] = 0xf9; buf[1] = 0xd6; ret = 2; break; }
break;
case 0x7c:
if (wc == 0x7ca7) { buf[0] = 0xf9; buf[1] = 0xdb; ret = 2; break; }
break;
case 0x88:
if (wc == 0x88cf) { buf[0] = 0xf9; buf[1] = 0xd8; ret = 2; break; }
break;
case 0x92:
if (wc == 0x92b9) { buf[0] = 0xf9; buf[1] = 0xd7; ret = 2; break; }
break;
case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5:
case 0xe6: case 0xe7: case 0xe8: case 0xe9: case 0xea: case 0xeb:
case 0xec: case 0xed: case 0xee: case 0xef: case 0xf0: case 0xf1:
case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6:
{
unsigned int i = wc - 0xe000;
if (i < 5809) {
unsigned int c1 = i / 157;
unsigned int c2 = i % 157;
buf[0] = c1 + (c1 < 5 ? 0xfa : c1 < 24 ? 0x89 : 0x69);
buf[1] = c2 + (c2 < 0x3f ? 0x40 : 0x62);
ret = 2;
break;
}
}
break;
case 0xfe:
if (wc == 0xfe51) { buf[0] = 0xa1; buf[1] = 0x4e; ret = 2; break; }
if (wc == 0xfe68) { buf[0] = 0xa2; buf[1] = 0x42; ret = 2; break; }
break;
case 0xff:
if (wc == 0xff0f) { buf[0] = 0xa1; buf[1] = 0xfe; ret = 2; break; }
if (wc == 0xff3b) { buf[0] = 0xc6; buf[1] = 0xe4; ret = 2; break; }
if (wc == 0xff3c) { buf[0] = 0xa2; buf[1] = 0x40; ret = 2; break; }
if (wc == 0xff3d) { buf[0] = 0xc6; buf[1] = 0xe5; ret = 2; break; }
if (wc == 0xff3e) { buf[0] = 0xc6; buf[1] = 0xd9; ret = 2; break; }
if (wc == 0xff5e) { buf[0] = 0xa1; buf[1] = 0xe3; ret = 2; break; }
if (wc == 0xffe0) { buf[0] = 0xa2; buf[1] = 0x46; ret = 2; break; }
if (wc == 0xffe1) { buf[0] = 0xa2; buf[1] = 0x47; ret = 2; break; }
if (wc == 0xffe3) { buf[0] = 0xa1; buf[1] = 0xc3; ret = 2; break; }
if (wc == 0xffe5) { buf[0] = 0xa2; buf[1] = 0x44; ret = 2; break; }
if (wc == 0xff64)
return RET_ILUNI;
break;
}
if (ret == RET_ILUNI)
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n < 2)
return RET_TOOSMALL;
r[0] = buf[0];
r[1] = buf[1];
return 2;
}
return RET_ILUNI;
}
+196
View File
@@ -0,0 +1,196 @@
/*
* Copyright (C) 1999-2002, 2006, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:1999
*/
/*
* BIG5-HKSCS:1999 can be downloaded from
* http://www.info.gov.hk/digital21/eng/hkscs/download.html
* http://www.info.gov.hk/digital21/eng/hkscs/index.html
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{88..8D}{40..7E,A1..FE} 641 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs1999.h"
#include "flushwc.h"
static int
big5hkscs1999_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs1999_flushwc normal_flushwc
static int
big5hkscs1999_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs1999_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
+214
View File
@@ -0,0 +1,214 @@
/*
* Copyright (C) 1999-2002, 2006, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:2001
*/
/*
* BIG5-HKSCS:2001 can be downloaded from
* http://www.info.gov.hk/digital21/eng/hkscs/download.html
* http://www.info.gov.hk/digital21/eng/hkscs/index.html
*
* It extends BIG5-HKSCS:1999 through 116 characters.
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{88..8D}{40..7E,A1..FE} 757 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs2001.h"
#include "flushwc.h"
static int
big5hkscs2001_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2001_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs2001_flushwc normal_flushwc
static int
big5hkscs2001_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2001_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs2001_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
+230
View File
@@ -0,0 +1,230 @@
/*
* Copyright (C) 1999-2002, 2006, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:2004
*/
/*
* BIG5-HKSCS:2004 can be downloaded from
* http://www.info.gov.hk/digital21/eng/hkscs/download.html
* http://www.info.gov.hk/digital21/eng/hkscs/index.html
*
* It extends BIG5-HKSCS:2001 through 123 characters.
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{87..8D}{40..7E,A1..FE} 880 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs2004.h"
#include "flushwc.h"
static int
big5hkscs2004_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2001_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2004_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs2004_flushwc normal_flushwc
static int
big5hkscs2004_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2001_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2004_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs2004_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
+246
View File
@@ -0,0 +1,246 @@
/*
* Copyright (C) 1999-2002, 2006, 2010 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:2008
*/
/*
* BIG5-HKSCS:2008 can be downloaded from
* http://www.ogcio.gov.hk/ccli/eng/hkscs/download.html
* http://www.ogcio.gov.hk/ccli/eng/hkscs/introduction.html
*
* It extends BIG5-HKSCS:2004 through 68 characters.
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{87..8D}{40..7E,A1..FE} 880 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs2008.h"
#include "flushwc.h"
static int
big5hkscs2008_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2001_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2004_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2008_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs2008_flushwc normal_flushwc
static int
big5hkscs2008_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2001_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2004_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2008_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs2008_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
+124
View File
@@ -0,0 +1,124 @@
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* C99
* This is ASCII with \uXXXX and \UXXXXXXXX escape sequences, denoting Unicode
* characters. See ISO/IEC 9899:1999, section 6.4.3.
* The treatment of control characters in the range U+0080..U+009F is not
* specified; we pass them through unmodified.
*/
static int
c99_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c;
ucs4_t wc;
int i;
c = s[0];
if (c < 0xa0) {
if (c != '\\') {
*pwc = c;
return 1;
}
if (n < 2)
return RET_TOOFEW(0);
c = s[1];
if (c == 'u') {
wc = 0;
for (i = 2; i < 6; i++) {
if (n <= i)
return RET_TOOFEW(0);
c = s[i];
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'A' && c <= 'Z')
c -= 'A'-10;
else if (c >= 'a' && c <= 'z')
c -= 'a'-10;
else
goto simply_backslash;
wc |= (ucs4_t) c << (4 * (5-i));
}
if ((wc >= 0x00a0 && !(wc >= 0xd800 && wc < 0xe000))
|| wc == 0x0024 || wc == 0x0040 || wc == 0x0060) {
*pwc = wc;
return 6;
}
} else if (c == 'U') {
wc = 0;
for (i = 2; i < 10; i++) {
if (n <= i)
return RET_TOOFEW(0);
c = s[i];
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'A' && c <= 'Z')
c -= 'A'-10;
else if (c >= 'a' && c <= 'z')
c -= 'a'-10;
else
goto simply_backslash;
wc |= (ucs4_t) c << (4 * (9-i));
}
if ((wc >= 0x00a0 && !(wc >= 0xd800 && wc < 0xe000))
|| wc == 0x0024 || wc == 0x0040 || wc == 0x0060) {
*pwc = wc;
return 10;
}
} else
goto simply_backslash;
}
return RET_ILSEQ;
simply_backslash:
*pwc = '\\';
return 1;
}
static int
c99_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
if (wc < 0xa0) {
*r = wc;
return 1;
} else {
int result;
unsigned char u;
if (wc < 0x10000) {
result = 6;
u = 'u';
} else {
result = 10;
u = 'U';
}
if (n >= result) {
int count;
r[0] = '\\';
r[1] = u;
r += 2;
for (count = result-3; count >= 0; count--) {
unsigned int i = (wc >> (4*count)) & 0x0f;
*r++ = (i < 10 ? '0'+i : 'a'-10+i);
}
return result;
} else
return RET_TOOSMALL;
}
}
+111
View File
@@ -0,0 +1,111 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str392,
(int)(long)&((struct stringpool_t *)0)->stringpool_str389,
(int)(long)&((struct stringpool_t *)0)->stringpool_str258,
(int)(long)&((struct stringpool_t *)0)->stringpool_str436,
(int)(long)&((struct stringpool_t *)0)->stringpool_str285,
(int)(long)&((struct stringpool_t *)0)->stringpool_str222,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str361,
(int)(long)&((struct stringpool_t *)0)->stringpool_str567,
(int)(long)&((struct stringpool_t *)0)->stringpool_str416,
(int)(long)&((struct stringpool_t *)0)->stringpool_str512,
(int)(long)&((struct stringpool_t *)0)->stringpool_str690,
(int)(long)&((struct stringpool_t *)0)->stringpool_str539,
(int)(long)&((struct stringpool_t *)0)->stringpool_str689,
(int)(long)&((struct stringpool_t *)0)->stringpool_str320,
(int)(long)&((struct stringpool_t *)0)->stringpool_str750,
(int)(long)&((struct stringpool_t *)0)->stringpool_str302,
(int)(long)&((struct stringpool_t *)0)->stringpool_str732,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str811,
(int)(long)&((struct stringpool_t *)0)->stringpool_str134,
(int)(long)&((struct stringpool_t *)0)->stringpool_str186,
(int)(long)&((struct stringpool_t *)0)->stringpool_str324,
(int)(long)&((struct stringpool_t *)0)->stringpool_str150,
(int)(long)&((struct stringpool_t *)0)->stringpool_str154,
(int)(long)&((struct stringpool_t *)0)->stringpool_str130,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str170,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str162,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str236,
(int)(long)&((struct stringpool_t *)0)->stringpool_str574,
(int)(long)&((struct stringpool_t *)0)->stringpool_str580,
(int)(long)&((struct stringpool_t *)0)->stringpool_str268,
(int)(long)&((struct stringpool_t *)0)->stringpool_str88,
(int)(long)&((struct stringpool_t *)0)->stringpool_str140,
(int)(long)&((struct stringpool_t *)0)->stringpool_str278,
(int)(long)&((struct stringpool_t *)0)->stringpool_str104,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str420,
(int)(long)&((struct stringpool_t *)0)->stringpool_str120,
(int)(long)&((struct stringpool_t *)0)->stringpool_str250,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str54,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str476,
(int)(long)&((struct stringpool_t *)0)->stringpool_str463,
(int)(long)&((struct stringpool_t *)0)->stringpool_str442,
(int)(long)&((struct stringpool_t *)0)->stringpool_str562,
(int)(long)&((struct stringpool_t *)0)->stringpool_str813,
(int)(long)&((struct stringpool_t *)0)->stringpool_str248,
(int)(long)&((struct stringpool_t *)0)->stringpool_str749,
(int)(long)&((struct stringpool_t *)0)->stringpool_str591,
(int)(long)&((struct stringpool_t *)0)->stringpool_str702,
(int)(long)&((struct stringpool_t *)0)->stringpool_str796,
(int)(long)&((struct stringpool_t *)0)->stringpool_str680,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str448,
(int)(long)&((struct stringpool_t *)0)->stringpool_str311,
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str446,
(int)(long)&((struct stringpool_t *)0)->stringpool_str312,
(int)(long)&((struct stringpool_t *)0)->stringpool_str286,
(int)(long)&((struct stringpool_t *)0)->stringpool_str121,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str375,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str206,
(int)(long)&((struct stringpool_t *)0)->stringpool_str211,
(int)(long)&((struct stringpool_t *)0)->stringpool_str536,
(int)(long)&((struct stringpool_t *)0)->stringpool_str651,
(int)(long)&((struct stringpool_t *)0)->stringpool_str683,
(int)(long)&((struct stringpool_t *)0)->stringpool_str613,
(int)(long)&((struct stringpool_t *)0)->stringpool_str329,
(int)(long)&((struct stringpool_t *)0)->stringpool_str426,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str344,
(int)(long)&((struct stringpool_t *)0)->stringpool_str479,
(int)(long)&((struct stringpool_t *)0)->stringpool_str548,
(int)(long)&((struct stringpool_t *)0)->stringpool_str209,
(int)(long)&((struct stringpool_t *)0)->stringpool_str661,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str634,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str72,
(int)(long)&((struct stringpool_t *)0)->stringpool_str388,
(int)(long)&((struct stringpool_t *)0)->stringpool_str153,
(int)(long)&((struct stringpool_t *)0)->stringpool_str443,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str78,
(int)(long)&((struct stringpool_t *)0)->stringpool_str437,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str252,
(int)(long)&((struct stringpool_t *)0)->stringpool_str710,
(int)(long)&((struct stringpool_t *)0)->stringpool_str692,
(int)(long)&((struct stringpool_t *)0)->stringpool_str700,
(int)(long)&((struct stringpool_t *)0)->stringpool_str495,
(int)(long)&((struct stringpool_t *)0)->stringpool_str243,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str869,
(int)(long)&((struct stringpool_t *)0)->stringpool_str425,
+9
View File
@@ -0,0 +1,9 @@
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_1,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_2,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_3,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_5,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_6,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_10,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_14,
+9
View File
@@ -0,0 +1,9 @@
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_2,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_6,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_8,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_10,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_12,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_16,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_20,
+15
View File
@@ -0,0 +1,15 @@
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_5,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_8,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_12,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_13,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_17,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_21,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_22,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_26,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_31,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_35,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_38,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_42,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_47,
+7
View File
@@ -0,0 +1,7 @@
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_2,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_6,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_7,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_9,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_11,
+2
View File
@@ -0,0 +1,2 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str496,
+2
View File
@@ -0,0 +1,2 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str15,
(int)(long)&((struct stringpool_t *)0)->stringpool_str484,
+2
View File
@@ -0,0 +1,2 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str171,
(int)(long)&((struct stringpool_t *)0)->stringpool_str723,
+2
View File
@@ -0,0 +1,2 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str457,
+2
View File
@@ -0,0 +1,2 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str112,
(int)(long)&((struct stringpool_t *)0)->stringpool_str491,
+2
View File
@@ -0,0 +1,2 @@
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_1,
+2
View File
@@ -0,0 +1,2 @@
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_2,
+111
View File
@@ -0,0 +1,111 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str145,
(int)(long)&((struct stringpool_t *)0)->stringpool_str452,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str131,
(int)(long)&((struct stringpool_t *)0)->stringpool_str445,
(int)(long)&((struct stringpool_t *)0)->stringpool_str260,
(int)(long)&((struct stringpool_t *)0)->stringpool_str255,
(int)(long)&((struct stringpool_t *)0)->stringpool_str573,
(int)(long)&((struct stringpool_t *)0)->stringpool_str388,
(int)(long)&((struct stringpool_t *)0)->stringpool_str303,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str425,
(int)(long)&((struct stringpool_t *)0)->stringpool_str618,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str469,
(int)(long)&((struct stringpool_t *)0)->stringpool_str411,
(int)(long)&((struct stringpool_t *)0)->stringpool_str462,
(int)(long)&((struct stringpool_t *)0)->stringpool_str5,
(int)(long)&((struct stringpool_t *)0)->stringpool_str457,
(int)(long)&((struct stringpool_t *)0)->stringpool_str155,
(int)(long)&((struct stringpool_t *)0)->stringpool_str183,
(int)(long)&((struct stringpool_t *)0)->stringpool_str207,
(int)(long)&((struct stringpool_t *)0)->stringpool_str169,
(int)(long)&((struct stringpool_t *)0)->stringpool_str177,
(int)(long)&((struct stringpool_t *)0)->stringpool_str161,
(int)(long)&((struct stringpool_t *)0)->stringpool_str527,
(int)(long)&((struct stringpool_t *)0)->stringpool_str191,
(int)(long)&((struct stringpool_t *)0)->stringpool_str151,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str172,
(int)(long)&((struct stringpool_t *)0)->stringpool_str180,
(int)(long)&((struct stringpool_t *)0)->stringpool_str164,
(int)(long)&((struct stringpool_t *)0)->stringpool_str313,
(int)(long)&((struct stringpool_t *)0)->stringpool_str507,
(int)(long)&((struct stringpool_t *)0)->stringpool_str508,
(int)(long)&((struct stringpool_t *)0)->stringpool_str127,
(int)(long)&((struct stringpool_t *)0)->stringpool_str43,
(int)(long)&((struct stringpool_t *)0)->stringpool_str71,
(int)(long)&((struct stringpool_t *)0)->stringpool_str95,
(int)(long)&((struct stringpool_t *)0)->stringpool_str57,
(int)(long)&((struct stringpool_t *)0)->stringpool_str65,
(int)(long)&((struct stringpool_t *)0)->stringpool_str49,
(int)(long)&((struct stringpool_t *)0)->stringpool_str415,
(int)(long)&((struct stringpool_t *)0)->stringpool_str79,
(int)(long)&((struct stringpool_t *)0)->stringpool_str128,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str42,
(int)(long)&((struct stringpool_t *)0)->stringpool_str44,
(int)(long)&((struct stringpool_t *)0)->stringpool_str437,
(int)(long)&((struct stringpool_t *)0)->stringpool_str557,
(int)(long)&((struct stringpool_t *)0)->stringpool_str429,
(int)(long)&((struct stringpool_t *)0)->stringpool_str451,
(int)(long)&((struct stringpool_t *)0)->stringpool_str542,
(int)(long)&((struct stringpool_t *)0)->stringpool_str426,
(int)(long)&((struct stringpool_t *)0)->stringpool_str744,
(int)(long)&((struct stringpool_t *)0)->stringpool_str809,
(int)(long)&((struct stringpool_t *)0)->stringpool_str815,
(int)(long)&((struct stringpool_t *)0)->stringpool_str958,
(int)(long)&((struct stringpool_t *)0)->stringpool_str518,
(int)(long)&((struct stringpool_t *)0)->stringpool_str560,
(int)(long)&((struct stringpool_t *)0)->stringpool_str309,
(int)(long)&((struct stringpool_t *)0)->stringpool_str647,
(int)(long)&((struct stringpool_t *)0)->stringpool_str453,
(int)(long)&((struct stringpool_t *)0)->stringpool_str270,
(int)(long)&((struct stringpool_t *)0)->stringpool_str315,
(int)(long)&((struct stringpool_t *)0)->stringpool_str549,
(int)(long)&((struct stringpool_t *)0)->stringpool_str90,
(int)(long)&((struct stringpool_t *)0)->stringpool_str101,
(int)(long)&((struct stringpool_t *)0)->stringpool_str305,
(int)(long)&((struct stringpool_t *)0)->stringpool_str96,
(int)(long)&((struct stringpool_t *)0)->stringpool_str245,
(int)(long)&((struct stringpool_t *)0)->stringpool_str233,
(int)(long)&((struct stringpool_t *)0)->stringpool_str342,
(int)(long)&((struct stringpool_t *)0)->stringpool_str187,
(int)(long)&((struct stringpool_t *)0)->stringpool_str490,
(int)(long)&((struct stringpool_t *)0)->stringpool_str725,
(int)(long)&((struct stringpool_t *)0)->stringpool_str761,
(int)(long)&((struct stringpool_t *)0)->stringpool_str711,
(int)(long)&((struct stringpool_t *)0)->stringpool_str226,
(int)(long)&((struct stringpool_t *)0)->stringpool_str246,
(int)(long)&((struct stringpool_t *)0)->stringpool_str219,
(int)(long)&((struct stringpool_t *)0)->stringpool_str276,
(int)(long)&((struct stringpool_t *)0)->stringpool_str553,
(int)(long)&((struct stringpool_t *)0)->stringpool_str853,
(int)(long)&((struct stringpool_t *)0)->stringpool_str67,
(int)(long)&((struct stringpool_t *)0)->stringpool_str671,
(int)(long)&((struct stringpool_t *)0)->stringpool_str623,
(int)(long)&((struct stringpool_t *)0)->stringpool_str637,
(int)(long)&((struct stringpool_t *)0)->stringpool_str633,
(int)(long)&((struct stringpool_t *)0)->stringpool_str81,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str45,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str199,
(int)(long)&((struct stringpool_t *)0)->stringpool_str318,
(int)(long)&((struct stringpool_t *)0)->stringpool_str48,
(int)(long)&((struct stringpool_t *)0)->stringpool_str569,
(int)(long)&((struct stringpool_t *)0)->stringpool_str286,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str719,
(int)(long)&((struct stringpool_t *)0)->stringpool_str721,
(int)(long)&((struct stringpool_t *)0)->stringpool_str728,
(int)(long)&((struct stringpool_t *)0)->stringpool_str555,
(int)(long)&((struct stringpool_t *)0)->stringpool_str272,
(int)(long)&((struct stringpool_t *)0)->stringpool_str16,
(int)(long)&((struct stringpool_t *)0)->stringpool_str814,
(int)(long)&((struct stringpool_t *)0)->stringpool_str390,
+111
View File
@@ -0,0 +1,111 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str396,
(int)(long)&((struct stringpool_t *)0)->stringpool_str355,
(int)(long)&((struct stringpool_t *)0)->stringpool_str293,
(int)(long)&((struct stringpool_t *)0)->stringpool_str499,
(int)(long)&((struct stringpool_t *)0)->stringpool_str345,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str486,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str553,
(int)(long)&((struct stringpool_t *)0)->stringpool_str399,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str636,
(int)(long)&((struct stringpool_t *)0)->stringpool_str482,
(int)(long)&((struct stringpool_t *)0)->stringpool_str495,
(int)(long)&((struct stringpool_t *)0)->stringpool_str503,
(int)(long)&((struct stringpool_t *)0)->stringpool_str500,
(int)(long)&((struct stringpool_t *)0)->stringpool_str490,
(int)(long)&((struct stringpool_t *)0)->stringpool_str487,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str639,
(int)(long)&((struct stringpool_t *)0)->stringpool_str114,
(int)(long)&((struct stringpool_t *)0)->stringpool_str178,
(int)(long)&((struct stringpool_t *)0)->stringpool_str230,
(int)(long)&((struct stringpool_t *)0)->stringpool_str152,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str128,
(int)(long)&((struct stringpool_t *)0)->stringpool_str306,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str112,
(int)(long)&((struct stringpool_t *)0)->stringpool_str223,
(int)(long)&((struct stringpool_t *)0)->stringpool_str119,
(int)(long)&((struct stringpool_t *)0)->stringpool_str235,
(int)(long)&((struct stringpool_t *)0)->stringpool_str157,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str133,
(int)(long)&((struct stringpool_t *)0)->stringpool_str100,
(int)(long)&((struct stringpool_t *)0)->stringpool_str516,
(int)(long)&((struct stringpool_t *)0)->stringpool_str519,
(int)(long)&((struct stringpool_t *)0)->stringpool_str277,
(int)(long)&((struct stringpool_t *)0)->stringpool_str173,
(int)(long)&((struct stringpool_t *)0)->stringpool_str237,
(int)(long)&((struct stringpool_t *)0)->stringpool_str289,
(int)(long)&((struct stringpool_t *)0)->stringpool_str211,
(int)(long)&((struct stringpool_t *)0)->stringpool_str201,
(int)(long)&((struct stringpool_t *)0)->stringpool_str187,
(int)(long)&((struct stringpool_t *)0)->stringpool_str365,
(int)(long)&((struct stringpool_t *)0)->stringpool_str225,
(int)(long)&((struct stringpool_t *)0)->stringpool_str266,
(int)(long)&((struct stringpool_t *)0)->stringpool_str219,
(int)(long)&((struct stringpool_t *)0)->stringpool_str169,
(int)(long)&((struct stringpool_t *)0)->stringpool_str185,
(int)(long)&((struct stringpool_t *)0)->stringpool_str515,
(int)(long)&((struct stringpool_t *)0)->stringpool_str731,
(int)(long)&((struct stringpool_t *)0)->stringpool_str501,
(int)(long)&((struct stringpool_t *)0)->stringpool_str696,
(int)(long)&((struct stringpool_t *)0)->stringpool_str626,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str680,
(int)(long)&((struct stringpool_t *)0)->stringpool_str518,
(int)(long)&((struct stringpool_t *)0)->stringpool_str1033,
(int)(long)&((struct stringpool_t *)0)->stringpool_str986,
(int)(long)&((struct stringpool_t *)0)->stringpool_str760,
(int)(long)&((struct stringpool_t *)0)->stringpool_str655,
(int)(long)&((struct stringpool_t *)0)->stringpool_str479,
(int)(long)&((struct stringpool_t *)0)->stringpool_str584,
(int)(long)&((struct stringpool_t *)0)->stringpool_str393,
(int)(long)&((struct stringpool_t *)0)->stringpool_str436,
(int)(long)&((struct stringpool_t *)0)->stringpool_str273,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str76,
(int)(long)&((struct stringpool_t *)0)->stringpool_str151,
(int)(long)&((struct stringpool_t *)0)->stringpool_str305,
(int)(long)&((struct stringpool_t *)0)->stringpool_str301,
(int)(long)&((struct stringpool_t *)0)->stringpool_str333,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str256,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str653,
(int)(long)&((struct stringpool_t *)0)->stringpool_str738,
(int)(long)&((struct stringpool_t *)0)->stringpool_str790,
(int)(long)&((struct stringpool_t *)0)->stringpool_str750,
(int)(long)&((struct stringpool_t *)0)->stringpool_str302,
(int)(long)&((struct stringpool_t *)0)->stringpool_str373,
(int)(long)&((struct stringpool_t *)0)->stringpool_str81,
(int)(long)&((struct stringpool_t *)0)->stringpool_str260,
(int)(long)&((struct stringpool_t *)0)->stringpool_str525,
(int)(long)&((struct stringpool_t *)0)->stringpool_str644,
(int)(long)&((struct stringpool_t *)0)->stringpool_str243,
(int)(long)&((struct stringpool_t *)0)->stringpool_str571,
(int)(long)&((struct stringpool_t *)0)->stringpool_str574,
(int)(long)&((struct stringpool_t *)0)->stringpool_str606,
(int)(long)&((struct stringpool_t *)0)->stringpool_str575,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str191,
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str349,
(int)(long)&((struct stringpool_t *)0)->stringpool_str327,
(int)(long)&((struct stringpool_t *)0)->stringpool_str474,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str621,
(int)(long)&((struct stringpool_t *)0)->stringpool_str288,
(int)(long)&((struct stringpool_t *)0)->stringpool_str239,
(int)(long)&((struct stringpool_t *)0)->stringpool_str734,
(int)(long)&((struct stringpool_t *)0)->stringpool_str735,
(int)(long)&((struct stringpool_t *)0)->stringpool_str754,
(int)(long)&((struct stringpool_t *)0)->stringpool_str615,
(int)(long)&((struct stringpool_t *)0)->stringpool_str203,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str951,
(int)(long)&((struct stringpool_t *)0)->stringpool_str249,
+111
View File
@@ -0,0 +1,111 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str453,
(int)(long)&((struct stringpool_t *)0)->stringpool_str308,
(int)(long)&((struct stringpool_t *)0)->stringpool_str319,
(int)(long)&((struct stringpool_t *)0)->stringpool_str586,
(int)(long)&((struct stringpool_t *)0)->stringpool_str346,
(int)(long)&((struct stringpool_t *)0)->stringpool_str283,
(int)(long)&((struct stringpool_t *)0)->stringpool_str568,
(int)(long)&((struct stringpool_t *)0)->stringpool_str328,
(int)(long)&((struct stringpool_t *)0)->stringpool_str280,
(int)(long)&((struct stringpool_t *)0)->stringpool_str575,
(int)(long)&((struct stringpool_t *)0)->stringpool_str335,
(int)(long)&((struct stringpool_t *)0)->stringpool_str431,
(int)(long)&((struct stringpool_t *)0)->stringpool_str698,
(int)(long)&((struct stringpool_t *)0)->stringpool_str458,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str381,
(int)(long)&((struct stringpool_t *)0)->stringpool_str911,
(int)(long)&((struct stringpool_t *)0)->stringpool_str363,
(int)(long)&((struct stringpool_t *)0)->stringpool_str893,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str664,
(int)(long)&((struct stringpool_t *)0)->stringpool_str134,
(int)(long)&((struct stringpool_t *)0)->stringpool_str186,
(int)(long)&((struct stringpool_t *)0)->stringpool_str324,
(int)(long)&((struct stringpool_t *)0)->stringpool_str150,
(int)(long)&((struct stringpool_t *)0)->stringpool_str154,
(int)(long)&((struct stringpool_t *)0)->stringpool_str130,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str170,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str162,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str203,
(int)(long)&((struct stringpool_t *)0)->stringpool_str663,
(int)(long)&((struct stringpool_t *)0)->stringpool_str669,
(int)(long)&((struct stringpool_t *)0)->stringpool_str268,
(int)(long)&((struct stringpool_t *)0)->stringpool_str88,
(int)(long)&((struct stringpool_t *)0)->stringpool_str140,
(int)(long)&((struct stringpool_t *)0)->stringpool_str278,
(int)(long)&((struct stringpool_t *)0)->stringpool_str104,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str420,
(int)(long)&((struct stringpool_t *)0)->stringpool_str120,
(int)(long)&((struct stringpool_t *)0)->stringpool_str250,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str54,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str476,
(int)(long)&((struct stringpool_t *)0)->stringpool_str463,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str562,
(int)(long)&((struct stringpool_t *)0)->stringpool_str813,
(int)(long)&((struct stringpool_t *)0)->stringpool_str225,
(int)(long)&((struct stringpool_t *)0)->stringpool_str777,
(int)(long)&((struct stringpool_t *)0)->stringpool_str541,
(int)(long)&((struct stringpool_t *)0)->stringpool_str648,
(int)(long)&((struct stringpool_t *)0)->stringpool_str848,
(int)(long)&((struct stringpool_t *)0)->stringpool_str769,
(int)(long)&((struct stringpool_t *)0)->stringpool_str389,
(int)(long)&((struct stringpool_t *)0)->stringpool_str407,
(int)(long)&((struct stringpool_t *)0)->stringpool_str561,
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str455,
(int)(long)&((struct stringpool_t *)0)->stringpool_str396,
(int)(long)&((struct stringpool_t *)0)->stringpool_str253,
(int)(long)&((struct stringpool_t *)0)->stringpool_str173,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str375,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str228,
(int)(long)&((struct stringpool_t *)0)->stringpool_str233,
(int)(long)&((struct stringpool_t *)0)->stringpool_str367,
(int)(long)&((struct stringpool_t *)0)->stringpool_str628,
(int)(long)&((struct stringpool_t *)0)->stringpool_str660,
(int)(long)&((struct stringpool_t *)0)->stringpool_str590,
(int)(long)&((struct stringpool_t *)0)->stringpool_str345,
(int)(long)&((struct stringpool_t *)0)->stringpool_str442,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str311,
(int)(long)&((struct stringpool_t *)0)->stringpool_str414,
(int)(long)&((struct stringpool_t *)0)->stringpool_str237,
(int)(long)&((struct stringpool_t *)0)->stringpool_str209,
(int)(long)&((struct stringpool_t *)0)->stringpool_str596,
(int)(long)&((struct stringpool_t *)0)->stringpool_str491,
(int)(long)&((struct stringpool_t *)0)->stringpool_str517,
(int)(long)&((struct stringpool_t *)0)->stringpool_str493,
(int)(long)&((struct stringpool_t *)0)->stringpool_str72,
(int)(long)&((struct stringpool_t *)0)->stringpool_str338,
(int)(long)&((struct stringpool_t *)0)->stringpool_str153,
(int)(long)&((struct stringpool_t *)0)->stringpool_str459,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str49,
(int)(long)&((struct stringpool_t *)0)->stringpool_str441,
(int)(long)&((struct stringpool_t *)0)->stringpool_str315,
(int)(long)&((struct stringpool_t *)0)->stringpool_str252,
(int)(long)&((struct stringpool_t *)0)->stringpool_str846,
(int)(long)&((struct stringpool_t *)0)->stringpool_str828,
(int)(long)&((struct stringpool_t *)0)->stringpool_str836,
(int)(long)&((struct stringpool_t *)0)->stringpool_str526,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str837,
(int)(long)&((struct stringpool_t *)0)->stringpool_str392,
+111
View File
@@ -0,0 +1,111 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str239,
(int)(long)&((struct stringpool_t *)0)->stringpool_str275,
(int)(long)&((struct stringpool_t *)0)->stringpool_str218,
(int)(long)&((struct stringpool_t *)0)->stringpool_str532,
(int)(long)&((struct stringpool_t *)0)->stringpool_str517,
(int)(long)&((struct stringpool_t *)0)->stringpool_str264,
(int)(long)&((struct stringpool_t *)0)->stringpool_str555,
(int)(long)&((struct stringpool_t *)0)->stringpool_str540,
(int)(long)&((struct stringpool_t *)0)->stringpool_str272,
(int)(long)&((struct stringpool_t *)0)->stringpool_str591,
(int)(long)&((struct stringpool_t *)0)->stringpool_str576,
(int)(long)&((struct stringpool_t *)0)->stringpool_str365,
(int)(long)&((struct stringpool_t *)0)->stringpool_str679,
(int)(long)&((struct stringpool_t *)0)->stringpool_str664,
(int)(long)&((struct stringpool_t *)0)->stringpool_str603,
(int)(long)&((struct stringpool_t *)0)->stringpool_str530,
(int)(long)&((struct stringpool_t *)0)->stringpool_str797,
(int)(long)&((struct stringpool_t *)0)->stringpool_str553,
(int)(long)&((struct stringpool_t *)0)->stringpool_str820,
(int)(long)&((struct stringpool_t *)0)->stringpool_str19,
(int)(long)&((struct stringpool_t *)0)->stringpool_str330,
(int)(long)&((struct stringpool_t *)0)->stringpool_str61,
(int)(long)&((struct stringpool_t *)0)->stringpool_str73,
(int)(long)&((struct stringpool_t *)0)->stringpool_str227,
(int)(long)&((struct stringpool_t *)0)->stringpool_str119,
(int)(long)&((struct stringpool_t *)0)->stringpool_str65,
(int)(long)&((struct stringpool_t *)0)->stringpool_str63,
(int)(long)&((struct stringpool_t *)0)->stringpool_str397,
(int)(long)&((struct stringpool_t *)0)->stringpool_str69,
(int)(long)&((struct stringpool_t *)0)->stringpool_str71,
(int)(long)&((struct stringpool_t *)0)->stringpool_str128,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str230,
(int)(long)&((struct stringpool_t *)0)->stringpool_str122,
(int)(long)&((struct stringpool_t *)0)->stringpool_str68,
(int)(long)&((struct stringpool_t *)0)->stringpool_str66,
(int)(long)&((struct stringpool_t *)0)->stringpool_str207,
(int)(long)&((struct stringpool_t *)0)->stringpool_str373,
(int)(long)&((struct stringpool_t *)0)->stringpool_str414,
(int)(long)&((struct stringpool_t *)0)->stringpool_str90,
(int)(long)&((struct stringpool_t *)0)->stringpool_str26,
(int)(long)&((struct stringpool_t *)0)->stringpool_str38,
(int)(long)&((struct stringpool_t *)0)->stringpool_str192,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str30,
(int)(long)&((struct stringpool_t *)0)->stringpool_str28,
(int)(long)&((struct stringpool_t *)0)->stringpool_str362,
(int)(long)&((struct stringpool_t *)0)->stringpool_str34,
(int)(long)&((struct stringpool_t *)0)->stringpool_str85,
(int)(long)&((struct stringpool_t *)0)->stringpool_str32,
(int)(long)&((struct stringpool_t *)0)->stringpool_str22,
(int)(long)&((struct stringpool_t *)0)->stringpool_str101,
(int)(long)&((struct stringpool_t *)0)->stringpool_str372,
(int)(long)&((struct stringpool_t *)0)->stringpool_str644,
(int)(long)&((struct stringpool_t *)0)->stringpool_str494,
(int)(long)&((struct stringpool_t *)0)->stringpool_str290,
(int)(long)&((struct stringpool_t *)0)->stringpool_str424,
(int)(long)&((struct stringpool_t *)0)->stringpool_str509,
(int)(long)&((struct stringpool_t *)0)->stringpool_str609,
(int)(long)&((struct stringpool_t *)0)->stringpool_str653,
(int)(long)&((struct stringpool_t *)0)->stringpool_str751,
(int)(long)&((struct stringpool_t *)0)->stringpool_str956,
(int)(long)&((struct stringpool_t *)0)->stringpool_str416,
(int)(long)&((struct stringpool_t *)0)->stringpool_str328,
(int)(long)&((struct stringpool_t *)0)->stringpool_str364,
(int)(long)&((struct stringpool_t *)0)->stringpool_str678,
(int)(long)&((struct stringpool_t *)0)->stringpool_str270,
(int)(long)&((struct stringpool_t *)0)->stringpool_str329,
(int)(long)&((struct stringpool_t *)0)->stringpool_str558,
(int)(long)&((struct stringpool_t *)0)->stringpool_str183,
(int)(long)&((struct stringpool_t *)0)->stringpool_str212,
(int)(long)&((struct stringpool_t *)0)->stringpool_str125,
(int)(long)&((struct stringpool_t *)0)->stringpool_str570,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str188,
(int)(long)&((struct stringpool_t *)0)->stringpool_str245,
(int)(long)&((struct stringpool_t *)0)->stringpool_str184,
(int)(long)&((struct stringpool_t *)0)->stringpool_str146,
(int)(long)&((struct stringpool_t *)0)->stringpool_str400,
(int)(long)&((struct stringpool_t *)0)->stringpool_str593,
(int)(long)&((struct stringpool_t *)0)->stringpool_str601,
(int)(long)&((struct stringpool_t *)0)->stringpool_str573,
(int)(long)&((struct stringpool_t *)0)->stringpool_str295,
(int)(long)&((struct stringpool_t *)0)->stringpool_str377,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str240,
(int)(long)&((struct stringpool_t *)0)->stringpool_str542,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str115,
(int)(long)&((struct stringpool_t *)0)->stringpool_str539,
(int)(long)&((struct stringpool_t *)0)->stringpool_str404,
(int)(long)&((struct stringpool_t *)0)->stringpool_str410,
(int)(long)&((struct stringpool_t *)0)->stringpool_str467,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str307,
(int)(long)&((struct stringpool_t *)0)->stringpool_str105,
(int)(long)&((struct stringpool_t *)0)->stringpool_str300,
(int)(long)&((struct stringpool_t *)0)->stringpool_str103,
(int)(long)&((struct stringpool_t *)0)->stringpool_str131,
(int)(long)&((struct stringpool_t *)0)->stringpool_str124,
(int)(long)&((struct stringpool_t *)0)->stringpool_str448,
(int)(long)&((struct stringpool_t *)0)->stringpool_str274,
(int)(long)&((struct stringpool_t *)0)->stringpool_str86,
(int)(long)&((struct stringpool_t *)0)->stringpool_str841,
(int)(long)&((struct stringpool_t *)0)->stringpool_str836,
(int)(long)&((struct stringpool_t *)0)->stringpool_str865,
(int)(long)&((struct stringpool_t *)0)->stringpool_str701,
(int)(long)&((struct stringpool_t *)0)->stringpool_str279,
(int)(long)&((struct stringpool_t *)0)->stringpool_str59,
(int)(long)&((struct stringpool_t *)0)->stringpool_str645,
(int)(long)&((struct stringpool_t *)0)->stringpool_str276,
+53
View File
@@ -0,0 +1,53 @@
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_8,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_12,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_17,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_23,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_28,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_30,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_35,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_40,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_45,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_50,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_55,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_57,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_63,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_67,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_73,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_78,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_82,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_87,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_92,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_99,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_102,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_106,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_110,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_113,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_116,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_119,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_122,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_125,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_128,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_131,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_138,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_145,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_153,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_161,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_168,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_175,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_182,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_189,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_196,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_203,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_206,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_209,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_212,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_215,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_218,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_221,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_224,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_227,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_229,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_232,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_235,
(int)(long)&((struct stringpool2_t *)0)->stringpool_zos_238,
+69
View File
@@ -0,0 +1,69 @@
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* BIG-5
*/
static int
ces_big5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff))
return big5_mbtowc(conv,pwc,s,2);
else
return RET_ILSEQ;
}
}
return RET_ILSEQ;
}
static int
ces_big5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char buf[2];
int ret;
/* Code set 0 (ASCII) */
ret = ascii_wctomb(conv,r,wc,n);
if (ret != RET_ILUNI)
return ret;
/* Code set 1 (BIG5) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n < 2)
return RET_TOOSMALL;
r[0] = buf[0];
r[1] = buf[1];
return 2;
}
return RET_ILUNI;
}
+64
View File
@@ -0,0 +1,64 @@
/*
* Copyright (C) 1999-2001, 2005, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* GBK
*/
static int
ces_gbk_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
/* Code set 0 (ASCII or GB 1988-89) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (GBK) */
if (c >= 0x81 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
return gbk_mbtowc(conv,pwc,s,2);
}
return RET_ILSEQ;
}
static int
ces_gbk_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char buf[2];
int ret;
/* Code set 0 (ASCII or GB 1988-89) */
ret = ascii_wctomb(conv,r,wc,n);
if (ret != RET_ILUNI)
return ret;
/* Code set 1 (GBK) */
ret = gbk_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n < 2)
return RET_TOOSMALL;
r[0] = buf[0];
r[1] = buf[1];
return 2;
}
return RET_ILUNI;
}
+4240
View File
File diff suppressed because it is too large Load Diff
+40
View File
@@ -0,0 +1,40 @@
/*
* Copyright (C) 1999-2001 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <https://www.gnu.org/licenses/>.
*/
/*
* CNS 11643-1992
*/
/* ISO-2022-CN and EUC-TW use CNS 11643-1992 planes 1 to 7. We also
* have a table for the older plane 15. We use a trick to keep the
* Unicode -> CNS 11643 table as small as possible (see cns11643_inv.h).
*/
#include "cns11643_1.h"
#include "cns11643_2.h"
#include "cns11643_3.h"
#include "cns11643_4.h"
#include "cns11643_5.h"
#include "cns11643_6.h"
#include "cns11643_7.h"
#include "cns11643_15.h"
#include "cns11643_inv.h"
/* Returns the plane number (1,...,7,15) in r[0], the two bytes in r[1],r[2]. */
#define cns11643_wctomb cns11643_inv_wctomb

Some files were not shown because too many files have changed in this diff Show More