pax_global_header 0000666 0000000 0000000 00000000064 14643743343 0014525 g ustar 00root root 0000000 0000000 52 comment=10ea9f5da1d2ef066b1413e6049acbbc2ad94616
gnatcoll-bindings-25.0.0/ 0000775 0000000 0000000 00000000000 14643743343 0015207 5 ustar 00root root 0000000 0000000 gnatcoll-bindings-25.0.0/.gitattributes 0000664 0000000 0000000 00000001556 14643743343 0020111 0 ustar 00root root 0000000 0000000 testsuite/*/*/* no-precommit-check
testsuite/*/*/*/* no-precommit-check
testsuite/*/*/*/*/* no-precommit-check
python3/tests/*/*/* no-precommit-check
python3/tests/*/* no-precommit-check
python3/tests/* no-precommit-check
# Third-party package
src/getRSS.c no-precommit-check
src/sqlite/amalgamation/* no-precommit-check
src/dborm.py no-precommit-check
src/xref.generated/* no-precommit-check
distrib/gnatcoll/runtime.py no-precommit-check
# ??? Workaround bug in style checker, which complains that
# Finalization_Size is an unrecognized attribute
src/gnatcoll-storage_pools-headers.adb no-precommit-check
gnatcoll-bindings-25.0.0/.gitignore 0000664 0000000 0000000 00000000422 14643743343 0017175 0 ustar 00root root 0000000 0000000 makefile.setup
gnat/
docs/_build
*.cgpr
b__*
*.bexch
*.a
*.d
gnatinspect.*
obj/
lib/
install/
*.stdout
*.stderr
*.ali
*.gli
*.exe
*.gcda
*.gcno
*.gcov
*.bexch
*.o
*.deps
*.pyc
setup.json
/gnat_src
*/docs/_build
examples/library/obj
out
/testsuite/prod
/testsuite/gcov
gnatcoll-bindings-25.0.0/.gitlab-ci.yml 0000664 0000000 0000000 00000002606 14643743343 0017647 0 ustar 00root root 0000000 0000000 workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always
- if: $CI_PIPELINE_SOURCE == "web"
when: always
- when: never
stages:
- build
default:
before_script: |
echo "before script executing..."
#######################
## colored execution ##
#######################
exec() {
# dark green + $ + command line + grey
echo -e "\e[0;32m\$ $@\e[0;37m"
$@
# save the result
res=$?
# back to normal output
echo -e -n "\e[0m"
# make sure we translate the exit code
return $res
}
# Enable generic CI for building with Anod
cmd="generic_anod_ci"
# generic anod ci requires --continuous-builder-mode when not run in a
# MR context
if [[ $CI_PIPELINE_SOURCE != "merge_request_event" ]]; then
cmd="$cmd --continuous-builder-mode"
fi
exec eval $cmd
echo "sourcing the generic CI environment"
. /tmp/ci_env.sh
exec anod vcs --list
########
# JOBS #
########
build_and_test:
services:
- image:e3
- cpu:2
stage: build
interruptible: true
parallel:
matrix:
- PYTHON: ["3.9", "3.10", "3.11", "3.12"]
script:
- anod test --latest gnatcoll-bindings -Qpython=$PYTHON
- testsuite_reports
artifacts:
reports:
junit: xunit-*.xml
gnatcoll-bindings-25.0.0/.gitreview 0000664 0000000 0000000 00000000152 14643743343 0017213 0 ustar 00root root 0000000 0000000 [gerrit]
host = git.adacore.com
project = gnatcoll-bindings
defaultbranch = master
defaultremote = origin
gnatcoll-bindings-25.0.0/COPYING.RUNTIME 0000664 0000000 0000000 00000006460 14643743343 0017372 0 ustar 00root root 0000000 0000000 GCC RUNTIME LIBRARY EXCEPTION
Version 3.1, 31 March 2009
Copyright (c) 2009 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This GCC Runtime Library Exception ("Exception") is an additional permission under section 7 of the GNU General Public License,
version 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that bears a notice placed by the copyright holder of
the file stating that the file is governed by GPLv3 along with this Exception.
When you use GCC to compile a program, GCC may combine portions of certain GCC header files and runtime libraries with the
compiled program. The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to
use, in this way, the header files and runtime libraries covered by this Exception.
0. Definitions.
A file is an "Independent Module" if it either requires the Runtime Library for execution after a Compilation
Process, or makes use of an interface provided by the Runtime Library, but is not otherwise based on the Runtime Library.
"GCC" means a version of the GNU Compiler Collection, with or without modifications, governed by version 3
(or a specified later version) of the GNU General Public License (GPL) with the option of using any subsequent
versions published by the FSF.
"GPL-compatible Software" is software whose conditions of propagation, modification and use would permit combination
with GCC in accord with the license of GCC.
"Target Code" refers to output from any compiler for a real or virtual target processor architecture, in executable
form or suitable for input to an assembler, loader, linker and/or execution phase. Notwithstanding that, Target Code
does not include data in any format that is used as a compiler intermediate representation, or used for producing a
compiler intermediate representation.
The "Compilation Process" transforms code entirely represented in non-intermediate languages designed for human-written
code, and/or in Java Virtual Machine byte code, into Target Code. Thus, for example, use of source code generators and
preprocessors need not be considered part of the Compilation Process, since the Compilation Process can be understood as
starting with the output of the generators or preprocessors.
A Compilation Process is "Eligible" if it is done using GCC, alone or with other GPL-compatible software, or if it is
done without using any work based on GCC. For example, using non-GPL-compatible Software to optimize any GCC
intermediate representations would not qualify as an Eligible Compilation Process.
1. Grant of Additional Permission.
You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules,
even if such propagation would otherwise violate the terms of GPLv3, provided that all Target Code was generated by
Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the
licensing of the Independent Modules.
2. No Weakening of GCC Copyleft.
The availability of this Exception does not imply any general presumption that third-party software is unaffected by
the copyleft requirements of the license of GCC.
gnatcoll-bindings-25.0.0/COPYING3 0000664 0000000 0000000 00000104513 14643743343 0016331 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
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.
Copyright (C)
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 .
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:
Copyright (C)
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
.
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
.
gnatcoll-bindings-25.0.0/README.md 0000664 0000000 0000000 00000004115 14643743343 0016467 0 ustar 00root root 0000000 0000000 The GNAT Components Collection (GNATcoll) - Bindings
====================================================
This is the bindings module of the GNAT Components Collection. Please refer to
individual components for more details.
Dependencies
------------
This module depends on the following external components, that should be
available on your system:
- GPRbuild
- gnatcoll-core
- As well as relevant third-party libraries you need to build bindings for.
Building
--------
The components of GNATcoll Bindings are built using standalone GPR project
files. To build each of them you can simply do:
```sh
$ gprbuild -P /gnatcoll-.gpr
```
However, this method has several limitations:
* it builds one version of the library (static, relocatable and static-pic)
at a time
* it might depend on the environment (`C_INCLUDE_PATH`, `LIBRARY_PATH`, ...)
In order to simplify that process, each component contains a Python script
called `setup.py`. Each script provides the following subcommands: `build`,
`install`, `clean`, `uninstall`.
On the first call to `build`, the user can setup some preferences. You can do
`setup.py build --help` to get the list of available options for each module.
After first call previous preferences will be reused unless you use the
`--reconfigure` switch.
Note that you can perform an out-of-source-tree build by just invoking
`setup.py` from another directory.
Installing
----------
In order to install a given component, either call `gprinstall` or use
`setup.py` script:
```sh
$ setup.py install --prefix=some_path
```
Note that if `--prefix` is not used, then projects will be installed into the
location of the used compiler.
Bindings
--------
The following bindings are provided:
- [gmp](gmp/README.md)
- [iconv](iconv/README.md)
- lzma
- [omp](omp/README.md)
- [python](python/README.md)
- [python3](python3/README.md)
- [readline](readline/README.md)
- [syslog](syslog/README.md)
Bug reports
-----------
Please send questions and bug reports to report@adacore.com following
the same procedures used to submit reports with the GNAT toolset itself.
gnatcoll-bindings-25.0.0/cpp/ 0000775 0000000 0000000 00000000000 14643743343 0015771 5 ustar 00root root 0000000 0000000 gnatcoll-bindings-25.0.0/cpp/cpp_string_support.cpp 0000664 0000000 0000000 00000033170 14643743343 0022445 0 ustar 00root root 0000000 0000000 /****************************************************************************
* G N A T C O L L *
* *
* Copyright (C) 2023, AdaCore *
* *
* This library is free software; you can redistribute it and/or modify it *
* under terms of the GNU General Public License as published by the Free *
* Software Foundation; either version 3, 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 MERCHAN- *
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* As a special exception under Section 7 of GPL version 3, you are granted *
* additional permissions described in the GCC Runtime Library Exception, *
* version 3.1, as published by the Free Software Foundation. *
* *
* You should have received a copy of the GNU General Public License and *
* a copy of the GCC Runtime Library Exception along with this program; *
* see the files COPYING3 and COPYING.RUNTIME respectively. If not, see *
* . *
* *
****************************************************************************/
/* Provide helper functions to implement in GNATCOLL.CPP.Strings a wrapper
of the C++ ISO/IEC 14882:1998(E) string class. */
#include
using namespace std;
struct CPP_String {
string *str;
};
extern "C" void gnatcoll_cpp_append_string
(CPP_String* s,
const CPP_String* text)
{
(s->str) -> append(*(text->str));
}
extern "C" void gnatcoll_cpp_append_substring
(CPP_String* s,
const CPP_String* text,
size_t subpos,
size_t sublen)
{
(s->str) -> append(*(text->str), subpos, sublen);
}
extern "C" void gnatcoll_cpp_append_text
(CPP_String* s,
const char* text)
{
(s->str) -> append(text);
}
extern "C" void gnatcoll_cpp_append_buffer
(CPP_String* s,
const char* text,
size_t n)
{
(s->str) -> append(text, n);
}
extern "C" void gnatcoll_cpp_append_fill
(CPP_String* s,
size_t n,
char c)
{
(s->str) -> append(n, c);
}
extern "C" void gnatcoll_cpp_assign_string
(CPP_String* s,
const CPP_String* text)
{
*(s->str) = *(text->str);
}
extern "C" void gnatcoll_cpp_assign_text
(CPP_String* s,
const char* text)
{
*(s->str) = text;
}
extern "C" void gnatcoll_cpp_assign_char
(CPP_String* s,
const char c)
{
*(s->str) = c;
}
extern "C" size_t gnatcoll_cpp_capacity
(CPP_String* s)
{
return (s->str) -> capacity();
}
extern "C" char gnatcoll_cpp_char_at
(CPP_String* s,
size_t pos)
{
return ((s->str) -> at(pos));
}
extern "C" int gnatcoll_cpp_compare
(CPP_String* left,
CPP_String* right)
{
return (left->str) -> compare(*(right->str));
}
extern "C" int gnatcoll_cpp_compare_with_substring
(CPP_String* left,
size_t pos,
size_t len,
CPP_String *right)
{
return (left->str) -> compare(pos, len, *(right->str));
}
extern "C" int gnatcoll_cpp_compare_substrings
(CPP_String* left,
size_t pos,
size_t len,
CPP_String* right,
size_t subpos,
size_t sublen)
{
return (left->str) -> compare(pos, len, *(right->str), subpos, sublen);
}
extern "C" int gnatcoll_cpp_compare_with_text
(CPP_String* left,
const char* right)
{
return (left->str) -> compare(right);
}
extern "C" int gnatcoll_cpp_compare_substring_with_text
(CPP_String* left,
size_t pos,
size_t len,
const char* right)
{
return (left->str) -> compare(pos, len, right);
}
extern "C" int gnatcoll_cpp_compare_substring_with_buffer
(CPP_String* left,
size_t pos,
size_t len,
const char* right,
size_t n)
{
return (left->str) -> compare(pos, len, right, n);
}
extern "C" void gnatcoll_cpp_clear
(CPP_String* s)
{
(s->str) -> clear();
}
extern "C" void gnatcoll_cpp_copy
(CPP_String* s,
char* to_str,
size_t len,
size_t pos,
size_t* num_bytes)
{
*num_bytes = (s->str) -> copy(to_str, len, pos);
}
extern "C" const char* gnatcoll_cpp_c_str
(CPP_String* s)
{
return (s->str) -> c_str();
}
extern "C" const char* gnatcoll_cpp_data
(CPP_String* s)
{
return (s->str) -> data();
}
extern "C" void gnatcoll_cpp_destroy
(CPP_String* s)
{
free (s->str);
}
extern "C" bool gnatcoll_cpp_empty
(CPP_String* s)
{
return (s->str) -> empty();
}
extern "C" void gnatcoll_cpp_erase_sequence
(CPP_String* s,
size_t pos,
size_t len)
{
(s->str) -> erase(pos, len);
}
extern "C" size_t gnatcoll_cpp_find_first_not_of_string
(CPP_String* s,
const CPP_String* text,
size_t pos)
{
return (s->str) -> find_first_not_of(*(text->str), pos);
}
extern "C" size_t gnatcoll_cpp_find_first_not_of_text
(CPP_String* s,
const char* text,
size_t pos)
{
return (s->str) -> find_first_not_of(text, pos);
}
extern "C" size_t gnatcoll_cpp_find_first_not_of_buffer
(CPP_String* s,
const char* text,
size_t pos, size_t n)
{
return (s->str) -> find_first_not_of(text, pos, n);
}
extern "C" size_t gnatcoll_cpp_find_first_not_of_char
(CPP_String* s,
char c,
size_t pos)
{
return (s->str) -> find_first_not_of(c, pos);
}
extern "C" size_t gnatcoll_cpp_find_first_of_string
(CPP_String* s,
const CPP_String* text,
size_t pos)
{
return (s->str) -> find_first_of(*(text->str), pos);
}
extern "C" size_t gnatcoll_cpp_find_first_of_text
(CPP_String* s,
const char* text,
size_t pos)
{
return (s->str) -> find_first_of(text, pos);
}
extern "C" size_t gnatcoll_cpp_find_first_of_buffer
(CPP_String* s,
const char* text,
size_t pos, size_t n)
{
return (s->str) -> find_first_of(text, pos, n);
}
extern "C" size_t gnatcoll_cpp_find_first_of_char
(CPP_String* s,
char c,
size_t pos)
{
return (s->str) -> find_first_of(c, pos);
}
extern "C" size_t gnatcoll_cpp_find_last_not_of_string
(CPP_String* s,
const CPP_String* text,
size_t pos)
{
return (s->str) -> find_last_not_of(*(text->str), pos);
}
extern "C" size_t gnatcoll_cpp_find_last_not_of_text
(CPP_String* s,
const char* text,
size_t pos)
{
return (s->str) -> find_last_not_of(text, pos);
}
extern "C" size_t gnatcoll_cpp_find_last_not_of_buffer
(CPP_String* s,
const char* text,
size_t pos,
size_t n)
{
return (s->str) -> find_last_not_of(text, pos, n);
}
extern "C" size_t gnatcoll_cpp_find_last_not_of_char
(CPP_String* s,
char c,
size_t pos)
{
return (s->str) -> find_last_not_of(c, pos);
}
extern "C" size_t gnatcoll_cpp_find_last_of_string
(CPP_String* s,
const CPP_String* text,
size_t pos)
{
return (s->str) -> find_last_of(*(text->str), pos);
}
extern "C" size_t gnatcoll_cpp_find_last_of_text
(CPP_String* s,
const char* text,
size_t pos)
{
return (s->str) -> find_last_of(text, pos);
}
extern "C" size_t gnatcoll_cpp_find_last_of_buffer
(CPP_String* s,
const char* text,
size_t pos,
size_t n)
{
return (s->str) -> find_last_of(text, pos, n);
}
extern "C" size_t gnatcoll_cpp_find_last_of_char
(CPP_String* s,
char c,
size_t pos)
{
return (s->str) -> find_last_of(c, pos);
}
extern "C" size_t gnatcoll_cpp_find_string
(CPP_String* s,
const CPP_String* text,
size_t pos)
{
return (s->str) -> find(*(text->str), pos);
}
extern "C" size_t gnatcoll_cpp_find_text
(CPP_String* s,
const char* text,
size_t pos)
{
return (s->str) -> find(text, pos);
}
extern "C" size_t gnatcoll_cpp_find_buffer
(CPP_String* s,
const char* text,
size_t pos,
size_t n)
{
return (s->str) -> find(text, pos, n);
}
extern "C" size_t gnatcoll_cpp_find_char
(CPP_String* s,
char c,
size_t pos)
{
return (s->str) -> find(c, pos);
}
extern "C" void gnatcoll_cpp_init
(CPP_String* s)
{
s->str = new std::string();
}
extern "C" void gnatcoll_cpp_init_with_fill
(CPP_String* s,
size_t n,
char c)
{
s->str = new std::string(n,c);
}
extern "C" void gnatcoll_cpp_init_with_text
(CPP_String* s,
const char* text)
{
s->str = new std::string(text);
}
extern "C" void gnatcoll_cpp_insert_string
(CPP_String* s,
size_t pos,
const CPP_String* text)
{
(s->str) -> insert(pos, *(text->str));
}
extern "C" void gnatcoll_cpp_insert_substring
(CPP_String* s,
size_t pos,
const CPP_String* text,
size_t subpos,
size_t sublen)
{
(s->str) -> insert(pos, *(text->str), subpos, sublen);
}
extern "C" void gnatcoll_cpp_insert_text
(CPP_String* s,
size_t pos,
const char *text)
{
(s->str) -> insert(pos, text);
}
extern "C" void gnatcoll_cpp_insert_buffer
(CPP_String* s,
size_t pos,
const char *text,
size_t n)
{
(s->str) -> insert(pos, text, n);
}
extern "C" void gnatcoll_cpp_insert_fill
(CPP_String* s,
size_t pos,
size_t n,
char c)
{
(s->str) -> insert(pos, n, c);
}
extern "C" size_t gnatcoll_cpp_length
(CPP_String* s)
{
return (s->str) -> length();
}
extern "C" size_t gnatcoll_cpp_max_size
(CPP_String* s)
{
return (s->str) -> max_size();
}
extern "C" size_t gnatcoll_cpp_npos() {
return string::npos;
}
extern "C" void gnatcoll_cpp_pop_back
(CPP_String* s)
{
(s->str) -> pop_back();
}
extern "C" void gnatcoll_cpp_push_back
(CPP_String* s,
char c)
{
(s->str) -> push_back(c);
}
extern "C" void gnatcoll_cpp_replace_string
(CPP_String* s,
size_t pos,
size_t len,
const CPP_String* text)
{
(s->str) -> replace(pos, len, *(text->str));
}
extern "C" void gnatcoll_cpp_replace_substring
(CPP_String* s,
size_t pos,
size_t len,
const CPP_String* text,
size_t subpos, size_t sublen)
{
(s->str) -> replace(pos, len, *(text->str), subpos, sublen);
}
extern "C" void gnatcoll_cpp_replace_text
(CPP_String* s,
size_t pos,
size_t len,
const char *text)
{
(s->str) -> replace(pos, len, text);
}
extern "C" void gnatcoll_cpp_replace_buffer
(CPP_String* s,
size_t pos,
size_t len,
const char *text,
size_t n)
{
(s->str) -> replace(pos, len, text, n);
}
extern "C" void gnatcoll_cpp_replace_fill
(CPP_String* s,
size_t pos,
size_t len,
size_t n,
char c)
{
(s->str) -> replace(pos, len, n, c);
}
extern "C" void gnatcoll_cpp_reserve
(CPP_String* s,
size_t n)
{
(s->str) -> reserve(n);
}
extern "C" void gnatcoll_cpp_resize
(CPP_String* s, size_t n)
{
(s->str) -> resize(n);
}
extern "C" void gnatcoll_cpp_resize_with_fill
(CPP_String* s,
size_t n,
char c)
{
(s->str) -> resize(n,c);
}
extern "C" size_t gnatcoll_cpp_reverse_find_string
(CPP_String* s,
const CPP_String* text,
size_t pos)
{
return (s->str) -> rfind(*(text->str), pos);
}
extern "C" size_t gnatcoll_cpp_reverse_find_text
(CPP_String* s,
const char* text,
size_t pos)
{
return (s->str) -> rfind(text, pos);
}
extern "C" size_t gnatcoll_cpp_reverse_find_buffer
(CPP_String* s,
const char* text,
size_t pos,
size_t n)
{
return (s->str) -> rfind(text, pos, n);
}
extern "C" size_t gnatcoll_cpp_reverse_find_char
(CPP_String* s,
char c,
size_t pos)
{
return (s->str) -> rfind(c, pos);
}
extern "C" size_t gnatcoll_cpp_size
(CPP_String* s)
{
return (s->str) -> size();
}
extern "C" void gnatcoll_cpp_substr
(CPP_String* result,
CPP_String* s,
size_t pos,
size_t len)
{
std::string aux = (s->str) -> substr(pos, len);
const char* text = aux.c_str();
gnatcoll_cpp_init_with_text(result, text);
}
extern "C" void gnatcoll_cpp_swap_strings
(CPP_String* s1,
CPP_String* s2)
{
(s1->str) -> swap (*(s2->str));
}
// Relational Operators
// ********************
extern "C" bool gnatcoll_cpp_eq_strings
(CPP_String* left,
CPP_String* right)
{
return *(left->str) == *(right->str);
}
extern "C" bool gnatcoll_cpp_eq_text_string
(const char* left,
CPP_String* right)
{
return left == *(right->str);
}
extern "C" bool gnatcoll_cpp_eq_string_text
(CPP_String* left,
const char* right)
{
return *(left->str) == right;
}
extern "C" bool gnatcoll_cpp_lt_strings
(CPP_String* left,
CPP_String* right)
{
return *(left->str) < *(right->str);
}
extern "C" bool gnatcoll_cpp_lt_text_string
(const char* left,
CPP_String* right)
{
return left < *(right->str);
}
extern "C" bool gnatcoll_cpp_lt_string_text
(CPP_String* left,
const char* right)
{
return *(left->str) < right;
}
extern "C" bool gnatcoll_cpp_le_strings
(CPP_String* left,
CPP_String* right)
{
return *(left->str) <= *(right->str);
}
extern "C" bool gnatcoll_cpp_le_text_string
(const char* left,
CPP_String* right)
{
return left <= *(right->str);
}
extern "C" bool gnatcoll_cpp_le_string_text
(CPP_String* left,
const char* right)
{
return *(left->str) <= right;
}
extern "C" bool gnatcoll_cpp_gt_strings
(CPP_String* left,
CPP_String* right)
{
return *(left->str) > *(right->str);
}
extern "C" bool gnatcoll_cpp_gt_text_string
(const char* left,
CPP_String* right)
{
return left > *(right->str);
}
extern "C" bool gnatcoll_cpp_gt_string_text
(CPP_String* left,
const char* right)
{
return *(left->str) > right;
}
extern "C" bool gnatcoll_cpp_ge_strings
(CPP_String* left,
CPP_String* right)
{
return *(left->str) >= *(right->str);
}
extern "C" bool gnatcoll_cpp_ge_text_string
(const char* left,
CPP_String* right)
{
return left >= *(right->str);
}
extern "C" bool gnatcoll_cpp_ge_string_text
(CPP_String* left,
const char* right)
{
return *(left->str) >= right;
}
gnatcoll-bindings-25.0.0/cpp/gnatcoll-cpp-strings.adb 0000664 0000000 0000000 00000120163 14643743343 0022516 0 ustar 00root root 0000000 0000000 ------------------------------------------------------------------------------
-- G N A T C O L L --
-- --
-- Copyright (C) 2023, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 3, 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 MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- . --
-- --
------------------------------------------------------------------------------
with Interfaces.C.Extensions;
package body GNATCOLL.CPP.Strings is
use Interfaces.C;
use Interfaces.C.Extensions;
use Interfaces.C.Strings;
use System;
package External is
procedure Append_String
(Str : in out CPP_String;
Text : CPP_String);
pragma Import (C, Append_String,
"gnatcoll_cpp_append_string");
procedure Append_Substring
(Str : in out CPP_String;
Text : CPP_String;
Subpos : size_t;
Sublen : size_t);
pragma Import (C, Append_Substring,
"gnatcoll_cpp_append_substring");
procedure Append_Text
(Str : in out CPP_String;
Text : chars_ptr);
pragma Import (C, Append_Text,
"gnatcoll_cpp_append_text");
procedure Append_Buffer
(Str : in out CPP_String;
Text : chars_ptr;
N : size_t);
pragma Import (C, Append_Buffer,
"gnatcoll_cpp_append_buffer");
procedure Append_Fill
(Str : in out CPP_String;
N : size_t;
C : Character);
pragma Import (C, Append_Fill,
"gnatcoll_cpp_append_fill");
procedure Assign_String
(Str : in out CPP_String;
Text : CPP_String);
pragma Import (C, Assign_String,
"gnatcoll_cpp_assign_string");
procedure Assign_Text
(Str : in out CPP_String;
Text : chars_ptr);
pragma Import (C, Assign_Text,
"gnatcoll_cpp_assign_text");
procedure Assign_Char
(Str : in out CPP_String;
C : Character);
pragma Import (C, Assign_Char,
"gnatcoll_cpp_assign_char");
function Capacity
(Str : CPP_String) return size_t;
pragma Import (C, Capacity,
"gnatcoll_cpp_capacity");
function Char_At
(Str : CPP_String; Pos : size_t) return Character;
pragma Import (C, Char_At,
"gnatcoll_cpp_char_at");
procedure Clear
(Str : in out CPP_String);
pragma Import (C, Clear,
"gnatcoll_cpp_clear");
function Compare
(Left : CPP_String;
Right : CPP_String) return Integer;
pragma Import (C, Compare,
"gnatcoll_cpp_compare");
function Compare_With_Substring
(Left : CPP_String;
Pos : size_t;
Len : size_t;
Right : CPP_String) return Integer;
pragma Import (C, Compare_With_Substring,
"gnatcoll_cpp_compare_with_substring");
function Compare_Substrings
(Left : CPP_String;
Pos : size_t;
Len : size_t;
Right : CPP_String;
Subpos : size_t;
Sublen : size_t) return Integer;
pragma Import (C, Compare_Substrings,
"gnatcoll_cpp_compare_substrings");
function Compare_With_Text
(Left : CPP_String;
Right : chars_ptr) return Integer;
pragma Import (C, Compare_With_Text,
"gnatcoll_cpp_compare_with_text");
function Compare_Substring_With_Text
(Left : CPP_String;
Pos : size_t;
Len : size_t;
Right : chars_ptr) return Integer;
pragma Import (C, Compare_Substring_With_Text,
"gnatcoll_cpp_compare_substring_with_text");
function Compare_Substring_With_Buffer
(Left : CPP_String;
Pos : size_t;
Len : size_t;
Right : chars_ptr;
N : size_t) return Integer;
pragma Import (C, Compare_Substring_With_Buffer,
"gnatcoll_cpp_compare_substring_with_buffer");
procedure Copy
(From_Str : CPP_String;
To_Str : chars_ptr;
Len : size_t;
Pos : size_t;
Num_Chars : access size_t);
pragma Import (C, Copy,
"gnatcoll_cpp_copy");
function C_Str
(Str : CPP_String) return chars_ptr;
pragma Import (C, C_Str,
"gnatcoll_cpp_c_str");
function Data
(Str : CPP_String) return chars_ptr;
pragma Import (C, Data,
"gnatcoll_cpp_data");
procedure Destroy
(Str : in out CPP_String);
pragma Import (C, Destroy,
"gnatcoll_cpp_destroy");
function Empty
(Str : CPP_String) return bool;
pragma Import (C, Empty,
"gnatcoll_cpp_empty");
procedure Erase_Sequence
(Str : in out CPP_String;
Pos : size_t;
Len : size_t);
pragma Import (C, Erase_Sequence,
"gnatcoll_cpp_erase_sequence");
function Find_String
(Str : CPP_String;
Text : CPP_String;
Pos : size_t) return size_t;
pragma Import (C, Find_String,
"gnatcoll_cpp_find_string");
function Find_Text
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t) return size_t;
pragma Import (C, Find_Text,
"gnatcoll_cpp_find_text");
function Find_Buffer
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t;
pragma Import (C, Find_Buffer,
"gnatcoll_cpp_find_buffer");
function Find_Char
(Str : CPP_String;
C : Character;
Pos : size_t) return size_t;
pragma Import (C, Find_Char,
"gnatcoll_cpp_find_char");
function Find_First_Not_Of_String
(Str : CPP_String;
Text : CPP_String;
Pos : size_t) return size_t;
pragma Import (C, Find_First_Not_Of_String,
"gnatcoll_cpp_find_first_not_of_string");
function Find_First_Not_Of_Text
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t) return size_t;
pragma Import (C, Find_First_Not_Of_Text,
"gnatcoll_cpp_find_first_not_of_text");
function Find_First_Not_Of_Buffer
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t;
pragma Import (C, Find_First_Not_Of_Buffer,
"gnatcoll_cpp_find_first_not_of_buffer");
function Find_First_Not_Of_Char
(Str : CPP_String;
C : Character;
Pos : size_t) return size_t;
pragma Import (C, Find_First_Not_Of_Char,
"gnatcoll_cpp_find_first_not_of_char");
function Find_First_Of_String
(Str : CPP_String;
Text : CPP_String;
Pos : size_t) return size_t;
pragma Import (C, Find_First_Of_String,
"gnatcoll_cpp_find_first_of_string");
function Find_First_Of_Text
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t) return size_t;
pragma Import (C, Find_First_Of_Text,
"gnatcoll_cpp_find_first_of_text");
function Find_First_Of_Buffer
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t;
pragma Import (C, Find_First_Of_Buffer,
"gnatcoll_cpp_find_first_of_buffer");
function Find_First_Of_Char
(Str : CPP_String;
C : Character;
Pos : size_t) return size_t;
pragma Import (C, Find_First_Of_Char,
"gnatcoll_cpp_find_first_of_char");
function Find_Last_Not_Of_String
(Str : CPP_String;
Text : CPP_String;
Pos : size_t) return size_t;
pragma Import (C, Find_Last_Not_Of_String,
"gnatcoll_cpp_find_last_not_of_string");
function Find_Last_Not_Of_Text
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t) return size_t;
pragma Import (C, Find_Last_Not_Of_Text,
"gnatcoll_cpp_find_last_not_of_text");
function Find_Last_Not_Of_Buffer
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t;
pragma Import (C, Find_Last_Not_Of_Buffer,
"gnatcoll_cpp_find_last_not_of_buffer");
function Find_Last_Not_Of_Char
(Str : CPP_String;
C : Character;
Pos : size_t) return size_t;
pragma Import (C, Find_Last_Not_Of_Char,
"gnatcoll_cpp_find_last_not_of_char");
function Find_Last_Of_String
(Str : CPP_String;
Text : CPP_String;
Pos : size_t) return size_t;
pragma Import (C, Find_Last_Of_String,
"gnatcoll_cpp_find_last_of_string");
function Find_Last_Of_Text
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t) return size_t;
pragma Import (C, Find_Last_Of_Text,
"gnatcoll_cpp_find_last_of_text");
function Find_Last_Of_Buffer
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t;
pragma Import (C, Find_Last_Of_Buffer,
"gnatcoll_cpp_find_last_of_buffer");
function Find_Last_Of_Char
(Str : CPP_String;
C : Character;
Pos : size_t) return size_t;
pragma Import (C, Find_Last_Of_Char,
"gnatcoll_cpp_find_last_of_char");
procedure Init
(Str : in out CPP_String);
pragma Import (C, Init,
"gnatcoll_cpp_init");
procedure Init_With_Text
(Str : in out CPP_String;
Text : chars_ptr);
pragma Import (C, Init_With_Text,
"gnatcoll_cpp_init_with_text");
procedure Init_With_Fill
(Str : in out CPP_String;
N : size_t;
C : Character);
pragma Import (C, Init_With_Fill,
"gnatcoll_cpp_init_with_fill");
procedure Insert_String
(Str : in out CPP_String;
Pos : size_t;
Text : CPP_String);
pragma Import (C, Insert_String,
"gnatcoll_cpp_insert_string");
procedure Insert_Substring
(Str : in out CPP_String;
Pos : size_t;
Text : CPP_String;
Subpos : size_t;
Sublen : size_t);
pragma Import (C, Insert_Substring,
"gnatcoll_cpp_insert_substring");
procedure Insert_Text
(Str : in out CPP_String;
Pos : size_t;
Text : chars_ptr);
pragma Import (C, Insert_Text,
"gnatcoll_cpp_insert_text");
procedure Insert_Buffer
(Str : in out CPP_String;
Pos : size_t;
Text : chars_ptr;
N : size_t);
pragma Import (C, Insert_Buffer,
"gnatcoll_cpp_insert_buffer");
procedure Insert_Fill
(Str : in out CPP_String;
Pos : size_t;
N : size_t;
C : Character);
pragma Import (C, Insert_Fill,
"gnatcoll_cpp_insert_fill");
function Length
(Str : CPP_String) return size_t;
pragma Import (C, Length,
"gnatcoll_cpp_length");
function Max_Size
(Str : CPP_String) return size_t;
pragma Import (C, Max_Size,
"gnatcoll_cpp_max_size");
function Npos return size_t;
pragma Import (C, Npos,
"gnatcoll_cpp_npos");
procedure Pop_Back
(Str : in out CPP_String);
pragma Import (C, Pop_Back,
"gnatcoll_cpp_pop_back");
procedure Push_Back
(Str : in out CPP_String;
C : Character);
pragma Import (C, Push_Back,
"gnatcoll_cpp_push_back");
procedure Replace_String
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
Text : CPP_String);
pragma Import (C, Replace_String,
"gnatcoll_cpp_replace_string");
procedure Replace_Substring
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
Text : CPP_String;
Subpos : size_t;
Sublen : size_t);
pragma Import (C, Replace_Substring,
"gnatcoll_cpp_replace_substring");
procedure Replace_Text
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
Text : chars_ptr);
pragma Import (C, Replace_Text,
"gnatcoll_cpp_replace_text");
procedure Replace_Buffer
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
Text : chars_ptr;
N : size_t);
pragma Import (C, Replace_Buffer,
"gnatcoll_cpp_replace_buffer");
procedure Replace_Fill
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
N : size_t;
C : Character);
pragma Import (C, Replace_Fill,
"gnatcoll_cpp_replace_fill");
procedure Reserve
(Str : in out CPP_String;
N : size_t := 0);
pragma Import (C, Reserve,
"gnatcoll_cpp_reserve");
procedure Resize
(Str : in out CPP_String;
N : size_t);
pragma Import (C, Resize,
"gnatcoll_cpp_resize");
procedure Resize_And_Fill
(Str : in out CPP_String;
N : size_t;
C : Character);
pragma Import (C, Resize_And_Fill,
"gnatcoll_cpp_resize_with_fill");
function Reverse_Find_String
(Str : CPP_String;
Text : CPP_String;
Pos : size_t) return size_t;
pragma Import (C, Reverse_Find_String,
"gnatcoll_cpp_reverse_find_string");
function Reverse_Find_Text
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t) return size_t;
pragma Import (C, Reverse_Find_Text,
"gnatcoll_cpp_reverse_find_text");
function Reverse_Find_Buffer
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t;
pragma Import (C, Reverse_Find_Buffer,
"gnatcoll_cpp_reverse_find_buffer");
function Reverse_Find_Char
(Str : CPP_String;
C : Character;
Pos : size_t) return size_t;
pragma Import (C, Reverse_Find_Char,
"gnatcoll_cpp_reverse_find_char");
function Size
(Str : CPP_String) return size_t;
pragma Import (C, Size,
"gnatcoll_cpp_size");
procedure Substr
(Result : in out CPP_String;
Str : CPP_String;
Pos : size_t := 0;
Len : size_t := Npos);
pragma Import (C, Substr,
"gnatcoll_cpp_substr");
procedure Swap
(Str : in out CPP_String;
Text : in out CPP_String);
pragma Import (C, Swap,
"gnatcoll_cpp_swap_strings");
--------------------------
-- Relational_Operators --
--------------------------
function Eq_String
(Left : CPP_String; Right : CPP_String) return bool;
pragma Import (C, Eq_String,
"gnatcoll_cpp_eq_strings");
function Eq_Text_String
(Left : chars_ptr; Right : CPP_String) return bool;
pragma Import (C, Eq_Text_String,
"gnatcoll_cpp_eq_text_string");
function Eq_String_Text
(Left : CPP_String; Right : chars_ptr) return bool;
pragma Import (C, Eq_String_Text,
"gnatcoll_cpp_eq_string_text");
function Lt_String
(Left : CPP_String; Right : CPP_String) return bool;
pragma Import (C, Lt_String,
"gnatcoll_cpp_lt_strings");
function Lt_Text_String
(Left : chars_ptr; Right : CPP_String) return bool;
pragma Import (C, Lt_Text_String,
"gnatcoll_cpp_lt_text_string");
function Lt_String_Text
(Left : CPP_String; Right : chars_ptr) return bool;
pragma Import (C, Lt_String_Text,
"gnatcoll_cpp_lt_string_text");
function Le_String
(Left : CPP_String; Right : CPP_String) return bool;
pragma Import (C, Le_String,
"gnatcoll_cpp_le_strings");
function Le_Text_String
(Left : chars_ptr; Right : CPP_String) return bool;
pragma Import (C, Le_Text_String,
"gnatcoll_cpp_le_text_string");
function Le_String_Text
(Left : CPP_String; Right : chars_ptr) return bool;
pragma Import (C, Le_String_Text,
"gnatcoll_cpp_le_string_text");
function Gt_String
(Left : CPP_String; Right : CPP_String) return bool;
pragma Import (C, Gt_String,
"gnatcoll_cpp_gt_strings");
function Gt_Text_String
(Left : chars_ptr; Right : CPP_String) return bool;
pragma Import (C, Gt_Text_String,
"gnatcoll_cpp_gt_text_string");
function Gt_String_Text
(Left : CPP_String; Right : chars_ptr) return bool;
pragma Import (C, Gt_String_Text,
"gnatcoll_cpp_gt_string_text");
function Ge_String
(Left : CPP_String; Right : CPP_String) return bool;
pragma Import (C, Ge_String,
"gnatcoll_cpp_ge_strings");
function Ge_Text_String
(Left : chars_ptr; Right : CPP_String) return bool;
pragma Import (C, Ge_Text_String,
"gnatcoll_cpp_ge_text_string");
function Ge_String_Text
(Left : CPP_String; Right : chars_ptr) return bool;
pragma Import (C, Ge_String_Text,
"gnatcoll_cpp_ge_string_text");
end External;
procedure Check_Non_Null (Str : CPP_String);
-- Raise Constraint_Error if Str is not initialized.
------------
-- Append --
------------
procedure Append
(Str : in out CPP_String;
Text : String)
is
C_Text : chars_ptr := New_String (Text);
begin
Check_Non_Null (Str);
External.Append_Text (Str, C_Text);
Free (C_Text);
end Append;
procedure Append
(Str : in out CPP_String;
Text : CPP_String)
is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
External.Append_String (Str, Text);
end Append;
procedure Append
(Str : in out CPP_String;
Text : CPP_String;
Subpos : size_t;
Sublen : size_t) is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
External.Append_Substring (Str, Text, Subpos, Sublen);
end Append;
procedure Append
(Str : in out CPP_String;
Text : chars_ptr) is
begin
Check_Non_Null (Str);
External.Append_Text (Str, Text);
end Append;
procedure Append
(Str : in out CPP_String;
Text : chars_ptr;
N : size_t) is
begin
Check_Non_Null (Str);
External.Append_Buffer (Str, Text, N);
end Append;
procedure Append
(Str : in out CPP_String;
N : size_t;
C : Character) is
begin
Check_Non_Null (Str);
External.Append_Fill (Str, N, C);
end Append;
------------
-- Assign --
------------
procedure Assign
(Str : in out CPP_String; Text : CPP_String) is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
External.Assign_String (Str, Text);
end Assign;
procedure Assign
(Str : in out CPP_String; Text : String)
is
C_Text : chars_ptr := New_String (Text);
begin
Check_Non_Null (Str);
Assign (Str, C_Text);
Free (C_Text);
end Assign;
procedure Assign
(Str : in out CPP_String;
Text : chars_ptr) is
begin
Check_Non_Null (Str);
External.Assign_Text (Str, Text);
end Assign;
procedure Assign
(Str : in out CPP_String; C : Character) is
begin
Check_Non_Null (Str);
External.Assign_Char (Str, C);
end Assign;
--------------
-- Capacity --
--------------
function Capacity
(Str : CPP_String) return size_t is
begin
Check_Non_Null (Str);
return External.Capacity (Str);
end Capacity;
-------------
-- Char_At --
-------------
function Char_At (Str : CPP_String; Pos : size_t) return Character is
begin
Check_Non_Null (Str);
return External.Char_At (Str, Pos);
end Char_At;
--------------------
-- Check_Non_Null --
--------------------
procedure Check_Non_Null (Str : CPP_String) is
begin
if Str.Wrapped_String_Address = Null_Address then
raise Constraint_Error;
end if;
end Check_Non_Null;
-----------
-- Clear --
-----------
procedure Clear (Str : in out CPP_String) is
begin
Check_Non_Null (Str);
External.Clear (Str);
end Clear;
-------------
-- Compare --
-------------
function Compare
(Left : CPP_String;
Right : CPP_String) return Integer is
begin
Check_Non_Null (Left);
Check_Non_Null (Right);
return External.Compare (Left, Right);
end Compare;
function Compare
(Left : CPP_String;
Pos : size_t;
Len : size_t;
Right : CPP_String) return Integer is
begin
Check_Non_Null (Left);
Check_Non_Null (Right);
return External.Compare_With_Substring (Left, Pos, Len, Right);
end Compare;
function Compare
(Left : CPP_String;
Pos : size_t;
Len : size_t;
Right : CPP_String;
Subpos : size_t;
Sublen : size_t) return Integer is
begin
Check_Non_Null (Left);
Check_Non_Null (Right);
return External.Compare_Substrings
(Left, Pos, Len, Right, Subpos, Sublen);
end Compare;
function Compare
(Left : CPP_String;
Right : chars_ptr) return Integer is
begin
Check_Non_Null (Left);
return External.Compare_With_Text (Left, Right);
end Compare;
function Compare
(Left : CPP_String;
Pos : size_t;
Len : size_t;
Right : chars_ptr) return Integer is
begin
Check_Non_Null (Left);
return External.Compare_Substring_With_Text (Left, Pos, Len, Right);
end Compare;
function Compare
(Left : CPP_String;
Pos : size_t;
Len : size_t;
Right : chars_ptr;
N : size_t) return Integer is
begin
Check_Non_Null (Left);
return External.Compare_Substring_With_Buffer (Left, Pos, Len, Right, N);
end Compare;
----------
-- Copy --
----------
procedure Copy
(From_Str : CPP_String;
To_Str : chars_ptr;
Len : size_t;
Pos : size_t;
Num_Chars : out size_t)
is
Result : aliased size_t;
begin
Check_Non_Null (From_Str);
External.Copy (From_Str, To_Str, Len, Pos, Result'Access);
Num_Chars := Result;
end Copy;
-----------
-- C_Str --
-----------
function C_Str
(Str : CPP_String) return chars_ptr is
begin
Check_Non_Null (Str);
return External.C_Str (Str);
end C_Str;
----------
-- Data --
----------
function Data
(Str : CPP_String) return chars_ptr is
begin
Check_Non_Null (Str);
return External.Data (Str);
end Data;
function Data
(Str : CPP_String) return String is
begin
return Value (Data (Str));
end Data;
-----------
-- Empty --
-----------
function Empty (Str : CPP_String) return Boolean is
begin
Check_Non_Null (Str);
return External.Empty (Str) /= False;
end Empty;
-----------
-- Erase --
-----------
procedure Erase
(Str : in out CPP_String;
Pos : size_t := 0;
Len : size_t := Npos) is
begin
Check_Non_Null (Str);
External.Erase_Sequence (Str, Pos, Len);
end Erase;
----------
-- Find --
----------
function Find
(Str : CPP_String;
Text : CPP_String;
Pos : size_t := 0) return size_t is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
return External.Find_String (Str, Text, Pos);
end Find;
function Find
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t := 0) return size_t is
begin
Check_Non_Null (Str);
return External.Find_Text (Str, Text, Pos);
end Find;
function Find
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t is
begin
Check_Non_Null (Str);
return External.Find_Buffer (Str, Text, Pos, N);
end Find;
function Find
(Str : CPP_String;
C : Character;
Pos : size_t := 0) return size_t is
begin
Check_Non_Null (Str);
return External.Find_Char (Str, C, Pos);
end Find;
-----------------------
-- Find_First_Not_Of --
-----------------------
function Find_First_Not_Of
(Str : CPP_String;
Text : CPP_String;
Pos : size_t := 0) return size_t is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
return External.Find_First_Not_Of_String (Str, Text, Pos);
end Find_First_Not_Of;
function Find_First_Not_Of
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t := 0) return size_t is
begin
Check_Non_Null (Str);
return External.Find_First_Not_Of_Text (Str, Text, Pos);
end Find_First_Not_Of;
function Find_First_Not_Of
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t is
begin
Check_Non_Null (Str);
return External.Find_First_Not_Of_Buffer (Str, Text, Pos, N);
end Find_First_Not_Of;
function Find_First_Not_Of
(Str : CPP_String;
C : Character;
Pos : size_t := 0) return size_t is
begin
Check_Non_Null (Str);
return External.Find_First_Not_Of_Char (Str, C, Pos);
end Find_First_Not_Of;
-------------------
-- Find_First_Of --
-------------------
function Find_First_Of
(Str : CPP_String;
Text : CPP_String;
Pos : size_t := 0) return size_t is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
return External.Find_First_Of_String (Str, Text, Pos);
end Find_First_Of;
function Find_First_Of
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t := 0) return size_t is
begin
Check_Non_Null (Str);
return External.Find_First_Of_Text (Str, Text, Pos);
end Find_First_Of;
function Find_First_Of
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t is
begin
Check_Non_Null (Str);
return External.Find_First_Of_Buffer (Str, Text, Pos, N);
end Find_First_Of;
function Find_First_Of
(Str : CPP_String;
C : Character;
Pos : size_t := 0) return size_t is
begin
Check_Non_Null (Str);
return External.Find_First_Of_Char (Str, C, Pos);
end Find_First_Of;
----------------------
-- Find_Last_Not_Of --
----------------------
function Find_Last_Not_Of
(Str : CPP_String;
Text : CPP_String;
Pos : size_t := Npos) return size_t is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
return External.Find_Last_Not_Of_String (Str, Text, Pos);
end Find_Last_Not_Of;
function Find_Last_Not_Of
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t := Npos) return size_t is
begin
Check_Non_Null (Str);
return External.Find_Last_Not_Of_Text (Str, Text, Pos);
end Find_Last_Not_Of;
function Find_Last_Not_Of
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t is
begin
Check_Non_Null (Str);
return External.Find_Last_Not_Of_Buffer (Str, Text, Pos, N);
end Find_Last_Not_Of;
function Find_Last_Not_Of
(Str : CPP_String;
C : Character;
Pos : size_t := Npos) return size_t is
begin
Check_Non_Null (Str);
return External.Find_Last_Not_Of_Char (Str, C, Pos);
end Find_Last_Not_Of;
------------------
-- Find_Last_Of --
------------------
function Find_Last_Of
(Str : CPP_String;
Text : CPP_String;
Pos : size_t := Npos) return size_t is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
return External.Find_Last_Of_String (Str, Text, Pos);
end Find_Last_Of;
function Find_Last_Of
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t := Npos) return size_t is
begin
Check_Non_Null (Str);
return External.Find_Last_Of_Text (Str, Text, Pos);
end Find_Last_Of;
function Find_Last_Of
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t is
begin
Check_Non_Null (Str);
return External.Find_Last_Of_Buffer (Str, Text, Pos, N);
end Find_Last_Of;
function Find_Last_Of
(Str : CPP_String;
C : Character;
Pos : size_t := Npos) return size_t is
begin
Check_Non_Null (Str);
return External.Find_Last_Of_Char (Str, C, Pos);
end Find_Last_Of;
----------
-- Free --
----------
procedure Free (Str : in out CPP_String) is
begin
Check_Non_Null (Str);
External.Destroy (Str);
Str.Wrapped_String_Address := Null_Address;
end Free;
------------
-- Insert --
------------
procedure Insert
(Str : in out CPP_String;
Pos : size_t;
Text : String)
is
C_Text : chars_ptr := New_String (Text);
begin
Check_Non_Null (Str);
External.Insert_Text (Str, Pos, C_Text);
Free (C_Text);
end Insert;
procedure Insert
(Str : in out CPP_String;
Pos : size_t;
Text : CPP_String)
is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
External.Insert_String (Str, Pos, Text);
end Insert;
procedure Insert
(Str : in out CPP_String;
Pos : size_t;
Text : CPP_String;
Subpos : size_t;
Sublen : size_t) is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
External.Insert_Substring (Str, Pos, Text, Subpos, Sublen);
end Insert;
procedure Insert
(Str : in out CPP_String;
Pos : size_t;
Text : chars_ptr) is
begin
Check_Non_Null (Str);
External.Insert_Text (Str, Pos, Text);
end Insert;
procedure Insert
(Str : in out CPP_String;
Pos : size_t;
Text : chars_ptr;
N : size_t) is
begin
Check_Non_Null (Str);
External.Insert_Buffer (Str, Pos, Text, N);
end Insert;
procedure Insert
(Str : in out CPP_String;
Pos : size_t;
N : size_t;
C : Character) is
begin
Check_Non_Null (Str);
External.Insert_Fill (Str, Pos, N, C);
end Insert;
------------
-- Length --
------------
function Length
(Str : CPP_String) return size_t is
begin
Check_Non_Null (Str);
return External.Length (Str);
end Length;
--------------
-- Max_Size --
--------------
function Max_Size
(Str : CPP_String) return size_t is
begin
Check_Non_Null (Str);
return External.Max_Size (Str);
end Max_Size;
--------------------
-- New_CPP_String --
--------------------
function New_CPP_String return CPP_String is
Result : CPP_String;
begin
External.Init (Result);
return Result;
end New_CPP_String;
function New_CPP_String
(Text : chars_ptr) return CPP_String
is
Result : CPP_String;
begin
External.Init_With_Text (Result, Text);
return Result;
end New_CPP_String;
function New_CPP_String
(Text : String) return CPP_String
is
C_Text : chars_ptr := New_String (Text);
Result : CPP_String;
begin
Result := New_CPP_String (C_Text);
Free (C_Text);
return Result;
end New_CPP_String;
function New_CPP_String
(Text : CPP_String) return CPP_String
is
Contents : constant String := Data (Text);
begin
return New_CPP_String (Contents);
end New_CPP_String;
function New_CPP_String
(N : size_t; C : Character) return CPP_String
is
Result : CPP_String;
begin
External.Init_With_Fill (Result, N, C);
return Result;
end New_CPP_String;
----------
-- Npos --
----------
function Npos return size_t is
begin
return External.Npos;
end Npos;
--------------
-- Pop_Back --
--------------
procedure Pop_Back
(Str : in out CPP_String) is
begin
Check_Non_Null (Str);
External.Pop_Back (Str);
end Pop_Back;
---------------
-- Push_Back --
---------------
procedure Push_Back
(Str : in out CPP_String;
C : Character) is
begin
Check_Non_Null (Str);
External.Push_Back (Str, C);
end Push_Back;
-------------
-- Replace --
-------------
procedure Replace
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
Text : String)
is
C_Text : chars_ptr := New_String (Text);
begin
Check_Non_Null (Str);
External.Replace_Text (Str, Pos, Len, C_Text);
Free (C_Text);
end Replace;
procedure Replace
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
Text : CPP_String) is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
External.Replace_String (Str, Pos, Len, Text);
end Replace;
procedure Replace
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
Text : CPP_String;
Subpos : size_t;
Sublen : size_t) is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
External.Replace_Substring (Str, Pos, Len, Text, Subpos, Sublen);
end Replace;
procedure Replace
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
Text : chars_ptr) is
begin
Check_Non_Null (Str);
External.Replace_Text (Str, Pos, Len, Text);
end Replace;
procedure Replace
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
Text : chars_ptr;
N : size_t) is
begin
Check_Non_Null (Str);
External.Replace_Buffer (Str, Pos, Len, Text, N);
end Replace;
procedure Replace
(Str : in out CPP_String;
Pos : size_t;
Len : size_t;
N : size_t;
C : Character) is
begin
Check_Non_Null (Str);
External.Replace_Fill (Str, Pos, Len, N, C);
end Replace;
-------------
-- Reserve --
-------------
procedure Reserve (Str : in out CPP_String; N : size_t := 0) is
begin
Check_Non_Null (Str);
External.Reserve (Str, N);
end Reserve;
------------
-- Resize --
------------
procedure Resize (Str : in out CPP_String; N : size_t) is
begin
Check_Non_Null (Str);
External.Resize (Str, N);
end Resize;
------------
-- Resize --
------------
procedure Resize (Str : in out CPP_String; N : size_t; C : Character) is
begin
Check_Non_Null (Str);
External.Resize_And_Fill (Str, N, C);
end Resize;
------------------
-- Reverse_Find --
------------------
function Reverse_Find
(Str : CPP_String;
Text : CPP_String;
Pos : size_t := Npos) return size_t is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
return External.Reverse_Find_String (Str, Text, Pos);
end Reverse_Find;
function Reverse_Find
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t := Npos) return size_t is
begin
Check_Non_Null (Str);
return External.Reverse_Find_Text (Str, Text, Pos);
end Reverse_Find;
function Reverse_Find
(Str : CPP_String;
Text : chars_ptr;
Pos : size_t;
N : size_t) return size_t is
begin
Check_Non_Null (Str);
return External.Reverse_Find_Buffer (Str, Text, Pos, N);
end Reverse_Find;
function Reverse_Find
(Str : CPP_String;
C : Character;
Pos : size_t := Npos) return size_t is
begin
Check_Non_Null (Str);
return External.Reverse_Find_Char (Str, C, Pos);
end Reverse_Find;
----------
-- Size --
----------
function Size
(Str : CPP_String) return size_t is
begin
Check_Non_Null (Str);
return External.Size (Str);
end Size;
------------
-- Substr --
------------
function Substr
(Str : CPP_String;
Pos : size_t := 0;
Len : size_t := Npos) return CPP_String is
begin
Check_Non_Null (Str);
return Result : CPP_String do
External.Substr (Result, Str, Pos, Len);
end return;
end Substr;
----------
-- Swap --
----------
procedure Swap
(Str : in out CPP_String;
Text : in out CPP_String) is
begin
Check_Non_Null (Str);
Check_Non_Null (Text);
External.Swap (Str, Text);
end Swap;
--------------------------
-- Relational_Operators --
--------------------------
function "=" (Left : CPP_String; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Left);
Check_Non_Null (Right);
return External.Eq_String (Left, Right) /= False;
end "=";
function "=" (Left : chars_ptr; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Right);
return External.Eq_Text_String (Left, Right) /= False;
end "=";
function "=" (Left : CPP_String; Right : chars_ptr) return Boolean is
begin
Check_Non_Null (Left);
return External.Eq_String_Text (Left, Right) /= False;
end "=";
function "<" (Left : CPP_String; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Left);
Check_Non_Null (Right);
return External.Lt_String (Left, Right) /= False;
end "<";
function "<" (Left : chars_ptr; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Right);
return External.Lt_Text_String (Left, Right) /= False;
end "<";
function "<" (Left : CPP_String; Right : chars_ptr) return Boolean is
begin
Check_Non_Null (Left);
return External.Lt_String_Text (Left, Right) /= False;
end "<";
function "<=" (Left : CPP_String; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Left);
Check_Non_Null (Right);
return External.Le_String (Left, Right) /= False;
end "<=";
function "<=" (Left : chars_ptr; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Right);
return External.Le_Text_String (Left, Right) /= False;
end "<=";
function "<=" (Left : CPP_String; Right : chars_ptr) return Boolean is
begin
Check_Non_Null (Left);
return External.Le_String_Text (Left, Right) /= False;
end "<=";
function ">" (Left : CPP_String; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Left);
Check_Non_Null (Right);
return External.Gt_String (Left, Right) /= False;
end ">";
function ">" (Left : chars_ptr; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Right);
return External.Gt_Text_String (Left, Right) /= False;
end ">";
function ">" (Left : CPP_String; Right : chars_ptr) return Boolean is
begin
Check_Non_Null (Left);
return External.Gt_String_Text (Left, Right) /= False;
end ">";
function ">=" (Left : CPP_String; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Left);
Check_Non_Null (Right);
return External.Ge_String (Left, Right) /= False;
end ">=";
function ">=" (Left : chars_ptr; Right : CPP_String) return Boolean is
begin
Check_Non_Null (Right);
return External.Ge_Text_String (Left, Right) /= False;
end ">=";
function ">=" (Left : CPP_String; Right : chars_ptr) return Boolean is
begin
Check_Non_Null (Left);
return External.Ge_String_Text (Left, Right) /= False;
end ">=";
end GNATCOLL.CPP.Strings;
gnatcoll-bindings-25.0.0/cpp/gnatcoll-cpp-strings.ads 0000664 0000000 0000000 00000065775 14643743343 0022560 0 ustar 00root root 0000000 0000000 ------------------------------------------------------------------------------
-- G N A T C O L L --
-- --
-- Copyright (C) 2023, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 3, 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 MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- . --
-- --
------------------------------------------------------------------------------
-- This package provides a wrapper of the C++ ISO/IEC 14882:1998(E) string
-- class.
with Interfaces.C;
with Interfaces.C.Strings;
with System;
package GNATCOLL.CPP.Strings is
type CPP_String is limited private;
-- Defined limited because it has a pointer to the C++ string (to
-- forbid copying variables that reference the same string).
function Npos return Interfaces.C.size_t;
-- Greatest possible value for string indexes.
procedure Append
(Str : in out CPP_String;
Text : String);
-- Append Ada-string: Append to Str the conversion of Text into a null-
-- terminated character sequence.
procedure Append
(Str : in out CPP_String;
Text : CPP_String);
-- Append string: Append to Str the contents of Text.
procedure Append
(Str : in out CPP_String;
Text : CPP_String;
Subpos : Interfaces.C.size_t;
Sublen : Interfaces.C.size_t);
-- Append substring: Append to Str a copy of a substring of Text. The
-- substring is the portion of Text that begins at the character position
-- subpos and spans sublen characters (or until the end of Text, if either
-- Text is too short or if sublen is Npos).
procedure Append
(Str : in out CPP_String;
Text : Interfaces.C.Strings.chars_ptr);
-- Append C-string: Append to Str the null-terminated character sequence
-- pointed by Text.
procedure Append
(Str : in out CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
N : Interfaces.C.size_t);
-- Append buffer: Append to Str a copy of the first n characters of the
-- array of characters pointed by Text.
procedure Append
(Str : in out CPP_String;
N : Interfaces.C.size_t;
C : Character);
-- Append with fill: Append N consecutive copies of character c.
procedure Assign
(Str : in out CPP_String;
Text : String);
-- Ada String: Assign to Str the conversion of Text into a null terminated
-- character sequence.
procedure Assign
(Str : in out CPP_String;
Text : CPP_String);
-- C++ String: Assign to Str a copy of the C++ string Text.
procedure Assign
(Str : in out CPP_String;
Text : Interfaces.C.Strings.chars_ptr);
-- Assign to Str a copy of the null-terminated character sequence pointed
-- by Text.
procedure Assign
(Str : in out CPP_String;
C : Character);
-- Assign to Str a copy of the character C, replacing its current contents.
function Capacity (Str : CPP_String) return Interfaces.C.size_t;
-- Returns the size of the storage space currently allocated for the string
-- expressed in terms of bytes.
procedure Clear (Str : in out CPP_String);
-- Erases the contents of the string, which becomes an empty string.
function Char_At
(Str : CPP_String;
Pos : Interfaces.C.size_t) return Character;
-- Return the character located at the given Position.
function Empty (Str : CPP_String) return Boolean;
-- Returns whether the string is empty (i.e. whether its length is 0).
procedure Erase
(Str : in out CPP_String;
Pos : Interfaces.C.size_t := 0;
Len : Interfaces.C.size_t := Npos);
-- Erases the portion of the string value that begins at the character
-- position pos and spans len characters (or until the end of the string,
-- if either the content is too short or if len is Npos). Default values
-- erase all characters in the string (like function Clear).
procedure Free (Str : in out CPP_String);
-- Destroys the C++ string object.
procedure Insert
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Text : String);
-- Insert Ada-string: Inserts at the given position the conversion of Text
-- into a null-terminated character sequence.
procedure Insert
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Text : CPP_String);
-- Insert string: Inserts into Str a copy of Text at the given position.
procedure Insert
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Text : CPP_String;
Subpos : Interfaces.C.size_t;
Sublen : Interfaces.C.size_t);
-- Insert substring: Inserts into Str a copy of a substring of Text. The
-- substring is the portion of Text that begins at the character position
-- subpos and spans sublen characters (or until the end of Text, if either
-- Text is too short or if sublen is Npos).
procedure Insert
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Text : Interfaces.C.Strings.chars_ptr);
-- Insert C-string: Inserts a copy of the null-terminated character
-- sequence pointed by Text.
procedure Insert
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Text : Interfaces.C.Strings.chars_ptr;
N : Interfaces.C.size_t);
-- Insert buffer: Insert into Str a copy of the first N characters of the
-- array of characters pointed by Text.
procedure Insert
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
N : Interfaces.C.size_t;
C : Character);
-- Insert with character fill: Insert N consecutive copies of character C.
function Length (Str : CPP_String) return Interfaces.C.size_t;
-- Return the number of actual bytes that conform the contents of the
-- string, which is not necessarily equal to its storage capacity.
function Max_Size (Str : CPP_String) return Interfaces.C.size_t;
-- Return the maximum length the string can reach.
function New_CPP_String return CPP_String;
-- Empty string constructor: allocates and initializes an empty string,
-- with a length of zero characters.
function New_CPP_String
(Text : String) return CPP_String;
-- Ada string copy constructor: allocates a new string and initializes
-- it copying the conversion of Text into a C null-terminated character
-- sequence.
function New_CPP_String
(Text : CPP_String) return CPP_String;
-- C++ string copy constructor: allocates a new string and initializes
-- it copying the contents of Text.
function New_CPP_String
(Text : Interfaces.C.Strings.chars_ptr) return CPP_String;
-- C-String constructor: allocates a new string and initializes it copying
-- the contents of the null-terminated character sequence pointed by Text.
function New_CPP_String
(N : Interfaces.C.size_t;
C : Character) return CPP_String;
-- Fill constructor: allocates a new string and initializes it filling the
-- string with N consecutive copies of character C.
procedure Pop_Back
(Str : in out CPP_String);
-- Remove last character of Str.
procedure Push_Back
(Str : in out CPP_String;
C : Character);
-- Append character C to the end of Str.
procedure Replace
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
Text : String);
-- Replace string: Replaces the portion of the string that begins at
-- character Pos and spans Len characters by the contents of Text.
procedure Replace
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
Text : CPP_String);
-- Replace string (1): Replaces the portion of the string that begins at
-- character pos and spans len characters by the contents of Text.
procedure Replace
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
Text : CPP_String;
Subpos : Interfaces.C.size_t;
Sublen : Interfaces.C.size_t);
-- Replace substring: Replaces the portion of the string that begins at
-- character Pos and spans Len characters by the contents of Text that
-- begins at character Subpos and spans Sublen characters.
procedure Replace
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
Text : Interfaces.C.Strings.chars_ptr);
-- Replace c-string: Replaces the portion of the string that begins at
-- character Pos and spans Len characters by the contents of Text.
procedure Replace
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
Text : Interfaces.C.Strings.chars_ptr;
N : Interfaces.C.size_t);
-- Replace buffer: Replaces the portion of the string that begins at
-- character Pos and spans Len characters by the contents of the first
-- N characters of the array of characters pointed by Text.
procedure Replace
(Str : in out CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
N : Interfaces.C.size_t;
C : Character);
-- Replace with character fill: Replaces the portion of the string that
-- begins at character Pos by N consecutive copies of character C.
procedure Reserve
(Str : in out CPP_String;
N : Interfaces.C.size_t := 0);
-- Requests that the string capacity be adapted to a planned change in size
-- to a length of up to N characters. If N is greater than the current
-- string capacity, the function causes the container to increase its
-- capacity to N characters (or greater); In all other cases, it is taken
-- as a non-binding request to shrink the string capacity: the container
-- implementation is free to optimize otherwise and leave the string with
-- a capacity greater than n.
procedure Resize
(Str : in out CPP_String;
N : Interfaces.C.size_t);
-- Resize the string to a length of N characters. If N is smaller than the
-- current string length, the current value is shortened to its first N
-- character, removing the characters beyond the Nth. If N is greater than
-- the current string length, the current content is extended by inserting
-- at the end as many null characters as needed to reach a size of N.
procedure Resize
(Str : in out CPP_String;
N : Interfaces.C.size_t;
C : Character);
-- Resize the string to a length of N characters. If N is smaller than the
-- current string length, the current value is shortened to its first N
-- character, removing the characters beyond the Nth. If N is greater than
-- the current string length, the current content is extended by inserting
-- at the end as many characters C as needed to reach a size of N.
function Size (Str : CPP_String) return Interfaces.C.size_t;
-- Return the number of actual bytes that conform the contents of the
-- string, which is not necessarily equal to its storage capacity.
procedure Swap
(Str : in out CPP_String;
Text : in out CPP_String);
-- Exchange the content of the container Str by the content of Text.
-----------------------
-- String operations --
-----------------------
function C_Str (Str : CPP_String) return Interfaces.C.Strings.chars_ptr;
-- Return a pointer to an array that contains a null-terminated sequence
-- of characters (i.e., a C-string) representing the current value of the
-- string object.
function Compare
(Left : CPP_String;
Right : CPP_String) return Integer;
-- Compare the value of the string objects. Returns a signed integral
-- indicating the relation between the strings:
-- 0: They compare equal
-- <0: Either the value of the first character that does not match is
-- lower in the compared string, or all compared characters match
-- but the compared string is shorter.
-- >0: Either the value of the first character that does not match is
-- greater in the compared string, or all compared characters match
-- but the compared string is longer.
function Compare
(Left : CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
Right : CPP_String) return Integer;
-- Compare the substring that begins at its character in position Pos and
-- spans Len characters with the value of string Right.
function Compare
(Left : CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
Right : CPP_String;
Subpos : Interfaces.C.size_t;
Sublen : Interfaces.C.size_t) return Integer;
-- Compare the substring that begins at its character in position Pos and
-- spans Len characters with the value of string Right from position Subpos
-- spanning Sublen chars.
function Compare
(Left : CPP_String;
Right : Interfaces.C.Strings.chars_ptr) return Integer;
-- Compare string with null-terminated C string.
function Compare
(Left : CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
Right : Interfaces.C.Strings.chars_ptr) return Integer;
-- Compare substring with null-terminated C string.
function Compare
(Left : CPP_String;
Pos : Interfaces.C.size_t;
Len : Interfaces.C.size_t;
Right : Interfaces.C.Strings.chars_ptr;
N : Interfaces.C.size_t) return Integer;
-- Compare the substring that begins at its character in position Pos and
-- spans Len characters with the value of string Right. N is the number of
-- characters to compare.
procedure Copy
(From_Str : CPP_String;
To_Str : Interfaces.C.Strings.chars_ptr;
Len : Interfaces.C.size_t;
Pos : Interfaces.C.size_t;
Num_Chars : out Interfaces.C.size_t);
-- Copies a substring of the current value of the string object From_Str
-- into the C array pointed by To_Str. This substring contains the Len
-- characters that start at position Pos. The function does not append
-- a null character at the end of the copied content.
function Data (Str : CPP_String) return String;
-- Return the string data.
function Data (Str : CPP_String) return Interfaces.C.Strings.chars_ptr;
-- Return the null-terminated character sequence contained in Str.
function Find
(Str : CPP_String;
Text : CPP_String;
Pos : Interfaces.C.size_t := 0) return Interfaces.C.size_t;
-- Searches in Str for the first occurrence of the sequence Text. Pos is
-- the position of the first character in Str to be considered in the
-- search.
function Find
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t := 0) return Interfaces.C.size_t;
-- Searches in Str for the first occurrence of the sequence Text. Pos is
-- the position of the first character in Str to be considered in the
-- search.
function Find
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t;
N : Interfaces.C.size_t) return Interfaces.C.size_t;
-- Searches in Str for the first occurrence of the sequence Text. Pos is
-- the position of the first character in Str to be considered in the
-- search; N is the length of the sequence of characters to match.
function Find
(Str : CPP_String;
C : Character;
Pos : Interfaces.C.size_t := 0) return Interfaces.C.size_t;
-- Searches in Str for the first occurrence of character C. Pos is the
-- position of the first character in Str to be considered in the search.
function Find_First_Not_Of
(Str : CPP_String;
Text : CPP_String;
Pos : Interfaces.C.size_t := 0) return Interfaces.C.size_t;
-- Searches the string for the first character that does not match any of
-- the characters specified in Text. When Pos is specified, the search only
-- includes characters at or after position Pos, ignoring any possible
-- occurrences before Pos.
function Find_First_Not_Of
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t := 0) return Interfaces.C.size_t;
-- Searches the string for the first character that does not match any of
-- the characters specified in Text. When Pos is specified, the search only
-- includes characters at or after position Pos, ignoring any possible
-- occurrences before Pos.
function Find_First_Not_Of
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t;
N : Interfaces.C.size_t) return Interfaces.C.size_t;
-- Searches the string for the first character that does not match any of
-- the characters specified in Text. When Pos is specified, the search only
-- includes characters at or after position Pos, ignoring any possible
-- occurrences before Pos. N is the number of characters to search for.
function Find_First_Not_Of
(Str : CPP_String;
C : Character;
Pos : Interfaces.C.size_t := 0) return Interfaces.C.size_t;
-- Searches the string for the first character that does not match C.
-- When Pos is specified, the search only includes characters at or after
-- position Pos, ignoring any possible occurrences before Pos.
function Find_First_Of
(Str : CPP_String;
Text : CPP_String;
Pos : Interfaces.C.size_t := 0) return Interfaces.C.size_t;
-- Searches the string for the first character that matches any of the
-- characters specified in Text. When Pos is specified, the search only
-- includes characters at or after position Pos, ignoring any possible
-- occurrences before Pos.
function Find_First_Of
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t := 0) return Interfaces.C.size_t;
-- Searches the string for the first character that matches any of the
-- characters specified in Text. When Pos is specified, the search only
-- includes characters at or after position Pos, ignoring any possible
-- occurrences before Pos.
function Find_First_Of
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t;
N : Interfaces.C.size_t) return Interfaces.C.size_t;
-- Searches the string for the first character that matches any of the
-- characters specified in Text. When Pos is specified, the search only
-- includes characters at or after position Pos, ignoring any possible
-- occurrences before Pos. N is the number of characters to search for.
function Find_First_Of
(Str : CPP_String;
C : Character;
Pos : Interfaces.C.size_t := 0) return Interfaces.C.size_t;
-- Searches the string for the first character that matches character C.
-- When pos is specified, the search only includes characters at or after
-- position pos, ignoring any possible occurrences before Pos. N is the
-- number of characters to search for.
function Find_Last_Not_Of
(Str : CPP_String;
Text : CPP_String;
Pos : Interfaces.C.size_t := Npos) return Interfaces.C.size_t;
-- Searches the string for the last character that does not match any of
-- the characters specified in Text. When Pos is specified, the search only
-- includes characters at or before position Pos, ignoring any possible
-- occurrences after Pos.
function Find_Last_Not_Of
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t := Npos) return Interfaces.C.size_t;
-- Searches the string for the last character that does not match any of
-- the characters specified in Text. When Pos is specified, the search only
-- includes characters at or before position Pos, ignoring any possible
-- occurrences after Pos.
function Find_Last_Not_Of
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t;
N : Interfaces.C.size_t) return Interfaces.C.size_t;
-- Searches the string for the last character that does not match any of
-- the characters specified in Text. When pos is specified, the search only
-- includes characters at or before position Pos, ignoring any possible
-- occurrences after Pos. N is the number of characters to search for.
function Find_Last_Not_Of
(Str : CPP_String;
C : Character;
Pos : Interfaces.C.size_t := Npos) return Interfaces.C.size_t;
-- Searches the string for the last character that does not match C.
-- When pos is specified, the search only includes characters at or before
-- position pos, ignoring any possible occurrences after Pos. N is the
-- number of characters to search for.
function Find_Last_Of
(Str : CPP_String;
Text : CPP_String;
Pos : Interfaces.C.size_t := Npos) return Interfaces.C.size_t;
-- Searches the string for the last character that matches any of the
-- characters specified in Text. When pos is specified, the search only
-- includes characters at or before position pos, ignoring any possible
-- occurrences after Pos.
function Find_Last_Of
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t := Npos) return Interfaces.C.size_t;
-- Searches the string for the last character that matches any of the
-- characters specified in Text. When pos is specified, the search only
-- includes characters at or before position pos, ignoring any possible
-- occurrences after Pos.
function Find_Last_Of
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t;
N : Interfaces.C.size_t) return Interfaces.C.size_t;
-- Searches the string for the last character that matches any of the
-- characters specified in Text. When pos is specified, the search only
-- includes characters at or before position pos, ignoring any possible
-- occurrences after Pos. N is the number of characters to search for.
function Find_Last_Of
(Str : CPP_String;
C : Character;
Pos : Interfaces.C.size_t := Npos) return Interfaces.C.size_t;
-- Searches the string for the last character that matches character C.
-- When pos is specified, the search only includes characters at or before
-- position pos, ignoring any possible occurrences after Pos. N is the
-- number of characters to search for.
function Reverse_Find
(Str : CPP_String;
Text : CPP_String;
Pos : Interfaces.C.size_t := Npos) return Interfaces.C.size_t;
-- Searches in Str for the last occurrence of the sequence Text. When Pos
-- is specified, the search only includes sequences of characters that
-- begin at or before position Pos, ignoring any possible match beginning
-- after Pos.
function Reverse_Find
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t := Npos) return Interfaces.C.size_t;
-- Searches in Str for the last occurrence of the sequence Text. When Pos
-- is specified, the search only includes sequences of characters that
-- begin at or before position Pos, ignoring any possible match beginning
-- after Pos.
function Reverse_Find
(Str : CPP_String;
Text : Interfaces.C.Strings.chars_ptr;
Pos : Interfaces.C.size_t;
N : Interfaces.C.size_t) return Interfaces.C.size_t;
-- Searches in Str for the last occurrence of the sequence Text. Pos is
-- the position of the last character in Str to be considered in the
-- search; N is the length of the sequence of characters to match.
function Reverse_Find
(Str : CPP_String;
C : Character;
Pos : Interfaces.C.size_t := Npos) return Interfaces.C.size_t;
-- Searches in Str for the last occurrence of character C. Pos is the
-- position of the last character in Str to be considered in the search.
function Substr
(Str : CPP_String;
Pos : Interfaces.C.size_t := 0;
Len : Interfaces.C.size_t := Npos) return CPP_String;
-- Returns a newly constructed string object with its value initialized to
-- a copy of a substring of this object.
--------------------------
-- Relational Operators --
--------------------------
function "="
(Left : CPP_String;
Right : CPP_String) return Boolean;
function "="
(Left : Interfaces.C.Strings.chars_ptr;
Right : CPP_String) return Boolean;
function "="
(Left : CPP_String;
Right : Interfaces.C.Strings.chars_ptr) return Boolean;
function "<"
(Left : CPP_String;
Right : CPP_String) return Boolean;
function "<"
(Left : Interfaces.C.Strings.chars_ptr;
Right : CPP_String) return Boolean;
function "<"
(Left : CPP_String;
Right : Interfaces.C.Strings.chars_ptr) return Boolean;
function "<="
(Left : CPP_String;
Right : CPP_String) return Boolean;
function "<="
(Left : Interfaces.C.Strings.chars_ptr;
Right : CPP_String) return Boolean;
function "<="
(Left : CPP_String;
Right : Interfaces.C.Strings.chars_ptr) return Boolean;
function ">"
(Left : CPP_String;
Right : CPP_String) return Boolean;
function ">"
(Left : Interfaces.C.Strings.chars_ptr;
Right : CPP_String) return Boolean;
function ">"
(Left : CPP_String;
Right : Interfaces.C.Strings.chars_ptr) return Boolean;
function ">="
(Left : CPP_String;
Right : CPP_String) return Boolean;
function ">="
(Left : Interfaces.C.Strings.chars_ptr;
Right : CPP_String) return Boolean;
function ">="
(Left : CPP_String;
Right : Interfaces.C.Strings.chars_ptr) return Boolean;
private
type CPP_String is record
Wrapped_String_Address : System.Address := System.Null_Address;
end record;
end GNATCOLL.CPP.Strings;
gnatcoll-bindings-25.0.0/cpp/gnatcoll-cpp.ads 0000664 0000000 0000000 00000003504 14643743343 0021047 0 ustar 00root root 0000000 0000000 ------------------------------------------------------------------------------
-- G N A T C O L L --
-- --
-- Copyright (C) 2023, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 3, 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 MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- . --
-- --
------------------------------------------------------------------------------
-- This package hierarchy provides binding to C++ Standard library functions
package GNATCOLL.CPP is
end GNATCOLL.CPP;
gnatcoll-bindings-25.0.0/cpp/gnatcoll_cpp.gpr 0000664 0000000 0000000 00000007602 14643743343 0021155 0 ustar 00root root 0000000 0000000 ------------------------------------------------------------------------------
-- G N A T C O L L --
-- --
-- Copyright (C) 2023, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 3, 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 MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- . --
-- --
------------------------------------------------------------------------------
with "gnatcoll_core";
library project GnatColl_CPP is
Version := External ("GNATCOLL_VERSION", "0.0");
Name := "gnatcoll_cpp";
type Build_Type is ("DEBUG", "PROD");
Build : Build_Type :=
External ("GNATCOLL_BUILD_MODE", External ("BUILD", "PROD"));
type Library_Type_Type is ("relocatable", "static", "static-pic");
Library_Type : Library_Type_Type := External ("LIBRARY_TYPE", "static");
for Source_Dirs use (".");
for Library_Kind use Library_Type;
for Object_Dir
use "obj/" & Project'Library_Kind;
for Library_Dir
use "lib/" & Project'Library_Kind;
for Library_Name use Name;
case Library_Type is
when "relocatable" =>
for Leading_Library_Options use External_As_List ("LDFLAGS", " ");
for Library_Version use "lib" & Name & Gnatcoll_Core.So_Ext & "." & Version;
when others =>
null;
end case;
for Languages use ("Ada", "C++");
package Compiler is
case Build is
when "DEBUG" =>
for Switches ("Ada") use
("-g", "-O0", "-gnata", "-gnatVa", "-gnatQ", "-gnaty", "-gnateE",
"-gnatwaCJe", "-fstack-check");
when "PROD" =>
-- Do not use -gnatwe for production mode
for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ");
end case;
for Switches ("Ada") use Compiler'Switches ("Ada")
& External_As_List ("ADAFLAGS", " ");
for Switches ("C++") use Compiler'Switches ("C++")
& External_As_List ("CFLAGS", " ")
& External_As_List ("CPPFLAGS", " ");
end Compiler;
package Naming is
for Specification_Suffix ("C++") use ".h";
for Implementation_Suffix ("C++") use ".cpp";
end Naming;
package Binder is
case Build is
when "DEBUG" =>
for Switches ("Ada") use ("-E");
when "PROD" =>
null;
end case;
end Binder;
package Builder is
case Build is
when "DEBUG" =>
for Global_Configuration_Pragmas use "../gnat_debug.adc";
when "PROD" =>
null;
end case;
end Builder;
package Ide is
for VCS_Kind use "Git";
end Ide;
end GnatColl_CPP;
gnatcoll-bindings-25.0.0/cpp/setup.py 0000775 0000000 0000000 00000003361 14643743343 0017511 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
import logging
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from setup_support import SetupApp
class GNATCollCPP(SetupApp):
name = 'gnatcoll_cpp'
project = 'gnatcoll_cpp.gpr'
description = 'GNATColl CPP bindings'
def create(self):
super(GNATCollCPP, self).create()
self.build_cmd.add_argument(
'--debug',
help='build project in debug mode',
action="store_true",
default=False)
def update_config(self, config, args):
logging.info('%-26s %s',
'Libraries kind', ", ".join(config.data['library_types']))
# Set library version
with open(os.path.join(config.source_dir, '..',
'version_information'), 'r') as fd:
version = fd.read().strip()
config.set_data('GNATCOLL_VERSION', version, sub='gprbuild')
# Set build mode
config.set_data('BUILD', 'DEBUG' if args.debug else 'PROD',
sub='gprbuild')
logging.info('%-26s %s', 'Build mode',
config.data['gprbuild']['BUILD'])
def variants(self, config, cmd):
result = []
for library_type in config.data['library_types']:
gpr_vars = {'LIBRARY_TYPE': library_type,
'GPR_BUILD': library_type}
if cmd == 'install':
result.append((['--build-name=%s' % library_type,
'--build-var=LIBRARY_TYPE'],
gpr_vars))
else:
result.append(([], gpr_vars))
return result
if __name__ == '__main__':
app = GNATCollCPP()
sys.exit(app.run())
gnatcoll-bindings-25.0.0/docs-common/ 0000775 0000000 0000000 00000000000 14643743343 0017425 5 ustar 00root root 0000000 0000000 gnatcoll-bindings-25.0.0/docs-common/Makefile 0000664 0000000 0000000 00000011035 14643743343 0021065 0 ustar 00root root 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GNATColl.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GNATColl.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/GNATColl"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GNATColl"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
make -C $(BUILDDIR)/latex LATEXOPTS="-interaction=errorstopmode" all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
gnatcoll-bindings-25.0.0/docs-common/adacore-logo-white.png 0000664 0000000 0000000 00000114625 14643743343 0023616 0 ustar 00root root 0000000 0000000 ‰PNG
IHDR Ð ¤ i[¾” pHYs šœ ÐiTXtXML:com.adobe.xmp nãoN ’kIDATxìá€u?^Ÿ¹™H€:„. ¡÷"!¥†Q°€
—ßîêª+v]QA±¡BG"*ÄB¯Ò{—šJzæ]^–?Å$L&3wîó}>ç´uvvŠˆˆˆ#p“²Â81O
¡!"""""""""""""""4DDDDDDDDDDDDDDD„†ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆÐ"""""""""""""""BCDDDDDDDDDDDDDDDhˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
¡!"""""""""""""""4DDDDDDDDDDDDDDD„†ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆÐÚEDDDDDDDD ,‰¥±4X
B,Åü«vÌö¯&¢Ó«æ`2¦c:&c&a¦a
f‹ˆˆˆˆˆ(L»ˆˆˆˆˆˆˆˆh¦~X+`–ÇÊXËb,‹e°c°Ö30000ÏâŸxÏàILÑ¢ÚEDDDDDDDDOZñ&VÇÊX«bu¬ˆ6Õ7 +`g:þ‰âi<ŠGð(Ãcx3DDDDDD4Y»ˆˆˆˆˆˆˆˆXX«a=lˆu±†c8–²8ÖÀìi<Œûq?îÇý¸‹ˆˆˆˆˆèí""""""""b^Ú°ÞŠM°6Äz(zÛ
X[ùWÓqîÆ¸wànÌÑMí""""""""b1¼›c3ŒÀFXR´¢Å±16Æ^5à¸7ã&<("""""¢ÚEôŒ%±ŽxŽ˜*""""""ZQ?l„í°56ÇÆhU×À:XûzÕDÜŒ›p®Á=èñí"zÆGñ5ñŠãq¢ˆˆˆˆˆˆhËb{ì€m°5‰:Œ]°‹WMÀ5ø;®Á5x^DDDDDÔZ[gg§ˆpÖ¯¸
oU27)Û(ŒQ¾aØ »`G¼m"ÞÜ?p®Âx<%"""""j¥]Ä¢Ûë‹×Ú›ãFÑۖ®‰‘x‹ˆîÙá/»Æ¥¸Ï‹ˆˆˆˆˆ¢µ‹Xtb^ÞEDDDDDDOk`s¼#±-ú‰èyëc}¹¸¿Çeø+戈ˆˆˆˆ¢´uvvŠX‹ã)oô